Added cs to the list of languages
[midnight-commander.git] / lib / ncurses.h
blobb057731d82be4aba939cb5b72135c6c7ec4af3e3
1 #ifndef __NCURSES
2 #define __NCURSES
4 #ifdef USE_BSD_CURSES
6 /* This is only to let people that don't want to install ncurses */
7 /* run this nice program; they get what they deserve. */
9 /* Ultrix has a better curses: cursesX */
10 #ifdef ultrix
11 #include <cursesX.h>
12 #else
13 #include <curses.h>
14 #endif
16 #ifndef ACS_VLINE
17 #define ACS_VLINE '|'
18 #endif
20 #ifndef ACS_HLINE
21 #define ACS_HLINE '-'
22 #endif
24 #ifndef ACS_ULCORNER
25 #define ACS_ULCORNER '+'
26 #endif
28 #ifndef ACS_LLCORNER
29 #define ACS_LLCORNER '+'
30 #endif
32 #ifndef ACS_URCORNER
33 #define ACS_URCORNER '+'
34 #endif
36 #ifndef ACS_LRCORNER
37 #define ACS_LRCORNER '+'
38 #endif
40 #ifndef ACS_LTEE
41 #define ACS_LTEE '+'
42 #endif
44 #ifndef KEY_BACKSPACE
45 #define KEY_BACKSPACE 0
46 #endif
48 #ifndef KEY_END
49 #define KEY_END 0
50 #endif
52 enum {
53 COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_YELLOW,
54 COLOR_BLUE, COLOR_MAGENTA, COLOR_CYAN, COLOR_WHITE
57 int has_colors (void);
58 int init_pair (int, int, int);
59 #define ACS_MAP(x) '*'
60 #define COLOR_PAIR(x) 1
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)
68 #else /* if not USE_BSD_CURSES then ...*/
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
80 #define TERM_INCLUDED 1
81 #endif
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
88 #if defined(mips) && defined(sgi)
89 /* GNU C compiler, buggy sgi */
90 #define BUGGY_CURSES 1
91 #endif
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>
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
109 #endif /* USE_BSD_CURSES */
110 #endif /* __NCURSES_H */