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

Function save_line_to_file

src/csplit.c:994–1005  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

992 increment the character count for the current file. */
993
994static void
995save_line_to_file (const struct cstring *line)
996{
997 idx_t l = fwrite (line->str, sizeof (char), line->len, output_stream);
998 if (l != line->len)
999 {
1000 error (0, errno, _("write error for %s"), quoteaf (output_filename));
1001 output_stream = NULL;
1002 cleanup_fatal ();
1003 }
1004 bytes_written += line->len;
1005}
1006
1007/* Return a new, initialized control record. */
1008

Callers 4

write_to_fileFunction · 0.85
dump_rest_of_fileFunction · 0.85
process_line_countFunction · 0.85
process_regexpFunction · 0.85

Calls 1

cleanup_fatalFunction · 0.85

Tested by

no test coverage detected