more ANSI/ISO C cleanups

This commit is contained in:
Chet Ramey
2023-03-28 16:34:56 -04:00
parent 1efe6d6b69
commit 727e92c806
38 changed files with 3332 additions and 220 deletions
+3
View File
@@ -1177,6 +1177,7 @@ quote_string(char *s)
return savestring(s);
}
void
print_element(ARRAY_ELEMENT *ae)
{
char lbuf[INT_STRLEN_BOUND (intmax_t) + 1];
@@ -1186,12 +1187,14 @@ print_element(ARRAY_ELEMENT *ae)
element_value(ae));
}
void
print_array(ARRAY *a)
{
printf("\n");
array_walk(a, print_element, (void *)NULL);
}
int
main(int c, char **v)
{
ARRAY *a, *new_a, *copy_of_a;