MCPcopy Index your code
hub / github.com/coreutils/coreutils / process_file

Function process_file

src/nl.c:428–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426/* Read and process the file pointed to by FP. */
427
428static void
429process_file (FILE *fp)
430{
431 while (readlinebuffer (&line_buf, fp))
432 {
433 switch (check_section ())
434 {
435 case Header:
436 proc_header ();
437 break;
438 case Body:
439 proc_body ();
440 break;
441 case Footer:
442 proc_footer ();
443 break;
444 case Text:
445 proc_text ();
446 break;
447 }
448
449 if (ferror (stdout))
450 write_error ();
451 }
452}
453
454/* Process file FILE to standard output.
455 Return true if successful. */

Callers 1

nl_fileFunction · 0.70

Calls 6

check_sectionFunction · 0.85
proc_headerFunction · 0.85
proc_bodyFunction · 0.85
proc_footerFunction · 0.85
proc_textFunction · 0.85
write_errorFunction · 0.85

Tested by

no test coverage detected