003 File Manager
Current Path:
/usr/src/contrib/tcp_wrappers
usr
/
src
/
contrib
/
tcp_wrappers
/
📁
..
📄
BLURB
(1.7 KB)
📄
Banners.Makefile
(2.17 KB)
📄
CHANGES
(18.75 KB)
📄
DISCLAIMER
(1.21 KB)
📄
Makefile
(32.68 KB)
📄
README
(47.08 KB)
📄
README.IRIX
(2.57 KB)
📄
README.NIS
(6.52 KB)
📄
clean_exit.c
(1.07 KB)
📄
diag.c
(1.44 KB)
📄
environ.c
(4.75 KB)
📄
eval.c
(3.59 KB)
📄
fakelog.c
(1012 B)
📄
fix_options.c
(3.7 KB)
📄
fromhost.c
(1.37 KB)
📄
hosts_access.3
(3.52 KB)
📄
hosts_access.5
(15.97 KB)
📄
hosts_access.c
(14.13 KB)
📄
hosts_ctl.c
(1.08 KB)
📄
hosts_options.5
(6.5 KB)
📄
inetcf.c
(8.03 KB)
📄
inetcf.h
(516 B)
📄
misc.c
(1.9 KB)
📄
miscd.c
(3.07 KB)
📄
mystdarg.h
(571 B)
📄
myvsyslog.c
(766 B)
📄
ncr.c
(2.52 KB)
📄
options.c
(13.85 KB)
📄
patchlevel.h
(88 B)
📄
percent_m.c
(797 B)
📄
percent_x.c
(2.37 KB)
📄
printf.ck
(39 B)
📄
ptx.c
(2.65 KB)
📄
refuse.c
(911 B)
📄
rfc931.c
(5.95 KB)
📄
safe_finger.c
(4.98 KB)
📄
scaffold.c
(6.38 KB)
📄
scaffold.h
(370 B)
📄
setenv.c
(931 B)
📄
shell_cmd.c
(2.13 KB)
📄
socket.c
(12.06 KB)
📄
strcasecmp.c
(3.78 KB)
📄
tcpd.8
(6.86 KB)
📄
tcpd.c
(3.49 KB)
📄
tcpd.h
(8.18 KB)
📄
tcpdchk.8
(2.51 KB)
📄
tcpdchk.c
(12.84 KB)
📄
tcpdmatch.8
(3.18 KB)
📄
tcpdmatch.c
(10.69 KB)
📄
tli-sequent.c
(4.85 KB)
📄
tli-sequent.h
(411 B)
📄
tli.c
(10.34 KB)
📄
try-from.c
(2.01 KB)
📄
update.c
(3.05 KB)
📄
vfprintf.c
(3.12 KB)
📄
workarounds.c
(7.57 KB)
Editing: vfprintf.c
/* * vfprintf() and vprintf() clones. They will produce unexpected results * when excessive dynamic ("*") field widths are specified. To be used for * testing purposes only. * * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. */ #ifndef lint static char sccsid[] = "@(#) vfprintf.c 1.2 94/03/23 17:44:46"; #endif #include <stdio.h> #include <ctype.h> #ifdef __STDC__ #include <stdarg.h> #else #include <varargs.h> #endif /* vfprintf - print variable-length argument list to stream */ int vfprintf(fp, format, ap) FILE *fp; char *format; va_list ap; { char fmt[BUFSIZ]; /* format specifier */ register char *fmtp; register char *cp; int count = 0; /* * Iterate over characters in the format string, picking up arguments * when format specifiers are found. */ for (cp = format; *cp; cp++) { if (*cp != '%') { putc(*cp, fp); /* ordinary character */ count++; } else { /* * Format specifiers are handled one at a time, since we can only * deal with arguments one at a time. Try to determine the end of * the format specifier. We do not attempt to fully parse format * strings, since we are ging to let fprintf() do the hard work. * In regular expression notation, we recognize: * * %-?0?([0-9]+|\*)?\.?([0-9]+|\*)?l?[a-z] * * which includes some combinations that do not make sense. */ fmtp = fmt; *fmtp++ = *cp++; if (*cp == '-') /* left-adjusted field? */ *fmtp++ = *cp++; if (*cp == '0') /* zero-padded field? */ *fmtp++ = *cp++; if (*cp == '*') { /* dynamic field witdh */ sprintf(fmtp, "%d", va_arg(ap, int)); fmtp += strlen(fmtp); cp++; } else { while (isdigit(*cp)) /* hard-coded field width */ *fmtp++ = *cp++; } if (*cp == '.') /* width/precision separator */ *fmtp++ = *cp++; if (*cp == '*') { /* dynamic precision */ sprintf(fmtp, "%d", va_arg(ap, int)); fmtp += strlen(fmtp); cp++; } else { while (isdigit(*cp)) /* hard-coded precision */ *fmtp++ = *cp++; } if (*cp == 'l') /* long whatever */ *fmtp++ = *cp++; if (*cp == 0) /* premature end, punt */ break; *fmtp++ = *cp; /* type (checked below) */ *fmtp = 0; /* Execute the format string - let fprintf() do the hard work. */ switch (fmtp[-1]) { case 's': /* string-valued argument */ count += fprintf(fp, fmt, va_arg(ap, char *)); break; case 'c': /* integral-valued argument */ case 'd': case 'u': case 'o': case 'x': if (fmtp[-2] == 'l') count += fprintf(fp, fmt, va_arg(ap, long)); else count += fprintf(fp, fmt, va_arg(ap, int)); break; case 'e': /* float-valued argument */ case 'f': case 'g': count += fprintf(fp, fmt, va_arg(ap, double)); break; default: /* anything else */ putc(fmtp[-1], fp); count++; break; } } } return (count); } /* vprintf - print variable-length argument list to stdout */ vprintf(format, ap) char *format; va_list ap; { return (vfprintf(stdout, format, ap)); }
Upload File
Create Folder