* tty.h: Remove support for old curses and GNOME.

* global.h: Likewise.
This commit is contained in:
Pavel Roskin 2001-09-03 03:07:46 +00:00
parent 9b0385f063
commit f3a84ebc1a
3 changed files with 11 additions and 139 deletions

View File

@ -1,5 +1,8 @@
2001-09-02 Pavel Roskin <proski@gnu.org>
* tty.h: Remove support for old curses and GNOME.
* global.h: Likewise.
* widget.c (label_new): Set initial width of the widget based on
the initial text.

View File

@ -7,24 +7,12 @@
#endif
#include <glib.h>
#ifdef HAVE_GNOME
# define GNOME_REGEX_H
# include <gnome.h>
#endif
#include "fs.h"
#include "mem.h"
#include "util.h"
#include "mad.h"
#ifndef HAVE_X
# include "textconf.h"
#endif
#ifdef HAVE_GNOME
# include "gconf.h"
# include "gmain.h"
#endif
#include "textconf.h"
extern char *home_dir;
@ -56,10 +44,6 @@ void refresh_screen (void *);
#define ESC_CHAR '\033'
#define ESC_STR "\033"
#ifdef USE_BSD_CURSES
# define xgetch x_getch
#else
# define xgetch getch
#endif
#define xgetch getch
#endif

127
src/tty.h
View File

@ -1,24 +1,12 @@
#ifndef __MC_TTY_H
#define __MC_TTY_H
/* This file takes care of loading ncurses or slang */
int got_interrupt (void);
#ifdef HAVE_X
#include "keys.h"
#define LINES 0
#define COLS 0
#define attrset(color) do {} while (0);
#define mc_refresh() do {} while (0);
#define enable_interrupt_key() do {} while (0);
#define disable_interrupt_key() do {} while (0);
#define beep() gdk_beep()
#else /* HAVE_X */
#ifdef HAVE_SLANG
# include "myslang.h"
# define TTY_H_DONE
#else
# define enable_interrupt_key()
# define disable_interrupt_key()
@ -34,7 +22,7 @@ int got_interrupt (void);
# define one_hline() addch (slow_terminal ? ' ' : ACS_HLINE)
#endif
#if !defined(TTY_H_DONE) && defined(USE_NCURSES)
#ifdef USE_NCURSES
/* This is required since ncurses 1.8.6 and newer changed the name of */
/* the include files (July 1994) */
# ifdef RENAMED_NCURSES
@ -42,110 +30,7 @@ int got_interrupt (void);
# else
# include <ncurses.h>
# endif
# ifdef INCLUDE_TERM
# include <term.h>
# define TERM_INCLUDED 1
# endif
# define TTY_H_DONE
#endif
#if !defined(TTY_H_DONE) && defined(USE_BSD_CURSES)
/* This is only to let people that don't want to install ncurses */
/* run this nice program; they get what they deserve. */
/* Ultrix has a better curses: cursesX */
# ifdef ultrix
# include <cursesX.h>
# else
# include <curses.h>
# endif
# ifndef ACS_VLINE
# define ACS_VLINE '|'
# endif
# ifndef ACS_HLINE
# define ACS_HLINE '-'
# endif
# ifndef ACS_ULCORNER
# define ACS_ULCORNER '+'
# endif
# ifndef ACS_LLCORNER
# define ACS_LLCORNER '+'
# endif
# ifndef ACS_URCORNER
# define ACS_URCORNER '+'
# endif
# ifndef ACS_LRCORNER
# define ACS_LRCORNER '+'
# endif
# ifndef ACS_LTEE
# define ACS_LTEE '+'
# endif
# ifndef KEY_BACKSPACE
# define KEY_BACKSPACE 0
# endif
# ifndef KEY_END
# define KEY_END 0
# endif
# define ACS_MAP(x) '*'
# define NO_COLOR_CURSES
# define untouchwin(win)
# define xgetch x_getch
# define wtouchln(win,b,c,d) touchwin(win)
# define derwin(win,x,y,z,w) win
# define wscrl(win,n)
# define TTY_H_DONE
#endif
#if !defined(TTY_H_DONE) && defined(USE_SYSV_CURSES)
# include <curses.h>
# ifdef INCLUDE_TERM
# include <term.h>
/* Ugly hack to avoid name space pollution */
# undef cols
# undef lines
# undef buttons
# define TERM_INCLUDED 1
# endif
# if defined(sparc) || defined(__sgi) || defined(_SGI_SOURCE)
/* We are dealing with Solaris or SGI buggy curses :-) */
# define BUGGY_CURSES 1
# endif
# if defined(mips) && defined(sgi)
/* GNU C compiler, buggy sgi */
# define BUGGY_CURSES 1
# endif
# ifdef __osf__
# define untouchwin(win)
# endif
#endif /* USE_SYSV_CURSES */
#ifdef NO_COLOR_CURSES
# define COLOR_PAIR(x) 1
enum {
COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_YELLOW,
COLOR_BLUE, COLOR_MAGENTA, COLOR_CYAN, COLOR_WHITE
};
int init_pair (int, int, int);
#endif
#endif /* USE_NCURSES */
#define KEY_KP_ADD 4001
#define KEY_KP_SUBTRACT 4002
@ -153,4 +38,4 @@ int init_pair (int, int, int);
void mc_refresh (void);
#endif /* HAVE_X */
#endif /* !__MC_TTY_H */