mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-07 10:42:28 +02:00
commit bash-20190328 snapshot
This commit is contained in:
+2
-26
@@ -149,7 +149,7 @@ extern int errno;
|
||||
if (vflag) \
|
||||
{ \
|
||||
SHELL_VAR *v; \
|
||||
v = bind_printf_variable (vname, vbuf, 0); \
|
||||
v = builtin_bind_variable (vname, vbuf, 0); \
|
||||
stupidly_hack_special_variables (vname); \
|
||||
if (v == 0 || readonly_p (v) || noassign_p (v)) \
|
||||
return (EXECUTION_FAILURE); \
|
||||
@@ -206,7 +206,6 @@ static char *getstr __P((void));
|
||||
static int getint __P((void));
|
||||
static intmax_t getintmax __P((void));
|
||||
static uintmax_t getuintmax __P((void));
|
||||
static SHELL_VAR *bind_printf_variable __P((char *, char *, int));
|
||||
|
||||
#if defined (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD && !defined(STRTOLD_BROKEN)
|
||||
typedef long double floatmax_t;
|
||||
@@ -301,7 +300,7 @@ printf_builtin (list)
|
||||
if (vflag && list->word->word && list->word->word[0] == '\0')
|
||||
{
|
||||
SHELL_VAR *v;
|
||||
v = bind_printf_variable (vname, "", 0);
|
||||
v = builtin_bind_variable (vname, "", 0);
|
||||
stupidly_hack_special_variables (vname);
|
||||
return ((v == 0 || readonly_p (v) || noassign_p (v)) ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
|
||||
}
|
||||
@@ -1271,26 +1270,3 @@ asciicode ()
|
||||
garglist = garglist->next;
|
||||
return (ch);
|
||||
}
|
||||
|
||||
static SHELL_VAR *
|
||||
bind_printf_variable (name, value, flags)
|
||||
char *name;
|
||||
char *value;
|
||||
int flags;
|
||||
{
|
||||
SHELL_VAR *v;
|
||||
|
||||
#if defined (ARRAY_VARS)
|
||||
if (valid_array_reference (name, assoc_expand_once ? (VA_NOEXPAND|VA_ONEWORD) : 0) == 0)
|
||||
v = bind_variable (name, value, flags);
|
||||
else
|
||||
v = assign_array_element (name, value, flags | (assoc_expand_once ? ASS_NOEXPAND : 0));
|
||||
#else /* !ARRAY_VARS */
|
||||
v = bind_variable (name, value, flags);
|
||||
#endif /* !ARRAY_VARS */
|
||||
|
||||
if (v && readonly_p (v) == 0 && noassign_p (v) == 0)
|
||||
VUNSETATTR (v, att_invisible);
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user