Lines Matching defs:wanted
358 int _sfmode(reg Sfio_t* f, reg int wanted, reg int local)
360 int _sfmode(f, wanted, local)
362 reg int wanted; /* desired mode */
372 if(wanted&SF_SYNCED) /* for (SF_SYNCED|SF_READ) stream, just junk data */
373 { wanted &= ~SF_SYNCED;
420 if(f->disc == _Sfudisc && wanted == SF_WRITE &&
438 wanted &= SF_RDWR;
446 if(wanted == 0)
449 if(wanted != (int)(f->mode&SF_RDWR) && !(f->flags&wanted) )
470 if(wanted == (int)SFMODE(f,1))
476 if(wanted == 0 || wanted == SF_WRITE)
500 if(f->proc && _sfpmode(f,wanted) < 0)
506 if(wanted != SF_WRITE)
535 if(wanted != SF_WRITE)
546 if(f->proc && _sfpmode(f,wanted) < 0)
579 if((wanted &= SF_RDWR) == 0 && (wanted = f->flags&SF_RDWR) == SF_RDWR)
580 wanted = SF_READ;
583 if(wanted != (f->mode&SF_RDWR) && f->file >= 0)
587 (*_Sfnotify)(f, wanted, (void*)((long)f->file));