diff options
Diffstat (limited to 'term_ascii.c')
-rw-r--r-- | term_ascii.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/term_ascii.c b/term_ascii.c index c4428073..8a2458c3 100644 --- a/term_ascii.c +++ b/term_ascii.c @@ -1,4 +1,4 @@ -/* $Id: term_ascii.c,v 1.30 2014/08/14 22:33:10 schwarze Exp $ */ +/* $Id: term_ascii.c,v 1.31 2014/08/16 19:00:01 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -19,14 +19,14 @@ #include <sys/types.h> -#ifdef USE_WCHAR +#if HAVE_WCHAR #include <locale.h> #endif #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> -#ifdef USE_WCHAR +#if HAVE_WCHAR #include <wchar.h> #endif @@ -36,17 +36,6 @@ #include "term.h" #include "main.h" -/* - * Sadly, this doesn't seem to be defined on systems even when they - * support it. For the time being, remove it and let those compiling - * the software decide for themselves what to use. - */ -#if 0 -#if ! defined(__STDC_ISO_10646__) -# undef USE_WCHAR -#endif -#endif - static struct termp *ascii_init(enum termenc, char *); static double ascii_hspan(const struct termp *, const struct roffsu *); @@ -58,7 +47,7 @@ static void ascii_endline(struct termp *); static void ascii_letter(struct termp *, int); static void ascii_setwidth(struct termp *, int, size_t); -#ifdef USE_WCHAR +#if HAVE_WCHAR static void locale_advance(struct termp *, size_t); static void locale_endline(struct termp *); static void locale_letter(struct termp *, int); @@ -90,7 +79,7 @@ ascii_init(enum termenc enc, char *outopts) p->setwidth = ascii_setwidth; p->width = ascii_width; -#ifdef USE_WCHAR +#if HAVE_WCHAR if (TERMENC_ASCII != enc) { v = TERMENC_LOCALE == enc ? setlocale(LC_ALL, "") : @@ -272,7 +261,7 @@ ascii_hspan(const struct termp *p, const struct roffsu *su) return(r); } -#ifdef USE_WCHAR +#if HAVE_WCHAR static size_t locale_width(const struct termp *p, int c) { |