No empty .Rs/.Re
[netbsd-mini2440.git] / crypto / dist / heimdal / appl / popper / pop_log.c
blobee995de37137c7c62535613cdb12e0bf8d22ba39
1 /*
2 * Copyright (c) 1989 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 */
7 #include <popper.h>
8 __RCSID("$Heimdal: pop_log.c 3609 1997-10-14 21:59:37Z joda $"
9 "$NetBSD$");
11 /*
12 * log: Make a log entry
15 int
16 pop_log(POP *p, int stat, char *format, ...)
18 char msgbuf[MAXLINELEN];
19 va_list ap;
21 va_start(ap, format);
22 vsnprintf(msgbuf, sizeof(msgbuf), format, ap);
24 if (p->debug && p->trace) {
25 fprintf(p->trace,"%s\n",msgbuf);
26 fflush(p->trace);
27 } else {
28 #ifdef KRB5
29 krb5_log(p->context, p->logf, stat, "%s", msgbuf);
30 #else
31 syslog (stat,"%s",msgbuf);
32 #endif
34 va_end(ap);
36 return(stat);