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

Comparing ray/src/util/glrad.c (file contents):
Revision 3.14 by greg, Mon May 19 16:32:19 2003 UTC vs.
Revision 3.16 by schorsch, Mon Jun 30 14:59:13 2003 UTC

# Line 11 | Line 11 | static const char      RCSid[] = "$Id$";
11   #include <X11/extensions/SGIStereo.h>
12   #endif
13   #include <ctype.h>
14 + #include <string.h>
15   #include <time.h>
16 +
17   #include "radogl.h"
18   #include "view.h"
19   #include "paths.h"
20   #include "glradicon.h"
21 + #include "rtprocess.h"
22  
23   #ifndef MAXVIEW
24   #define MAXVIEW         63              /* maximum number of standard views */
# Line 72 | Line 75 | char   *scene[MAXSCENE+1];             /* material and scene file l
75   int     nscenef = 0;                    /* number of scene files */
76   char    *octree;                        /* octree name (NULL if unnec.) */
77  
78 < int     rtpd[3];                        /* rtrace process descriptors */
78 > SUBPROC rtpd;                   /* rtrace process descriptors */
79  
80   int     silent = 0;                     /* run rad silently? */
81   int     backvis = 1;                    /* back faces visible? */
# Line 179 | Line 182 | int    code;
182   {
183          if (ourdisplay != NULL)
184                  dev_close();
185 <        if (rtpd[2] > 0) {
186 <                if (close_process(rtpd) > 0)
185 >        /* if (rtpd.pid > 0) { */
186 >        if (rtpd.running) {
187 >                if (close_process(&rtpd) > 0)
188                          wputs("bad exit status from rtrace\n");
189 <                rtpd[2] = 0;
189 >                /* rtpd.pid = 0; */
190          }
191          exit(code);
192   }
# Line 198 | Line 202 | char   *octname;
202          if (nowarn) av[ac++] = "-w-";
203          av[ac++] = octname;
204          av[ac] = NULL;
205 <        if (open_process(rtpd, av) <= 0)
205 >        if (open_process(&rtpd, av) <= 0)
206                  error(SYSTEM, "cannot start rtrace process");
207   }
208  
# Line 675 | Line 679 | double md;
679   {
680          float   fbuf[6];
681                                  /* check to see if rtrace is running */
682 <        if (rtpd[2] <= 0)
682 >        /* if (rtpd.pid <= 0) */
683 >        if (!rtpd.running)
684                  return(0);
685                                  /* assign origin */
686          fbuf[0] = org[0]; fbuf[1] = org[1]; fbuf[2] = org[2];
# Line 683 | Line 688 | double md;
688          if (md <= FTINY) md = FHUGE;
689          fbuf[3] = dir[0]*md; fbuf[4] = dir[1]*md; fbuf[5] = dir[2]*md;
690                                  /* trace that ray */
691 <        if (process(rtpd, (char *)fbuf, (char *)fbuf,
691 >        if (process(&rtpd, (char *)fbuf, (char *)fbuf,
692                          4*sizeof(float), 6*sizeof(float)) != 4*sizeof(float))
693                  error(INTERNAL, "error getting data back from rtrace process");
694          if (fbuf[3] >= .99*FHUGE)
# Line 826 | Line 831 | VIEW   *vp;
831   {
832          FILE    *fp;
833                                          /* check if already in there */
834 <        if (!bcmp(&thisview, vwl[currentview].v, sizeof(VIEW))) {
834 >        if (!memcmp(&thisview, vwl[currentview].v, sizeof(VIEW))) {
835                  error(COMMAND, "view already in standard list");
836                  return;
837          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines