ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/win_popen.c
(Generate patch)

Comparing ray/src/common/win_popen.c (file contents):
Revision 1.3 by schorsch, Sun Mar 28 20:33:12 2004 UTC vs.
Revision 1.5 by greg, Wed Oct 5 17:20:55 2011 UTC

# Line 22 | Line 22 | ignoring any | within. Quotes don't nest.
22   #include <io.h>     /* _open_osfhandle()  */
23   #include <fcntl.h>  /* _O_RDONLY          */
24  
25 + #include "paths.h"
26   #include "rtio.h"
27   #include "rterror.h"
28  
# Line 64 | Line 65 | char* type
65          int n, i, mode = 0, append = 0;
66          int ncmds = 0;
67          FILE *inf = NULL;
68 +        char *s = NULL;
69          HANDLE stdoutRd = NULL, stdoutWr = NULL;
70          HANDLE stdinRd = NULL, stdinWr = NULL;
71          HANDLE stderrWr = NULL;
# Line 79 | Line 81 | char* type
81                  eputs(estr);
82                  return NULL;
83          }
84 +        /* single quotes aren't removed, so change to double-quotes */
85 +        for (s=command; *s; s++)
86 +                if (*s == '\'')
87 +                        *s = '"';
88  
89          stdoutOrig = GetStdHandle(STD_OUTPUT_HANDLE);
90          stdinOrig = GetStdHandle(STD_INPUT_HANDLE);
# Line 325 | Line 331 | int maxl
331                                          curs = NULL;
332                                  } else if (last == '>') { /* output file */
333                                          if (*outfn != NULL) {
334 <                                                eputs("win_popen(): ambiguous out redirection");
334 >                                                eputs("win_popen(): ambiguous output redirection");
335                                                  goto error;
336                                          }
337                                          *outfn = curs;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines