summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjdc <jdc@NetBSD.org>2007-09-19 22:00:43 +0000
committerjdc <jdc@NetBSD.org>2007-09-19 22:00:43 +0000
commit260ad27047779cda35b4eae10ae80a697f4e2bb4 (patch)
treea87bfb5c39bab7a786a60f63a7578047aeabc99f /lib
parentc1726648035cf4592e4792f06595905a0bb1c7aa (diff)
We don't need separate #ifdef's for __ALTCHARSET and WA_ALTCHARSET, as they
are defined to be the same in curses.h.
Diffstat (limited to 'lib')
-rw-r--r--lib/libcurses/refresh.c26
-rw-r--r--lib/libcurses/setterm.c7
2 files changed, 4 insertions, 29 deletions
diff --git a/lib/libcurses/refresh.c b/lib/libcurses/refresh.c
index ea83f00d3b3..355f28f3e5b 100644
--- a/lib/libcurses/refresh.c
+++ b/lib/libcurses/refresh.c
@@ -1,4 +1,4 @@
-/* $NetBSD: refresh.c,v 1.67 2007/05/29 19:07:19 veego Exp $ */
+/* $NetBSD: refresh.c,v 1.68 2007/09/19 22:00:43 jdc Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94";
#else
-__RCSID("$NetBSD: refresh.c,v 1.67 2007/05/29 19:07:19 veego Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.68 2007/09/19 22:00:43 jdc Exp $");
#endif
#endif /* not lint */
@@ -905,17 +905,10 @@ makech(int wy)
off &= __mask_se;
}
-#ifndef HAVE_WCHAR
if (off & __ALTCHARSET && __tc_ae != NULL) {
tputs(__tc_ae, 0, __cputchar);
curscr->wattr &= ~__ALTCHARSET;
}
-#else
- if (off & WA_ALTCHARSET && __tc_ae != NULL) {
- tputs(__tc_ae, 0, __cputchar);
- curscr->wattr &= ~WA_ALTCHARSET;
- }
-#endif /* HAVE_WCHAR */
/* Set/change colour as appropriate. */
if (__using_color)
@@ -1000,19 +993,11 @@ makech(int wy)
}
/* Enter/exit altcharset mode as appropriate. */
-#ifndef HAVE_WCHAR
if (on & __ALTCHARSET && __tc_as != NULL &&
__tc_ae != NULL) {
tputs(__tc_as, 0, __cputchar);
curscr->wattr |= __ALTCHARSET;
}
-#else
- if (on & WA_ALTCHARSET && __tc_as != NULL &&
- __tc_ae != NULL) {
- tputs(__tc_as, 0, __cputchar);
- curscr->wattr |= WA_ALTCHARSET;
- }
-#endif /* HAVE_WCHAR */
wx++;
if (wx >= win->maxx &&
@@ -1723,17 +1708,10 @@ __unsetattr(int checkms)
curscr->wattr &= __mask_me;
}
/* Don't leave the screen with altcharset set (don't check ms). */
-#ifndef HAVE_WCHAR
if (curscr->wattr & __ALTCHARSET) {
tputs(__tc_ae, 0, __cputchar);
curscr->wattr &= ~__ALTCHARSET;
}
-#else
- if (curscr->wattr & WA_ALTCHARSET) {
- tputs(__tc_ae, 0, __cputchar);
- curscr->wattr &= ~WA_ALTCHARSET;
- }
-#endif /* HAVE_WCHAR */
/* Don't leave the screen with colour set (check against ms). */
if (__using_color && isms)
__unset_color(curscr);
diff --git a/lib/libcurses/setterm.c b/lib/libcurses/setterm.c
index 5733962914d..38684558d89 100644
--- a/lib/libcurses/setterm.c
+++ b/lib/libcurses/setterm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: setterm.c,v 1.41 2007/05/28 15:01:57 blymn Exp $ */
+/* $NetBSD: setterm.c,v 1.42 2007/09/19 22:00:43 jdc Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)setterm.c 8.8 (Berkeley) 10/25/94";
#else
-__RCSID("$NetBSD: setterm.c,v 1.41 2007/05/28 15:01:57 blymn Exp $");
+__RCSID("$NetBSD: setterm.c,v 1.42 2007/09/19 22:00:43 jdc Exp $");
#endif
#endif /* not lint */
@@ -257,11 +257,8 @@ _cursesi_setterm(char *type, SCREEN *screen)
if (screen->tc_me != NULL && does_ctrl_o(screen->tc_me))
screen->mask_me = 0;
else
-#ifndef HAVE_WCHAR
screen->mask_me = __ALTCHARSET;
-#else
screen->mask_me = WA_ALTCHARSET;
-#endif /* HAVE_WCHAR */
/* Check what turning off the attributes also turns off */
#ifndef HAVE_WCHAR