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

Comparing ray/src/common/popen.c (file contents):
Revision 2.1 by greg, Tue Sep 8 09:08:02 1992 UTC vs.
Revision 2.3 by greg, Tue Sep 29 09:25:54 1992 UTC

# Line 43 | Line 43 | char   *mode;
43                                  /* build our command */
44          for (cp = newcmd; ; cmd++) {
45                  switch (*cmd) {
46                case '"':
46                  case '\'':
47 +                case '"':
48                          if (!quote)
49                                  quote = *cmd;
50                          else if (quote == *cmd)
51                                  quote = '\0';
52 + #ifdef MSDOS
53 +                        else
54 +                                break;
55 +                        *cp++ = '"';            /* double quotes only */
56 +                        continue;
57 + #else
58                          break;
59 + #endif                
60 + #ifndef MSDOS
61                  case '(':
62                          if (!quote)
63                                  paren++;
# Line 66 | Line 74 | char   *mode;
74                          }
75                          *cp++ = *cmd++;
76                          break;
77 + #endif
78 +                case ' ':
79 +                case '\t':
80 +                        if (!quote)
81 +                                while (isspace(cmd[1]))
82 +                                        cmd++;
83 +                        break;
84                  case '|':
85                  case ';':
86                          if (!quote && !paren && cp2 == NULL)
# Line 102 | Line 117 | char   *mode;
117                  return(NULL);
118          }
119          if (fileno(fp) >= NFILE) {
120 <                fputs("popen: too many open files\n", stderr);
121 <                exit(1);
120 >                eputs("popen: too many open files\n");
121 >                quit(1);
122          }
123          pips[fileno(fp)].f = fname;
124          if (*mode == 'r') {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines