Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/tcp_wrappers/fakelog.c
Show All 11 Lines | |||||
#include <stdio.h> | #include <stdio.h> | ||||
#include "mystdarg.h" | #include "mystdarg.h" | ||||
/* openlog - dummy */ | /* openlog - dummy */ | ||||
/* ARGSUSED */ | /* ARGSUSED */ | ||||
openlog(name, logopt, facility) | void openlog(name, logopt, facility) | ||||
char *name; | char *name; | ||||
int logopt; | int logopt; | ||||
int facility; | int facility; | ||||
{ | { | ||||
/* void */ | /* void */ | ||||
} | } | ||||
/* vsyslog - format one record */ | /* vsyslog - format one record */ | ||||
vsyslog(severity, fmt, ap) | void vsyslog(severity, fmt, ap) | ||||
int severity; | int severity; | ||||
char *fmt; | char *fmt; | ||||
va_list ap; | va_list ap; | ||||
{ | { | ||||
char buf[BUFSIZ]; | char buf[BUFSIZ]; | ||||
vprintf(percent_m(buf, fmt), ap); | vprintf(percent_m(buf, fmt), ap); | ||||
printf("\n"); | printf("\n"); | ||||
fflush(stdout); | fflush(stdout); | ||||
} | } | ||||
/* syslog - format one record */ | /* syslog - format one record */ | ||||
/* VARARGS */ | /* VARARGS */ | ||||
VARARGS(syslog, int, severity) | void VARARGS(syslog, int, severity) | ||||
{ | { | ||||
va_list ap; | va_list ap; | ||||
char *fmt; | char *fmt; | ||||
VASTART(ap, int, severity); | VASTART(ap, int, severity); | ||||
fmt = va_arg(ap, char *); | fmt = va_arg(ap, char *); | ||||
vsyslog(severity, fmt, ap); | vsyslog(severity, fmt, ap); | ||||
VAEND(ap); | VAEND(ap); | ||||
} | } | ||||
/* closelog - dummy */ | /* closelog - dummy */ | ||||
closelog() | void closelog() | ||||
{ | { | ||||
/* void */ | /* void */ | ||||
} | } |