1 /*write sequential formatted external*/
13 /* this uses \n as an indicator of record-end */
14 if(c == '\n' && f__recpos < f__hiwater) { /* fseek calls fflush, a loss */
15 #if ! defined (NON_UNIX_STDIO) && ! defined (MISSING_FILE_ELEMS)
16 if(f__cf->_ptr + f__hiwater - f__recpos < buf_end(f__cf))
17 f__cf->_ptr += f__hiwater - f__recpos;
20 (void) fseek(f__cf, (long)(f__hiwater - f__recpos), SEEK_CUR);
23 if (!f__recpos++ && c == ' ')
42 f__hiwater = f__recpos = f__cursor = 0;
47 if(f__workdone) (*f__putn)('\n');
48 f__hiwater = f__recpos = f__cursor = 0;
49 return(f__workdone=0);
53 integer s_wsfe(a) cilist *a; /*start*/
55 integer s_wsfe(cilist *a) /*start*/
58 if(f__init != 1) f_init();
60 if(n=c_sfe(a)) return(n);
66 f__hiwater = f__cursor=f__recpos=0;
70 f__curunit = &f__units[a->ciunit];
71 f__cf=f__curunit->ufd;
72 if(pars_f(f__fmtbuf)<0) err(a->cierr,100,"startio");
81 f__cblank=f__curunit->ublnk;
82 if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
83 err(a->cierr,errno,"write start");