Searched defs:sf (Results 1 - 14 of 14) sorted by relevance

/ast/src/cmd/tests/sfio/
H A Dtopen.c25 Sfio_t sf; local
39 if(sfnew(&sf,NIL(char*),(size_t)SF_UNBOUND,0,SF_EOF|SF_READ) != &sf)
40 terror("Did not open sf");
41 sfset(&sf,SF_STATIC,1);
42 if(!sfclose(&sf) || errno != EBADF)
43 terror("sfclose(sf) should fail with EBADF");
44 if(!(sfset(&sf,0,0)&SF_STATIC))
45 terror("Did not close sf");
48 unlink(tstfile("sf",
[all...]
H A Dtpoll.c27 Sfio_t *f, *g, *str, *fr, *fw, *sf[2]; local
53 sf[0] = fr;
54 sf[1] = str;
55 if((c = sfpoll(sf,2,0)) != 1 || sf[0] != str)
58 sf[0] = fr;
59 if(sfpoll(sf,1,0) != 0 )
63 sf[0] = fr;
64 if(sfpoll(sf,1,0) != 1 )
69 sf[
[all...]
H A Dtseek.c42 Sfio_t *f, *sf; local
51 if(!(f = sfopen((Sfio_t*)0, tstfile("sf", 0),"w")))
57 if(!(f = sfopen(f, tstfile("sf", 0),"r")))
77 if(!(f = sfopen(f,tstfile("sf", 0),"w")) )
90 if(!(f = sfopen(f,tstfile("sf", 0),"w")))
97 if(!(f = sfopen(f,tstfile("sf", 0),"r")))
108 if(!(f = sfopen(f,tstfile("sf", 0),"r")))
119 if(!(sf = sfnew((Sfio_t*)0, little, sizeof(little), sffileno(f), SF_READ)) )
126 if(sfseek(sf, (Sfoff_t)4000, SEEK_SET) != (Sfoff_t)4000)
127 terror("sfseek failed on sf");
[all...]
H A Dtmprocess.c45 Sfio_t* sf; local
50 sf = sfnew(NIL(Sfio_t*),(Void_t*)buf,n,-1,SF_STRING|SF_READ);
51 while((s = sfgetr(sf,'\n',0)) )
52 { w = sfvalue(sf)-1;
59 sfclose(sf);
94 file = tstfile("sf", 0);
H A Dtscanf.c77 Sfio_t* sf; local
185 if(!(sf = sftmp(8*1024)) )
189 { sfseek(sf,(Sfoff_t)0,0);
191 sfprintf(sf,"%#..*d\n",k,i);
192 sfseek(sf,(Sfoff_t)0,0);
194 { if(sfscanf(sf,"%i",&j) != 1)
202 s = sfprints("%p", sf);
204 if(vp != (Void_t*)sf)
/ast/src/lib/libvcodex/Vcwindow/
H A Dvcwdecode.c38 Sfio_t *sf; local
44 sf = vcw->disc->srcf;
46 sf = vcw->disc->tarf;
47 else sf = NIL(Sfio_t*);
49 if(!sf)
52 if(sfseek(sf, here, SEEK_SET) != here)
55 if(!(vcw->match.wdata = sfreserve(sf, size, 0)) || sfvalue(sf) < size )
H A Dvcwvote.c205 Sfio_t *sf; local
272 sf = wm->type == VCD_SOURCEFILE ? vcw->disc->srcf : vcw->disc->tarf;
273 if(!sf || sfseek(sf, wm->wpos, 0) != wm->wpos ||
274 !(wm->wdata = sfreserve(sf, wm->wsize, 0)) ||
275 sfvalue(sf) < wm->wsize )
H A Dvcwprefix.c68 Sfio_t* sf; /* stream matching against */ member in struct:_pffile_s
125 /* create the structure to search file sf */
127 static Pffile_t* pfopen(Sfio_t* sf, ssize_t sz, int srcfile) argument
129 static Pffile_t* pfopen(sf, sz, srcfile)
130 Sfio_t* sf;
139 if((sfsz = sfsize(sf)) < 0 )
161 pf->sf = sf;
186 if(sfseek(pf->sf, (Sfoff_t)0, 0) != 0)
189 { if(!(dt = sfreserve(pf->sf, blks
[all...]
/ast/src/lib/libast/disc/
H A Dsfdcseekable.c64 Sfio_t* sf; local
69 sf = sk->shadow;
71 return sfread(sf,buf,n);
73 addr = sfseek(sf,(Sfoff_t)0,SEEK_CUR);
76 return sfread(sf,buf,n);
79 { if((w = sfread(sf,buf,r)) != r)
92 if((p = sfwrite(sf,buf,w)) != w)
112 Sfio_t* sf; local
117 sf = sk->shadow;
125 addr += sftell(sf);
[all...]
/ast/src/lib/libast/sfio/
H A Dsftmp.c210 if(!(file = pathtemp(NiL,PATH_MAX,NiL,"sf",&fd)))
253 file = sfprints("%s/sf%3.3.32lu.%3.3.32lu",
295 reg Sfio_t* sf; local
317 sf = sfnew(&newf,NIL(Void_t*),(size_t)SF_UNBOUND,fd,SF_READ|SF_WRITE);
319 if(!sf)
330 sfset(sf, ((~m)&(SF_READ|SF_WRITE)), 0);
331 sfset(sf, (f->mode&(SF_READ|SF_WRITE)), 1);
335 memcpy((Void_t*)f, (Void_t*)sf, sizeof(Sfio_t));
H A Dsfhdr.h682 Sfio_t** sf; /* array of streams */ member in struct:_sfpool_s
800 /* local variables used across sf-functions */
/ast/src/lib/libvcodex/
H A Dvcalias.c149 Sfio_t *sf; local
155 if(pathpath(ALIASES, "", PATH_REGULAR, file, sizeof(file)) && (sf = sfopen(0, file, "")) )
156 { while((sp = sfgetr(sf, '\n', 1)) )
158 sfclose(sf);
168 if((sf = sfopen(0, file, "")) )
169 { while((sp = sfgetr(sf, '\n', 1)) )
171 sfclose(sf);
H A Dvcsfio.c41 Sfio_t* sf; /* stream to do IO with */ member in struct:_sfdc_s
967 Vcsfio_t* vcsfio(Sfio_t* sf, Vcsfdata_t* sfdt, int type) argument
969 Vcsfio_t* vcsfio(sf, data, type)
970 Sfio_t* sf; /* stream to be conditioned */
986 if(!sf || !sfdt )
1013 sfdc->sf = sf; /* stream to do IO on */
1072 if(getheader(sfdc, sf, 1, !type) < 0 )
1084 return (Vcsfio_t*)sf;
1097 if(sfdisc(sf,
1322 Sfio_t *sf = ((Sfdc_t*)vcf)->sf; local
[all...]
/ast/src/lib/libast/vmalloc/
H A Dvmprofile.c321 Vmulong_t nf, Vmulong_t sf, Vmulong_t max, Vmulong_t size)
323 static char* pfsummary(buf, na, sa, nf, sf, max, size)
328 Vmulong_t sf;
340 buf = (*_Vmstrcpy)(buf, (*_Vmitoa)(sf,-1), ':');
320 pfsummary(char* buf, Vmulong_t na, Vmulong_t sa, Vmulong_t nf, Vmulong_t sf, Vmulong_t max, Vmulong_t size) argument

Completed in 39 milliseconds