- update to latest GIT mc
- forwardport prompt fix and exit patch, keep IPv6 patch and drop the others
This commit is contained in:
parent
f204478101
commit
e0ce0b02cf
@ -1 +1 @@
|
||||
mc-4.6.2.tar.gz
|
||||
mc-4.6.99-20090731git.tar.bz2
|
||||
|
7017
mc-4.6.2-utf8.patch
7017
mc-4.6.2-utf8.patch
File diff suppressed because it is too large
Load Diff
@ -1,54 +0,0 @@
|
||||
--- mc-4.6.1a/src/mountlist.c.64bit 2005-02-08 23:33:52.000000000 +0100
|
||||
+++ mc-4.6.1a/src/mountlist.c 2005-05-10 17:09:24.122853504 +0200
|
||||
@@ -131,11 +131,19 @@ struct mount_entry
|
||||
|
||||
struct fs_usage
|
||||
{
|
||||
+#ifndef HAVE_SYS_STATVFS_H
|
||||
long fsu_blocks; /* Total blocks. */
|
||||
long fsu_bfree; /* Free blocks available to superuser. */
|
||||
long fsu_bavail; /* Free blocks available to non-superuser. */
|
||||
long fsu_files; /* Total file nodes. */
|
||||
long fsu_ffree; /* Free file nodes. */
|
||||
+#else /* We have sys/statvfs.h, use proper data types when _FILE_OFFSET_BITS=64 */
|
||||
+ fsblkcnt_t fsu_blocks;
|
||||
+ fsblkcnt_t fsu_bfree;
|
||||
+ fsblkcnt_t fsu_bavail;
|
||||
+ fsblkcnt_t fsu_files;
|
||||
+ fsblkcnt_t fsu_ffree;
|
||||
+#endif /* HAVE_SYS_STATVFS_H */
|
||||
};
|
||||
|
||||
static int get_fs_usage (char *path, struct fs_usage *fsp);
|
||||
@@ -665,6 +673,7 @@ my_statfs (struct my_statfs *myfs_stats,
|
||||
BLOCKS FROMSIZE-byte blocks, rounding away from zero.
|
||||
TOSIZE must be positive. Return -1 if FROMSIZE is not positive. */
|
||||
|
||||
+#if !defined(HAVE_SYS_STATFS_H) || !defined(STAT_STATVFS)
|
||||
static long
|
||||
fs_adjust_blocks (long blocks, int fromsize, int tosize)
|
||||
{
|
||||
@@ -672,13 +681,21 @@ fs_adjust_blocks (long blocks, int froms
|
||||
abort ();
|
||||
if (fromsize <= 0)
|
||||
return -1;
|
||||
-
|
||||
+#else
|
||||
+static fsblkcnt_t
|
||||
+fs_adjust_blocks (fsblkcnt_t blocks, unsigned long fromsize, unsigned long tosize)
|
||||
+{
|
||||
+ if (!tosize)
|
||||
+ abort ();
|
||||
+ if (!fromsize)
|
||||
+ return -1;
|
||||
+#endif
|
||||
if (fromsize == tosize) /* E.g., from 512 to 512. */
|
||||
return blocks;
|
||||
else if (fromsize > tosize) /* E.g., from 2048 to 512. */
|
||||
return blocks * (fromsize / tosize);
|
||||
else /* E.g., from 256 to 512. */
|
||||
- return (blocks + (blocks < 0 ? -1 : 1)) / (tosize / fromsize);
|
||||
+ return (blocks + 1) / (tosize / fromsize);
|
||||
}
|
||||
|
||||
#if defined(_AIX) && defined(_I386)
|
@ -1,363 +0,0 @@
|
||||
|
||||
Move syntax highlighting options into their own menu, and make TAB and
|
||||
Whitespace highlighting selectable.
|
||||
|
||||
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
|
||||
|
||||
---
|
||||
edit/edit.c | 6 ++
|
||||
edit/edit.h | 7 ++
|
||||
edit/editcmddef.h | 1
|
||||
edit/editdraw.c | 4 +
|
||||
edit/editkeys.c | 1
|
||||
edit/editmenu.c | 6 ++
|
||||
edit/editoptions.c | 141 ++++++++++++++++++++++++++++++++++++++++-------------
|
||||
src/setup.c | 1
|
||||
8 files changed, 133 insertions(+), 34 deletions(-)
|
||||
|
||||
Index: mc/edit/edit.c
|
||||
===================================================================
|
||||
--- mc.orig/edit/edit.c
|
||||
+++ mc/edit/edit.c
|
||||
@@ -2487,6 +2487,12 @@ edit_execute_cmd (WEdit *edit, int comma
|
||||
edit->force |= REDRAW_PAGE;
|
||||
break;
|
||||
|
||||
+ case CK_Toggle_Syntax2:
|
||||
+ ++option_highlighting;
|
||||
+ option_highlighting %= 4;
|
||||
+ edit->force |= REDRAW_PAGE;
|
||||
+ break;
|
||||
+
|
||||
case CK_Find:
|
||||
edit_search_cmd (edit, 0);
|
||||
break;
|
||||
Index: mc/edit/edit.h
|
||||
===================================================================
|
||||
--- mc.orig/edit/edit.h
|
||||
+++ mc/edit/edit.h
|
||||
@@ -228,6 +228,7 @@ int line_is_blank (WEdit *edit, long lin
|
||||
int edit_indent_width (WEdit *edit, long p);
|
||||
void edit_insert_indent (WEdit *edit, int indent);
|
||||
void edit_options_dialog (void);
|
||||
+void edit_syntax_opt_dialog(void);
|
||||
void edit_syntax_dialog (void);
|
||||
void edit_mail_dialog (WEdit *edit);
|
||||
void format_paragraph (WEdit *edit, int force);
|
||||
@@ -279,10 +280,16 @@ typedef enum {
|
||||
EDIT_DO_BACKUP
|
||||
} edit_save_mode_t;
|
||||
|
||||
+enum {
|
||||
+ HL_WHITESPACE = 1 << 0,
|
||||
+ HL_TABS = 1 << 1,
|
||||
+};
|
||||
+
|
||||
extern int option_save_mode;
|
||||
extern int option_save_position;
|
||||
extern int option_max_undo;
|
||||
extern int option_syntax_highlighting;
|
||||
+extern unsigned int option_highlighting;
|
||||
extern int option_auto_syntax;
|
||||
extern char *option_syntax_type;
|
||||
extern int editor_option_check_nl_at_eof;
|
||||
Index: mc/edit/editcmddef.h
|
||||
===================================================================
|
||||
--- mc.orig/edit/editcmddef.h
|
||||
+++ mc/edit/editcmddef.h
|
||||
@@ -109,6 +109,7 @@
|
||||
#define CK_Maximize 458
|
||||
|
||||
#define CK_Toggle_Syntax 480
|
||||
+#define CK_Toggle_Syntax2 481
|
||||
|
||||
/* macro */
|
||||
#define CK_Begin_Record_Macro 501
|
||||
Index: mc/edit/editdraw.c
|
||||
===================================================================
|
||||
--- mc.orig/edit/editdraw.c
|
||||
+++ mc/edit/editdraw.c
|
||||
@@ -273,7 +273,9 @@ print_to_widget (WEdit *edit, long row,
|
||||
}
|
||||
}
|
||||
|
||||
-int visible_tabs = 1, visible_tws = 1;
|
||||
+unsigned int option_highlighting = HL_TABS | HL_WHITESPACE;
|
||||
+#define visible_tabs (option_highlighting & HL_TABS)
|
||||
+#define visible_tws (option_highlighting & HL_WHITESPACE)
|
||||
|
||||
/* b is a pointer to the beginning of the line */
|
||||
static void
|
||||
Index: mc/edit/editkeys.c
|
||||
===================================================================
|
||||
--- mc.orig/edit/editkeys.c
|
||||
+++ mc/edit/editkeys.c
|
||||
@@ -114,6 +114,7 @@ static const edit_key_map_type common_ke
|
||||
{ XCTRL ('l'), CK_Refresh },
|
||||
{ XCTRL ('o'), CK_Shell },
|
||||
{ XCTRL ('s'), CK_Toggle_Syntax },
|
||||
+ { XCTRL ('v'), CK_Toggle_Syntax2 },
|
||||
{ XCTRL ('u'), CK_Undo },
|
||||
{ XCTRL ('t'), CK_Select_Codepage },
|
||||
{ XCTRL ('q'), CK_Insert_Literal },
|
||||
Index: mc/edit/editmenu.c
|
||||
===================================================================
|
||||
--- mc.orig/edit/editmenu.c
|
||||
+++ mc/edit/editmenu.c
|
||||
@@ -283,6 +283,11 @@ menu_options (void)
|
||||
edit_options_dialog ();
|
||||
}
|
||||
|
||||
+static void menu_syntax_options(void)
|
||||
+{
|
||||
+ edit_syntax_opt_dialog();
|
||||
+}
|
||||
+
|
||||
static void
|
||||
menu_syntax (void)
|
||||
{
|
||||
@@ -410,6 +415,7 @@ static menu_entry CmdMenuEmacs[] =
|
||||
static menu_entry OptMenu[] =
|
||||
{
|
||||
{' ', N_("&General... "), 'G', menu_options},
|
||||
+ {' ', N_("Highlight options... "), ' ', menu_syntax_options},
|
||||
{' ', N_("&Save mode..."), 'S', menu_save_mode_cmd},
|
||||
{' ', N_("Learn &Keys..."), 'K', learn_keys},
|
||||
{' ', N_("Syntax &Highlighting..."), 'H', menu_syntax},
|
||||
Index: mc/edit/editoptions.c
|
||||
===================================================================
|
||||
--- mc.orig/edit/editoptions.c
|
||||
+++ mc/edit/editoptions.c
|
||||
@@ -43,9 +43,6 @@
|
||||
#include "../src/dialog.h" /* B_CANCEL */
|
||||
#include "../src/wtools.h" /* QuickDialog */
|
||||
|
||||
-#define OPT_DLG_H 17
|
||||
-#define OPT_DLG_W 72
|
||||
-
|
||||
#ifndef USE_INTERNAL_EDIT
|
||||
#define USE_INTERNAL_EDIT 1
|
||||
#endif
|
||||
@@ -65,12 +62,98 @@ i18n_translate_array (const char *array[
|
||||
}
|
||||
}
|
||||
|
||||
+#define OPT_DLG_H 12
|
||||
+#define OPT_DLG_W 40
|
||||
+void edit_syntax_opt_dialog(void)
|
||||
+{
|
||||
+ int f_syntax_hl = option_syntax_highlighting;
|
||||
+ int f_tab_hl = option_highlighting & HL_TABS;
|
||||
+ int f_ws_hl = option_highlighting & HL_WHITESPACE;
|
||||
+
|
||||
+ int old_syntax_hl = f_syntax_hl;
|
||||
+
|
||||
+ QuickWidget quick_widgets[] = {
|
||||
+ {
|
||||
+ .widget_type = quick_button,
|
||||
+ .relative_x = 6,
|
||||
+ .x_divisions = 10,
|
||||
+ .relative_y = OPT_DLG_H - 3,
|
||||
+ .y_divisions = OPT_DLG_H,
|
||||
+ .text = N_("&Cancel"),
|
||||
+ .value = B_CANCEL,
|
||||
+ },
|
||||
+ {
|
||||
+ .widget_type = quick_button,
|
||||
+ .relative_x = 2,
|
||||
+ .x_divisions = 10,
|
||||
+ .relative_y = OPT_DLG_H - 3,
|
||||
+ .y_divisions = OPT_DLG_H,
|
||||
+ .text = N_("&OK"),
|
||||
+ .value = B_ENTER,
|
||||
+ },
|
||||
+ {
|
||||
+ .widget_type = quick_checkbox,
|
||||
+ .relative_x = 6,
|
||||
+ .x_divisions = OPT_DLG_W,
|
||||
+ .relative_y = 6,
|
||||
+ .y_divisions = OPT_DLG_H,
|
||||
+ .text = N_("Whitespace highlighting"),
|
||||
+ .result = &f_ws_hl,
|
||||
+ },
|
||||
+ {
|
||||
+ .widget_type = quick_checkbox,
|
||||
+ .relative_x = 6,
|
||||
+ .x_divisions = OPT_DLG_W,
|
||||
+ .relative_y = 5,
|
||||
+ .y_divisions = OPT_DLG_H,
|
||||
+ .text = N_("Tab highlighting"),
|
||||
+ .result = &f_tab_hl,
|
||||
+ },
|
||||
+ {
|
||||
+ .widget_type = quick_checkbox,
|
||||
+ .relative_x = 6,
|
||||
+ .x_divisions = OPT_DLG_W,
|
||||
+ .relative_y = 4,
|
||||
+ .y_divisions = OPT_DLG_H,
|
||||
+ .text = N_("Syntax highlighting"),
|
||||
+ .result = &f_syntax_hl,
|
||||
+ },
|
||||
+ NULL_QuickWidget,
|
||||
+ };
|
||||
+ QuickDialog quick_options = {
|
||||
+ .xlen = OPT_DLG_W,
|
||||
+ .ylen = OPT_DLG_H,
|
||||
+ .xpos = -1,
|
||||
+ .ypos = 0,
|
||||
+ .title = N_(" Syntax options "),
|
||||
+ .help = "",
|
||||
+ .widgets = quick_widgets,
|
||||
+ };
|
||||
+
|
||||
+ if (quick_dialog(&quick_options) == B_CANCEL)
|
||||
+ return;
|
||||
+
|
||||
+ if (old_syntax_hl != f_syntax_hl)
|
||||
+ /* Load or unload syntax rules if the option has changed */
|
||||
+ edit_load_syntax(wedit, NULL, option_syntax_type);
|
||||
+
|
||||
+ option_syntax_highlighting = f_syntax_hl;
|
||||
+ option_highlighting = 0;
|
||||
+ if (f_tab_hl)
|
||||
+ option_highlighting |= HL_TABS;
|
||||
+ if (f_ws_hl)
|
||||
+ option_highlighting |= HL_WHITESPACE;
|
||||
+}
|
||||
+#undef OPT_DLG_H
|
||||
+#undef OPT_DLG_W
|
||||
+
|
||||
+#define OPT_DLG_H 17
|
||||
+#define OPT_DLG_W 72
|
||||
void
|
||||
edit_options_dialog (void)
|
||||
{
|
||||
char wrap_length[32], tab_spacing[32], *p, *q;
|
||||
int wrap_mode = 0;
|
||||
- int old_syntax_hl;
|
||||
int tedit_key_emulation = edit_key_emulation;
|
||||
int toption_fill_tabs_with_spaces = option_fill_tabs_with_spaces;
|
||||
int toption_save_position = option_save_position;
|
||||
@@ -102,37 +185,34 @@ edit_options_dialog (void)
|
||||
OPT_DLG_H, "", OPT_DLG_W / 2 - 4 - 24, 0, 0, 0,
|
||||
"edit-tab-spacing"},
|
||||
/* 6 */
|
||||
- {quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 8,
|
||||
- OPT_DLG_H, N_("Synta&x highlighting"), 8, 0, 0, 0, NULL},
|
||||
- /* 7 */
|
||||
{quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 9,
|
||||
OPT_DLG_H, N_("Save file &position"), 0, 0, 0, 0, NULL},
|
||||
- /* 8 */
|
||||
+ /* 7 */
|
||||
{quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 10,
|
||||
OPT_DLG_H, N_("Confir&m before saving"), 6, 0, 0, 0, NULL},
|
||||
- /* 9 */
|
||||
+ /* 8 */
|
||||
{quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 11,
|
||||
OPT_DLG_H, N_("Fill tabs with &spaces"), 0, 0, 0, 0, NULL},
|
||||
- /* 10 */
|
||||
+ /* 9 */
|
||||
{quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 12,
|
||||
OPT_DLG_H, N_("&Return does autoindent"), 0, 0, 0, 0, NULL},
|
||||
- /* 11 */
|
||||
+ /* 10 */
|
||||
{quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 13,
|
||||
OPT_DLG_H, N_("&Backspace through tabs"), 0, 0, 0, 0, NULL},
|
||||
- /* 12 */
|
||||
+ /* 11 */
|
||||
{quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 14,
|
||||
OPT_DLG_H, N_("&Fake half tabs"), 0, 0, 0, 0, NULL},
|
||||
- /* 13 */
|
||||
+ /* 12 */
|
||||
{quick_radio, 5, OPT_DLG_W, OPT_DLG_H - 7, OPT_DLG_H, "", 3, 0, 0,
|
||||
const_cast(char **, wrap_str), "wrapm"},
|
||||
- /* 14 */
|
||||
+ /* 13 */
|
||||
{quick_label, 4, OPT_DLG_W, OPT_DLG_H - 8, OPT_DLG_H,
|
||||
N_("Wrap mode"), 0, 0,
|
||||
0, 0, NULL},
|
||||
- /* 15 */
|
||||
+ /* 14 */
|
||||
{quick_radio, 5, OPT_DLG_W, OPT_DLG_H - 13, OPT_DLG_H, "", 3, 0, 0,
|
||||
const_cast(char **, key_emu_str), "keyemu"},
|
||||
- /* 16 */
|
||||
+ /* 15 */
|
||||
{quick_label, 4, OPT_DLG_W, OPT_DLG_H - 14, OPT_DLG_H,
|
||||
N_("Key emulation"), 0, 0, 0, 0, NULL},
|
||||
NULL_QuickWidget
|
||||
@@ -156,13 +236,12 @@ edit_options_dialog (void)
|
||||
quick_widgets[3].str_result = &p;
|
||||
quick_widgets[5].text = tab_spacing;
|
||||
quick_widgets[5].str_result = &q;
|
||||
- quick_widgets[6].result = &tedit_syntax_highlighting;
|
||||
- quick_widgets[7].result = &toption_save_position;
|
||||
- quick_widgets[8].result = &tedit_confirm_save;
|
||||
- quick_widgets[9].result = &toption_fill_tabs_with_spaces;
|
||||
- quick_widgets[10].result = &toption_return_does_auto_indent;
|
||||
- quick_widgets[11].result = &toption_backspace_through_tabs;
|
||||
- quick_widgets[12].result = &toption_fake_half_tabs;
|
||||
+ quick_widgets[6].result = &toption_save_position;
|
||||
+ quick_widgets[7].result = &tedit_confirm_save;
|
||||
+ quick_widgets[8].result = &toption_fill_tabs_with_spaces;
|
||||
+ quick_widgets[9].result = &toption_return_does_auto_indent;
|
||||
+ quick_widgets[10].result = &toption_backspace_through_tabs;
|
||||
+ quick_widgets[11].result = &toption_fake_half_tabs;
|
||||
|
||||
if (option_auto_para_formatting)
|
||||
wrap_mode = 1;
|
||||
@@ -171,19 +250,17 @@ edit_options_dialog (void)
|
||||
else
|
||||
wrap_mode = 0;
|
||||
|
||||
- quick_widgets[13].result = &wrap_mode;
|
||||
- quick_widgets[13].value = wrap_mode;
|
||||
+ quick_widgets[12].result = &wrap_mode;
|
||||
+ quick_widgets[12].value = wrap_mode;
|
||||
|
||||
- quick_widgets[15].result = &tedit_key_emulation;
|
||||
- quick_widgets[15].value = tedit_key_emulation;
|
||||
+ quick_widgets[14].result = &tedit_key_emulation;
|
||||
+ quick_widgets[14].value = tedit_key_emulation;
|
||||
|
||||
Quick_options.widgets = quick_widgets;
|
||||
|
||||
if (quick_dialog (&Quick_options) == B_CANCEL)
|
||||
return;
|
||||
|
||||
- old_syntax_hl = option_syntax_highlighting;
|
||||
-
|
||||
if (p) {
|
||||
option_word_wrap_line_length = atoi (p);
|
||||
g_free (p);
|
||||
@@ -195,7 +272,6 @@ edit_options_dialog (void)
|
||||
g_free (q);
|
||||
}
|
||||
|
||||
- option_syntax_highlighting = tedit_syntax_highlighting;
|
||||
edit_confirm_save = tedit_confirm_save;
|
||||
option_save_position = toption_save_position;
|
||||
option_fill_tabs_with_spaces = toption_fill_tabs_with_spaces;
|
||||
@@ -220,9 +296,8 @@ edit_options_dialog (void)
|
||||
edit_reload_menu ();
|
||||
}
|
||||
|
||||
- /* Load or unload syntax rules if the option has changed */
|
||||
- if (option_syntax_highlighting != old_syntax_hl)
|
||||
- edit_load_syntax (wedit, NULL, option_syntax_type);
|
||||
/* Load usermap if it's needed */
|
||||
edit_load_user_map (wedit);
|
||||
}
|
||||
+#undef DLG_OPT_W
|
||||
+#undef DLG_OPT_H
|
||||
Index: mc/src/setup.c
|
||||
===================================================================
|
||||
--- mc.orig/src/setup.c
|
||||
+++ mc/src/setup.c
|
||||
@@ -216,6 +216,7 @@ static const struct {
|
||||
{ "editor_option_typewriter_wrap", &option_typewriter_wrap },
|
||||
{ "editor_edit_confirm_save", &edit_confirm_save },
|
||||
{ "editor_syntax_highlighting", &option_syntax_highlighting },
|
||||
+ { "editor_highlight", &option_highlighting },
|
||||
#endif /* USE_INTERNAL_EDIT */
|
||||
|
||||
{ "nice_rotating_dash", &nice_rotating_dash },
|
@ -1,16 +0,0 @@
|
||||
--- mc-4.6.1a/lib/cedit.menu.changelog 2005-05-27 05:35:12.000000000 +0200
|
||||
+++ mc-4.6.1a/lib/cedit.menu 2006-01-30 10:46:11.000000000 +0100
|
||||
@@ -449,6 +449,13 @@
|
||||
EMAIL="<$REPLYTO>"
|
||||
echo "$DATE $AUTHOR $EMAIL" >%b
|
||||
|
||||
+S Insert `Spec-file Changelog' string
|
||||
+ DATE="`date +\"%%a %%b %%e %%Y\"`"
|
||||
+ MY_UID="`id | sed 's/^.*uid=\([^(]*\).*$/\1/'`"
|
||||
+ AUTHOR="`awk -F: '$3 == '$MY_UID' {print $5}' /etc/passwd`"
|
||||
+ EMAIL="<$REPLYTO>"
|
||||
+ echo "* $DATE $AUTHOR $EMAIL" >%b
|
||||
+
|
||||
s Invoke `shell'
|
||||
sh
|
||||
|
@ -1,15 +0,0 @@
|
||||
--- mc-4.6.1a/src/file.c.delcheck 2006-04-28 13:46:33.000000000 +0200
|
||||
+++ mc-4.6.1a/src/file.c 2006-04-28 13:52:48.000000000 +0200
|
||||
@@ -1755,6 +1755,12 @@
|
||||
free_linklist (&linklist);
|
||||
free_linklist (&dest_dirs);
|
||||
|
||||
+ /* Update panel contents to avoid actions on deleted files */
|
||||
+ if (!panel->is_panelized) {
|
||||
+ update_panels (UP_RELOAD, UP_KEEPSEL);
|
||||
+ repaint_screen ();
|
||||
+ }
|
||||
+
|
||||
if (single_entry) {
|
||||
if (force_single) {
|
||||
source = selection (panel)->fname;
|
@ -1,11 +0,0 @@
|
||||
diff -up mc-4.6.2-pre1/edit/edit.c.segv mc-4.6.2-pre1/edit/edit.c
|
||||
--- mc-4.6.2-pre1/edit/edit.c.segv 2009-05-15 11:42:08.000000000 +0200
|
||||
+++ mc-4.6.2-pre1/edit/edit.c 2009-05-15 11:54:29.000000000 +0200
|
||||
@@ -1808,6 +1808,7 @@ my_type_of (int c)
|
||||
c = '0';
|
||||
else if (iswspace (c))
|
||||
c = ' ';
|
||||
+ if ( c > 0xff ) c = ' ';
|
||||
#endif /* UTF8 */
|
||||
q = strchr (option_chars_move_whole_word, c);
|
||||
if (!q)
|
356
mc-etcmc.patch
356
mc-etcmc.patch
@ -1,356 +0,0 @@
|
||||
diff -up mc-4.6.2/edit/editcmd.c.etcmc mc-4.6.2/edit/editcmd.c
|
||||
--- mc-4.6.2/edit/editcmd.c.etcmc 2009-05-26 18:05:21.000000000 +0200
|
||||
+++ mc-4.6.2/edit/editcmd.c 2009-05-26 18:05:21.000000000 +0200
|
||||
@@ -51,7 +51,7 @@
|
||||
#include "../src/tty.h" /* LINES */
|
||||
#include "../src/widget.h" /* listbox_new() */
|
||||
#include "../src/layout.h" /* clr_scr() */
|
||||
-#include "../src/main.h" /* mc_home */
|
||||
+#include "../src/main.h" /* mc_home, mc_home_alt */
|
||||
#include "../src/help.h" /* interactive_display() */
|
||||
#include "../src/key.h" /* XCTRL */
|
||||
#include "../src/dialog.h" /* do_refresh() */
|
||||
@@ -2833,12 +2833,15 @@ edit_block_process_cmd (WEdit *edit, con
|
||||
return;
|
||||
}
|
||||
if (!(script_src = fopen (o, "r"))) {
|
||||
- fclose (script_home);
|
||||
- unlink (h);
|
||||
- edit_error_dialog ("", get_sys_error (catstrs
|
||||
- (_("Error reading script:"),
|
||||
- o, (char *) NULL)));
|
||||
- return;
|
||||
+ o = catstrs (mc_home_alt, shell_cmd, (char *) NULL);
|
||||
+ if (!(script_src = fopen (o, "r"))) {
|
||||
+ fclose (script_home);
|
||||
+ unlink (h);
|
||||
+ edit_error_dialog ("", get_sys_error (catstrs
|
||||
+ (_("Error reading script:"),
|
||||
+ o, (char *) NULL)));
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
while (fgets (buf, sizeof (buf), script_src))
|
||||
fputs (buf, script_home);
|
||||
diff -up mc-4.6.2/edit/syntax.c.etcmc mc-4.6.2/edit/syntax.c
|
||||
--- mc-4.6.2/edit/syntax.c.etcmc 2009-02-01 20:30:21.000000000 +0100
|
||||
+++ mc-4.6.2/edit/syntax.c 2009-05-26 18:05:21.000000000 +0200
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "edit.h"
|
||||
#include "edit-widget.h"
|
||||
#include "../src/color.h" /* use_colors */
|
||||
-#include "../src/main.h" /* mc_home */
|
||||
+#include "../src/main.h" /* mc_home, mc_home_alt */
|
||||
#include "../src/wtools.h" /* message() */
|
||||
|
||||
/* bytes */
|
||||
@@ -682,6 +682,12 @@ static FILE *open_include_file (const ch
|
||||
g_free (error_file_name);
|
||||
error_file_name = g_strconcat (mc_home, PATH_SEP_STR "syntax" PATH_SEP_STR,
|
||||
filename, (char *) NULL);
|
||||
+ if (!(f = fopen (error_file_name, "r"))) {
|
||||
+ g_free (error_file_name);
|
||||
+ error_file_name = g_strconcat (mc_home_alt, PATH_SEP_STR "syntax" PATH_SEP_STR,
|
||||
+ filename, (char *) NULL);
|
||||
+ } else return f;
|
||||
+
|
||||
return fopen (error_file_name, "r");
|
||||
}
|
||||
|
||||
diff -up mc-4.6.2/src/charsets.c.etcmc mc-4.6.2/src/charsets.c
|
||||
--- mc-4.6.2/src/charsets.c.etcmc 2009-05-26 18:05:21.000000000 +0200
|
||||
+++ mc-4.6.2/src/charsets.c 2009-05-26 18:05:21.000000000 +0200
|
||||
@@ -47,12 +47,17 @@ load_codepages_list (void)
|
||||
char *fname;
|
||||
char buf[256];
|
||||
extern char *mc_home;
|
||||
+ extern char *mc_home_alt;
|
||||
extern int display_codepage;
|
||||
char *default_codepage = NULL;
|
||||
|
||||
fname = mhl_str_dir_plus_file (mc_home, CHARSETS_INDEX);
|
||||
if (!(f = fopen (fname, "r"))) {
|
||||
- fprintf (stderr, _("Warning: file %s not found\n"), fname);
|
||||
+ g_free (fname);
|
||||
+ fname = mhl_str_dir_plus_file (mc_home_alt, CHARSETS_INDEX);
|
||||
+ if (!(f = fopen (fname, "r"))) {
|
||||
+ fprintf (stderr, _("Warning: file %s not found\n"), fname);
|
||||
+ }
|
||||
g_free (fname);
|
||||
return -1;
|
||||
}
|
||||
diff -up mc-4.6.2/src/cmd.c.etcmc mc-4.6.2/src/cmd.c
|
||||
--- mc-4.6.2/src/cmd.c.etcmc 2009-05-26 18:05:21.000000000 +0200
|
||||
+++ mc-4.6.2/src/cmd.c 2009-05-26 18:05:21.000000000 +0200
|
||||
@@ -592,8 +592,13 @@ void ext_cmd (void)
|
||||
check_for_default (extdir, buffer);
|
||||
do_edit (buffer);
|
||||
g_free (buffer);
|
||||
- } else if (dir == 1)
|
||||
+ } else if (dir == 1) {
|
||||
+ if (!exist_file(extdir)) {
|
||||
+ g_free (extdir);
|
||||
+ extdir = mhl_str_dir_plus_file (mc_home_alt, MC_LIB_EXT);
|
||||
+ }
|
||||
do_edit (extdir);
|
||||
+ }
|
||||
|
||||
g_free (extdir);
|
||||
flush_extension_file ();
|
||||
@@ -616,6 +621,11 @@ menu_edit_cmd (int where)
|
||||
);
|
||||
|
||||
menufile = mhl_str_dir_plus_file (mc_home, where ? CEDIT_GLOBAL_MENU : MC_GLOBAL_MENU);
|
||||
+
|
||||
+ if (!exist_file(menufile)) {
|
||||
+ g_free (menufile);
|
||||
+ menufile = mhl_str_dir_plus_file (mc_home_alt, where ? CEDIT_GLOBAL_MENU : MC_GLOBAL_MENU);
|
||||
+ }
|
||||
|
||||
switch (dir) {
|
||||
case 0:
|
||||
@@ -630,6 +640,10 @@ menu_edit_cmd (int where)
|
||||
|
||||
case 2:
|
||||
buffer = mhl_str_dir_plus_file (mc_home, where ? CEDIT_GLOBAL_MENU : MC_GLOBAL_MENU);
|
||||
+ if (!exist_file(buffer)) {
|
||||
+ g_free (buffer);
|
||||
+ buffer = mhl_str_dir_plus_file (mc_home_alt, where ? CEDIT_GLOBAL_MENU : MC_GLOBAL_MENU);
|
||||
+ }
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -688,7 +702,7 @@ edit_syntax_cmd (void)
|
||||
_(" Which syntax file you want to edit? "), 0, 2,
|
||||
_("&User"), _("&System Wide"));
|
||||
}
|
||||
- extdir = mhl_str_dir_plus_file (mc_home, "syntax" PATH_SEP_STR "Syntax");
|
||||
+ extdir = mhl_str_dir_plus_file (mc_home_alt, "syntax" PATH_SEP_STR "Syntax");
|
||||
|
||||
if (dir == 0) {
|
||||
buffer = mhl_str_dir_plus_file (home_dir, SYNTAX_FILE);
|
||||
diff -up mc-4.6.2/src/ext.c.etcmc mc-4.6.2/src/ext.c
|
||||
--- mc-4.6.2/src/ext.c.etcmc 2009-02-01 20:30:21.000000000 +0100
|
||||
+++ mc-4.6.2/src/ext.c 2009-05-26 18:05:21.000000000 +0200
|
||||
@@ -446,6 +446,10 @@ regex_command (const char *filename, con
|
||||
g_free (extension_file);
|
||||
check_stock_mc_ext:
|
||||
extension_file = mhl_str_dir_plus_file (mc_home, MC_LIB_EXT);
|
||||
+ if (!exist_file (extension_file)) {
|
||||
+ g_free (extension_file);
|
||||
+ extension_file = mhl_str_dir_plus_file (mc_home_alt, MC_LIB_EXT);
|
||||
+ }
|
||||
mc_user_ext = 0;
|
||||
}
|
||||
data = load_file (extension_file);
|
||||
diff -up mc-4.6.2/src/main.c.etcmc mc-4.6.2/src/main.c
|
||||
--- mc-4.6.2/src/main.c.etcmc 2009-05-26 18:05:21.000000000 +0200
|
||||
+++ mc-4.6.2/src/main.c 2009-05-26 18:07:07.000000000 +0200
|
||||
@@ -291,9 +291,12 @@ char *xterm_title_str = NULL;
|
||||
/* Is the LANG UTF-8 ? */
|
||||
gboolean is_utf8 = FALSE;
|
||||
|
||||
-/* mc_home: The home of MC */
|
||||
+/* mc_home: The home of MC - /etc/mc or defined by MC_DATADIR */
|
||||
char *mc_home = NULL;
|
||||
|
||||
+/* mc_home_alt: Alternative home of MC - deprecated /usr/share/mc */
|
||||
+char *mc_home_alt = NULL;
|
||||
+
|
||||
char cmd_buf[512];
|
||||
|
||||
static void
|
||||
@@ -1858,8 +1861,9 @@ OS_Setup (void)
|
||||
if ((mc_libdir = getenv ("MC_DATADIR")) != NULL) {
|
||||
mc_home = g_strdup (mc_libdir);
|
||||
} else {
|
||||
- mc_home = g_strdup (DATADIR);
|
||||
+ mc_home = g_strdup (SYSCONFDIR);
|
||||
}
|
||||
+ mc_home_alt = mc_libdir != NULL ? g_strdup (SYSCONFDIR) : g_strdup (DATADIR);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1989,7 +1993,7 @@ process_args (poptContext ctx, int c, co
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
- printf ("%s\n", mc_home);
|
||||
+ printf ("%s (%s)\n", mc_home, mc_home_alt);
|
||||
exit (0);
|
||||
break;
|
||||
|
||||
@@ -2339,6 +2343,7 @@ main (int argc, char *argv[])
|
||||
}
|
||||
g_free (last_wd_string);
|
||||
|
||||
+ g_free (mc_home_alt);
|
||||
g_free (mc_home);
|
||||
done_key ();
|
||||
#ifdef HAVE_CHARSET
|
||||
diff -up mc-4.6.2/src/main.h.etcmc mc-4.6.2/src/main.h
|
||||
--- mc-4.6.2/src/main.h.etcmc 2009-05-26 18:05:21.000000000 +0200
|
||||
+++ mc-4.6.2/src/main.h 2009-05-26 18:05:21.000000000 +0200
|
||||
@@ -114,7 +114,7 @@ void print_vfs_message(const char *msg,
|
||||
|
||||
extern const char *prompt;
|
||||
extern const char *edit_one_file;
|
||||
-extern char *mc_home;
|
||||
+extern char *mc_home, *mc_home_alt;
|
||||
char *get_mc_lib_dir (void);
|
||||
|
||||
int maybe_cd (int move_up_dir);
|
||||
diff -up mc-4.6.2/src/Makefile.am.etcmc mc-4.6.2/src/Makefile.am
|
||||
--- mc-4.6.2/src/Makefile.am.etcmc 2009-05-26 18:05:21.000000000 +0200
|
||||
+++ mc-4.6.2/src/Makefile.am 2009-05-26 18:05:21.000000000 +0200
|
||||
@@ -8,9 +8,11 @@ bin_PROGRAMS = mc mcmfmt
|
||||
if CONS_SAVER
|
||||
pkglibexec_PROGRAMS = cons.saver
|
||||
AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" \
|
||||
- -DSAVERDIR=\""$(pkglibexecdir)"\"
|
||||
+ -DSAVERDIR=\""$(pkglibexecdir)"\" \
|
||||
+ -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\"
|
||||
else
|
||||
-AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\"
|
||||
+AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" \
|
||||
+ -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\"
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS = man2hlp
|
||||
diff -up mc-4.6.2/src/Makefile.in.etcmc mc-4.6.2/src/Makefile.in
|
||||
--- mc-4.6.2/src/Makefile.in.etcmc 2009-02-01 20:46:26.000000000 +0100
|
||||
+++ mc-4.6.2/src/Makefile.in 2009-05-26 18:09:15.000000000 +0200
|
||||
@@ -294,9 +294,8 @@ top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
-@CONS_SAVER_FALSE@AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\"
|
||||
-@CONS_SAVER_TRUE@AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" \
|
||||
-@CONS_SAVER_TRUE@ -DSAVERDIR=\""$(pkglibexecdir)"\"
|
||||
+@CONS_SAVER_FALSE@AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\"
|
||||
+@CONS_SAVER_TRUE@AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" -DSAVERDIR=\""$(pkglibexecdir)"\" -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\"
|
||||
|
||||
man2hlp_LDADD = $(GLIB_LIBS)
|
||||
mcmfmt_SOURCES = mfmt.c
|
||||
diff -up mc-4.6.2/src/setup.c.etcmc mc-4.6.2/src/setup.c
|
||||
--- mc-4.6.2/src/setup.c.etcmc 2009-05-26 18:05:21.000000000 +0200
|
||||
+++ mc-4.6.2/src/setup.c 2009-05-26 18:05:21.000000000 +0200
|
||||
@@ -522,8 +522,15 @@ setup_init (void)
|
||||
if (exist_file (inifile)){
|
||||
g_free (profile);
|
||||
profile = inifile;
|
||||
- } else
|
||||
+ } else {
|
||||
g_free (inifile);
|
||||
+ inifile = mhl_str_dir_plus_file (mc_home_alt, "mc.ini");
|
||||
+ if (exist_file (inifile)) {
|
||||
+ g_free (profile);
|
||||
+ profile = inifile;
|
||||
+ } else
|
||||
+ g_free (inifile);
|
||||
+ }
|
||||
}
|
||||
|
||||
profile_name = profile;
|
||||
@@ -542,6 +549,11 @@ load_setup (void)
|
||||
/* mc.lib is common for all users, but has priority lower than
|
||||
~/.mc/ini. FIXME: it's only used for keys and treestore now */
|
||||
global_profile_name = mhl_str_dir_plus_file (mc_home, "mc.lib");
|
||||
+
|
||||
+ if (!exist_file(global_profile_name)) {
|
||||
+ g_free (global_profile_name);
|
||||
+ global_profile_name = mhl_str_dir_plus_file (mc_home_alt, "mc.lib");
|
||||
+ }
|
||||
|
||||
/* Load integer boolean options */
|
||||
for (i = 0; int_options[i].opt_name; i++)
|
||||
diff -up mc-4.6.2/src/user.c.etcmc mc-4.6.2/src/user.c
|
||||
--- mc-4.6.2/src/user.c.etcmc 2009-02-01 20:30:21.000000000 +0100
|
||||
+++ mc-4.6.2/src/user.c 2009-05-26 18:05:21.000000000 +0200
|
||||
@@ -729,6 +729,11 @@ user_menu_cmd (struct WEdit *edit_widget
|
||||
g_free (menu);
|
||||
menu = mhl_str_dir_plus_file \
|
||||
(mc_home, edit_widget ? CEDIT_GLOBAL_MENU : MC_GLOBAL_MENU);
|
||||
+ if (!exist_file (menu)) {
|
||||
+ g_free (menu);
|
||||
+ menu = mhl_str_dir_plus_file \
|
||||
+ (mc_home_alt, edit_widget ? CEDIT_GLOBAL_MENU : MC_GLOBAL_MENU);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff -up mc-4.6.2/src/util.c.etcmc mc-4.6.2/src/util.c
|
||||
--- mc-4.6.2/src/util.c.etcmc 2009-05-26 18:05:21.000000000 +0200
|
||||
+++ mc-4.6.2/src/util.c 2009-05-26 18:05:21.000000000 +0200
|
||||
@@ -44,7 +44,7 @@
|
||||
#include "tty.h"
|
||||
#include "global.h"
|
||||
#include "profile.h"
|
||||
-#include "main.h" /* mc_home */
|
||||
+#include "main.h" /* mc_home, mc_home_alt */
|
||||
#include "cmd.h" /* guess_message_value */
|
||||
#include "mountlist.h"
|
||||
#include "win.h" /* xterm_flag */
|
||||
@@ -978,16 +978,25 @@ load_mc_home_file (const char *filename,
|
||||
|
||||
if (!data) {
|
||||
g_free (hintfile);
|
||||
- /* Fall back to the two-letter language code */
|
||||
- if (lang[0] && lang[1])
|
||||
- lang[2] = 0;
|
||||
+ g_free (hintfile_base);
|
||||
+
|
||||
+ hintfile_base = mhl_str_dir_plus_file (mc_home_alt, filename);
|
||||
+
|
||||
hintfile = g_strconcat (hintfile_base, ".", lang, (char *) NULL);
|
||||
data = load_file (hintfile);
|
||||
-
|
||||
+
|
||||
if (!data) {
|
||||
- g_free (hintfile);
|
||||
- hintfile = hintfile_base;
|
||||
- data = load_file (hintfile_base);
|
||||
+ /* Fall back to the two-letter language code */
|
||||
+ if (lang[0] && lang[1])
|
||||
+ lang[2] = 0;
|
||||
+ hintfile = g_strconcat (hintfile_base, ".", lang, (char *) NULL);
|
||||
+ data = load_file (hintfile);
|
||||
+
|
||||
+ if (!data) {
|
||||
+ g_free (hintfile);
|
||||
+ hintfile = hintfile_base;
|
||||
+ data = load_file (hintfile_base);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff -up mc-4.6.2/vfs/extfs.c.etcmc mc-4.6.2/vfs/extfs.c
|
||||
--- mc-4.6.2/vfs/extfs.c.etcmc 2009-02-01 20:30:21.000000000 +0100
|
||||
+++ mc-4.6.2/vfs/extfs.c 2009-05-26 18:05:21.000000000 +0200
|
||||
@@ -249,7 +249,7 @@ extfs_open_archive (int fstype, const ch
|
||||
tmp = name_quote (name, 0);
|
||||
}
|
||||
|
||||
- mc_extfsdir = mhl_str_dir_plus_file (mc_home, "extfs" PATH_SEP_STR);
|
||||
+ mc_extfsdir = mhl_str_dir_plus_file (mc_home_alt, "extfs" PATH_SEP_STR);
|
||||
cmd =
|
||||
g_strconcat (mc_extfsdir, extfs_prefixes[fstype], " list ",
|
||||
local_name ? local_name : tmp, (char *) NULL);
|
||||
@@ -624,7 +624,7 @@ extfs_cmd (const char *extfs_cmd, struct
|
||||
archive_name = name_quote (extfs_get_archive_name (archive), 0);
|
||||
quoted_localname = name_quote (localname, 0);
|
||||
|
||||
- mc_extfsdir = mhl_str_dir_plus_file (mc_home, "extfs" PATH_SEP_STR);
|
||||
+ mc_extfsdir = mhl_str_dir_plus_file (mc_home_alt, "extfs" PATH_SEP_STR);
|
||||
cmd = g_strconcat (mc_extfsdir, extfs_prefixes[archive->fstype],
|
||||
extfs_cmd, archive_name, " ", quoted_file, " ",
|
||||
quoted_localname, (char *) NULL);
|
||||
@@ -653,7 +653,7 @@ extfs_run (struct vfs_class *me, const c
|
||||
g_free (p);
|
||||
|
||||
archive_name = name_quote (extfs_get_archive_name (archive), 0);
|
||||
- mc_extfsdir = mhl_str_dir_plus_file (mc_home, "extfs" PATH_SEP_STR);
|
||||
+ mc_extfsdir = mhl_str_dir_plus_file (mc_home_alt, "extfs" PATH_SEP_STR);
|
||||
cmd = g_strconcat (mc_extfsdir, extfs_prefixes[archive->fstype],
|
||||
" run ", archive_name, " ", q, (char *) NULL);
|
||||
g_free (mc_extfsdir);
|
@ -1,14 +1,15 @@
|
||||
--- mc-2006-08-12-18/src/command.c.exit 2005-06-07 16:16:19.000000000 +0200
|
||||
+++ mc-2006-08-12-18/src/command.c 2006-08-15 12:48:12.000000000 +0200
|
||||
@@ -214,6 +214,11 @@
|
||||
diff -up mc-4.6.99/src/command.c.exit mc-4.6.99/src/command.c
|
||||
--- mc-4.6.99/src/command.c.exit 2009-07-31 19:27:10.000000000 +0200
|
||||
+++ mc-4.6.99/src/command.c 2009-07-31 20:08:01.000000000 +0200
|
||||
@@ -224,6 +224,11 @@ enter (WInput *cmdline)
|
||||
size_t i, j, cmd_len;
|
||||
|
||||
if (!vfs_current_is_local ()) {
|
||||
+ if (strcmp (cmd, "exit") == 0) {
|
||||
+ quiet_quit_cmd ();
|
||||
+ return MSG_HANDLED;
|
||||
+ }
|
||||
+ if (strcmp (cmd, "exit") == 0) {
|
||||
+ quiet_quit_cmd ();
|
||||
+ return MSG_HANDLED;
|
||||
+ }
|
||||
+
|
||||
message (1, MSG_ERROR,
|
||||
message (D_ERROR, MSG_ERROR,
|
||||
_
|
||||
(" Cannot execute commands on non-local filesystems"));
|
||||
|
@ -1,272 +0,0 @@
|
||||
diff -up mc-4.6.2/configure.ac.extensions mc-4.6.2/configure.ac
|
||||
--- mc-4.6.2/configure.ac.extensions 2009-02-01 20:30:21.000000000 +0100
|
||||
+++ mc-4.6.2/configure.ac 2009-05-26 14:42:48.000000000 +0200
|
||||
@@ -81,7 +81,7 @@ AC_PROG_LN_S
|
||||
AC_CHECK_TOOL(AR, ar, ar)
|
||||
|
||||
dnl Only list browsers here that can be run in background (i.e. with `&')
|
||||
-AC_CHECK_PROGS(X11_WWW, [gnome-moz-remote mozilla konqueror opera netscape])
|
||||
+AC_CHECK_PROGS(X11_WWW, [firefox gnome-moz-remote mozilla konqueror opera netscape])
|
||||
|
||||
dnl
|
||||
dnl Ovverriding mmap support. This has to be before AC_FUNC_MMAP is used.
|
||||
diff -up mc-4.6.2/configure.extensions mc-4.6.2/configure
|
||||
--- mc-4.6.2/configure.extensions 2009-02-01 20:46:23.000000000 +0100
|
||||
+++ mc-4.6.2/configure 2009-05-26 14:42:48.000000000 +0200
|
||||
@@ -6843,7 +6843,7 @@ else
|
||||
fi
|
||||
|
||||
|
||||
-for ac_prog in gnome-moz-remote mozilla konqueror opera netscape
|
||||
+for ac_prog in firefox gnome-moz-remote mozilla konqueror opera netscape
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
diff -up mc-4.6.2/lib/mc.ext.in.extensions mc-4.6.2/lib/mc.ext.in
|
||||
--- mc-4.6.2/lib/mc.ext.in.extensions 2009-02-01 20:30:21.000000000 +0100
|
||||
+++ mc-4.6.2/lib/mc.ext.in 2009-05-26 14:44:46.000000000 +0200
|
||||
@@ -119,6 +119,11 @@ regex/\.t(ar\.bz2|bz|b2)$
|
||||
Open=%cd %p#utar
|
||||
View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf -
|
||||
|
||||
+# .tar.lzma, .tlz
|
||||
+regex/\.t(ar\.lzma|lz)$
|
||||
+ Open=%cd %p#utar
|
||||
+ View=%view{ascii} lzma -dc %f 2>/dev/null | tar tvvf -
|
||||
+
|
||||
# .tar.F - used in QNX
|
||||
regex/\.tar\.F$
|
||||
# Open=%cd %p#utar
|
||||
@@ -198,8 +203,8 @@ regex/\.(rpm|spm)$
|
||||
|
||||
# deb
|
||||
regex/\.u?deb$
|
||||
- Open=%cd %p#deb
|
||||
- View=%view{ascii} dpkg-deb -I %f && echo && dpkg-deb -c %f
|
||||
+ Open=%cd %p#uar
|
||||
+ View=%view{ascii} file %f && nm %f
|
||||
|
||||
# ISO9660
|
||||
regex/\.iso$
|
||||
@@ -220,14 +225,25 @@ type/^ASCII\ mail\ text
|
||||
|
||||
# C
|
||||
shell/.c
|
||||
- Open=%var{EDITOR:vi} %f
|
||||
+ Include=editor
|
||||
|
||||
# Fortran
|
||||
shell/.f
|
||||
- Open=%var{EDITOR:vi} %f
|
||||
+ Include=editor
|
||||
|
||||
# Header
|
||||
-regex/\.(h|hpp)$
|
||||
+regex/\.([Hh]|[Hh]pp|HPP)$
|
||||
+ Include=editor
|
||||
+
|
||||
+# Asm
|
||||
+regex/\.([Ss]|[Aa]sm|ASM)$
|
||||
+ Include=editor
|
||||
+
|
||||
+# C++
|
||||
+regex/\.(C|cc|[Cc]pp|CPP)$
|
||||
+ Include=editor
|
||||
+
|
||||
+include/editor
|
||||
Open=%var{EDITOR:vi} %f
|
||||
|
||||
# Object
|
||||
@@ -251,10 +267,12 @@ regex/\.(te?xi|texinfo)$
|
||||
|
||||
# GNU Info page
|
||||
type/^Info\ text
|
||||
- Open=info -f %f
|
||||
+ #Open=info -f %f
|
||||
+ Open=pinfo %f
|
||||
|
||||
shell/.info
|
||||
- Open=info -f %f
|
||||
+ #Open=info -f %f
|
||||
+ Open=pinfo %f
|
||||
|
||||
# Manual page
|
||||
# Exception - .so libraries are not manual pages
|
||||
@@ -298,6 +316,10 @@ regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|
|
||||
Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
|
||||
View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
|
||||
|
||||
+regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
|
||||
+ Open=case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
|
||||
+ View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
|
||||
+
|
||||
|
||||
### Images ###
|
||||
|
||||
@@ -328,18 +350,24 @@ type/^PPM
|
||||
type/^Netpbm
|
||||
Include=image
|
||||
|
||||
+type/^JNG
|
||||
+ Include=image
|
||||
+
|
||||
+type/^MNG
|
||||
+ Include=image
|
||||
+
|
||||
shell/.xcf
|
||||
Open=(gimp %f &)
|
||||
|
||||
shell/.xbm
|
||||
- Open=bitmap %f
|
||||
+ Include=image
|
||||
|
||||
shell/.xpm
|
||||
Include=image
|
||||
View=sxpm %f
|
||||
|
||||
include/image
|
||||
- Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi
|
||||
+ Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (xdg-open %f &); fi
|
||||
View=%view{ascii} identify %f
|
||||
#View=%view{ascii} asciiview %f
|
||||
|
||||
@@ -347,7 +375,8 @@ include/image
|
||||
### Sound files ###
|
||||
|
||||
regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$
|
||||
- Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
|
||||
+ Open=play %f
|
||||
+# Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
|
||||
|
||||
regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$
|
||||
Open=mikmod %f
|
||||
@@ -357,11 +386,16 @@ regex/\.([wW][aA][wW]22)$
|
||||
Open=vplay -s 22 %f
|
||||
|
||||
regex/\.([mM][pP]3)$
|
||||
- Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
|
||||
- View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
|
||||
+ Include=audio
|
||||
+# Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
|
||||
+# View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
|
||||
+
|
||||
+regex/\.([mM][kK][aA])$
|
||||
+ Include=audio
|
||||
|
||||
regex/\.([oO][gG][gG])$
|
||||
- Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
|
||||
+ Open=ogg123 %f
|
||||
+# Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
|
||||
View=%view{ascii} ogginfo %s
|
||||
|
||||
regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
|
||||
@@ -371,11 +405,15 @@ regex/\.([wW][mM][aA])$
|
||||
Open=mplayer -vo null %f
|
||||
View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f
|
||||
|
||||
+include/audio
|
||||
+ Open=mplayer %f
|
||||
+ View=%view{ascii} mplayer -identify -vo null -ao null -frames 0 %f 2>&1 | sed -n '/^ID_/p'
|
||||
|
||||
### Play lists ###
|
||||
|
||||
regex/\.([mM]3[uU]|[pP][lL][sS])$
|
||||
- Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi
|
||||
+ Open=mplayer -vo null -playlist %f
|
||||
+# Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi
|
||||
|
||||
|
||||
### Video ###
|
||||
@@ -389,6 +427,9 @@ regex/\.([aA][sS][fFxX])$
|
||||
regex/\.([dD][iI][vV][xX])$
|
||||
Include=video
|
||||
|
||||
+regex/\.([mM][kK][vV])$
|
||||
+ Include=video
|
||||
+
|
||||
regex/\.([mM][oO][vV]|[qQ][tT])$
|
||||
Include=video
|
||||
|
||||
@@ -408,10 +449,11 @@ regex/\.([oO][gG][mM])$
|
||||
Include=video
|
||||
|
||||
regex/\.([rR][aA]?[mM])$
|
||||
- Open=(realplay %f >/dev/null 2>&1 &)
|
||||
+ Include=video
|
||||
|
||||
include/video
|
||||
Open=(mplayer %f >/dev/null 2>&1 &)
|
||||
+ View=%view{ascii} mplayer -identify -vo null -ao null -frames 0 %f 2>&1 | sed -n '/^ID_/p'
|
||||
#Open=(gtv %f >/dev/null 2>&1 &)
|
||||
#Open=(xanim %f >/dev/null 2>&1 &)
|
||||
|
||||
@@ -420,12 +462,13 @@ include/video
|
||||
|
||||
# Postscript
|
||||
type/^PostScript
|
||||
- Open=(gv %f &)
|
||||
+ Open=(evince %f >/dev/null 2>&1 &)
|
||||
View=%view{ascii} ps2ascii %f
|
||||
|
||||
# PDF
|
||||
type/^PDF
|
||||
- Open=(xpdf %f &)
|
||||
+ Open=(xdg-open %f >/dev/null 2>&1 &)
|
||||
+ #Open=(xpdf %f >/dev/null 2>&1 &)
|
||||
#Open=(acroread %f &)
|
||||
#Open=(ghostview %f &)
|
||||
View=%view{ascii} pdftotext %f -
|
||||
@@ -436,7 +479,7 @@ type/^PDF
|
||||
# html
|
||||
regex/\.([hH][tT][mM][lL]?)$
|
||||
Open=(if test -n "@X11_WWW@" && test -n "$DISPLAY"; then (@X11_WWW@ file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null
|
||||
- View=%view{ascii} lynx -dump -force_html %f
|
||||
+ View=%view{ascii} links -dump %f
|
||||
|
||||
# StarOffice 5.2
|
||||
shell/.sdw
|
||||
@@ -453,22 +496,27 @@ shell/.abw
|
||||
|
||||
# Microsoft Word Document
|
||||
regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
|
||||
- Open=(abiword %f >/dev/null 2>&1 &)
|
||||
+ Open=(ooffice %f &)
|
||||
+# Open=(abiword %f >/dev/null 2>&1 &)
|
||||
View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f
|
||||
type/^Microsoft\ Word
|
||||
- Open=(abiword %f >/dev/null 2>&1 &)
|
||||
+ Open=(ooffice %f &)
|
||||
+# Open=(abiword %f >/dev/null 2>&1 &)
|
||||
View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f
|
||||
|
||||
# RTF document
|
||||
regex/\.([rR][tT][fF])$
|
||||
- Open=(abiword %f >/dev/null 2>&1 &)
|
||||
+ Open=(ooffice %f &)
|
||||
+# Open=(abiword %f >/dev/null 2>&1 &)
|
||||
|
||||
# Microsoft Excel Worksheet
|
||||
regex/\.([xX][lL][sSwW])$
|
||||
- Open=(gnumeric %f >/dev/null 2>&1 &)
|
||||
+ Open=(ooffice %f &)
|
||||
+# Open=(gnumeric %f >/dev/null 2>&1 &)
|
||||
View=%view{ascii} xls2csv %f || strings %f
|
||||
type/^Microsoft\ Excel
|
||||
- Open=(gnumeric %f >/dev/null 2>&1 &)
|
||||
+ Open=(ooffice %f &)
|
||||
+# Open=(gnumeric %f >/dev/null 2>&1 &)
|
||||
View=%view{ascii} xls2csv %f || strings %f
|
||||
|
||||
# Use OpenOffice.org to open any MS Office documents
|
||||
@@ -545,6 +593,11 @@ type/^compress
|
||||
Open=gzip -dc %f | %var{PAGER:more}
|
||||
View=%view{ascii} gzip -dc %f 2>/dev/null
|
||||
|
||||
+# lzma
|
||||
+regex/\.lzma$
|
||||
+ Open=lzma -dc %f | %var{PAGER:more}
|
||||
+ View=%view{ascii} lzma -dc %f 2>/dev/null
|
||||
+
|
||||
|
||||
### Default ###
|
||||
|
@ -1,15 +0,0 @@
|
||||
diff -up mc-4.6.2-pre1/src/util.c.hintchk mc-4.6.2-pre1/src/util.c
|
||||
--- mc-4.6.2-pre1/src/util.c.hintchk 2008-03-27 12:39:54.000000000 +0100
|
||||
+++ mc-4.6.2-pre1/src/util.c 2008-03-27 12:46:39.000000000 +0100
|
||||
@@ -995,6 +995,11 @@ load_mc_home_file (const char *filename,
|
||||
if (hintfile != hintfile_base)
|
||||
g_free (hintfile_base);
|
||||
|
||||
+ if (!data) {
|
||||
+ g_free(hintfile);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
if (allocated_filename)
|
||||
*allocated_filename = hintfile;
|
||||
else
|
182
mc-lzma.patch
182
mc-lzma.patch
@ -1,182 +0,0 @@
|
||||
# LZMA support for Midnight Commander
|
||||
# 2006-03-17
|
||||
#
|
||||
# This patch adds basic support for LZMA compressed files to
|
||||
# Midnight Commander 4.6.1. You should have LZMA utils 4.32.x
|
||||
# or later. Older versions of LZMA utils will *not* work.
|
||||
#
|
||||
# Copyright (C) 2006 Lasse Collin <lasse.collin@tukaani.org>
|
||||
#
|
||||
# This patch is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
diff -up mc-4.6.2-pre1/edit/edit.c.lzmavfs mc-4.6.2-pre1/edit/edit.c
|
||||
--- mc-4.6.2-pre1/edit/edit.c.lzmavfs 2008-08-05 15:31:29.000000000 +0200
|
||||
+++ mc-4.6.2-pre1/edit/edit.c 2008-08-05 15:31:29.000000000 +0200
|
||||
@@ -185,6 +185,7 @@ edit_load_file_fast (WEdit *edit, const
|
||||
static const struct edit_filters {
|
||||
const char *read, *write, *extension;
|
||||
} all_filters[] = {
|
||||
+ { "lzma -cd %s 2>&1", "lzma > %s", ".lzma" },
|
||||
{ "bzip2 -cd %s 2>&1", "bzip2 > %s", ".bz2" },
|
||||
{ "gzip -cd %s 2>&1", "gzip > %s", ".gz" },
|
||||
{ "gzip -cd %s 2>&1", "gzip > %s", ".Z" }
|
||||
diff -up mc-4.6.2-pre1/src/util.c.lzmavfs mc-4.6.2-pre1/src/util.c
|
||||
--- mc-4.6.2-pre1/src/util.c.lzmavfs 2008-08-05 15:31:29.000000000 +0200
|
||||
+++ mc-4.6.2-pre1/src/util.c 2008-08-05 15:31:29.000000000 +0200
|
||||
@@ -1239,7 +1239,7 @@ get_current_wd (char *buffer, int size)
|
||||
enum compression_type
|
||||
get_compression_type (int fd)
|
||||
{
|
||||
- unsigned char magic[4];
|
||||
+ unsigned char magic[16];
|
||||
|
||||
/* Read the magic signature */
|
||||
if (mc_read (fd, (char *) magic, 4) != 4)
|
||||
@@ -1283,6 +1283,31 @@ get_compression_type (int fd)
|
||||
return COMPRESSION_BZIP2;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ /* LZMA files; both LZMA_Alone and LZMA utils formats. The LZMA_Alone
|
||||
+ * format is used by the LZMA_Alone tool from LZMA SDK. The LZMA utils
|
||||
+ * format is the default format of LZMA utils 4.32.1 and later. */
|
||||
+ if (magic[0] < 0xE1 || (magic[0] == 0xFF && magic[1] == 'L' &&
|
||||
+ magic[2] == 'Z' && magic[3] == 'M')) {
|
||||
+ if (mc_read (fd, (char *) magic + 4, 9) == 9) {
|
||||
+ /* LZMA utils format */
|
||||
+ if (magic[0] == 0xFF && magic[4] == 'A' && magic[5] == 0x00)
|
||||
+ return COMPRESSION_LZMA;
|
||||
+ /* The LZMA_Alone format has no magic bytes, thus we
|
||||
+ * need to play a wizard. This can give false positives,
|
||||
+ * thus the detection below should be removed when
|
||||
+ * the newer LZMA utils format has got popular. */
|
||||
+ if (magic[0] < 0xE1 && magic[4] < 0x20 &&
|
||||
+ ((magic[10] == 0x00 && magic[11] == 0x00 &&
|
||||
+ magic[12] == 0x00) ||
|
||||
+ (magic[5] == 0xFF && magic[6] == 0xFF &&
|
||||
+ magic[7] == 0xFF && magic[8] == 0xFF &&
|
||||
+ magic[9] == 0xFF && magic[10] == 0xFF &&
|
||||
+ magic[11] == 0xFF && magic[12] == 0xFF)))
|
||||
+ return COMPRESSION_LZMA;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1293,6 +1318,7 @@ decompress_extension (int type)
|
||||
case COMPRESSION_GZIP: return "#ugz";
|
||||
case COMPRESSION_BZIP: return "#ubz";
|
||||
case COMPRESSION_BZIP2: return "#ubz2";
|
||||
+ case COMPRESSION_LZMA: return "#ulzma";
|
||||
}
|
||||
/* Should never reach this place */
|
||||
fprintf (stderr, "Fatal: decompress_extension called with an unknown argument\n");
|
||||
diff -up mc-4.6.2-pre1/src/util.h.lzmavfs mc-4.6.2-pre1/src/util.h
|
||||
--- mc-4.6.2-pre1/src/util.h.lzmavfs 2008-08-05 15:31:29.000000000 +0200
|
||||
+++ mc-4.6.2-pre1/src/util.h 2008-08-05 15:31:29.000000000 +0200
|
||||
@@ -186,7 +186,8 @@ enum compression_type {
|
||||
COMPRESSION_NONE,
|
||||
COMPRESSION_GZIP,
|
||||
COMPRESSION_BZIP,
|
||||
- COMPRESSION_BZIP2
|
||||
+ COMPRESSION_BZIP2,
|
||||
+ COMPRESSION_LZMA
|
||||
};
|
||||
|
||||
/* Looks for ``magic'' bytes at the start of the VFS file to guess the
|
||||
diff -up mc-4.6.2-pre1/vfs/extfs/iso9660.in.lzmavfs mc-4.6.2-pre1/vfs/extfs/iso9660.in
|
||||
--- mc-4.6.2-pre1/vfs/extfs/iso9660.in.lzmavfs 2006-07-19 13:19:52.000000000 +0200
|
||||
+++ mc-4.6.2-pre1/vfs/extfs/iso9660.in 2008-08-05 15:31:29.000000000 +0200
|
||||
@@ -29,6 +29,7 @@ test_iso () {
|
||||
mcisofs_list () {
|
||||
# left as a reminder to implement compressed image support =)
|
||||
case "$1" in
|
||||
+ *.lzma) MYCAT="lzma -dc";;
|
||||
*.bz2) MYCAT="bzip2 -dc";;
|
||||
*.gz) MYCAT="gzip -dc";;
|
||||
*.z) MYCAT="gzip -dc";;
|
||||
diff -up mc-4.6.2-pre1/vfs/extfs/lslR.in.lzmavfs mc-4.6.2-pre1/vfs/extfs/lslR.in
|
||||
--- mc-4.6.2-pre1/vfs/extfs/lslR.in.lzmavfs 2003-06-22 11:54:21.000000000 +0200
|
||||
+++ mc-4.6.2-pre1/vfs/extfs/lslR.in 2008-08-05 15:31:29.000000000 +0200
|
||||
@@ -12,6 +12,7 @@ AWK=@AWK@
|
||||
|
||||
mclslRfs_list () {
|
||||
case "$1" in
|
||||
+ *.lzma) MYCAT="lzma -dc";;
|
||||
*.bz2) MYCAT="bzip2 -dc";;
|
||||
*.gz) MYCAT="gzip -dc";;
|
||||
*.z) MYCAT="gzip -dc";;
|
||||
diff -up mc-4.6.2-pre1/vfs/extfs/mailfs.in.lzmavfs mc-4.6.2-pre1/vfs/extfs/mailfs.in
|
||||
--- mc-4.6.2-pre1/vfs/extfs/mailfs.in.lzmavfs 2006-05-28 14:35:57.000000000 +0200
|
||||
+++ mc-4.6.2-pre1/vfs/extfs/mailfs.in 2008-08-05 15:31:29.000000000 +0200
|
||||
@@ -7,6 +7,7 @@ use bytes;
|
||||
|
||||
$zcat="zcat"; # gunzip to stdout
|
||||
$bzcat="bzip2 -dc"; # bunzip2 to stdout
|
||||
+$lzcat="lzma -dc"; # unlzma to stdout
|
||||
$file="file"; # "file" command
|
||||
$TZ='GMT'; # default timezone (for Date module)
|
||||
|
||||
@@ -182,6 +183,8 @@ if (/gzip/) {
|
||||
exit 1 unless (open IN, "$zcat $mbox_qname|");
|
||||
} elsif (/bzip/) {
|
||||
exit 1 unless (open IN, "$bzcat $mbox_qname|");
|
||||
+} elsif (/lzma/) {
|
||||
+ exit 1 unless (open IN, "$lzcat $mbox_qname|");
|
||||
} else {
|
||||
exit 1 unless (open IN, "<$mbox_name");
|
||||
}
|
||||
diff -up mc-4.6.2-pre1/vfs/extfs/patchfs.in.lzmavfs mc-4.6.2-pre1/vfs/extfs/patchfs.in
|
||||
--- mc-4.6.2-pre1/vfs/extfs/patchfs.in.lzmavfs 2004-11-17 00:00:40.000000000 +0100
|
||||
+++ mc-4.6.2-pre1/vfs/extfs/patchfs.in 2008-08-05 15:31:29.000000000 +0200
|
||||
@@ -12,6 +12,7 @@ use POSIX;
|
||||
use File::Temp 'tempfile';
|
||||
|
||||
# standard binaries
|
||||
+my $lzma = 'lzma';
|
||||
my $bzip = 'bzip2';
|
||||
my $gzip = 'gzip';
|
||||
my $fileutil = 'file';
|
||||
@@ -70,7 +71,9 @@ sub myin
|
||||
my ($qfname)=(quotemeta $_[0]);
|
||||
|
||||
$_=`$fileutil $qfname`;
|
||||
- if (/bzip/) {
|
||||
+ if (/lzma/) {
|
||||
+ return "$lzma -dc $qfname";
|
||||
+ } elsif (/bzip/) {
|
||||
return "$bzip -dc $qfname";
|
||||
} elsif (/gzip/) {
|
||||
return "$gzip -dc $qfname";
|
||||
@@ -86,7 +89,9 @@ sub myout
|
||||
my ($sep) = $append ? '>>' : '>';
|
||||
|
||||
$_=`$fileutil $qfname`;
|
||||
- if (/bzip/) {
|
||||
+ if (/lzma/) {
|
||||
+ return "$lzma -c $sep $qfname";
|
||||
+ } elsif (/bzip/) {
|
||||
return "$bzip -c $sep $qfname";
|
||||
} elsif (/gzip/) {
|
||||
return "$gzip -c $sep $qfname";
|
||||
diff -up mc-4.6.2-pre1/vfs/extfs/sfs.ini.lzmavfs mc-4.6.2-pre1/vfs/extfs/sfs.ini
|
||||
--- mc-4.6.2-pre1/vfs/extfs/sfs.ini.lzmavfs 1998-12-15 16:57:43.000000000 +0100
|
||||
+++ mc-4.6.2-pre1/vfs/extfs/sfs.ini 2008-08-05 15:31:29.000000000 +0200
|
||||
@@ -10,6 +10,8 @@ bz/1 bzip < %1 > %3
|
||||
ubz/1 bzip -d < %1 > %3
|
||||
bz2/1 bzip2 < %1 > %3
|
||||
ubz2/1 bzip2 -d < %1 > %3
|
||||
+lzma/1 lzma < %1 > %3
|
||||
+ulzma/1 lzma -d < %1 > %3
|
||||
tar/1 tar cf %3 %1
|
||||
tgz/1 tar czf %3 %1
|
||||
uhtml/1 lynx -force_html -dump %1 > %3
|
@ -1,11 +0,0 @@
|
||||
--- mc-4.6.1a/src/screen.c.ministatus 2005-11-17 22:01:32.000000000 +0100
|
||||
+++ mc-4.6.1a/src/screen.c 2005-11-17 22:02:31.000000000 +0100
|
||||
@@ -471,7 +471,7 @@ static struct {
|
||||
{ "mtime", 12, 0, J_RIGHT, N_("MTime"), 1, string_file_mtime, (sortfn *) sort_time },
|
||||
{ "atime", 12, 0, J_RIGHT, N_("ATime"), 1, string_file_atime, (sortfn *) sort_atime },
|
||||
{ "ctime", 12, 0, J_RIGHT, N_("CTime"), 1, string_file_ctime, (sortfn *) sort_ctime },
|
||||
-{ "perm", 10, 0, J_LEFT, N_("Permission"),1,string_file_permission, NULL },
|
||||
+{ "perm", 12, 0, J_CENTER, N_("Permission"),1,string_file_permission, NULL },
|
||||
{ "mode", 6, 0, J_RIGHT, N_("Perm"), 1, string_file_perm_octal, NULL },
|
||||
{ "nlink", 2, 0, J_RIGHT, N_("Nl"), 1, string_file_nlinks, (sortfn *) sort_links },
|
||||
{ "inode", 5, 0, J_RIGHT, N_("Inode"), 1, string_inode, (sortfn *) sort_inode },
|
@ -1,12 +0,0 @@
|
||||
diff -up mc-4.6.2/src/main.c.newlinedir mc-4.6.2/src/main.c
|
||||
--- mc-4.6.2/src/main.c.newlinedir 2009-05-26 15:55:43.000000000 +0200
|
||||
+++ mc-4.6.2/src/main.c 2009-05-26 15:56:47.000000000 +0200
|
||||
@@ -640,7 +640,7 @@ _do_panel_cd (WPanel *panel, const char
|
||||
directory = *new_dir ? new_dir : home_dir;
|
||||
|
||||
ret_panel=panel;
|
||||
- if (mc_chdir (directory) == -1) {
|
||||
+ if (strchr(directory,'\n') || mc_chdir (directory) == -1) {
|
||||
strcpy (panel->cwd, olddir);
|
||||
g_free (olddir);
|
||||
g_free (translated_url);
|
@ -1,14 +0,0 @@
|
||||
diff -up mc-4.6.2-pre1/vfs/extfs/rpm.oldrpmtags mc-4.6.2-pre1/vfs/extfs/rpm
|
||||
--- mc-4.6.2-pre1/vfs/extfs/rpm.oldrpmtags 2006-11-01 11:30:26.000000000 +0100
|
||||
+++ mc-4.6.2-pre1/vfs/extfs/rpm 2008-08-05 15:26:47.000000000 +0200
|
||||
@@ -95,10 +95,6 @@ mcrpmfs_list ()
|
||||
echo "$FILEPREF 0 $DATE INFO/PACKAGER"
|
||||
test "`$RPM -qp --qf \"%{URL}\" \"$f\"`" = "(none)" ||
|
||||
echo "$FILEPREF 0 $DATE INFO/URL"
|
||||
- test "`$RPM -qp --qf \"%{SERIAL}\" \"$f\"`" = "(none)" ||
|
||||
- echo "$FILEPREF 0 $DATE INFO/SERIAL"
|
||||
- test "`$RPM -qp --qf \"%{COPYRIGHT}\" \"$f\"`" = "(none)" ||
|
||||
- echo "$FILEPREF 0 $DATE INFO/COPYRIGHT"
|
||||
test "`$RPM -qp --qf \"%{EPOCH}\" \"$f\"`" = "(none)" ||
|
||||
echo "$FILEPREF 0 $DATE INFO/EPOCH"
|
||||
test "`$RPM -qp --qf \"%{LICENSE}\" \"$f\"`" = "(none)" ||
|
@ -1,6 +1,7 @@
|
||||
--- mc-2007-06-04-22/src/execute.c.prompt 2005-09-28 23:28:06.000000000 +0200
|
||||
+++ mc-2007-06-04-22/src/execute.c 2007-06-20 14:07:17.000000000 +0200
|
||||
@@ -140,6 +140,8 @@ do_execute (const char *shell, const cha
|
||||
diff -up mc-4.6.99/src/execute.c.prompt mc-4.6.99/src/execute.c
|
||||
--- mc-4.6.99/src/execute.c.prompt 2009-07-31 14:57:10.000000000 +0200
|
||||
+++ mc-4.6.99/src/execute.c 2009-07-31 14:58:21.000000000 +0200
|
||||
@@ -146,6 +146,8 @@ do_execute (const char *shell, const cha
|
||||
printf ("\r\n");
|
||||
fflush (stdout);
|
||||
}
|
||||
@ -9,9 +10,10 @@
|
||||
if (console_flag) {
|
||||
if (output_lines && keybar_visible) {
|
||||
putchar ('\n');
|
||||
--- mc-2007-06-04-22/src/main.c.prompt 2007-06-20 14:07:17.000000000 +0200
|
||||
+++ mc-2007-06-04-22/src/main.c 2007-06-20 14:07:17.000000000 +0200
|
||||
@@ -454,7 +454,7 @@ void
|
||||
diff -up mc-4.6.99/src/main.c.prompt mc-4.6.99/src/main.c
|
||||
--- mc-4.6.99/src/main.c.prompt 2009-07-31 14:57:10.000000000 +0200
|
||||
+++ mc-4.6.99/src/main.c 2009-07-31 14:58:21.000000000 +0200
|
||||
@@ -459,7 +459,7 @@ void
|
||||
do_update_prompt (void)
|
||||
{
|
||||
if (update_prompt) {
|
||||
@ -20,21 +22,10 @@
|
||||
fflush (stdout);
|
||||
update_prompt = 0;
|
||||
}
|
||||
--- mc-2007-06-04-22/src/subshell.h.prompt 2004-12-03 20:17:47.000000000 +0100
|
||||
+++ mc-2007-06-04-22/src/subshell.h 2007-06-20 14:07:17.000000000 +0200
|
||||
@@ -20,6 +20,9 @@ extern enum subshell_state_enum subshell
|
||||
/* Holds the latest prompt captured from the subshell */
|
||||
extern char *subshell_prompt;
|
||||
|
||||
+/* Holds the latest prompt captured from the subshell with terminal codes */
|
||||
+extern char *original_subshell_prompt;
|
||||
+
|
||||
/* For the `how' argument to various functions */
|
||||
enum {QUIETLY, VISIBLY};
|
||||
|
||||
--- mc-2007-06-04-22/src/subshell.c.prompt 2007-06-20 14:07:17.000000000 +0200
|
||||
+++ mc-2007-06-04-22/src/subshell.c 2007-06-20 14:24:14.000000000 +0200
|
||||
@@ -107,6 +107,9 @@ enum subshell_state_enum subshell_state;
|
||||
diff -up mc-4.6.99/src/subshell.c.prompt mc-4.6.99/src/subshell.c
|
||||
--- mc-4.6.99/src/subshell.c.prompt 2009-07-31 14:57:11.000000000 +0200
|
||||
+++ mc-4.6.99/src/subshell.c 2009-07-31 15:02:35.000000000 +0200
|
||||
@@ -114,6 +114,9 @@ enum subshell_state_enum subshell_state;
|
||||
/* Holds the latest prompt captured from the subshell */
|
||||
char *subshell_prompt = NULL;
|
||||
|
||||
@ -44,7 +35,7 @@
|
||||
/* Initial length of the buffer for the subshell's prompt */
|
||||
#define INITIAL_PROMPT_SIZE 10
|
||||
|
||||
@@ -148,6 +151,7 @@ static struct termios raw_mode;
|
||||
@@ -160,6 +163,7 @@ static struct termios raw_mode;
|
||||
/* This counter indicates how many characters of prompt we have read */
|
||||
/* FIXME: try to figure out why this had to become global */
|
||||
static int prompt_pos;
|
||||
@ -52,7 +43,7 @@
|
||||
|
||||
|
||||
/*
|
||||
@@ -567,6 +571,7 @@ int invoke_subshell (const char *command
|
||||
@@ -598,6 +602,7 @@ int invoke_subshell (const char *command
|
||||
init_subshell ();
|
||||
|
||||
prompt_pos = 0;
|
||||
@ -60,7 +51,7 @@
|
||||
|
||||
return quit;
|
||||
}
|
||||
@@ -576,6 +581,7 @@ int
|
||||
@@ -607,6 +612,7 @@ int
|
||||
read_subshell_prompt (void)
|
||||
{
|
||||
static int prompt_size = INITIAL_PROMPT_SIZE;
|
||||
@ -68,7 +59,7 @@
|
||||
int bytes = 0, i, rc = 0;
|
||||
struct timeval timeleft = { 0, 0 };
|
||||
|
||||
@@ -586,7 +592,10 @@ read_subshell_prompt (void)
|
||||
@@ -617,7 +623,10 @@ read_subshell_prompt (void)
|
||||
if (subshell_prompt == NULL) { /* First time through */
|
||||
subshell_prompt = g_malloc (prompt_size);
|
||||
*subshell_prompt = '\0';
|
||||
@ -79,7 +70,7 @@
|
||||
}
|
||||
|
||||
while (subshell_alive
|
||||
@@ -607,20 +616,27 @@ read_subshell_prompt (void)
|
||||
@@ -638,20 +647,27 @@ read_subshell_prompt (void)
|
||||
|
||||
/* Extract the prompt from the shell output */
|
||||
|
||||
@ -111,16 +102,15 @@
|
||||
}
|
||||
if (rc == 0 && bytes == 0)
|
||||
return FALSE;
|
||||
@@ -743,6 +759,8 @@ subshell_name_quote (const char *s)
|
||||
void
|
||||
do_subshell_chdir (const char *directory, int do_update, int reset_prompt)
|
||||
{
|
||||
@@ -792,6 +808,7 @@ do_subshell_chdir (const char *directory
|
||||
char *pcwd;
|
||||
char *temp;
|
||||
char *translate;
|
||||
+ static char *old_subshell_prompt = NULL;
|
||||
+
|
||||
if (!
|
||||
(subshell_state == INACTIVE
|
||||
&& strcmp (subshell_cwd, current_panel->cwd))) {
|
||||
@@ -750,8 +768,14 @@ do_subshell_chdir (const char *directory
|
||||
|
||||
pcwd = vfs_translate_path_n (current_panel->cwd);
|
||||
|
||||
@@ -802,8 +819,14 @@ do_subshell_chdir (const char *directory
|
||||
* the main program. Please note that in the code after this
|
||||
* if, the cd command that is sent will make the subshell
|
||||
* repaint the prompt, so we don't have to paint it. */
|
||||
@ -129,15 +119,15 @@
|
||||
+ if (do_update) {
|
||||
+ if (old_subshell_prompt == NULL
|
||||
+ || strcmp (old_subshell_prompt, original_subshell_prompt)) {
|
||||
+ g_free (old_subshell_prompt);
|
||||
+ old_subshell_prompt = g_strdup (original_subshell_prompt);
|
||||
+ do_update_prompt ();
|
||||
+ g_free (old_subshell_prompt);
|
||||
+ old_subshell_prompt = g_strdup (original_subshell_prompt);
|
||||
+ do_update_prompt ();
|
||||
+ }
|
||||
+ }
|
||||
g_free (pcwd);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -802,8 +826,10 @@ do_subshell_chdir (const char *directory
|
||||
@@ -861,8 +884,10 @@ do_subshell_chdir (const char *directory
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,5 +137,18 @@
|
||||
+ original_prompt_pos = 0;
|
||||
+ }
|
||||
update_prompt = FALSE;
|
||||
/* Make sure that MC never stores the CWD in a silly format */
|
||||
/* like /usr////lib/../bin, or the strcmp() above will fail */
|
||||
|
||||
g_free (pcwd);
|
||||
diff -up mc-4.6.99/src/subshell.h.prompt mc-4.6.99/src/subshell.h
|
||||
--- mc-4.6.99/src/subshell.h.prompt 2009-07-31 14:57:10.000000000 +0200
|
||||
+++ mc-4.6.99/src/subshell.h 2009-07-31 14:58:21.000000000 +0200
|
||||
@@ -25,6 +25,9 @@ extern enum subshell_state_enum subshell
|
||||
/* Holds the latest prompt captured from the subshell */
|
||||
extern char *subshell_prompt;
|
||||
|
||||
+/* Holds the latest prompt captured from the subshell with terminal codes */
|
||||
+extern char *original_subshell_prompt;
|
||||
+
|
||||
/* For the `how' argument to various functions */
|
||||
enum {QUIETLY, VISIBLY};
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
--- mc-2007-06-04-22/src/file.c.refresh 2007-06-19 10:23:47.000000000 +0200
|
||||
+++ mc-2007-06-04-22/src/file.c 2007-06-19 10:33:02.000000000 +0200
|
||||
@@ -746,7 +746,10 @@ copy_file_file (FileOpContext *ctx, cons
|
||||
return_status =
|
||||
file_progress_show (ctx, n_read_total + ctx->do_reget, file_size);
|
||||
}
|
||||
- mc_refresh ();
|
||||
+ if (winch_flag)
|
||||
+ change_screen_size ();
|
||||
+ else
|
||||
+ mc_refresh();
|
||||
if (return_status != FILE_CONT)
|
||||
goto ret;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
diff -up mc-4.6.2-pre1/src/subshell.c.shellcwd mc-4.6.2-pre1/src/subshell.c
|
||||
--- mc-4.6.2-pre1/src/subshell.c.shellcwd 2008-09-02 11:28:31.000000000 +0200
|
||||
+++ mc-4.6.2-pre1/src/subshell.c 2008-09-02 11:41:39.000000000 +0200
|
||||
@@ -562,9 +562,6 @@ int invoke_subshell (const char *command
|
||||
|
||||
feed_subshell (how, FALSE);
|
||||
|
||||
- if (new_dir && subshell_alive && strcmp (subshell_cwd, current_panel->cwd))
|
||||
- *new_dir = subshell_cwd; /* Make MC change to the subshell's CWD */
|
||||
-
|
||||
/* Restart the subshell if it has died by SIGHUP, SIGQUIT, etc. */
|
||||
while (!subshell_alive && !quit && use_subshell)
|
||||
init_subshell ();
|
@ -1,310 +0,0 @@
|
||||
diff -up mc-4.6.2/src/layout.c.showfree mc-4.6.2/src/layout.c
|
||||
--- mc-4.6.2/src/layout.c.showfree 2009-05-26 14:57:36.000000000 +0200
|
||||
+++ mc-4.6.2/src/layout.c 2009-05-26 14:57:36.000000000 +0200
|
||||
@@ -97,6 +97,9 @@ int message_visible = 1;
|
||||
/* Set to show current working dir in xterm window title */
|
||||
int xterm_title = 1;
|
||||
|
||||
+/* Set to show free space on device assigned to current directory */
|
||||
+int free_space = 1;
|
||||
+
|
||||
/* The starting line for the output of the subprogram */
|
||||
int output_start_y = 0;
|
||||
|
||||
@@ -126,6 +129,7 @@ static int _command_prompt;
|
||||
static int _keybar_visible;
|
||||
static int _message_visible;
|
||||
static int _xterm_title;
|
||||
+static int _free_space;
|
||||
static int _permission_mode;
|
||||
static int _filetype_mode;
|
||||
|
||||
@@ -156,6 +160,7 @@ static struct {
|
||||
int *variable;
|
||||
WCheck *widget;
|
||||
} check_options [] = {
|
||||
+ { N_("show free sp&Ace"), &free_space, 0 },
|
||||
{ N_("&Xterm window title"), &xterm_title, 0 },
|
||||
{ N_("h&Intbar visible"), &message_visible, 0 },
|
||||
{ N_("&Keybar visible"), &keybar_visible, 0 },
|
||||
@@ -227,8 +232,8 @@ static int b2left_cback (int action)
|
||||
if (_equal_split){
|
||||
/* Turn equal split off */
|
||||
_equal_split = 0;
|
||||
- check_options [6].widget->state = check_options [6].widget->state & ~C_BOOL;
|
||||
- dlg_select_widget (check_options [6].widget);
|
||||
+ check_options [7].widget->state = check_options [7].widget->state & ~C_BOOL;
|
||||
+ dlg_select_widget (check_options [7].widget);
|
||||
dlg_select_widget (bleft_widget);
|
||||
}
|
||||
_first_panel_size++;
|
||||
@@ -242,8 +247,8 @@ static int b2right_cback (int action)
|
||||
if (_equal_split){
|
||||
/* Turn equal split off */
|
||||
_equal_split = 0;
|
||||
- check_options [6].widget->state = check_options [6].widget->state & ~C_BOOL;
|
||||
- dlg_select_widget (check_options [6].widget);
|
||||
+ check_options [7].widget->state = check_options [7].widget->state & ~C_BOOL;
|
||||
+ dlg_select_widget (check_options [7].widget);
|
||||
dlg_select_widget (bright_widget);
|
||||
}
|
||||
_first_panel_size--;
|
||||
@@ -289,23 +294,24 @@ layout_callback (struct Dlg_head *h, dlg
|
||||
if (old_output_lines != _output_lines){
|
||||
old_output_lines = _output_lines;
|
||||
attrset (COLOR_NORMAL);
|
||||
- dlg_move (h, 9, 16 + first_width);
|
||||
+ dlg_move (h, 10, 16 + first_width);
|
||||
addstr (output_lines_label);
|
||||
- dlg_move (h, 9, 10 + first_width);
|
||||
+ dlg_move (h, 10, 10 + first_width);
|
||||
tty_printf ("%02d", _output_lines);
|
||||
}
|
||||
}
|
||||
return MSG_HANDLED;
|
||||
|
||||
case DLG_POST_KEY:
|
||||
- _filetype_mode = check_options [8].widget->state & C_BOOL;
|
||||
- _permission_mode = check_options [7].widget->state & C_BOOL;
|
||||
- _equal_split = check_options [6].widget->state & C_BOOL;
|
||||
- _menubar_visible = check_options [5].widget->state & C_BOOL;
|
||||
- _command_prompt = check_options [4].widget->state & C_BOOL;
|
||||
- _keybar_visible = check_options [2].widget->state & C_BOOL;
|
||||
- _message_visible = check_options [1].widget->state & C_BOOL;
|
||||
- _xterm_title = check_options [0].widget->state & C_BOOL;
|
||||
+ _filetype_mode = check_options [9].widget->state & C_BOOL;
|
||||
+ _permission_mode = check_options [8].widget->state & C_BOOL;
|
||||
+ _equal_split = check_options [7].widget->state & C_BOOL;
|
||||
+ _menubar_visible = check_options [6].widget->state & C_BOOL;
|
||||
+ _command_prompt = check_options [5].widget->state & C_BOOL;
|
||||
+ _keybar_visible = check_options [3].widget->state & C_BOOL;
|
||||
+ _message_visible = check_options [2].widget->state & C_BOOL;
|
||||
+ _xterm_title = check_options [1].widget->state & C_BOOL;
|
||||
+ _free_space = check_options [0].widget->state & C_BOOL;
|
||||
if (console_flag){
|
||||
int minimum;
|
||||
if (_output_lines < 0)
|
||||
@@ -333,7 +339,7 @@ layout_callback (struct Dlg_head *h, dlg
|
||||
if (old_output_lines != _output_lines){
|
||||
old_output_lines = _output_lines;
|
||||
attrset (COLOR_NORMAL);
|
||||
- dlg_move (h, 9, 10 + first_width);
|
||||
+ dlg_move (h, 10, 10 + first_width);
|
||||
tty_printf ("%02d", _output_lines);
|
||||
}
|
||||
}
|
||||
@@ -372,7 +378,7 @@ init_layout (void)
|
||||
first_width = l1;
|
||||
}
|
||||
|
||||
- for (i = 0; i <= 8; i++) {
|
||||
+ for (i = 0; i <= 9; i++) {
|
||||
check_options[i].text = _(check_options[i].text);
|
||||
l1 = mbstrlen (check_options[i].text) + 7;
|
||||
if (l1 > first_width)
|
||||
@@ -389,7 +395,7 @@ init_layout (void)
|
||||
|
||||
|
||||
second_width = mbstrlen (title3) + 1;
|
||||
- for (i = 0; i < 6; i++) {
|
||||
+ for (i = 0; i < 7; i++) {
|
||||
check_options[i].text = _(check_options[i].text);
|
||||
l1 = mbstrlen (check_options[i].text) + 7;
|
||||
if (l1 > second_width)
|
||||
@@ -444,23 +450,23 @@ init_layout (void)
|
||||
0));
|
||||
if (console_flag) {
|
||||
add_widget (layout_dlg,
|
||||
- button_new (9, 12 + first_width, B_MINUS,
|
||||
+ button_new (10, 12 + first_width, B_MINUS,
|
||||
NARROW_BUTTON, "&-", bminus_cback));
|
||||
add_widget (layout_dlg,
|
||||
- button_new (9, 7 + first_width, B_PLUS, NARROW_BUTTON,
|
||||
+ button_new (10, 7 + first_width, B_PLUS, NARROW_BUTTON,
|
||||
"&+", bplus_cback));
|
||||
}
|
||||
#define XTRACT(i) *check_options[i].variable, check_options[i].text
|
||||
|
||||
- for (i = 0; i < 6; i++) {
|
||||
+ for (i = 0; i < 7; i++) {
|
||||
check_options[i].widget =
|
||||
- check_new (8 - i, 7 + first_width, XTRACT (i));
|
||||
+ check_new (9 - i, 7 + first_width, XTRACT (i));
|
||||
add_widget (layout_dlg, check_options[i].widget);
|
||||
}
|
||||
- check_options[8].widget = check_new (10, 6, XTRACT (8));
|
||||
+ check_options[9].widget = check_new (10, 6, XTRACT (9));
|
||||
+ add_widget (layout_dlg, check_options[9].widget);
|
||||
+ check_options[8].widget = check_new (9, 6, XTRACT (8));
|
||||
add_widget (layout_dlg, check_options[8].widget);
|
||||
- check_options[7].widget = check_new (9, 6, XTRACT (7));
|
||||
- add_widget (layout_dlg, check_options[7].widget);
|
||||
|
||||
_filetype_mode = filetype_mode;
|
||||
_permission_mode = permission_mode;
|
||||
@@ -470,20 +476,21 @@ init_layout (void)
|
||||
_keybar_visible = keybar_visible;
|
||||
_message_visible = message_visible;
|
||||
_xterm_title = xterm_title;
|
||||
+ _free_space = free_space;
|
||||
bright_widget =
|
||||
button_new (6, 15, B_2RIGHT, NARROW_BUTTON, "&>", b2right_cback);
|
||||
add_widget (layout_dlg, bright_widget);
|
||||
bleft_widget =
|
||||
button_new (6, 9, B_2LEFT, NARROW_BUTTON, "&<", b2left_cback);
|
||||
add_widget (layout_dlg, bleft_widget);
|
||||
- check_options[6].widget = check_new (5, 6, XTRACT (6));
|
||||
+ check_options[7].widget = check_new (5, 6, XTRACT (7));
|
||||
old_first_panel_size = -1;
|
||||
old_horizontal_split = -1;
|
||||
old_output_lines = -1;
|
||||
|
||||
_first_panel_size = first_panel_size;
|
||||
_output_lines = output_lines;
|
||||
- add_widget (layout_dlg, check_options[6].widget);
|
||||
+ add_widget (layout_dlg, check_options[7].widget);
|
||||
radio_widget = radio_new (3, 6, 2, s_split_direction);
|
||||
add_widget (layout_dlg, radio_widget);
|
||||
radio_widget->sel = horizontal_split;
|
||||
diff -up mc-4.6.2/src/layout.h.showfree mc-4.6.2/src/layout.h
|
||||
--- mc-4.6.2/src/layout.h.showfree 2009-02-01 20:30:21.000000000 +0100
|
||||
+++ mc-4.6.2/src/layout.h 2009-05-26 14:57:36.000000000 +0200
|
||||
@@ -39,6 +39,7 @@ extern int keybar_visible;
|
||||
extern int output_start_y;
|
||||
extern int message_visible;
|
||||
extern int xterm_title;
|
||||
+extern int free_space;
|
||||
|
||||
extern int horizontal_split;
|
||||
extern int nice_rotating_dash;
|
||||
diff -up mc-4.6.2/src/main.c.showfree mc-4.6.2/src/main.c
|
||||
--- mc-4.6.2/src/main.c.showfree 2009-05-26 14:57:36.000000000 +0200
|
||||
+++ mc-4.6.2/src/main.c 2009-05-26 14:57:36.000000000 +0200
|
||||
@@ -62,6 +62,7 @@
|
||||
#include "listmode.h"
|
||||
#include "execute.h"
|
||||
#include "ext.h" /* For flush_extension_file() */
|
||||
+#include "mountlist.h" /* my_statfs */
|
||||
|
||||
/* Listbox for the command history feature */
|
||||
#include "widget.h"
|
||||
@@ -233,6 +234,12 @@ Dlg_head *midnight_dlg;
|
||||
/* We need to paint it after CONSOLE_RESTORE, see: load_prompt */
|
||||
int update_prompt = 0;
|
||||
|
||||
+/* Old current working directory for displaying free space */
|
||||
+char *old_cwd = NULL;
|
||||
+
|
||||
+/* Used to figure out how many free space we have */
|
||||
+struct my_statfs myfs_stats;
|
||||
+
|
||||
/* The home directory */
|
||||
const char *home_dir = NULL;
|
||||
|
||||
@@ -404,6 +411,8 @@ update_panels (int force_update, const c
|
||||
int reload_other = !(force_update & UP_ONLY_CURRENT);
|
||||
WPanel *panel;
|
||||
|
||||
+ show_free_space(current_panel);
|
||||
+
|
||||
update_one_panel (get_current_index (), force_update, current_file);
|
||||
if (reload_other)
|
||||
update_one_panel (get_other_index (), force_update, UP_KEEPSEL);
|
||||
@@ -469,6 +478,38 @@ stop_dialogs (void)
|
||||
}
|
||||
}
|
||||
|
||||
+void
|
||||
+show_free_space(WPanel *panel)
|
||||
+{
|
||||
+ /* Don't try to stat non-local fs */
|
||||
+ if (!vfs_file_is_local(panel->cwd) || !free_space)
|
||||
+ return;
|
||||
+
|
||||
+ if (old_cwd == NULL || strcmp(old_cwd, panel->cwd) != 0) {
|
||||
+ char rpath[PATH_MAX];
|
||||
+
|
||||
+ init_my_statfs();
|
||||
+ g_free(old_cwd);
|
||||
+ old_cwd = g_strdup(panel->cwd);
|
||||
+
|
||||
+ if (mc_realpath (panel->cwd, rpath) == NULL)
|
||||
+ return;
|
||||
+ my_statfs (&myfs_stats, rpath);
|
||||
+ }
|
||||
+
|
||||
+ if (myfs_stats.avail > 0 || myfs_stats.total > 0) {
|
||||
+ char buffer1 [6], buffer2[6], *tmp;
|
||||
+ size_trunc_len (buffer1, 5, myfs_stats.avail, 1);
|
||||
+ size_trunc_len (buffer2, 5, myfs_stats.total, 1);
|
||||
+ tmp = g_strdup_printf (_("%s (%d%%) of %s"), buffer1, myfs_stats.total > 0 ?
|
||||
+ (int)(100 * (double)myfs_stats.avail / myfs_stats.total) : 0,
|
||||
+ buffer2);
|
||||
+ widget_move (&panel->widget, panel->widget.lines-1, panel->widget.cols-2-strlen(tmp));
|
||||
+ addstr (tmp);
|
||||
+ g_free (tmp);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static int
|
||||
quit_cmd_internal (int quiet)
|
||||
{
|
||||
diff -up mc-4.6.2/src/main.h.showfree mc-4.6.2/src/main.h
|
||||
--- mc-4.6.2/src/main.h.showfree 2009-05-26 14:57:36.000000000 +0200
|
||||
+++ mc-4.6.2/src/main.h 2009-05-26 14:57:36.000000000 +0200
|
||||
@@ -55,6 +55,7 @@ extern int cd_symlinks;
|
||||
extern int show_all_if_ambiguous;
|
||||
extern int slow_terminal;
|
||||
extern int update_prompt; /* To comunicate with subshell */
|
||||
+extern char *old_cwd;
|
||||
extern int safe_delete;
|
||||
extern int confirm_delete;
|
||||
extern int confirm_directory_hotlist_delete;
|
||||
@@ -102,6 +103,7 @@ void change_panel (void);
|
||||
int load_prompt (int, void *);
|
||||
void save_cwds_stat (void);
|
||||
void quiet_quit_cmd (void); /* For cmd.c and command.c */
|
||||
+void show_free_space(WPanel *panel);
|
||||
|
||||
void touch_bar (void);
|
||||
void update_xterm_title_path (void);
|
||||
diff -up mc-4.6.2/src/screen.c.showfree mc-4.6.2/src/screen.c
|
||||
--- mc-4.6.2/src/screen.c.showfree 2009-05-26 14:57:36.000000000 +0200
|
||||
+++ mc-4.6.2/src/screen.c 2009-05-26 14:59:37.000000000 +0200
|
||||
@@ -49,7 +49,7 @@
|
||||
#include "widget.h"
|
||||
#include "menu.h" /* menubar_visible */
|
||||
#define WANT_WIDGETS
|
||||
-#include "main.h" /* the_menubar */
|
||||
+#include "main.h" /* the_menubar, show_free_space() */
|
||||
#include "unixcompat.h"
|
||||
|
||||
#ifdef HAVE_CHARSET
|
||||
@@ -884,6 +884,7 @@ mini_info_separator (WPanel *panel)
|
||||
hline ((slow_terminal ? '-' : ACS_HLINE) | NORMAL_COLOR,
|
||||
panel->widget.cols - 2);
|
||||
#endif /* !HAVE_SLANG */
|
||||
+ show_free_space (panel);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -938,6 +939,8 @@ show_dir (WPanel *panel)
|
||||
widget_move (&panel->widget, 0, panel->widget.cols - 3);
|
||||
addstr ("v");
|
||||
|
||||
+ mini_info_separator (panel);
|
||||
+
|
||||
if (panel->active)
|
||||
standend ();
|
||||
}
|
||||
diff -up mc-4.6.2/src/setup.c.showfree mc-4.6.2/src/setup.c
|
||||
--- mc-4.6.2/src/setup.c.showfree 2009-05-26 14:57:36.000000000 +0200
|
||||
+++ mc-4.6.2/src/setup.c 2009-05-26 14:57:36.000000000 +0200
|
||||
@@ -138,6 +138,7 @@ static const struct {
|
||||
{ "show_mini_info", &show_mini_info },
|
||||
{ "permission_mode", &permission_mode },
|
||||
{ "filetype_mode", &filetype_mode },
|
||||
+ { "free_space", &free_space },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
@ -1,30 +0,0 @@
|
||||
--- mc-4.6.1a/src/main.c.spaceprompt 2005-05-26 15:06:42.285109424 +0200
|
||||
+++ mc-4.6.1a/src/main.c 2005-05-26 15:15:15.964018360 +0200
|
||||
@@ -1490,9 +1491,15 @@ midnight_callback (struct Dlg_head *h, d
|
||||
if (parm == '\t')
|
||||
free_completions (cmdline);
|
||||
|
||||
- if (parm == '\n' && cmdline->buffer[0]) {
|
||||
- send_message ((Widget *) cmdline, WIDGET_KEY, parm);
|
||||
- return MSG_HANDLED;
|
||||
+ if (parm == '\n') {
|
||||
+ for (i = 0; cmdline->buffer[i] &&
|
||||
+ (cmdline->buffer[i] == ' ' || cmdline->buffer[i] == '\t'); i++);
|
||||
+ if (cmdline->buffer[i]) {
|
||||
+ send_message ((Widget *) cmdline, WIDGET_KEY, parm);
|
||||
+ return MSG_HANDLED;
|
||||
+ }
|
||||
+ stuff (cmdline, "", 0);
|
||||
+ cmdline->point = 0;
|
||||
}
|
||||
|
||||
/* Ctrl-Enter and Alt-Enter */
|
||||
@@ -1527,7 +1534,7 @@ midnight_callback (struct Dlg_head *h, d
|
||||
reverse_selection_cmd ();
|
||||
return MSG_HANDLED;
|
||||
}
|
||||
- } else if (!command_prompt || !strlen (cmdline->buffer)) {
|
||||
+ } else if (!command_prompt || !cmdline->buffer[0]) {
|
||||
/* Special treatement '+', '-', '\', '*' only when this is
|
||||
* first char on input line
|
||||
*/
|
@ -1,115 +0,0 @@
|
||||
diff -up mc-4.6.2/edit/editwidget.c.userhost mc-4.6.2/edit/editwidget.c
|
||||
--- mc-4.6.2/edit/editwidget.c.userhost 2009-05-26 14:45:19.000000000 +0200
|
||||
+++ mc-4.6.2/edit/editwidget.c 2009-05-26 14:49:35.000000000 +0200
|
||||
@@ -46,6 +46,9 @@
|
||||
#include "../src/widget.h" /* buttonbar_redraw() */
|
||||
#include "../src/menu.h" /* menubar_new() */
|
||||
#include "../src/key.h" /* is_idle() */
|
||||
+#include "../src/main.h" /* xterm_title_str */
|
||||
+#include "../src/win.h" /* xterm_flag */
|
||||
+#include "../src/layout.h" /* xterm_title */
|
||||
|
||||
WEdit *wedit;
|
||||
struct WMenu *edit_menubar;
|
||||
@@ -174,6 +177,11 @@ edit_file (const char *_file, int line)
|
||||
Dlg_head *edit_dlg;
|
||||
WButtonBar *edit_bar;
|
||||
|
||||
+ if (xterm_flag && xterm_title && xterm_title_str) {
|
||||
+ fprintf (stdout, "\33]0;mc - %s/%s\7", xterm_title_str, _file);
|
||||
+ fflush(stdout);
|
||||
+ }
|
||||
+
|
||||
if (!made_directory) {
|
||||
char *dir = mhl_str_dir_plus_file (home_dir, EDIT_DIR);
|
||||
made_directory = (mkdir (dir, 0700) != -1 || errno == EEXIST);
|
||||
@@ -208,6 +216,8 @@ edit_file (const char *_file, int line)
|
||||
edit_done_menu (edit_menubar); /* editmenu.c */
|
||||
|
||||
destroy_dlg (edit_dlg);
|
||||
+
|
||||
+ update_xterm_title_path();
|
||||
|
||||
return 1;
|
||||
}
|
||||
diff -up mc-4.6.2/src/main.c.userhost mc-4.6.2/src/main.c
|
||||
--- mc-4.6.2/src/main.c.userhost 2009-05-26 14:45:19.000000000 +0200
|
||||
+++ mc-4.6.2/src/main.c 2009-05-26 14:48:06.000000000 +0200
|
||||
@@ -278,6 +278,9 @@ int midnight_shutdown = 0;
|
||||
/* The user's shell */
|
||||
const char *shell = NULL;
|
||||
|
||||
+/* The xterm title */
|
||||
+char *xterm_title_str = NULL;
|
||||
+
|
||||
/* Is the LANG UTF-8 ? */
|
||||
gboolean is_utf8 = FALSE;
|
||||
|
||||
@@ -1624,9 +1627,23 @@ void
|
||||
update_xterm_title_path (void)
|
||||
{
|
||||
char *p, *s;
|
||||
+ char h[64];
|
||||
+ struct passwd *pw;
|
||||
|
||||
if (xterm_flag && xterm_title) {
|
||||
+ if ( xterm_title_str ) g_free (xterm_title_str);
|
||||
p = s = g_strdup (strip_home_and_password (current_panel->cwd));
|
||||
+ if ( !gethostname (h, 64) ) {
|
||||
+ h[63] = '\0'; /* Be sure the hostname is NUL terminated */
|
||||
+ s = g_strdup_printf ("%s:%s", h, s);
|
||||
+ g_free (p);
|
||||
+ p = s;
|
||||
+ }
|
||||
+ if ( (pw = getpwuid(getuid())) ) {
|
||||
+ s = g_strdup_printf ("%s@%s", pw->pw_name, s);
|
||||
+ g_free (p);
|
||||
+ p = s;
|
||||
+ }
|
||||
do {
|
||||
#ifndef UTF8
|
||||
if (!is_printable ((unsigned char) *s))
|
||||
@@ -1639,7 +1656,7 @@ update_xterm_title_path (void)
|
||||
numeric_keypad_mode ();
|
||||
fprintf (stdout, "\33]0;mc - %s\7", p);
|
||||
fflush (stdout);
|
||||
- g_free (p);
|
||||
+ xterm_title_str = p;
|
||||
}
|
||||
}
|
||||
|
||||
diff -up mc-4.6.2/src/main.h.userhost mc-4.6.2/src/main.h
|
||||
--- mc-4.6.2/src/main.h.userhost 2009-05-26 14:45:19.000000000 +0200
|
||||
+++ mc-4.6.2/src/main.h 2009-05-26 14:46:33.000000000 +0200
|
||||
@@ -69,6 +69,7 @@ extern int alternate_plus_minus;
|
||||
extern int only_leading_plus_minus;
|
||||
extern int output_starts_shell;
|
||||
extern int midnight_shutdown;
|
||||
+extern char *xterm_title_str;
|
||||
extern gboolean is_utf8;
|
||||
extern char cmd_buf [512];
|
||||
extern const char *shell;
|
||||
diff -up mc-4.6.2/src/view.c.userhost mc-4.6.2/src/view.c
|
||||
--- mc-4.6.2/src/view.c.userhost 2009-05-26 14:45:19.000000000 +0200
|
||||
+++ mc-4.6.2/src/view.c 2009-05-26 14:45:19.000000000 +0200
|
||||
@@ -3368,6 +3368,11 @@ mc_internal_viewer (const char *command,
|
||||
WButtonBar *bar;
|
||||
Dlg_head *view_dlg;
|
||||
|
||||
+ if (xterm_flag && xterm_title && xterm_title_str) {
|
||||
+ fprintf (stdout, "\33]0;mc - %s/%s\7", xterm_title_str, file);
|
||||
+ fflush(stdout);
|
||||
+ }
|
||||
+
|
||||
/* Create dialog and widgets, put them on the dialog */
|
||||
view_dlg =
|
||||
create_dlg (0, 0, LINES, COLS, NULL, view_dialog_callback,
|
||||
@@ -3391,6 +3396,8 @@ mc_internal_viewer (const char *command,
|
||||
}
|
||||
destroy_dlg (view_dlg);
|
||||
|
||||
+ update_xterm_title_path();
|
||||
+
|
||||
return succeeded;
|
||||
}
|
||||
|
159
mc.spec
159
mc.spec
@ -1,38 +1,23 @@
|
||||
%define alphatag 20090731git
|
||||
|
||||
Summary: User-friendly text console file manager and visual shell
|
||||
Name: mc
|
||||
Version: 4.6.2
|
||||
Release: 12%{?dist}
|
||||
Version: 4.6.99
|
||||
Release: 0.%{alphatag}%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv2
|
||||
Group: System Environment/Shells
|
||||
# tarball from http://www.midnight-commander.org/downloads/3
|
||||
Source0: mc-%{version}.tar.gz
|
||||
# tarball created from git clone git://midnight-commander.org/git/mc.git
|
||||
Source0: mc-%{version}-%{alphatag}.tar.bz2
|
||||
URL: http://www.midnight-commander.org/
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: glib2-devel e2fsprogs-devel slang-devel
|
||||
BuildRequires: gettext cvs automake autoconf
|
||||
Requires: dev >= 0:3.3-3
|
||||
BuildRequires: gettext cvs automake autoconf libtool
|
||||
Requires: dev >= 3.3-3
|
||||
|
||||
# UTF-8 patch from http://www.midnight-commander.org/downloads/4
|
||||
Patch0: mc-4.6.2-utf8.patch
|
||||
Patch1: mc-extensions.patch
|
||||
Patch2: mc-userhost.patch
|
||||
Patch3: mc-64bit.patch
|
||||
Patch6: mc-showfree.patch
|
||||
Patch7: mc-cedit.patch
|
||||
Patch8: mc-delcheck.patch
|
||||
Patch9: mc-etcmc.patch
|
||||
Patch10: mc-exit.patch
|
||||
Patch12: mc-ipv6.patch
|
||||
Patch13: mc-newlinedir.patch
|
||||
Patch15: mc-prompt.patch
|
||||
Patch16: mc-refresh.patch
|
||||
Patch18: mc-lzma.patch
|
||||
Patch19: mc-hintchk.patch
|
||||
Patch21: mc-oldrpmtags.patch
|
||||
Patch22: mc-shellcwd.patch
|
||||
Patch23: mc-cedit-configurable-highlight.patch
|
||||
Patch24: mc-edit-segv.patch
|
||||
Patch1: mc-ipv6.patch
|
||||
Patch2: mc-prompt.patch
|
||||
Patch3: mc-exit.patch
|
||||
|
||||
%description
|
||||
Midnight Commander is a visual shell much like a file manager, only
|
||||
@ -43,88 +28,13 @@ specific files.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .utf8
|
||||
%patch1 -p1 -b .extensions
|
||||
%patch2 -p1 -b .userhost
|
||||
%patch3 -p1 -b .64bit
|
||||
%patch6 -p1 -b .showfree
|
||||
%patch7 -p1 -b .cedit
|
||||
%patch8 -p1 -b .delcheck
|
||||
%patch9 -p1 -b .etcmc
|
||||
%patch10 -p1 -b .exit
|
||||
%patch12 -p1 -b .ipv6
|
||||
%patch13 -p1 -b .newlinedir
|
||||
%patch15 -p1 -b .prompt
|
||||
%patch16 -p1 -b .refresh
|
||||
%patch18 -p1 -b .lzmavfs
|
||||
%patch19 -p1 -b .hintchk
|
||||
%patch21 -p1 -b .oldrpmtags
|
||||
%patch22 -p1 -b .shellcwd
|
||||
%patch23 -p1 -b .cedit-configurable-highlight
|
||||
%patch24 -p1 -b .edit-segv
|
||||
|
||||
# convert files in /lib to UTF-8
|
||||
pushd lib
|
||||
for i in mc.hint mc.hint.es mc.hint.it mc.hint.nl; do
|
||||
iconv -f iso-8859-1 -t utf-8 < ${i} > ${i}.tmp
|
||||
mv -f ${i}.tmp ${i}
|
||||
done
|
||||
|
||||
for i in mc.hint.cs mc.hint.hu mc.hint.pl; do
|
||||
iconv -f iso-8859-2 -t utf-8 < ${i} > ${i}.tmp
|
||||
mv -f ${i}.tmp ${i}
|
||||
done
|
||||
|
||||
for i in mc.hint.sr mc.menu.sr; do
|
||||
iconv -f iso-8859-5 -t utf-8 < ${i} > ${i}.tmp
|
||||
mv -f ${i}.tmp ${i}
|
||||
done
|
||||
|
||||
iconv -f koi8-r -t utf8 < mc.hint.ru > mc.hint.ru.tmp
|
||||
mv -f mc.hint.ru.tmp mc.hint.ru
|
||||
iconv -f koi8-u -t utf8 < mc.hint.uk > mc.hint.uk.tmp
|
||||
mv -f mc.hint.uk.tmp mc.hint.uk
|
||||
iconv -f big5 -t utf8 < mc.hint.zh > mc.hint.zh.tmp
|
||||
mv -f mc.hint.zh.tmp mc.hint.zh
|
||||
popd
|
||||
|
||||
|
||||
# convert man pages in /doc to UTF-8
|
||||
pushd doc
|
||||
|
||||
pushd ru
|
||||
for i in mc.1.in xnc.hlp; do
|
||||
iconv -f koi8-r -t utf-8 < ${i} > ${i}.tmp
|
||||
mv -f ${i}.tmp ${i}
|
||||
done
|
||||
popd
|
||||
|
||||
pushd sr
|
||||
for i in mc.1.in mcserv.8.in xnc.hlp; do
|
||||
iconv -f iso-8859-5 -t utf-8 < ${i} > ${i}.tmp
|
||||
mv -f ${i}.tmp ${i}
|
||||
done
|
||||
popd
|
||||
|
||||
for d in es it; do
|
||||
for i in mc.1.in xnc.hlp; do
|
||||
iconv -f iso-8859-3 -t utf-8 < ${d}/${i} > ${d}/${i}.tmp
|
||||
mv -f ${d}/${i}.tmp ${d}/${i}
|
||||
done
|
||||
done
|
||||
|
||||
for d in hu pl; do
|
||||
for i in mc.1.in xnc.hlp; do
|
||||
iconv -f iso-8859-2 -t utf-8 < ${d}/${i} > ${d}/${i}.tmp
|
||||
mv -f ${d}/${i}.tmp ${d}/${i}
|
||||
done
|
||||
done
|
||||
|
||||
popd
|
||||
%patch1 -p1 -b .ipv6
|
||||
%patch2 -p1 -b .prompt
|
||||
%patch3 -p1 -b .exit
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
export CFLAGS="-DUTF8=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $RPM_OPT_FLAGS -fgnu89-inline"
|
||||
export CFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $RPM_OPT_FLAGS"
|
||||
%configure --with-screen=slang \
|
||||
--enable-charset \
|
||||
--with-samba \
|
||||
@ -134,33 +44,13 @@ make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/mc
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/mc/extfs
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/mc/syntax
|
||||
|
||||
make install DESTDIR="$RPM_BUILD_ROOT"
|
||||
|
||||
install lib/{mc.sh,mc.csh} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
|
||||
|
||||
# move configuration files to /etc/mc to make it FHS compliant (#2188)
|
||||
mv -f $RPM_BUILD_ROOT%{_datadir}/mc/{cedit.menu,edit.indent.rc,edit.spell.rc,\
|
||||
mc.ext,mc.lib,mc.menu,mc.charsets} $RPM_BUILD_ROOT%{_sysconfdir}/mc
|
||||
mv -f $RPM_BUILD_ROOT%{_datadir}/mc/extfs/*.ini $RPM_BUILD_ROOT%{_sysconfdir}/mc/extfs
|
||||
mv -f $RPM_BUILD_ROOT%{_datadir}/mc/syntax/Syntax $RPM_BUILD_ROOT%{_sysconfdir}/mc/syntax
|
||||
|
||||
# install man pages in various languages
|
||||
for l in es hu it pl ru sr; do
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/${l}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/${l}/man1
|
||||
install -m 644 doc/${l}/mc.1 $RPM_BUILD_ROOT%{_mandir}/${l}/man1
|
||||
done
|
||||
|
||||
for I in /etc/pam.d/mcserv \
|
||||
/etc/rc.d/init.d/mcserv \
|
||||
/etc/mc.global; do
|
||||
rm -rf ${RPM_BUILD_ROOT}${I}
|
||||
done
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
|
||||
install contrib/{mc.sh,mc.csh} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
|
||||
#mkdir -p $RPM_BUILD_ROOT%{_datadir}/mc/bin
|
||||
#mv $RPM_BUILD_ROOT%{_libexecdir}/mc/{mc.sh,mc.csh,mc-wrapper.sh,mc-wrapper.csh} $RPM_BUILD_ROOT%{_datadir}/mc/bin
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
@ -169,14 +59,14 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-, root, root)
|
||||
|
||||
%doc FAQ COPYING NEWS README
|
||||
%doc doc/FAQ doc/COPYING doc/NEWS doc/README
|
||||
%{_bindir}/mc
|
||||
%{_bindir}/mcedit
|
||||
%{_bindir}/mcmfmt
|
||||
%{_bindir}/mcview
|
||||
%{_datadir}/mc/*
|
||||
%attr(4711, vcsa, root) %{_libexecdir}/mc/cons.saver
|
||||
%{_libexecdir}/mc/mc*
|
||||
%{_mandir}/man1/*
|
||||
%lang(es) %{_mandir}/es/man1/mc.1*
|
||||
%lang(hu) %{_mandir}/hu/man1/mc.1*
|
||||
@ -185,7 +75,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%lang(ru) %{_mandir}/ru/man1/mc.1*
|
||||
%lang(sr) %{_mandir}/sr/man1/mc.1*
|
||||
%{_sysconfdir}/profile.d/*
|
||||
%config %{_sysconfdir}/mc/syntax/Syntax
|
||||
%config %{_sysconfdir}/mc/Syntax
|
||||
%config %{_sysconfdir}/mc/mc.charsets
|
||||
%config %{_sysconfdir}/mc/mc.lib
|
||||
%config(noreplace) %{_sysconfdir}/mc/*edit*
|
||||
@ -195,11 +85,14 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%config(noreplace) %{_sysconfdir}/mc/extfs/sfs.ini
|
||||
%dir %{_datadir}/mc
|
||||
%dir %{_sysconfdir}/mc
|
||||
%dir %{_sysconfdir}/mc/syntax
|
||||
%dir %{_sysconfdir}/mc/extfs
|
||||
%dir %{_libexecdir}/mc
|
||||
|
||||
%changelog
|
||||
* Fri Jul 31 2009 Jindrich Novy <jnovy@redhat.com> 4.6.99-0.20090731git
|
||||
- update to latest GIT mc
|
||||
- forwardport prompt fix and exit patch, keep IPv6 patch and drop the others
|
||||
|
||||
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.6.2-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user