diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Src/Modules/terminfo.c | 9 | ||||
-rw-r--r-- | Src/prototypes.h | 4 | ||||
-rw-r--r-- | Src/system.h | 4 |
4 files changed, 14 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog index cac8ce1d2..03c4e0651 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-04-12 Bart Schaefer <schaefer@brasslantern.com> + + * 13965: Src/system.h, Src/prototypes.h, Src/Modules/terminfo.c: + Use <term.h> for termcap protos when it is found but <termcap.h> + is not; don't include <curses.h> unless it will be used. + 2001-04-12 Clint Adams <schizo@debian.org> * 13961: Src/prototypes.h: entertain the possibility that diff --git a/Src/Modules/terminfo.c b/Src/Modules/terminfo.c index 56ab62fb7..b3c3c2876 100644 --- a/Src/Modules/terminfo.c +++ b/Src/Modules/terminfo.c @@ -29,17 +29,14 @@ #include "terminfo.mdh" #include "terminfo.pro" -#ifdef HAVE_CURSES_H -# include <curses.h> -#endif -#ifdef HAVE_TERM_H -# include <term.h> -#endif static char terminfo_nam[] = "terminfo"; /**/ #ifdef HAVE_TIGETSTR +# ifdef HAVE_CURSES_H +# include <curses.h> +# endif static Param terminfo_pm; diff --git a/Src/prototypes.h b/Src/prototypes.h index 7b2aa9d67..5b34b93b4 100644 --- a/Src/prototypes.h +++ b/Src/prototypes.h @@ -33,15 +33,13 @@ char *realloc _((void *, size_t)); char *calloc _((size_t, size_t)); #endif -#ifndef HAVE_TERMCAP_H +#if !(defined(HAVE_TERMCAP_H) || defined(HAVE_TERM_H)) extern int tgetent _((char *bp, char *name)); extern int tgetnum _((char *id)); extern int tgetflag _((char *id)); extern char *tgetstr _((char *id, char **area)); extern char *tgoto _((char *cm, int destcol, int destline)); -# ifndef HAVE_TERM_H extern int tputs _((char *cp, int affcnt, int (*outc) (int))); -# endif #endif /* MISSING PROTOTYPES FOR VARIOUS OPERATING SYSTEMS */ diff --git a/Src/system.h b/Src/system.h index 50661e0fd..6966f517b 100644 --- a/Src/system.h +++ b/Src/system.h @@ -312,6 +312,10 @@ struct timezone { #ifdef HAVE_TERMCAP_H # include <termcap.h> +#else +# ifdef HAVE_TERM_H +# include <term.h> +# endif #endif #if defined(GWINSZ_IN_SYS_IOCTL) || defined(CLOBBERS_TYPEAHEAD) |