56 |
|
/* enter main loop */ |
57 |
|
do { |
58 |
|
rdy = disp_wait(); |
59 |
+ |
if (rdy & RDY_SRV) { /* process server result */ |
60 |
+ |
res = serv_result(); |
61 |
+ |
if (pause && res != DS_SHUTDOWN) { |
62 |
+ |
serv_request(DR_ATTEN, 0, NULL); |
63 |
+ |
while ((res = serv_result()) != DS_ACKNOW && |
64 |
+ |
res != DS_SHUTDOWN) |
65 |
+ |
; |
66 |
+ |
} |
67 |
+ |
} |
68 |
|
if (rdy & RDY_DEV) { /* user input from driver */ |
69 |
|
inp = dev_input(); |
70 |
|
if (inp & DFL(DC_SETVIEW)) |
107 |
|
pause = 0; |
108 |
|
break; |
109 |
|
} |
101 |
– |
if (rdy & RDY_SRV) { /* process server result */ |
102 |
– |
res = serv_result(); |
103 |
– |
if (pause && res != DS_SHUTDOWN) { |
104 |
– |
serv_request(DR_ATTEN, 0, NULL); |
105 |
– |
while ((res = serv_result()) != DS_ACKNOW && |
106 |
– |
res != DS_SHUTDOWN) |
107 |
– |
; |
108 |
– |
} |
109 |
– |
} |
110 |
|
} while (res != DS_SHUTDOWN); |
111 |
|
/* all done */ |
112 |
|
quit(0); |
355 |
|
case DS_STARTIMM: |
356 |
|
case DS_ENDIMM: |
357 |
|
imm_mode = msg.type==DS_STARTIMM; |
358 |
– |
if (msg.type == DS_ENDIMM) |
359 |
– |
dev_flush(); /* update display NOW */ |
358 |
|
/* fall through */ |
359 |
|
case DS_ACKNOW: |
360 |
|
case DS_SHUTDOWN: |