--- ray/src/hd/rhdisp.c 1997/12/11 09:37:43 3.12 +++ ray/src/hd/rhdisp.c 1997/12/15 20:43:48 3.15 @@ -58,22 +58,32 @@ char *argv[]; rdy = disp_wait(); if (rdy & RDY_DEV) { /* user input from driver */ inp = dev_input(); - if (inp & DEV_PUTVIEW) - printview(); - if (inp & DEV_NEWVIEW) + if (inp & DFL(DC_SETVIEW)) new_view(&odev.v); - if (inp & DEV_LASTVIEW) + if (inp & DFL(DC_GETVIEW)) + printview(); + if (inp & DFL(DC_LASTVIEW)) new_view(NULL); - if (inp & DEV_SHUTDOWN) - serv_request(DR_SHUTDOWN, 0, NULL); - if (inp & DEV_REDRAW) - imm_mode = beam_sync() > 0; - if (inp & DEV_WAIT) - pause = 1; - if (inp & DEV_RESUME) { + if (inp & DFL(DC_RESUME)) { serv_request(DR_NOOP, 0, NULL); pause = 0; } + if (inp & DFL(DC_PAUSE)) + pause = 1; + if (inp & DFL(DC_REDRAW)) + imm_mode = beam_sync() > 0; + if (inp & DFL(DC_KILL)) { + serv_request(DR_KILL, 0, NULL); + pause = 0; + } + if (inp & DFL(DC_CLOBBER)) + serv_request(DR_CLOBBER, 0, NULL); + if (inp & DFL(DC_RESTART)) { + serv_request(DR_RESTART, 0, NULL); + pause = 0; + } + if (inp & DFL(DC_QUIT)) + serv_request(DR_SHUTDOWN, 0, NULL); } if (rdy & RDY_SIN) /* user input from sstdin */ switch (usr_input()) { @@ -82,6 +92,9 @@ char *argv[]; break; case DC_RESUME: serv_request(DR_NOOP, 0, NULL); + /* fall through */ + case DC_KILL: + case DC_RESTART: pause = 0; break; } @@ -272,6 +285,18 @@ usr_input() /* get user input and process it */ case DC_PAUSE: /* pause the current calculation */ case DC_RESUME: /* resume the calculation */ /* handled in main() */ + break; + case DC_REDRAW: /* redraw from server */ + imm_mode = beam_sync() > 0; + break; + case DC_KILL: /* kill rtrace process(es) */ + serv_request(DR_KILL, 0, NULL); + break; + case DC_CLOBBER: /* clobber holodeck */ + serv_request(DR_CLOBBER, 0, NULL); + break; + case DC_RESTART: /* restart rtrace */ + serv_request(DR_RESTART, 0, NULL); break; case DC_QUIT: /* quit request */ serv_request(DR_SHUTDOWN, 0, NULL);