fmt.c (9c831bbd699f824944cf3fcc4bcd49cca8bbff7e) | fmt.c (5666643a95389e3ea7637b86cc556d411242f71e) |
---|---|
1/* $OpenBSD: fmt.c,v 1.21 2004/04/01 23:14:19 tedu Exp $ */ 2 3/* Sensible version of fmt 4 * 5 * Syntax: fmt [ options ] [ goal [ max ] ] [ filename ... ] 6 * 7 * Since the documentation for the original fmt is so poor, here 8 * is an accurate description of what this one does. It's usually --- 610 unchanged lines hidden (view full) --- 619 * two spaces. 620 */ 621 if (coalesce_spaces_P || spaces == 0) 622 spaces = wcschr(sentence_enders, word[length - 1]) ? 2 : 1; 623 624 if (new_x <= goal_length) { 625 /* 626 * After adding the word we still aren't at the goal length, | 1/* $OpenBSD: fmt.c,v 1.21 2004/04/01 23:14:19 tedu Exp $ */ 2 3/* Sensible version of fmt 4 * 5 * Syntax: fmt [ options ] [ goal [ max ] ] [ filename ... ] 6 * 7 * Since the documentation for the original fmt is so poor, here 8 * is an accurate description of what this one does. It's usually --- 610 unchanged lines hidden (view full) --- 619 * two spaces. 620 */ 621 if (coalesce_spaces_P || spaces == 0) 622 spaces = wcschr(sentence_enders, word[length - 1]) ? 2 : 1; 623 624 if (new_x <= goal_length) { 625 /* 626 * After adding the word we still aren't at the goal length, |
627 * so clearly we add it to the buffer rather than outputing | 627 * so clearly we add it to the buffer rather than outputting |
628 * it. 629 */ 630 wmemset(output_buffer + output_buffer_length, L' ', 631 pending_spaces); 632 x0 += pending_spaces; 633 x += pending_spaces; 634 output_buffer_length += pending_spaces; 635 wmemcpy(output_buffer + output_buffer_length, word, length); --- 151 unchanged lines hidden --- | 628 * it. 629 */ 630 wmemset(output_buffer + output_buffer_length, L' ', 631 pending_spaces); 632 x0 += pending_spaces; 633 x += pending_spaces; 634 output_buffer_length += pending_spaces; 635 wmemcpy(output_buffer + output_buffer_length, word, length); --- 151 unchanged lines hidden --- |