string.h is ANSI C include file
[unix-history] / usr / src / usr.bin / f77 / libI77 / wfi.c
CommitLineData
026791c2 1/*
161423a6
RE
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
026791c2 5 *
161423a6
RE
6 * @(#)wfi.c 5.1 %G%
7 */
8
9/*
026791c2
DL
10 * internal (character array) i/o: write formatted, sequential and direct
11 */
12
13#include "fio.h"
14
15extern int w_ed(),w_ned();
16extern int z_wnew(), z_putc(), z_tab();
17
18LOCAL
19c_wfi()
20{
21 reading = NO;
22 doed=w_ed;
23 doned=w_ned;
24 putn=z_putc;
25 doend = donewrec = z_wnew;
26 dorevert = z_wnew;
27 dotab = z_tab;
28}
29
30s_wsfi(a) icilist *a;
31{
32 int n;
33
34 c_wfi();
35 if( n = c_si(a) ) return (n);
36 if(pars_f()) err(errflag,F_ERFMT,"wsfio")
37 fmt_bg();
38 return( OK );
39}
40
41s_wdfi(a) icilist *a;
42{
43 int n;
44
45 c_wfi();
46 if( n = c_di(a) ) return (n) ;
47 if(pars_f()) err(errflag,F_ERFMT,"wdfio")
48 fmt_bg();
49 return( OK );
50}
51
52e_wsfi()
53{
54 int n;
55 n = en_fio();
56 fmtbuf = NULL;
57 return(n);
58}
59
60
61e_wdfi()
62{
63 return(e_wsfi());
64}