|
|
1.1 ! root 1: /* ! 2: * G. S. Fowler ! 3: * AT&T Bell Laboratories ! 4: * ! 5: * option, error and message formatter external definitions ! 6: */ ! 7: ! 8: #ifndef ERROR_INFO ! 9: ! 10: #include <option.h> ! 11: #include <errno.h> ! 12: ! 13: #ifndef VOID ! 14: #define VOID char ! 15: #endif ! 16: ! 17: #define ERROR_INFO 0 /* info message -- no err_id */ ! 18: #define ERROR_WARNING 1 /* warning message */ ! 19: #define ERROR_ERROR 2 /* error message -- no err_exit */ ! 20: #define ERROR_FATAL 3 /* error message with err_exit */ ! 21: #define ERROR_PANIC ERROR_LEVEL /* panic message with err_exit */ ! 22: ! 23: #define ERROR_LEVEL 000077 /* level portion of status */ ! 24: #define ERROR_SYSTEM 000100 /* report system errno message */ ! 25: #define ERROR_OUTPUT 000200 /* next arg is error fd */ ! 26: #define ERROR_SOURCE 000400 /* next 2 args are FILE,LINE */ ! 27: #define ERROR_USAGE 001000 /* usage message */ ! 28: #define ERROR_PROMPT 002000 /* omit trailing newline */ ! 29: #define ERROR_NOID 004000 /* omit err_id */ ! 30: #define ERROR_LIBRARY 010000 /* library routine error */ ! 31: ! 32: #if __cplusplus ! 33: extern "C" { ! 34: #endif ! 35: ! 36: extern int errno; /* system call error status */ ! 37: ! 38: #if __cplusplus ! 39: } ! 40: #endif ! 41: ! 42: #if __STDC__ || __cplusplus || c_plusplus ! 43: #include <stdarg.h> ! 44: #if __cplusplus ! 45: extern "C" { ! 46: #endif ! 47: extern char* seterror(int, ...); ! 48: extern void error(int, ...); ! 49: extern void liberror(const char*, int, ...); ! 50: extern void verror(const char*, int, va_list); ! 51: #if __cplusplus ! 52: } ! 53: #endif ! 54: #else ! 55: extern char* seterror(); ! 56: extern void error(); ! 57: extern void liberror(); ! 58: extern void verror(); ! 59: #endif ! 60: ! 61: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.