Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / support / scripts / listerr.c
bloba5127cb85bddf689f2311e6f3a470d9e892f7101
1 /*
2 * listerr.c - program to create the list of errors and warnings list from SDCCerr.c
4 * gcc -I ../../src listerr.c -o listerr
5 */
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include <string.h>
11 /* although this seems to be strange, this is the easiest way how to import the ErrTab without having to modify SDCCerr.c/h */
12 #include "SDCCerr.c"
14 // this is to make SDCCerr happy - simulate global SDCC variables
15 char *filename ;
16 int lineno ;
17 int fatalError ;
20 /* predefined names for errorlevels */
21 char *ErrTypeName[] = {
22 "ALL ",
23 /** All warnings, including those considered 'reasonable to use,
24 on occasion, in clean programs' (man 3 gcc). */
25 "PEDANTIC",
26 /** 'informational' warnings */
27 "INFO ",
28 /** Most warnings. */
29 "WARNING ",
30 /** Errors only. */
31 "ERROR "
35 /* some simple internal variables */
36 int i;
37 char s[256];
38 char *p;
40 int main(int argc, char *argv[])
42 printf("Number Type Text\n"); /* output file header */
43 printf("------------------------------------------------------------------------------\n");
44 for (i = 0; i < MAX_ERROR_WARNING; i++)
46 if (ErrTab[i].errIndex == i)
48 strcpy(s, ErrTab[i].errText);
49 for (p = s; NULL != (p = strchr(s, '\n')); )
50 *p = ' '; /* replace all newlines by spaces */
51 printf("%3d %-16.16s%s\n", ErrTab[i].errIndex, ErrTypeName[ErrTab[i].errType], s);
55 return 0;