summaryrefslogtreecommitdiff
path: root/util-linux/getopt.c
diff options
context:
space:
mode:
authorRob Landley2006-08-03 15:41:12 +0000
committerRob Landley2006-08-03 15:41:12 +0000
commitd921b2ecc0d294ad4bf8c7458fc52a60c28727d2 (patch)
treee4a2769349867c441cf2983d83097bb66701a733 /util-linux/getopt.c
parent6dce0b6fa79f2d4bb7e9d90e1fbc0f6beb25f855 (diff)
downloadbusybox-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.zip
busybox-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.tar.gz
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
Diffstat (limited to 'util-linux/getopt.c')
-rw-r--r--util-linux/getopt.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index fab8f83..bf05f91 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -31,14 +31,8 @@
*
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <getopt.h>
-
#include "busybox.h"
+#include <getopt.h>
/* NON_OPT is the code that is returned when a non-option is found in '+'
mode */
@@ -86,7 +80,7 @@ const char *normalize(const char *arg)
free(BUFFER);
if (!quote) { /* Just copy arg */
- BUFFER=bb_xstrdup(arg);
+ BUFFER=xstrdup(arg);
return BUFFER;
}
@@ -215,7 +209,7 @@ void add_longopt(const char *name,int has_arg)
long_options[long_options_nr-1].has_arg=has_arg;
long_options[long_options_nr-1].flag=NULL;
long_options[long_options_nr-1].val=LONG_OPT;
- long_options[long_options_nr-1].name=bb_xstrdup(name);
+ long_options[long_options_nr-1].name=xstrdup(name);
}
long_options_nr++;
}