diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-09-18 12:16:47 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-09-18 12:17:20 +0200 |
commit | 3f5ba0c8724d154c9f184fad458471490a4ef5b3 (patch) | |
tree | 80154f9611b539c02037a9cbcc8f02548e9939ef /coreutils/stty.c | |
parent | 3c34f681b35233afb7f932154e72f3eb2b335b47 (diff) | |
download | busybox-w32-3f5ba0c8724d154c9f184fad458471490a4ef5b3.tar.gz busybox-w32-3f5ba0c8724d154c9f184fad458471490a4ef5b3.tar.bz2 busybox-w32-3f5ba0c8724d154c9f184fad458471490a4ef5b3.zip |
stty: add cmspar, flusho, extproc attributes
function old new delta
mode_info 688 704 +16
mode_name 502 516 +14
wrapf 162 157 -5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 30/-5) Total: 25 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/stty.c')
-rw-r--r-- | coreutils/stty.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/coreutils/stty.c b/coreutils/stty.c index 57e2cc30d..b6e836364 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
@@ -148,6 +148,9 @@ | |||
148 | #ifndef CRDLY | 148 | #ifndef CRDLY |
149 | # define CRDLY 0 | 149 | # define CRDLY 0 |
150 | #endif | 150 | #endif |
151 | #ifndef CMSPAR | ||
152 | # define CMSPAR 0 | ||
153 | #endif | ||
151 | #ifndef CRTSCTS | 154 | #ifndef CRTSCTS |
152 | # define CRTSCTS 0 | 155 | # define CRTSCTS 0 |
153 | #endif | 156 | #endif |
@@ -352,6 +355,9 @@ static const char mode_name[] ALIGN1 = | |||
352 | #endif | 355 | #endif |
353 | MI_ENTRY("parenb", control, REV, PARENB, 0 ) | 356 | MI_ENTRY("parenb", control, REV, PARENB, 0 ) |
354 | MI_ENTRY("parodd", control, REV, PARODD, 0 ) | 357 | MI_ENTRY("parodd", control, REV, PARODD, 0 ) |
358 | #if CMSPAR | ||
359 | MI_ENTRY("cmspar", control, REV, CMSPAR, 0 ) | ||
360 | #endif | ||
355 | MI_ENTRY("cs5", control, 0, CS5, CSIZE) | 361 | MI_ENTRY("cs5", control, 0, CS5, CSIZE) |
356 | MI_ENTRY("cs6", control, 0, CS6, CSIZE) | 362 | MI_ENTRY("cs6", control, 0, CS6, CSIZE) |
357 | MI_ENTRY("cs7", control, 0, CS7, CSIZE) | 363 | MI_ENTRY("cs7", control, 0, CS7, CSIZE) |
@@ -477,6 +483,10 @@ static const char mode_name[] ALIGN1 = | |||
477 | MI_ENTRY("echoke", local, SANE_SET | REV, ECHOKE, 0 ) | 483 | MI_ENTRY("echoke", local, SANE_SET | REV, ECHOKE, 0 ) |
478 | MI_ENTRY("crtkill", local, OMIT | REV, ECHOKE, 0 ) | 484 | MI_ENTRY("crtkill", local, OMIT | REV, ECHOKE, 0 ) |
479 | #endif | 485 | #endif |
486 | MI_ENTRY("flusho", local, SANE_UNSET | REV, FLUSHO, 0 ) | ||
487 | #ifdef EXTPROC | ||
488 | MI_ENTRY("extproc", local, SANE_UNSET | REV, EXTPROC, 0 ) | ||
489 | #endif | ||
480 | ; | 490 | ; |
481 | 491 | ||
482 | #undef MI_ENTRY | 492 | #undef MI_ENTRY |
@@ -509,6 +519,9 @@ static const struct mode_info mode_info[] = { | |||
509 | #endif | 519 | #endif |
510 | MI_ENTRY("parenb", control, REV, PARENB, 0 ) | 520 | MI_ENTRY("parenb", control, REV, PARENB, 0 ) |
511 | MI_ENTRY("parodd", control, REV, PARODD, 0 ) | 521 | MI_ENTRY("parodd", control, REV, PARODD, 0 ) |
522 | #if CMSPAR | ||
523 | MI_ENTRY("cmspar", control, REV, CMSPAR, 0 ) | ||
524 | #endif | ||
512 | MI_ENTRY("cs5", control, 0, CS5, CSIZE) | 525 | MI_ENTRY("cs5", control, 0, CS5, CSIZE) |
513 | MI_ENTRY("cs6", control, 0, CS6, CSIZE) | 526 | MI_ENTRY("cs6", control, 0, CS6, CSIZE) |
514 | MI_ENTRY("cs7", control, 0, CS7, CSIZE) | 527 | MI_ENTRY("cs7", control, 0, CS7, CSIZE) |
@@ -634,6 +647,10 @@ static const struct mode_info mode_info[] = { | |||
634 | MI_ENTRY("echoke", local, SANE_SET | REV, ECHOKE, 0 ) | 647 | MI_ENTRY("echoke", local, SANE_SET | REV, ECHOKE, 0 ) |
635 | MI_ENTRY("crtkill", local, OMIT | REV, ECHOKE, 0 ) | 648 | MI_ENTRY("crtkill", local, OMIT | REV, ECHOKE, 0 ) |
636 | #endif | 649 | #endif |
650 | MI_ENTRY("flusho", local, SANE_UNSET | REV, FLUSHO, 0 ) | ||
651 | #ifdef EXTPROC | ||
652 | MI_ENTRY("extproc", local, SANE_UNSET | REV, EXTPROC, 0 ) | ||
653 | #endif | ||
637 | }; | 654 | }; |
638 | 655 | ||
639 | enum { | 656 | enum { |
@@ -836,10 +853,11 @@ static void wrapf(const char *message, ...) | |||
836 | G.current_col++; | 853 | G.current_col++; |
837 | if (buf[0] != '\n') { | 854 | if (buf[0] != '\n') { |
838 | if (G.current_col + buflen >= G.max_col) { | 855 | if (G.current_col + buflen >= G.max_col) { |
839 | bb_putchar('\n'); | ||
840 | G.current_col = 0; | 856 | G.current_col = 0; |
841 | } else | 857 | bb_putchar('\n'); |
858 | } else { | ||
842 | bb_putchar(' '); | 859 | bb_putchar(' '); |
860 | } | ||
843 | } | 861 | } |
844 | } | 862 | } |
845 | fputs(buf, stdout); | 863 | fputs(buf, stdout); |