Squash a warning when compiling with a some curses library configurations.

ncurses can optionally declare tigetstr(), tigetnum() and tigetflags() with a
const char * argument, indicated by the NCURSES_CONST macro.  So we use this 
macro, if available, to optionally declare cap2str.iname as const char *.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@530 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2014-11-06 10:25:37 +00:00
parent 835453ae40
commit bb5e9920d2

View File

@@ -103,7 +103,12 @@ extern char *getenv();
typedef struct cap2info typedef struct cap2info
{ {
const char * longname; const char * longname;
const char * iname; /* ncurses can optionally declare tigetstr(), tigetnum() and tigetflags() with
* a const char * argument. */
#ifdef NCURSES_CONST
NCURSES_CONST
#endif
char * iname;
const char * tname; const char * tname;
int type; int type;
void * ptr; void * ptr;