]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - include/curses.wide
ncurses 5.9 - patch 20120303
[ncurses.git] / include / curses.wide
index f41e1658423637846fdb5897a753144be8c3bd9a..6bd102fdb050f14b778fdacaafd0c16c642fd08d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: curses.wide,v 1.40 2009/10/03 19:42:45 tom Exp $ */
+/* $Id: curses.wide,v 1.44 2011/10/29 20:08:19 tom Exp $ */
 /*
  * vile:cmode:
  * This file is part of ncurses, designed to be appended after curses.h.in
@@ -6,7 +6,7 @@
  */
 #define _XOPEN_CURSES 1
 
-#ifdef _XOPEN_SOURCE_EXTENDED
+#if NCURSES_WIDECHAR
 
 extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
 
@@ -218,11 +218,11 @@ extern NCURSES_EXPORT(wchar_t*) wunctrl (cchar_t *);                      /* 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(int) NCURSES_SP_NAME(vid_attr) (SCREEN*, attr_t, short, void *);
-extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, short, void *, NCURSES_SP_OUTC);
+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
@@ -261,7 +261,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, short, vo
 #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)
@@ -309,4 +309,4 @@ 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 */
+#endif /* NCURSES_WIDECHAR */