aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/include/curses.wide
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/include/curses.wide')
-rw-r--r--contrib/ncurses/include/curses.wide128
1 files changed, 70 insertions, 58 deletions
diff --git a/contrib/ncurses/include/curses.wide b/contrib/ncurses/include/curses.wide
index c5577541ba44..896ecd265435 100644
--- a/contrib/ncurses/include/curses.wide
+++ b/contrib/ncurses/include/curses.wide
@@ -1,21 +1,26 @@
-
+/*
+ * This file is part of ncurses, designed to be appended after curses.h.in
+ * (see that file for the relevant copyright).
+ */
#ifdef _XOPEN_SOURCE_EXTENDED
-/* $Id: curses.wide,v 1.23 2002/05/11 22:25:33 tom Exp $ */
+/* $Id: curses.wide,v 1.32 2006/05/27 19:44:23 tom Exp $ */
extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
-#define WACS_BSSB (&_nc_wacs['l'])
-#define WACS_SSBB (&_nc_wacs['m'])
-#define WACS_BBSS (&_nc_wacs['k'])
-#define WACS_SBBS (&_nc_wacs['j'])
-#define WACS_SBSS (&_nc_wacs['u'])
-#define WACS_SSSB (&_nc_wacs['t'])
-#define WACS_SSBS (&_nc_wacs['v'])
-#define WACS_BSSS (&_nc_wacs['w'])
-#define WACS_BSBS (&_nc_wacs['q'])
-#define WACS_SBSB (&_nc_wacs['x'])
-#define WACS_SSSS (&_nc_wacs['n'])
+#define NCURSES_WACS(c) (&_nc_wacs[(unsigned char)c])
+
+#define WACS_BSSB NCURSES_WACS('l')
+#define WACS_SSBB NCURSES_WACS('m')
+#define WACS_BBSS NCURSES_WACS('k')
+#define WACS_SBBS NCURSES_WACS('j')
+#define WACS_SBSS NCURSES_WACS('u')
+#define WACS_SSSB NCURSES_WACS('t')
+#define WACS_SSBS NCURSES_WACS('v')
+#define WACS_BSSS NCURSES_WACS('w')
+#define WACS_BSBS NCURSES_WACS('q')
+#define WACS_SBSB NCURSES_WACS('x')
+#define WACS_SSSS NCURSES_WACS('n')
#define WACS_ULCORNER WACS_BSSB
#define WACS_LLCORNER WACS_SSBB
@@ -29,31 +34,31 @@ extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
#define WACS_VLINE WACS_SBSB
#define WACS_PLUS WACS_SSSS
-#define WACS_S1 (&_nc_wacs['o']) /* scan line 1 */
-#define WACS_S9 (&_nc_wacs['s']) /* scan line 9 */
-#define WACS_DIAMOND (&_nc_wacs['`']) /* diamond */
-#define WACS_CKBOARD (&_nc_wacs['a']) /* checker board */
-#define WACS_DEGREE (&_nc_wacs['f']) /* degree symbol */
-#define WACS_PLMINUS (&_nc_wacs['g']) /* plus/minus */
-#define WACS_BULLET (&_nc_wacs['~']) /* bullet */
+#define WACS_S1 NCURSES_WACS('o') /* scan line 1 */
+#define WACS_S9 NCURSES_WACS('s') /* scan line 9 */
+#define WACS_DIAMOND NCURSES_WACS('`') /* diamond */
+#define WACS_CKBOARD NCURSES_WACS('a') /* checker board */
+#define WACS_DEGREE NCURSES_WACS('f') /* degree symbol */
+#define WACS_PLMINUS NCURSES_WACS('g') /* plus/minus */
+#define WACS_BULLET NCURSES_WACS('~') /* bullet */
/* Teletype 5410v1 symbols */
-#define WACS_LARROW (&_nc_wacs[',']) /* arrow left */
-#define WACS_RARROW (&_nc_wacs['+']) /* arrow right */
-#define WACS_DARROW (&_nc_wacs['.']) /* arrow down */
-#define WACS_UARROW (&_nc_wacs['-']) /* arrow up */
-#define WACS_BOARD (&_nc_wacs['h']) /* board of squares */
-#define WACS_LANTERN (&_nc_wacs['i']) /* lantern symbol */
-#define WACS_BLOCK (&_nc_wacs['0']) /* solid square block */
+#define WACS_LARROW NCURSES_WACS(',') /* arrow left */
+#define WACS_RARROW NCURSES_WACS('+') /* arrow right */
+#define WACS_DARROW NCURSES_WACS('.') /* arrow down */
+#define WACS_UARROW NCURSES_WACS('-') /* arrow up */
+#define WACS_BOARD NCURSES_WACS('h') /* board of squares */
+#define WACS_LANTERN NCURSES_WACS('i') /* lantern symbol */
+#define WACS_BLOCK NCURSES_WACS('0') /* solid square block */
/* ncurses extensions */
-#define WACS_S3 (&_nc_wacs['p']) /* scan line 3 */
-#define WACS_S7 (&_nc_wacs['r']) /* scan line 7 */
-#define WACS_LEQUAL (&_nc_wacs['y']) /* less/equal */
-#define WACS_GEQUAL (&_nc_wacs['z']) /* greater/equal */
-#define WACS_PI (&_nc_wacs['{']) /* Pi */
-#define WACS_NEQUAL (&_nc_wacs['|']) /* not equal */
-#define WACS_STERLING (&_nc_wacs['}']) /* UK pound sign */
+#define WACS_S3 NCURSES_WACS('p') /* scan line 3 */
+#define WACS_S7 NCURSES_WACS('r') /* scan line 7 */
+#define WACS_LEQUAL NCURSES_WACS('y') /* less/equal */
+#define WACS_GEQUAL NCURSES_WACS('z') /* greater/equal */
+#define WACS_PI NCURSES_WACS('{') /* Pi */
+#define WACS_NEQUAL NCURSES_WACS('|') /* not equal */
+#define WACS_STERLING NCURSES_WACS('}') /* UK pound sign */
/*
* Function prototypes for wide-character operations.
@@ -74,23 +79,23 @@ extern NCURSES_EXPORT(void) bkgrndset (const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) border_set (const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*); /* generated:WIDEC */
extern NCURSES_EXPORT(int) box_set (WINDOW *, const cchar_t *, const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) echo_wchar (const cchar_t *); /* generated:WIDEC */
-extern NCURSES_EXPORT(int) erasewchar (wchar_t*); /* implemented:WIDEC */
+extern NCURSES_EXPORT(int) erasewchar (wchar_t*); /* implemented */
extern NCURSES_EXPORT(int) get_wch (wint_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) get_wstr (wint_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) getbkgrnd (cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) getcchar (const cchar_t *, wchar_t*, attr_t*, short*, void*); /* implemented */
extern NCURSES_EXPORT(int) getn_wstr (wint_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) hline_set (const cchar_t *, int); /* generated:WIDEC */
-extern NCURSES_EXPORT(int) in_wch (NCURSES_CONST cchar_t *); /* generated:WIDEC */
-extern NCURSES_EXPORT(int) in_wchnstr (NCURSES_CONST cchar_t *, int); /* generated:WIDEC */
-extern NCURSES_EXPORT(int) in_wchstr (NCURSES_CONST cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) in_wch (cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) in_wchnstr (cchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) in_wchstr (cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) innwstr (wchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) ins_nwstr (const wchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) ins_wch (const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) ins_wstr (const wchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) inwstr (wchar_t *); /* generated:WIDEC */
-extern NCURSES_EXPORT(char*) key_name (wchar_t); /* implemented */
-extern NCURSES_EXPORT(int) killwchar (wchar_t *); /* implemented:WIDEC */
+extern NCURSES_EXPORT(NCURSES_CONST char*) key_name (wchar_t); /* implemented */
+extern NCURSES_EXPORT(int) killwchar (wchar_t *); /* implemented */
extern NCURSES_EXPORT(int) mvadd_wch (int, int, const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvadd_wchnstr (int, int, const cchar_t *, int);/* generated:WIDEC */
extern NCURSES_EXPORT(int) mvadd_wchstr (int, int, const cchar_t *); /* generated:WIDEC */
@@ -100,9 +105,9 @@ extern NCURSES_EXPORT(int) mvget_wch (int, int, wint_t *); /* generated:WIDEC *
extern NCURSES_EXPORT(int) mvget_wstr (int, int, wint_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvgetn_wstr (int, int, wint_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvhline_set (int, int, const cchar_t *, int); /* generated:WIDEC */
-extern NCURSES_EXPORT(int) mvin_wch (int, int, NCURSES_CONST cchar_t *); /* generated:WIDEC */
-extern NCURSES_EXPORT(int) mvin_wchnstr (int, int, NCURSES_CONST cchar_t *, int); /* generated:WIDEC */
-extern NCURSES_EXPORT(int) mvin_wchstr (int, int, NCURSES_CONST cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvin_wch (int, int, cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvin_wchnstr (int, int, cchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvin_wchstr (int, int, cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvinnwstr (int, int, wchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvins_nwstr (int, int, const wchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvins_wch (int, int, const cchar_t *); /* generated:WIDEC */
@@ -118,22 +123,22 @@ extern NCURSES_EXPORT(int) mvwget_wch (WINDOW *, int, int, wint_t *); /* generat
extern NCURSES_EXPORT(int) mvwget_wstr (WINDOW *, int, int, wint_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwgetn_wstr (WINDOW *, int, int, wint_t *, int);/* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwhline_set (WINDOW *, int, int, const cchar_t *, int);/* generated:WIDEC */
-extern NCURSES_EXPORT(int) mvwin_wch (WINDOW *, int, int, NCURSES_CONST cchar_t *); /* generated:WIDEC */
-extern NCURSES_EXPORT(int) mvwin_wchnstr (WINDOW *, int,int, NCURSES_CONST cchar_t *,int); /* generated:WIDEC */
-extern NCURSES_EXPORT(int) mvwin_wchstr (WINDOW *, int, int, NCURSES_CONST cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwin_wch (WINDOW *, int, int, cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwin_wchnstr (WINDOW *, int,int, cchar_t *,int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwin_wchstr (WINDOW *, int, int, cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwinnwstr (WINDOW *, int, int, wchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwins_nwstr (WINDOW *, int,int, const wchar_t *,int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwins_wch (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwins_wstr (WINDOW *, int, int, const wchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwinwstr (WINDOW *, int, int, wchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) mvwvline_set (WINDOW *, int,int, const cchar_t *,int); /* generated:WIDEC */
-extern NCURSES_EXPORT(int) pecho_wchar (WINDOW *, const cchar_t *); /* missing */
+extern NCURSES_EXPORT(int) pecho_wchar (WINDOW *, const cchar_t *); /* implemented */
extern NCURSES_EXPORT(int) setcchar (cchar_t *, const wchar_t *, const attr_t, short, const void *); /* implemented */
-extern NCURSES_EXPORT(int) slk_wset (int, const wchar_t *, int); /* missing */
-extern NCURSES_EXPORT(attr_t) term_attrs (void); /* implemented:WIDEC */
-extern NCURSES_EXPORT(int) unget_wch (const wchar_t); /* implemented:WIDEC */
-extern NCURSES_EXPORT(int) vid_attr (attr_t, short, void *); /* implemented:WIDEC */
-extern NCURSES_EXPORT(int) vid_puts (attr_t, short, void *, int (*)(int)); /* implemented:WIDEC */
+extern NCURSES_EXPORT(int) slk_wset (int, const wchar_t *, int); /* implemented */
+extern NCURSES_EXPORT(attr_t) term_attrs (void); /* implemented */
+extern NCURSES_EXPORT(int) unget_wch (const wchar_t); /* implemented */
+extern NCURSES_EXPORT(int) vid_attr (attr_t, short, void *); /* implemented */
+extern NCURSES_EXPORT(int) vid_puts (attr_t, short, void *, int (*)(int)); /* implemented */
extern NCURSES_EXPORT(int) vline_set (const cchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) wadd_wch (WINDOW *,const cchar_t *); /* implemented */
extern NCURSES_EXPORT(int) wadd_wchnstr (WINDOW *,const cchar_t *,int); /* implemented */
@@ -146,12 +151,12 @@ extern NCURSES_EXPORT(int) wborder_set (WINDOW *,const cchar_t*,const cchar_t*,c
extern NCURSES_EXPORT(int) wecho_wchar (WINDOW *, const cchar_t *); /* implemented */
extern NCURSES_EXPORT(int) wget_wch (WINDOW *, wint_t *); /* implemented */
extern NCURSES_EXPORT(int) wget_wstr (WINDOW *, wint_t *); /* generated:WIDEC */
-extern NCURSES_EXPORT(int) wgetbkgrnd (WINDOW *, cchar_t *); /* implemented */
+extern NCURSES_EXPORT(int) wgetbkgrnd (WINDOW *, cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) wgetn_wstr (WINDOW *,wint_t *, int); /* implemented */
extern NCURSES_EXPORT(int) whline_set (WINDOW *, const cchar_t *, int); /* implemented */
-extern NCURSES_EXPORT(int) win_wch (WINDOW *, NCURSES_CONST cchar_t *); /* implemented */
-extern NCURSES_EXPORT(int) win_wchnstr (WINDOW *, NCURSES_CONST cchar_t *, int); /* implemented */
-extern NCURSES_EXPORT(int) win_wchstr (WINDOW *, NCURSES_CONST cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) win_wch (WINDOW *, cchar_t *); /* implemented */
+extern NCURSES_EXPORT(int) win_wchnstr (WINDOW *, cchar_t *, int); /* implemented */
+extern NCURSES_EXPORT(int) win_wchstr (WINDOW *, cchar_t *); /* generated:WIDEC */
extern NCURSES_EXPORT(int) winnwstr (WINDOW *, wchar_t *, int); /* implemented */
extern NCURSES_EXPORT(int) wins_nwstr (WINDOW *, const wchar_t *, int); /* implemented */
extern NCURSES_EXPORT(int) wins_wch (WINDOW *, const cchar_t *); /* implemented */
@@ -160,6 +165,8 @@ extern NCURSES_EXPORT(int) winwstr (WINDOW *, wchar_t *); /* implemented */
extern NCURSES_EXPORT(wchar_t*) wunctrl (cchar_t *); /* implemented */
extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int); /* implemented */
+#ifndef NCURSES_NOMACROS
+
/*
* XSI curses macros for XPG4 conformance.
*/
@@ -186,11 +193,9 @@ extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int); /* imple
#define ins_wch(c) wins_wch(stdscr,c)
#define ins_wstr(t) wins_wstr(stdscr,t)
#define inwstr(c) winwstr(stdscr,c)
-#define vid_attr(a,pair,opts) vidattr(a)
#define vline_set(c,n) wvline_set(stdscr,c,n)
#define wadd_wchstr(win,str) wadd_wchnstr(win,str,-1)
#define waddwstr(win,wstr) waddnwstr(win,wstr,-1)
-#define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_COLOR) | COLOR_PAIR(p)), OK)
#define wget_wstr(w,t) wgetn_wstr(w,t,-1)
#define wgetbkgrnd(win,wch) (*wch = win->_bkgrnd, OK)
#define win_wchstr(w,c) win_wchnstr(w,c,-1)
@@ -234,4 +239,11 @@ extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int); /* imple
#define mvwinwstr(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : winwstr(win,c))
#define mvwvline_set(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : wvline_set(win,c,n))
+#endif /* NCURSES_NOMACROS */
+
+#if defined(TRACE) || defined(NCURSES_TEST)
+extern NCURSES_EXPORT(const char *) _nc_viswbuf(const wchar_t *);
+extern NCURSES_EXPORT(const char *) _nc_viswibuf(const wint_t *);
+#endif
+
#endif /* _XOPEN_SOURCE_EXTENDED */