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

Function write_unique

src/sort.c:3674–3685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3672 appropriate only for internal sort. */
3673
3674static void
3675write_unique (struct line const *line, FILE *tfp, char const *temp_output)
3676{
3677 if (unique)
3678 {
3679 if (saved_line.text && ! compare (line, &saved_line))
3680 return;
3681 saved_line = *line;
3682 }
3683
3684 write_line (line, tfp, temp_output);
3685}
3686
3687/* Merge the lines currently available to a NODE in the binary
3688 merge tree. Merge a number of lines appropriate for this merge

Callers 2

mergelines_nodeFunction · 0.85
sortFunction · 0.85

Calls 2

compareFunction · 0.85
write_lineFunction · 0.85

Tested by

no test coverage detected