summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorGlenn L McGrath2003-10-06 13:23:06 +0000
committerGlenn L McGrath2003-10-06 13:23:06 +0000
commit9d1a33c6904846b0518d3b260900784aa3c5c754 (patch)
treee3129e67f53adeb991ce768352e238824607181e /libbb
parentadd3eadc4691a1870980abb925a7424e13fde344 (diff)
downloadbusybox-9d1a33c6904846b0518d3b260900784aa3c5c754.zip
busybox-9d1a33c6904846b0518d3b260900784aa3c5c754.tar.gz
Vodz last_patch_105 without his xargs patch which doenst apply cleanly
Diffstat (limited to 'libbb')
-rw-r--r--libbb/getopt_ulflags.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/libbb/getopt_ulflags.c b/libbb/getopt_ulflags.c
index 9bf8c05..04d1e66 100644
--- a/libbb/getopt_ulflags.c
+++ b/libbb/getopt_ulflags.c
@@ -90,7 +90,12 @@ bb_getopt_ulflags (int argc, char **argv, const char *applet_opts, ...)
va_start (p, applet_opts);
- for (s = applet_opts; *s; s++) {
+ /* skip GNU extension */
+ s = applet_opts;
+ if(*s == '+' || *s == '-')
+ s++;
+
+ for (; *s; s++) {
c++;
while (s[1] == ':') {
/* check GNU extension "o::" - optional arg */
@@ -99,7 +104,12 @@ bb_getopt_ulflags (int argc, char **argv, const char *applet_opts, ...)
}
complementaly = xcalloc (c + 1, sizeof (t_complementaly));
c = 0;
- for (s = applet_opts; *s; s++) {
+ /* skip GNU extension */
+ s = applet_opts;
+ if(*s == '+' || *s == '-')
+ s++;
+
+ for (; *s; s++) {
complementaly->opt = *s;
complementaly->switch_on |= (1 << c);
c++;