Lines Matching refs:fn

102 	char				*fn;
120 int (*)(const void *, const void *)), const char* fn);
144 item->fn = sort_strdup(tmp_file);
160 if ((item) && (item->fn))
161 unlink(item->fn);
170 file_is_tmp(const char* fn)
175 if (fn) {
178 if ((item) && (item->fn))
179 if (strcmp(item->fn, fn) == 0) {
197 static const char *fn = ".bsdsort.";
201 sz = strlen(tmpdir) + 1 + strlen(fn) + 32 + 1;
204 sprintf(ret, "%s/%s%d.%lu", tmpdir, fn, (int) getpid(), (unsigned long)(tfcounter++));
228 file_list_add(struct file_list *fl, char *fn, bool allocate)
231 if (fl && fn) {
237 fl->fns[fl->count] = allocate ? sort_strdup(fn) : fn;
362 sort_list_dump(struct sort_list *l, const char *fn)
365 if (l && fn) {
368 f = openfile(fn, "w");
392 closefile(f, fn);
401 check(const char *fn)
412 fr = file_reader_init(fn);
502 if ((fn == NULL) || (*fn == 0) || (strcmp(fn, "-") == 0)) {
514 bws_disorder_warnx(s2disorder, fn, posdisorder);
516 bws_disorder_warnx(s1disorder, fn, posdisorder);
536 openfile(const char *fn, const char *mode)
540 if (strcmp(fn, "-") == 0) {
544 int is_tmp = file_is_tmp(fn);
554 cmdsz = strlen(fn) + 128;
561 fn, compress_program);
564 compress_program, fn);
574 if ((file = fopen(fn, mode)) == NULL)
588 closefile(FILE *f, const char *fn)
597 if (file_is_tmp(fn) && compress_program != NULL) {
853 char *fn;
855 fn = new_tmp_file_name();
856 sort_list_to_file(list, fn);
857 file_list_add(fl, fn, false);
896 file_header_init(struct file_header **fh, const char *fn, size_t file_pos)
899 if (fh && fn) {
904 (*fh)->fr = file_reader_init(fn);
906 perror(fn);
1489 merge_list_parts(struct sort_list **parts, size_t n, const char *fn)
1493 f_out = openfile(fn,"w");
1497 closefile(f_out, fn);
1507 const char* fn)
1518 sort_list_dump(list, fn);
1588 merge_list_parts(parts, nthreads, fn);