libt3key
 All Data Structures Functions Variables Typedefs Enumerator Modules
key_errors.h
1 /* Copyright (C) 2011 G.P. Halkes
2  This program is free software: you can redistribute it and/or modify
3  it under the terms of the GNU General Public License version 3, as
4  published by the Free Software Foundation.
5 
6  This program is distributed in the hope that it will be useful,
7  but WITHOUT ANY WARRANTY; without even the implied warranty of
8  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9  GNU General Public License for more details.
10 
11  You should have received a copy of the GNU General Public License
12  along with this program. If not, see <http://www.gnu.org/licenses/>.
13 */
14 #ifndef T3_KEY_ERRORS_H
15 #define T3_KEY_ERRORS_H
16 
17 #include "key_api.h"
18 
25 #ifndef T3_ERR_SUCCESS
26 
27 #define T3_ERR_SUCCESS 0
28 
29 /* Use large negative value, such that we don't have to number each and
30  every value. */
31 #define T3_ERR_ERRNO (-128)
32 
33 #define T3_ERR_EOF (-127)
34 
35 #define T3_ERR_UNKNOWN (-126)
36 
37 #define T3_ERR_BAD_ARG (-125)
38 
39 #define T3_ERR_OUT_OF_MEMORY (-124)
40 
41 #define T3_ERR_TERMINFODB_NOT_FOUND (-123)
42 
43 #define T3_ERR_HARDCOPY_TERMINAL (-122)
44 
45 #define T3_ERR_TERMINAL_TOO_LIMITED (-121)
46 
47 #define T3_ERR_NO_TERM (-120)
48 
49 #define T3_ERR_INTERNAL (-119)
50 
51 #define T3_WARN_MIN (-16)
52 #endif
53 
55 /* Each extension of the list of common errors should be done with an ifdef
56  such that when several different versions of the key error header are
57  included each symbol will be defined and only defined once. */
58 
67 T3_KEY_LOCAL const char *t3_key_strerror_base(int error);
68 
69 #endif