1 /* aNetHack 0.0.1 pctty.c $ANH-Date: 1432512787 2015/05/25 00:13:07 $ $ANH-Branch: master $:$ANH-Revision: 1.11 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* aNetHack may be freely redistributed. See license for details. */
5 /* tty.c - (PC) version */
7 #define NEED_VARARGS /* Uses ... */ /* comment line for pre-compiled headers \
12 char erase_char
, kill_char
;
15 * Get initial state of terminal, set ospeed (for termcap routines)
16 * and switch off tab expansion if necessary.
17 * Called by startup() in termcap.c and after returning from ! or ^Z
23 kill_char
= 21; /* cntl-U */
26 disable_ctrlP(); /* turn off ^P processing */
28 #if defined(MSDOS) && defined(NO_TERMS)
33 /* reset terminal to original state */
38 #if defined(MSDOS) && defined(NO_TERMS)
45 enable_ctrlP(); /* turn on ^P processing */
49 /* called by init_nhwindows() and resume_nhwindows() */
56 #if defined(TIMED_DELAY) && defined(_MSC_VER)
61 /* now uses clock() which is ANSI C */
64 goal
= mseconds
+ clock();
65 while (goal
> clock()) {
75 VA_DECL(const char *, s
)
78 VA_INIT(s
, const char *);
79 /* error() may get called before tty is initialized */
80 if (iflags
.window_inited
)