fix up parser flags command substitution parsing inherits; using temp files for here-documents is now a compatibility mode option

This commit is contained in:
Chet Ramey
2022-04-27 16:16:59 -04:00
parent 98300c9405
commit d0cd67ee13
12 changed files with 141 additions and 72 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ void wcdequote_pathname PARAMS((wchar_t *));
static void wdequote_pathname PARAMS((char *));
static void dequote_pathname PARAMS((char *));
#else
# define dequote_pathname udequote_pathname
# define dequote_pathname(p) udequote_pathname(p)
#endif
static int glob_testdir PARAMS((char *, int));
static char **glob_dir_to_array PARAMS((char *, char **, int));
+6
View File
@@ -69,7 +69,11 @@ sh_charvis (s, sindp, slen, ret, rindp)
ri = *rindp;
c = s[*sindp];
#if defined (HANDLE_MULTIBYTE)
send = (locale_mb_cur_max > 1) ? s + slen : 0;
#else
send = 0;
#endif
if (SAFECHAR (c))
{
@@ -88,10 +92,12 @@ sh_charvis (s, sindp, slen, ret, rindp)
ret[ri++] = UNCTRL (c);
si++;
}
#if defined (HANDLE_MULTIBYTE)
else if (locale_utf8locale && (c & 0x80))
COPY_CHAR_I (ret, ri, s, send, si);
else if (locale_mb_cur_max > 1 && is_basic (c) == 0)
COPY_CHAR_I (ret, ri, s, send, si);
#endif
else if (META_CHAR (c))
{
ret[ri++] = 'M';