1 /* NetHack 3.6 pctty.c $NHDT-Date: 1432512787 2015/05/25 00:13:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /*-Copyright (c) Michael Allison, 2005. */
4 /* NetHack may be freely redistributed. See license for details. */
6 /* tty.c - (PC) version */
8 #define NEED_VARARGS /* Uses ... */ /* comment line for pre-compiled headers \
13 char erase_char, kill_char;
16 * Get initial state of terminal, set ospeed (for termcap routines)
17 * and switch off tab expansion if necessary.
18 * Called by startup() in termcap.c and after returning from ! or ^Z
24 kill_char = 21; /* cntl-U */
27 disable_ctrlP(); /* turn off ^P processing */
29 #if defined(MSDOS) && defined(NO_TERMS)
34 /* reset terminal to original state */
39 #if defined(MSDOS) && defined(NO_TERMS)
46 enable_ctrlP(); /* turn on ^P processing */
50 /* called by init_nhwindows() and resume_nhwindows() */
57 #if defined(TIMED_DELAY) && defined(_MSC_VER)
62 /* now uses clock() which is ANSI C */
65 goal = mseconds + clock();
66 while (goal > clock()) {
76 VA_DECL(const char *, s)
79 VA_INIT(s, const char *);
80 /* error() may get called before tty is initialized */
81 if (iflags.window_inited)