vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

printf.c (538B)


      1 
      2 #include <stdio.h>
      3 #include <stdarg.h>
      4 #include <errno.h>
      5 
      6 #include "ioprivate.h"
      7 
      8 
      9 int vfprintf(FILE *f, const char *fmt, va_list ap)
     10 {
     11 	return vprintfmt((void*)fputc, f, fmt, ap);
     12 }
     13 
     14 int fprintf(FILE *f, const char *fmt, ...)
     15 {
     16 	va_list ap;
     17 	va_start(ap, fmt);
     18 	int rc = vfprintf(f, fmt, ap);
     19 	va_end(ap);
     20 	return rc;
     21 }
     22 
     23 int vprintf(const char *fmt, va_list ap)
     24 {
     25 	return vfprintf(stdout, fmt, ap);
     26 }
     27 
     28 int printf(const char *fmt, ...)
     29 {
     30 	va_list ap;
     31 	va_start(ap, fmt);
     32 	int rc = vfprintf(stdout, fmt, ap);
     33 	va_end(ap);
     34 	return rc;
     35 }
     36