| 367 | #endif /* USE_QIO_INPUT */ |
| 368 | |
| 369 | static void |
| 370 | setctty(void) |
| 371 | { |
| 372 | struct _sm_iosb iosb; |
| 373 | unsigned long status; |
| 374 | |
| 375 | status = sys$qiow(0, tt_chan, IO$_SETMODE, &iosb, (void (*) ()) 0, 0, |
| 376 | &sg.sm, sizeof sg.sm, 0, 0, 0, 0); |
| 377 | if (vms_ok(status)) |
| 378 | status = iosb.status; |
| 379 | if (vms_ok(status)) { |
| 380 | /* try to force terminal into synch with TTDRIVER's setting */ |
| 381 | number_pad((sg.sm.tt2_char & TT2$M_APP_KEYPAD) ? -1 : 1); |
| 382 | } else { |
| 383 | raw_print(""); |
| 384 | errno = EVMSERR, vaxc$errno = status; |
| 385 | perror("NetHack(setctty: setmode)"); |
| 386 | wait_synch(); |
| 387 | } |
| 388 | } |
| 389 | |
| 390 | /* atexit() routine */ |
| 391 | static void |
no test coverage detected