From 593a9183f019bfdecd1d7225b96867f5d563408d Mon Sep 17 00:00:00 2001 From: dogcow Date: Mon, 16 Jul 2007 02:26:50 +0000 Subject: [PATCH] Rename bool -> cshbool; despite the name, bool actually holds values other than 0 or 1. Fixes PR/36650. --- bin/csh/csh.c | 40 ++++++++++++++++++++-------------------- bin/csh/csh.h | 41 +++++++++++++++++++++-------------------- bin/csh/dir.c | 6 +++--- bin/csh/dol.c | 10 +++++----- bin/csh/exec.c | 16 ++++++++-------- bin/csh/exp.c | 46 +++++++++++++++++++++++----------------------- bin/csh/extern.h | 16 ++++++++-------- bin/csh/file.c | 6 +++--- bin/csh/func.c | 6 +++--- bin/csh/glob.c | 12 ++++++------ bin/csh/hist.c | 8 ++++---- bin/csh/lex.c | 32 ++++++++++++++++---------------- bin/csh/parse.c | 8 ++++---- bin/csh/proc.c | 10 +++++----- bin/csh/proc.h | 4 ++-- bin/csh/sem.c | 8 ++++---- bin/csh/set.c | 8 ++++---- 17 files changed, 139 insertions(+), 138 deletions(-) diff --git a/bin/csh/csh.c b/bin/csh/csh.c index e761bf1a1b6a..1413d7d05a5d 100644 --- a/bin/csh/csh.c +++ b/bin/csh/csh.c @@ -1,4 +1,4 @@ -/* $NetBSD: csh.c,v 1.37 2006/04/24 19:00:29 snj Exp $ */ +/* $NetBSD: csh.c,v 1.38 2007/07/16 02:26:50 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1991, 1993\n\ #if 0 static char sccsid[] = "@(#)csh.c 8.2 (Berkeley) 10/12/93"; #else -__RCSID("$NetBSD: csh.c,v 1.37 2006/04/24 19:00:29 snj Exp $"); +__RCSID("$NetBSD: csh.c,v 1.38 2007/07/16 02:26:50 dogcow Exp $"); #endif #endif /* not lint */ @@ -81,15 +81,15 @@ Char *dumphist[] = {STRhistory, STRmh, 0, 0}; Char *loadhist[] = {STRsource, STRmh, STRtildothist, 0}; int nofile = 0; -bool batch = 0; -bool enterhist = 0; -bool fast = 0; -bool mflag = 0; -bool nexececho = 0; -bool nverbose = 0; -bool prompt = 1; -bool quitit = 0; -bool reenter = 0; +cshbool batch = 0; +cshbool enterhist = 0; +cshbool fast = 0; +cshbool mflag = 0; +cshbool nexececho = 0; +cshbool nverbose = 0; +cshbool prompt = 1; +cshbool quitit = 0; +cshbool reenter = 0; extern char **environ; @@ -98,9 +98,9 @@ static fpos_t seekf(void *, fpos_t, int); static int writef(void *, const char *, int); static int closef(void *); static int srccat(Char *, Char *); -static int srcfile(const char *, bool, bool); +static int srcfile(const char *, cshbool, cshbool); static void phup(int); -static void srcunit(int, bool, bool); +static void srcunit(int, cshbool, cshbool); static void mailchk(void); #ifndef _PATH_DEFPATH static Char **defaultpath(void); @@ -645,7 +645,7 @@ srccat(Char *cp, Char *dp) * Source to a file putting the file descriptor in a safe place (> 2). */ static int -srcfile(const char *f, bool onlyown, bool flag) +srcfile(const char *f, cshbool onlyown, cshbool flag) { int unit; @@ -665,7 +665,7 @@ srcfile(const char *f, bool onlyown, bool flag) int insource; static void -srcunit(int unit, bool onlyown, bool hflg) +srcunit(int unit, cshbool onlyown, cshbool hflg) { /* We have to push down a lot of state here */ /* All this could go into a structure */ @@ -676,7 +676,7 @@ srcunit(int unit, bool onlyown, bool hflg) Char *oarginp, *oevalp, **oevalvec, *ogointr; char OHIST; int oSHIN, oinsource, oldintty, oonelflg; - bool oenterhist, otell; + cshbool oenterhist, otell; /* The (few) real local variables */ int my_reenter; @@ -924,7 +924,7 @@ pintr(int notused) } void -pintr1(bool wantnl) +pintr1(cshbool wantnl) { Char **v; sigset_t nsigset, osigset; @@ -986,7 +986,7 @@ pintr1(bool wantnl) static struct command *savet = NULL; void -process(bool catch) +process(cshbool catch) { struct command *t; jmp_buf osetexit; @@ -1129,7 +1129,7 @@ void dosource(Char **v, struct command *t) { Char buf[BUFSIZE], *f; - bool hflg; + cshbool hflg; hflg = 0; v++; @@ -1163,7 +1163,7 @@ mailchk(void) Char **vp; time_t t; int cnt, intvl; - bool new; + cshbool new; v = adrof(STRmail); if (v == 0) diff --git a/bin/csh/csh.h b/bin/csh/csh.h index c887977c6c42..093d890c0d40 100644 --- a/bin/csh/csh.h +++ b/bin/csh/csh.h @@ -1,4 +1,4 @@ -/* $NetBSD: csh.h,v 1.18 2007/07/10 00:30:23 dogcow Exp $ */ +/* $NetBSD: csh.h,v 1.19 2007/07/16 02:26:51 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -92,11 +92,12 @@ typedef void *ptr_t; #define xfree(p) Free(p) #include -#include FILE *cshin, *cshout, *csherr; #define isdir(d) (S_ISDIR(d.st_mode)) +typedef int cshbool; /* necessary because it holds values other than 0 or 1 */ + #define eq(a, b) (Strcmp(a, b) == 0) /* globone() flags */ @@ -107,25 +108,25 @@ FILE *cshin, *cshout, *csherr; /* * Global flags */ -bool child; /* Child shell ... errors cause exit */ -bool chkstop; /* Warned of stopped jobs... allow exit */ -bool didfds; /* Have setup i/o fd's for child */ -bool doneinp; /* EOF indicator after reset from readc */ -bool exiterr; /* Exit if error or non-zero exit status */ -bool haderr; /* Reset was because of an error */ -bool havhash; /* path hashing is available */ -bool intact; /* We are interactive... therefore prompt */ -bool intty; /* Input is a tty */ -bool justpr; /* Just print because of :p hist mod */ -bool loginsh; /* We are a loginsh -> .login/.logout */ -bool neednote; /* Need to pnotify() */ -bool noexec; /* Don't execute, just syntax check */ -bool pjobs; /* want to print jobs if interrupted */ -bool setintr; /* Set interrupts on/off -> Wait intr... */ -bool timflg; /* Time the next waited for command */ +cshbool child; /* Child shell ... errors cause exit */ +cshbool chkstop; /* Warned of stopped jobs... allow exit */ +cshbool didfds; /* Have setup i/o fd's for child */ +cshbool doneinp; /* EOF indicator after reset from readc */ +cshbool exiterr; /* Exit if error or non-zero exit status */ +cshbool haderr; /* Reset was because of an error */ +cshbool havhash; /* path hashing is available */ +cshbool intact; /* We are interactive... therefore prompt */ +cshbool intty; /* Input is a tty */ +cshbool justpr; /* Just print because of :p hist mod */ +cshbool loginsh; /* We are a loginsh -> .login/.logout */ +cshbool neednote; /* Need to pnotify() */ +cshbool noexec; /* Don't execute, just syntax check */ +cshbool pjobs; /* want to print jobs if interrupted */ +cshbool setintr; /* Set interrupts on/off -> Wait intr... */ +cshbool timflg; /* Time the next waited for command */ #ifdef FILEC -extern bool filec; /* doing filename expansion */ +extern cshbool filec; /* doing filename expansion */ #endif /* @@ -266,7 +267,7 @@ extern int aret; /* What was the last character returned */ */ struct Ain lineloc; -bool cantell; /* Is current source tellable ? */ +cshbool cantell; /* Is current source tellable ? */ /* * Input lines are parsed into doubly linked circular diff --git a/bin/csh/dir.c b/bin/csh/dir.c index faa1a509fb7c..fff5540604cf 100644 --- a/bin/csh/dir.c +++ b/bin/csh/dir.c @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.26 2006/04/05 23:10:16 christos Exp $ */ +/* $NetBSD: dir.c,v 1.27 2007/07/16 02:26:51 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)dir.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: dir.c,v 1.26 2006/04/05 23:10:16 christos Exp $"); +__RCSID("$NetBSD: dir.c,v 1.27 2007/07/16 02:26:51 dogcow Exp $"); #endif #endif /* not lint */ @@ -614,7 +614,7 @@ dcanon(Char *cp, Char *p) Char *newcp, *sp; Char *p1, *p2; /* general purpose */ int cc; - bool slash; + cshbool slash; /* * christos: if the path given does not start with a slash prepend cwd. If diff --git a/bin/csh/dol.c b/bin/csh/dol.c index 8dcec3765ec5..61083ab6c8e8 100644 --- a/bin/csh/dol.c +++ b/bin/csh/dol.c @@ -1,4 +1,4 @@ -/* $NetBSD: dol.c,v 1.23 2006/03/18 07:09:08 christos Exp $ */ +/* $NetBSD: dol.c,v 1.24 2007/07/16 02:26:51 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)dol.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: dol.c,v 1.23 2006/03/18 07:09:08 christos Exp $"); +__RCSID("$NetBSD: dol.c,v 1.24 2007/07/16 02:26:51 dogcow Exp $"); #endif #endif /* not lint */ @@ -213,7 +213,7 @@ Dword(void) { Char wbuf[BUFSIZE], *wp; int c, c1, i; - bool dolflg, done, sofar; + cshbool dolflg, done, sofar; done = 0; i = MAXWLEN; @@ -389,7 +389,7 @@ Dgetdol(void) struct varent *vp; Char *np; int c, lwb, sc, subscr, upb; - bool dimen, bitset; + cshbool dimen, bitset; char tnp; bitset = 0; @@ -819,7 +819,7 @@ heredoc(Char *term) Char *Dv[2], *lbp, *obp, *mbp, **vp; char *tmp; int c, ocnt, lcnt, mcnt; - bool quoted; + cshbool quoted; again: tmp = short2str(shtemp); diff --git a/bin/csh/exec.c b/bin/csh/exec.c index 09c1e47fd22b..469bfd40be27 100644 --- a/bin/csh/exec.c +++ b/bin/csh/exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: exec.c,v 1.23 2006/05/13 21:22:32 christos Exp $ */ +/* $NetBSD: exec.c,v 1.24 2007/07/16 02:26:51 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)exec.c 8.3 (Berkeley) 5/23/95"; #else -__RCSID("$NetBSD: exec.c,v 1.23 2006/05/13 21:22:32 christos Exp $"); +__RCSID("$NetBSD: exec.c,v 1.24 2007/07/16 02:26:51 dogcow Exp $"); #endif #endif /* not lint */ @@ -101,7 +101,7 @@ static void pexerr(void) __attribute__((noreturn)); static void texec(Char *, Char **); static int hashname(Char *); static int tellmewhat(struct wordent *, Char *); -static int executable(Char *, Char *, bool); +static int executable(Char *, Char *, cshbool); static int iscommand(Char *); void @@ -112,7 +112,7 @@ doexec(Char **v, struct command *t) Char *blk[2], **av, *dp, **pv, *sav; int i, hashval, hashval1; sigset_t nsigset; - bool slash; + cshbool slash; hashval = 0; /* @@ -506,7 +506,7 @@ iscommand(Char *name) struct varent *v; Char **pv, *sav; int hashval, hashval1, i; - bool slash; + cshbool slash; hashval = 0; slash = any(short2str(name), '/'); @@ -563,7 +563,7 @@ cont: * This is a bit kludgy, but in the name of optimization... */ static int -executable(Char *dir, Char *name, bool dir_ok) +executable(Char *dir, Char *name, cshbool dir_ok) { struct stat stbuf; Char path[MAXPATHLEN + 1], *dp, *sp; @@ -638,7 +638,7 @@ tellmewhat(struct wordent *lexp, Char *str) struct wordent *sp; Char *cmd, *s0, *s1, *s2; int i; - bool aliased, found; + cshbool aliased, found; Char qc; aliased = 0; @@ -697,7 +697,7 @@ tellmewhat(struct wordent *lexp, Char *str) if ((i = iscommand(sp->word)) != 0) { Char **pv; struct varent *v; - bool slash = any(short2str(sp->word), '/'); + cshbool slash = any(short2str(sp->word), '/'); v = adrof(STRpath); if (v == 0 || v->vec[0] == 0 || slash) diff --git a/bin/csh/exp.c b/bin/csh/exp.c index dca718be831f..a2c3a67eb5bd 100644 --- a/bin/csh/exp.c +++ b/bin/csh/exp.c @@ -1,4 +1,4 @@ -/* $NetBSD: exp.c,v 1.16 2006/05/13 21:18:57 christos Exp $ */ +/* $NetBSD: exp.c,v 1.17 2007/07/16 02:26:51 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)exp.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: exp.c,v 1.16 2006/05/13 21:18:57 christos Exp $"); +__RCSID("$NetBSD: exp.c,v 1.17 2007/07/16 02:26:51 dogcow Exp $"); #endif #endif /* not lint */ @@ -69,16 +69,16 @@ __RCSID("$NetBSD: exp.c,v 1.16 2006/05/13 21:18:57 christos Exp $"); #define EQMATCH 7 #define NOTEQMATCH 8 -static int exp1(Char ***, bool); -static int csh_exp2(Char ***, bool); -static int exp2a(Char ***, bool); -static int exp2b(Char ***, bool); -static int exp2c(Char ***, bool); -static Char *exp3(Char ***, bool); -static Char *exp3a(Char ***, bool); -static Char *exp4(Char ***, bool); -static Char *exp5(Char ***, bool); -static Char *exp6(Char ***, bool); +static int exp1(Char ***, cshbool); +static int csh_exp2(Char ***, cshbool); +static int exp2a(Char ***, cshbool); +static int exp2b(Char ***, cshbool); +static int exp2c(Char ***, cshbool); +static Char *exp3(Char ***, cshbool); +static Char *exp3a(Char ***, cshbool); +static Char *exp4(Char ***, cshbool); +static Char *exp5(Char ***, cshbool); +static Char *exp6(Char ***, cshbool); static void evalav(Char **); static int isa(Char *, int); static int egetn(Char *); @@ -95,7 +95,7 @@ expr(Char ***vp) } int -exp0(Char ***vp, bool ignore) +exp0(Char ***vp, cshbool ignore) { int p1; @@ -117,7 +117,7 @@ exp0(Char ***vp, bool ignore) } static int -exp1(Char ***vp, bool ignore) +exp1(Char ***vp, cshbool ignore) { int p1; @@ -139,7 +139,7 @@ exp1(Char ***vp, bool ignore) } static int -csh_exp2(Char ***vp, bool ignore) +csh_exp2(Char ***vp, cshbool ignore) { int p1; @@ -161,7 +161,7 @@ csh_exp2(Char ***vp, bool ignore) } static int -exp2a(Char ***vp, bool ignore) +exp2a(Char ***vp, cshbool ignore) { int p1; @@ -183,7 +183,7 @@ exp2a(Char ***vp, bool ignore) } static int -exp2b(Char ***vp, bool ignore) +exp2b(Char ***vp, cshbool ignore) { int p1; @@ -205,7 +205,7 @@ exp2b(Char ***vp, bool ignore) } static int -exp2c(Char ***vp, bool ignore) +exp2c(Char ***vp, cshbool ignore) { Char *p1, *p2; int i; @@ -247,7 +247,7 @@ exp2c(Char ***vp, bool ignore) } static Char * -exp3(Char ***vp, bool ignore) +exp3(Char ***vp, cshbool ignore) { Char *p1, *p2; int i; @@ -287,7 +287,7 @@ exp3(Char ***vp, bool ignore) } static Char * -exp3a(Char ***vp, bool ignore) +exp3a(Char ***vp, cshbool ignore) { Char *op, *p1, *p2; int i; @@ -315,7 +315,7 @@ exp3a(Char ***vp, bool ignore) } static Char * -exp4(Char ***vp, bool ignore) +exp4(Char ***vp, cshbool ignore) { Char *p1, *p2; int i; @@ -350,7 +350,7 @@ exp4(Char ***vp, bool ignore) } static Char * -exp5(Char ***vp, bool ignore) +exp5(Char ***vp, cshbool ignore) { Char *p1, *p2; int i; @@ -394,7 +394,7 @@ exp5(Char ***vp, bool ignore) } static Char * -exp6(Char ***vp, bool ignore) +exp6(Char ***vp, cshbool ignore) { Char *cp, *dp, *ep; int ccode, i; diff --git a/bin/csh/extern.h b/bin/csh/extern.h index 07d7a73e8456..03ca3bf9cc8d 100644 --- a/bin/csh/extern.h +++ b/bin/csh/extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.18 2007/02/24 21:29:13 matt Exp $ */ +/* $NetBSD: extern.h,v 1.19 2007/07/16 02:26:51 dogcow Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -46,9 +46,9 @@ void goodbye(void); void importpath(Char *); void initdesc(void); void pintr(int); -void pintr1(bool) __attribute__((noreturn)); +void pintr1(cshbool) __attribute__((noreturn)); void printprompt(void); -void process(bool); +void process(cshbool); void rechist(void); void untty(void); int vis_fputc(int, FILE *); @@ -102,7 +102,7 @@ void xechoit(Char **); * exp.c */ int expr(Char ***); -int exp0(Char ***, bool); +int exp0(Char ***, cshbool); /* * file.c @@ -154,7 +154,7 @@ void wfree(void); /* * glob.c */ -Char **dobackp(Char *, bool); +Char **dobackp(Char *, cshbool); void Gcat(Char *, Char *); Char *globone(Char *, int); int Gmatch(Char *, Char *); @@ -171,7 +171,7 @@ int sortscmp(const ptr_t, const ptr_t); * hist.c */ void dohist(Char **, struct command *); -struct Hist *enthist(int, struct wordent *, bool); +struct Hist *enthist(int, struct wordent *, cshbool); void savehist(struct wordent *); /* @@ -186,7 +186,7 @@ Char *domod(Char *, int); void freelex(struct wordent *); int lex(struct wordent *); void prlex(FILE *, struct wordent *); -int readc(bool); +int readc(cshbool); void settell(void); void unreadc(int); @@ -245,7 +245,7 @@ void donotify(Char **, struct command *); void dostop(Char **, struct command *); void dowait(Char **, struct command *); void palloc(int, struct command *); -void panystop(bool); +void panystop(cshbool); void pchild(int); void pendjob(void); struct process *pfind(Char *); diff --git a/bin/csh/file.c b/bin/csh/file.c index 5e010b8bbb37..a0d899b99186 100644 --- a/bin/csh/file.c +++ b/bin/csh/file.c @@ -1,4 +1,4 @@ -/* $NetBSD: file.c,v 1.24 2006/04/24 19:00:29 snj Exp $ */ +/* $NetBSD: file.c,v 1.25 2007/07/16 02:26:51 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)file.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: file.c,v 1.24 2006/04/24 19:00:29 snj Exp $"); +__RCSID("$NetBSD: file.c,v 1.25 2007/07/16 02:26:51 dogcow Exp $"); #endif #endif /* not lint */ @@ -106,7 +106,7 @@ static int ignored(Char *); * completion by default. Filec controls completion, nobeep controls * ringing the terminal bell on incomplete expansions. */ -bool filec = 0; +cshbool filec = 0; static void setup_tty(int on) diff --git a/bin/csh/func.c b/bin/csh/func.c index ac1a652dd1ad..40213a53cb4b 100644 --- a/bin/csh/func.c +++ b/bin/csh/func.c @@ -1,4 +1,4 @@ -/* $NetBSD: func.c,v 1.32 2007/04/29 20:23:34 msaitoh Exp $ */ +/* $NetBSD: func.c,v 1.33 2007/07/16 02:26:51 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)func.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: func.c,v 1.32 2007/04/29 20:23:34 msaitoh Exp $"); +__RCSID("$NetBSD: func.c,v 1.33 2007/07/16 02:26:51 dogcow Exp $"); #endif #endif /* not lint */ @@ -433,7 +433,7 @@ void dowhile(Char **v, struct command *t) { int status; - bool again; + cshbool again; again = whyles != 0 && SEEKEQ(&whyles->w_start, &lineloc) && whyles->w_fename == 0; diff --git a/bin/csh/glob.c b/bin/csh/glob.c index 13efb4d24f4b..460054fb5278 100644 --- a/bin/csh/glob.c +++ b/bin/csh/glob.c @@ -1,4 +1,4 @@ -/* $NetBSD: glob.c,v 1.22 2003/08/07 09:05:06 agc Exp $ */ +/* $NetBSD: glob.c,v 1.23 2007/07/16 02:26:52 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)glob.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: glob.c,v 1.22 2003/08/07 09:05:06 agc Exp $"); +__RCSID("$NetBSD: glob.c,v 1.23 2007/07/16 02:26:52 dogcow Exp $"); #endif #endif /* not lint */ @@ -91,7 +91,7 @@ static void expbrace(Char ***, Char ***, int); static int pmatch(Char *, Char *); static void pword(void); static void psave(int); -static void backeval(Char *, bool); +static void backeval(Char *, cshbool); static Char * globtilde(Char **nv, Char *s) @@ -583,7 +583,7 @@ tglob(Char **t) * words only at newlines. */ Char ** -dobackp(Char *cp, bool literal) +dobackp(Char *cp, cshbool literal) { Char word[MAXPATHLEN], *ep, *lp, *rp; @@ -627,13 +627,13 @@ dobackp(Char *cp, bool literal) } static void -backeval(Char *cp, bool literal) +backeval(Char *cp, cshbool literal) { struct command faket; char tibuf[BUFSIZE]; Char ibuf[BUFSIZE], *fakecom[2], *ip; int pvec[2], c, icnt, quoted; - bool hadnl; + cshbool hadnl; hadnl = 0; icnt = 0; diff --git a/bin/csh/hist.c b/bin/csh/hist.c index ed4cc68f82a6..6a9d547720c3 100644 --- a/bin/csh/hist.c +++ b/bin/csh/hist.c @@ -1,4 +1,4 @@ -/* $NetBSD: hist.c,v 1.15 2003/08/07 09:05:06 agc Exp $ */ +/* $NetBSD: hist.c,v 1.16 2007/07/16 02:26:52 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)hist.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: hist.c,v 1.15 2003/08/07 09:05:06 agc Exp $"); +__RCSID("$NetBSD: hist.c,v 1.16 2007/07/16 02:26:52 dogcow Exp $"); #endif #endif /* not lint */ @@ -83,7 +83,7 @@ savehist(struct wordent *sp) } struct Hist * -enthist(int event, struct wordent *lp, bool docopy) +enthist(int event, struct wordent *lp, cshbool docopy) { struct Hist *np; @@ -156,7 +156,7 @@ dohist(Char **v, struct command *t) static void dohist1(struct Hist *hp, int *np, int rflg, int hflg) { - bool print; + cshbool print; print = (*np) > 0; diff --git a/bin/csh/lex.c b/bin/csh/lex.c index 96721a5cee60..74e966ee7ba7 100644 --- a/bin/csh/lex.c +++ b/bin/csh/lex.c @@ -1,4 +1,4 @@ -/* $NetBSD: lex.c,v 1.23 2006/03/17 22:24:28 christos Exp $ */ +/* $NetBSD: lex.c,v 1.24 2007/07/16 02:26:52 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)lex.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: lex.c,v 1.23 2006/03/17 22:24:28 christos Exp $"); +__RCSID("$NetBSD: lex.c,v 1.24 2007/07/16 02:26:52 dogcow Exp $"); #endif #endif /* not lint */ @@ -61,7 +61,7 @@ static Char *word(void); static int getC1(int); static void getdol(void); static void getexcl(int); -static struct Hist *findev(Char *, bool); +static struct Hist *findev(Char *, cshbool); static void setexclp(Char *); static int bgetc(void); static void bfree(void); @@ -69,8 +69,8 @@ static struct wordent *gethent(int); static int matchs(Char *, Char *); static int getsel(int *, int *, int); static struct wordent *getsub(struct wordent *); -static Char *subword(Char *, int, bool *); -static struct wordent *dosub(int, struct wordent *, bool); +static Char *subword(Char *, int, cshbool *); +static struct wordent *dosub(int, struct wordent *, cshbool); /* * Peekc is a peek character for getC, peekread for readc. @@ -121,7 +121,7 @@ static Char labuf[BUFSIZE]; * when called by the alias routine to determine whether to keep the * argument list. */ -static bool hadhist = 0; +static cshbool hadhist = 0; /* * Avoid alias expansion recursion via \!# @@ -229,7 +229,7 @@ word(void) Char wbuf[BUFSIZE], *wp; int i; Char c, c1; - bool dolflg; + cshbool dolflg; wp = wbuf; i = BUFSIZE - 4; @@ -406,7 +406,7 @@ getdol(void) { Char name[4*MAXVARLEN+1], *ep, *np; int c, sc; - bool special, toolong; + cshbool special, toolong; special = 0; np = name, *np++ = '$'; @@ -710,7 +710,7 @@ getsub(struct wordent *en) Char orhsb[sizeof(rhsb) / sizeof(Char)]; Char *cp; int c, delim, sc; - bool global; + cshbool global; do { exclnxt = 0; @@ -835,11 +835,11 @@ getsub(struct wordent *en) } static struct wordent * -dosub(int sc, struct wordent *en, bool global) +dosub(int sc, struct wordent *en, cshbool global) { struct wordent lexi, *hp, *wdp; int i; - bool didone, didsub; + cshbool didone, didsub; didone = 0; didsub = 0; @@ -888,7 +888,7 @@ dosub(int sc, struct wordent *en, bool global) } static Char * -subword(Char *cp, int type, bool *adid) +subword(Char *cp, int type, cshbool *adid) { Char wbuf[BUFSIZE]; Char *mp, *np, *wp; @@ -1009,7 +1009,7 @@ static int getsel(int *al, int *ar, int dol) { int c, i; - bool first; + cshbool first; c = getC(0); first = *al < 0; @@ -1092,7 +1092,7 @@ gethent(int sc) Char *np; char *str; int c, event; - bool back; + cshbool back; back = 0; c = sc == HISTSUB ? HIST : getC(0); @@ -1201,7 +1201,7 @@ gethent(int sc) } static struct Hist * -findev(Char *cp, bool anyarg) +findev(Char *cp, cshbool anyarg) { struct Hist *hp; @@ -1267,7 +1267,7 @@ unreadc(int c) } int -readc(bool wanteof) +readc(cshbool wanteof) { static int sincereal; int c; diff --git a/bin/csh/parse.c b/bin/csh/parse.c index 629999cb9249..b55337788484 100644 --- a/bin/csh/parse.c +++ b/bin/csh/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.14 2003/08/07 09:05:06 agc Exp $ */ +/* $NetBSD: parse.c,v 1.15 2007/07/16 02:26:52 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)parse.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: parse.c,v 1.14 2003/08/07 09:05:06 agc Exp $"); +__RCSID("$NetBSD: parse.c,v 1.15 2007/07/16 02:26:52 dogcow Exp $"); #endif #endif /* not lint */ @@ -140,7 +140,7 @@ asyn3(struct wordent *p1, struct wordent *p2) { struct varent *ap; struct wordent alout; - bool redid; + cshbool redid; if (p1 == p2) return; @@ -450,7 +450,7 @@ syn3(struct wordent *p1, struct wordent *p2, int flags) struct command *t; Char **av; int c, l, n; - bool specp; + cshbool specp; specp = 0; if (p1 != p2) { diff --git a/bin/csh/proc.c b/bin/csh/proc.c index b7dcd11454e7..a1b06749dce7 100644 --- a/bin/csh/proc.c +++ b/bin/csh/proc.c @@ -1,4 +1,4 @@ -/* $NetBSD: proc.c,v 1.31 2007/07/10 00:30:24 dogcow Exp $ */ +/* $NetBSD: proc.c,v 1.32 2007/07/16 02:26:52 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)proc.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: proc.c,v 1.31 2007/07/10 00:30:24 dogcow Exp $"); +__RCSID("$NetBSD: proc.c,v 1.32 2007/07/16 02:26:52 dogcow Exp $"); #endif #endif /* not lint */ @@ -642,7 +642,7 @@ pprint(struct process *pp, int flag) struct process *tp; const char *format; int jobflags, pstatus, reason, status; - bool hadnl; + cshbool hadnl; hadnl = 1; /* did we just have a newline */ (void)fpurge(cshout); @@ -1115,7 +1115,7 @@ pstart(struct process *pp, int foregnd) } void -panystop(bool neednl) +panystop(cshbool neednl) { struct process *pp; @@ -1224,7 +1224,7 @@ pfork(struct command *t /* command we are forking for */, int wanttty) { int pgrp, pid; sigset_t osigset, nsigset; - bool ignint; + cshbool ignint; ignint = 0; /* diff --git a/bin/csh/proc.h b/bin/csh/proc.h index f7adcee313ee..adba1961eb64 100644 --- a/bin/csh/proc.h +++ b/bin/csh/proc.h @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.9 2003/08/07 09:05:07 agc Exp $ */ +/* $NetBSD: proc.h,v 1.10 2007/07/16 02:26:52 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -91,7 +91,7 @@ struct process { #define AREASON 0200 struct process proclist; /* list head of all processes */ -bool pnoprocesses; /* pchild found nothing to wait for */ +cshbool pnoprocesses; /* pchild found nothing to wait for */ struct process *pholdjob; /* one level stack of current jobs */ diff --git a/bin/csh/sem.c b/bin/csh/sem.c index d1db6cb55566..d03280446e56 100644 --- a/bin/csh/sem.c +++ b/bin/csh/sem.c @@ -1,4 +1,4 @@ -/* $NetBSD: sem.c,v 1.25 2006/10/15 23:57:21 christos Exp $ */ +/* $NetBSD: sem.c,v 1.26 2007/07/16 02:26:53 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)sem.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: sem.c,v 1.25 2006/10/15 23:57:21 christos Exp $"); +__RCSID("$NetBSD: sem.c,v 1.26 2007/07/16 02:26:53 dogcow Exp $"); #endif #endif /* not lint */ @@ -67,7 +67,7 @@ execute(struct command *t, int wtty, int *pipein, int *pipeout) struct biltins * volatile bifunc; int pv[2], pid; sigset_t nsigset; - bool forked; + cshbool forked; UNREGISTER(forked); UNREGISTER(bifunc); @@ -291,7 +291,7 @@ execute(struct command *t, int wtty, int *pipein, int *pipeout) else { /* child */ /* this is from pfork() */ int pgrp; - bool ignint = 0; + cshbool ignint = 0; if (nosigchld) { (void)sigprocmask(SIG_SETMASK, &csigset, NULL); diff --git a/bin/csh/set.c b/bin/csh/set.c index d442eb9e7134..3b221949ccf4 100644 --- a/bin/csh/set.c +++ b/bin/csh/set.c @@ -1,4 +1,4 @@ -/* $NetBSD: set.c,v 1.26 2007/04/29 20:23:34 msaitoh Exp $ */ +/* $NetBSD: set.c,v 1.27 2007/07/16 02:26:53 dogcow Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)set.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: set.c,v 1.26 2007/04/29 20:23:34 msaitoh Exp $"); +__RCSID("$NetBSD: set.c,v 1.27 2007/07/16 02:26:53 dogcow Exp $"); #endif #endif /* not lint */ @@ -71,7 +71,7 @@ doset(Char **v, struct command *t) { Char op, *p, **vecp, *vp; int subscr = 0; /* XXX: GCC */ - bool hadsub; + cshbool hadsub; v++; p = *v++; @@ -218,7 +218,7 @@ dolet(Char **v, struct command *t) { Char c, op, *p, *vp; int subscr = 0; /* XXX: GCC */ - bool hadsub; + cshbool hadsub; v++; p = *v++;