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

Comparing ray/src/hd/rholo4.c (file contents):
Revision 3.12 by gregl, Thu Dec 11 17:40:04 1997 UTC vs.
Revision 3.17 by gregl, Sun Jan 4 18:37:11 1998 UTC

# Line 13 | Line 13 | static char SCCSid[] = "$SunId$ SGI";
13   #include <sys/uio.h>
14  
15   #ifndef HDSUF
16 < #define HDSUF   ".hdisp"
16 > #define HDSUF   ".hdi"
17   #endif
18  
19   static int      inp_flags;
# Line 53 | Line 53 | char   *dname;
53          if (readinp)
54                  close(atoi(fd0));
55          close(atoi(fd1));
56 +                                /* check if outside */
57 +        if (vdef(OBSTRUCTIONS) && vbool(OBSTRUCTIONS))
58 +                disp_result(DS_OUTSECT, 0, NULL);
59                                  /* write out hologram grids */
60          for (i = 0; hdlist[i] != NULL; i++)
61                  disp_result(DS_ADDHOLO, sizeof(HDGRID), (char *)hdlist[i]);
# Line 124 | Line 127 | int    block;
127                  disp_result(DS_STARTIMM, 0, NULL);
128                  bundle_set(BS_ADD, (PACKHEAD *)buf, msg.nbytes/sizeof(PACKHEAD));
129                  disp_result(DS_ENDIMM, 0, NULL);
130 <                disp_check(0);          /* hack -- delete usu. follows add */
130 >                disp_flush();
131                  break;
132          case DR_ADJSET:         /* adjust calculation set members */
133                  if (msg.nbytes % sizeof(PACKHEAD))
# Line 145 | Line 148 | int    block;
148                                          /* send acknowledgement */
149                  disp_result(DS_ACKNOW, 0, NULL);
150                  return(disp_check(1));  /* block on following request */
151 +        case DR_KILL:           /* kill computation process(es) */
152 +                if (msg.nbytes)
153 +                        error(INTERNAL, "bad DR_KILL from display process");
154 +                if (nprocs > 0)
155 +                        done_rtrace();
156 +                else
157 +                        error(WARNING, "no rtrace process to kill");
158 +                break;
159 +        case DR_RESTART:        /* restart computation process(es) */
160 +                if (msg.nbytes)
161 +                        error(INTERNAL, "bad DR_RESTART from display process");
162 +                if (ncprocs > nprocs)
163 +                        new_rtrace();
164 +                else if (nprocs > 0)
165 +                        error(WARNING, "rtrace already runnning");
166 +                else
167 +                        error(WARNING, "holodeck not open for writing");
168 +                break;
169 +        case DR_CLOBBER:        /* clobber holodeck */
170 +                if (msg.nbytes)
171 +                        error(INTERNAL, "bad DR_CLOBBER from display process");
172 +                if (!force || !ncprocs)
173 +                        error(WARNING, "request to clobber holodeck denied");
174 +                else {
175 +                        error(WARNING, "clobbering holodeck contents");
176 +                        hdclobber(NULL);
177 +                }
178 +                break;
179          case DR_SHUTDOWN:       /* shut down program */
180                  if (msg.nbytes)
181                          error(INTERNAL, "bad DR_SHUTDOWN from display process");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines