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

Comparing ray/src/px/pinterp.c (file contents):
Revision 2.33 by greg, Sat Feb 22 02:07:27 2003 UTC vs.
Revision 2.34 by schorsch, Thu Jun 26 00:58:10 2003 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7   *      Greg Ward       09Dec89
8   */
9  
10 < #include "standard.h"
10 > #include "copyright.h"
11  
12   #include <ctype.h>
13  
14 + #include "standard.h"
15 + #include "rtprocess.h" /* Windows: must come before color.h */
16   #include "view.h"
15
17   #include "color.h"
18  
19   #define LOG2            0.69314718055994530942
# Line 84 | Line 85 | double theirexp;                       /* input picture exposure */
85   MAT4    theirs2ours;                    /* transformation matrix */
86   int     hasmatrix = 0;                  /* has transformation matrix */
87  
88 < int     PDesc[3] = {-1,-1,-1};          /* rtrace process descriptor */
88 < #define childpid        (PDesc[2])
88 > static SUBPROC PDesc = SP_INACTIVE; /* rtrace process descriptor */
89   unsigned short  queue[PACKSIZ][2];      /* pending pixels */
90   int     packsiz;                        /* actual packet size */
91   int     queuesiz = 0;                   /* number of pixels pending */
# Line 1095 | Line 1095 | char   *prog, *args;
1095          int     rval;
1096          register char   **wp, *cp;
1097  
1098 <        if (childpid != -1) {
1098 >        if (PDesc.running) {
1099                  fprintf(stderr, "%s: too many calculations\n", progname);
1100                  exit(1);
1101          }
# Line 1114 | Line 1114 | char   *prog, *args;
1114          }
1115          *wp = NULL;
1116                                                  /* start process */
1117 <        if ((rval = open_process(PDesc, argv)) < 0)
1117 >        if ((rval = open_process(&PDesc, argv)) < 0)
1118                  syserror(progname);
1119          if (rval == 0) {
1120                  fprintf(stderr, "%s: command not found\n", argv[0]);
# Line 1129 | Line 1129 | char   *prog, *args;
1129  
1130   caldone()                               /* done with calculation */
1131   {
1132 <        if (childpid == -1)
1132 >        if (!PDesc.running)
1133                  return;
1134          clearqueue();
1135 <        close_process(PDesc);
1136 <        childpid = -1;
1135 >        close_process(&PDesc);
1136   }
1137  
1138  
# Line 1169 | Line 1168 | clearqueue()                           /* process queue */
1168          }
1169                                          /* mark end and get results */
1170          bzero((char *)fbp, 6*sizeof(float));
1171 <        if (process(PDesc, (char *)fbuf, (char *)fbuf,
1171 >        if (process(&PDesc, (char *)fbuf, (char *)fbuf,
1172                          4*sizeof(float)*(queuesiz+1),
1173                          6*sizeof(float)*(queuesiz+1)) !=
1174                          4*sizeof(float)*(queuesiz+1)) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines