1 /*- 2 * Copyright (c) 1980 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.proprietary.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)wfi.c 5.2 (Berkeley) 04/12/91"; 10 #endif /* not lint */ 11 12 /* 13 * internal (character array) i/o: write formatted, sequential and direct 14 */ 15 16 #include "fio.h" 17 18 extern int w_ed(),w_ned(); 19 extern int z_wnew(), z_putc(), z_tab(); 20 21 LOCAL 22 c_wfi() 23 { 24 reading = NO; 25 doed=w_ed; 26 doned=w_ned; 27 putn=z_putc; 28 doend = donewrec = z_wnew; 29 dorevert = z_wnew; 30 dotab = z_tab; 31 } 32 33 s_wsfi(a) icilist *a; 34 { 35 int n; 36 37 c_wfi(); 38 if( n = c_si(a) ) return (n); 39 if(pars_f()) err(errflag,F_ERFMT,"wsfio") 40 fmt_bg(); 41 return( OK ); 42 } 43 44 s_wdfi(a) icilist *a; 45 { 46 int n; 47 48 c_wfi(); 49 if( n = c_di(a) ) return (n) ; 50 if(pars_f()) err(errflag,F_ERFMT,"wdfio") 51 fmt_bg(); 52 return( OK ); 53 } 54 55 e_wsfi() 56 { 57 int n; 58 n = en_fio(); 59 fmtbuf = NULL; 60 return(n); 61 } 62 63 64 e_wdfi() 65 { 66 return(e_wsfi()); 67 } 68