diff options
author | herbert <herbert@gondor.apana.org.au> | 2005-03-02 19:46:59 +1100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2005-09-26 18:33:04 +1000 |
commit | dc73119e1d42e969ba7081a1e15dbab7811721c6 (patch) | |
tree | d24abae8acaf535f324bc5c415792312df02b0fc /src/options.c | |
parent | Normalise input in likely/unlikely macros. (diff) | |
download | dash-dc73119e1d42e969ba7081a1e15dbab7811721c6.tar.gz dash-dc73119e1d42e969ba7081a1e15dbab7811721c6.zip |
Renamed error to sh_error.
Diffstat (limited to '')
-rw-r--r-- | src/options.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/options.c b/src/options.c index 88592b6..e8c0717 100644 --- a/src/options.c +++ b/src/options.c @@ -150,7 +150,7 @@ procargs(int argc, char **argv) xminusc = minusc; if (*xargv == NULL) { if (xminusc) - error("-c requires an argument"); + sh_error("-c requires an argument"); sflag = 1; } if (iflag == 2 && sflag == 1 && isatty(0) && isatty(1)) @@ -265,7 +265,7 @@ minus_o(char *name, int val) optlist[i] = val; return; } - error("Illegal option -o %s", name); + sh_error("Illegal option -o %s", name); } } @@ -287,7 +287,7 @@ setoption(int flag, int val) } return; } - error("Illegal option -%c", flag); + sh_error("Illegal option -%c", flag); /* NOTREACHED */ } @@ -351,7 +351,7 @@ shiftcmd(int argc, char **argv) if (argc > 1) n = number(argv[1]); if (n > shellparam.nparam) - error("can't shift that many"); + sh_error("can't shift that many"); INTOFF; shellparam.nparam -= n; for (ap1 = shellparam.p ; --n >= 0 ; ap1++) { @@ -409,7 +409,7 @@ getoptscmd(int argc, char **argv) char **optbase; if (argc < 3) - error("Usage: getopts optstring var [arg]"); + sh_error("Usage: getopts optstring var [arg]"); else if (argc == 3) { optbase = shellparam.p; if (shellparam.optind > shellparam.nparam + 1) { @@ -547,13 +547,13 @@ nextopt(const char *optstring) c = *p++; for (q = optstring ; *q != c ; ) { if (*q == '\0') - error("Illegal option -%c", c); + sh_error("Illegal option -%c", c); if (*++q == ':') q++; } if (*++q == ':') { if (*p == '\0' && (p = *argptr++) == NULL) - error("No arg for -%c option", c); + sh_error("No arg for -%c option", c); optionarg = p; p = NULL; } |