sh-quote: Improve shell_quote_argv's signature.
authorBruno Haible <bruno@clisp.org>
Mon, 7 May 2012 01:31:32 +0000 (03:31 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 7 May 2012 01:31:32 +0000 (03:31 +0200)
* lib/sh-quote.h (shell_quote_argv): Make argument array a 'const *'.
* lib/sh-quote.c (shell_quote_argv): Likewise.

ChangeLog
lib/sh-quote.c
lib/sh-quote.h

index 3b9037c..c23333f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-06  Bruno Haible  <bruno@clisp.org>
+
+       sh-quote: Improve shell_quote_argv's signature.
+       * lib/sh-quote.h (shell_quote_argv): Make argument array a 'const *'.
+       * lib/sh-quote.c (shell_quote_argv): Likewise.
+
 2012-05-06  Paul Eggert  <eggert@cs.ucla.edu>
 
        stdint: document issues with int_fast8_t etc.
index a35a574..4a8582e 100644 (file)
@@ -69,11 +69,11 @@ shell_quote (const char *string)
 /* Returns a freshly allocated string containing all argument strings, quoted,
    separated through spaces.  */
 char *
-shell_quote_argv (char **argv)
+shell_quote_argv (char * const *argv)
 {
   if (*argv != NULL)
     {
-      char **argp;
+      char * const *argp;
       size_t length;
       char *command;
       char *p;
index cefc014..a5515d7 100644 (file)
@@ -33,4 +33,4 @@ extern char * shell_quote (const char *string);
 
 /* Returns a freshly allocated string containing all argument strings, quoted,
    separated through spaces.  */
-extern char * shell_quote_argv (char **argv);
+extern char * shell_quote_argv (char * const *argv);