aboutsummaryrefslogtreecommitdiffstats
path: root/terms.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-11-21 16:29:46 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-11-21 16:29:46 +0000
commit91c91cb5cdc99ce5acf2beda2cc9fd811535e16e (patch)
treef2cea7c0e6b8c11d126f09bb53191027f3ad7289 /terms.c
parent[w3m-dev 02473] clean & install-scripts (diff)
downloadw3m-91c91cb5cdc99ce5acf2beda2cc9fd811535e16e.tar.gz
w3m-91c91cb5cdc99ce5acf2beda2cc9fd811535e16e.zip
[w3m-dev 02479] #ifdef cleanups
make -> $(MAKE)
Diffstat (limited to 'terms.c')
-rw-r--r--terms.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/terms.c b/terms.c
index 4c488d8..f494fe7 100644
--- a/terms.c
+++ b/terms.c
@@ -1,4 +1,4 @@
-/* $Id: terms.c,v 1.10 2001/11/21 09:09:10 ukai Exp $ */
+/* $Id: terms.c,v 1.11 2001/11/21 16:29:47 ukai Exp $ */
/*
* An original curses library for EUC-kanji by Akinori ITO, December 1989
* revised by Akinori ITO, January 1995
@@ -237,11 +237,7 @@ set_tty(void)
if (isatty(0)) /* stdin */
ttyn = ttyname(0);
else
-#ifndef __EMX__
- ttyn = "/dev/tty";
-#else /* __EMX__ */
- ttyn = "con";
-#endif /* __EMX__ */
+ ttyn = DEV_TTY_PATH;
tty = open(ttyn, O_RDWR);
if (tty < 0) {
/* use stderr instead of stdin... is it OK???? */
@@ -413,11 +409,12 @@ getTCstr(void)
char *pt = funcstr;
int r;
-#ifdef __DJGPP__
- ent = getenv("TERM") ? getenv("TERM") : "dosansi";
-#else
- ent = getenv("TERM");
-#endif /* __DJGPP__ */
+ ent = getenv("TERM") ? getenv("TERM") : DEFAULT_TERM;
+ if (ent == NULL) {
+ fprintf(stderr, "TERM is not set\n");
+ reset_exit(SIGNAL_ARGLIST);
+ }
+
r = tgetent(bp, ent);
if (r != 1) {
/* Can't find termcap entry */