libedit: provide stub curses when none found
for cross-compiling for a GUI, being able to build the whole tree despite having no curses is helpful; provide an interface which just fails all calls
This commit is contained in:

committed by
Jeffrey Altman

parent
0f5486eafc
commit
9bae7d230c
@@ -216,6 +216,15 @@ static pthread_mutex_t terminal_mutex = PTHREAD_MUTEX_INITIALIZER;
|
|||||||
#endif
|
#endif
|
||||||
static FILE *terminal_outfile = NULL;
|
static FILE *terminal_outfile = NULL;
|
||||||
|
|
||||||
|
#ifndef HAVE_TGETENT
|
||||||
|
/* provide a stub curses which fails all calls if we have no tgetent et al */
|
||||||
|
#define tgoto(x, y, z) (char *)0
|
||||||
|
#define tgetstr(x, y) (char *)0
|
||||||
|
#define tgetent(x, y) -1;
|
||||||
|
#define tputs(x, y, z) -1
|
||||||
|
#define tgetflag(x) -1
|
||||||
|
#define tgetnum(x) -1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* terminal_setflags():
|
/* terminal_setflags():
|
||||||
* Set the terminal capability flags
|
* Set the terminal capability flags
|
||||||
|
Reference in New Issue
Block a user