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"); |
235 |
|
char *p; |
236 |
|
{ |
237 |
|
MSGHEAD msg; |
238 |
< |
|
238 |
> |
/* consistency checks */ |
239 |
> |
#ifdef DEBUG |
240 |
> |
if (nbytes < 0 || nbytes > 0 & p == NULL) |
241 |
> |
error(CONSISTENCY, "bad buffer handed to disp_result"); |
242 |
> |
#endif |
243 |
|
if (dpout == NULL) |
244 |
|
return; |
245 |
|
msg.type = type; |