58 |
|
rdy = disp_wait(); |
59 |
|
if (rdy & RDY_DEV) { /* user input from driver */ |
60 |
|
inp = dev_input(); |
61 |
< |
if (inp & DEV_PUTVIEW) |
62 |
< |
printview(); |
63 |
< |
if (inp & DEV_NEWVIEW) |
61 |
> |
if (inp & DFL(DC_SETVIEW)) |
62 |
|
new_view(&odev.v); |
63 |
< |
if (inp & DEV_LASTVIEW) |
63 |
> |
if (inp & DFL(DC_GETVIEW)) |
64 |
> |
printview(); |
65 |
> |
if (inp & DFL(DC_LASTVIEW)) |
66 |
|
new_view(NULL); |
67 |
< |
if (inp & DEV_SHUTDOWN) |
68 |
< |
serv_request(DR_SHUTDOWN, 0, NULL); |
69 |
< |
if (inp & DEV_REDRAW) |
70 |
< |
imm_mode = beam_sync() > 0; |
71 |
< |
if (inp & DEV_WAIT) |
67 |
> |
if (inp & DFL(DC_PAUSE)) |
68 |
|
pause = 1; |
69 |
< |
if (inp & DEV_RESUME) { |
69 |
> |
if (inp & DFL(DC_RESUME)) { |
70 |
|
serv_request(DR_NOOP, 0, NULL); |
71 |
|
pause = 0; |
72 |
|
} |
73 |
+ |
if (inp & DFL(DC_REDRAW)) |
74 |
+ |
imm_mode = beam_sync() > 0; |
75 |
+ |
if (inp & DFL(DC_KILL)) |
76 |
+ |
serv_request(DR_KILL, 0, NULL); |
77 |
+ |
if (inp & DFL(DC_CLOBBER)) |
78 |
+ |
serv_request(DR_CLOBBER, 0, NULL); |
79 |
+ |
if (inp & DFL(DC_RESTART)) |
80 |
+ |
serv_request(DR_RESTART, 0, NULL); |
81 |
+ |
if (inp & DFL(DC_QUIT)) |
82 |
+ |
serv_request(DR_SHUTDOWN, 0, NULL); |
83 |
|
} |
84 |
|
if (rdy & RDY_SIN) /* user input from sstdin */ |
85 |
|
switch (usr_input()) { |
278 |
|
case DC_PAUSE: /* pause the current calculation */ |
279 |
|
case DC_RESUME: /* resume the calculation */ |
280 |
|
/* handled in main() */ |
281 |
+ |
break; |
282 |
+ |
case DC_REDRAW: /* redraw from server */ |
283 |
+ |
imm_mode = beam_sync() > 0; |
284 |
+ |
break; |
285 |
+ |
case DC_KILL: /* kill rtrace process(es) */ |
286 |
+ |
serv_request(DR_KILL, 0, NULL); |
287 |
+ |
break; |
288 |
+ |
case DC_CLOBBER: /* clobber holodeck */ |
289 |
+ |
serv_request(DR_CLOBBER, 0, NULL); |
290 |
+ |
break; |
291 |
+ |
case DC_RESTART: /* restart rtrace */ |
292 |
+ |
serv_request(DR_RESTART, 0, NULL); |
293 |
|
break; |
294 |
|
case DC_QUIT: /* quit request */ |
295 |
|
serv_request(DR_SHUTDOWN, 0, NULL); |