diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-21 16:29:46 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-21 16:29:46 +0000 |
commit | 91c91cb5cdc99ce5acf2beda2cc9fd811535e16e (patch) | |
tree | f2cea7c0e6b8c11d126f09bb53191027f3ad7289 /terms.c | |
parent | [w3m-dev 02473] clean & install-scripts (diff) | |
download | w3m-91c91cb5cdc99ce5acf2beda2cc9fd811535e16e.tar.gz w3m-91c91cb5cdc99ce5acf2beda2cc9fd811535e16e.zip |
[w3m-dev 02479] #ifdef cleanups
make -> $(MAKE)
Diffstat (limited to 'terms.c')
-rw-r--r-- | terms.c | 19 |
1 files changed, 8 insertions, 11 deletions
@@ -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 */ |