inline only user of ksh_min, make it more cool; drop ksh_min, ksh_max;
move ksh_isdigit etc. to ksh_isalpha etc. definitions
This commit is contained in:
19
histrap.c
19
histrap.c
@@ -27,7 +27,7 @@
|
||||
#include <sys/file.h>
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.141 2015/04/19 18:50:36 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.142 2015/04/29 19:11:57 tg Exp $");
|
||||
|
||||
Trap sigtraps[NSIG + 1];
|
||||
static struct sigaction Sigact_ign;
|
||||
@@ -1234,16 +1234,17 @@ runtrap(Trap *p, bool is_last)
|
||||
p->set = 0;
|
||||
if (trapstr == NULL) {
|
||||
/* SIG_DFL */
|
||||
if (p->flags & TF_FATAL) {
|
||||
/* eg, SIGHUP */
|
||||
exstat = (int)ksh_min(128U + (unsigned)i, 255U);
|
||||
if (p->flags & (TF_FATAL | TF_DFL_INTR)) {
|
||||
exstat = (int)(128U + (unsigned)i);
|
||||
if ((unsigned)exstat > 255U)
|
||||
exstat = 255;
|
||||
}
|
||||
/* e.g. SIGHUP */
|
||||
if (p->flags & TF_FATAL)
|
||||
unwind(LLEAVE);
|
||||
}
|
||||
if (p->flags & TF_DFL_INTR) {
|
||||
/* eg, SIGINT, SIGQUIT, SIGTERM, etc. */
|
||||
exstat = (int)ksh_min(128U + (unsigned)i, 255U);
|
||||
/* e.g. SIGINT, SIGQUIT, SIGTERM, etc. */
|
||||
if (p->flags & TF_DFL_INTR)
|
||||
unwind(LINTR);
|
||||
}
|
||||
goto donetrap;
|
||||
}
|
||||
if (trapstr[0] == '\0')
|
||||
|
Reference in New Issue
Block a user