summaryrefslogtreecommitdiff
path: root/lib/libcurses/unctrl.h
diff options
context:
space:
mode:
authorblymn <blymn@NetBSD.org>2007-05-28 15:01:53 +0000
committerblymn <blymn@NetBSD.org>2007-05-28 15:01:53 +0000
commite124de36d8a3bb2fd90b77ec25eb7736f29ee44d (patch)
tree0dac708fd51eee66b5194f8e69d6fe165e953031 /lib/libcurses/unctrl.h
parent599840187d9b53fe3353daa7f2892b387a1c2f29 (diff)
Merge in wide curses code done as a Summer of Code project by
Ruibiao Qiu.
Diffstat (limited to 'lib/libcurses/unctrl.h')
-rw-r--r--lib/libcurses/unctrl.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/libcurses/unctrl.h b/lib/libcurses/unctrl.h
index 3e38c4dd9c4..f8a04cf8093 100644
--- a/lib/libcurses/unctrl.h
+++ b/lib/libcurses/unctrl.h
@@ -1,4 +1,4 @@
-/* $NetBSD: unctrl.h,v 1.3 2004/02/14 18:23:45 christos Exp $ */
+/* $NetBSD: unctrl.h,v 1.4 2007/05/28 15:01:58 blymn Exp $ */
/*
* Copyright (c) 1982, 1993
@@ -35,14 +35,24 @@
#define _UNCTRL_H_
#include <sys/cdefs.h>
+#ifdef HAVE_WCHAR
+#include <wchar.h>
+#include <curses.h>
+#endif /* HAVE_WCHAR */
__BEGIN_DECLS
extern const char * const __unctrl[]; /* Control strings. */
extern const unsigned char __unctrllen[]; /* Control strings length. */
+#ifdef HAVE_WCHAR
+extern const wchar_t * const __wunctrl[]; /* Wide char control strings. */
+#endif /* HAVE_WCHAR */
__END_DECLS
/* 8-bit ASCII characters. */
#define unctrl(c) __unctrl[((unsigned char)c) & 0xff]
-#define unctrllen(c) __unctrllen[((unsigned char)c) & 0xff]
+#define unctrllen(c) __unctrllen[((unsigned char)c) & 0xff]
+#ifdef HAVE_WCHAR
+#define wunctrl(wc) __wunctrl[( int )(wc->vals[ 0 ]) & 0xff]
+#endif /* HAVE_WCHAR */
#endif /* _UNCTRL_H_ */