[git commit] stty: add cmspar, flusho, extproc attributes

Denys Vlasenko vda.linux at googlemail.com
Mon Sep 18 10:17:20 UTC 2017


commit: https://git.busybox.net/busybox/commit/?id=3f5ba0c8724d154c9f184fad458471490a4ef5b3
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

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 at googlemail.com>
---
 coreutils/stty.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/coreutils/stty.c b/coreutils/stty.c
index 57e2cc3..b6e8363 100644
--- a/coreutils/stty.c
+++ b/coreutils/stty.c
@@ -148,6 +148,9 @@
 #ifndef CRDLY
 # define CRDLY 0
 #endif
+#ifndef CMSPAR
+# define CMSPAR 0
+#endif
 #ifndef CRTSCTS
 # define CRTSCTS 0
 #endif
@@ -352,6 +355,9 @@ static const char mode_name[] ALIGN1 =
 #endif
 	MI_ENTRY("parenb",   control,     REV,               PARENB,     0 )
 	MI_ENTRY("parodd",   control,     REV,               PARODD,     0 )
+#if CMSPAR
+	MI_ENTRY("cmspar",   control,     REV,               CMSPAR,     0 )
+#endif
 	MI_ENTRY("cs5",      control,     0,                 CS5,     CSIZE)
 	MI_ENTRY("cs6",      control,     0,                 CS6,     CSIZE)
 	MI_ENTRY("cs7",      control,     0,                 CS7,     CSIZE)
@@ -477,6 +483,10 @@ static const char mode_name[] ALIGN1 =
 	MI_ENTRY("echoke",   local,       SANE_SET   | REV,  ECHOKE,     0 )
 	MI_ENTRY("crtkill",  local,       OMIT       | REV,  ECHOKE,     0 )
 #endif
+	MI_ENTRY("flusho",   local,       SANE_UNSET | REV,  FLUSHO,     0 )
+#ifdef EXTPROC
+	MI_ENTRY("extproc",  local,       SANE_UNSET | REV,  EXTPROC,    0 )
+#endif
 	;
 
 #undef MI_ENTRY
@@ -509,6 +519,9 @@ static const struct mode_info mode_info[] = {
 #endif
 	MI_ENTRY("parenb",   control,     REV,               PARENB,     0 )
 	MI_ENTRY("parodd",   control,     REV,               PARODD,     0 )
+#if CMSPAR
+	MI_ENTRY("cmspar",   control,     REV,               CMSPAR,     0 )
+#endif
 	MI_ENTRY("cs5",      control,     0,                 CS5,     CSIZE)
 	MI_ENTRY("cs6",      control,     0,                 CS6,     CSIZE)
 	MI_ENTRY("cs7",      control,     0,                 CS7,     CSIZE)
@@ -634,6 +647,10 @@ static const struct mode_info mode_info[] = {
 	MI_ENTRY("echoke",   local,       SANE_SET   | REV,  ECHOKE,     0 )
 	MI_ENTRY("crtkill",  local,       OMIT       | REV,  ECHOKE,     0 )
 #endif
+	MI_ENTRY("flusho",   local,       SANE_UNSET | REV,  FLUSHO,     0 )
+#ifdef EXTPROC
+	MI_ENTRY("extproc",  local,       SANE_UNSET | REV,  EXTPROC,    0 )
+#endif
 };
 
 enum {
@@ -836,10 +853,11 @@ static void wrapf(const char *message, ...)
 		G.current_col++;
 		if (buf[0] != '\n') {
 			if (G.current_col + buflen >= G.max_col) {
-				bb_putchar('\n');
 				G.current_col = 0;
-			} else
+				bb_putchar('\n');
+			} else {
 				bb_putchar(' ');
+			}
 		}
 	}
 	fputs(buf, stdout);


More information about the busybox-cvs mailing list