diff --git a/src/join.c b/src/join.c index afda5a1..8fcd47b 100644 --- a/src/join.c +++ b/src/join.c @@ -354,7 +354,7 @@ keycmp (struct line const *line1, struct line const *line2, /* Check that successive input lines PREV and CURRENT from input file WHATFILE are presented in order, unless the user may be relying on - the GNU extension that input lines may be out of order if no input + the extension that input lines may be out of order if no input lines are unpairable. If the user specified --nocheck-order, the check is not made. @@ -711,7 +711,7 @@ join (FILE *fp1, FILE *fp2) seq2.count = 0; } - /* If the user did not specify --check-order, then we read the + /* If the user did not specify --nocheck-order, then we read the tail ends of both inputs to verify that they are in order. We skip the rest of the tail once we have issued a warning for that file, unless we actually need to print the unpairable lines. */ @@ -726,7 +726,8 @@ join (FILE *fp1, FILE *fp2) { if (print_unpairables_1) prjoin (seq1.lines[0], &uni_blank); - seen_unpairable = true; + if (seq2.count) + seen_unpairable = true; while (get_line (fp1, &line, 1)) { if (print_unpairables_1) @@ -740,7 +741,8 @@ join (FILE *fp1, FILE *fp2) { if (print_unpairables_2) prjoin (&uni_blank, seq2.lines[0]); - seen_unpairable = true; + if (seq1.count) + seen_unpairable = true; while (get_line (fp2, &line, 2)) { if (print_unpairables_2)