| 465 | and record the lengths of the prefix and the space trimmed. */ |
| 466 | |
| 467 | static void |
| 468 | set_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. |