tcpd{chk,match}(8): Raise WARNS to 2 and fix warnings.
[dragonfly.git] / contrib / tcp_wrappers / fakelog.c
CommitLineData
984263bc
MD
1 /*
2 * This module intercepts syslog() library calls and redirects their output
3 * to the standard output stream. For interactive testing.
4 *
5 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
6 */
7
984263bc
MD
8#include <stdio.h>
9
10#include "mystdarg.h"
11
12/* openlog - dummy */
13
14/* ARGSUSED */
15
4badba38 16void
984263bc
MD
17openlog(name, logopt, facility)
18char *name;
19int logopt;
20int facility;
21{
22 /* void */
23}
24
25/* vsyslog - format one record */
26
4badba38 27void
984263bc
MD
28vsyslog(severity, fmt, ap)
29int severity;
30char *fmt;
31va_list ap;
32{
33 char buf[BUFSIZ];
34
35 vprintf(percent_m(buf, fmt), ap);
36 printf("\n");
37 fflush(stdout);
38}
39
40/* syslog - format one record */
41
42/* VARARGS */
43
4badba38 44void
984263bc
MD
45VARARGS(syslog, int, severity)
46{
47 va_list ap;
48 char *fmt;
49
50 VASTART(ap, int, severity);
51 fmt = va_arg(ap, char *);
52 vsyslog(severity, fmt, ap);
53 VAEND(ap);
54}
55
56/* closelog - dummy */
57
4badba38 58void
984263bc
MD
59closelog()
60{
61 /* void */
62}