diff options
author | Rene Engelhard <rene@openoffice.org> | 2010-05-18 14:05:20 +0200 |
---|---|---|
committer | Rene Engelhard <rene@openoffice.org> | 2010-05-18 14:05:20 +0200 |
commit | 769873c6224c0e03757d2ddb4b5a60d11411f025 (patch) | |
tree | feaa1a431c0591d0dd6d7e60bf340b8662cc9536 /soltools/cpp | |
parent | DEV300 masterfix: #i10000#: new naming scheme for installation sets (diff) | |
download | core-769873c6224c0e03757d2ddb4b5a60d11411f025.tar.gz core-769873c6224c0e03757d2ddb4b5a60d11411f025.zip |
systemlibc: migrate systemlibc to hg; try again from scratch
Diffstat (limited to 'soltools/cpp')
-rw-r--r-- | soltools/cpp/_getopt.c | 71 | ||||
-rw-r--r-- | soltools/cpp/_nlist.c | 3 | ||||
-rw-r--r-- | soltools/cpp/_unix.c | 6 | ||||
-rw-r--r-- | soltools/cpp/makefile.mk | 1 |
4 files changed, 2 insertions, 79 deletions
diff --git a/soltools/cpp/_getopt.c b/soltools/cpp/_getopt.c deleted file mode 100644 index 589638936efb..000000000000 --- a/soltools/cpp/_getopt.c +++ /dev/null @@ -1,71 +0,0 @@ -#include <stdio.h> -#include <string.h> - -#define EPR fprintf(stderr, -#define ERR(str, chr) if(opterr) { EPR "%s%c\n", str, chr); } - -int opterr = 1; -int optind = 1; -int optopt; -char *optarg; - -int - stgetopt(int argc, char *const argv[], const char *opts) -{ - static int sp = 1; - register int c; - register char *cp; - - if (sp == 1) - { - if (optind >= argc || - argv[optind][0] != '-' || argv[optind][1] == '\0') - return -1; - else if (strcmp(argv[optind], "--") == 0) - { - optind++; - return -1; - } - else if (strcmp(argv[optind], "-isysroot") == 0) - { - // skip Mac OS X SDK selection flags - optind++; optind++; - } - } - optopt = c = argv[optind][sp]; - if (c == ':' || (cp = strchr(opts, c)) == 0) - { - ERR(": illegal option -- ", c); - if (argv[optind][++sp] == '\0') - { - optind++; - sp = 1; - } - return '?'; - } - if (*++cp == ':') - { - if (argv[optind][sp + 1] != '\0') - optarg = &argv[optind++][sp + 1]; - else - if (++optind >= argc) - { - ERR(": option requires an argument -- ", c); - sp = 1; - return '?'; - } - else - optarg = argv[optind++]; - sp = 1; - } - else - { - if (argv[optind][++sp] == '\0') - { - sp = 1; - optind++; - } - optarg = 0; - } - return c; -} diff --git a/soltools/cpp/_nlist.c b/soltools/cpp/_nlist.c index 9144f2b7e15e..a71085bfbbf9 100644 --- a/soltools/cpp/_nlist.c +++ b/soltools/cpp/_nlist.c @@ -3,9 +3,6 @@ #include <string.h> #include "cpp.h" -extern int stgetopt(int, char *const *, const char *); -extern char *optarg; -extern int optind; extern int Cplusplus; Nlist *kwdefined; char wd[128]; diff --git a/soltools/cpp/_unix.c b/soltools/cpp/_unix.c index 5574bb3ecef7..1b58c00b6edb 100644 --- a/soltools/cpp/_unix.c +++ b/soltools/cpp/_unix.c @@ -12,9 +12,7 @@ #include "cpp.h" -extern int stgetopt(int, char *const *, const char *); -extern char *optarg, rcsid[]; -extern int optind; +extern char rcsid[]; int Pflag = 0; /* print no line information */ int Iflag = 0; /* print includes */ @@ -36,7 +34,7 @@ void Tokenrow tr; setup_kwtab(); - while ((c = stgetopt(argc, argv, "NOPV:I:D:U:F:A:X:u:l:+")) != -1) + while ((c = getopt(argc, argv, "NOPV:I:D:U:F:A:X:u:l:+")) != -1) switch (c) { case 'N': diff --git a/soltools/cpp/makefile.mk b/soltools/cpp/makefile.mk index 818c27028345..5143e01e1d1f 100644 --- a/soltools/cpp/makefile.mk +++ b/soltools/cpp/makefile.mk @@ -45,7 +45,6 @@ LIBSALCPPRT=$(0) OBJFILES= \ $(OBJ)$/_cpp.obj \ $(OBJ)$/_eval.obj \ - $(OBJ)$/_getopt.obj \ $(OBJ)$/_include.obj \ $(OBJ)$/_lex.obj \ $(OBJ)$/_macro.obj \ |