first set of ANSI C changes: remove PARAMS

This commit is contained in:
Chet Ramey
2023-01-03 10:01:11 -05:00
parent b648a9ab79
commit 81e3a4fb07
232 changed files with 2607 additions and 3826 deletions
+15 -36
View File
@@ -1,6 +1,6 @@
/* stringlist.c - functions to handle a generic `list of strings' structure */
/* Copyright (C) 2000-2019 Free Software Foundation, Inc.
/* Copyright (C) 2000-2019, 2022 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -37,8 +37,7 @@
/* Allocate a new STRINGLIST, with room for N strings. */
STRINGLIST *
strlist_create (n)
int n;
strlist_create (int n)
{
STRINGLIST *ret;
register int i;
@@ -61,9 +60,7 @@ strlist_create (n)
}
STRINGLIST *
strlist_resize (sl, n)
STRINGLIST *sl;
int n;
strlist_resize (STRINGLIST *sl, int n)
{
register int i;
@@ -81,8 +78,7 @@ strlist_resize (sl, n)
}
void
strlist_flush (sl)
STRINGLIST *sl;
strlist_flush (STRINGLIST *sl)
{
if (sl == 0 || sl->list == 0)
return;
@@ -91,8 +87,7 @@ strlist_flush (sl)
}
void
strlist_dispose (sl)
STRINGLIST *sl;
strlist_dispose (STRINGLIST *sl)
{
if (sl == 0)
return;
@@ -102,9 +97,7 @@ strlist_dispose (sl)
}
int
strlist_remove (sl, s)
STRINGLIST *sl;
char *s;
strlist_remove (STRINGLIST *sl, char *s)
{
int r;
@@ -118,8 +111,7 @@ strlist_remove (sl, s)
}
STRINGLIST *
strlist_copy (sl)
STRINGLIST *sl;
strlist_copy (STRINGLIST *sl)
{
STRINGLIST *new;
register int i;
@@ -144,8 +136,7 @@ strlist_copy (sl)
/* Return a new STRINGLIST with everything from M1 and M2. */
STRINGLIST *
strlist_merge (m1, m2)
STRINGLIST *m1, *m2;
strlist_merge (STRINGLIST *m1, STRINGLIST *m2)
{
STRINGLIST *sl;
int i, n, l1, l2;
@@ -165,8 +156,7 @@ strlist_merge (m1, m2)
/* Make STRINGLIST M1 contain everything in M1 and M2. */
STRINGLIST *
strlist_append (m1, m2)
STRINGLIST *m1, *m2;
strlist_append (STRINGLIST *m1, STRINGLIST *m2)
{
register int i, n, len1, len2;
@@ -189,9 +179,7 @@ strlist_append (m1, m2)
}
STRINGLIST *
strlist_prefix_suffix (sl, prefix, suffix)
STRINGLIST *sl;
char *prefix, *suffix;
strlist_prefix_suffix (STRINGLIST *sl, char *prefix, char *suffix)
{
int plen, slen, tlen, llen, i;
char *t;
@@ -223,9 +211,7 @@ strlist_prefix_suffix (sl, prefix, suffix)
}
void
strlist_print (sl, prefix)
STRINGLIST *sl;
char *prefix;
strlist_print (STRINGLIST *sl, char *prefix)
{
register int i;
@@ -236,9 +222,7 @@ strlist_print (sl, prefix)
}
void
strlist_walk (sl, func)
STRINGLIST *sl;
sh_strlist_map_func_t *func;
strlist_walk (STRINGLIST *sl, sh_strlist_map_func_t *func)
{
register int i;
@@ -250,8 +234,7 @@ strlist_walk (sl, func)
}
void
strlist_sort (sl)
STRINGLIST *sl;
strlist_sort (STRINGLIST *sl)
{
if (sl == 0 || sl->list_len == 0 || sl->list == 0)
return;
@@ -259,9 +242,7 @@ strlist_sort (sl)
}
STRINGLIST *
strlist_from_word_list (list, alloc, starting_index, ip)
WORD_LIST *list;
int alloc, starting_index, *ip;
strlist_from_word_list (WORD_LIST *list, int alloc, int starting_index, int *ip)
{
STRINGLIST *ret;
int slen, len;
@@ -283,9 +264,7 @@ strlist_from_word_list (list, alloc, starting_index, ip)
}
WORD_LIST *
strlist_to_word_list (sl, alloc, starting_index)
STRINGLIST *sl;
int alloc, starting_index;
strlist_to_word_list (STRINGLIST *sl, int alloc, int starting_index)
{
WORD_LIST *list;