X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fcurses.priv.h;h=5f16c995b9581e17be29514952abb82dfc5825bc;hp=46c63bb1f0eefb96011848c3d6a98d4d3f1e410c;hb=63e3cafac136d773331dee15633f1c9ef08c5493;hpb=952539d2f6aa5a3a29adc54488b0d3b66121c888 diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 46c63bb1..5f16c995 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. * + * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -34,7 +34,7 @@ ****************************************************************************/ /* - * $Id: curses.priv.h,v 1.527 2013/08/31 17:02:41 tom Exp $ + * $Id: curses.priv.h,v 1.533 2014/04/13 00:16:21 tom Exp $ * * curses.priv.h * @@ -179,6 +179,18 @@ extern int errno; #define USE_SIGWINCH 0 #endif +/* + * When building in the MSYS2 environment, the automatic discovery of + * the path separator in configure doesn't work properly. So, if building + * for MinGW, we enforce the correct Windows PATH separator + */ +#ifdef __MINGW32__ +# ifdef NCURSES_PATHSEP +# undef NCURSES_PATHSEP +# endif +# define NCURSES_PATHSEP ';' +#endif + /* * If desired, one can configure this, disabling environment variables that * point to custom terminfo/termcap locations. @@ -288,14 +300,6 @@ typedef TRIES { * Structure for palette tables */ -typedef struct -{ - short red, green, blue; /* what color_content() returns */ - short r, g, b; /* params to init_color() */ - int init; /* true if we called init_color() */ -} -color_t; - #define MAXCOLUMNS 135 #define MAXLINES 66 #define FIFO_SIZE MAXCOLUMNS+2 /* for nocbreak mode input */ @@ -320,6 +324,14 @@ color_t; #include /* we'll use -Ipath directive to get the right one! */ +typedef struct +{ + NCURSES_COLOR_T red, green, blue; /* what color_content() returns */ + NCURSES_COLOR_T r, g, b; /* params to init_color() */ + int init; /* true if we called init_color() */ +} +color_t; + /* * If curses.h did not expose the SCREEN-functions, then we do not need the * parameter in the corresponding unextended functions. @@ -350,7 +362,7 @@ color_t; #define HasTerminal(sp) (((sp) != 0) && (0 != ((sp)->_term))) #define IsValidScreen(sp) (HasTerminal(sp) && !IsPreScreen(sp)) -#if BROKEN_LINKER || USE_REENTRANT +#if USE_REENTRANT #define CurTerm _nc_prescreen._cur_term #else #define CurTerm cur_term @@ -2118,8 +2130,6 @@ extern NCURSES_EXPORT_VAR(int *) _nc_oldnums; #define USE_SETBUF_0 0 -#define NC_BUFFERED(sp,flag) NCURSES_SP_NAME(_nc_set_buffer)(NCURSES_SP_ARGx sp->_ofp, flag) - #define NC_OUTPUT(sp) ((sp != 0) ? sp->_ofp : stdout) /* @@ -2228,40 +2238,41 @@ typedef struct _termInfo typedef struct term_driver { bool isTerminfo; - bool (*CanHandle)(struct DriverTCB*, const char*, int*); - void (*init)(struct DriverTCB*); - void (*release)(struct DriverTCB*); - int (*size)(struct DriverTCB*, int* Line, int *Cols); - int (*sgmode)(struct DriverTCB*, int setFlag, TTY*); - chtype (*conattr)(struct DriverTCB*); - int (*hwcur)(struct DriverTCB*, int yold, int xold, int y, int x); - int (*mode)(struct DriverTCB*, int progFlag, int defFlag); - bool (*rescol)(struct DriverTCB*); - bool (*rescolors)(struct DriverTCB*); - void (*color)(struct DriverTCB*, int fore, int color, int(*)(SCREEN*, int)); - int (*doBeepOrFlash)(struct DriverTCB*, int); - void (*initpair)(struct DriverTCB*, int, int, int); - void (*initcolor)(struct DriverTCB*, int, int, int, int); - void (*docolor)(struct DriverTCB*, int, int, int, int(*)(SCREEN*, int)); - void (*initmouse)(struct DriverTCB*); - int (*testmouse)(struct DriverTCB*, int EVENTLIST_2nd(_nc_eventlist*)); - void (*setfilter)(struct DriverTCB*); - void (*hwlabel)(struct DriverTCB*, int, char*); - void (*hwlabelOnOff)(struct DriverTCB*, int); - int (*update)(struct DriverTCB*); - int (*defaultcolors)(struct DriverTCB*, int, int); - int (*print)(struct DriverTCB*, char*, int); - int (*getsize)(struct DriverTCB*, int*, int*); - int (*setsize)(struct DriverTCB*, int, int); - void (*initacs)(struct DriverTCB*, chtype*, chtype*); - void (*scinit)(SCREEN *); - void (*scexit)(SCREEN *); - int (*twait)(struct DriverTCB*, int, int, int* EVENTLIST_2nd(_nc_eventlist*)); - int (*read)(struct DriverTCB*, int*); - int (*nap)(struct DriverTCB*, int); - int (*kpad)(struct DriverTCB*, int); - int (*kyOk)(struct DriverTCB*, int, int); - bool (*kyExist)(struct DriverTCB*, int); + const char* (*td_name)(struct DriverTCB*); + bool (*td_CanHandle)(struct DriverTCB*, const char*, int*); + void (*td_init)(struct DriverTCB*); + void (*td_release)(struct DriverTCB*); + int (*td_size)(struct DriverTCB*, int* Line, int *Cols); + int (*td_sgmode)(struct DriverTCB*, int setFlag, TTY*); + chtype (*td_conattr)(struct DriverTCB*); + int (*td_hwcur)(struct DriverTCB*, int yold, int xold, int y, int x); + int (*td_mode)(struct DriverTCB*, int progFlag, int defFlag); + bool (*td_rescol)(struct DriverTCB*); + bool (*td_rescolors)(struct DriverTCB*); + void (*td_color)(struct DriverTCB*, int fore, int color, int(*)(SCREEN*, int)); + int (*td_doBeepOrFlash)(struct DriverTCB*, int); + void (*td_initpair)(struct DriverTCB*, int, int, int); + void (*td_initcolor)(struct DriverTCB*, int, int, int, int); + void (*td_docolor)(struct DriverTCB*, int, int, int, int(*)(SCREEN*, int)); + void (*td_initmouse)(struct DriverTCB*); + int (*td_testmouse)(struct DriverTCB*, int EVENTLIST_2nd(_nc_eventlist*)); + void (*td_setfilter)(struct DriverTCB*); + void (*td_hwlabel)(struct DriverTCB*, int, char*); + void (*td_hwlabelOnOff)(struct DriverTCB*, int); + int (*td_update)(struct DriverTCB*); + int (*td_defaultcolors)(struct DriverTCB*, int, int); + int (*td_print)(struct DriverTCB*, char*, int); + int (*td_getsize)(struct DriverTCB*, int*, int*); + int (*td_setsize)(struct DriverTCB*, int, int); + void (*td_initacs)(struct DriverTCB*, chtype*, chtype*); + void (*td_scinit)(SCREEN *); + void (*td_scexit)(SCREEN *); + int (*td_twait)(struct DriverTCB*, int, int, int* EVENTLIST_2nd(_nc_eventlist*)); + int (*td_read)(struct DriverTCB*, int*); + int (*td_nap)(struct DriverTCB*, int); + int (*td_kpad)(struct DriverTCB*, int); + int (*td_kyOk)(struct DriverTCB*, int, int); + bool (*td_kyExist)(struct DriverTCB*, int); } TERM_DRIVER; typedef struct DriverTCB @@ -2344,12 +2355,13 @@ extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_TINFO_DRIVER; #endif #ifdef USE_TERM_DRIVER -#define IsTermInfo(sp) (TCBOf(sp) && ((TCBOf(sp)->drv->isTerminfo))) +#define IsTermInfo(sp) ((TCBOf(sp) != 0) && ((TCBOf(sp)->drv->isTerminfo))) +#define HasTInfoTerminal(sp) ((0 != TerminalOf(sp)) && IsTermInfo(sp)) #else #define IsTermInfo(sp) TRUE +#define HasTInfoTerminal(sp) (0 != TerminalOf(sp)) #endif -#define HasTInfoTerminal(sp) ((0 != TerminalOf(sp)) && IsTermInfo(sp)) #define IsValidTIScreen(sp) (HasTInfoTerminal(sp)) /* @@ -2399,7 +2411,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_set_tty_mode)(SCREEN*, TTY*) extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_setupscreen)(SCREEN**, int, int, FILE *, int, int); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_tgetent)(SCREEN*,char*,const char *); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_tigetnum)(SCREEN*,NCURSES_CONST char*); -extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_vid_attr)(SCREEN *, attr_t, short, void *); +extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_vid_attr)(SCREEN *, attr_t, NCURSES_COLOR_T, void *); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_vidputs)(SCREEN*,chtype,int(*) (SCREEN*, int)); extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_do_color)(SCREEN*, int, int, int, NCURSES_SP_OUTC); extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_do_xmc_glitch)(SCREEN*, attr_t);