Re: quotearg.c's shell_quoting_style and MinGW
Bruno Haible <[email protected]>
| Newsgroups | gmane.comp.lib.gnulib.bugs,gmane.comp.gnu.utils.bugs |
|---|---|
| Message-ID | <1707663.jyhyHtAKLm@linuix> |
Here are two more proposals, designed to avoid the drawbacks of the
previous ones:
3) A new API
/* Constructs a command line for the platform's command interpreter
that executes argv[0] with the arguments argv[1...] and invokes
popen() on it. */
FILE *popenv (const char * const *argv, const char *type);
/* Constructs a command line for the platform's command interpreter
that executes argv[0] with the arguments argv[1...] and invokes
system() on it. */
int systemv (const char * const *argv);
4) A new API
/* Constructs a command line for the platform's command interpreter
that executes argv[0] with the arguments argv[1...]. */
char *create_system_command (const char * const *argv);
These APIs would not break existing programs, would not do redundant
processing, would not be artificially limited, and would be usable without
any #ifs.
Bruno