diff --git a/exec.c b/exec.c index cc70dbb..79ada47 100644 --- a/exec.c +++ b/exec.c @@ -23,7 +23,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.104 2012/10/22 16:53:21 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.105 2012/10/30 20:13:17 tg Exp $"); #ifndef MKSH_DEFAULT_EXECSHELL #define MKSH_DEFAULT_EXECSHELL "/bin/sh" @@ -691,7 +691,7 @@ comexec(struct op *t, struct tbl * volatile tp, const char **ap, strerror(tp->u2.errnov)); break; } - if (include(tp->u.fpath, 0, NULL, 0) < 0) { + if (include(tp->u.fpath, 0, NULL, false) < 0) { rv = errno; warningf(true, "%s: %s %s %s: %s", cp, "can't open", "function definition file", diff --git a/funcs.c b/funcs.c index 49064ae..5db8b04 100644 --- a/funcs.c +++ b/funcs.c @@ -38,7 +38,7 @@ #endif #endif -__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.229 2012/10/30 20:06:49 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.230 2012/10/30 20:13:18 tg Exp $"); #if HAVE_KILLPG /* @@ -1741,7 +1741,7 @@ c_dot(const char **wp) argc = 0; argv = NULL; } - if ((i = include(file, argc, argv, 0)) < 0) { + if ((i = include(file, argc, argv, false)) < 0) { /* should not happen */ bi_errorf("%s: %s", cp, strerror(errno)); return (1); diff --git a/main.c b/main.c index 2803cc5..f52be62 100644 --- a/main.c +++ b/main.c @@ -34,7 +34,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/main.c,v 1.235 2012/10/30 20:07:12 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/main.c,v 1.236 2012/10/30 20:13:19 tg Exp $"); extern char **environ; @@ -617,13 +617,13 @@ main_init(int argc, const char *argv[], Source **sp, struct block **lp) warningf(false, "can't determine current directory"); if (Flag(FLOGIN)) { - include(MKSH_SYSTEM_PROFILE, 0, NULL, 1); + include(MKSH_SYSTEM_PROFILE, 0, NULL, true); if (!Flag(FPRIVILEGED)) include(substitute("$HOME/.profile", 0), 0, - NULL, 1); + NULL, true); } if (Flag(FPRIVILEGED)) - include(MKSH_SUID_PROFILE, 0, NULL, 1); + include(MKSH_SUID_PROFILE, 0, NULL, true); else if (Flag(FTALKING)) { char *env_file; @@ -631,7 +631,7 @@ main_init(int argc, const char *argv[], Source **sp, struct block **lp) env_file = substitute(substitute("${ENV:-" MKSHRC_PATH "}", 0), DOTILDE); if (*env_file != '\0') - include(env_file, 0, NULL, 1); + include(env_file, 0, NULL, true); } if (restricted) { @@ -675,7 +675,7 @@ main(int argc, const char *argv[]) } int -include(const char *name, int argc, const char **argv, int intr_ok) +include(const char *name, int argc, const char **argv, bool intr_ok) { Source *volatile s = NULL; struct shf *shf; diff --git a/sh.h b/sh.h index 906e409..147c18f 100644 --- a/sh.h +++ b/sh.h @@ -157,7 +157,7 @@ #endif #ifdef EXTERN -__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.598 2012/10/30 20:07:13 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.599 2012/10/30 20:13:20 tg Exp $"); #endif #define MKSH_VERSION "R40 2012/10/30" @@ -1804,7 +1804,7 @@ void set_prompt(int, Source *); void pprompt(const char *, int); int promptlen(const char *); /* main.c */ -int include(const char *, int, const char **, int); +int include(const char *, int, const char **, bool); int command(const char *, int); int shell(Source * volatile, volatile bool); /* argument MUST NOT be 0 */