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

Comparing ray/src/px/pcomb.c (file contents):
Revision 1.18 by greg, Mon May 27 09:01:05 1991 UTC vs.
Revision 1.19 by greg, Thu May 30 09:47:14 1991 UTC

# Line 25 | Line 25 | static char SCCSid[] = "$SunId$ LBL";
25   #define BRT             (-1)            /* special index for brightness */
26  
27   struct {
28 <        char    *name;          /* file name */
28 >        char    *name;          /* file or command name */
29          FILE    *fp;            /* stream pointer */
30          COLOR   *scan[WINSIZ];  /* input scanline window */
31          COLOR   coef;           /* coefficient */
# Line 61 | Line 61 | int    xpos, ypos;                     /* output position */
61  
62   int     wrongformat = 0;
63  
64 + FILE    *popen();
65  
66 +
67   main(argc, argv)
68   int     argc;
69   char    *argv[];
# Line 124 | Line 126 | char   *argv[];
126                          }
127                  else {
128                          input[nfiles].name = argv[a];
129 <                        input[nfiles].fp = fopen(argv[a], "r");
129 >                        input[nfiles].fp = argv[a][0]=='!' ?
130 >                                        popen(argv[a]+1, "r") :
131 >                                        fopen(argv[a], "r");
132                          if (input[nfiles].fp == NULL) {
133                                  perror(argv[a]);
134                                  quit(1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines