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/histedit.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 'src/histedit.c')
-rw-r--r-- | src/histedit.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/histedit.c b/src/histedit.c index b09900b..0d435cd 100644 --- a/src/histedit.c +++ b/src/histedit.c @@ -220,10 +220,10 @@ histcmd(int argc, char **argv) #endif if (hist == NULL) - error("history not active"); + sh_error("history not active"); if (argc == 1) - error("missing history argument"); + sh_error("missing history argument"); #ifdef __GLIBC__ optind = 0; @@ -249,11 +249,11 @@ histcmd(int argc, char **argv) sflg = 1; break; case ':': - error("option -%c expects argument", optopt); + sh_error("option -%c expects argument", optopt); /* NOTREACHED */ case '?': default: - error("unknown option: -%c", optopt); + sh_error("unknown option: -%c", optopt); /* NOTREACHED */ } argc -= optind, argv += optind; @@ -280,7 +280,7 @@ histcmd(int argc, char **argv) if (++active > MAXHISTLOOPS) { active = 0; displayhist = 0; - error("called recursively too many times"); + sh_error("called recursively too many times"); } /* * Set editor. @@ -323,7 +323,7 @@ histcmd(int argc, char **argv) laststr = argv[1]; break; default: - error("too many args"); + sh_error("too many args"); /* NOTREACHED */ } /* @@ -352,10 +352,10 @@ histcmd(int argc, char **argv) INTOFF; /* easier */ sprintf(editfile, "%s_shXXXXXX", _PATH_TMP); if ((fd = mkstemp(editfile)) < 0) - error("can't create temporary file %s", editfile); + sh_error("can't create temporary file %s", editfile); if ((efp = fdopen(fd, "w")) == NULL) { close(fd); - error("can't allocate stdio buffer for temp"); + sh_error("can't allocate stdio buffer for temp"); } } @@ -488,15 +488,15 @@ str_to_event(const char *str, int last) } } if (retval == -1) - error("history number %s not found (internal error)", - str); + sh_error("history number %s not found (internal error)", + str); } else { /* * pattern */ retval = history(hist, &he, H_PREV_STR, str); if (retval == -1) - error("history pattern not found: %s", str); + sh_error("history pattern not found: %s", str); } return (he.num); } @@ -504,7 +504,7 @@ str_to_event(const char *str, int last) int histcmd(int argc, char **argv) { - error("not compiled with history support"); + sh_error("not compiled with history support"); /* NOTREACHED */ } #endif |