|
|
1.1 root 1: /*
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.
5: *
6: * @(#)rfi.c 5.1 6/7/85
7: */
8:
9: /*
10: * internal (character array) i/o: read formatted, sequential and direct
11: */
12:
13: #include "fio.h"
14:
15: extern int rd_ed(),rd_ned();
16: extern int z_getc(),z_rnew(),z_tab();
17:
18: LOCAL
19: c_rfi()
20: {
21: reading = YES;
22: doed=rd_ed;
23: doned=rd_ned;
24: getn=z_getc;
25: doend = donewrec = z_rnew;
26: dorevert = z_rnew;
27: dotab = z_tab;
28: }
29:
30: s_rsfi(a) icilist *a;
31: {
32: int n;
33:
34: c_rfi();
35: if( n = c_si(a) ) return (n);
36: if(pars_f()) err(errflag,F_ERFMT,"rsfio")
37: fmt_bg();
38: return( OK );
39: }
40:
41: s_rdfi(a) icilist *a;
42: {
43: int n;
44:
45: c_rfi();
46: if( n = c_di(a) ) return (n);
47: if(pars_f()) err(errflag,F_ERFMT,"rdfio")
48: fmt_bg();
49: return( OK );
50: }
51:
52: e_rsfi()
53: { int n;
54: n = en_fio();
55: fmtbuf = NULL;
56: return(n);
57: }
58:
59: e_rdfi()
60: {
61: return(e_rsfi());
62: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.