more int→bool while trying to let ^D output CR+LF (which shan’t be, oh my…)
This commit is contained in:
parent
5780bc5eb7
commit
2d31aca859
4
funcs.c
4
funcs.c
@ -38,7 +38,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.214 2012/05/04 20:49:03 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.215 2012/05/04 21:15:32 tg Exp $");
|
||||
|
||||
#if HAVE_KILLPG
|
||||
/*
|
||||
@ -2295,7 +2295,7 @@ c_exitreturn(const char **wp)
|
||||
}
|
||||
|
||||
if (how == LEXIT && !really_exit && j_stopped_running()) {
|
||||
really_exit = 1;
|
||||
really_exit = true;
|
||||
how = LSHELL;
|
||||
}
|
||||
|
||||
|
16
main.c
16
main.c
@ -34,7 +34,7 @@
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.217 2012/05/04 20:49:05 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.218 2012/05/04 21:15:33 tg Exp $");
|
||||
|
||||
extern char **environ;
|
||||
|
||||
@ -739,19 +739,19 @@ command(const char *comm, int line)
|
||||
* run the commands from the input source, returning status.
|
||||
*/
|
||||
int
|
||||
shell(Source * volatile s, volatile int toplevel)
|
||||
shell(Source * volatile s, volatile bool toplevel)
|
||||
{
|
||||
struct op *t;
|
||||
volatile int wastty = s->flags & SF_TTY;
|
||||
volatile int attempts = 13;
|
||||
volatile int interactive = Flag(FTALKING) && toplevel;
|
||||
volatile bool wastty = tobool(s->flags & SF_TTY);
|
||||
volatile uint8_t attempts = 13;
|
||||
volatile bool interactive = Flag(FTALKING) && toplevel;
|
||||
volatile bool sfirst = true;
|
||||
Source *volatile old_source = source;
|
||||
int i;
|
||||
|
||||
newenv(E_PARSE);
|
||||
if (interactive)
|
||||
really_exit = 0;
|
||||
really_exit = false;
|
||||
switch ((i = kshsetjmp(e->jbuf))) {
|
||||
case 0:
|
||||
break;
|
||||
@ -816,7 +816,7 @@ shell(Source * volatile s, volatile int toplevel)
|
||||
s->type = SSTDIN;
|
||||
} else if (wastty && !really_exit &&
|
||||
j_stopped_running()) {
|
||||
really_exit = 1;
|
||||
really_exit = true;
|
||||
s->type = SSTDIN;
|
||||
} else {
|
||||
/*
|
||||
@ -834,7 +834,7 @@ shell(Source * volatile s, volatile int toplevel)
|
||||
exstat = execute(t, 0, NULL);
|
||||
|
||||
if (t != NULL && t->type != TEOF && interactive && really_exit)
|
||||
really_exit = 0;
|
||||
really_exit = false;
|
||||
|
||||
reclaim();
|
||||
}
|
||||
|
6
sh.h
6
sh.h
@ -152,7 +152,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef EXTERN
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.553 2012/05/04 20:49:07 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.554 2012/05/04 21:15:34 tg Exp $");
|
||||
#endif
|
||||
#define MKSH_VERSION "R40 2012/04/27"
|
||||
|
||||
@ -792,7 +792,7 @@ EXTERN unsigned int ksh_tmout;
|
||||
EXTERN enum tmout_enum ksh_tmout_state E_INIT(TMOUT_EXECUTING);
|
||||
|
||||
/* For "You have stopped jobs" message */
|
||||
EXTERN int really_exit;
|
||||
EXTERN bool really_exit;
|
||||
|
||||
/*
|
||||
* fast character classes
|
||||
@ -1706,7 +1706,7 @@ int promptlen(const char *);
|
||||
/* main.c */
|
||||
int include(const char *, int, const char **, int);
|
||||
int command(const char *, int);
|
||||
int shell(Source *volatile, int volatile);
|
||||
int shell(Source * volatile, volatile bool);
|
||||
void unwind(int) MKSH_A_NORETURN;
|
||||
void newenv(int);
|
||||
void quitenv(struct shf *);
|
||||
|
Loading…
Reference in New Issue
Block a user