PR/36650: Michael van Elst: Get rid of bool, because csh uses bool as a small
int.
This commit is contained in:
parent
e39a74728c
commit
ec01a4a425
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: csh.c,v 1.38 2007/07/16 02:26:50 dogcow Exp $ */
|
||||
/* $NetBSD: csh.c,v 1.39 2007/07/16 14:07:00 christos 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.38 2007/07/16 02:26:50 dogcow Exp $");
|
||||
__RCSID("$NetBSD: csh.c,v 1.39 2007/07/16 14:07:00 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -81,15 +81,15 @@ Char *dumphist[] = {STRhistory, STRmh, 0, 0};
|
||||
Char *loadhist[] = {STRsource, STRmh, STRtildothist, 0};
|
||||
|
||||
int nofile = 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;
|
||||
cshint batch = 0;
|
||||
cshint enterhist = 0;
|
||||
cshint fast = 0;
|
||||
cshint mflag = 0;
|
||||
cshint nexececho = 0;
|
||||
cshint nverbose = 0;
|
||||
cshint prompt = 1;
|
||||
cshint quitit = 0;
|
||||
cshint 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 *, cshbool, cshbool);
|
||||
static int srcfile(const char *, cshint, cshint);
|
||||
static void phup(int);
|
||||
static void srcunit(int, cshbool, cshbool);
|
||||
static void srcunit(int, cshint, cshint);
|
||||
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, cshbool onlyown, cshbool flag)
|
||||
srcfile(const char *f, cshint onlyown, cshint flag)
|
||||
{
|
||||
int unit;
|
||||
|
||||
@ -665,7 +665,7 @@ srcfile(const char *f, cshbool onlyown, cshbool flag)
|
||||
int insource;
|
||||
|
||||
static void
|
||||
srcunit(int unit, cshbool onlyown, cshbool hflg)
|
||||
srcunit(int unit, cshint onlyown, cshint 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, cshbool onlyown, cshbool hflg)
|
||||
Char *oarginp, *oevalp, **oevalvec, *ogointr;
|
||||
char OHIST;
|
||||
int oSHIN, oinsource, oldintty, oonelflg;
|
||||
cshbool oenterhist, otell;
|
||||
cshint oenterhist, otell;
|
||||
/* The (few) real local variables */
|
||||
int my_reenter;
|
||||
|
||||
@ -924,7 +924,7 @@ pintr(int notused)
|
||||
}
|
||||
|
||||
void
|
||||
pintr1(cshbool wantnl)
|
||||
pintr1(cshint wantnl)
|
||||
{
|
||||
Char **v;
|
||||
sigset_t nsigset, osigset;
|
||||
@ -986,7 +986,7 @@ pintr1(cshbool wantnl)
|
||||
static struct command *savet = NULL;
|
||||
|
||||
void
|
||||
process(cshbool catch)
|
||||
process(cshint catch)
|
||||
{
|
||||
struct command *t;
|
||||
jmp_buf osetexit;
|
||||
@ -1129,7 +1129,7 @@ void
|
||||
dosource(Char **v, struct command *t)
|
||||
{
|
||||
Char buf[BUFSIZE], *f;
|
||||
cshbool hflg;
|
||||
cshint hflg;
|
||||
|
||||
hflg = 0;
|
||||
v++;
|
||||
@ -1163,7 +1163,7 @@ mailchk(void)
|
||||
Char **vp;
|
||||
time_t t;
|
||||
int cnt, intvl;
|
||||
cshbool new;
|
||||
cshint new;
|
||||
|
||||
v = adrof(STRmail);
|
||||
if (v == 0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: csh.h,v 1.19 2007/07/16 02:26:51 dogcow Exp $ */
|
||||
/* $NetBSD: csh.h,v 1.20 2007/07/16 14:07:00 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1991, 1993
|
||||
@ -96,7 +96,7 @@ 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 */
|
||||
typedef int cshint; /* necessary because it holds values other than 0 or 1 */
|
||||
|
||||
#define eq(a, b) (Strcmp(a, b) == 0)
|
||||
|
||||
@ -108,25 +108,25 @@ typedef int cshbool; /* necessary because it holds values other than 0 or 1 */
|
||||
/*
|
||||
* Global flags
|
||||
*/
|
||||
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 */
|
||||
cshint child; /* Child shell ... errors cause exit */
|
||||
cshint chkstop; /* Warned of stopped jobs... allow exit */
|
||||
cshint didfds; /* Have setup i/o fd's for child */
|
||||
cshint doneinp; /* EOF indicator after reset from readc */
|
||||
cshint exiterr; /* Exit if error or non-zero exit status */
|
||||
cshint haderr; /* Reset was because of an error */
|
||||
cshint havhash; /* path hashing is available */
|
||||
cshint intact; /* We are interactive... therefore prompt */
|
||||
cshint intty; /* Input is a tty */
|
||||
cshint justpr; /* Just print because of :p hist mod */
|
||||
cshint loginsh; /* We are a loginsh -> .login/.logout */
|
||||
cshint neednote; /* Need to pnotify() */
|
||||
cshint noexec; /* Don't execute, just syntax check */
|
||||
cshint pjobs; /* want to print jobs if interrupted */
|
||||
cshint setintr; /* Set interrupts on/off -> Wait intr... */
|
||||
cshint timflg; /* Time the next waited for command */
|
||||
|
||||
#ifdef FILEC
|
||||
extern cshbool filec; /* doing filename expansion */
|
||||
extern cshint filec; /* doing filename expansion */
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -267,7 +267,7 @@ extern int aret; /* What was the last character returned */
|
||||
*/
|
||||
struct Ain lineloc;
|
||||
|
||||
cshbool cantell; /* Is current source tellable ? */
|
||||
cshint cantell; /* Is current source tellable ? */
|
||||
|
||||
/*
|
||||
* Input lines are parsed into doubly linked circular
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dir.c,v 1.27 2007/07/16 02:26:51 dogcow Exp $ */
|
||||
/* $NetBSD: dir.c,v 1.28 2007/07/16 14:07:00 christos 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.27 2007/07/16 02:26:51 dogcow Exp $");
|
||||
__RCSID("$NetBSD: dir.c,v 1.28 2007/07/16 14:07:00 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -614,7 +614,7 @@ dcanon(Char *cp, Char *p)
|
||||
Char *newcp, *sp;
|
||||
Char *p1, *p2; /* general purpose */
|
||||
int cc;
|
||||
cshbool slash;
|
||||
cshint slash;
|
||||
|
||||
/*
|
||||
* christos: if the path given does not start with a slash prepend cwd. If
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dol.c,v 1.24 2007/07/16 02:26:51 dogcow Exp $ */
|
||||
/* $NetBSD: dol.c,v 1.25 2007/07/16 14:07:00 christos 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.24 2007/07/16 02:26:51 dogcow Exp $");
|
||||
__RCSID("$NetBSD: dol.c,v 1.25 2007/07/16 14:07:00 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -213,7 +213,7 @@ Dword(void)
|
||||
{
|
||||
Char wbuf[BUFSIZE], *wp;
|
||||
int c, c1, i;
|
||||
cshbool dolflg, done, sofar;
|
||||
cshint dolflg, done, sofar;
|
||||
|
||||
done = 0;
|
||||
i = MAXWLEN;
|
||||
@ -389,7 +389,7 @@ Dgetdol(void)
|
||||
struct varent *vp;
|
||||
Char *np;
|
||||
int c, lwb, sc, subscr, upb;
|
||||
cshbool dimen, bitset;
|
||||
cshint 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;
|
||||
cshbool quoted;
|
||||
cshint quoted;
|
||||
|
||||
again:
|
||||
tmp = short2str(shtemp);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: exec.c,v 1.24 2007/07/16 02:26:51 dogcow Exp $ */
|
||||
/* $NetBSD: exec.c,v 1.25 2007/07/16 14:07:00 christos 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.24 2007/07/16 02:26:51 dogcow Exp $");
|
||||
__RCSID("$NetBSD: exec.c,v 1.25 2007/07/16 14:07:00 christos 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 *, cshbool);
|
||||
static int executable(Char *, Char *, cshint);
|
||||
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;
|
||||
cshbool slash;
|
||||
cshint slash;
|
||||
|
||||
hashval = 0;
|
||||
/*
|
||||
@ -506,7 +506,7 @@ iscommand(Char *name)
|
||||
struct varent *v;
|
||||
Char **pv, *sav;
|
||||
int hashval, hashval1, i;
|
||||
cshbool slash;
|
||||
cshint 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, cshbool dir_ok)
|
||||
executable(Char *dir, Char *name, cshint 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;
|
||||
cshbool aliased, found;
|
||||
cshint 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;
|
||||
cshbool slash = any(short2str(sp->word), '/');
|
||||
cshint slash = any(short2str(sp->word), '/');
|
||||
|
||||
v = adrof(STRpath);
|
||||
if (v == 0 || v->vec[0] == 0 || slash)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: exp.c,v 1.17 2007/07/16 02:26:51 dogcow Exp $ */
|
||||
/* $NetBSD: exp.c,v 1.18 2007/07/16 14:07:00 christos 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.17 2007/07/16 02:26:51 dogcow Exp $");
|
||||
__RCSID("$NetBSD: exp.c,v 1.18 2007/07/16 14:07:00 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -69,16 +69,16 @@ __RCSID("$NetBSD: exp.c,v 1.17 2007/07/16 02:26:51 dogcow Exp $");
|
||||
#define EQMATCH 7
|
||||
#define NOTEQMATCH 8
|
||||
|
||||
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 int exp1(Char ***, cshint);
|
||||
static int csh_exp2(Char ***, cshint);
|
||||
static int exp2a(Char ***, cshint);
|
||||
static int exp2b(Char ***, cshint);
|
||||
static int exp2c(Char ***, cshint);
|
||||
static Char *exp3(Char ***, cshint);
|
||||
static Char *exp3a(Char ***, cshint);
|
||||
static Char *exp4(Char ***, cshint);
|
||||
static Char *exp5(Char ***, cshint);
|
||||
static Char *exp6(Char ***, cshint);
|
||||
static void evalav(Char **);
|
||||
static int isa(Char *, int);
|
||||
static int egetn(Char *);
|
||||
@ -95,7 +95,7 @@ expr(Char ***vp)
|
||||
}
|
||||
|
||||
int
|
||||
exp0(Char ***vp, cshbool ignore)
|
||||
exp0(Char ***vp, cshint ignore)
|
||||
{
|
||||
int p1;
|
||||
|
||||
@ -117,7 +117,7 @@ exp0(Char ***vp, cshbool ignore)
|
||||
}
|
||||
|
||||
static int
|
||||
exp1(Char ***vp, cshbool ignore)
|
||||
exp1(Char ***vp, cshint ignore)
|
||||
{
|
||||
int p1;
|
||||
|
||||
@ -139,7 +139,7 @@ exp1(Char ***vp, cshbool ignore)
|
||||
}
|
||||
|
||||
static int
|
||||
csh_exp2(Char ***vp, cshbool ignore)
|
||||
csh_exp2(Char ***vp, cshint ignore)
|
||||
{
|
||||
int p1;
|
||||
|
||||
@ -161,7 +161,7 @@ csh_exp2(Char ***vp, cshbool ignore)
|
||||
}
|
||||
|
||||
static int
|
||||
exp2a(Char ***vp, cshbool ignore)
|
||||
exp2a(Char ***vp, cshint ignore)
|
||||
{
|
||||
int p1;
|
||||
|
||||
@ -183,7 +183,7 @@ exp2a(Char ***vp, cshbool ignore)
|
||||
}
|
||||
|
||||
static int
|
||||
exp2b(Char ***vp, cshbool ignore)
|
||||
exp2b(Char ***vp, cshint ignore)
|
||||
{
|
||||
int p1;
|
||||
|
||||
@ -205,7 +205,7 @@ exp2b(Char ***vp, cshbool ignore)
|
||||
}
|
||||
|
||||
static int
|
||||
exp2c(Char ***vp, cshbool ignore)
|
||||
exp2c(Char ***vp, cshint ignore)
|
||||
{
|
||||
Char *p1, *p2;
|
||||
int i;
|
||||
@ -247,7 +247,7 @@ exp2c(Char ***vp, cshbool ignore)
|
||||
}
|
||||
|
||||
static Char *
|
||||
exp3(Char ***vp, cshbool ignore)
|
||||
exp3(Char ***vp, cshint ignore)
|
||||
{
|
||||
Char *p1, *p2;
|
||||
int i;
|
||||
@ -287,7 +287,7 @@ exp3(Char ***vp, cshbool ignore)
|
||||
}
|
||||
|
||||
static Char *
|
||||
exp3a(Char ***vp, cshbool ignore)
|
||||
exp3a(Char ***vp, cshint ignore)
|
||||
{
|
||||
Char *op, *p1, *p2;
|
||||
int i;
|
||||
@ -315,7 +315,7 @@ exp3a(Char ***vp, cshbool ignore)
|
||||
}
|
||||
|
||||
static Char *
|
||||
exp4(Char ***vp, cshbool ignore)
|
||||
exp4(Char ***vp, cshint ignore)
|
||||
{
|
||||
Char *p1, *p2;
|
||||
int i;
|
||||
@ -350,7 +350,7 @@ exp4(Char ***vp, cshbool ignore)
|
||||
}
|
||||
|
||||
static Char *
|
||||
exp5(Char ***vp, cshbool ignore)
|
||||
exp5(Char ***vp, cshint ignore)
|
||||
{
|
||||
Char *p1, *p2;
|
||||
int i;
|
||||
@ -394,7 +394,7 @@ exp5(Char ***vp, cshbool ignore)
|
||||
}
|
||||
|
||||
static Char *
|
||||
exp6(Char ***vp, cshbool ignore)
|
||||
exp6(Char ***vp, cshint ignore)
|
||||
{
|
||||
Char *cp, *dp, *ep;
|
||||
int ccode, i;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: extern.h,v 1.19 2007/07/16 02:26:51 dogcow Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.20 2007/07/16 14:07:00 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -46,9 +46,9 @@ void goodbye(void);
|
||||
void importpath(Char *);
|
||||
void initdesc(void);
|
||||
void pintr(int);
|
||||
void pintr1(cshbool) __attribute__((noreturn));
|
||||
void pintr1(cshint) __attribute__((noreturn));
|
||||
void printprompt(void);
|
||||
void process(cshbool);
|
||||
void process(cshint);
|
||||
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 ***, cshbool);
|
||||
int exp0(Char ***, cshint);
|
||||
|
||||
/*
|
||||
* file.c
|
||||
@ -154,7 +154,7 @@ void wfree(void);
|
||||
/*
|
||||
* glob.c
|
||||
*/
|
||||
Char **dobackp(Char *, cshbool);
|
||||
Char **dobackp(Char *, cshint);
|
||||
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 *, cshbool);
|
||||
struct Hist *enthist(int, struct wordent *, cshint);
|
||||
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(cshbool);
|
||||
int readc(cshint);
|
||||
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(cshbool);
|
||||
void panystop(cshint);
|
||||
void pchild(int);
|
||||
void pendjob(void);
|
||||
struct process *pfind(Char *);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: file.c,v 1.25 2007/07/16 02:26:51 dogcow Exp $ */
|
||||
/* $NetBSD: file.c,v 1.26 2007/07/16 14:07:00 christos 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.25 2007/07/16 02:26:51 dogcow Exp $");
|
||||
__RCSID("$NetBSD: file.c,v 1.26 2007/07/16 14:07:00 christos 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.
|
||||
*/
|
||||
cshbool filec = 0;
|
||||
cshint filec = 0;
|
||||
|
||||
static void
|
||||
setup_tty(int on)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: func.c,v 1.33 2007/07/16 02:26:51 dogcow Exp $ */
|
||||
/* $NetBSD: func.c,v 1.34 2007/07/16 14:07:00 christos 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.33 2007/07/16 02:26:51 dogcow Exp $");
|
||||
__RCSID("$NetBSD: func.c,v 1.34 2007/07/16 14:07:00 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -433,7 +433,7 @@ void
|
||||
dowhile(Char **v, struct command *t)
|
||||
{
|
||||
int status;
|
||||
cshbool again;
|
||||
cshint again;
|
||||
|
||||
again = whyles != 0 && SEEKEQ(&whyles->w_start, &lineloc) &&
|
||||
whyles->w_fename == 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: glob.c,v 1.23 2007/07/16 02:26:52 dogcow Exp $ */
|
||||
/* $NetBSD: glob.c,v 1.24 2007/07/16 14:07:01 christos 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.23 2007/07/16 02:26:52 dogcow Exp $");
|
||||
__RCSID("$NetBSD: glob.c,v 1.24 2007/07/16 14:07:01 christos 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 *, cshbool);
|
||||
static void backeval(Char *, cshint);
|
||||
|
||||
static Char *
|
||||
globtilde(Char **nv, Char *s)
|
||||
@ -583,7 +583,7 @@ tglob(Char **t)
|
||||
* words only at newlines.
|
||||
*/
|
||||
Char **
|
||||
dobackp(Char *cp, cshbool literal)
|
||||
dobackp(Char *cp, cshint literal)
|
||||
{
|
||||
Char word[MAXPATHLEN], *ep, *lp, *rp;
|
||||
|
||||
@ -627,13 +627,13 @@ dobackp(Char *cp, cshbool literal)
|
||||
}
|
||||
|
||||
static void
|
||||
backeval(Char *cp, cshbool literal)
|
||||
backeval(Char *cp, cshint literal)
|
||||
{
|
||||
struct command faket;
|
||||
char tibuf[BUFSIZE];
|
||||
Char ibuf[BUFSIZE], *fakecom[2], *ip;
|
||||
int pvec[2], c, icnt, quoted;
|
||||
cshbool hadnl;
|
||||
cshint hadnl;
|
||||
|
||||
hadnl = 0;
|
||||
icnt = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hist.c,v 1.16 2007/07/16 02:26:52 dogcow Exp $ */
|
||||
/* $NetBSD: hist.c,v 1.17 2007/07/16 14:07:01 christos 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.16 2007/07/16 02:26:52 dogcow Exp $");
|
||||
__RCSID("$NetBSD: hist.c,v 1.17 2007/07/16 14:07:01 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -83,7 +83,7 @@ savehist(struct wordent *sp)
|
||||
}
|
||||
|
||||
struct Hist *
|
||||
enthist(int event, struct wordent *lp, cshbool docopy)
|
||||
enthist(int event, struct wordent *lp, cshint 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)
|
||||
{
|
||||
cshbool print;
|
||||
cshint print;
|
||||
|
||||
print = (*np) > 0;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lex.c,v 1.24 2007/07/16 02:26:52 dogcow Exp $ */
|
||||
/* $NetBSD: lex.c,v 1.25 2007/07/16 14:07:01 christos 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.24 2007/07/16 02:26:52 dogcow Exp $");
|
||||
__RCSID("$NetBSD: lex.c,v 1.25 2007/07/16 14:07:01 christos 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 *, cshbool);
|
||||
static struct Hist *findev(Char *, cshint);
|
||||
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, cshbool *);
|
||||
static struct wordent *dosub(int, struct wordent *, cshbool);
|
||||
static Char *subword(Char *, int, cshint *);
|
||||
static struct wordent *dosub(int, struct wordent *, cshint);
|
||||
|
||||
/*
|
||||
* 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 cshbool hadhist = 0;
|
||||
static cshint hadhist = 0;
|
||||
|
||||
/*
|
||||
* Avoid alias expansion recursion via \!#
|
||||
@ -229,7 +229,7 @@ word(void)
|
||||
Char wbuf[BUFSIZE], *wp;
|
||||
int i;
|
||||
Char c, c1;
|
||||
cshbool dolflg;
|
||||
cshint dolflg;
|
||||
|
||||
wp = wbuf;
|
||||
i = BUFSIZE - 4;
|
||||
@ -406,7 +406,7 @@ getdol(void)
|
||||
{
|
||||
Char name[4*MAXVARLEN+1], *ep, *np;
|
||||
int c, sc;
|
||||
cshbool special, toolong;
|
||||
cshint 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;
|
||||
cshbool global;
|
||||
cshint global;
|
||||
|
||||
do {
|
||||
exclnxt = 0;
|
||||
@ -835,11 +835,11 @@ getsub(struct wordent *en)
|
||||
}
|
||||
|
||||
static struct wordent *
|
||||
dosub(int sc, struct wordent *en, cshbool global)
|
||||
dosub(int sc, struct wordent *en, cshint global)
|
||||
{
|
||||
struct wordent lexi, *hp, *wdp;
|
||||
int i;
|
||||
cshbool didone, didsub;
|
||||
cshint didone, didsub;
|
||||
|
||||
didone = 0;
|
||||
didsub = 0;
|
||||
@ -888,7 +888,7 @@ dosub(int sc, struct wordent *en, cshbool global)
|
||||
}
|
||||
|
||||
static Char *
|
||||
subword(Char *cp, int type, cshbool *adid)
|
||||
subword(Char *cp, int type, cshint *adid)
|
||||
{
|
||||
Char wbuf[BUFSIZE];
|
||||
Char *mp, *np, *wp;
|
||||
@ -1009,7 +1009,7 @@ static int
|
||||
getsel(int *al, int *ar, int dol)
|
||||
{
|
||||
int c, i;
|
||||
cshbool first;
|
||||
cshint first;
|
||||
|
||||
c = getC(0);
|
||||
first = *al < 0;
|
||||
@ -1092,7 +1092,7 @@ gethent(int sc)
|
||||
Char *np;
|
||||
char *str;
|
||||
int c, event;
|
||||
cshbool back;
|
||||
cshint back;
|
||||
|
||||
back = 0;
|
||||
c = sc == HISTSUB ? HIST : getC(0);
|
||||
@ -1201,7 +1201,7 @@ gethent(int sc)
|
||||
}
|
||||
|
||||
static struct Hist *
|
||||
findev(Char *cp, cshbool anyarg)
|
||||
findev(Char *cp, cshint anyarg)
|
||||
{
|
||||
struct Hist *hp;
|
||||
|
||||
@ -1267,7 +1267,7 @@ unreadc(int c)
|
||||
}
|
||||
|
||||
int
|
||||
readc(cshbool wanteof)
|
||||
readc(cshint wanteof)
|
||||
{
|
||||
static int sincereal;
|
||||
int c;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: parse.c,v 1.15 2007/07/16 02:26:52 dogcow Exp $ */
|
||||
/* $NetBSD: parse.c,v 1.16 2007/07/16 14:07:01 christos 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.15 2007/07/16 02:26:52 dogcow Exp $");
|
||||
__RCSID("$NetBSD: parse.c,v 1.16 2007/07/16 14:07:01 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -140,7 +140,7 @@ asyn3(struct wordent *p1, struct wordent *p2)
|
||||
{
|
||||
struct varent *ap;
|
||||
struct wordent alout;
|
||||
cshbool redid;
|
||||
cshint 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;
|
||||
cshbool specp;
|
||||
cshint specp;
|
||||
|
||||
specp = 0;
|
||||
if (p1 != p2) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: proc.c,v 1.32 2007/07/16 02:26:52 dogcow Exp $ */
|
||||
/* $NetBSD: proc.c,v 1.33 2007/07/16 14:07:01 christos 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.32 2007/07/16 02:26:52 dogcow Exp $");
|
||||
__RCSID("$NetBSD: proc.c,v 1.33 2007/07/16 14:07:01 christos 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;
|
||||
cshbool hadnl;
|
||||
cshint hadnl;
|
||||
|
||||
hadnl = 1; /* did we just have a newline */
|
||||
(void)fpurge(cshout);
|
||||
@ -1115,7 +1115,7 @@ pstart(struct process *pp, int foregnd)
|
||||
}
|
||||
|
||||
void
|
||||
panystop(cshbool neednl)
|
||||
panystop(cshint 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;
|
||||
cshbool ignint;
|
||||
cshint ignint;
|
||||
|
||||
ignint = 0;
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: proc.h,v 1.10 2007/07/16 02:26:52 dogcow Exp $ */
|
||||
/* $NetBSD: proc.h,v 1.11 2007/07/16 14:07:01 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1991, 1993
|
||||
@ -91,7 +91,7 @@ struct process {
|
||||
#define AREASON 0200
|
||||
|
||||
struct process proclist; /* list head of all processes */
|
||||
cshbool pnoprocesses; /* pchild found nothing to wait for */
|
||||
cshint pnoprocesses; /* pchild found nothing to wait for */
|
||||
|
||||
struct process *pholdjob; /* one level stack of current jobs */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sem.c,v 1.26 2007/07/16 02:26:53 dogcow Exp $ */
|
||||
/* $NetBSD: sem.c,v 1.27 2007/07/16 14:07:01 christos 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.26 2007/07/16 02:26:53 dogcow Exp $");
|
||||
__RCSID("$NetBSD: sem.c,v 1.27 2007/07/16 14:07:01 christos 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;
|
||||
cshbool forked;
|
||||
cshint 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;
|
||||
cshbool ignint = 0;
|
||||
cshint ignint = 0;
|
||||
|
||||
if (nosigchld) {
|
||||
(void)sigprocmask(SIG_SETMASK, &csigset, NULL);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: set.c,v 1.27 2007/07/16 02:26:53 dogcow Exp $ */
|
||||
/* $NetBSD: set.c,v 1.28 2007/07/16 14:07:01 christos 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.27 2007/07/16 02:26:53 dogcow Exp $");
|
||||
__RCSID("$NetBSD: set.c,v 1.28 2007/07/16 14:07:01 christos 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 */
|
||||
cshbool hadsub;
|
||||
cshint hadsub;
|
||||
|
||||
v++;
|
||||
p = *v++;
|
||||
@ -218,7 +218,7 @@ dolet(Char **v, struct command *t)
|
||||
{
|
||||
Char c, op, *p, *vp;
|
||||
int subscr = 0; /* XXX: GCC */
|
||||
cshbool hadsub;
|
||||
cshint hadsub;
|
||||
|
||||
v++;
|
||||
p = *v++;
|
||||
|
Loading…
Reference in New Issue
Block a user