/*
- * $Id: curses.priv.h,v 1.420 2009/05/30 15:53:46 tom Exp $
+ * $Id: curses.priv.h,v 1.427 2009/06/27 20:31:54 tom Exp $
*
* curses.priv.h
*
#endif
#else /* !(NCURSES_EXT_COLORS && USE_WIDEC_SUPPORT) */
+
#define if_EXT_COLORS(stmt) /* nothing */
#define SetPair(value,p) RemAttr(value, A_COLOR), \
SetAttr(value, AttrOf(value) | (A_COLOR & COLOR_PAIR(p)))
*/
bool _nc_sp_idlok;
bool _nc_sp_idcok;
+
#define _nc_idlok SP->_nc_sp_idlok
#define _nc_idcok SP->_nc_sp_idcok
* This supports automatic resizing
*/
#if USE_SIZECHANGE
- int (*_resize)(int,int);
+ int (*_resize)(NCURSES_SP_DCLx int y, int x);
#endif
/*
extern NCURSES_EXPORT(void) _nc_toggle_attr_off (attr_t *, attr_t);
#undef DelCharCost
-#define DelCharCost(count) _nc_DelCharCost(count)
-extern NCURSES_EXPORT(int) _nc_DelCharCost (int);
+#define DelCharCost(sp, count) NCURSES_SP_NAME(_nc_DelCharCost)(NCURSES_SP_ARGx count)
#undef InsCharCost
-#define InsCharCost(count) _nc_InsCharCost(count)
-extern NCURSES_EXPORT(int) _nc_InsCharCost (int);
+#define InsCharCost(sp, count) NCURSES_SP_NAME(_nc_InsCharCost)(NCURSES_SP_ARGx count)
+
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_DelCharCost) (NCURSES_SP_DCLx int _c);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_InsCharCost) (NCURSES_SP_DCLx int _c);
#undef UpdateAttrs
-#define UpdateAttrs(c) _nc_UpdateAttrs(c)
-extern NCURSES_EXPORT(void) _nc_UpdateAttrs (NCURSES_CH_T);
+#define UpdateAttrs(sp,c) NCURSES_SP_NAME(_nc_UpdateAttrs)(NCURSES_SP_ARGx CHREF(c))
+
+#if defined(NEED_NCURSES_CH_T)
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_UpdateAttrs) (NCURSES_SP_DCLx CARG_CH_T _c);
+#else
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_UpdateAttrs) (NCURSES_SP_DCLx chtype c);
+#endif
+
+#if NCURSES_SP_FUNCS
+extern NCURSES_EXPORT(int) _nc_DelCharCost (int);
+extern NCURSES_EXPORT(int) _nc_InsCharCost (int);
+extern NCURSES_EXPORT(void) _nc_UpdateAttrs (CARG_CH_T);
+#endif /* NCURSES_SP_FUNCS */
#else
* On systems with a broken linker, define 'SP' as a function to force the
* linker to pull in the data-only module with 'SP'.
*/
+#define _nc_alloc_screen_sp() typeCalloc(SCREEN, 1)
+
#if BROKEN_LINKER
-#define SP _nc_screen()
extern NCURSES_EXPORT(SCREEN *) _nc_screen (void);
extern NCURSES_EXPORT(int) _nc_alloc_screen (void);
extern NCURSES_EXPORT(void) _nc_set_screen (SCREEN *);
/* current screen is private data; avoid possible linking conflicts too */
extern NCURSES_EXPORT_VAR(SCREEN *) SP;
#define CURRENT_SCREEN SP
-#define _nc_alloc_screen() ((SP = typeCalloc(SCREEN, 1)) != 0)
+#define _nc_alloc_screen() ((SP = _nc_alloc_screen_sp()) != 0)
#define _nc_set_screen(sp) SP = sp
#endif
* We put the safe versions of various calls here as they are not published
* part of the API up to now
*/
-extern NCURSES_EXPORT(SCREEN*) _nc_SP(void);
-
-extern NCURSES_EXPORT(TERMINAL*) NCURSES_SP_NAME(_nc_set_curterm)(SCREEN*,TERMINAL*);
extern NCURSES_EXPORT(TERMINAL*) NCURSES_SP_NAME(cur_term)(SCREEN *sp);
extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(_nc_makenew) (SCREEN*, int, int, int, int, int);
extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(_nc_reset_colors)(SCREEN*);