diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Modules/parameter.c | 2 | ||||
-rw-r--r-- | Src/Modules/zpty.c | 2 | ||||
-rw-r--r-- | Src/Modules/zutil.c | 2 | ||||
-rw-r--r-- | Src/builtin.c | 4 | ||||
-rw-r--r-- | Src/exec.c | 14 | ||||
-rw-r--r-- | Src/glob.c | 2 | ||||
-rw-r--r-- | Src/parse.c | 2 |
7 files changed, 14 insertions, 14 deletions
diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c index db3534e69..fe44eafb3 100644 --- a/Src/Modules/parameter.c +++ b/Src/Modules/parameter.c @@ -342,7 +342,7 @@ setfunction(char *name, char *val, int dis) val = metafy(val, strlen(val), META_REALLOC); - prog = parse_string(val, 1); + prog = parse_string(val); if (!prog || prog == &dummy_eprog) { zwarn("invalid function definition", value, 0); diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c index 80deba786..7ab31cfb4 100644 --- a/Src/Modules/zpty.c +++ b/Src/Modules/zpty.c @@ -276,7 +276,7 @@ newptycmd(char *nam, char *pname, char **args, int echo, int nblock) int master, slave, pid; Eprog prog; - prog = parse_string(zjoin(args, ' ', 1), 0); + prog = parse_string(zjoin(args, ' ', 1)); if (!prog) { errflag = 0; return 1; diff --git a/Src/Modules/zutil.c b/Src/Modules/zutil.c index 8a69a561b..85ab4b394 100644 --- a/Src/Modules/zutil.c +++ b/Src/Modules/zutil.c @@ -115,7 +115,7 @@ setstypat(Style s, char *pat, Patprog prog, char **vals, int eval) if (eval) { int ef = errflag; - eprog = parse_string(zjoin(vals, ' ', 1), 0); + eprog = parse_string(zjoin(vals, ' ', 1)); errflag = ef; if (!eprog) diff --git a/Src/builtin.c b/Src/builtin.c index 11324a0cd..9a792e15c 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -3421,7 +3421,7 @@ bin_eval(char *nam, char **argv, char *ops, int func) { Eprog prog; - prog = parse_string(zjoin(argv, ' ', 1), 0); + prog = parse_string(zjoin(argv, ' ', 1)); if (!prog) { errflag = 0; return 1; @@ -4027,7 +4027,7 @@ bin_trap(char *name, char **argv, char *ops, int func) arg = *argv++; if (!*arg) prog = &dummy_eprog; - else if (!(prog = parse_string(arg, 0))) { + else if (!(prog = parse_string(arg))) { zwarnnam(name, "couldn't parse trap command", NULL, 0); return 1; } diff --git a/Src/exec.c b/Src/exec.c index 91ce74e57..c3da81b5d 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -147,15 +147,15 @@ static int (*execfuncs[]) _((Estate, int)) = { /**/ mod_export Eprog -parse_string(char *s, int ln) +parse_string(char *s) { Eprog p; int oldlineno = lineno; lexsave(); - inpush(s, (ln ? INP_LINENO : 0), NULL); + inpush(s, INP_LINENO, NULL); strinbeg(0); - lineno = ln ? 1 : -1; + lineno = 1; p = parse_list(); lineno = oldlineno; strinend(); @@ -711,7 +711,7 @@ execstring(char *s, int dont_change_job, int exiting) Eprog prog; pushheap(); - if ((prog = parse_string(s, 0))) + if ((prog = parse_string(s))) execode(prog, dont_change_job, exiting); popheap(); } @@ -2669,7 +2669,7 @@ getoutput(char *cmd, int qt) pid_t pid; Wordcode pc; - if (!(prog = parse_string(cmd, 0))) + if (!(prog = parse_string(cmd))) return NULL; pc = prog->prog; @@ -2800,7 +2800,7 @@ parsecmd(char *cmd) return NULL; } *str = '\0'; - if (str[1] || !(prog = parse_string(cmd + 2, 0))) { + if (str[1] || !(prog = parse_string(cmd + 2))) { zerr("parse error in process substitution", NULL, 0); return NULL; } @@ -3496,7 +3496,7 @@ getfpfunc(char *s, int *ksh) d = metafy(d, len, META_REALLOC); scriptname = dupstring(s); - r = parse_string(d, 1); + r = parse_string(d); scriptname = oldscriptname; zfree(d, len + 1); diff --git a/Src/glob.c b/Src/glob.c index 2f64434c4..1f6bde3ab 100644 --- a/Src/glob.c +++ b/Src/glob.c @@ -2632,7 +2632,7 @@ qualsheval(char *name, struct stat *buf, off_t days, char *str) { Eprog prog; - if ((prog = parse_string(str, 0))) { + if ((prog = parse_string(str))) { int ef = errflag, lv = lastval, ret; unsetparam("reply"); diff --git a/Src/parse.c b/Src/parse.c index f16dcfd05..70a00031c 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -2602,7 +2602,7 @@ build_dump(char *nam, char *dump, char **files, int ali, int map, int flags) close(fd); file = metafy(file, flen, META_REALLOC); - if (!(prog = parse_string(file, 1)) || errflag) { + if (!(prog = parse_string(file)) || errflag) { errflag = 0; close(dfd); zfree(file, flen); |