summaryrefslogtreecommitdiff
path: root/lib/pipe-filter.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-12-12 04:18:54 +0100
committerBruno Haible <bruno@clisp.org>2020-12-12 04:18:54 +0100
commitc893594d0c33139efbc8d75e43eaed487116b58b (patch)
tree6e8f5d55f44b65d6e9567822b5da2cbf24351fbf /lib/pipe-filter.h
parent46c7e327c76f115bbdc6eee75fffa382559aa9d8 (diff)
downloadgnulib-c893594d0c33139efbc8d75e43eaed487116b58b.tar.gz
sh-quote, execute, spawn-pipe, etc.: Make better use of 'const'.
* lib/sh-quote.h (shell_quote_argv): Does not need write access to the elements of argv. * lib/sh-quote.c (shell_quote_argv): Likewise. * lib/windows-spawn.h (prepare_spawn): Add 'const' the argument type and the return type. * lib/windows-spawn.c (prepare_spawn): Likewise. * lib/os2-spawn.h (prepare_spawn): Likewise. * lib/os2-spawn.c (prepare_spawn): Likewise. * lib/execute.h (execute): Does not need write access to the elements of prog_argv. * lib/execute.c (execute): Likewise. * lib/spawn-pipe.h (create_pipe_out, create_pipe_in, create_pipe_bidi): Likewise. * lib/spawn-pipe.c (create_pipe, create_pipe_bidi, create_pipe_in, create_pipe_out): Likewise. * lib/pipe-filter.h (pipe_filter_ii_execute, pipe_filter_gi_create): Likewise. * lib/pipe-filter-ii.c (pipe_filter_ii_execute): Likewise. * lib/pipe-filter-gi.c (pipe_filter_gi_create): Likewise. * lib/javaexec.h (execute_fn): Does not need write access to the elements of prog_argv. * lib/javaexec.c (execute_java_class): Update variable types and remove casts to 'char *'. * lib/csharpexec.h (execute_fn): Does not need write access to the elements of prog_argv. * lib/csharpexec.c (execute_csharp_using_mono, execute_csharp_using_sscli): Update variable types and remove casts to 'char *'. * lib/javacomp.c (compile_using_envjavac, compile_using_gcj, compile_using_javac, compile_using_jikes, is_envjavac_gcj, is_envjavac_gcj43, is_gcj_present, is_gcj_43, is_javac_present, is_jikes_present): Update variable types and remove casts to 'char *'. * lib/javaversion.c (execute_and_read_line): Does not need write access to the elements of prog_argv. * lib/csharpcomp.c (compile_csharp_using_mono, compile_csharp_using_sscli): Update variable types and remove casts to 'char *'. * tests/test-sh-quote.c (main): Update variable types and remove casts to 'char *'. * tests/test-execute-main.c (main): Update variable types and remove casts to 'char *'. * tests/test-spawn-pipe-main.c (test_pipe): Update variable types and remove casts to 'char *'. * NEWS: Mention the changes.
Diffstat (limited to 'lib/pipe-filter.h')
-rw-r--r--lib/pipe-filter.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pipe-filter.h b/lib/pipe-filter.h
index 9e2c966a5f..71ef70b387 100644
--- a/lib/pipe-filter.h
+++ b/lib/pipe-filter.h
@@ -133,7 +133,8 @@ typedef void (*done_read_fn) (void *data_read, size_t num_bytes_read,
- the positive exit code of the subprocess if that failed. */
extern int
pipe_filter_ii_execute (const char *progname,
- const char *prog_path, const char **prog_argv,
+ const char *prog_path,
+ const char * const *prog_argv,
bool null_stderr, bool exit_on_error,
prepare_write_fn prepare_write,
done_write_fn done_write,
@@ -179,7 +180,8 @@ struct pipe_filter_gi;
Return the freshly created 'struct pipe_filter_gi'. */
extern struct pipe_filter_gi *
pipe_filter_gi_create (const char *progname,
- const char *prog_path, const char **prog_argv,
+ const char *prog_path,
+ const char * const *prog_argv,
bool null_stderr, bool exit_on_error,
prepare_read_fn prepare_read,
done_read_fn done_read,