* setup.c: Eliminate all PORT* macros.
* screen.c: Likewise.
Этот коммит содержится в:
родитель
2935c85c85
Коммит
bda707e46b
@ -1,5 +1,8 @@
|
|||||||
2002-07-29 Pavel Roskin <proski@gnu.org>
|
2002-07-29 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* setup.c: Eliminate all PORT* macros.
|
||||||
|
* screen.c: Likewise.
|
||||||
|
|
||||||
* subshell.c (feed_subshell): Reading 0 bytes in a channel with
|
* subshell.c (feed_subshell): Reading 0 bytes in a channel with
|
||||||
FD_ISSET being set is a sign of something being wrong - exit
|
FD_ISSET being set is a sign of something being wrong - exit
|
||||||
immediately. Observed when mc is run under su in xterm and
|
immediately. Observed when mc is run under su in xterm and
|
||||||
|
32
src/screen.c
32
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 */
|
/* This macro extracts the number of available lines in a panel */
|
||||||
#define llines(p) (p->widget.lines-3 - (show_mini_info ? 2 : 0))
|
#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
|
static void
|
||||||
set_colors (WPanel *panel)
|
set_colors (WPanel *panel)
|
||||||
{
|
{
|
||||||
@ -247,39 +235,21 @@ string_file_type (file_entry *fe, int len)
|
|||||||
static char *
|
static char *
|
||||||
string_file_mtime (file_entry *fe, int len)
|
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);
|
return file_date (fe->buf.st_mtime);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* atime */
|
/* atime */
|
||||||
static char *
|
static char *
|
||||||
string_file_atime (file_entry *fe, int len)
|
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);
|
return file_date (fe->buf.st_atime);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ctime */
|
/* ctime */
|
||||||
static char *
|
static char *
|
||||||
string_file_ctime (file_entry *fe, int len)
|
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);
|
return file_date (fe->buf.st_ctime);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* perm */
|
/* perm */
|
||||||
@ -2213,7 +2183,7 @@ panel_callback (Dlg_head *h, WPanel *panel, int msg, int par)
|
|||||||
subshell_chdir (panel->cwd);
|
subshell_chdir (panel->cwd);
|
||||||
|
|
||||||
show_dir (panel);
|
show_dir (panel);
|
||||||
focus_select_item (panel);
|
select_item (panel);
|
||||||
|
|
||||||
define_label (h, (Widget *)panel, 1, _("Help"), help_cmd);
|
define_label (h, (Widget *)panel, 1, _("Help"), help_cmd);
|
||||||
define_label (h, (Widget *)panel, 2, _("Menu"), user_file_menu_cmd);
|
define_label (h, (Widget *)panel, 2, _("Menu"), user_file_menu_cmd);
|
||||||
|
12
src/setup.c
12
src/setup.c
@ -41,14 +41,6 @@
|
|||||||
#include "cmd.h"
|
#include "cmd.h"
|
||||||
#include "file.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
|
#ifdef HAVE_CHARSET
|
||||||
#include "charsets.h"
|
#include "charsets.h"
|
||||||
#endif
|
#endif
|
||||||
@ -259,7 +251,7 @@ panel_save_setup (WPanel *panel, char *section)
|
|||||||
|
|
||||||
for (i = 0; list_types [i].key; i++)
|
for (i = 0; list_types [i].key; i++)
|
||||||
if (list_types [i].list_type == panel->list_type){
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -397,7 +389,7 @@ panel_load_setup (WPanel *panel, char *section)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Load the listing mode */
|
/* 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;
|
panel->list_type = list_full;
|
||||||
for (i = 0; list_types [i].key; i++)
|
for (i = 0; list_types [i].key; i++)
|
||||||
if ( g_strcasecmp (list_types [i].key, buffer) == 0){
|
if ( g_strcasecmp (list_types [i].key, buffer) == 0){
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user