summaryrefslogtreecommitdiffstats
path: root/bin/csh
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1999-04-25 21:13:34 +0000
committerimp <imp@FreeBSD.org>1999-04-25 21:13:34 +0000
commit321c551969cc862a859c9e79c8404af90c94e81d (patch)
tree5ede02d61e978d083db7e7833d1560584b758dc1 /bin/csh
parent4be4456eab17cc243bba5d62ce59ba675507482b (diff)
downloadFreeBSD-src-321c551969cc862a859c9e79c8404af90c94e81d.zip
FreeBSD-src-321c551969cc862a859c9e79c8404af90c94e81d.tar.gz
First set of fixes to keep egcs happy. These include {} around single
statement if blocks[*] when the else could be ambiguous, not defaulting to int type and removal of some unused variables. [*] This is explicitly allowed by style(9) when the single statement spans more than one line. Reviewed by: obrien, chuckr
Diffstat (limited to 'bin/csh')
-rw-r--r--bin/csh/dol.c5
-rw-r--r--bin/csh/func.c5
-rw-r--r--bin/csh/lex.c4
-rw-r--r--bin/csh/sem.c5
4 files changed, 11 insertions, 8 deletions
diff --git a/bin/csh/dol.c b/bin/csh/dol.c
index 21d6487..79a5349 100644
--- a/bin/csh/dol.c
+++ b/bin/csh/dol.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)dol.c 8.1 (Berkeley) 5/31/93";
#else
static const char rcsid[] =
- "$Id: dol.c,v 1.7 1998/05/06 06:50:39 charnier Exp $";
+ "$Id: dol.c,v 1.8 1998/05/13 07:28:52 charnier Exp $";
#endif
#endif /* not lint */
@@ -605,11 +605,12 @@ Dgetdol()
stderror(ERR_SYNTAX);
}
else {
- if (subscr > 0)
+ if (subscr > 0) {
if (subscr > upb)
lwb = 1, upb = 0;
else
lwb = upb = subscr;
+ }
unDredc(c);
}
if (dimen) {
diff --git a/bin/csh/func.c b/bin/csh/func.c
index 1b8da96..f5cbe52 100644
--- a/bin/csh/func.c
+++ b/bin/csh/func.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)func.c 8.1 (Berkeley) 5/31/93";
#else
static const char rcsid[] =
- "$Id: func.c,v 1.10 1998/02/28 10:49:56 jraynard Exp $";
+ "$Id: func.c,v 1.11 1998/07/27 21:15:52 nectar Exp $";
#endif
#endif /* not lint */
@@ -754,11 +754,12 @@ getword(wp)
c = readc(1);
if (c == '\\' && (c = readc(1)) == '\n')
c = ' ';
- if (c == '\'' || c == '"')
+ if (c == '\'' || c == '"') {
if (d == 0)
d = c;
else if (d == c)
d = 0;
+ }
if (c < 0)
goto past;
if (wp) {
diff --git a/bin/csh/lex.c b/bin/csh/lex.c
index 3ec0425..56acc41 100644
--- a/bin/csh/lex.c
+++ b/bin/csh/lex.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)lex.c 8.1 (Berkeley) 5/31/93";
#else
static const char rcsid[] =
- "$Id: lex.c,v 1.9 1998/05/06 06:50:52 charnier Exp $";
+ "$Id: lex.c,v 1.10 1998/05/13 07:29:05 charnier Exp $";
#endif
#endif /* not lint */
@@ -1328,7 +1328,7 @@ readc(wanteof)
bool wanteof;
{
int c;
- static sincereal;
+ static int sincereal;
aret = F_SEEK;
if ((c = peekread) != '\0') {
diff --git a/bin/csh/sem.c b/bin/csh/sem.c
index 753b839..f9fedda 100644
--- a/bin/csh/sem.c
+++ b/bin/csh/sem.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)sem.c 8.1 (Berkeley) 5/31/93";
#else
static const char rcsid[] =
- "$Id: sem.c,v 1.7 1998/02/28 10:50:00 jraynard Exp $";
+ "$Id: sem.c,v 1.8 1998/05/06 06:51:00 charnier Exp $";
#endif
#endif /* not lint */
@@ -203,7 +203,7 @@ execute(t, wanttty, pipein, pipeout)
* We have to fork for eval too.
*/
(bifunc && (t->t_dflg & (F_PIPEIN | F_PIPEOUT)) != 0 &&
- bifunc->bfunct == doeval))
+ bifunc->bfunct == doeval)) {
if (t->t_dtyp == NODE_PAREN ||
t->t_dflg & (F_REPEAT | F_AMPERSAND) || bifunc) {
forked++;
@@ -339,6 +339,7 @@ execute(t, wanttty, pipein, pipeout)
}
}
+ }
if (pid != 0) {
/*
* It would be better if we could wait for the whole job when we
OpenPOWER on IntegriCloud