- Rearrange reactos.dff according to rosapps rearrange.
[reactos.git] / rosapps / mc / src / tty.h
1 /* This file takes care of loading ncurses or slang */
2
3 int got_interrupt (void);
4 void mc_refresh (void);
5
6 #ifdef HAVE_SLANG
7 # include "myslang.h"
8
9 # define TTY_H_DONE
10 #else
11 # define enable_interrupt_key()
12 # define disable_interrupt_key()
13 # define slang_shutdown()
14 # define slang_done_screen()
15 # define slang_init()
16 # define slang_init_screen()
17 # define slang_init_tty()
18 # define slang_done_tty();
19 # define acs()
20 # define noacs()
21 # define one_vline() addch (slow_terminal ? ' ' : ACS_VLINE)
22 # define one_hline() addch (slow_terminal ? ' ' : ACS_HLINE)
23 #endif
24
25 #if !defined(TTY_H_DONE) && defined(USE_NCURSES)
26 /* This is required since ncurses 1.8.6 and newer changed the name of */
27 /* the include files (July 1994) */
28 # ifdef RENAMED_NCURSES
29 # include <curses.h>
30 # else
31 # include <ncurses.h>
32 # endif
33 # ifdef INCLUDE_TERM
34 # include <term.h>
35 # define TERM_INCLUDED 1
36 # endif
37 # define TTY_H_DONE
38 #endif
39
40 #if !defined(TTY_H_DONE) && defined(USE_BSD_CURSES)
41
42 /* This is only to let people that don't want to install ncurses */
43 /* run this nice program; they get what they deserve. */
44
45 /* Ultrix has a better curses: cursesX */
46 # ifdef ultrix
47 # include <cursesX.h>
48 # else
49 # include <curses.h>
50 # endif
51
52 # ifndef ACS_VLINE
53 # define ACS_VLINE '|'
54 # endif
55
56 # ifndef ACS_HLINE
57 # define ACS_HLINE '-'
58 # endif
59
60 # ifndef ACS_ULCORNER
61 # define ACS_ULCORNER '+'
62 # endif
63
64 # ifndef ACS_LLCORNER
65 # define ACS_LLCORNER '+'
66 # endif
67
68 # ifndef ACS_URCORNER
69 # define ACS_URCORNER '+'
70 # endif
71
72 # ifndef ACS_LRCORNER
73 # define ACS_LRCORNER '+'
74 # endif
75
76 # ifndef ACS_LTEE
77 # define ACS_LTEE '+'
78 # endif
79
80 # ifndef KEY_BACKSPACE
81 # define KEY_BACKSPACE 0
82 # endif
83
84 # ifndef KEY_END
85 # define KEY_END 0
86 # endif
87
88 # define ACS_MAP(x) '*'
89
90 # define NO_COLOR_SUPPORT
91 # define untouchwin(win)
92 # define xgetch x_getch
93 # define wtouchln(win,b,c,d) touchwin(win)
94 # define derwin(win,x,y,z,w) win
95 # define wscrl(win,n)
96 # define TTY_H_DONE
97 #endif
98
99 #if !defined(TTY_H_DONE) && defined(USE_SYSV_CURSES)
100 # include <curses.h>
101 # ifdef INCLUDE_TERM
102 # include <term.h>
103 /* Ugly hack to avoid name space pollution */
104 # undef cols
105 # undef lines
106 # undef buttons
107
108 # define TERM_INCLUDED 1
109 # endif
110
111 # if defined(sparc) || defined(__sgi) || defined(_SGI_SOURCE)
112 /* We are dealing with Solaris or SGI buggy curses :-) */
113 # define BUGGY_CURSES 1
114 # endif
115 # if defined(mips) && defined(sgi)
116 /* GNU C compiler, buggy sgi */
117 # define BUGGY_CURSES 1
118 # endif
119
120 # ifdef __osf__
121 # define untouchwin(win)
122 # endif
123
124 #endif /* USE_SYSV_CURSES */
125
126 #ifdef NO_COLOR_SUPPORT
127 # define COLOR_PAIR(x) 1
128
129 enum {
130 COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_YELLOW,
131 COLOR_BLUE, COLOR_MAGENTA, COLOR_CYAN, COLOR_WHITE
132 };
133
134 int init_pair (int, int, int);
135
136 #endif
137
138 #define KEY_KP_ADD 4001
139 #define KEY_KP_SUBTRACT 4002
140 #define KEY_KP_MULTIPLY 4003
141