int → bool

This commit is contained in:
tg 2012-10-30 20:13:20 +00:00
parent faa0a78df3
commit 8caee45c60
4 changed files with 12 additions and 12 deletions

4
exec.c
View File

@ -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",

View File

@ -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);

12
main.c
View File

@ -34,7 +34,7 @@
#include <locale.h>
#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;

4
sh.h
View File

@ -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 */