diff options
Diffstat (limited to 'app/xterm/xtermcap.h')
-rw-r--r-- | app/xterm/xtermcap.h | 53 |
1 files changed, 37 insertions, 16 deletions
diff --git a/app/xterm/xtermcap.h b/app/xterm/xtermcap.h index b7829083c..c50ad769e 100644 --- a/app/xterm/xtermcap.h +++ b/app/xterm/xtermcap.h @@ -1,8 +1,8 @@ -/* $XTermId: xtermcap.h,v 1.7 2009/03/15 18:18:11 tom Exp $ */ +/* $XTermId: xtermcap.h,v 1.16 2010/01/06 21:20:40 tom Exp $ */ /************************************************************ -Copyright 2007,2009 by Thomas E. Dickey +Copyright 2007-2009,2010 by Thomas E. Dickey All Rights Reserved @@ -42,25 +42,41 @@ authorization. #include <ptyx.h> -#ifdef HAVE_TERMCAP_H -#include <termcap.h> -#if defined(NCURSES_VERSION) - /* The tgetent emulation function in SVr4-style curses implementations - * (e.g., ncurses) ignores the buffer, so TERMCAP can't be set from it. - * Instead, just use terminfo. - */ -#undef USE_TERMCAP -#include <curses.h> +#ifndef HAVE_TIGETSTR +#undef USE_TERMINFO #endif -#else + +#ifndef USE_TERMINFO +#define USE_TERMINFO 0 +#endif + +#if !USE_TERMINFO +#undef HAVE_TIGETSTR +#ifndef USE_TERMCAP +#define USE_TERMCAP 1 +#endif +#endif + #undef ERR /* workaround for glibc 2.1.3 */ + #include <curses.h> + +#ifndef NCURSES_VERSION +#ifdef HAVE_TERMCAP_H +#include <termcap.h> +#endif +#endif + #ifdef HAVE_NCURSES_TERM_H #include <ncurses/term.h> #elif defined(HAVE_TERM_H) #include <term.h> /* tgetent() */ -#endif /*CYGWIN */ -#endif /* HAVE_TERMCAP_H */ +#endif + +/* + * Get rid of conflicting symbols from term.h + */ +#undef bell /***====================================================================***/ @@ -78,14 +94,19 @@ extern "C" { (((parm > MOD_NONE) && ((parm - MOD_NONE) & name)) ? " "#name : "") /* xtermcap.c */ -extern Bool get_termcap(char * /* name */, char * /* buffer */); +extern Bool get_termcap(XtermWidget /* xw */, char * /* name */); +extern void set_termcap(XtermWidget /* xw */, const char * /* name */); +extern void free_termcap(XtermWidget /* xw */); + +extern char *get_tcap_buffer(XtermWidget /* xw */); +extern char *get_tcap_erase(XtermWidget /* xw */); #if OPT_TCAP_FKEYS extern int xtermcapString(XtermWidget /* xw */, int /* keycode */, unsigned /* mask */); #endif #if OPT_TCAP_QUERY -extern int xtermcapKeycode(XtermWidget /* xw */, char ** /* params */, unsigned * /* state */, Bool * /* fkey */); +extern int xtermcapKeycode(XtermWidget /* xw */, const char ** /* params */, unsigned * /* state */, Bool * /* fkey */); #endif #ifdef __cplusplus |