Changeset View
Changeset View
Standalone View
Standalone View
contrib/tcp_wrappers/vfprintf.c
Show All 14 Lines | |||||
#ifdef __STDC__ | #ifdef __STDC__ | ||||
#include <stdarg.h> | #include <stdarg.h> | ||||
#else | #else | ||||
#include <varargs.h> | #include <varargs.h> | ||||
#endif | #endif | ||||
/* vfprintf - print variable-length argument list to stream */ | /* vfprintf - print variable-length argument list to stream */ | ||||
int vfprintf(fp, format, ap) | int vfprintf(FILE *fp, char *format, va_list ap) | ||||
FILE *fp; | |||||
char *format; | |||||
va_list ap; | |||||
{ | { | ||||
char fmt[BUFSIZ]; /* format specifier */ | char fmt[BUFSIZ]; /* format specifier */ | ||||
register char *fmtp; | register char *fmtp; | ||||
register char *cp; | register char *cp; | ||||
int count = 0; | int count = 0; | ||||
/* | /* | ||||
* Iterate over characters in the format string, picking up arguments | * Iterate over characters in the format string, picking up arguments | ||||
▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | break; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
return (count); | return (count); | ||||
} | } | ||||
/* vprintf - print variable-length argument list to stdout */ | /* vprintf - print variable-length argument list to stdout */ | ||||
vprintf(format, ap) | vprintf(char *format, va_list ap) | ||||
char *format; | |||||
va_list ap; | |||||
{ | { | ||||
return (vfprintf(stdout, format, ap)); | return (vfprintf(stdout, format, ap)); | ||||
} | } |