Author: sharp@cs.pdx.edu (John Sharp) at Internet Date: 10/16/98 8:35 AM Priority: Normal TO: John Sharp at CCPO2 Subject: misc.dif ------------------------------- Message Contents ------------------------------- *** misc.c Thu Oct 15 21:28:45 1998 --- backup/misc.c Fri Sep 4 19:46:51 1998 *************** *** 30,49 **** char *fmt; char *args; ! static BOOL first=1; ! FILE *LOGFP = 0; if ( globals.debug) { va_start(args); fmt = va_arg(args, char *); ! LOGFP = fopen(MYLOGFILE, first? "w": "a"); ! first=0; if (LOGFP) - { vfprintf(LOGFP, fmt, args); ! fclose(LOGFP); ! } va_end(args); } } --- 30,49 ---- char *fmt; char *args; ! static FILE *LOGFP = 0; if ( globals.debug) { va_start(args); fmt = va_arg(args, char *); ! if (! LOGFP) { ! LOGFP = fopen(MYLOGFILE, "w"); ! setbuf(LOGFP, NULL); ! } ! if (LOGFP) vfprintf(LOGFP, fmt, args); ! va_end(args); } } *************** *** 57,76 **** { char *fmt; char *args; ! FILE *LOGFP; ! static BOOL first=1; if ( globals.commlog) { va_start(args); fmt = va_arg(args, char *); ! LOGFP = fopen(QLOGFILE, first? "w": "a"); ! first=0; if (LOGFP) - { vfprintf(LOGFP, fmt, args); ! fclose(LOGFP); ! } va_end(args); } } --- 57,76 ---- { char *fmt; char *args; ! static FILE *LOGFP = 0; if ( globals.commlog) { va_start(args); fmt = va_arg(args, char *); ! if (! LOGFP) { ! LOGFP = fopen(QLOGFILE, "w"); ! setbuf(LOGFP, NULL); ! } ! if (LOGFP) vfprintf(LOGFP, fmt, args); ! va_end(args); } }