| 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> |
| 378 |
|
if (!x11_driver.inpready) |
| 379 |
|
fputs(prompt, stdout); |
| 380 |
|
} |
| 381 |
+ |
#ifdef FNDELAY |
| 382 |
+ |
if (inpcheck == IC_READ) { /* turn off FNDELAY */ |
| 383 |
+ |
if (fcntl(fileno(stdin), F_SETFL, 0) < 0) { |
| 384 |
+ |
stderr_v("Cannot change input mode\n"); |
| 385 |
+ |
quit(1); |
| 386 |
+ |
} |
| 387 |
+ |
inpcheck = IC_IOCTL; |
| 388 |
+ |
} |
| 389 |
+ |
#endif |
| 390 |
|
if (gets(inp) == NULL) { |
| 391 |
|
strcpy(inp, "quit"); |
| 392 |
|
return; |