From bda707e46bb836a46c30c5e93ed3345355fd98d1 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 30 Jul 2002 00:12:53 +0000 Subject: [PATCH] * setup.c: Eliminate all PORT* macros. * screen.c: Likewise. --- src/ChangeLog | 3 +++ src/screen.c | 32 +------------------------------- src/setup.c | 12 ++---------- 3 files changed, 6 insertions(+), 41 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0b5d7d2fc..d820d7f1b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2002-07-29 Pavel Roskin + * setup.c: Eliminate all PORT* macros. + * screen.c: Likewise. + * subshell.c (feed_subshell): Reading 0 bytes in a channel with FD_ISSET being set is a sign of something being wrong - exit immediately. Observed when mc is run under su in xterm and diff --git a/src/screen.c b/src/screen.c index 43b95d63e..4c7fbbb18 100644 --- a/src/screen.c +++ b/src/screen.c @@ -85,18 +85,6 @@ static char *mini_status_format (WPanel *panel); /* This macro extracts the number of available lines in a panel */ #define llines(p) (p->widget.lines-3 - (show_mini_info ? 2 : 0)) -#ifdef PORT_NOT_FOCUS_SELECT_ITEM -# define focus_select_item(x) -#else -# define focus_select_item(x) select_item(x) -#endif - -#ifdef PORT_NOT_UNFOCUS_UNSELECT_ITEM -# define unfocus_unselect_item(x) -#else -# define unfocus_unselect_item(x) unselect_item(x) -#endif - static void set_colors (WPanel *panel) { @@ -247,39 +235,21 @@ string_file_type (file_entry *fe, int len) static char * string_file_mtime (file_entry *fe, int len) { -#ifdef PORT_STATIC_IN_STRING_FILE_XTIME - static char timebuf [MAX_I18NTIMELENGTH + 1]; - - return strcpy (timebuf, file_date (fe->buf.st_mtime)); -#else return file_date (fe->buf.st_mtime); -#endif } /* atime */ static char * string_file_atime (file_entry *fe, int len) { -#ifdef PORT_STATIC_IN_STRING_FILE_XTIME - static char timebuf [MAX_I18NTIMELENGTH + 1]; - - return strcpy (timebuf, file_date (fe->buf.st_atime)); -#else return file_date (fe->buf.st_atime); -#endif } /* ctime */ static char * string_file_ctime (file_entry *fe, int len) { -#ifdef PORT_STATIC_IN_STRING_FILE_XTIME - static char timebuf [MAX_I18NTIMELENGTH + 1]; - - return strcpy (timebuf, file_date (fe->buf.st_ctime)); -#else return file_date (fe->buf.st_ctime); -#endif } /* perm */ @@ -2213,7 +2183,7 @@ panel_callback (Dlg_head *h, WPanel *panel, int msg, int par) subshell_chdir (panel->cwd); show_dir (panel); - focus_select_item (panel); + select_item (panel); define_label (h, (Widget *)panel, 1, _("Help"), help_cmd); define_label (h, (Widget *)panel, 2, _("Menu"), user_file_menu_cmd); diff --git a/src/setup.c b/src/setup.c index a89eff2f8..5644840f7 100644 --- a/src/setup.c +++ b/src/setup.c @@ -41,14 +41,6 @@ #include "cmd.h" #include "file.h" -#ifndef PORT_LIST_MODE_NAME -# define PORT_LIST_MODE_NAME "list_mode" -#endif - -#ifndef PORT_LIST_MODE_DEFAULT -# define PORT_LIST_MODE_DEFAULT "full" -#endif - #ifdef HAVE_CHARSET #include "charsets.h" #endif @@ -259,7 +251,7 @@ panel_save_setup (WPanel *panel, char *section) for (i = 0; list_types [i].key; i++) if (list_types [i].list_type == panel->list_type){ - save_string (section, PORT_LIST_MODE_NAME, list_types [i].key, profile_name); + save_string (section, "list_mode", list_types [i].key, profile_name); break; } @@ -397,7 +389,7 @@ panel_load_setup (WPanel *panel, char *section) } /* Load the listing mode */ - load_string (section, PORT_LIST_MODE_NAME, PORT_LIST_MODE_DEFAULT, buffer, sizeof (buffer)); + load_string (section, "list_mode", "full", buffer, sizeof (buffer)); panel->list_type = list_full; for (i = 0; list_types [i].key; i++) if ( g_strcasecmp (list_types [i].key, buffer) == 0){