• fix wtf(1) by keeping the paren in ${foo#\(} properly escaped in COMSUB

• merge tputS and wdstrip_internal
⇒ net save: 604 .text 0 .data 0 .bss (MirBSD/i386)
This commit is contained in:
tg
2011-05-02 22:52:54 +00:00
parent d69ffbf9e0
commit 69f98bca9a
6 changed files with 98 additions and 137 deletions

4
lex.c
View File

@@ -22,7 +22,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.146 2011/04/22 12:10:14 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.147 2011/05/02 22:52:51 tg Exp $");
/*
* states while lexing word
@@ -763,7 +763,7 @@ yylex(int cf)
*/
*wp = EOS;
sp = Xstring(ws, wp);
dp = wdstrip(sp, true, false);
dp = wdstrip(sp, WDS_KEEPQ);
s = pushs(SREREAD, source->areap);
s->start = s->str = s->u.freeme = dp;
s->next = source;