File: myvsyslog.c

package info (click to toggle)
tcp-wrappers 7.6.q-31
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,828 kB
  • sloc: ansic: 17,852; makefile: 2,308; sh: 39
file content (33 lines) | stat: -rw-r--r-- 766 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 /*
  * vsyslog() for sites without. In order to enable this code, build with
  * -Dvsyslog=myvsyslog. We use a different name so that no accidents will
  * happen when vsyslog() exists. On systems with vsyslog(), syslog() is
  * typically implemented in terms of vsyslog().
  * 
  * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
  */

#ifndef lint
static char sccsid[] = "@(#) myvsyslog.c 1.1 94/12/28 17:42:33";
#endif

#ifdef vsyslog

#include <stdio.h>

#include "tcpd.h"
#include "mystdarg.h"

myvsyslog(severity, format, ap)
int     severity;
char   *format;
va_list ap;
{
    char    fbuf[BUFSIZ];
    char    obuf[3 * STRING_LENGTH];

    vsprintf(obuf, percent_m(fbuf, format), ap);
    syslog(severity, "%s", obuf);
}

#endif