diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-09 16:13:32 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-09 16:15:01 -0700 |
commit | 2d698b6e42d8dca191ac795ef5dba3bf62496eec (patch) | |
tree | ac5e0b67043c50f49160e9fe407435706cf30444 /mksyntax.c | |
parent | f1250933e4a2ac09a3d0b25b3877068e12f44da5 (diff) | |
download | vyatta-bash-2d698b6e42d8dca191ac795ef5dba3bf62496eec.tar.gz vyatta-bash-2d698b6e42d8dca191ac795ef5dba3bf62496eec.zip |
Integrate bash 3.2 version
This is merge of current Debian stable (Lenny) version of Bash
with Vyatta changes.
Diffstat (limited to 'mksyntax.c')
-rw-r--r-- | mksyntax.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -62,6 +62,7 @@ struct wordflag { { CXQUOTE, "CXQUOTE" }, { CSPECVAR, "CSPECVAR" }, { CSUBSTOP, "CSUBSTOP" }, + { CBLANK, "CBLANK" }, }; #define N_WFLAGS (sizeof (wordflags) / sizeof (wordflags[0])) @@ -196,6 +197,22 @@ addcchar (c, flag) lsyntax[c] |= flag; } +static void +addblanks () +{ + register int i; + unsigned char uc; + + for (i = 0; i < SYNSIZE; i++) + { + uc = i; + /* Since we don't call setlocale(), this defaults to the "C" locale, and + the default blank characters will be space and tab. */ + if (isblank (uc)) + lsyntax[uc] |= CBLANK; + } +} + /* load up the correct flag values in lsyntax */ static void load_lsyntax () @@ -230,6 +247,8 @@ load_lsyntax () addcstr ("@*#?-$!", CSPECVAR); /* omits $0...$9 and $_ */ addcstr ("-=?+", CSUBSTOP); /* OP in ${paramOPword} */ + + addblanks (); } static void |