14 |
|
#include <math.h> |
15 |
|
#include <sys/ioctl.h> |
16 |
|
#include <fcntl.h> |
17 |
+ |
#ifdef sparc |
18 |
+ |
#include <sys/conf.h> |
19 |
+ |
#include <sys/file.h> |
20 |
+ |
#include <sys/filio.h> |
21 |
+ |
#endif |
22 |
|
|
23 |
|
#include <X11/Xlib.h> |
24 |
|
#include <X11/cursorfont.h> |
303 |
|
n = XPending(ourdisplay); /* from X server */ |
304 |
|
while (n-- > 0) |
305 |
|
getevent(); |
306 |
+ |
#ifdef FNDELAY |
307 |
|
if (inpcheck == IC_IOCTL) { /* from stdin */ |
308 |
+ |
#ifdef FIONREAD |
309 |
|
if (ioctl(fileno(stdin), FIONREAD, &n) < 0) { |
310 |
+ |
#else |
311 |
+ |
if (1) { |
312 |
+ |
#endif |
313 |
|
if (fcntl(fileno(stdin), F_SETFL, FNDELAY) < 0) { |
314 |
|
stderr_v("Cannot change input mode\n"); |
315 |
|
quit(1); |
325 |
|
tocombuf(buf, &x11_driver); |
326 |
|
} |
327 |
|
} |
328 |
+ |
#endif |
329 |
|
} |
330 |
|
|
331 |
|
|