]> Savannah Git Hosting - gnulib.git/commitdiff
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 3b9037cd88eebd868f96cc32825bb22fca7a4cc5..c23333f090cfb203353f023b70fbde0f9dd332f4 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 a35a574c990f205e505152628bc1f849d2ce13e9..4a8582ee1f99cf54366ece87bb1d39f45798b573 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 cefc014eea97d3e275e6010290b70d196e1ba812..a5515d791042548528ddf2f4a651254ca0316cab 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);