1: /*
2: char id_wdfe[] = "@(#)wdfe.c 1.1";
3: *
4: * write direct formatted external i/o
5: */
6:
7: #include "fio.h"
8:
9: int y_putc(), y_wnew();
10: extern int w_ed(), w_ned(), y_tab();
11:
12: char wdfe[] = "write dfe";
13:
14: s_wdfe(a) cilist *a;
15: {
16: int n;
17: reading = NO;
18: if(n=c_dfe(a,WRITE)) return(n);
19: curunit->uend = NO;
20: if(!curunit->uwrt && ! nowwriting(curunit)) err(errflag, errno, wdfe)
21: putn = y_putc;
22: doed = w_ed;
23: doned = w_ned;
24: dotab = y_tab;
25: dorevert = doend = donewrec = y_wnew;
26: if(pars_f(fmtbuf)) err(errflag,F_ERFMT,wdfe)
27: fmt_bg();
28: return(OK);
29: }
30:
31: y_putc(c)
32: {
33: if(curunit->url!=1 && recpos++ >= curunit->url) err(errflag,F_EREREC,wdfe)
34: putc(c,cf);
35: return(OK);
36: }
37:
38: y_wnew()
39: { if(curunit->url != 1)
40: { if(reclen > recpos)
41: { fseek(cf,(long)(reclen-recpos),1);
42: recpos = reclen;
43: }
44: while(recpos < curunit->url) (*putn)(' ');
45: recnum++;
46: recpos = reclen = cursor = 0;
47: }
48: return(OK);
49: }
50:
51: y_wend()
52: {
53: return(y_wnew());
54: }
Defined functions
Defined variables
wdfe
defined in line
12; used 3 times