aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-06-07 11:34:06 +0100
committerRon Yorston <rmy@pobox.com>2021-06-07 11:34:06 +0100
commitabe872e2a0342357a5608342cb2892e94027b3e7 (patch)
tree297cdccf332fbb5e4eb31b1eac643180059f9b5f /libbb
parent1f33f42d7bcb019b268d938df643a7a785dc19ab (diff)
parent4d983dcddeee94892d3072e84c7c9a01d4696055 (diff)
downloadbusybox-w32-abe872e2a0342357a5608342cb2892e94027b3e7.tar.gz
busybox-w32-abe872e2a0342357a5608342cb2892e94027b3e7.tar.bz2
busybox-w32-abe872e2a0342357a5608342cb2892e94027b3e7.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'libbb')
-rw-r--r--libbb/getopt32.c11
-rw-r--r--libbb/signals.c2
-rw-r--r--libbb/xfuncs.c6
3 files changed, 14 insertions, 5 deletions
diff --git a/libbb/getopt32.c b/libbb/getopt32.c
index 378510063..5ab4d66f1 100644
--- a/libbb/getopt32.c
+++ b/libbb/getopt32.c
@@ -89,6 +89,12 @@ getopt32(char **argv, const char *applet_opts, ...)
89 root:x:0:0:root:/root:/bin/bash 89 root:x:0:0:root:/root:/bin/bash
90 user:x:500:500::/home/user:/bin/bash 90 user:x:500:500::/home/user:/bin/bash
91 91
92 "^" options string is "^optchars""\0""opt_complementary".
93
94 "!" If the first character in the applet_opts string is a '!',
95 report bad options, missing required options,
96 inconsistent options with all-ones return value (instead of abort.
97
92 "+" If the first character in the applet_opts string is a plus, 98 "+" If the first character in the applet_opts string is a plus,
93 then option processing will stop as soon as a non-option is 99 then option processing will stop as soon as a non-option is
94 encountered in the argv array. Useful for applets like env 100 encountered in the argv array. Useful for applets like env
@@ -96,10 +102,7 @@ getopt32(char **argv, const char *applet_opts, ...)
96 env -i ls -d / 102 env -i ls -d /
97 Here we want env to process just the '-i', not the '-d'. 103 Here we want env to process just the '-i', not the '-d'.
98 104
99 "!" Report bad options, missing required options, 105 (The order of multiple prefixes must be "^!+...")
100 inconsistent options with all-ones return value (instead of abort).
101
102 "^" options string is "^optchars""\0""opt_complementary".
103 106
104uint32_t 107uint32_t
105getopt32long(char **argv, const char *applet_opts, const char *logopts...) 108getopt32long(char **argv, const char *applet_opts, const char *logopts...)
diff --git a/libbb/signals.c b/libbb/signals.c
index e64ba5023..c09a562ed 100644
--- a/libbb/signals.c
+++ b/libbb/signals.c
@@ -58,7 +58,7 @@ void FAST_FUNC bb_signals(int sigs, void (*f)(int))
58 } 58 }
59} 59}
60 60
61void FAST_FUNC bb_signals_recursive_norestart(int sigs, void (*f)(int)) 61void FAST_FUNC bb_signals_norestart(int sigs, void (*f)(int))
62{ 62{
63 int sig_no = 0; 63 int sig_no = 0;
64 int bit = 1; 64 int bit = 1;
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index ef990118e..102b5a227 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -305,6 +305,12 @@ int FAST_FUNC get_terminal_width(int fd)
305 return width; 305 return width;
306} 306}
307 307
308int FAST_FUNC is_TERM_dumb(void)
309{
310 char *term = getenv("TERM");
311 return term && strcmp(term, "dumb") == 0;
312}
313
308#if !ENABLE_PLATFORM_MINGW32 314#if !ENABLE_PLATFORM_MINGW32
309int FAST_FUNC tcsetattr_stdin_TCSANOW(const struct termios *tp) 315int FAST_FUNC tcsetattr_stdin_TCSANOW(const struct termios *tp)
310{ 316{