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

Function set_prefix

src/fmt.c:467–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465 and record the lengths of the prefix and the space trimmed. */
466
467static void
468set_prefix (char *p)
469{
470 char *s;
471
472 prefix_lead_space = 0;
473 while (*p == ' ')
474 {
475 prefix_lead_space++;
476 p++;
477 }
478 prefix = p;
479 prefix_full_length = strlen (p);
480 s = p + prefix_full_length;
481 while (s > p && s[-1] == ' ')
482 s--;
483 *s = '\0';
484 prefix_length = s - p;
485}
486
487/* Read F and send formatted output to stdout.
488 Close F when done, unless F is stdin. Diagnose input errors, using FILE.

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected