1/* 2 * This program is free software; you can redistribute it and/or 3 * modify it under the terms of the GNU General Public License as 4 * published by the Free Software Foundation; either version 2 of 5 * the License, or (at your option) any later version. 6 * 7 * This program is distributed in the hope that it will be useful, 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * GNU General Public License for more details. 11 * 12 * You should have received a copy of the GNU General Public License 13 * along with this program; if not, write to the Free Software 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 15 * MA 02111-1307 USA 16 */ 17/*************************************************************************** 18 * LPRng - An Extended Print Spooler System 19 * 20 * Copyright 1988-2003, Patrick Powell, San Diego, CA 21 * papowell@lprng.com 22 * See LICENSE for conditions of use. 23 * $Id: errormsg.h,v 1.1.1.1 2008/10/15 03:28:27 james26_jang Exp $ 24 ***************************************************************************/ 25 26#ifndef _ERRORMSG_H_ 27#define _ERRORMSG_H_ 1 28 29#if defined(FORMAT_TEST) 30#define LOGMSG(X) printf( 31#define FATAL(X) printf( 32#define LOGERR(X) printf( 33#define LOGERR_DIE(X) printf( 34#define LOGDEBUG printf 35#define DIEMSG printf 36#define WARNMSG printf 37#define MESSAGE printf 38#else 39#define LOGMSG(X) logmsg(X, 40#define FATAL(X) fatal(X, 41#define LOGERR(X) logerr(X, 42#define LOGERR_DIE(X) logerr_die(X, 43#define LOGDEBUG logDebug 44#define DIEMSG Diemsg 45#define WARNMSG Warnmsg 46#define MESSAGE Message 47#endif 48 49/* PROTOTYPES */ 50const char * Errormsg ( int err ); 51/* VARARGS2 */ 52#ifdef HAVE_STDARGS 53 void logmsg(int kind, char *msg,...) 54#else 55 void logmsg(va_alist) va_dcl 56#endif 57; 58/* VARARGS2 */ 59#ifdef HAVE_STDARGS 60 void fatal (int kind, char *msg,...) 61#else 62 void fatal (va_alist) va_dcl 63#endif 64; 65/* VARARGS2 */ 66#ifdef HAVE_STDARGS 67 void logerr (int kind, char *msg,...) 68#else 69 void logerr (va_alist) va_dcl 70#endif 71; 72/* VARARGS2 */ 73#ifdef HAVE_STDARGS 74 void logerr_die (int kind, char *msg,...) 75#else 76 void logerr_die (va_alist) va_dcl 77#endif 78; 79/* VARARGS1 */ 80#ifdef HAVE_STDARGS 81 void Diemsg (char *msg,...) 82#else 83 void Diemsg (va_alist) va_dcl 84#endif 85; 86/* VARARGS1 */ 87#ifdef HAVE_STDARGS 88 void Warnmsg (char *msg,...) 89#else 90 void Warnmsg (va_alist) va_dcl 91#endif 92; 93/* VARARGS1 */ 94#ifdef HAVE_STDARGS 95 void Message (char *msg,...) 96#else 97 void Message (va_alist) va_dcl 98#endif 99; 100/* VARARGS1 */ 101#ifdef HAVE_STDARGS 102 void logDebug (char *msg,...) 103#else 104 void logDebug (va_alist) va_dcl 105#endif 106; 107const char *Sigstr (int n); 108const char *Decode_status (plp_status_t *status); 109char *Server_status( int d ); 110/* VARARGS2 */ 111#ifdef HAVE_STDARGS 112 void setstatus (struct job *job,char *fmt,...) 113#else 114 void setstatus (va_alist) va_dcl 115#endif 116; 117/* VARARGS2 */ 118#ifdef HAVE_STDARGS 119 void setmessage (struct job *job,const char *header, char *fmt,...) 120#else 121 void setmessage (va_alist) va_dcl 122#endif 123; 124 125#endif 126