replace the code related to << changes and <<< with cleaner code,

fixing a few bugs also (including new testcases, except x=<< issue)
This commit is contained in:
tg
2015-09-06 19:47:01 +00:00
parent 0f6aa7eaab
commit ed5cb56849
7 changed files with 63 additions and 97 deletions

4
eval.c
View File

@ -23,7 +23,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.171 2015/09/05 19:19:02 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.172 2015/09/06 19:46:59 tg Exp $");
/*
* string expansion
@ -919,6 +919,8 @@ expand(
(word == IFS_IWS || word == IFS_NWS) &&
!ctype(c, C_IFSWS))) {
emit_word:
if (f & DOHERESTR)
*dp++ = '\n';
*dp++ = '\0';
cp = Xclose(ds, dp);
if (fdo & DOBRACE)