+2016-01-05 Mike Frysinger <vapier@gentoo.org>
+
+ * libiberty.h (dupargv): Change arg to char * const *.
+ (writeargv, countargv): Likewise.
+
2016-01-01 Alan Modra <amodra@gmail.com>
Update year range in copyright notice of all files.
/* Duplicate an argument vector. Allocates memory using malloc. Use
freeargv to free the vector. */
-extern char **dupargv (char **) ATTRIBUTE_MALLOC;
+extern char **dupargv (char * const *) ATTRIBUTE_MALLOC;
/* Expand "@file" arguments in argv. */
/* Write argv to an @-file, inserting necessary quoting. */
-extern int writeargv (char **, FILE *);
+extern int writeargv (char * const *, FILE *);
/* Return the number of elements in argv. */
-extern int countargv (char**);
+extern int countargv (char * const *);
/* Return the last component of a path name. Note that we can't use a
prototype here because the parameter is declared inconsistently
+2016-01-05 Mike Frysinger <vapier@gentoo.org>
+
+ * argv.c (dupargv): Change arg to char * const *. Update comment.
+ (writeargv, countargv): Likewise.
+ * functions.texi (dupargv, writeargv, countargv): Likewise.
+
2016-01-05 Mike Frysinger <vapier@gentoo.org>
* argv.c (dupargv): Replace strlen/xmalloc/strcpy with xstrdup.
/*
-@deftypefn Extension char** dupargv (char **@var{vector})
+@deftypefn Extension char** dupargv (char * const *@var{vector})
Duplicate an argument vector. Simply scans through @var{vector},
duplicating each argument until the terminating @code{NULL} is found.
*/
char **
-dupargv (char **argv)
+dupargv (char * const *argv)
{
int argc;
char **copy;
/*
-@deftypefn Extension int writeargv (const char **@var{argv}, FILE *@var{file})
+@deftypefn Extension int writeargv (char * const *@var{argv}, FILE *@var{file})
Write each member of ARGV, handling all necessary quoting, to the file
named by FILE, separated by whitespace. Return 0 on success, non-zero
*/
int
-writeargv (char **argv, FILE *f)
+writeargv (char * const *argv, FILE *f)
{
int status = 0;
/*
-@deftypefn Extension int countargv (char **@var{argv})
+@deftypefn Extension int countargv (char * const *@var{argv})
Return the number of elements in @var{argv}.
Returns zero if @var{argv} is NULL.
*/
int
-countargv (char **argv)
+countargv (char * const *argv)
{
int argc;
@end deftypefn
@c argv.c:470
-@deftypefn Extension int countargv (char **@var{argv})
+@deftypefn Extension int countargv (char * const *@var{argv})
Return the number of elements in @var{argv}.
Returns zero if @var{argv} is NULL.
@end deftypefn
@c argv.c:52
-@deftypefn Extension char** dupargv (char **@var{vector})
+@deftypefn Extension char** dupargv (char * const *@var{vector})
Duplicate an argument vector. Simply scans through @var{vector},
duplicating each argument until the terminating @code{NULL} is found.
@end deftypefn
@c argv.c:286
-@deftypefn Extension int writeargv (const char **@var{argv}, FILE *@var{file})
+@deftypefn Extension int writeargv (char * const *@var{argv}, FILE *@var{file})
Write each member of ARGV, handling all necessary quoting, to the file
named by FILE, separated by whitespace. Return 0 on success, non-zero