aboutsummaryrefslogtreecommitdiff
path: root/contrib/tcsh/sh.dol.c
diff options
context:
space:
mode:
authorMark Peek <mp@FreeBSD.org>2002-07-24 16:23:10 +0000
committerMark Peek <mp@FreeBSD.org>2002-07-24 16:23:10 +0000
commit2930157267fc56387bb43acf5bb441a84ff6e765 (patch)
tree22260a5dd95c2612c939ecc9dc8166877f07d1d1 /contrib/tcsh/sh.dol.c
parentad35f55d4538cb8e6cd9e8eb7185a28e6f477160 (diff)
downloadsrc-2930157267fc56387bb43acf5bb441a84ff6e765.tar.gz
src-2930157267fc56387bb43acf5bb441a84ff6e765.zip
Import of tcsh-6.12.00
Notes
Notes: svn path=/vendor/tcsh/dist/; revision=100616
Diffstat (limited to 'contrib/tcsh/sh.dol.c')
-rw-r--r--contrib/tcsh/sh.dol.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/contrib/tcsh/sh.dol.c b/contrib/tcsh/sh.dol.c
index abad1c159a29..91d234035ddd 100644
--- a/contrib/tcsh/sh.dol.c
+++ b/contrib/tcsh/sh.dol.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.dol.c,v 3.47 2001/07/25 15:48:04 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.dol.c,v 3.50 2002/06/25 19:02:11 christos Exp $ */
/*
* sh.dol.c: Variable substitutions
*/
@@ -14,11 +14,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -36,7 +32,7 @@
*/
#include "sh.h"
-RCSID("$Id: sh.dol.c,v 3.47 2001/07/25 15:48:04 christos Exp $")
+RCSID("$Id: sh.dol.c,v 3.50 2002/06/25 19:02:11 christos Exp $")
/*
* C shell
@@ -585,10 +581,8 @@ Dgetdol()
c = DgetC(0);
} while (Isdigit(c));
unDredc(c);
- if (subscr < 0) {
- dolerror(vp->v_name);
- return;
- }
+ if (subscr < 0)
+ stderror(ERR_RANGE);
if (subscr == 0) {
if (bitset) {
dolp = dolzero ? STR1 : STR0;
@@ -651,7 +645,7 @@ Dgetdol()
dolp = (vp || getenv(short2str(name))) ? STR1 : STR0;
goto eatbrac;
}
- if (vp == 0) {
+ if (vp == NULL || vp->vec == NULL) {
np = str2short(getenv(short2str(name)));
if (np) {
fixDolMod();