rem: if ((mode == output_unique && linecount != 0) || (mode == output_repeated && linecount == 0) || (mode == output_all_repeated && linecount == 0))
add: if (! (linecount == 0 ? output_unique : !match ? output_first_repeated : output_later_repeated))
context: writeline (const struct linebuffer *line, FILE *stream, int linecount){  if ((mode == output_unique && linecount != 0)      || (mode == output_repeated && linecount == 0)      || (mode == output_all_repeated && linecount == 0))    return;  if (countmode == count_occurrences)    fprintf (stream, "%7d\t", linecount + 1);  fwrite (line->buffer, sizeof (char), line->length, stream);}