From a06415a371ced55001ba959dd68c509a0c56f862 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 15 Jun 2001 00:24:14 +0000 Subject: [PATCH] * xtty.h: Remove, move contents ... * tty.h: ... here. [HAVE_X]: Define attrset(), mc_refresh(), enable_interrupt_key() and disable_interrupt_key(). Don't declare mc_refresh(). * view.c: Use braces around widget_move() since it's empty in the GNOME edition. * xslint.c: Eliminate attrset() and mc_refresh(). * Makefile.in: Remove xtty.h. --- src/ChangeLog | 9 +++++++++ src/Makefile.in | 2 +- src/tty.h | 13 +++++++++++-- src/view.c | 5 +++-- src/xslint.c | 24 +++++++++++------------- src/xtty.h | 4 ---- 6 files changed, 35 insertions(+), 22 deletions(-) delete mode 100644 src/xtty.h diff --git a/src/ChangeLog b/src/ChangeLog index 5261b7e97..b28115853 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,14 @@ 2001-06-14 Pavel Roskin + * xtty.h: Remove, move contents ... + * tty.h: ... here. + [HAVE_X]: Define attrset(), mc_refresh(), enable_interrupt_key() + and disable_interrupt_key(). Don't declare mc_refresh(). + * view.c: Use braces around widget_move() since it's empty in + the GNOME edition. + * xslint.c: Eliminate attrset() and mc_refresh(). + * Makefile.in: Remove xtty.h. + * cons.handler.c (handle_console): Remove useless default. * ext.c (regex_command): Initialize include_target_len. * find.c [HAVE_GNOME]: Eliminate untyped declarations. diff --git a/src/Makefile.in b/src/Makefile.in index 0a5f8c749..175422a71 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -43,7 +43,7 @@ HDRS = color.h file.h mouse.h user.h dialog.h find.h main.h \ hotlist.h layout.h fsusage.h mountlist.h eregex.h complete.h \ myslang.h command.h cmd.h tty.h fs.h panelize.h achown.h \ learn.h listmode.h background.h \ - x.h textconf.h i18n.h findme.h popt.h filegui.h keys.h xtty.h \ + x.h textconf.h i18n.h findme.h popt.h filegui.h keys.h \ poptint.h poptalloca.h fileopctx.h treestore.h \ charsets.h selcodepage.h diff --git a/src/tty.h b/src/tty.h index 008ae6a67..b545a0304 100644 --- a/src/tty.h +++ b/src/tty.h @@ -1,10 +1,17 @@ /* This file takes care of loading ncurses or slang */ int got_interrupt (void); -void mc_refresh (void); #ifdef HAVE_X -#include "xtty.h" + +#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); + #else /* HAVE_X */ #ifdef HAVE_SLANG @@ -143,4 +150,6 @@ int init_pair (int, int, int); #define KEY_KP_SUBTRACT 4002 #define KEY_KP_MULTIPLY 4003 +void mc_refresh (void); + #endif /* HAVE_X */ diff --git a/src/view.c b/src/view.c index a2d7afe1c..2b6c33c80 100644 --- a/src/view.c +++ b/src/view.c @@ -840,10 +840,11 @@ display (WView *view) view_add_character (view, r_buff[0]); if ((cl != 0) && (cl % 10) == 0){ g_snprintf(r_buff, sizeof (r_buff), "%03d", cl); - if (ruler == 1) + if (ruler == 1) { widget_move (view, row + 1, c - 1); - else + } else { widget_move (view, row + height - 3, c - 1); + } view_add_string (view, r_buff); } } diff --git a/src/xslint.c b/src/xslint.c index 0b4eaddac..bb83bb103 100644 --- a/src/xslint.c +++ b/src/xslint.c @@ -18,27 +18,25 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - This file just has dummy procedures that don't do nothing under X11 - editions. I will make macros once I feel right with the Tk edition. + This file just has dummy procedures that do nothing under X11 editions. + They are called from the VFS library, which is shared with the textmode + edition, so it's impossible to eliminate then using macros. */ -#include - void -enable_interrupt_key(void) {} +enable_interrupt_key(void) +{ +} void -disable_interrupt_key(void) {} +disable_interrupt_key(void) +{ +} /* FIXME: We could provide a better way of doing this */ int -got_interrupt () { return 0; } - -void -attrset (int color) { } - -void -mc_refresh (void) +got_interrupt (void) { + return 0; } diff --git a/src/xtty.h b/src/xtty.h deleted file mode 100644 index eacfe8faa..000000000 --- a/src/xtty.h +++ /dev/null @@ -1,4 +0,0 @@ -#include "keys.h" - -#define LINES 0 -#define COLS 0