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

Function writeline

src/uniq.c:317–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315 LINECOUNT + 1 is the number of times that the line occurred. */
316
317static void
318writeline (struct linebuffer const *line,
319 bool match, intmax_t linecount)
320{
321 if (! (linecount == 0 ? output_unique
322 : !match ? output_first_repeated
323 : output_later_repeated))
324 return;
325
326 if (count_occurrences)
327 printf ("%7jd ", linecount + 1);
328
329 if (fwrite (line->buffer, sizeof (char), line->length, stdout)
330 != line->length)
331 write_error ();
332}
333
334/* Process input file INFILE with output to OUTFILE.
335 If either is "-", use the standard I/O stream for it instead. */

Callers 1

check_fileFunction · 0.70

Calls 1

write_errorFunction · 0.85

Tested by

no test coverage detected