diff options
Diffstat (limited to 'contrib/bc/lib/vfprintf.c')
-rw-r--r-- | contrib/bc/lib/vfprintf.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/bc/lib/vfprintf.c b/contrib/bc/lib/vfprintf.c new file mode 100644 index 0000000..78edd35 --- /dev/null +++ b/contrib/bc/lib/vfprintf.c @@ -0,0 +1,31 @@ +/* vfprintf.c -- this was provided for minix. It may not + work on any other system. */ + +#include "config.h" +#ifndef HAVE_VPRINTF +#ifndef HAVE_DOPRINT +# error need vfprintf() or doprint() +#else + +#ifdef HAVE_LIB_H +#include <lib.h> +#endif +#ifdef HAVE_STDARG_H +#include <stdarg.h> +#endif +#ifdef HAVE_STDIO_H +#include <stdio.h> +#endif + +int vfprintf(file, format, argp) +FILE *file; +_CONST char *format; +va_list argp; +{ + _doprintf(file, format, argp); + if (testflag(file, PERPRINTF)) fflush(file); + return 0; +} + +#endif /* HAVE_DOPRINT */ +#endif /* !HAVE_VFPRINTF */ |