Lines Matching defs:fw
34 Sfoff_t sfmove(Sfio_t* fr, Sfio_t* fw, Sfoff_t n, reg int rc)
36 Sfoff_t sfmove(fr,fw,n,rc)
38 Sfio_t* fw; /* moving data to this stream */
51 SFMTXDECL2(fw); /* declare a shadow stream variable for to stream */
54 if(fw)
55 SFMTXBEGIN2(fw, (Sfoff_t)0);
64 if(fw && (w = SFWRITE(fw, cp, r)) != r)
67 if(fw->extent >= 0 && w > 0)
68 (void)SFSEEK(fw,(Sfoff_t)(-w),SEEK_CUR);
87 if(fw)
88 { if(fw->mode != SF_WRITE && _sfmode(fw,SF_WRITE,0) < 0 )
90 SFLOCK(fw,0);
91 if(fw->next >= fw->endb ||
92 (fw->next > fw->data && fr->extent < 0 &&
93 (fw->extent < 0 || (fw->flags&SF_SHARE)) ) )
94 if(SFFLSBUF(fw,-1) < 0 )
134 if(fw && fw->extent >= 0 && w <= (fw->endb-fw->next) )
135 { w = fw->endb - (next = fw->next);
199 if(fw)
201 fw->next += r;
202 else if(r <= (fw->endb-fw->next) )
203 { memcpy((Void_t*)fw->next,(Void_t*)next,r);
204 fw->next += r;
206 else if((w = SFWRITE(fw,(Void_t*)next,r)) != r)
220 if(fw)
221 SFOPEN(fw,0);
235 if(fw)
236 { SFOPEN(fw,0);
237 SFMTXEND2(fw);