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

Comparing ray/src/px/pcompos.c (file contents):
Revision 2.11 by greg, Wed Aug 12 12:39:52 1992 UTC vs.
Revision 2.14 by greg, Tue Sep 8 10:36:22 1992 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1991 Regents of the University of California */
1 > /* Copyright (c) 1992 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 33 | Line 33 | int  labelht = 24;                     /* label height */
33  
34   int  checkthresh = 0;                   /* check threshold value */
35  
36 + char  Command[] = "<Command>";
37 + char  Label[] = "<Label>";
38 +
39   char  *progname;
40  
41   struct {
# Line 170 | Line 173 | getfile:
173                          input[nfile].fp = stdin;
174                  } else {
175                          if (argv[an][0] == '!') {
176 <                                input[nfile].name = "<Command>";
176 >                                input[nfile].name = Command;
177                                  input[nfile].fp = popen(argv[an]+1, "r");
178                          } else {
179                                  input[nfile].name = argv[an];
# Line 222 | Line 225 | getfile:
225                  if (thislabel != NULL) {
226                          if (++nfile >= MAXFILE)
227                                  goto toomany;
228 <                        input[nfile].name = "<Label>";
228 >                        input[nfile].name = Label;
229                          input[nfile].hasmin = input[nfile].hasmax = 0;
230                          input[nfile].xres = input[nfile-1].xres;
231                          input[nfile].yres = labelht;
# Line 368 | Line 371 | err:
371   quit(code)              /* exit gracefully */
372   int  code;
373   {
374 <        int  status;
375 <
376 <        if (code == 0)                  /* reap any children */
377 <                while (wait(&status) != -1)
378 <                        if (code == 0)
379 <                                code = status>>8 & 0xff;
374 >        register int  i;
375 >                                /* close input files */
376 >        for (i = 0; i < nfile; i++)
377 >                if (input[i].name == Command || input[i].name == Label)
378 >                        pclose(input[i].fp);
379 >                else
380 >                        fclose(input[i].fp);
381          exit(code);
382   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines