1 /* Copyright (c) 1989 Regents of the University of California */ 2 3 static char sccsid[] = "@(#)VWRITEF.c 1.1 01/09/89"; 4 5 #include "h00vars.h" 6 7 #ifdef notdef 8 #include <stdarg.h> 9 #else 10 typedef char *va_list; 11 #endif 12 13 VWRITEF(curfile, file, format, args) 14 15 register struct iorec *curfile; 16 FILE *file; 17 char *format; 18 va_list args; 19 { 20 21 if (curfile->funit & FREAD) { 22 ERROR("%s: Attempt to write, but open for reading\n", 23 curfile->pfname); 24 return; 25 } 26 vfprintf(file, format, args); 27 if (ferror(curfile->fbuf)) { 28 PERROR("Could not write to ", curfile->pfname); 29 return; 30 } 31 } 32