Lines Matching defs:wanted
362 int _sfmode(reg Sfio_t* f, reg int wanted, reg int local)
364 int _sfmode(f, wanted, local)
366 reg int wanted; /* desired mode */
376 if(wanted&SF_SYNCED) /* for (SF_SYNCED|SF_READ) stream, just junk data */
377 { wanted &= ~SF_SYNCED;
424 if(f->disc == _Sfudisc && wanted == SF_WRITE &&
442 wanted &= SF_RDWR;
450 if(wanted == 0)
453 if(wanted != (int)(f->mode&SF_RDWR) && !(f->flags&wanted) )
474 if(wanted == (int)SFMODE(f,1))
480 if(wanted == 0 || wanted == SF_WRITE)
504 if(f->proc && _sfpmode(f,wanted) < 0)
510 if(wanted != SF_WRITE)
539 if(wanted != SF_WRITE)
550 if(f->proc && _sfpmode(f,wanted) < 0)
583 if((wanted &= SF_RDWR) == 0 && (wanted = f->flags&SF_RDWR) == SF_RDWR)
584 wanted = SF_READ;
587 if(wanted != (f->mode&SF_RDWR) && f->file >= 0)
591 (*_Sfnotify)(f, wanted, (void*)((long)f->file));