MCPcopy Create free account
hub / github.com/coreutils/coreutils / mergefiles

Function mergefiles

src/sort.c:3379–3389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3377 case it is never less than 2. */
3378
3379static size_t
3380mergefiles (struct sortfile *files, size_t ntemps, size_t nfiles,
3381 FILE *ofp, char const *output_file)
3382{
3383 FILE **fps;
3384 size_t nopened = open_input_files (files, nfiles, &fps);
3385 if (nopened < nfiles && nopened < 2)
3386 sort_die (_("open failed"), files[nopened].name);
3387 mergefps (files, ntemps, nopened, ofp, output_file, fps);
3388 return nopened;
3389}
3390
3391/* Merge into T (of size NLINES) the two sorted arrays of lines
3392 LO (with NLINES / 2 members), and

Callers 2

avoid_trashing_inputFunction · 0.85
mergeFunction · 0.85

Calls 3

open_input_filesFunction · 0.85
sort_dieFunction · 0.85
mergefpsFunction · 0.85

Tested by

no test coverage detected