Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
diagnostic.h
Go to the documentation of this file.
1
29#ifndef RWSTD_UTIL_DIAGNOSTIC_H_INCLUDED
30#define RWSTD_UTIL_DIAGNOSTIC_H_INCLUDED
31
32#include "scanner.h" // for token_t
33
34enum {
35 E_FIRST = 100,
36 E_SYMUSED = 101, // symbol used before defined
37 E_OPENRD = 109, // opening a file for reading
38 E_OPENWR = 110, // opening a file for writing
39 E_PAIR = 111, // invalid pair of symbolic characters (<A>,<B>)
40 E_COLNUM = 114, // bad number of collation orders
41 E_CVT2EXT = 123, // convert a character to external representation
42 E_SYMEND = 127, // unterminated symbolic name (missing '>')
43 E_CVT = 136, // error converting a character
44 E_IFMT = 135, // invalid integer format
45 E_MBCHAR = 308, // illegal/incomplete multibyte character
46 E_UCS = 315, // ill-formed or invalid UCS character
47 E_MBTOWC = 310, // mbtowc() error
48 E_RANGE = 311, // invalid range (ellipsis)
49 E_SYNTAX = 312, // bad syntax
50 E_COLORD = 133, // bad collating order
51 E_REORD = 291, // bad reorder-after
52 E_INVAL = 399, // invalid value
53 E_CMDARG = 401, // invalid command line argument
54 E_XARG = 402, // extra command line argument
55 E_NOARG = 403, // missing command line argument
56 E_OPTARG = 404, // missing argument to a command line option
57 E_CALL = 405, // system or libc call failed
58 E_NOTSUP = 712, // feature not supported (hard error)
59 E_LAST = 699,
60
61 W_FIRST = 700,
62 W_DISABLE = 700, // disable all warnings
63 W_COMPAT = 701, // no compatible locale installed
64 W_NOPCS = 702, // PCS character value not defined
65 W_COLSYM = 703, // undefined collating symbol or collating element
66 W_MISSING = 704, // missing value
67 W_REORD = 705, // bad reorder-after
68 W_ICONV = 706, // iconv_open() or iconv() error
69 W_SYM = 707, // unknown symbolic constant
70 W_CHAR = 708, // unknown character (no corresponding symbol)
71 W_CHARMAP = 709, // unknown charmap
72 W_SYNTAX = 709, // recoverable syntax error
73 W_RANGE = 710, // recoverable invalid range
74 W_INVAL = 711, // recoverable invalid value
75 W_CALL = 712, // system or libc call failed
76 W_NOTSUP = 713, // feature not supported (will be ignored)
77 W_LAST = 799,
78
79 I_FIRST = 800,
80 I_ENABLE = 800, // enable all informational messages
81 I_STAGE = 801, // information about stages of processing
82 I_OPENRD = 802, // information about files being opened for reading
83 I_OPENWR = 803, // information about files being opened for writing
84 I_READ = 804, // information about data reads
85 I_WRITE = 805, // information about data writes
86 I_SKIP = 806, // information about skpping an operation
87 I_LAST = 899
88};
89
90
91bool issue_diag (int id, bool is_error,
92 const Scanner::token_t* token,
93 const char *fmt, ...);
94
95#endif // RWSTD_UTIL_DIAGNOSTIC_H_INCLUDED
@ I_FIRST
Definition diagnostic.h:79
@ I_OPENRD
Definition diagnostic.h:82
@ I_ENABLE
Definition diagnostic.h:80
@ W_REORD
Definition diagnostic.h:67
@ E_SYMUSED
Definition diagnostic.h:36
@ E_NOTSUP
Definition diagnostic.h:58
@ I_OPENWR
Definition diagnostic.h:83
@ E_OPENRD
Definition diagnostic.h:37
@ E_XARG
Definition diagnostic.h:54
@ E_PAIR
Definition diagnostic.h:39
@ E_IFMT
Definition diagnostic.h:44
@ W_ICONV
Definition diagnostic.h:68
@ W_MISSING
Definition diagnostic.h:66
@ W_NOTSUP
Definition diagnostic.h:76
@ E_CALL
Definition diagnostic.h:57
@ I_WRITE
Definition diagnostic.h:85
@ I_READ
Definition diagnostic.h:84
@ E_CVT
Definition diagnostic.h:43
@ E_OPTARG
Definition diagnostic.h:56
@ W_CHARMAP
Definition diagnostic.h:71
@ E_CMDARG
Definition diagnostic.h:53
@ E_MBCHAR
Definition diagnostic.h:45
@ W_COMPAT
Definition diagnostic.h:63
@ W_SYM
Definition diagnostic.h:69
@ E_COLNUM
Definition diagnostic.h:40
@ W_INVAL
Definition diagnostic.h:74
@ W_DISABLE
Definition diagnostic.h:62
@ W_COLSYM
Definition diagnostic.h:65
@ W_FIRST
Definition diagnostic.h:61
@ E_COLORD
Definition diagnostic.h:50
@ E_INVAL
Definition diagnostic.h:52
@ E_MBTOWC
Definition diagnostic.h:47
@ E_FIRST
Definition diagnostic.h:35
@ I_SKIP
Definition diagnostic.h:86
@ W_SYNTAX
Definition diagnostic.h:72
@ E_OPENWR
Definition diagnostic.h:38
@ E_RANGE
Definition diagnostic.h:48
@ E_REORD
Definition diagnostic.h:51
@ W_LAST
Definition diagnostic.h:77
@ I_LAST
Definition diagnostic.h:87
@ E_NOARG
Definition diagnostic.h:55
@ E_LAST
Definition diagnostic.h:59
@ E_UCS
Definition diagnostic.h:46
@ I_STAGE
Definition diagnostic.h:81
@ E_CVT2EXT
Definition diagnostic.h:41
@ W_NOPCS
Definition diagnostic.h:64
@ E_SYNTAX
Definition diagnostic.h:49
@ W_CALL
Definition diagnostic.h:75
@ W_CHAR
Definition diagnostic.h:70
@ W_RANGE
Definition diagnostic.h:73
@ E_SYMEND
Definition diagnostic.h:42
bool issue_diag(int id, bool is_error, const Scanner::token_t *token, const char *fmt,...)
#define is_error()
Definition parser.inl:822