Debian Codegraph @

src/cdogs/cwolfmap/wad/waderrno.h

raw symbols SCIP
1 /*****************************************************************************
2 * Copyright (c) 2018 Matt Tropiano
3 * All rights reserved. This source and the accompanying materials
4 * are made available under the terms of the GNU Lesser Public License v2.1
5 * which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
7 *****************************************************************************/
8
9 #ifndef __WADERRNO_H__
10 #define __WADERRNO_H__
11
12 // This is meant to be used like <errno.h>. WAD errors and such are raised here.
13 // All calls into wad_* functions manipulate this value.
14
15 // Add "extern int waderrno;" to use.
16
17 #define WADERROR_NO_ERROR 0
18 #define WADERROR_FILE_ERROR 1
19 #define WADERROR_FILE_NOT_A_WAD 2
20 #define WADERROR_WAD_INVALID 3
21 #define WADERROR_OUT_OF_MEMORY 4
22 #define WADERROR_CANNOT_CLOSE 5
23 #define WADERROR_CANNOT_COMMIT 6
24 #define WADERROR_NOT_SUPPORTED 7
25 #define WADERROR_INDEX_OUT_OF_RANGE 8
26 #define WADERROR_COUNT 9
27
28 /**
29 * WAD error number.
30 * This field must be extern'ed to read.
31 */
32 int waderrno;
33
34 /**
35 * Get the string representation of an error.
36 */
37 char* strwaderror(int n);
38
39 #endif