fix the rest of it

This commit is contained in:
tg
2007-07-06 02:22:57 +00:00
parent 26a6e5acc9
commit 78d58de7a0
5 changed files with 48 additions and 23 deletions

9
lex.c
View File

@@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.39 2007/07/06 01:53:36 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.40 2007/07/06 02:22:56 tg Exp $");
/* Structure to keep track of the lexing state and the various pieces of info
* needed for each particular state. */
@@ -287,7 +287,7 @@ yylex(int cf)
*wp++ = CHAR, *wp++ = c;
c = getsc();
if (c == ':') {
*wp++ = CHAR;
*wp++ = QCHAR;
*wp++ = '0';
*wp++ = ADELIM;
*wp++ = ':';
@@ -296,10 +296,11 @@ yylex(int cf)
statep->ls_sadelim.num = 1;
break;
} else if (ksh_isdigit(c) ||
c == '('/*)*/ ||
c == '('/*)*/ || c == ' ' ||
c == '$' /* XXX what else? */) {
/* substring subst. */
ungetsc(c);
*wp++ = QCHAR;
*wp++ = c;
PUSH_STATE(SADELIM);
statep->ls_sadelim.delimiter = ':';
statep->ls_sadelim.num = 2;