/
unixtty.c
67 lines (56 loc) · 1.18 KB
/
unixtty.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* SCCS Id: @(#)unixtty.c 3.4 1990/22/02 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
/* tty.c - (Unix) version */
/* With thanks to the people who sent code for SYSV - hpscdi!jon,
* arnold@ucsf-cgl, wcs@bo95b, cbcephus!pds and others.
*/
#define NEED_VARARGS
#include "hack.h"
static void
setctty()
{
}
/*
* Get initial state of terminal, set ospeed (for termcap routines)
* and switch off tab expansion if necessary.
* Called by startup() in termcap.c and after returning from ! or ^Z
*/
void
gettty()
{
}
/* reset terminal to original state */
void
settty(s)
const char *s;
{
end_screen();
if(s) raw_print(s);
}
void
setftty()
{
iflags.cbreak = ON;
iflags.echo = OFF;
start_screen();
}
void
intron() /* enable kbd interupts if enabled when game started */
{
}
void
introff() /* disable kbd interrupts if required*/
{
}
void
error VA_DECL(const char *,s)
VA_START(s);
VA_INIT(s, const char *);
char out[1024];
Vsprintf(out, s,VA_ARGS);
nh_output(out, strlen(out));
(void) nh_output("\r\n", 2);
VA_END();
nh_exit(EXIT_FAILURE);
}