fixes for a couple of autoconf macros; update exit builtin for POSIX interp 1602; include more info in EOF error message when parsing compound command; update Makefiles by removing some variables, initializing others; update dependencies on version.h

This commit is contained in:
Chet Ramey
2024-10-28 15:05:35 -04:00
parent ee3b91dfd9
commit 4917f2859c
26 changed files with 263 additions and 265 deletions
+4 -2
View File
@@ -70,7 +70,9 @@ find_string_in_alist (char *string, STRING_INT_ALIST *alist, int flags)
/* Find TOKEN in ALIST, a list of string/int value pairs. Return the
corresponding string. Allocates memory for the returned
string. FLAGS is currently ignored, but reserved. */
string. FLAGS == 0 means to allocate new memory, the existing
behavior. If FLAGS&1, we just return the token and expect the caller
to allocate new memory and save it, if necessary. */
char *
find_token_in_alist (int token, STRING_INT_ALIST *alist, int flags)
{
@@ -79,7 +81,7 @@ find_token_in_alist (int token, STRING_INT_ALIST *alist, int flags)
for (i = 0; alist[i].word; i++)
{
if (alist[i].token == token)
return (savestring (alist[i].word));
return (flags ? alist[i].word : savestring (alist[i].word));
}
return (NULL);
}