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: */
6:
7: #ifndef lint
8: static char copyright[] = "Copyright (c) 1990 Regents of the University of California.\nAll rights reserved.\n";
9: static char SccsId[] = "@(#)@(#)pop_log.c 2.1 2.1 3/18/91";
10: #endif not lint
11:
12: #include <stdio.h>
13: #include <sys/types.h>
14: #include <varargs.h>
15: #include "popper.h"
16:
17: /*
18: * log: Make a log entry
19: */
20:
21: static char msgbuf[MAXLINELEN];
22:
23: pop_log(va_alist)
24: va_dcl
25: {
26: va_list ap;
27: POP * p;
28: int stat;
29: char * format;
30:
31: va_start(ap);
32: p = va_arg(ap,POP *);
33: stat = va_arg(ap,int);
34: format = va_arg(ap,char *);
35: va_end(ap);
36:
37: #ifdef HAVE_VSPRINTF
38: vsprintf(msgbuf,format,ap);
39: #else
40: (void)sprintf (msgbuf,format,((int *)ap)[0],((int *)ap)[1],((int *)ap)[2],
41: ((int *)ap)[3],((int *)ap)[4],((int *)ap)[5]);
42: #endif HAVE_VSPRINTF
43:
44: if (p->debug && p->trace) {
45: (void)fprintf(p->trace,"%s\n",msgbuf);
46: (void)fflush(p->trace);
47: }
48: else {
49: syslog (stat,"%s",msgbuf);
50: }
51:
52: return(stat);
53: }
Defined functions
pop_log
defined in line
23; used 35 times
- in /usr/src/libexec/popper/pop_dele.c line
46
- in /usr/src/libexec/popper/pop_dropcopy.c line
46,
59,
84-89(2)
- in /usr/src/libexec/popper/pop_dropinfo.c line
78,
91,
104
- in /usr/src/libexec/popper/pop_get_command.c line
62-66(2)
- in /usr/src/libexec/popper/pop_init.c line
73,
95,
110,
135,
151,
162,
169-174(2),
180-184(2)
- in /usr/src/libexec/popper/pop_msg.c line
62-67(2)
- in /usr/src/libexec/popper/pop_send.c line
108
- in /usr/src/libexec/popper/pop_stat.c line
24
- in /usr/src/libexec/popper/pop_updt.c line
48-49(2),
63,
107,
121,
131
- in /usr/src/libexec/popper/pop_xmit.c line
38,
52-57(2),
68
- in /usr/src/libexec/popper/popper.c line
69
Defined variables
SccsId
defined in line
9;
never used