| 16 |
|
#define HDSUF ".hdi" |
| 17 |
|
#endif |
| 18 |
|
|
| 19 |
+ |
#ifndef FNONBLK |
| 20 |
+ |
#define FNONBLK O_NONBLOCK |
| 21 |
+ |
#endif |
| 22 |
+ |
|
| 23 |
|
static int inp_flags; |
| 24 |
|
static int dpd[3]; |
| 25 |
|
static FILE *dpout; |
| 109 |
|
return(2); /* acceptable failure */ |
| 110 |
|
} |
| 111 |
|
if (msg.nbytes) { /* get the message body */ |
| 112 |
+ |
if (msg.nbytes < 0) |
| 113 |
+ |
error(INTERNAL, "anti-message from display process"); |
| 114 |
|
buf = (char *)malloc(msg.nbytes); |
| 115 |
|
if (buf == NULL) |
| 116 |
|
error(SYSTEM, "out of memory in disp_check"); |
| 163 |
|
error(INTERNAL, "bad DR_DELSET from display process"); |
| 164 |
|
bundle_set(BS_DEL, (PACKHEAD *)buf, msg.nbytes/sizeof(PACKHEAD)); |
| 165 |
|
break; |
| 166 |
+ |
case DR_VIEWPOINT: /* set target eye position */ |
| 167 |
+ |
if (msg.nbytes != sizeof(VIEWPOINT)) |
| 168 |
+ |
error(INTERNAL, "bad DR_VIEWPOINT from display process"); |
| 169 |
+ |
copystruct(&myeye, (VIEWPOINT *)buf); |
| 170 |
+ |
break; |
| 171 |
|
case DR_ATTEN: /* block for priority request */ |
| 172 |
|
if (msg.nbytes) |
| 173 |
|
error(INTERNAL, "bad DR_ATTEN from display process"); |
| 240 |
|
char *p; |
| 241 |
|
{ |
| 242 |
|
MSGHEAD msg; |
| 243 |
< |
|
| 243 |
> |
/* consistency checks */ |
| 244 |
> |
#ifdef DEBUG |
| 245 |
> |
if (nbytes < 0 || nbytes > 0 & p == NULL) |
| 246 |
> |
error(CONSISTENCY, "bad buffer handed to disp_result"); |
| 247 |
> |
#endif |
| 248 |
|
if (dpout == NULL) |
| 249 |
|
return; |
| 250 |
|
msg.type = type; |