Lines Matching defs:f1
44 Sfio_t *f, *f1, *f2, *f3, *f4;
46 if(!(f1 = sfopen((Sfio_t*)0,tstfile("sf", 0),"w+")) ||
53 sfungetc(f1,'a');
55 sfpool(f1,f4,0);
56 sfungetc(f1,'a');
57 sfpool(f1,NIL(Sfio_t*),0);
67 if(sfputr(f1,os,-1) < 0)
69 sfseek(f1,(Sfoff_t)0,0);
71 { if(!(s = sfgetr(f1,'\n',0)) || (n = sfvalue(f1)) != on)
80 if(!(f1 = sfopen(f1, tstfile("sf", 0), "r")) ||
85 if(sfsize(f1) != sfsize(f2) || sfsize(f2) != sfsize(f3))
88 n = (int)sfsize(f1);
89 if(!(s1 = sfreserve(f1,n,0)) ||
96 sfclose(f1);
100 f1 = sfstdout; f2 = sfstderr;
118 if(!(f1 = sfopen((Sfio_t*)0,tstfile("sf", 0),"r")))
120 if(!sfpool(f1,sfstderr,0) )
123 if(!(f1 = sfopen(NIL(Sfio_t*), tstfile("sf", 0), "w+")) ||
127 if(sfpool(f1,f2,SF_SHARE) != f2)
128 terror("sfpool3 f1");
135 if(sfputc(f1,'z') < 0)
136 terror("sfputc to f1");
137 if(sfseek(f1,(Sfoff_t)0,0) != 0)
138 terror("sfseek failed on f1");
139 if(!(s = sfreserve(f1,3,SF_LOCKR)) || sfvalue(f1) != 3)
140 terror("sfreserve failed on f1");
147 if(sfpool(NIL(Sfio_t*),f2,0) != f1)
150 if(sfread(f1,s,3) != 3)
151 terror("Wrong read on f1");
155 if(f != f1 && f != f2)
158 if(sfpool(f1,NIL(Sfio_t*),0) != f2 )
161 if(sfpool(f1,NIL(Sfio_t*),0) != f1 )
164 if(!(f1 = sfopen(NIL(Sfio_t*), tstfile("sf", 0), "w+")) ||
167 sfputc(f1,'a');
168 sfputc(f1,'b');
169 sfputc(f1,'c');
170 sfset(f1,SF_WRITE,0); /* off write mode */
171 if(sfpool(f1,f2,SF_SHARE) )
173 if(sfseek(f1,(Sfoff_t)0,0) != (Sfoff_t)0)
175 if(!(s = sfreserve(f1,3,SF_LOCKR)) || memcmp(s,"abc",3) != 0)
176 terror("Can't get data from f1");