-/* $Id: curses.wide,v 1.37 2009/04/18 21:34:06 tom Exp $ */
+/* $Id: curses.wide,v 1.43 2011/05/28 21:02:43 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
*/
#define _XOPEN_CURSES 1
-#ifdef _XOPEN_SOURCE_EXTENDED
+#ifdef NCURSES_WIDECHAR
extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
#define WACS_NEQUAL NCURSES_WACS('|') /* not equal */
#define WACS_STERLING NCURSES_WACS('}') /* UK pound sign */
+ /* double lines */
+#define WACS_BDDB NCURSES_WACS('C')
+#define WACS_DDBB NCURSES_WACS('D')
+#define WACS_BBDD NCURSES_WACS('B')
+#define WACS_DBBD NCURSES_WACS('A')
+#define WACS_DBDD NCURSES_WACS('G')
+#define WACS_DDDB NCURSES_WACS('F')
+#define WACS_DDBD NCURSES_WACS('H')
+#define WACS_BDDD NCURSES_WACS('I')
+#define WACS_BDBD NCURSES_WACS('R')
+#define WACS_DBDB NCURSES_WACS('Y')
+#define WACS_DDDD NCURSES_WACS('E')
+
+#define WACS_D_ULCORNER WACS_BDDB
+#define WACS_D_LLCORNER WACS_DDBB
+#define WACS_D_URCORNER WACS_BBDD
+#define WACS_D_LRCORNER WACS_DBBD
+#define WACS_D_RTEE WACS_DBDD
+#define WACS_D_LTEE WACS_DDDB
+#define WACS_D_BTEE WACS_DDBD
+#define WACS_D_TTEE WACS_BDDD
+#define WACS_D_HLINE WACS_BDBD
+#define WACS_D_VLINE WACS_DBDB
+#define WACS_D_PLUS WACS_DDDD
+
+ /* thick lines */
+#define WACS_BTTB NCURSES_WACS('L')
+#define WACS_TTBB NCURSES_WACS('M')
+#define WACS_BBTT NCURSES_WACS('K')
+#define WACS_TBBT NCURSES_WACS('J')
+#define WACS_TBTT NCURSES_WACS('U')
+#define WACS_TTTB NCURSES_WACS('T')
+#define WACS_TTBT NCURSES_WACS('V')
+#define WACS_BTTT NCURSES_WACS('W')
+#define WACS_BTBT NCURSES_WACS('Q')
+#define WACS_TBTB NCURSES_WACS('X')
+#define WACS_TTTT NCURSES_WACS('N')
+
+#define WACS_T_ULCORNER WACS_BTTB
+#define WACS_T_LLCORNER WACS_TTBB
+#define WACS_T_URCORNER WACS_BBTT
+#define WACS_T_LRCORNER WACS_TBBT
+#define WACS_T_RTEE WACS_TBTT
+#define WACS_T_LTEE WACS_TTTB
+#define WACS_T_BTEE WACS_TTBT
+#define WACS_T_TTEE WACS_BTTT
+#define WACS_T_HLINE WACS_BTBT
+#define WACS_T_VLINE WACS_TBTB
+#define WACS_T_PLUS WACS_TTTT
+
/*
* Function prototypes for wide-character operations.
*
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) vid_puts (attr_t, short, void *, NCURSES_OUTC); /* 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 */
extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int); /* implemented */
#if NCURSES_SP_FUNCS
-extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(term_attrs) (SCREEN*); /* implemented */
-extern NCURSES_EXPORT(int) NCURSES_SP_NAME(unget_wch) (SCREEN*, const wchar_t); /* implemented */
-extern NCURSES_EXPORT(wchar_t*) NCURSES_SP_NAME(wunctrl) (SCREEN*, cchar_t *); /* implemented */
+extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(term_attrs) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(unget_wch) (SCREEN*, const wchar_t); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(wchar_t*) NCURSES_SP_NAME(wunctrl) (SCREEN*, cchar_t *); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_attr) (SCREEN*, attr_t, short, void *); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, short, void *, NCURSES_SP_OUTC); /* implemented:SP_FUNC */
#endif
#ifndef NCURSES_NOMACROS
#define wins_wstr(w,t) wins_nwstr(w,t,-1)
#if !NCURSES_OPAQUE
-#define wgetbkgrnd(win,wch) (*wch = win->_bkgrnd, OK)
+#define wgetbkgrnd(win,wch) ((win) ? (*(wch) = (win)->_bkgrnd) : *(wch), OK)
#endif
#define mvadd_wch(y,x,c) mvwadd_wch(stdscr,y,x,c)
extern NCURSES_EXPORT(const char *) _nc_viswibuf(const wint_t *);
#endif
-#endif /* _XOPEN_SOURCE_EXTENDED */
+#endif /* NCURSES_WIDECHAR */