Lines Matching refs:ord
3027 size_t *ord = xnmalloc (nfiles, sizeof *ord); in mergefps() local
3072 ord[i] = i; in mergefps()
3074 if (0 < compare (cur[ord[i - 1]], cur[ord[i]])) in mergefps()
3075 t = ord[i - 1], ord[i - 1] = ord[i], ord[i] = t, i = 0; in mergefps()
3080 struct line const *smallest = cur[ord[0]]; in mergefps()
3122 if (base[ord[0]] < smallest) in mergefps()
3123 cur[ord[0]] = smallest - 1; in mergefps()
3126 if (fillbuf (&buffer[ord[0]], fps[ord[0]], files[ord[0]].name)) in mergefps()
3128 struct line const *linelim = buffer_linelim (&buffer[ord[0]]); in mergefps()
3129 cur[ord[0]] = linelim - 1; in mergefps()
3130 base[ord[0]] = linelim - buffer[ord[0]].nlines; in mergefps()
3136 if (ord[i] > ord[0]) in mergefps()
3137 --ord[i]; in mergefps()
3139 xfclose (fps[ord[0]], files[ord[0]].name); in mergefps()
3140 if (ord[0] < ntemps) in mergefps()
3143 zaptemp (files[ord[0]].name); in mergefps()
3145 free (buffer[ord[0]].buf); in mergefps()
3146 for (i = ord[0]; i < nfiles; ++i) in mergefps()
3155 ord[i] = ord[i + 1]; in mergefps()
3168 size_t ord0 = ord[0]; in mergefps()
3173 int cmp = compare (cur[ord0], cur[ord[probe]]); in mergefps()
3174 if (cmp < 0 || (cmp == 0 && ord0 < ord[probe])) in mergefps()
3183 ord[j] = ord[j + 1]; in mergefps()
3184 ord[count_of_smaller_lines] = ord0; in mergefps()
3197 free (ord); in mergefps()