3 This file is part of the lzop file compressor.
5 Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
8 lzop and the LZO library are free software; you can redistribute them
9 and/or modify them under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of
11 the License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; see the file COPYING.
20 If not, write to the Free Software Foundation, Inc.,
21 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 Markus F.X.J. Oberhumer
24 <markus@oberhumer.com>
25 http://www.oberhumer.com/opensource/lzop/
30 /*************************************************************************
32 **************************************************************************/
37 #undef USE_SCREEN_VCSA
38 #undef USE_SCREEN_CURSES
42 #if 1 && defined(LZOP_ENABLE_ANSI) && !defined(DOSISH)
46 #if 1 && defined(__linux__) && defined(LZOP_ENABLE_LINUX_CONSOLE)
48 # define USE_SCREEN_VCSA 1
49 # if !defined(HAVE_LINUX_KD_H)
51 # undef USE_SCREEN_VCSA
53 # if !defined(HAVE_LINUX_KDEV_T_H) || !defined(HAVE_LINUX_MAJOR_H)
55 # undef USE_SCREEN_VCSA
59 #if 0 && defined(HAVE_NCURSES_H) && defined(HAVE_LIBNCURSES)
61 # define USE_SCREEN_CURSES 1
64 #if 0 && defined(__DJGPP__)
68 #if 1 && defined(USE_SCREEN)
73 #if 0 || defined(NO_ANSI)
76 #if 0 || defined(NO_SCREEN)
79 #if 0 || defined(NO_FRAMES) || !defined(USE_SCREEN)
82 #if !defined(WITH_LZO)
87 #if 0 || defined(USE_ANSI) || defined(USE_SCREEN)
88 # define USE_CONSOLE 1
91 #if 0 || defined(NO_CONSOLE) || !defined(USE_CONSOLE)
95 # undef USE_SCREEN_VCSA
96 # undef USE_SCREEN_CURSES
101 /*************************************************************************
103 **************************************************************************/
115 #if defined(USE_CONSOLE)
119 int (*init)(FILE *f, int, int);
120 int (*set_fg)(FILE *f, int fg);
121 void (*print0)(FILE *f, const char *s);
122 lzo_bool (*intro)(FILE *f);
127 #if defined(__GNUC__)
128 void con_fprintf(FILE *f, const char *format, ...)
129 __attribute__((format(printf,2,3)));
131 void con_fprintf(FILE *f, const char *format, ...);
135 #define FG_BLACK 0x00
137 #define FG_GREEN 0x02
140 #define FG_VIOLET 0x05
141 #define FG_ORANGE 0x06
142 #define FG_LTGRAY 0x07
143 #define FG_DKGRAY 0x08
144 #define FG_BRTBLUE 0x09
145 #define FG_BRTGREEN 0x0a
146 #define FG_BRTCYAN 0x0b
147 #define FG_BRTRED 0x0c
148 #define FG_BRTVIOLET 0x0d
149 #define FG_YELLOW 0x0e
150 #define FG_WHITE 0x0f
152 #define BG_BLACK 0x00
154 #define BG_GREEN 0x20
157 #define BG_VIOLET 0x50
158 #define BG_ORANGE 0x60
159 #define BG_WHITE 0x70
161 #endif /* USE_CONSOLE */
164 /*************************************************************************
166 **************************************************************************/
168 extern FILE *con_term;
170 #if defined(USE_CONSOLE)
173 extern console_t *con;
175 extern console_t console_init;
176 extern console_t console_none;
177 extern console_t console_ansi_mono;
178 extern console_t console_ansi_color;
179 extern console_t console_screen;
182 #define con_fg(f,x) con->set_fg(f,x)
183 #define con_intro(f) con->intro(f)
187 #define con_fg(f,x) 0
188 #define con_fprintf fprintf
189 #define con_intro(f) 0
191 #endif /* USE_CONSOLE */
194 /* vim:set ts=4 sw=4 et: */