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

Function set_input_file

src/csplit.c:605–611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

603/* Open NAME as standard input. */
604
605static void
606set_input_file (char const *name)
607{
608 if (! streq (name, "-") && fd_reopen (STDIN_FILENO, name, O_RDONLY, 0) < 0)
609 error (EXIT_FAILURE, errno, _("cannot open %s for reading"),
610 quoteaf (name));
611}
612
613/* Write all lines from the beginning of the buffer up to, but
614 not including, line LAST_LINE, to the current output file.

Callers 1

mainFunction · 0.85

Calls 1

fd_reopenFunction · 0.85

Tested by

no test coverage detected