#ifndef MYCURSES_H #define MYCURSES_H #ifdef CURSES #warning standard curses will be used #include #else #include #include "key_man_c.h" #define initscr my_initscr #define move my_move #define refresh my_refresh #define endwin my_endwin #define attron my_attron #define attroff my_attroff #define mvprintw(x,y,a, ... ) do{ \ my_move(x,y); \ fprintf (stderr,a, ## __VA_ARGS__); \ } while (0) \ //#define mvprintw(x,y,a) my_move(x,y);fprintf(stdout,a) #define printw(x, ...) fprintf(stdout,x, ## __VA_ARGS__ ) #define clear my_clear int my_attron(int x); int my_attrof(int x); int my_initscr(); int my_move(int y,int x); int my_refresh(); int my_endwin(); int my_mvprintw(int x, int y,const char *fmt,...); int my_printw(const char *fmt,...); int my_clear(); int get_term_size(int *nrow, int *ncol); #define A_NORMAL 0 #define A_BOLD 1 #define A_BOLD_OFF 2 #define A_UNDERLINE 4 #define A_BLINK 5 #define A_REVERSE 7 #define COLOR_BLACK 30 #define COLOR_RED 31 #define COLOR_GREEN 32 #define COLOR_YELLOW 33 #define COLOR_BLUE 34 #define COLOR_MAGENTA 35 #define COLOR_CYAN 36 #define COLOR_WHITE 37 #define acs_map (_nc_acs_map()) #define ACS_ULCORNER (acs_map['l']) /* upper left corner */ #define ACS_LLCORNER (acs_map['m']) /* lower left corner */ #define ACS_URCORNER (acs_map['k']) /* upper right corner */ #define ACS_LRCORNER (acs_map['j']) /* lower right corner */ #define ACS_LTEE (acs_map['t']) /* tee pointing right */ #define ACS_RTEE (acs_map['u']) /* tee pointing left */ #define ACS_BTEE (acs_map['v']) /* tee pointing up */ #define ACS_TTEE (acs_map['w']) /* tee pointing down */ #define ACS_HLINE (acs_map['q']) /* horizontal line */ #define ACS_VLINE (acs_map['x']) /* vertical line */ #define ACS_PLUS (acs_map['n']) /* large plus or crossover */ #define ACS_S1 (acs_map['o']) /* scan line 1 */ #define ACS_S9 (acs_map['s']) /* scan line 9 */ #define ACS_DIAMOND (acs_map['`']) /* diamond */ #define ACS_CKBOARD (acs_map['a']) /* checker board (stipple) */ #define ACS_DEGREE (acs_map['f']) /* degree symbol */ #define ACS_PLMINUS (acs_map['g']) /* plus/minus */ #define ACS_BULLET (acs_map['~']) /* bullet */ #endif #endif