Lines Matching refs:size
30 Void_t* sfreserve(Sfio_t* f, ssize_t size, int type)
32 Void_t* sfreserve(f,size,type)
34 ssize_t size; /* size of peek */
46 sz = size < 0 ? -size : size;
80 if(size == 0 && (type < 0 || type == SF_LOCKR) )
110 if(size == 0 || (f->mode&SF_WRITE))
112 else if(size < 0 && n == 0 && f->push) /* maybe stack-pop */
114 iosz = f->push->size;
120 if(size < 0 && iosz < (f->size - n) )
121 iosz = f->size - n; /* get as much as possible */
145 if(size == 0 && type == 0)
161 if(type == SF_LOCKR && size > 0 && n > 0 )
167 if(size == 0 || n == 0)
170 else if(type == SF_LOCKR && size == 0 && (rsrv = _sfrsrv(f,0)) )
186 else if(type != SF_LOCKR && sz > f->size && (rsrv = _sfrsrv(f,sz)) )
197 if((f->mode & SF_READ) && size == 0 && data != f->next)
203 f->next += (size >= 0 ? size : n);
207 _Sfi = f->val = n; /* return true buffer size */