int → bool

This commit is contained in:
tg 2010-08-28 15:39:20 +00:00
parent 1924f91aad
commit 475cafb90e
3 changed files with 9 additions and 9 deletions

6
exec.c
View File

@ -22,7 +22,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.75 2010/07/17 22:09:34 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.76 2010/08/28 15:39:18 tg Exp $");
#ifndef MKSH_DEFAULT_EXECSHELL
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
@ -1094,11 +1094,11 @@ call_builtin(struct tbl *tp, const char **wp)
builtin_argv0 = wp[0];
builtin_flag = tp->flag;
shf_reopen(1, SHF_WR, shl_stdout);
shl_stdout_ok = 1;
shl_stdout_ok = true;
ksh_getopt_reset(&builtin_opt, GF_ERROR);
rv = (*tp->val.f)(wp);
shf_flush(shl_stdout);
shl_stdout_ok = 0;
shl_stdout_ok = false;
builtin_flag = 0;
builtin_argv0 = NULL;
return (rv);

8
main.c
View File

@ -33,7 +33,7 @@
#include <locale.h>
#endif
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.167 2010/07/04 17:45:15 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.168 2010/08/28 15:39:19 tg Exp $");
extern char **environ;
@ -337,7 +337,7 @@ mksh_init(int argc, const char *argv[])
s->u.shf = shf_open(s->file, O_RDONLY, 0,
SHF_MAPHI | SHF_CLEXEC);
if (s->u.shf == NULL) {
shl_stdout_ok = 0;
shl_stdout_ok = false;
warningf(true, "%s: %s", s->file, strerror(errno));
/* mandated by SUSv4 */
exstat = 127;
@ -906,7 +906,7 @@ errorf(const char *fmt, ...)
{
va_list va;
shl_stdout_ok = 0; /* debugging: note that stdout not valid */
shl_stdout_ok = false; /* debugging: note that stdout not valid */
exstat = 1;
if (*fmt != 1) {
error_prefix(true);
@ -941,7 +941,7 @@ bi_errorf(const char *fmt, ...)
{
va_list va;
shl_stdout_ok = 0; /* debugging: note that stdout not valid */
shl_stdout_ok = false; /* debugging: note that stdout not valid */
exstat = 1;
if (*fmt != 1) {
error_prefix(true);

4
sh.h
View File

@ -150,7 +150,7 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.405 2010/08/24 15:19:54 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.406 2010/08/28 15:39:20 tg Exp $");
#endif
#define MKSH_VERSION "R39 2010/08/24"
@ -655,7 +655,7 @@ struct temp {
#define shl_spare (&shf_iob[0]) /* for c_read()/c_print() */
#define shl_stdout (&shf_iob[1])
#define shl_out (&shf_iob[2])
EXTERN int shl_stdout_ok;
EXTERN bool shl_stdout_ok;
/*
* trap handlers