Lines Matching +defs:buffer +defs:list

12  *    notice, this list of conditions and the following disclaimer.
14 * notice, this list of conditions and the following disclaimer in the
70 unsigned char *buffer;
90 * List elements of "cleanable" files list.
98 * List header of "cleanable" files list.
103 * Init tmp files list
177 * Initialize file list
189 * Add a file name to the list
204 * Populate file list from array of file names
216 * Clean file list data and delete the files,
217 * if this is a list of temporary files
242 * Init sort list
250 l->list = NULL;
254 * Add string to sort list
261 if ((l->list == NULL) || (indx >= l->size)) {
264 l->list = sort_reallocarray(l->list, newsize,
270 l->list[indx] = sort_list_item_alloc();
271 sort_list_item_set(l->list[indx], str);
272 l->memsize += sort_list_item_size(l->list[indx]);
277 * Clean sort list data
282 if (l->list) {
288 item = l->list[i];
293 l->list[i] = NULL;
296 sort_free(l->list);
297 l->list = NULL;
305 * Write sort list to file
316 if (l->list) {
321 bwsfwrite(l->list[i]->str, f,
327 item = l->list[i];
516 * Reads a file into the internal buffer.
565 ret->buffer = sort_malloc(ret->cbsz);
569 ret->bsz = fread(ret->buffer, 1, ret->cbsz, ret->file);
622 strend = memchr(fr->buffer + fr->strbeg +
640 fr->buffer = sort_reallocarray(fr->buffer,
642 bsz1 = fread(fr->buffer + fr->bsz, 1,
653 memmove(fr->buffer,
654 fr->buffer + fr->strbeg, remsz);
658 bsz1 = fread(fr->buffer + remsz, 1,
671 strend = fr->buffer + fr->bsz;
673 if ((fr->buffer + fr->strbeg <= strend) &&
675 ret = bwscsbdup(fr->buffer + fr->strbeg, strend -
676 fr->buffer - fr->strbeg);
678 fr->strbeg = (strend - fr->buffer) + 1;
695 sort_free(fr->buffer);
713 procfile(const char *fsrc, struct sort_list *list, struct file_list *fl)
730 sort_list_add(list, bws);
732 if (list->memsize >= available_free_memory) {
736 sort_list_to_file(list, fn);
738 sort_list_clean(list);
748 * Compare file headers. Files with EOF always go to the end of the list.
965 /* re-arrange the list: */
1005 * Shrinks the file list until its size smaller than max number of opened files
1048 * Merge list of files
1073 * Sort list of lines and writes it to the file
1076 sort_list_to_file(struct sort_list *list, const char *outfile)
1117 rxsort(list->list, list->count);
1120 mergesort(list->list, list->count,
1124 heapsort(list->list, list->count,
1128 qsort(list->list, list->count,
1132 DEFAULT_SORT_FUNC(list->list, list->count,
1136 sort_list_dump(list, outfile);