summaryrefslogtreecommitdiffstats
path: root/innbbsd/bbslib.c
diff options
context:
space:
mode:
Diffstat (limited to 'innbbsd/bbslib.c')
-rw-r--r--innbbsd/bbslib.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/innbbsd/bbslib.c b/innbbsd/bbslib.c
index 0dc808c3..c0177e87 100644
--- a/innbbsd/bbslib.c
+++ b/innbbsd/bbslib.c
@@ -1,9 +1,9 @@
#if defined( LINUX )
# include "innbbsconf.h"
# include "bbslib.h"
-# include <varargs.h>
+# include <stdarg.h>
#else
-# include <varargs.h>
+# include <stdarg.h>
# include "innbbsconf.h"
# include "bbslib.h"
#endif
@@ -76,17 +76,15 @@ setverboseoff()
}
}
-verboselog(va_alist)
-va_dcl
+verboselog(char *fmt, ...)
{
va_list ap;
- register char* fmt;
char datebuf[40];
time_t now;
if (verboseFlag == 0) return;
- va_start(ap);
+ va_start(ap, fmt);
time(&now);
strftime(datebuf, sizeof(datebuf), "%b %d %X ", localtime(&now));
@@ -97,8 +95,10 @@ va_dcl
else
bbslogfp = fdopen(1, "a");
}
- if (bbslogfp == NULL) { va_end(ap); return; }
- fmt = va_arg(ap, char *) ;
+ if (bbslogfp == NULL) {
+ va_end(ap);
+ return;
+ }
fprintf(bbslogfp,"%s[%d] ",datebuf, getpid());
vfprintf(bbslogfp, fmt, ap);
fflush(bbslogfp);
@@ -106,18 +106,16 @@ va_dcl
}
#ifdef PalmBBS
-xbbslog(va_alist)
+xbbslog(char *fmt, ...)
#else
-bbslog(va_alist)
+bbslog(char *fmt, ...)
#endif
-va_dcl
{
va_list ap;
- register char* fmt;
char datebuf[40];
time_t now;
- va_start(ap);
+ va_start(ap, fmt);
time(&now);
strftime(datebuf, sizeof(datebuf), "%b %d %X ", localtime(&now));
@@ -125,8 +123,10 @@ va_dcl
if (bbslogfp == NULL) {
bbslogfp = fopen(LOGFILE, "a");
}
- if (bbslogfp == NULL) { va_end(ap); return; }
- fmt = va_arg(ap, char *) ;
+ if (bbslogfp == NULL) {
+ va_end(ap);
+ return;
+ }
fprintf(bbslogfp,"%s[%d] ",datebuf,getpid());
vfprintf(bbslogfp, fmt, ap);
fflush(bbslogfp);