int → bool
This commit is contained in:
parent
faa0a78df3
commit
8caee45c60
4
exec.c
4
exec.c
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#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
|
#ifndef MKSH_DEFAULT_EXECSHELL
|
||||||
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
|
#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));
|
strerror(tp->u2.errnov));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (include(tp->u.fpath, 0, NULL, 0) < 0) {
|
if (include(tp->u.fpath, 0, NULL, false) < 0) {
|
||||||
rv = errno;
|
rv = errno;
|
||||||
warningf(true, "%s: %s %s %s: %s", cp,
|
warningf(true, "%s: %s %s %s: %s", cp,
|
||||||
"can't open", "function definition file",
|
"can't open", "function definition file",
|
||||||
|
4
funcs.c
4
funcs.c
@ -38,7 +38,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#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
|
#if HAVE_KILLPG
|
||||||
/*
|
/*
|
||||||
@ -1741,7 +1741,7 @@ c_dot(const char **wp)
|
|||||||
argc = 0;
|
argc = 0;
|
||||||
argv = NULL;
|
argv = NULL;
|
||||||
}
|
}
|
||||||
if ((i = include(file, argc, argv, 0)) < 0) {
|
if ((i = include(file, argc, argv, false)) < 0) {
|
||||||
/* should not happen */
|
/* should not happen */
|
||||||
bi_errorf("%s: %s", cp, strerror(errno));
|
bi_errorf("%s: %s", cp, strerror(errno));
|
||||||
return (1);
|
return (1);
|
||||||
|
12
main.c
12
main.c
@ -34,7 +34,7 @@
|
|||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#endif
|
#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;
|
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");
|
warningf(false, "can't determine current directory");
|
||||||
|
|
||||||
if (Flag(FLOGIN)) {
|
if (Flag(FLOGIN)) {
|
||||||
include(MKSH_SYSTEM_PROFILE, 0, NULL, 1);
|
include(MKSH_SYSTEM_PROFILE, 0, NULL, true);
|
||||||
if (!Flag(FPRIVILEGED))
|
if (!Flag(FPRIVILEGED))
|
||||||
include(substitute("$HOME/.profile", 0), 0,
|
include(substitute("$HOME/.profile", 0), 0,
|
||||||
NULL, 1);
|
NULL, true);
|
||||||
}
|
}
|
||||||
if (Flag(FPRIVILEGED))
|
if (Flag(FPRIVILEGED))
|
||||||
include(MKSH_SUID_PROFILE, 0, NULL, 1);
|
include(MKSH_SUID_PROFILE, 0, NULL, true);
|
||||||
else if (Flag(FTALKING)) {
|
else if (Flag(FTALKING)) {
|
||||||
char *env_file;
|
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),
|
env_file = substitute(substitute("${ENV:-" MKSHRC_PATH "}", 0),
|
||||||
DOTILDE);
|
DOTILDE);
|
||||||
if (*env_file != '\0')
|
if (*env_file != '\0')
|
||||||
include(env_file, 0, NULL, 1);
|
include(env_file, 0, NULL, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (restricted) {
|
if (restricted) {
|
||||||
@ -675,7 +675,7 @@ main(int argc, const char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
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;
|
Source *volatile s = NULL;
|
||||||
struct shf *shf;
|
struct shf *shf;
|
||||||
|
4
sh.h
4
sh.h
@ -157,7 +157,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXTERN
|
#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
|
#endif
|
||||||
#define MKSH_VERSION "R40 2012/10/30"
|
#define MKSH_VERSION "R40 2012/10/30"
|
||||||
|
|
||||||
@ -1804,7 +1804,7 @@ void set_prompt(int, Source *);
|
|||||||
void pprompt(const char *, int);
|
void pprompt(const char *, int);
|
||||||
int promptlen(const char *);
|
int promptlen(const char *);
|
||||||
/* main.c */
|
/* main.c */
|
||||||
int include(const char *, int, const char **, int);
|
int include(const char *, int, const char **, bool);
|
||||||
int command(const char *, int);
|
int command(const char *, int);
|
||||||
int shell(Source * volatile, volatile bool);
|
int shell(Source * volatile, volatile bool);
|
||||||
/* argument MUST NOT be 0 */
|
/* argument MUST NOT be 0 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user