From 4a7e4ba5cb8bfd267fee12a848bd3292580bcdfa Mon Sep 17 00:00:00 2001 From: herbert Date: Fri, 25 Mar 2005 23:39:14 +1100 Subject: Turn evalskip into a bit field. This allows SKIPEVAL and SKIPFUNC to coexist which is needed for eval return 1. --- ChangeLog | 1 + src/eval.c | 10 ++++------ src/eval.h | 10 +++++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1830be2..ca56f81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ * Cleaned up src/Makefile.am. * Get rid of duplicate -g -O2 in CFLAGS. * Eliminate first null termination in setvar. + * Turn evalskip into a bit field. 2005-03-25 Gilles Chanteperdrix diff --git a/src/eval.c b/src/eval.c index 7f00b21..793d4c9 100644 --- a/src/eval.c +++ b/src/eval.c @@ -324,8 +324,8 @@ out: dotrap(); if (flags & EV_EXIT) exraise(EXEXIT); - if ((checkexit & exitstatus) && evalskip != SKIPFILE) - evalskip = SKIPEVAL; + if ((checkexit & exitstatus)) + evalskip |= SKIPEVAL; } @@ -931,8 +931,7 @@ cmddone: commandname = savecmdname; exsig = 0; handler = savehandler; - if (evalskip == SKIPEVAL) - evalskip = 0; + evalskip &= ~SKIPEVAL; return i; } @@ -974,8 +973,7 @@ funcdone: shellparam = saveparam; handler = savehandler; INTON; - if (evalskip == SKIPFUNC) - evalskip = 0; + evalskip &= ~SKIPFUNC; return e; } diff --git a/src/eval.h b/src/eval.h index dc523e2..3d0a9a6 100644 --- a/src/eval.h +++ b/src/eval.h @@ -62,8 +62,8 @@ extern int funcnest; extern int evalskip; /* reasons for skipping commands (see comment on breakcmd routine) */ -#define SKIPBREAK 1 -#define SKIPCONT 2 -#define SKIPFUNC 3 -#define SKIPFILE 4 -#define SKIPEVAL 5 +#define SKIPBREAK (1 << 0) +#define SKIPCONT (1 << 1) +#define SKIPFUNC (1 << 2) +#define SKIPFILE (1 << 3) +#define SKIPEVAL (1 << 4) -- cgit 1.4.1 txt' type='search' size='10' name='q' value=''/>
Commit message (Expand)Author
2020-06-12Remove RPL_MOTDSTART handlerJune McEnroe
2020-06-08Add additional permission for linking with LibreSSLJune McEnroe
2020-05-22Perform all migrations in one transaction 1.3June McEnroe
2020-05-21Clean up unscoop manual pageJune McEnroe
2020-05-21Fix search expression appendJune McEnroe
2020-05-21Fix dbPrepare errx callJune McEnroe
2020-05-21Add only the necessary expressions to scoop's queryJune McEnroe
2020-05-21Explicitly set stdout line buffered when pagingJune McEnroe
2020-05-21Do not sort results in scoop by defaultJune McEnroe
2020-05-21Expand and clarify documentationJune McEnroe
2020-05-21Execute PAGER with the SHELLJune McEnroe
2020-05-21Automatically perform database migrations in litterboxJune McEnroe
2020-05-20Don't install rc scripts on other platformsJune McEnroe
2020-05-20Rewrite build and install like pounce 1.3June McEnroe
2020-05-20Update email addressesJune McEnroe
2020-04-23Call updateConsumer from handleError 1.2p1June McEnroe
2020-04-20Use . as ${LDLIBS.$@} separatorJune McEnroe
2020-04-05Error on invalid ISUPPORT values 1.2June McEnroe
2020-04-05Only set RCS on FreeBSDJune McEnroe
2020-04-05Log bans and unbansJune McEnroe
2020-04-05Parse mode types from ISUPPORTJune McEnroe
2020-04-05Add unscoop matchers for ban/unban eventsJune McEnroe
2020-04-05Check unscoop regexps with make testJune McEnroe
2020-04-05Add unscoop -n flag for checking regexpsJune McEnroe
2020-04-05Add Ban and Unban event typesJune McEnroe
2020-04-02Update styleJune McEnroe
2020-03-31Update unscoop catgirl matchersJune McEnroe
2020-03-31Fix writing verbose to stderrJune McEnroe
2020-03-02Include <>/-/* around nicks in scoop coloring 1.1June McEnroe
2020-03-02Replace .mk files with configure scriptJune McEnroe
2020-02-28Implement the causal.agency/consumer capabilityJune McEnroe
2020-02-22Include <>/-/* around nicks in coloringJune McEnroe
2020-02-22Use (almost) the full range of IRC colors for nicksJune McEnroe