mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-12 22:50:49 +02:00
commit bash-20091105 snapshot
This commit is contained in:
@@ -3378,6 +3378,8 @@ eof_error:
|
||||
{
|
||||
tflags &= ~(LEX_STRIPDOC|LEX_INHEREDOC);
|
||||
/*itrace("parse_comsub:%d: found here doc end `%s'", line_number, ret + tind);*/
|
||||
free (heredelim);
|
||||
heredelim = 0;
|
||||
lex_firstind = -1;
|
||||
}
|
||||
else
|
||||
@@ -3402,6 +3404,8 @@ eof_error:
|
||||
{
|
||||
tflags &= ~(LEX_STRIPDOC|LEX_INHEREDOC);
|
||||
/*itrace("parse_comsub:%d: found here doc end `%s'", line_number, ret + tind);*/
|
||||
free (heredelim);
|
||||
heredelim = 0;
|
||||
lex_firstind = -1;
|
||||
}
|
||||
}
|
||||
@@ -3482,13 +3486,24 @@ eof_error:
|
||||
{
|
||||
if (lex_firstind == -1 && shellbreak (ch) == 0)
|
||||
lex_firstind = retind;
|
||||
#if 0
|
||||
else if (heredelim && (tflags & LEX_PASSNEXT) == 0 && ch == '\n')
|
||||
{
|
||||
tflags |= LEX_INHEREDOC;
|
||||
tflags &= ~LEX_HEREDELIM;
|
||||
lex_firstind = retind + 1;
|
||||
}
|
||||
#endif
|
||||
else if (lex_firstind >= 0 && (tflags & LEX_PASSNEXT) == 0 && shellbreak (ch))
|
||||
{
|
||||
nestret = substring (ret, lex_firstind, retind);
|
||||
heredelim = string_quote_removal (nestret, 0);
|
||||
free (nestret);
|
||||
hdlen = STRLEN(heredelim);
|
||||
if (heredelim == 0)
|
||||
{
|
||||
nestret = substring (ret, lex_firstind, retind);
|
||||
heredelim = string_quote_removal (nestret, 0);
|
||||
free (nestret);
|
||||
hdlen = STRLEN(heredelim);
|
||||
/*itrace("parse_comsub:%d: found here doc delimiter `%s' (%d)", line_number, heredelim, hdlen);*/
|
||||
}
|
||||
if (ch == '\n')
|
||||
{
|
||||
tflags |= LEX_INHEREDOC;
|
||||
|
||||
Reference in New Issue
Block a user