diff options
author | Paul Smith <psmith@gnu.org> | 2004-11-12 21:30:20 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2004-11-12 21:30:20 +0000 |
commit | e8e4c19873445d9f4efd3e45ede0e11a46899f50 (patch) | |
tree | 1b8387218a3ba32b0777c9f4c1eb6821e80da417 /job.c | |
parent | 547abfa13e2037c0461e3965911f5322737f2bda (diff) | |
download | gunmake-e8e4c19873445d9f4efd3e45ede0e11a46899f50.tar.gz |
Patch for command line parsing for VMS from Hartmut Becker.
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -2088,6 +2088,7 @@ child_execute_job (char *argv, struct child *child) char ifile[256], ofile[256], efile[256]; char *comname = 0; char procname[100]; + int in_string; /* Parse IO redirection. */ @@ -2109,9 +2110,17 @@ child_execute_job (char *argv, struct child *child) pnamedsc.dsc$b_dtype = DSC$K_DTYPE_T; pnamedsc.dsc$b_class = DSC$K_CLASS_S; + in_string = 0; /* Handle comments and redirection. */ for (p = argv, q = cmd; *p; p++, q++) { + if (*p == '"') + in_string = !in_string; + if (in_string) + { + *q = *p; + continue; + } switch (*p) { case '#': @@ -2167,6 +2176,8 @@ child_execute_job (char *argv, struct child *child) } } *q = *p; + while (isspace ((unsigned char)*--q)) + *q = '\0'; if (strncmp (cmd, "builtin_", 8) == 0) { |