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

Function copy_rest

src/fmt.c:646–666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644 Return the character (\n or EOF) ending the line. */
645
646static int
647copy_rest (FILE *f, int c)
648{
649 out_column = 0;
650 if (in_column > next_prefix_indent || (c != '\n' && c != EOF))
651 {
652 put_space (next_prefix_indent);
653 for (char const *s = prefix; out_column != in_column && *s; out_column++)
654 putchar (*s++);
655 if (c != EOF && c != '\n')
656 put_space (in_column - out_column);
657 if (c == EOF && in_column >= next_prefix_indent + prefix_length)
658 putchar ('\n');
659 }
660 while (c != '\n' && c != EOF)
661 {
662 putchar (c);
663 c = getc (f);
664 }
665 return c;
666}
667
668/* Return true if a line whose first non-blank character after the
669 prefix (if any) is C could belong to the current paragraph,

Callers 1

get_paragraphFunction · 0.85

Calls 1

put_spaceFunction · 0.85

Tested by

no test coverage detected