mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
86c5a50e8664a0fb69f63620964c7d1a2a166ef5
(xfopen): Use stdout if *how != 'r'. (mergefps): Remove FPS arg. Open all input files, and close all files when done. If OFP is null, open the output file (but after opening input files). All callers changed. (first_same_file): New function. (sort, merge): Remove arg OFP; we now open the output file as needed. All callers changed. (merge): New arg MAX_MERGE. All callers changed. (sort): For "sort F -o F", close the input before opening the output. (main): Do not use close_stdout; 'sort' and 'merge' now close stdout. (This also fixes a close-stdout-twice bug.) Remove test for overlapping input and output files, as 'sort' no longer needs to worry about overlap, and 'merge' checks for overlap itself. Use first_same_file to inform 'merge' about how much to merge at the top level, to avoid overlap.
Languages
C
55.1%
Shell
29.1%
Perl
11.6%
Makefile
2.2%
M4
0.9%
Other
1.1%