[BusyBox-cvs] busybox/libbb getopt_ulflags.c,1.2,1.3

Glenn McGrath bug1 at busybox.net
Mon Oct 6 13:23:08 UTC 2003


Update of /var/cvs/busybox/libbb
In directory winder:/tmp/cvs-serv31663/libbb

Modified Files:
	getopt_ulflags.c 
Log Message:
Vodz last_patch_105 without his xargs patch which doenst apply cleanly


Index: getopt_ulflags.c
===================================================================
RCS file: /var/cvs/busybox/libbb/getopt_ulflags.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- getopt_ulflags.c	20 Jun 2003 09:01:56 -0000	1.2
+++ getopt_ulflags.c	6 Oct 2003 13:23:04 -0000	1.3
@@ -90,7 +90,12 @@
 
   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 @@
   }
   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++;




More information about the busybox-cvs mailing list