home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / vile-src.zip / vile-8.1 / tcap.h < prev    next >
C/C++ Source or Header  |  1998-02-23  |  2KB  |  93 lines

  1. /*
  2.  * Configurable headers used by termcap/terminfo driver for vile.
  3.  *
  4.  * $Header: /usr/build/vile/vile/RCS/tcap.h,v 1.4 1998/02/23 11:27:56 tom Exp $
  5.  */
  6.  
  7. #ifndef VILE_TCAP_H
  8. #define VILE_TCAP_H 1
  9.  
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13.  
  14. #undef TRUE
  15. #undef FALSE
  16. #undef WINDOW        /* avoid conflict with <curses.h> or <term.h> */
  17.  
  18. #if NEED_CURSES_H
  19. #  if HAVE_NCURSES_H
  20. #    include <ncurses.h>
  21. #  else
  22. #    include <curses.h>
  23. #  endif
  24. #endif
  25.  
  26. #if HAVE_TERM_H
  27. #  include <term.h>
  28. #endif
  29. #if NEED_TERMCAP_H
  30. #  include <termcap.h>
  31. #endif
  32.  
  33. #ifndef TRUE
  34. #  define TRUE 1
  35. #endif
  36. #ifndef FALSE
  37. #  define FALSE 0
  38. #endif
  39.  
  40. #if USE_TERMINFO
  41. #  define TGETSTR(name, bufp) tigetstr(name)
  42. #  define TGETNUM(name)       tigetnum(name) /* may be tigetint() */
  43. #  define TGETFLAG(name)      tigetflag(name)
  44. #  define CAPNAME(a,b)        b
  45. #  define NO_CAP(s)           (s == 0 || s == (char *)-1)
  46. #  if !HAVE_TIGETNUM && HAVE_TIGETINT
  47. #    define tigetnum tigetint
  48. #  endif
  49. #else /* USE_TERMCAP */
  50. #  undef USE_TERMCAP
  51. #  define USE_TERMCAP 1
  52. #  define TGETSTR(name, bufp) tgetstr(name, bufp)
  53. #  define TGETNUM(name)       tgetnum(name)
  54. #  define TGETFLAG(name)      tgetflag(name)
  55. #  define CAPNAME(a,b)        a
  56. #  define NO_CAP(s)           (s == 0)
  57. #endif /* USE_TERMINFO */
  58.  
  59. #if HAVE_EXTERN_TCAP_PC
  60. extern char PC;            /* used in 'tputs()' */
  61. #endif
  62.  
  63. #if MISSING_EXTERN_TGETENT
  64. extern    int    tgetent (char *buffer, char *termtype);
  65. #endif
  66. #if MISSING_EXTERN_TGETFLAG || MISSING_EXTERN_TIGETFLAG
  67. extern    int    TGETFLAG (char *name);
  68. #endif
  69. #if MISSING_EXTERN_TGETNUM || MISSING_EXTERN_TIGETNUM
  70. extern    int    TGETNUM (char *name);
  71. #endif
  72. #if MISSING_EXTERN_TGETSTR || MISSING_EXTERN_TIGETSTR
  73. extern    char *    TGETSTR(const char *name, char **area);
  74. #endif
  75. #if MISSING_EXTERN_TGOTO
  76. extern    char *    tgoto (const char *cstring, int hpos, int vpos);
  77. #endif
  78. #if MISSING_EXTERN_TPARAM
  79. extern    char *    tparam (char *cstring, char *buf, int size, ...);
  80. #endif
  81. #if MISSING_EXTERN_TPARM
  82. extern    char *    tparm (const char *fmt, ...);
  83. #endif
  84. #if MISSING_EXTERN_TPUTS
  85. extern    int    tputs (char *string, int nlines, OUTC_DCL (*_f)(OUTC_ARGS) );
  86. #endif
  87.  
  88. #ifdef __cplusplus
  89. }
  90. #endif
  91.  
  92. #endif /* VILE_TCAP_H */
  93.