third set of ANSI C changes: const function parameters

This commit is contained in:
Chet Ramey
2023-01-03 11:59:43 -05:00
parent a61ffa78ed
commit b2613ad1c0
43 changed files with 477 additions and 445 deletions
+4 -4
View File
@@ -60,7 +60,7 @@ strvec_mresize (char **array, int nsize)
/* Return the length of ARRAY, a NULL terminated array of char *. */
int
strvec_len (char **array)
strvec_len (char * const *array)
{
register int i;
@@ -92,7 +92,7 @@ strvec_dispose (char **array)
}
int
strvec_remove (char **array, char *name)
strvec_remove (char **array, const char *name)
{
register int i, j;
char *x;
@@ -115,7 +115,7 @@ strvec_remove (char **array, char *name)
/* Find NAME in ARRAY. Return the index of NAME, or -1 if not present.
ARRAY should be NULL terminated. */
int
strvec_search (char **array, char *name)
strvec_search (char **array, const char *name)
{
int i;
@@ -128,7 +128,7 @@ strvec_search (char **array, char *name)
/* Allocate and return a new copy of ARRAY and its contents. */
char **
strvec_copy (char **array)
strvec_copy (char * const *array)
{
register int i;
int len;