home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / mc454src.zip / mc-4.5.4.src / mc-4.5.4 / lib / ncurses.h < prev    next >
C/C++ Source or Header  |  1999-01-04  |  2KB  |  111 lines

  1. #ifndef __NCURSES
  2. #define __NCURSES
  3.  
  4. #ifdef USE_BSD_CURSES
  5.  
  6. /* This is only to let people that don't want to install ncurses */
  7. /* run this nice program; they get what they deserve.            */
  8.  
  9.     /* Ultrix has a better curses: cursesX */
  10.     #ifdef ultrix
  11.     #include <cursesX.h>
  12.     #else
  13.     #include <curses.h>
  14.     #endif
  15.  
  16.     #ifndef ACS_VLINE
  17.     #define ACS_VLINE '|'
  18.     #endif
  19.  
  20.     #ifndef ACS_HLINE
  21.     #define ACS_HLINE '-'
  22.     #endif
  23.  
  24.     #ifndef ACS_ULCORNER
  25.     #define ACS_ULCORNER '+'
  26.     #endif
  27.  
  28.     #ifndef ACS_LLCORNER
  29.     #define ACS_LLCORNER '+'
  30.     #endif
  31.  
  32.     #ifndef ACS_URCORNER
  33.     #define ACS_URCORNER '+'
  34.     #endif
  35.  
  36.     #ifndef ACS_LRCORNER
  37.     #define ACS_LRCORNER '+'
  38.     #endif
  39.  
  40.     #ifndef ACS_LTEE
  41.     #define ACS_LTEE '+'
  42.     #endif
  43.  
  44.     #ifndef KEY_BACKSPACE
  45.         #define KEY_BACKSPACE 0
  46.     #endif
  47.  
  48.     #ifndef KEY_END
  49.     #define KEY_END 0
  50.     #endif
  51.  
  52.     enum {
  53.     COLOR_BLACK, COLOR_RED,     COLOR_GREEN, COLOR_YELLOW,
  54.     COLOR_BLUE,  COLOR_MAGENTA, COLOR_CYAN,  COLOR_WHITE
  55.     };
  56.  
  57.     int has_colors (void);
  58.     int init_pair (int, int, int);
  59.     #define ACS_MAP(x) '*'
  60.     #define COLOR_PAIR(x) 1
  61.  
  62.     #define xgetch x_getch
  63.     #define wtouchln(win,b,c,d) touchwin(win)
  64.     #define untouchwin(win)
  65.     #define derwin(win,x,y,z,w) win
  66.     #define wscrl(win,n)
  67.  
  68. #else  /* if not USE_BSD_CURSES then ...*/
  69.  
  70. /* Use this file only under System V */
  71. #if defined(USE_SYSV_CURSES)
  72.     #include <curses.h>
  73.     #ifdef INCLUDE_TERM
  74.         #include <term.h>
  75.         /* Ugly hack to avoid name space pollution */
  76.         #undef cols
  77.         #undef lines
  78.         #undef buttons
  79.  
  80.         #define TERM_INCLUDED 1
  81.     #endif
  82.  
  83.     #if defined(sparc) || defined(__sgi) || defined(_SGI_SOURCE)
  84.         /* We are dealing with Solaris or SGI buggy curses :-) */
  85.         #define BUGGY_CURSES 1
  86.     #endif
  87.  
  88.     #if defined(mips) && defined(sgi)
  89.         /* GNU C compiler, buggy sgi */
  90.         #define BUGGY_CURSES 1
  91.     #endif
  92.                  
  93. #else
  94.     /* This is required since ncurses 1.8.6 and newer changed the name of */
  95.     /* the include files (argh!) */
  96.     #ifdef RENAMED_NCURSES
  97.         #include <curses.h>
  98.  
  99.         #ifdef INCLUDE_TERM
  100.             #include <term.h>
  101.             #define TERM_INCLUDED 1
  102.         #endif
  103.     #else
  104.         #error The ncurses.h file should only be included under SystemV.
  105.         #error BSD systems and Linux require the real ncurses package
  106.     #endif
  107. #endif
  108.  
  109. #endif /* USE_BSD_CURSES */
  110. #endif /* __NCURSES_H */
  111.