summaryrefslogtreecommitdiffstats
path: root/contrib/tcsh/tw.parse.c
diff options
context:
space:
mode:
authormp <mp@FreeBSD.org>2002-07-24 16:23:10 +0000
committermp <mp@FreeBSD.org>2002-07-24 16:23:10 +0000
commitf2c2aa29b7d05c53575ab7ce4dc5870fd33a1310 (patch)
tree22260a5dd95c2612c939ecc9dc8166877f07d1d1 /contrib/tcsh/tw.parse.c
parente8a1e84ed0d35851468ed9942dd757f1874d0907 (diff)
downloadFreeBSD-src-f2c2aa29b7d05c53575ab7ce4dc5870fd33a1310.zip
FreeBSD-src-f2c2aa29b7d05c53575ab7ce4dc5870fd33a1310.tar.gz
Import of tcsh-6.12.00
Diffstat (limited to 'contrib/tcsh/tw.parse.c')
-rw-r--r--contrib/tcsh/tw.parse.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/contrib/tcsh/tw.parse.c b/contrib/tcsh/tw.parse.c
index abfaa8c..7bec5be 100644
--- a/contrib/tcsh/tw.parse.c
+++ b/contrib/tcsh/tw.parse.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tw.parse.c,v 3.90 2001/03/18 19:06:32 christos Exp $ */
+/* $Header: /src/pub/tcsh/tw.parse.c,v 3.92 2002/06/25 19:02:12 christos Exp $ */
/*
* tw.parse.c: Everyone has taken a shot in this futile effort to
* lexically analyze a csh line... Well we cannot good
@@ -17,11 +17,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.
*
@@ -39,7 +35,7 @@
*/
#include "sh.h"
-RCSID("$Id: tw.parse.c,v 3.90 2001/03/18 19:06:32 christos Exp $")
+RCSID("$Id: tw.parse.c,v 3.92 2002/06/25 19:02:12 christos Exp $")
#include "tw.h"
#include "ed.h"
@@ -827,7 +823,7 @@ recognize(exp_name, item, name_length, numitems, enhanced)
#ifdef WINNT_NATIVE
struct varent *vp;
int igncase;
- igncase = (vp = adrof(STRcomplete)) != NULL &&
+ igncase = (vp = adrof(STRcomplete)) != NULL && vp->vec != NULL &&
Strcmp(*(vp->vec), STRigncase) == 0;
#endif /* WINNT_NATIVE */
@@ -993,7 +989,7 @@ tw_collect_items(command, looking, exp_dir, exp_name, target, pat, flags)
case RECOGNIZE_SCROLL:
#ifdef WINNT_NATIVE
- igncase = (vp = adrof(STRcomplete)) != NULL &&
+ igncase = (vp = adrof(STRcomplete)) != NULL && vp->vec != NULL &&
Strcmp(*(vp->vec), STRigncase) == 0;
#endif /* WINNT_NATIVE */
enhanced = (vp = adrof(STRcomplete)) != NULL && !Strcmp(*(vp->vec),STRenhance);
@@ -1147,7 +1143,7 @@ tw_suffix(looking, exp_dir, exp_name, target, name)
/*
* Don't consider array variables or empty variables
*/
- if ((vp = adrof(exp_name)) != NULL) {
+ if ((vp = adrof(exp_name)) != NULL && vp->vec != NULL) {
if ((ptr = vp->vec[0]) == NULL || *ptr == '\0' ||
vp->vec[1] != NULL)
return ' ';
OpenPOWER on IntegriCloud