diff --git a/lib/com_err/compile_et.h b/lib/com_err/compile_et.h index 355639002..9a8082ae6 100644 --- a/lib/com_err/compile_et.h +++ b/lib/com_err/compile_et.h @@ -50,8 +50,6 @@ #include #include -extern FILE *c_file; -extern FILE *h_file; extern long base; extern int number; extern char *prefix; @@ -60,4 +58,25 @@ extern char *id_str; extern char *filename; extern int numerror; +struct error_code { + unsigned number; + char *name; + char *string; + struct error_code *next, **tail; +}; + +extern struct error_code *codes; + +#define APPEND(L, V) \ +do { \ + if((L) == NULL) { \ + (L) = (V); \ + (L)->tail = &(V)->next; \ + (L)->next = NULL; \ + }else{ \ + *(L)->tail = (V); \ + (L)->tail = &(V)->next; \ + } \ +}while(0) + #endif /* __COMPILE_ET_H__ */