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_QUIT)) |
76 |
+ |
serv_request(DR_SHUTDOWN, 0, NULL); |
77 |
|
} |
78 |
|
if (rdy & RDY_SIN) /* user input from sstdin */ |
79 |
|
switch (usr_input()) { |
272 |
|
case DC_PAUSE: /* pause the current calculation */ |
273 |
|
case DC_RESUME: /* resume the calculation */ |
274 |
|
/* handled in main() */ |
275 |
+ |
break; |
276 |
+ |
case DC_REDRAW: /* redraw from server */ |
277 |
+ |
imm_mode = beam_sync() > 0; |
278 |
|
break; |
279 |
|
case DC_QUIT: /* quit request */ |
280 |
|
serv_request(DR_SHUTDOWN, 0, NULL); |