1 /*************************************************************************** 2 * LPRng - An Extended Print Spooler System 3 * 4 * Copyright 1988-2003, Patrick Powell, San Diego, CA 5 * papowell@lprng.com 6 * See LICENSE for conditions of use. 7 ***************************************************************************/ 8 9 #ifndef _ERRORMSG_H_ 10 #define _ERRORMSG_H_ 1 11 12 #define LOGDEBUG logDebug 13 #define DIEMSG Diemsg 14 #define WARNMSG Warnmsg 15 #define MESSAGE Message 16 17 /* PROTOTYPES */ 18 #ifdef HAVE_STRERROR 19 #define Errormsg strerror 20 #else 21 const char * Errormsg ( int err ); 22 #endif 23 /* VARARGS2 */ 24 #ifdef HAVE_STDARGS 25 void logmsg(int kind, const char *msg,...) PRINTFATTR(2,3) 26 #else 27 void logmsg(va_alist) va_dcl 28 #endif 29 ; 30 /* VARARGS2 */ 31 #ifdef HAVE_STDARGS 32 void fatal (int kind, const char *msg,...) PRINTFATTR(2,3) 33 #else 34 void fatal (va_alist) va_dcl 35 #endif 36 ; 37 /* VARARGS2 */ 38 #ifdef HAVE_STDARGS 39 void logerr (int kind, const char *msg,...) PRINTFATTR(2,3) 40 #else 41 void logerr (va_alist) va_dcl 42 #endif 43 ; 44 /* VARARGS2 */ 45 #ifdef HAVE_STDARGS 46 void logerr_die (int kind, const char *msg,...) PRINTFATTR(2,3) 47 #else 48 void logerr_die (va_alist) va_dcl 49 #endif 50 ; 51 /* VARARGS1 */ 52 #ifdef HAVE_STDARGS 53 void Diemsg (const char *msg,...) PRINTFATTR(1,2) 54 #else 55 void Diemsg (va_alist) va_dcl 56 #endif 57 ; 58 /* VARARGS1 */ 59 #ifdef HAVE_STDARGS 60 void Warnmsg (const char *msg,...) PRINTFATTR(1,2) 61 #else 62 void Warnmsg (va_alist) va_dcl 63 #endif 64 ; 65 /* VARARGS1 */ 66 #ifdef HAVE_STDARGS 67 void Message (const char *msg,...) PRINTFATTR(1,2) 68 #else 69 void Message (va_alist) va_dcl 70 #endif 71 ; 72 /* VARARGS1 */ 73 #ifdef HAVE_STDARGS 74 void logDebug (const char *msg,...) PRINTFATTR(1,2) 75 #else 76 void logDebug (va_alist) va_dcl 77 #endif 78 ; 79 const char *Sigstr (int n); 80 const char *Decode_status (plp_status_t *status); 81 const char *Server_status( int d ); 82 struct job; 83 /* VARARGS2 */ 84 #ifdef HAVE_STDARGS 85 void setstatus (struct job *job,const char *fmt,...) PRINTFATTR(2,3) 86 #else 87 void setstatus (va_alist) va_dcl 88 #endif 89 ; 90 /* VARARGS2 */ 91 #ifdef HAVE_STDARGS 92 void setmessage (struct job *job,const char *header, const char *fmt,...) PRINTFATTR(3,4) 93 #else 94 void setmessage (va_alist) va_dcl 95 #endif 96 ; 97 98 #endif 99