Lines Matching defs:want
124 static int fill_buffer(URL_FILE *file, size_t want)
135 if((!file->still_running) || (file->buffer_pos > want))
182 } while(file->still_running && (file->buffer_pos < want));
186 /* use to remove want bytes from the front of a files buffer */
187 static int use_buffer(URL_FILE *file,int want)
190 if((file->buffer_pos - want) <=0) {
202 &file->buffer[want],
203 (file->buffer_pos - want));
205 file->buffer_pos -= want;
316 size_t want;
320 want=fread(ptr,size,nmemb,file->handle.file);
324 want = nmemb * size;
326 fill_buffer(file,want);
334 if(file->buffer_pos < want)
335 want = file->buffer_pos;
338 memcpy(ptr, file->buffer, want);
340 use_buffer(file,want);
342 want = want / size; /* number of items */
346 want=0;
351 return want;
356 size_t want = size - 1;/* always need to leave room for zero termination */
365 fill_buffer(file,want);
373 if(file->buffer_pos < want)
374 want = file->buffer_pos;
378 for(loop=0;loop < want;loop++) {
380 want=loop+1;/* include newline */
386 memcpy(ptr, file->buffer, want);
387 ptr[want]=0;/* allways null terminate */
389 use_buffer(file,want);