158190Selan #ifndef _G_curses_h 258190Selan 358190Selan #include <_G_config.h> 458190Selan 558190Selan #if _G_HAVE_CURSES 658190Selan 758190Selan #ifdef __curses_h_recursive 858190Selan #include_next <curses.h> 958190Selan #else 1058190Selan #define __curses_h_recursive 1158190Selan 1258190Selan extern "C" { 1358190Selan #include_next <curses.h> 1458190Selan 1558190Selan /* Some systems (SVR4 for example) allow the definition of CHTYPE to set the 1658190Selan type of some arguments to the curses functions. It can be set to "char" 1758190Selan to save space, or it can be set to something longer to store both a 1858190Selan character and some attributes. By default they do not define CHTYPE, 1958190Selan and when CHTYPE is not defined, the default type is "unsigned long" instead 2058190Selan of the traditional "char". However, SVR4 <curses.h> does define 2158190Selan _VR3_COMPAT_CODE, so we can use that to detect when we should use the SVR4 2258190Selan default if CHTYPE is not defined. For other systems, just default to the 2358190Selan traditional default "char". */ 2458190Selan 2558190Selan #ifdef CHTYPE 2658190Selan typedef CHTYPE _G_chtype; /* Use specified type. */ 2758190Selan #else 2858190Selan #ifdef _VR3_COMPAT_CODE 2958190Selan typedef unsigned long _G_chtype; /* SVR4 default is "unsigned long" */ 3058190Selan #elif defined(hpux) 3158190Selan typedef unsigned int _G_chtype; 3258190Selan #else 3358190Selan typedef char _G_chtype; /* Traditional default is "char" */ 3458190Selan #endif 3558190Selan #endif 3658190Selan 3758190Selan /* Some args are conceptually const, but SVR4 (and others?) get it wrong. */ 3858190Selan #define _C_const /* const */ 3958190Selan 4058190Selan WINDOW * (newwin)(int lines, int cols, int sy, int sx); 4158190Selan WINDOW * (subwin)(WINDOW *w, int lines, int cols, int sy, int sx); 4258190Selan WINDOW * (initscr)(); 4360384Selan int (box) (WINDOW*, int, int); 4458190Selan int (delwin)(WINDOW*); 4558190Selan int (getcurx)(WINDOW*); 4658190Selan int (getcury)(WINDOW*); 4758190Selan int (mvcur)(int, int, int, int); 4858190Selan int (overlay)(WINDOW*, WINDOW*); 4958190Selan int (overwrite)(WINDOW*, WINDOW*); 5058190Selan int (scroll)(WINDOW*); 5158190Selan int (touchwin)(WINDOW*); 5260384Selan int (waddch)(WINDOW*, int); 5358190Selan int (waddstr)(WINDOW*, _C_const char*); 5458190Selan int (wclear)(WINDOW*); 5558190Selan int (wclrtobot)(WINDOW*); 5658190Selan int (wclrtoeol)(WINDOW*); 5758190Selan int (wdelch)(WINDOW*); 5858190Selan int (wdeleteln)(WINDOW*); 5958190Selan int (werase)(WINDOW*); 6058190Selan int (wgetch)(WINDOW*); 6158190Selan int (wgetstr)(WINDOW*, char*); 6260384Selan int (winsch)(WINDOW*, int); 6358190Selan int (winsertln)(WINDOW*); 6458190Selan int (wmove)(WINDOW*, int, int); 6558190Selan int (wrefresh)(WINDOW*); 66*67664Sbostic int (wstandend)(WINDOW*); 67*67664Sbostic int (wstandout)(WINDOW*); 6858190Selan 6958190Selan // SVR4 rather inanely bundles the format-string parameter with the '...'. 7058190Selan // This breaks VMS, and I don't want to penalize VMS for being right for once! 7158190Selan #ifdef _VR3_COMPAT_CODE /* Magic cookie to recognize SVR4 */ 7258190Selan #define _CURSES_FORMAT_ARG /*const char* fmt, */ 7358190Selan #else 7458190Selan #define _CURSES_FORMAT_ARG const char* fmt, 7558190Selan #endif 7658190Selan 7758190Selan int (wprintw)(WINDOW*, _CURSES_FORMAT_ARG ...); 7858190Selan int (mvwprintw)(WINDOW*, int y, int x, _CURSES_FORMAT_ARG ...); 7958190Selan int (wscanw)(WINDOW*, _CURSES_FORMAT_ARG ...); 8058190Selan int (mvwscanw)(WINDOW*, int, int, _CURSES_FORMAT_ARG ...); 8158190Selan int (endwin)(); 8258190Selan 8358190Selan } 8458190Selan #define _G_curses_h 8558190Selan #endif 8658190Selan #endif /* _G_HAVE_CURSES */ 8758190Selan #endif /* _G_curses_h */ 88