fehQlibs 27
Qlibs
Loading...
Searching...
No Matches
error.h
Go to the documentation of this file.
1#ifndef ERROR_H
2#define ERROR_H
3
4#include <errno.h>
5
6#ifndef EPROTO /* OpenBSD compat */
7#define EPROTO EINTR
8#endif
9
10#define error_str(i) errstr(i)
11extern char *error_str(int);
12extern int error_temp(int);
13
14
15/* Exception handling notes:
16 (1) system errors RECEIVED according to <errno.h> during operation and handed over
17 (2) application errors DEFINED internally and ennumerated alongside with <errno.h>
18*/
19
20/* djb backwards compatibility - deprecated form of system errors */
21 /* Comparison of error codes and constants:
22 intern Linux FreeBSD OmniOS */
23#define error_intr EINTR /* -1 4 4 4 */
24#define error_nomem ENOMEM /* -2 12 12 12 */
25#define error_noent ENOENT /* -3 2 2 2 */
26#define error_txtbsy ETXTBSY /* -4 26 26 26 */
27#define error_io EIO /* -5 5 5 5 */
28#define error_exist EEXIST /* -6 17 17 17 */
29#define error_timeout ETIMEDOUT /* -7 110 60 145 */
30#define error_inprogress EINPROGRESS /* -8 115 36 160 */
31#define error_wouldblock EWOULDBLOCK /* -9 EAGAIN EAGAIN EAGAIN */
32#define error_again EAGAIN /* -10 11 35 11 */
33#define error_pipe EPIPE /* -11 32 32 32 */
34#define error_perm EPERM /* -12 1 1 1 */
35#define error_acces EACCES /* -13 13 13 13 */
36#define error_nodevice ENODEV /* -14 (6) (6) 19 */
37#define error_proto EPROTO /* -15 71 92 71 */
38#define error_isdir EISDIR /* -16 21 21 21 */
39#define error_connrefused ECONNREFUSED /* -17 111 61 146 */
40#define error_notdir ENOTDIR /* -18 20 20 20 */
41#define error_rofs EROFS /* -19 30 30 30 */
42#define error_connreset ECONNRESET /* -20 104 54 131 */
43
44/* djb uses some internal application error and class definitions -- revised (feh) */
45#define DONEIT 0 /* default exit 0 */
46#define VERSION 1 /* for version information; exit 1 */
47#define CAT -10 /* raw message w/o terminating \n */
48#define LOG -90 /* generic logging */
49#define INFO -91 /* named logging */
50#define TEMP -97 /* (triggered) temporay alert condition */
51#define ALERT -98 /* (triggered) alert condition */
52#define WARN -99 /* exception condition */
53#define ESOFT -100 /* soft error, reversed negative */
54#define EHARD -111 /* hard error, reversed negative */
55#define USAGE 100 /* usage error on call -- explicit usage() */
56#define SYNTAX 101 /* usage/syntax error on call -- explicit syntaxerror() */
57#define DROP 110 /* connection dropped -- explicit dropped() */
58#define FATAL 111 /* internal error -- all */
59#define ERROR 112 /* application error */
60
61#endif
int error_temp(int)
Definition errtmp.c:15
#define error_str(i)
Definition error.h:10