- Fix spec file
OBS-URL: https://build.opensuse.org/package/show/Base:System/mc?expand=0&rev=10
This commit is contained in:
parent
2215855ca5
commit
667bda3add
@ -1,46 +0,0 @@
|
|||||||
Some common stuff used by other UTF-8 patches.
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
--- mc-4.6.2/src/util.c
|
|
||||||
+++ mc-4.6.2/src/util.c
|
|
||||||
@@ -145,6 +145,30 @@
|
|
||||||
return strlen (str);
|
|
||||||
}
|
|
||||||
|
|
||||||
+int
|
|
||||||
+columns_to_bytes (const char *str, int col)
|
|
||||||
+{
|
|
||||||
+ int bytes = 0;
|
|
||||||
+ int columns = 0;
|
|
||||||
+ int i;
|
|
||||||
+#ifdef UTF8
|
|
||||||
+ if (SLsmg_Is_Unicode) {
|
|
||||||
+ static mbstate_t s;
|
|
||||||
+ while (columns < col) {
|
|
||||||
+ memset (&s, 0, sizeof (s));
|
|
||||||
+ i = mbrlen (str + bytes, -1, &s);
|
|
||||||
+ if (i <= 0) {
|
|
||||||
+ return col + bytes - columns;
|
|
||||||
+ }
|
|
||||||
+ bytes += i;
|
|
||||||
+ columns ++;
|
|
||||||
+ }
|
|
||||||
+ return col + bytes - columns;
|
|
||||||
+ } else
|
|
||||||
+#endif
|
|
||||||
+ return col;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
#ifdef UTF8
|
|
||||||
|
|
||||||
void
|
|
||||||
--- mc-4.6.2/src/util.h
|
|
||||||
+++ mc-4.6.2/src/util.h
|
|
||||||
@@ -104,6 +104,7 @@
|
|
||||||
|
|
||||||
void fix_utf8(char *str);
|
|
||||||
size_t mbstrlen (const char *);
|
|
||||||
+int columns_to_bytes (const char *, int);
|
|
||||||
wchar_t *mbstr_to_wchar (const char *);
|
|
||||||
char *wchar_to_mbstr (const wchar_t *);
|
|
||||||
char *utf8_to_local(char *str);
|
|
@ -1,21 +0,0 @@
|
|||||||
Use six character width cyan rectangles for bottom row's buttons.
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
--- mc-4.6.2/src/widget.c
|
|
||||||
+++ mc-4.6.2/src/widget.c
|
|
||||||
@@ -2562,11 +2562,14 @@
|
|
||||||
attrset (DEFAULT_COLOR);
|
|
||||||
tty_printf ("%-*s", bb->widget.cols, "");
|
|
||||||
for (i = 0; i < COLS / 8 && i < 10; i++) {
|
|
||||||
+ int j;
|
|
||||||
widget_move (&bb->widget, 0, i * 8);
|
|
||||||
attrset (DEFAULT_COLOR);
|
|
||||||
tty_printf ("%d", i + 1);
|
|
||||||
attrset (SELECTED_COLOR);
|
|
||||||
- tty_printf ("%-*s", ((i + 1) * 8 == COLS ? 5 : 6),
|
|
||||||
+ j = columns_to_bytes(bb->labels [i].text ? bb->labels [i].text : "",
|
|
||||||
+ ((i + 1) * 8 == COLS ? 5 : 6));
|
|
||||||
+ tty_printf ("%-*s", j,
|
|
||||||
bb->labels[i].text ? bb->labels[i].text : "");
|
|
||||||
attrset (DEFAULT_COLOR);
|
|
||||||
}
|
|
@ -1,63 +0,0 @@
|
|||||||
Fix formatting the output of "mc --help".
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
--- mc-4.6.2/src/main.c
|
|
||||||
+++ mc-4.6.2/src/main.c
|
|
||||||
@@ -1865,7 +1865,7 @@
|
|
||||||
|
|
||||||
/* print help for options */
|
|
||||||
leftColWidth = poptPrintHelp (ctx, stream, 0);
|
|
||||||
- fprintf (stream, " %-*s %s\n", leftColWidth, _("+number"),
|
|
||||||
+ fprintf (stream, " %-*s %s\n", leftColWidth + strlen(_("+number")) - mbstrlen(_("+number")), _("+number"),
|
|
||||||
_("Set initial line number for the internal editor"));
|
|
||||||
fputs (_
|
|
||||||
("\n"
|
|
||||||
--- mc-4.6.2/src/popthelp.c
|
|
||||||
+++ mc-4.6.2/src/popthelp.c
|
|
||||||
@@ -101,7 +101,7 @@
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
- helpLength = strlen(help);
|
|
||||||
+ helpLength = mbstrlen(help);
|
|
||||||
while (helpLength > lineLength) {
|
|
||||||
ch = help + lineLength - 1;
|
|
||||||
while (ch > help && !isspace((unsigned char) *ch)) ch--;
|
|
||||||
@@ -112,7 +112,7 @@
|
|
||||||
fprintf(f, "%.*s\n%*s", (int) (ch - help), help, indentLength, " ");
|
|
||||||
help = ch;
|
|
||||||
while (isspace((unsigned char) *help) && *help) help++;
|
|
||||||
- helpLength = strlen(help);
|
|
||||||
+ helpLength = mbstrlen(help);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (helpLength) fprintf(f, "%s\n", help);
|
|
||||||
@@ -233,7 +233,7 @@
|
|
||||||
if (len == 3) return cursor;
|
|
||||||
|
|
||||||
if (argDescrip)
|
|
||||||
- len += strlen(argDescrip) + 1;
|
|
||||||
+ len += mbstrlen(argDescrip) + 1;
|
|
||||||
|
|
||||||
if ((cursor + len) > 79) {
|
|
||||||
fprintf(f, "\n ");
|
|
||||||
@@ -304,7 +304,7 @@
|
|
||||||
singleTableUsage(f, cursor, con->options, NULL);
|
|
||||||
|
|
||||||
if (con->otherHelp) {
|
|
||||||
- cursor += strlen(con->otherHelp) + 1;
|
|
||||||
+ cursor += mbstrlen(con->otherHelp) + 1;
|
|
||||||
if (cursor > 79) fprintf(f, "\n ");
|
|
||||||
fprintf(f, " %s", con->otherHelp);
|
|
||||||
}
|
|
||||||
--- mc-4.6.2/src/util.c
|
|
||||||
+++ mc-4.6.2/src/util.c
|
|
||||||
@@ -152,7 +152,7 @@
|
|
||||||
int columns = 0;
|
|
||||||
int i;
|
|
||||||
#ifdef UTF8
|
|
||||||
- if (SLsmg_Is_Unicode) {
|
|
||||||
+ if (1) {
|
|
||||||
static mbstate_t s;
|
|
||||||
while (columns < col) {
|
|
||||||
memset (&s, 0, sizeof (s));
|
|
@ -1,23 +0,0 @@
|
|||||||
Highlight the lines of hotlist in full width.
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
--- mc-4.6.2/src/widget.c
|
|
||||||
+++ mc-4.6.2/src/widget.c
|
|
||||||
@@ -1994,6 +1994,7 @@
|
|
||||||
{
|
|
||||||
WLEntry *e;
|
|
||||||
int i;
|
|
||||||
+ int j;
|
|
||||||
int sel_line;
|
|
||||||
Dlg_head *h = l->widget.parent;
|
|
||||||
int normalc = DLG_NORMALC (h);
|
|
||||||
@@ -2024,7 +2025,8 @@
|
|
||||||
text = e->text;
|
|
||||||
e = e->next;
|
|
||||||
}
|
|
||||||
- tty_printf (" %-*s ", l->width-2, name_trunc (text, l->width-2));
|
|
||||||
+ j = columns_to_bytes (name_trunc (text, l->width-2), l->width-2);
|
|
||||||
+ tty_printf (" %-*s ", j, name_trunc (text, l->width-2));
|
|
||||||
}
|
|
||||||
l->cursor_y = sel_line;
|
|
||||||
if (!l->scrollbar)
|
|
@ -1,17 +0,0 @@
|
|||||||
Quick filename search (^S) highlights correct width.
|
|
||||||
|
|
||||||
================================================================================
|
|
||||||
--- mc-4.6.2/src/screen.c
|
|
||||||
+++ mc-4.6.2/src/screen.c
|
|
||||||
@@ -771,8 +771,10 @@
|
|
||||||
widget_move (&panel->widget, llines (panel)+3, 1);
|
|
||||||
|
|
||||||
if (panel->searching){
|
|
||||||
+ int j;
|
|
||||||
attrset (INPUT_COLOR);
|
|
||||||
- tty_printf ("/%-*s", panel->widget.cols-3, panel->search_buffer);
|
|
||||||
+ j = columns_to_bytes (panel->search_buffer, panel->widget.cols-3);
|
|
||||||
+ tty_printf ("/%-*s", j, panel->search_buffer);
|
|
||||||
attrset (NORMAL_COLOR);
|
|
||||||
return;
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
--- mc-4.6.2/vfs/direntry.c
|
|
||||||
+++ mc-4.6.2/vfs/direntry.c
|
|
||||||
@@ -251,7 +251,13 @@
|
|
||||||
char * const pathref = g_strdup (a_path);
|
|
||||||
char *path = pathref;
|
|
||||||
|
|
||||||
- canonicalize_pathname (path);
|
|
||||||
+ if (strncmp(me->name, "ftpfs", 5) != 0)
|
|
||||||
+ canonicalize_pathname (path);
|
|
||||||
+ else {
|
|
||||||
+ char *p = path + strlen (path) - 1;
|
|
||||||
+ while (p > path && *p == PATH_SEP)
|
|
||||||
+ *p-- = 0;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
while (root) {
|
|
||||||
while (*path == PATH_SEP) /* Strip leading '/' */
|
|
||||||
@@ -324,7 +330,13 @@
|
|
||||||
if (root->super->root != root)
|
|
||||||
vfs_die ("We have to use _real_ root. Always. Sorry.");
|
|
||||||
|
|
||||||
- canonicalize_pathname (path);
|
|
||||||
+ if (strncmp (me->name, "ftpfs", 5) != 0)
|
|
||||||
+ canonicalize_pathname (path);
|
|
||||||
+ else {
|
|
||||||
+ char *p = path + strlen (path) - 1;
|
|
||||||
+ while (p > path && *p == PATH_SEP)
|
|
||||||
+ *p-- = 0;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (!(flags & FL_DIR)) {
|
|
||||||
char *dirname, *name, *save;
|
|
@ -1,11 +1,13 @@
|
|||||||
--- mc-4.6.2/vfs/ftpfs.c
|
Index: lib/vfs/mc-vfs/ftpfs.c
|
||||||
+++ mc-4.6.2/vfs/ftpfs.c
|
===================================================================
|
||||||
@@ -1529,7 +1529,7 @@
|
--- lib/vfs/mc-vfs/ftpfs.c.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
char buf[BUF_SMALL];
|
+++ lib/vfs/mc-vfs/ftpfs.c 2010-07-07 11:52:54.995011197 +0200
|
||||||
|
@@ -1669,7 +1669,7 @@ static int ftpfs_chmod (struct vfs_class
|
||||||
|
|
||||||
g_snprintf(buf, sizeof(buf), "SITE CHMOD %4.4o /%%s", mode & 07777);
|
g_snprintf(buf, sizeof(buf), "SITE CHMOD %4.4o /%%s", mode & 07777);
|
||||||
- return ftpfs_send_command(me, path, buf, OPT_FLUSH);
|
|
||||||
+ return ftpfs_send_command(me, path, buf, OPT_FLUSH | OPT_IGNORE_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ftpfs_chown (struct vfs_class *me, const char *path, int owner, int group)
|
- ret = ftpfs_send_command(me, path, buf, OPT_FLUSH);
|
||||||
|
+ ret = ftpfs_send_command(me, path, buf, OPT_FLUSH | OPT_IGNORE_ERROR);
|
||||||
|
|
||||||
|
if ( mc_config_get_bool (mc_main_config, CONFIG_APP_SECTION,
|
||||||
|
"ignore_ftp_chattr_errors", TRUE)) {
|
||||||
|
13
04_add_gem_extension.patch
Normal file
13
04_add_gem_extension.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Description: Add gem extension
|
||||||
|
|
||||||
|
--- misc/mc.ext.in
|
||||||
|
+++ misc/mc.ext.in
|
||||||
|
@@ -107,7 +107,7 @@
|
||||||
|
### Archives ###
|
||||||
|
|
||||||
|
# .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk
|
||||||
|
-regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$
|
||||||
|
+regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk|\.gem$
|
||||||
|
Open=%cd %p#utar
|
||||||
|
View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
|
||||||
|
|
@ -1,239 +0,0 @@
|
|||||||
diff --git a/edit/edit.c b/edit/edit.c
|
|
||||||
index ff2b2e7..3b9c750 100644
|
|
||||||
--- a/edit/edit.c
|
|
||||||
+++ b/edit/edit.c
|
|
||||||
@@ -182,6 +182,8 @@ edit_load_file_fast (WEdit *edit, const char *filename)
|
|
||||||
static const struct edit_filters {
|
|
||||||
const char *read, *write, *extension;
|
|
||||||
} all_filters[] = {
|
|
||||||
+ { "xz -cd %s 2>&1", "xz > %s", ".xz" },
|
|
||||||
+ { "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 --git a/lib/mc.ext.in b/lib/mc.ext.in
|
|
||||||
index af63f0e..dfe72bb 100644
|
|
||||||
--- a/lib/mc.ext.in
|
|
||||||
+++ b/lib/mc.ext.in
|
|
||||||
@@ -119,6 +119,16 @@ 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.xz, .txz
|
|
||||||
+regex/\.t(ar\.xz|xz)$
|
|
||||||
+ Open=%cd %p#utar
|
|
||||||
+ View=%view{ascii} xz -dc %f 2>/dev/null | tar tvvf -
|
|
||||||
+
|
|
||||||
# .tar.F - used in QNX
|
|
||||||
regex/\.tar\.F$
|
|
||||||
# Open=%cd %p#utar
|
|
||||||
@@ -298,6 +303,14 @@ regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
|
|
||||||
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
|
|
||||||
+
|
|
||||||
+regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
|
|
||||||
+ Open=case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
|
|
||||||
+ View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
|
|
||||||
+
|
|
||||||
|
|
||||||
### Images ###
|
|
||||||
|
|
||||||
@@ -545,6 +554,16 @@ 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
|
|
||||||
+
|
|
||||||
+# xz
|
|
||||||
+regex/\.xz$
|
|
||||||
+ Open=xz -dc %f | %var{PAGER:more}
|
|
||||||
+ View=%view{ascii} xz -dc %f 2>/dev/null
|
|
||||||
+
|
|
||||||
|
|
||||||
### Default ###
|
|
||||||
|
|
||||||
diff --git a/src/util.c b/src/util.c
|
|
||||||
index da6d1b2..b27f3b3 100644
|
|
||||||
--- a/src/util.c
|
|
||||||
+++ b/src/util.c
|
|
||||||
@@ -942,7 +942,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)
|
|
||||||
@@ -986,6 +986,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;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -996,6 +1021,8 @@ decompress_extension (int type)
|
|
||||||
case COMPRESSION_GZIP: return "#ugz";
|
|
||||||
case COMPRESSION_BZIP: return "#ubz";
|
|
||||||
case COMPRESSION_BZIP2: return "#ubz2";
|
|
||||||
+ case COMPRESSION_LZMA: return "#ulzma";
|
|
||||||
+ case COMPRESSION_XZ: return "#uxz";
|
|
||||||
}
|
|
||||||
/* Should never reach this place */
|
|
||||||
fprintf (stderr, "Fatal: decompress_extension called with an unknown argument\n");
|
|
||||||
diff --git a/src/util.h b/src/util.h
|
|
||||||
index 4e9a113..5e773f8 100644
|
|
||||||
--- a/src/util.h
|
|
||||||
+++ b/src/util.h
|
|
||||||
@@ -179,7 +179,9 @@ enum compression_type {
|
|
||||||
COMPRESSION_NONE,
|
|
||||||
COMPRESSION_GZIP,
|
|
||||||
COMPRESSION_BZIP,
|
|
||||||
- COMPRESSION_BZIP2
|
|
||||||
+ COMPRESSION_BZIP2,
|
|
||||||
+ COMPRESSION_LZMA,
|
|
||||||
+ COMPRESSION_XZ
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Looks for ``magic'' bytes at the start of the VFS file to guess the
|
|
||||||
diff --git a/vfs/extfs/iso9660.in b/vfs/extfs/iso9660.in
|
|
||||||
index 91d1b1e..467efdb 100644
|
|
||||||
--- a/vfs/extfs/iso9660.in
|
|
||||||
+++ b/vfs/extfs/iso9660.in
|
|
||||||
@@ -29,6 +29,8 @@ test_iso () {
|
|
||||||
mcisofs_list () {
|
|
||||||
# left as a reminder to implement compressed image support =)
|
|
||||||
case "$1" in
|
|
||||||
+ *.lzma) MYCAT="lzma -dc";;
|
|
||||||
+ *.xz) MYCAT="xz -dc";;
|
|
||||||
*.bz2) MYCAT="bzip2 -dc";;
|
|
||||||
*.gz) MYCAT="gzip -dc";;
|
|
||||||
*.z) MYCAT="gzip -dc";;
|
|
||||||
diff --git a/vfs/extfs/lslR.in b/vfs/extfs/lslR.in
|
|
||||||
index 273fe5e..67f5edb 100644
|
|
||||||
--- a/vfs/extfs/lslR.in
|
|
||||||
+++ b/vfs/extfs/lslR.in
|
|
||||||
@@ -12,6 +12,8 @@ AWK=@AWK@
|
|
||||||
|
|
||||||
mclslRfs_list () {
|
|
||||||
case "$1" in
|
|
||||||
+ *.lzma) MYCAT="lzma -dc";;
|
|
||||||
+ *.xz) MYCAT="xz -dc";;
|
|
||||||
*.bz2) MYCAT="bzip2 -dc";;
|
|
||||||
*.gz) MYCAT="gzip -dc";;
|
|
||||||
*.z) MYCAT="gzip -dc";;
|
|
||||||
diff --git a/vfs/extfs/mailfs.in b/vfs/extfs/mailfs.in
|
|
||||||
index 7bb62f9..91cf3d7 100644
|
|
||||||
--- a/vfs/extfs/mailfs.in
|
|
||||||
+++ b/vfs/extfs/mailfs.in
|
|
||||||
@@ -7,6 +7,8 @@ use bytes;
|
|
||||||
|
|
||||||
$zcat="zcat"; # gunzip to stdout
|
|
||||||
$bzcat="bzip2 -dc"; # bunzip2 to stdout
|
|
||||||
+$lzcat="lzma -dc"; # unlzma to stdout
|
|
||||||
+$xzcat="xz -dc"; # unxz to stdout
|
|
||||||
$file="file"; # "file" command
|
|
||||||
$TZ='GMT'; # default timezone (for Date module)
|
|
||||||
|
|
||||||
@@ -182,6 +183,10 @@ 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|");
|
|
||||||
+} elsif (/xz/) {
|
|
||||||
+ exit 1 unless (open IN, "$xzcat $mbox_qname|");
|
|
||||||
} else {
|
|
||||||
exit 1 unless (open IN, "<$mbox_name");
|
|
||||||
}
|
|
||||||
diff --git a/vfs/extfs/patchfs.in b/vfs/extfs/patchfs.in
|
|
||||||
index dc3757d..62a6d0d 100644
|
|
||||||
--- a/vfs/extfs/patchfs.in
|
|
||||||
+++ b/vfs/extfs/patchfs.in
|
|
||||||
@@ -12,6 +12,8 @@ use POSIX;
|
|
||||||
use File::Temp 'tempfile';
|
|
||||||
|
|
||||||
# standard binaries
|
|
||||||
+my $lzma = 'lzma';
|
|
||||||
+my $xz = 'xz';
|
|
||||||
my $bzip = 'bzip2';
|
|
||||||
my $gzip = 'gzip';
|
|
||||||
my $fileutil = 'file';
|
|
||||||
@@ -70,7 +71,11 @@ sub myin
|
|
||||||
my ($qfname)=(quotemeta $_[0]);
|
|
||||||
|
|
||||||
$_=`$fileutil $qfname`;
|
|
||||||
- if (/bzip/) {
|
|
||||||
+ if (/xz/) {
|
|
||||||
+ return "$xz -dc $qfname";
|
|
||||||
+ } elsif (/lzma/) {
|
|
||||||
+ return "$lzma -dc $qfname";
|
|
||||||
+ } elsif (/bzip/) {
|
|
||||||
return "$bzip -dc $qfname";
|
|
||||||
} elsif (/gzip/) {
|
|
||||||
return "$gzip -dc $qfname";
|
|
||||||
@@ -86,7 +89,11 @@ sub myout
|
|
||||||
my ($sep) = $append ? '>>' : '>';
|
|
||||||
|
|
||||||
$_=`$fileutil $qfname`;
|
|
||||||
- if (/bzip/) {
|
|
||||||
+ if (/xz/) {
|
|
||||||
+ return "$xz -c $sep $qfname";
|
|
||||||
+ } elsif (/lzma/) {
|
|
||||||
+ return "$lzma -c $sep $qfname";
|
|
||||||
+ } elsif (/bzip/) {
|
|
||||||
return "$bzip -c $sep $qfname";
|
|
||||||
} elsif (/gzip/) {
|
|
||||||
return "$gzip -c $sep $qfname";
|
|
||||||
diff --git a/vfs/extfs/sfs.ini b/vfs/extfs/sfs.ini
|
|
||||||
index 5c3d8e2..fc77e04 100644
|
|
||||||
--- a/vfs/extfs/sfs.ini
|
|
||||||
+++ b/vfs/extfs/sfs.ini
|
|
||||||
@@ -10,6 +10,10 @@ 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
|
|
||||||
+xz/1 xz < %1 > %3
|
|
||||||
+uxz/1 xz -d < %1 > %3
|
|
||||||
tar/1 tar cf %3 %1
|
|
||||||
tgz/1 tar czf %3 %1
|
|
||||||
uhtml/1 lynx -force_html -dump %1 > %3
|
|
@ -1,62 +0,0 @@
|
|||||||
--- mc-4.6.2/vfs/extfs/rpm
|
|
||||||
+++ mc-4.6.2/vfs/extfs/rpm
|
|
||||||
@@ -95,10 +95,6 @@
|
|
||||||
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)" ||
|
|
||||||
@@ -106,8 +102,6 @@
|
|
||||||
else
|
|
||||||
echo "$FILEPREF 0 $DATE INFO/PACKAGER"
|
|
||||||
echo "$FILEPREF 0 $DATE INFO/URL"
|
|
||||||
- echo "$FILEPREF 0 $DATE INFO/SERIAL"
|
|
||||||
- echo "$FILEPREF 0 $DATE INFO/COPYRIGHT"
|
|
||||||
echo "$FILEPREF 0 $DATE INFO/EPOCH"
|
|
||||||
echo "$FILEPREF 0 $DATE INFO/LICENSE"
|
|
||||||
fi
|
|
||||||
@@ -168,8 +162,6 @@
|
|
||||||
INFO/PACKAGER) $RPM -qp --qf "%{PACKAGER}\n" "$f" > "$3"; exit 0;;
|
|
||||||
INFO/URL) $RPM -qp --qf "%{URL}\n" "$f" >"$3"; exit 0;;
|
|
||||||
INFO/BUILDTIME) $RPM -qp --qf "%{BUILDTIME:date}\n" "$f" >"$3"; exit 0;;
|
|
||||||
- INFO/SERIAL) $RPM -qp --qf "%{SERIAL}\n" "$f" >"$3"; exit 0;;
|
|
||||||
- INFO/COPYRIGHT) $RPM -qp --qf "%{COPYRIGHT}\n" "$f" >"$3"; exit 0;;
|
|
||||||
INFO/EPOCH) $RPM -qp --qf "%{EPOCH}\n" "$f" >"$3"; exit 0;;
|
|
||||||
INFO/LICENSE) $RPM -qp --qf "%{LICENSE}\n" "$f" >"$3"; exit 0;;
|
|
||||||
INFO/RPMVERSION) $RPM -qp --qf "%{RPMVERSION}\n" "$f" >"$3"; exit 0;;
|
|
||||||
--- mc-4.6.2/vfs/extfs/trpm
|
|
||||||
+++ mc-4.6.2/vfs/extfs/trpm
|
|
||||||
@@ -85,10 +85,6 @@
|
|
||||||
echo "$FILEPREF 0 $DATE INFO/PACKAGER"
|
|
||||||
test "`$RPM -q --qf \"%{URL}\" -- "$1"`" = "(none)" ||
|
|
||||||
echo "$FILEPREF 0 $DATE INFO/URL"
|
|
||||||
- test "`$RPM -q --qf \"%{SERIAL}\" -- "$1"`" = "(none)" ||
|
|
||||||
- echo "$FILEPREF 0 $DATE INFO/SERIAL"
|
|
||||||
- test "`$RPM -q --qf \"%{COPYRIGHT}\" -- "$1"`" = "(none)" ||
|
|
||||||
- echo "$FILEPREF 0 $DATE INFO/COPYRIGHT"
|
|
||||||
test "`$RPM -q --qf \"%{EPOCH}\" -- "$1"`" = "(none)" ||
|
|
||||||
echo "$FILEPREF 0 $DATE INFO/EPOCH"
|
|
||||||
test "`$RPM -q --qf \"%{LICENSE}\" -- "$1"`" = "(none)" ||
|
|
||||||
@@ -96,8 +92,6 @@
|
|
||||||
else
|
|
||||||
echo "$FILEPREF 0 $DATE INFO/PACKAGER"
|
|
||||||
echo "$FILEPREF 0 $DATE INFO/URL"
|
|
||||||
- echo "$FILEPREF 0 $DATE INFO/SERIAL"
|
|
||||||
- echo "$FILEPREF 0 $DATE INFO/COPYRIGHT"
|
|
||||||
echo "$FILEPREF 0 $DATE INFO/EPOCH"
|
|
||||||
echo "$FILEPREF 0 $DATE INFO/LICENSE"
|
|
||||||
fi
|
|
||||||
@@ -143,8 +137,6 @@
|
|
||||||
INFO/PACKAGER) $RPM -q --qf "%{PACKAGER}\n" -- "$1" > "$3"; exit 0;;
|
|
||||||
INFO/URL) $RPM -q --qf "%{URL}\n" -- "$1" > "$3"; exit 0;;
|
|
||||||
INFO/BUILDTIME) $RPM -q --qf "%{BUILDTIME:date}\n" -- "$1" > "$3"; exit 0;;
|
|
||||||
- INFO/SERIAL) $RPM -q --qf "%{SERIAL}\n" -- "$1" > "$3"; exit 0;;
|
|
||||||
- INFO/COPYRIGHT) $RPM -q --qf "%{COPYRIGHT}\n" -- "$1" > "$3"; exit 0;;
|
|
||||||
INFO/EPOCH) $RPM -q --qf "%{EPOCH}\n" -- "$1" > "$3"; exit 0;;
|
|
||||||
INFO/LICENSE) $RPM -q --qf "%{LICENSE}\n" -- "$1" > "$3"; exit 0;;
|
|
||||||
INFO/RPMVERSION) $RPM -q --qf "%{RPMVERSION}\n" -- "$1" > "$3"; exit 0;;
|
|
@ -1,53 +0,0 @@
|
|||||||
--- mc-4.6.2/vfs/extfs/u7z
|
|
||||||
+++ mc-4.6.2/vfs/extfs/u7z
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
#
|
|
||||||
# extfs support for p7zip
|
|
||||||
# Written by Pavel Roskin <proski@gnu.org>
|
|
||||||
+# Some Bugfixes/workarounds by Sergiy Niskorodov <sgh@mail.zp.ua>
|
|
||||||
# Licensed under GNU GPL version 2 or later version.
|
|
||||||
|
|
||||||
P7ZIP=7za
|
|
||||||
@@ -19,7 +20,10 @@
|
|
||||||
|
|
||||||
mcu7zip_copyout ()
|
|
||||||
{
|
|
||||||
- $P7ZIP e -so "$1" "$2" > "$3" 2>/dev/null
|
|
||||||
+ #first we check if we have old p7zip archive with prefix ./ in filename
|
|
||||||
+ $P7ZIP l "$1" "$2" | grep -q "0 files" && \
|
|
||||||
+ EXFNAME=*./"$2" || EXFNAME="$2"
|
|
||||||
+ $P7ZIP e -so "$1" "$EXFNAME" > "$3" 2>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
mcu7zip_copyin ()
|
|
||||||
@@ -31,19 +35,27 @@
|
|
||||||
{
|
|
||||||
dir=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-u7z.XXXXXX"` || exit 1
|
|
||||||
mkdir -p "$dir"/"$2"
|
|
||||||
- $P7ZIP a -w"$dir" "$1" "$2" >/dev/null 2>&1
|
|
||||||
+ $P7ZIP a -w"$dir" "$1" "$dir"/"$2" >/dev/null 2>&1
|
|
||||||
rm -rf "$dir"
|
|
||||||
}
|
|
||||||
|
|
||||||
mcu7zip_rm ()
|
|
||||||
{
|
|
||||||
# NOTE: Version 4.20 fails to delete files in subdirectories
|
|
||||||
- $P7ZIP d "$1" "$2" >/dev/null 2>&1
|
|
||||||
+ #first we check if we have old p7zip archive with prefix ./ in filename
|
|
||||||
+ $P7ZIP l "$1" "$2" | grep -q "0 files" && \
|
|
||||||
+ EXFNAME=*./"$2" || EXFNAME="$2"
|
|
||||||
+ $P7ZIP d "$1" "$EXFNAME" 2>&1 | grep -q E_NOTIMPL > /dev/null 2>&1 && \
|
|
||||||
+ { printf "Function not implemented...\n7z cannot delete from solid archive.\n" >&2 ; exit 1 ; }
|
|
||||||
}
|
|
||||||
|
|
||||||
mcu7zip_rmdir ()
|
|
||||||
{
|
|
||||||
- $P7ZIP d "$1" "$2"/ >/dev/null 2>&1
|
|
||||||
+ #first we check if we have old p7zip archive with prefix ./ in filename
|
|
||||||
+ $P7ZIP l "$1" "$2" | grep -q "0 files" && \
|
|
||||||
+ EXFNAME=*./"$2" || EXFNAME="$2"
|
|
||||||
+ $P7ZIP d "$1" "$EXFNAME"/ 2>&1 | grep -q E_NOTIMPL > /dev/null 2>&1 && \
|
|
||||||
+ { printf "Function not implemented...\n7z cannot delete from solid archive.\n" >&2 ; exit 1 ; }
|
|
||||||
}
|
|
||||||
|
|
||||||
# override any locale for dates
|
|
@ -1,13 +0,0 @@
|
|||||||
--- mc-4.6.2/vfs/extfs/urar.in
|
|
||||||
+++ mc-4.6.2/vfs/extfs/urar.in
|
|
||||||
@@ -22,6 +22,10 @@
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
+if [ ! -x $UNRAR -a -x $RAR ]; then
|
|
||||||
+ UNRAR=$RAR
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
mcrarfs_list ()
|
|
||||||
{
|
|
||||||
$UNRAR v -c- "$1" | @AWK@ -v uid=`id -u` -v gid=`id -g` '
|
|
16
09_uzip_broken_528239.patch
Normal file
16
09_uzip_broken_528239.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Description: Fix fails to display zip file contents after unzip update
|
||||||
|
Bug-Debian: http://bugs.debian.org/528239
|
||||||
|
Author: Johannes Stezenbach <js@sig21.net>
|
||||||
|
Author: Yury V. Zaytsev <yury@shurup.com>
|
||||||
|
|
||||||
|
--- lib/vfs/mc-vfs/extfs/uzip.in 2010-02-25 11:51:39.000000000 +0100
|
||||||
|
+++ lib/vfs/mc-vfs/extfs/uzip.in 2010-03-17 10:43:37.000000000 +0100
|
||||||
|
@@ -19,7 +19,7 @@
|
||||||
|
# Location of the unzip program
|
||||||
|
my $app_unzip = "@UNZIP@";
|
||||||
|
# Set this to 1 if zipinfo (unzip -Z) is to be used (recommended), otherwise 0.
|
||||||
|
-my $op_has_zipinfo = @HAVE_ZIPINFO@;
|
||||||
|
+my $op_has_zipinfo = 1;
|
||||||
|
|
||||||
|
# Command used to list archives (zipinfo mode)
|
||||||
|
my $cmd_list_zi = "$app_unzip -Z -l -T";
|
25
20_wrong_path_to_wrappers.patch
Normal file
25
20_wrong_path_to_wrappers.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
Description: Fix wrong path to the wrapper script
|
||||||
|
Bug-Debian: http://bugs.debian.org/540238
|
||||||
|
Author: Denis Briand <denis@narcan.fr>
|
||||||
|
Author: Jindřich Makovička
|
||||||
|
|
||||||
|
Index: contrib/mc.csh.in
|
||||||
|
===================================================================
|
||||||
|
--- contrib/mc.csh.in.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
|
+++ contrib/mc.csh.in 2010-07-07 18:54:54.616547000 +0200
|
||||||
|
@@ -1 +1 @@
|
||||||
|
-alias mc 'source @pkglibexecdir@/mc-wrapper.csh'
|
||||||
|
+alias mc 'source @datadir@/mc/bin/mc-wrapper.csh'
|
||||||
|
Index: contrib/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
--- contrib/Makefile.am.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
|
+++ contrib/Makefile.am 2010-07-07 18:56:25.946339000 +0200
|
||||||
|
@@ -8,7 +8,7 @@ SCRIPTS_IN = mc.csh.in mc.sh.in mc-wrapp
|
||||||
|
SCRIPTS_OUT = mc.csh mc.sh mc-wrapper.csh mc-wrapper.sh
|
||||||
|
|
||||||
|
pkglibexec_SCRIPTS = $(SCRIPTS_OUT)
|
||||||
|
-pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
+pkglibexecdir = $(datadir)/@PACKAGE@
|
||||||
|
|
||||||
|
cfgdir = $(sysconfdir)/@PACKAGE@
|
||||||
|
cfg_DATA = \
|
@ -1,312 +0,0 @@
|
|||||||
--- mc-4.6.2/edit/editcmd.c
|
|
||||||
+++ mc-4.6.2/edit/editcmd.c
|
|
||||||
@@ -2103,6 +2103,33 @@
|
|
||||||
edit_error_dialog (_("Error"), _(" Invalid regular expression, or scanf expression with too many conversions "));
|
|
||||||
}
|
|
||||||
|
|
||||||
+int mc_isdigit(mc_wchar_t c)
|
|
||||||
+{
|
|
||||||
+#ifndef UTF8
|
|
||||||
+ return isdigit(c);
|
|
||||||
+#else /* UTF8 */
|
|
||||||
+ return iswdigit(c);
|
|
||||||
+#endif /* UTF8 */
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+mc_wchar_t * mc_memmove(mc_wchar_t *to, mc_wchar_t *from, size_t size)
|
|
||||||
+{
|
|
||||||
+#ifndef UTF8
|
|
||||||
+ return memmove(to, from, size);
|
|
||||||
+#else /* UTF8 */
|
|
||||||
+ return wmemmove(to, from, size);
|
|
||||||
+#endif /* UTF8 */
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+mc_wchar_t * mc_strchr(mc_wchar_t *str, mc_wchar_t c)
|
|
||||||
+{
|
|
||||||
+#ifndef UTF8
|
|
||||||
+ return strchr(str, c);
|
|
||||||
+#else /* UTF8 */
|
|
||||||
+ return wcschr(str, c);
|
|
||||||
+#endif /* UTF8 */
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* call with edit = 0 before shutdown to close memory leaks */
|
|
||||||
void
|
|
||||||
edit_replace_cmd (WEdit *edit, int again)
|
|
||||||
@@ -2119,6 +2146,8 @@
|
|
||||||
int replace_continue;
|
|
||||||
int treplace_prompt = 0;
|
|
||||||
long times_replaced = 0, last_search;
|
|
||||||
+ mc_wchar_t *repl_templ;
|
|
||||||
+ mc_wchar_t *repl_str;
|
|
||||||
int argord[NUM_REPL_ARGS];
|
|
||||||
|
|
||||||
if (!edit) {
|
|
||||||
@@ -2172,7 +2201,68 @@
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
- {
|
|
||||||
+#ifndef UTF8
|
|
||||||
+ repl_templ = g_strdup(input2);
|
|
||||||
+#else /* UTF8 */
|
|
||||||
+ repl_templ = mbstr_to_wchar(input2);
|
|
||||||
+#endif /* UTF8 */
|
|
||||||
+
|
|
||||||
+ if (replace_regexp) {
|
|
||||||
+ /*
|
|
||||||
+ * edit replace template - convert subpattern references (\1) to
|
|
||||||
+ * snprintf_p arguments (%s) and fill "argord" array to match captured
|
|
||||||
+ * subpatterns
|
|
||||||
+ */
|
|
||||||
+ int ao;
|
|
||||||
+ int ord;
|
|
||||||
+ mc_wchar_t *s;
|
|
||||||
+ mc_wchar_t *param;
|
|
||||||
+ mc_wchar_t *endptr;
|
|
||||||
+#ifndef UTF8
|
|
||||||
+#define MC_CHAR(c) ((mc_wchar_t) c)
|
|
||||||
+#else /* UTF8 */
|
|
||||||
+#define MC_CHAR(c) (L##c)
|
|
||||||
+#endif /* UTF8 */
|
|
||||||
+
|
|
||||||
+ endptr = mc_strchr(repl_templ, MC_CHAR('\0'));
|
|
||||||
+ s = repl_templ;
|
|
||||||
+ ao = 0;
|
|
||||||
+ while ((s = mc_strchr(s, MC_CHAR('\\')))) {
|
|
||||||
+ param = s;
|
|
||||||
+ s++;
|
|
||||||
+ if (!s) break;
|
|
||||||
+ /* implement \n \r and \t escape sequences in replace string */
|
|
||||||
+ if (*s == MC_CHAR('n')) {
|
|
||||||
+ *s = MC_CHAR('\n');
|
|
||||||
+ } else if (*s == MC_CHAR('r')) {
|
|
||||||
+ *s = MC_CHAR('\r');
|
|
||||||
+ } else if (*s == MC_CHAR('t')) {
|
|
||||||
+ *s = MC_CHAR('\t');
|
|
||||||
+ }
|
|
||||||
+ if (!mc_isdigit(*s)) {
|
|
||||||
+ mc_memmove(param, s, endptr - s + 1);
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
+ ord = 0;
|
|
||||||
+ while (mc_isdigit(*s)) {
|
|
||||||
+ ord *= 10;
|
|
||||||
+ ord += *s - MC_CHAR('0');
|
|
||||||
+ s++;
|
|
||||||
+ }
|
|
||||||
+ if ((ord > 0) && (ord <= NUM_REPL_ARGS)) {
|
|
||||||
+ argord[ao++] = ord - 1;
|
|
||||||
+ *param++ = MC_CHAR('%');
|
|
||||||
+ *param++ = MC_CHAR('s');
|
|
||||||
+ mc_memmove(param, s, endptr - s + 1);
|
|
||||||
+ s = param;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ while (ao < NUM_REPL_ARGS) {
|
|
||||||
+ argord[ao] = ao;
|
|
||||||
+ ao++;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ } else {
|
|
||||||
const char *s;
|
|
||||||
int ord;
|
|
||||||
size_t i;
|
|
||||||
@@ -2203,6 +2293,12 @@
|
|
||||||
&& !replace_backwards)
|
|
||||||
edit->search_start++;
|
|
||||||
|
|
||||||
+ if (replace_scanf || replace_regexp) {
|
|
||||||
+ repl_str = g_malloc(((MAX_REPL_LEN + 2)+1) * sizeof(mc_wchar_t));
|
|
||||||
+ } else {
|
|
||||||
+ repl_str = repl_templ;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
do {
|
|
||||||
int len = 0;
|
|
||||||
long new_start;
|
|
||||||
@@ -2227,8 +2323,47 @@
|
|
||||||
|
|
||||||
replace_yes = 1;
|
|
||||||
|
|
||||||
+ if (replace_scanf || replace_regexp) {
|
|
||||||
+ int ret = 0;
|
|
||||||
+
|
|
||||||
+ /* we need to fill in sargs just like with scanf */
|
|
||||||
+ if (replace_regexp) {
|
|
||||||
+ int k, j;
|
|
||||||
+ for (k = 1; k < NUM_REPL_ARGS && pmatch[k].rm_eo >= 0;
|
|
||||||
+ k++) {
|
|
||||||
+ mc_wchar_t *t;
|
|
||||||
+
|
|
||||||
+ if (pmatch[k].rm_eo - pmatch[k].rm_so > 255) {
|
|
||||||
+ ret = -1;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ t = (mc_wchar_t *) &sargs[k - 1][0];
|
|
||||||
+ for (j = 0; j < pmatch[k].rm_eo - pmatch[k].rm_so &&
|
|
||||||
+ j < 255; j++, t++)
|
|
||||||
+ *t = edit_get_byte (edit, edit->search_start -
|
|
||||||
+ pmatch[0].rm_so + pmatch[k].rm_so + j);
|
|
||||||
+ *t = '\0';
|
|
||||||
+ }
|
|
||||||
+ for (; k <= NUM_REPL_ARGS; k++)
|
|
||||||
+ sargs[k - 1][0] = 0;
|
|
||||||
+ }
|
|
||||||
+ if (ret >= 0)
|
|
||||||
+ ret = snprintf_p (repl_str, MAX_REPL_LEN + 2, repl_templ,
|
|
||||||
+ PRINTF_ARGS);
|
|
||||||
+ if (ret < 0) {
|
|
||||||
+ edit_error_dialog (_(" Replace "),
|
|
||||||
+ ret == -2
|
|
||||||
+ ? _(" Error in replacement format string. ")
|
|
||||||
+ : _(" Replacement too long. "));
|
|
||||||
+ treplace_prompt = 0;
|
|
||||||
+ replace_yes = 0;
|
|
||||||
+ replace_continue = 0;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (treplace_prompt) {
|
|
||||||
int l;
|
|
||||||
+ char *displ_repl_str;
|
|
||||||
l = edit->curs_row - edit->num_widget_lines / 3;
|
|
||||||
if (l > 0)
|
|
||||||
edit_scroll_downward (edit, l);
|
|
||||||
@@ -2242,7 +2377,15 @@
|
|
||||||
/*so that undo stops at each query */
|
|
||||||
edit_push_key_press (edit);
|
|
||||||
|
|
||||||
- switch (edit_replace_prompt (edit, input2, /* and prompt 2/3 down */
|
|
||||||
+#ifndef UTF8
|
|
||||||
+ displ_repl_str = g_strdup(repl_str);
|
|
||||||
+#else /* UTF8 */
|
|
||||||
+ displ_repl_str = wchar_to_mbstr(repl_str);
|
|
||||||
+ /* wchar_to_mbstr(str) returns NULL when length of str == 0 */
|
|
||||||
+ if (!displ_repl_str) displ_repl_str = g_strdup("");
|
|
||||||
+#endif /* UTF8 */
|
|
||||||
+ convert_to_display (displ_repl_str);
|
|
||||||
+ switch (edit_replace_prompt (edit, displ_repl_str, /* and prompt 2/3 down */
|
|
||||||
(edit->num_widget_columns -
|
|
||||||
CONFIRM_DLG_WIDTH) / 2,
|
|
||||||
edit->num_widget_lines * 2 /
|
|
||||||
@@ -2264,99 +2407,15 @@
|
|
||||||
replace_continue = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
+ g_free(displ_repl_str);
|
|
||||||
}
|
|
||||||
if (replace_yes) { /* delete then insert new */
|
|
||||||
-#ifdef UTF8
|
|
||||||
- mc_wchar_t *winput2 = mbstr_to_wchar(input2);
|
|
||||||
-#endif /* UTF8 */
|
|
||||||
- if (replace_scanf) {
|
|
||||||
- mc_wchar_t repl_str[MAX_REPL_LEN + 2];
|
|
||||||
- int ret = 0;
|
|
||||||
-
|
|
||||||
- /* we need to fill in sargs just like with scanf */
|
|
||||||
- if (replace_regexp) {
|
|
||||||
- int k, j;
|
|
||||||
- for (k = 1;
|
|
||||||
- k < NUM_REPL_ARGS && pmatch[k].rm_eo >= 0;
|
|
||||||
- k++) {
|
|
||||||
-#ifndef UTF8
|
|
||||||
- unsigned char *t;
|
|
||||||
-#else /* UTF8 */
|
|
||||||
- mc_wchar_t *t;
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
- if (pmatch[k].rm_eo - pmatch[k].rm_so > 255) {
|
|
||||||
- ret = -1;
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
-#ifndef UTF8
|
|
||||||
- t = (unsigned char *) &sargs[k - 1][0];
|
|
||||||
-#else /* UTF8 */
|
|
||||||
- t = (mc_wchar_t *) &sargs[k - 1][0];
|
|
||||||
-#endif /* UTF8 */
|
|
||||||
- for (j = 0;
|
|
||||||
- j < pmatch[k].rm_eo - pmatch[k].rm_so
|
|
||||||
- && j < 255; j++, t++)
|
|
||||||
- *t = edit_get_byte (edit,
|
|
||||||
- edit->
|
|
||||||
- search_start
|
|
||||||
- -
|
|
||||||
- pmatch
|
|
||||||
- [0].
|
|
||||||
- rm_so +
|
|
||||||
- pmatch
|
|
||||||
- [k].
|
|
||||||
- rm_so +
|
|
||||||
- j);
|
|
||||||
- *t = '\0';
|
|
||||||
- }
|
|
||||||
- for (; k <= NUM_REPL_ARGS; k++)
|
|
||||||
- sargs[k - 1][0] = 0;
|
|
||||||
- }
|
|
||||||
- if (!ret)
|
|
||||||
- ret =
|
|
||||||
-#ifndef UTF8
|
|
||||||
- snprintf_p (repl_str, MAX_REPL_LEN + 2, input2,
|
|
||||||
-#else /* UTF8 */
|
|
||||||
- snprintf_p (repl_str, MAX_REPL_LEN + 2, winput2,
|
|
||||||
-#endif /* UTF8 */
|
|
||||||
- PRINTF_ARGS);
|
|
||||||
- if (ret >= 0) {
|
|
||||||
- times_replaced++;
|
|
||||||
- while (i--)
|
|
||||||
- edit_delete (edit);
|
|
||||||
-#ifndef UTF8
|
|
||||||
- while (repl_str[++i])
|
|
||||||
- edit_insert (edit, repl_str[i]);
|
|
||||||
-#else /* UTF8 */
|
|
||||||
- while (winput2[++i])
|
|
||||||
- edit_insert (edit, winput2[i]);
|
|
||||||
-#endif /* UTF8 */
|
|
||||||
- } else {
|
|
||||||
- edit_error_dialog (_(" Replace "),
|
|
||||||
- ret ==
|
|
||||||
- -2 ?
|
|
||||||
- _
|
|
||||||
- (" Error in replacement format string. ")
|
|
||||||
- : _(" Replacement too long. "));
|
|
||||||
- replace_continue = 0;
|
|
||||||
- }
|
|
||||||
- } else {
|
|
||||||
- times_replaced++;
|
|
||||||
- while (i--)
|
|
||||||
- edit_delete (edit);
|
|
||||||
-#ifndef UTF8
|
|
||||||
- while (input2[++i])
|
|
||||||
- edit_insert (edit, input2[i]);
|
|
||||||
-#else /* UTF8 */
|
|
||||||
- while (winput2[++i])
|
|
||||||
- edit_insert (edit, winput2[i]);
|
|
||||||
-#endif /* UTF8 */
|
|
||||||
- }
|
|
||||||
+ times_replaced++;
|
|
||||||
+ while (i--)
|
|
||||||
+ edit_delete (edit);
|
|
||||||
+ while (repl_str[++i])
|
|
||||||
+ edit_insert (edit, repl_str[i]);
|
|
||||||
edit->found_len = i;
|
|
||||||
-#ifdef UTF8
|
|
||||||
- g_free (winput2);
|
|
||||||
-#endif /* UTF8 */
|
|
||||||
}
|
|
||||||
/* so that we don't find the same string again */
|
|
||||||
if (replace_backwards) {
|
|
||||||
@@ -2385,6 +2444,12 @@
|
|
||||||
}
|
|
||||||
} while (replace_continue);
|
|
||||||
|
|
||||||
+ /* cleanup */
|
|
||||||
+ if (replace_scanf || replace_regexp) {
|
|
||||||
+ g_free(repl_str);
|
|
||||||
+ }
|
|
||||||
+ g_free(repl_templ);
|
|
||||||
+
|
|
||||||
edit->force = REDRAW_COMPLETELY;
|
|
||||||
edit_scroll_screen_over_cursor (edit);
|
|
||||||
cleanup:
|
|
@ -1,53 +0,0 @@
|
|||||||
--- mc-4.6.2/edit/editcmd.c
|
|
||||||
+++ mc-4.6.2/edit/editcmd.c
|
|
||||||
@@ -1511,6 +1511,32 @@
|
|
||||||
sargs[argord[8]], sargs[argord[9]], sargs[argord[10]], sargs[argord[11]], \
|
|
||||||
sargs[argord[12]], sargs[argord[13]], sargs[argord[14]], sargs[argord[15]]
|
|
||||||
|
|
||||||
+#ifdef UTF8
|
|
||||||
+size_t
|
|
||||||
+real_mbstrlen (const char *str)
|
|
||||||
+{
|
|
||||||
+ if (SLsmg_Is_Unicode) {
|
|
||||||
+ size_t width = 0;
|
|
||||||
+
|
|
||||||
+ for (; *str; str++) {
|
|
||||||
+ wchar_t c;
|
|
||||||
+ size_t len;
|
|
||||||
+
|
|
||||||
+ len = mbrtowc (&c, str, MB_CUR_MAX, NULL);
|
|
||||||
+
|
|
||||||
+ if (len == (size_t)(-1) || len == (size_t)(-2)) break;
|
|
||||||
+
|
|
||||||
+ if (len > 0) {
|
|
||||||
+ width ++;
|
|
||||||
+ str += len-1;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return width;
|
|
||||||
+ } else
|
|
||||||
+ return strlen (str);
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* This function is a modification of mc-3.2.10/src/view.c:regexp_view_search() */
|
|
||||||
/* returns -3 on error in pattern, -1 on not found, found_len = 0 if either */
|
|
||||||
@@ -1582,7 +1608,7 @@
|
|
||||||
continue;
|
|
||||||
tmp = string[pmatch[i].rm_so];
|
|
||||||
string[pmatch[i].rm_so] = 0;
|
|
||||||
- new_o = mbstrlen(string);
|
|
||||||
+ new_o = real_mbstrlen(string);
|
|
||||||
string[pmatch[i].rm_so] = tmp;
|
|
||||||
pmatch[i].rm_so = new_o;
|
|
||||||
|
|
||||||
@@ -1590,7 +1616,7 @@
|
|
||||||
continue;
|
|
||||||
tmp = string[pmatch[i].rm_eo];
|
|
||||||
string[pmatch[i].rm_eo] = 0;
|
|
||||||
- new_o = mbstrlen(string);
|
|
||||||
+ new_o = real_mbstrlen(string);
|
|
||||||
string[pmatch[i].rm_eo] = tmp;
|
|
||||||
pmatch[i].rm_eo = new_o;
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:8762d46a8107ef86d55ccaa54128331e06e48dbf998515a627caaaa48132ee86
|
|
||||||
size 2548118
|
|
3
mc-4.7.0.7.tar.lzma
Normal file
3
mc-4.7.0.7.tar.lzma
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2bbc8ebb22054e4f761611b5ab850dd9d0260a2d1cf05bb1895b0ea24c9f68a0
|
||||||
|
size 2070363
|
@ -1,25 +1,18 @@
|
|||||||
--- lib/mc.ext.in
|
Index: misc/mc.ext.in
|
||||||
+++ lib/mc.ext.in
|
===================================================================
|
||||||
@@ -115,7 +115,7 @@
|
--- misc/mc.ext.in.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
|
+++ misc/mc.ext.in 2010-07-06 18:46:11.131015545 +0200
|
||||||
|
@@ -115,7 +115,7 @@ regex/\.tar\.bz$
|
||||||
# Open=%cd %p#utar
|
# Open=%cd %p#utar
|
||||||
View=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf -
|
View=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf -
|
||||||
|
|
||||||
-regex/\.t(ar\.bz2|bz|b2)$
|
-regex/\.t(ar\.bz2|bz2?|b2)$
|
||||||
+regex/\.t(ar\.bz2|bz|b2|bz2)$
|
+regex/\.t(ar\.bz2|bz2?|b2|bz2)$
|
||||||
Open=%cd %p#utar
|
Open=%cd %p#utar
|
||||||
View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf -
|
View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf -
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@
|
@@ -391,7 +391,7 @@ shell/.ico
|
||||||
View=%view{ascii} cpio -itv <'%f' 2>/dev/null
|
Include=image
|
||||||
|
|
||||||
# ls-lR
|
|
||||||
-regex/(^|\.)ls-?lR(\.g?z|Z|bz2)?$
|
|
||||||
+regex/(^|\.)ls-?lR(\.(bz2|gz|Z))?$
|
|
||||||
Open=%cd %p#lslR
|
|
||||||
|
|
||||||
# patch
|
|
||||||
@@ -339,7 +339,7 @@
|
|
||||||
View=sxpm %f
|
|
||||||
|
|
||||||
include/image
|
include/image
|
||||||
- Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi
|
- Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi
|
||||||
@ -27,7 +20,7 @@
|
|||||||
View=%view{ascii} identify %f
|
View=%view{ascii} identify %f
|
||||||
#View=%view{ascii} asciiview %f
|
#View=%view{ascii} asciiview %f
|
||||||
|
|
||||||
@@ -357,11 +357,11 @@
|
@@ -409,11 +409,11 @@ regex/\.([wW][aA][wW]22)$
|
||||||
Open=vplay -s 22 %f
|
Open=vplay -s 22 %f
|
||||||
|
|
||||||
regex/\.([mM][pP]3)$
|
regex/\.([mM][pP]3)$
|
||||||
@ -35,13 +28,13 @@
|
|||||||
+ Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else if [ -z "`which realplay`" ]; then (xmms -e %f 1>/dev/null 2>&1 &); else (realplay %f >/dev/null 2>&1 &); fi; fi
|
+ Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else if [ -z "`which realplay`" ]; then (xmms -e %f 1>/dev/null 2>&1 &); else (realplay %f >/dev/null 2>&1 &); fi; fi
|
||||||
View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
|
View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
|
||||||
|
|
||||||
regex/\.([oO][gG][gG])$
|
regex/\.([oO][gG][gG|aA|vV|xX])$
|
||||||
- Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
|
- Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
|
||||||
+ Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms -e %f >/dev/null 2>&1 &); fi
|
+ Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms -e %f >/dev/null 2>&1 &); fi
|
||||||
View=%view{ascii} ogginfo %s
|
View=%view{ascii} ogginfo %s
|
||||||
|
|
||||||
regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
|
regex/\.([sS][pP][xX]|[fF][lL][aA][cC])$
|
||||||
@@ -420,12 +420,12 @@
|
@@ -478,12 +478,12 @@ include/video
|
||||||
|
|
||||||
# Postscript
|
# Postscript
|
||||||
type/^PostScript
|
type/^PostScript
|
||||||
@ -56,7 +49,7 @@
|
|||||||
#Open=(acroread %f &)
|
#Open=(acroread %f &)
|
||||||
#Open=(ghostview %f &)
|
#Open=(ghostview %f &)
|
||||||
View=%view{ascii} pdftotext %f -
|
View=%view{ascii} pdftotext %f -
|
||||||
@@ -440,54 +440,53 @@
|
@@ -498,48 +498,44 @@ regex/\.([hH][tT][mM][lL]?)$
|
||||||
|
|
||||||
# StarOffice 5.2
|
# StarOffice 5.2
|
||||||
shell/.sdw
|
shell/.sdw
|
||||||
@ -79,11 +72,11 @@
|
|||||||
regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
|
regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
|
||||||
- Open=(abiword %f >/dev/null 2>&1 &)
|
- Open=(abiword %f >/dev/null 2>&1 &)
|
||||||
+ Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
+ Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f
|
View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
|
||||||
type/^Microsoft\ Word
|
type/^Microsoft\ Word
|
||||||
- Open=(abiword %f >/dev/null 2>&1 &)
|
- Open=(abiword %f >/dev/null 2>&1 &)
|
||||||
+ Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
+ Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f
|
View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
|
||||||
|
|
||||||
# RTF document
|
# RTF document
|
||||||
regex/\.([rR][tT][fF])$
|
regex/\.([rR][tT][fF])$
|
||||||
@ -115,11 +108,11 @@
|
|||||||
View=%view{ascii} dvi2tty %f
|
View=%view{ascii} dvi2tty %f
|
||||||
|
|
||||||
# TeX
|
# TeX
|
||||||
regex/\.([Tt][Ee][Xx])$
|
@@ -548,7 +544,7 @@ regex/\.([Tt][Ee][Xx])$
|
||||||
Open=%var{EDITOR:vi} %f
|
|
||||||
|
|
||||||
+# DJVU
|
# DjVu
|
||||||
+regex/\.(djvu|DJVU)$
|
regex/\.(djvu|DJVU)$
|
||||||
|
- Open=djview %f &
|
||||||
+ Open=djview %f >/dev/null 2>&1 &
|
+ Open=djview %f >/dev/null 2>&1 &
|
||||||
|
|
||||||
### Miscellaneous ###
|
### Miscellaneous ###
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
--- edit/edit.c
|
|
||||||
+++ edit/edit.c
|
|
||||||
@@ -1808,6 +1808,8 @@
|
|
||||||
c = '0';
|
|
||||||
else if (iswspace (c))
|
|
||||||
c = ' ';
|
|
||||||
+ else if (c > 0xff)
|
|
||||||
+ return 0xFFFFFFFFUL;
|
|
||||||
#endif /* UTF8 */
|
|
||||||
q = strchr (option_chars_move_whole_word, c);
|
|
||||||
if (!q)
|
|
@ -1,52 +0,0 @@
|
|||||||
--- edit/editdraw.c
|
|
||||||
+++ edit/editdraw.c
|
|
||||||
@@ -356,8 +356,13 @@
|
|
||||||
if (use_colors && visible_tabs) {
|
|
||||||
c = (p->style & ~MOD_CURSOR) | MOD_WHITESPACE;
|
|
||||||
if (i > 2) {
|
|
||||||
- p->ch = '<';
|
|
||||||
- p->style |= MOD_WHITESPACE;
|
|
||||||
+ if (p->style & MOD_CURSOR) {
|
|
||||||
+ p->ch = ' ';
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ p->ch = '<';
|
|
||||||
+ p->style |= MOD_WHITESPACE;
|
|
||||||
+ }
|
|
||||||
p++;
|
|
||||||
while (--i > 1) {
|
|
||||||
p->style = c;
|
|
||||||
@@ -380,8 +385,13 @@
|
|
||||||
p++;
|
|
||||||
}
|
|
||||||
} else if (use_colors && visible_tws && q >= tws) {
|
|
||||||
- p->style |= MOD_WHITESPACE;
|
|
||||||
- p->ch = '.';
|
|
||||||
+ if (p->style & MOD_CURSOR) {
|
|
||||||
+ p->ch = ' ';
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ p->style |= MOD_WHITESPACE;
|
|
||||||
+ p->ch = '.';
|
|
||||||
+ }
|
|
||||||
p++;
|
|
||||||
c = p->style & ~MOD_CURSOR;
|
|
||||||
while (--i) {
|
|
||||||
@@ -390,7 +400,7 @@
|
|
||||||
p++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
- p->ch |= ' ';
|
|
||||||
+ p->ch = ' ';
|
|
||||||
c = p->style & ~MOD_CURSOR;
|
|
||||||
p++;
|
|
||||||
while (--i) {
|
|
||||||
@@ -401,7 +411,7 @@
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case ' ':
|
|
||||||
- if (use_colors && visible_tws && q >= tws) {
|
|
||||||
+ if (use_colors && visible_tws && q >= tws && !(p->style & MOD_CURSOR)) {
|
|
||||||
p->ch = '.';
|
|
||||||
p->style |= MOD_WHITESPACE;
|
|
||||||
p++;
|
|
@ -1,11 +1,13 @@
|
|||||||
--- src/util.c
|
Index: lib/util.c
|
||||||
+++ src/util.c
|
===================================================================
|
||||||
@@ -1205,6 +1205,8 @@
|
--- lib/util.c.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
|
+++ lib/util.c 2010-07-06 19:19:06.919536838 +0200
|
||||||
|
@@ -853,6 +853,8 @@ strip_ctrl_codes (char *s)
|
||||||
/* strchr() matches trailing binary 0 */
|
/* strchr() matches trailing binary 0 */
|
||||||
while (*(++r) && strchr ("0123456789;?", *r));
|
while (*(++r) && strchr ("0123456789;?", *r));
|
||||||
}
|
}
|
||||||
+ else if (*r == '(')
|
+ else if (*r == '(')
|
||||||
+ r++;
|
+ r++;
|
||||||
|
else if (*r == ']')
|
||||||
|
{
|
||||||
/*
|
/*
|
||||||
* Now we are at the last character of the sequence.
|
|
||||||
|
137
mc-extensions.patch
Normal file
137
mc-extensions.patch
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
Index: configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- configure.ac.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
|
+++ configure.ac 2010-07-07 14:39:08.919511437 +0200
|
||||||
|
@@ -71,7 +71,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.
|
||||||
|
Index: misc/mc.ext.in
|
||||||
|
===================================================================
|
||||||
|
--- misc/mc.ext.in.orig 2010-07-07 14:39:08.723510066 +0200
|
||||||
|
+++ misc/mc.ext.in 2010-07-07 14:55:35.231010197 +0200
|
||||||
|
@@ -226,8 +226,8 @@ regex/\.rpm$
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# dpkg
|
||||||
|
shell/.debd
|
||||||
|
@@ -399,7 +399,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
|
||||||
|
+ Include=audio
|
||||||
|
+# 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
|
||||||
|
@@ -409,15 +410,22 @@ regex/\.([wW][aA][wW]22)$
|
||||||
|
Open=vplay -s 22 %f
|
||||||
|
|
||||||
|
regex/\.([mM][pP]3)$
|
||||||
|
- Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else if [ -z "`which realplay`" ]; then (xmms -e %f 1>/dev/null 2>&1 &); else (realplay %f >/dev/null 2>&1 &); fi; 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 if [ -z "`which realplay`" ]; then (xmms -e %f 1>/dev/null 2>&1 &); else (realplay %f >/dev/null 2>&1 &); fi; 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|aA|vV|xX])$
|
||||||
|
- Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms -e %f >/dev/null 2>&1 &); fi
|
||||||
|
+ Include=audio
|
||||||
|
+# Open=ogg123 %f
|
||||||
|
+# Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms -e %f >/dev/null 2>&1 &); fi
|
||||||
|
View=%view{ascii} ogginfo %s
|
||||||
|
|
||||||
|
regex/\.([sS][pP][xX]|[fF][lL][aA][cC])$
|
||||||
|
- Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
|
||||||
|
+ Include=audio
|
||||||
|
+# Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
|
||||||
|
|
||||||
|
regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
|
||||||
|
Open=timidity %f
|
||||||
|
@@ -426,11 +434,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 ###
|
||||||
|
@@ -478,12 +490,12 @@ include/video
|
||||||
|
|
||||||
|
# Postscript
|
||||||
|
type/^PostScript
|
||||||
|
- Open=(gv %f >/dev/null 2>&1 &)
|
||||||
|
+ Open=(xdg-open %f >/dev/null 2>&1 &)
|
||||||
|
View=%view{ascii} ps2ascii %f
|
||||||
|
|
||||||
|
# PDF
|
||||||
|
type/^PDF
|
||||||
|
- Open=(xpdf %f >/dev/null 2>&1 &)
|
||||||
|
+ Open=(xdg-open %f >/dev/null 2>&1 &)
|
||||||
|
#Open=(acroread %f &)
|
||||||
|
#Open=(ghostview %f &)
|
||||||
|
View=%view{ascii} pdftotext %f -
|
||||||
|
@@ -511,27 +523,33 @@ shell/.abw
|
||||||
|
|
||||||
|
# Microsoft Word Document
|
||||||
|
type/^Microsoft\ Office\ Document
|
||||||
|
- Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
|
+ Open=(xdg-open %f &)
|
||||||
|
+# Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
|
View=%view{ascii} wvText %f - || strings %f
|
||||||
|
|
||||||
|
type/^Microsoft\ Word
|
||||||
|
- Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
|
+ Open=(xdg-open %f &)
|
||||||
|
+# Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
|
View=%view{ascii} wvText %f - || strings %f
|
||||||
|
|
||||||
|
regex/\.([Dd]ot|DOT|[Ww]ri|WRI)$
|
||||||
|
- Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (OOo %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
|
+ Open=(xdg-open %f &)
|
||||||
|
+# Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (OOo %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
|
View=%view{ascii} wvText %f - || strings %f
|
||||||
|
|
||||||
|
# RTF document
|
||||||
|
regex/\.([rR][tT][fF])$
|
||||||
|
- Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
|
+ Open=(xdg-open %f &)
|
||||||
|
+# Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
|
|
||||||
|
# Microsoft Excel Worksheet
|
||||||
|
regex/\.([xX][lL][sSwW])$
|
||||||
|
- Open=if which gnumeric ; then (gnumeric %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
|
+ Open=(xdg-open %f &)
|
||||||
|
+# Open=if which gnumeric ; then (gnumeric %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
|
View=%view{ascii} xls2csv %f || strings %f
|
||||||
|
type/^Microsoft\ Excel
|
||||||
|
- Open=if which gnumeric ; then (gnumeric %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
|
+ Open=(xdg-open %f &)
|
||||||
|
+# Open=if which gnumeric ; then (gnumeric %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
|
View=%view{ascii} xls2csv %f || strings %f
|
||||||
|
|
||||||
|
# Framemaker
|
@ -1,6 +1,8 @@
|
|||||||
--- src/key.c
|
Index: lib/tty/key.c
|
||||||
+++ src/key.c
|
===================================================================
|
||||||
@@ -234,6 +234,11 @@
|
--- lib/tty/key.c.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
|
+++ lib/tty/key.c 2010-07-07 11:35:25.871011522 +0200
|
||||||
|
@@ -273,6 +273,11 @@ static key_define_t xterm_key_defines[]
|
||||||
{KEY_F (9), ESC_STR "[20~", MCKEY_NOACTION},
|
{KEY_F (9), ESC_STR "[20~", MCKEY_NOACTION},
|
||||||
{KEY_F (10), ESC_STR "[21~", MCKEY_NOACTION},
|
{KEY_F (10), ESC_STR "[21~", MCKEY_NOACTION},
|
||||||
|
|
||||||
|
70
mc-fix_lib_search_path.patch
Normal file
70
mc-fix_lib_search_path.patch
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
Index: m4.include/mc-with-screen-ncurses.m4
|
||||||
|
===================================================================
|
||||||
|
--- m4.include/mc-with-screen-ncurses.m4.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
|
+++ m4.include/mc-with-screen-ncurses.m4 2010-07-07 17:20:37.294701000 +0200
|
||||||
|
@@ -9,7 +9,14 @@ AC_DEFUN([MC_CHECK_NCURSES_BY_PATH], [
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x"$ac_ncurses_lib_path" != x; then
|
||||||
|
- ac_ncurses_lib_path="-L"$ac_ncurses_lib_path
|
||||||
|
+ case $ac_ncurses_lib_path in
|
||||||
|
+ /usr/lib*)
|
||||||
|
+ ac_ncurses_lib_path=""
|
||||||
|
+ ;;
|
||||||
|
+ *)
|
||||||
|
+ ac_ncurses_lib_path="-L"$ac_ncurses_lib_path
|
||||||
|
+ ;;
|
||||||
|
+ esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
saved_CPPFLAGS="$CPPFLAGS"
|
||||||
|
@@ -30,9 +37,6 @@ AC_DEFUN([MC_CHECK_NCURSES_BY_PATH], [
|
||||||
|
if test x"$ac_ncurses_inc_path" = x; then
|
||||||
|
ac_ncurses_inc_path="-I/usr/include"
|
||||||
|
fi
|
||||||
|
- if test x"$ac_ncurses_lib_path" = x; then
|
||||||
|
- ac_ncurses_lib_path="-L/usr/lib"
|
||||||
|
- fi
|
||||||
|
found_ncurses=yes
|
||||||
|
AC_DEFINE(HAVE_NCURSES_NCURSES_H, 1,
|
||||||
|
[Define to 1 if you have the <ncurses/ncurses.h> header file.])
|
||||||
|
Index: m4.include/mc-with-screen-slang.m4
|
||||||
|
===================================================================
|
||||||
|
--- m4.include/mc-with-screen-slang.m4.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
|
+++ m4.include/mc-with-screen-slang.m4 2010-07-07 17:20:13.630862000 +0200
|
||||||
|
@@ -31,7 +31,14 @@ AC_DEFUN([MC_CHECK_SLANG_BY_PATH], [
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x"$param_slang_lib_path" != x; then
|
||||||
|
- ac_slang_lib_path="-L"$param_slang_lib_path
|
||||||
|
+ case $ac_ncurses_lib_path in
|
||||||
|
+ /usr/lib*)
|
||||||
|
+ ac_ncurses_lib_path=""
|
||||||
|
+ ;;
|
||||||
|
+ *)
|
||||||
|
+ ac_slang_lib_path="-L"$param_slang_lib_path
|
||||||
|
+ ;;
|
||||||
|
+ esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
saved_CFLAGS="$CFLAGS"
|
||||||
|
@@ -51,9 +58,6 @@ AC_DEFUN([MC_CHECK_SLANG_BY_PATH], [
|
||||||
|
if test x"$ac_slang_inc_path" = x; then
|
||||||
|
ac_slang_inc_path="-I/usr/include"
|
||||||
|
fi
|
||||||
|
- if test x"$ac_slang_lib_path" = x; then
|
||||||
|
- ac_slang_lib_path="-L/usr/lib"
|
||||||
|
- fi
|
||||||
|
found_slang=yes
|
||||||
|
AC_DEFINE(HAVE_SLANG_H, 1,[Define to use slang.h])
|
||||||
|
|
||||||
|
@@ -68,9 +72,6 @@ AC_DEFUN([MC_CHECK_SLANG_BY_PATH], [
|
||||||
|
if test x"$ac_slang_inc_path" = x; then
|
||||||
|
ac_slang_inc_path="-I/usr/include"
|
||||||
|
fi
|
||||||
|
- if test x"$ac_slang_lib_path" = x; then
|
||||||
|
- ac_slang_lib_path="-L/usr/lib"
|
||||||
|
- fi
|
||||||
|
CFLAGS="-DHAVE_SLANG_SLANG_H $CFLAGS"
|
||||||
|
fi
|
||||||
|
],
|
13
mc-mcviewsegfault.patch
Normal file
13
mc-mcviewsegfault.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Index: src/editor/editwidget.c
|
||||||
|
===================================================================
|
||||||
|
--- src/editor/editwidget.c.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
|
+++ src/editor/editwidget.c 2010-07-07 15:31:11.479082454 +0200
|
||||||
|
@@ -271,7 +271,7 @@ edit_file (const char *_file, int line)
|
||||||
|
const char *
|
||||||
|
edit_get_file_name (const WEdit *edit)
|
||||||
|
{
|
||||||
|
- return edit->filename;
|
||||||
|
+ return edit?edit->filename:NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
@ -1,37 +0,0 @@
|
|||||||
--- src/main.c 2009-10-10 22:21:47.000000000 +0200
|
|
||||||
+++ src/main.c 2009-10-11 12:05:35.000000000 +0200
|
|
||||||
@@ -62,6 +62,7 @@
|
|
||||||
#include "listmode.h"
|
|
||||||
#include "execute.h"
|
|
||||||
#include "ext.h" /* For flush_extension_file() */
|
|
||||||
+#include "fileloc.h"
|
|
||||||
|
|
||||||
/* Listbox for the command history feature */
|
|
||||||
#include "widget.h"
|
|
||||||
@@ -2129,8 +2130,10 @@
|
|
||||||
int
|
|
||||||
main (int argc, char *argv[])
|
|
||||||
{
|
|
||||||
+ struct stat s;
|
|
||||||
/* Check whether we have UTF-8 locale */
|
|
||||||
char *lang = getenv("LANG");
|
|
||||||
+ char *mc_dir;
|
|
||||||
size_t len = 0;
|
|
||||||
|
|
||||||
if ( lang )
|
|
||||||
@@ -2201,6 +2204,15 @@
|
|
||||||
|
|
||||||
init_xterm_support ();
|
|
||||||
|
|
||||||
+ /* create home directory */
|
|
||||||
+ mc_dir = mhl_str_dir_plus_file (home_dir, MC_USERCONF_DIR);
|
|
||||||
+ canonicalize_pathname (mc_dir);
|
|
||||||
+ if ((stat (mc_dir, &s) != 0) && (errno == ENOENT) && mkdir (mc_dir, 0700) != 0)
|
|
||||||
+ message (D_ERROR, _("Warning"),
|
|
||||||
+ _("Cannot create %s directory"), mc_dir);
|
|
||||||
+ g_free (mc_dir);
|
|
||||||
+
|
|
||||||
+
|
|
||||||
#ifdef HAVE_SUBSHELL_SUPPORT
|
|
||||||
|
|
||||||
/* Done here to ensure that the subshell doesn't */
|
|
@ -1,18 +1,24 @@
|
|||||||
http://www.midnight-commander.org/ticket/287
|
http://www.midnight-commander.org/ticket/287
|
||||||
Index: mc-4.6.2/src/key.c
|
Index: lib/tty/key.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- mc-4.6.2.orig/src/key.c 2009-02-01 19:30:21.000000000 +0000
|
--- lib/tty/key.c.orig 2010-07-07 17:32:15.521891000 +0200
|
||||||
+++ mc-4.6.2/src/key.c 2009-02-25 20:16:46.000000000 +0000
|
+++ lib/tty/key.c 2010-07-07 17:32:15.897891000 +0200
|
||||||
@@ -694,6 +694,8 @@
|
@@ -897,10 +897,13 @@ correct_key_code (int code)
|
||||||
/* F0 is the same as F10 for out purposes */
|
mod = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* F0 is the same as F10 for out purposes */
|
||||||
|
+ /* F0 is the same as F10 for our purposes */
|
||||||
if (c == KEY_F (0))
|
if (c == KEY_F (0))
|
||||||
c = KEY_F (10);
|
c = KEY_F (10);
|
||||||
|
|
||||||
+ if (c == KEY_F_IMMUTABLE (0))
|
+ if (c == KEY_F_IMMUTABLE (0))
|
||||||
+ c = KEY_F_IMMUTABLE (10);
|
+ c = KEY_F_IMMUTABLE (10);
|
||||||
|
+
|
||||||
/*
|
/*
|
||||||
* We are not interested if Ctrl was pressed when entering control
|
* We are not interested if Ctrl was pressed when entering control
|
||||||
@@ -765,6 +767,16 @@
|
* characters, so assume that it was. When checking for such keys,
|
||||||
|
@@ -965,6 +968,16 @@ correct_key_code (int code)
|
||||||
mod &= ~KEY_M_SHIFT;
|
mod &= ~KEY_M_SHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,23 +35,20 @@ Index: mc-4.6.2/src/key.c
|
|||||||
if (!alternate_plus_minus)
|
if (!alternate_plus_minus)
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case KEY_KP_ADD:
|
case KEY_KP_ADD:
|
||||||
@@ -917,10 +929,9 @@
|
@@ -1613,7 +1626,7 @@ get_key_code (int no_delay)
|
||||||
this = this->next;
|
if ((parent != NULL) && (parent->action == MCKEY_ESCAPE)) {
|
||||||
else {
|
|
||||||
if (parent != NULL && parent->action == MCKEY_ESCAPE) {
|
|
||||||
-
|
|
||||||
/* Convert escape-digits to F-keys */
|
/* Convert escape-digits to F-keys */
|
||||||
if (isdigit(c))
|
if (g_ascii_isdigit (c))
|
||||||
- c = KEY_F (c - '0');
|
- c = KEY_F (c - '0');
|
||||||
+ c = KEY_F_IMMUTABLE (c - '0');
|
+ c = KEY_F_IMMUTABLE (c - '0');
|
||||||
else if (c == ' ')
|
else if (c == ' ')
|
||||||
c = ESC_CHAR;
|
c = ESC_CHAR;
|
||||||
else
|
else
|
||||||
Index: mc-4.6.2/src/myslang.h
|
Index: lib/tty/tty-slang.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- mc-4.6.2.orig/src/myslang.h 2009-02-25 18:25:29.000000000 +0000
|
--- lib/tty/tty-slang.h.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
+++ mc-4.6.2/src/myslang.h 2009-02-25 18:25:31.000000000 +0000
|
+++ lib/tty/tty-slang.h 2010-07-07 17:33:45.962779000 +0200
|
||||||
@@ -29,6 +29,7 @@
|
@@ -16,6 +16,7 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define KEY_F(x) (1000 + x)
|
#define KEY_F(x) (1000 + x)
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
--- po/LINGUAS
|
|
||||||
+++ po/LINGUAS
|
|
||||||
@@ -1,3 +1,3 @@
|
|
||||||
# List of available translations.
|
|
||||||
-az be bg ca cs da de el es eu fi fr hu it ja ko lt lv mn nl no pl
|
|
||||||
+az be bg ca cs da de el es eu fi fr hu it ja ko lt lv mn nl nb pl
|
|
||||||
pt pt_BR ro ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW
|
|
@ -1,8 +1,10 @@
|
|||||||
--- mc-4.6.2/lib/mc.menu
|
Index: misc/mc.menu
|
||||||
+++ mc-4.6.2/lib/mc.menu
|
===================================================================
|
||||||
@@ -186,6 +186,33 @@
|
--- misc/mc.menu.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
|
+++ misc/mc.menu 2010-07-06 18:50:29.444518504 +0200
|
||||||
|
@@ -222,6 +222,33 @@ U Uudecode marked news articles (n
|
||||||
fi
|
fi
|
||||||
echo "Please test the output file before deleting anything"
|
echo "Please test the output file before deleting anything."
|
||||||
|
|
||||||
++ & t r & ! t t
|
++ & t r & ! t t
|
||||||
+m Install as MEMO on palm pilot
|
+m Install as MEMO on palm pilot
|
||||||
@ -31,6 +33,6 @@
|
|||||||
+ done
|
+ done
|
||||||
+ pilot-xfer -i %t
|
+ pilot-xfer -i %t
|
||||||
+
|
+
|
||||||
=+ f \.tar\.gz$ | f \.tar\.z$ | f \.tgz$ | f \.tpz$ | f \.tar\.Z$| f \.tar\.bz2$ & t r
|
=+ f \.tar\.gz$ | f \.tar\.z$ | f \.tgz$ | f \.tpz$ | f \.tar\.lz$ | f \.tar\.lzma$ | f \.tar\.7z$ | f \.tar\.xz$ | f \.tar\.Z$ | f \.tar\.bz2$ & t r
|
||||||
x Extract the contents of a compressed tar file
|
x Extract the contents of a compressed tar file
|
||||||
unset EXT
|
unset PRG
|
||||||
|
@ -1,97 +0,0 @@
|
|||||||
From 9769c0eeffbc48a029e7b572f17510ba30d730ac Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mikhail S. Pobolovets <styx.mp@gmail.com>
|
|
||||||
Date: Mon, 26 Jan 2009 16:56:55 +0200
|
|
||||||
Subject: [PATCH] Port number in shell link can be specified now
|
|
||||||
|
|
||||||
vfs/ChangeLog:
|
|
||||||
|
|
||||||
* fish.c: Iterpret SUP.flags as port number if SUP.flags is not in
|
|
||||||
* 0, FISH_FLAG_COMPRESSED and FISH_FLAG_RSH. Weakness: port number
|
|
||||||
|
|
||||||
Originally by Andrew V. Samoilov <sav>
|
|
||||||
|
|
||||||
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
|
|
||||||
---
|
|
||||||
vfs/fish.c | 41 ++++++++++++++++++++++++++++-------------
|
|
||||||
1 files changed, 28 insertions(+), 13 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/vfs/fish.c b/vfs/fish.c
|
|
||||||
index 63e4d60..a407e71 100644
|
|
||||||
--- a/vfs/fish.c
|
|
||||||
+++ b/vfs/fish.c
|
|
||||||
@@ -213,13 +213,22 @@ static int
|
|
||||||
fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super)
|
|
||||||
{
|
|
||||||
{
|
|
||||||
- const char *argv[10];
|
|
||||||
+ char gbuf[10];
|
|
||||||
+ const char *argv[10]; /* All of 10 is used now */
|
|
||||||
const char *xsh = (SUP.flags == FISH_FLAG_RSH ? "rsh" : "ssh");
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
argv[i++] = xsh;
|
|
||||||
if (SUP.flags == FISH_FLAG_COMPRESSED)
|
|
||||||
argv[i++] = "-C";
|
|
||||||
+
|
|
||||||
+ if (SUP.flags > FISH_FLAG_RSH)
|
|
||||||
+ {
|
|
||||||
+ argv[i++] = "-p";
|
|
||||||
+ g_snprintf (gbuf, sizeof (gbuf), "%d", SUP.flags);
|
|
||||||
+ argv[i++] = gbuf;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
argv[i++] = "-l";
|
|
||||||
argv[i++] = SUP.user;
|
|
||||||
argv[i++] = SUP.host;
|
|
||||||
@@ -317,7 +326,7 @@ fish_open_archive (struct vfs_class *me, struct vfs_s_super *super,
|
|
||||||
SUP.user = user;
|
|
||||||
SUP.flags = flags;
|
|
||||||
if (!strncmp (op, "rsh:", 4))
|
|
||||||
- SUP.flags |= FISH_FLAG_RSH;
|
|
||||||
+ SUP.flags = FISH_FLAG_RSH;
|
|
||||||
SUP.cwdir = NULL;
|
|
||||||
if (password)
|
|
||||||
SUP.password = password;
|
|
||||||
@@ -936,22 +945,28 @@ static void
|
|
||||||
fish_fill_names (struct vfs_class *me, fill_names_f func)
|
|
||||||
{
|
|
||||||
struct vfs_s_super *super = MEDATA->supers;
|
|
||||||
- const char *flags;
|
|
||||||
char *name;
|
|
||||||
-
|
|
||||||
- while (super){
|
|
||||||
- switch (SUP.flags & (FISH_FLAG_RSH | FISH_FLAG_COMPRESSED)) {
|
|
||||||
- case FISH_FLAG_RSH:
|
|
||||||
+
|
|
||||||
+ char gbuf[10];
|
|
||||||
+
|
|
||||||
+ while (super)
|
|
||||||
+ {
|
|
||||||
+ const char *flags = "";
|
|
||||||
+ switch (SUP.flags)
|
|
||||||
+ {
|
|
||||||
+ case FISH_FLAG_RSH:
|
|
||||||
flags = ":r";
|
|
||||||
break;
|
|
||||||
- case FISH_FLAG_COMPRESSED:
|
|
||||||
+ case FISH_FLAG_COMPRESSED:
|
|
||||||
flags = ":C";
|
|
||||||
break;
|
|
||||||
- case FISH_FLAG_RSH | FISH_FLAG_COMPRESSED:
|
|
||||||
- flags = "";
|
|
||||||
- break;
|
|
||||||
- default:
|
|
||||||
- flags = "";
|
|
||||||
+ default:
|
|
||||||
+ if (SUP.flags > FISH_FLAG_RSH)
|
|
||||||
+ {
|
|
||||||
+ break;
|
|
||||||
+ g_snprintf (gbuf, sizeof (gbuf), ":%d", SUP.flags);
|
|
||||||
+ flags = gbuf;
|
|
||||||
+ }
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
1.5.6.3
|
|
||||||
|
|
65
mc-rpm.patch
65
mc-rpm.patch
@ -1,6 +1,8 @@
|
|||||||
--- syntax/spec.syntax
|
Index: misc/syntax/spec.syntax
|
||||||
+++ syntax/spec.syntax
|
===================================================================
|
||||||
@@ -11,6 +11,7 @@
|
--- misc/syntax/spec.syntax.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
|
+++ misc/syntax/spec.syntax 2010-07-06 19:24:41.303406337 +0200
|
||||||
|
@@ -12,6 +12,7 @@ context default
|
||||||
keyword whole Description: green
|
keyword whole Description: green
|
||||||
keyword whole Distribution: green
|
keyword whole Distribution: green
|
||||||
keyword whole Doc\{Dd\}ir: green
|
keyword whole Doc\{Dd\}ir: green
|
||||||
@ -8,7 +10,7 @@
|
|||||||
keyword whole Epoch: green
|
keyword whole Epoch: green
|
||||||
keyword whole Exclude\{Aa\}rch: green
|
keyword whole Exclude\{Aa\}rch: green
|
||||||
keyword whole Exclusive\{Aa\}rch: green
|
keyword whole Exclusive\{Aa\}rch: green
|
||||||
@@ -27,16 +28,19 @@
|
@@ -27,6 +28,7 @@ context default
|
||||||
keyword whole Prefix: green
|
keyword whole Prefix: green
|
||||||
keyword whole Pre\{Rr\}eq: green
|
keyword whole Pre\{Rr\}eq: green
|
||||||
keyword whole Provides: green
|
keyword whole Provides: green
|
||||||
@ -16,37 +18,24 @@
|
|||||||
keyword whole Release: green
|
keyword whole Release: green
|
||||||
keyword whole Requires: green
|
keyword whole Requires: green
|
||||||
keyword whole Requires(\[abcdefghijklmnopqrstuvwxyz\]): green
|
keyword whole Requires(\[abcdefghijklmnopqrstuvwxyz\]): green
|
||||||
keyword whole Root: green
|
@@ -35,6 +37,7 @@ context default
|
||||||
keyword whole Serial: white
|
|
||||||
keyword whole Source\[0123456789\]: green
|
keyword whole Source\[0123456789\]: green
|
||||||
+ keyword whole Suggests: green
|
keyword whole Suggests: green
|
||||||
keyword whole Summary: green
|
keyword whole Summary: green
|
||||||
keyword whole Summary(\[abcdefghijklmnopqrstuvwxyz\]): green
|
|
||||||
keyword whole Summary(\[abcdefghijklmnopqrstuvwxyz\]_\[ABCDEFGHIJKLMNOPQRSTUVWXYZ\]): green
|
|
||||||
keyword whole Summary(\[abcdefghijklmnopqrstuvwxyz\]_\[ABCDEFGHIJKLMNOPQRSTUVWXYZ\].\[ABCDEFGHIJKLMNOPQRSTUVWXYZ-1234567890\]): green
|
|
||||||
+ keyword whole Supplements: green
|
+ keyword whole Supplements: green
|
||||||
keyword whole Vendor: green
|
keyword whole Vendor: green
|
||||||
keyword whole Version: green
|
keyword whole Version: green
|
||||||
keyword whole U\{Rr\}\{Ll\}: green
|
keyword whole U\{Rr\}\{Ll\}: green
|
||||||
--- vfs/extfs/rpm
|
Index: lib/vfs/mc-vfs/extfs/rpm
|
||||||
+++ vfs/extfs/rpm
|
===================================================================
|
||||||
@@ -118,6 +118,14 @@
|
--- lib/vfs/mc-vfs/extfs/rpm.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
if test "$MCFASTRPM" != 0 ; then
|
+++ lib/vfs/mc-vfs/extfs/rpm 2010-07-07 11:31:08.411018868 +0200
|
||||||
$RPM -qp --qf "[%{REQUIRENAME}\n]" "$f" | grep "(none)" > /dev/null ||
|
@@ -154,8 +154,14 @@ mcrpmfs_list_fastRPM ()
|
||||||
|
echo "$FILEPREF 0 $DATE INFO/EPOCH"
|
||||||
|
echo "$FILEPREF 0 $DATE INFO/LICENSE"
|
||||||
echo "$FILEPREF 0 $DATE INFO/REQUIRENAME"
|
echo "$FILEPREF 0 $DATE INFO/REQUIRENAME"
|
||||||
+ $RPM -qp --qf "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" "$f" | grep "(none)" > /dev/null ||
|
|
||||||
+ echo "$FILEPREF 0 $DATE INFO/ENHANCES"
|
+ echo "$FILEPREF 0 $DATE INFO/ENHANCES"
|
||||||
+ $RPM -qp --qf "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" "$f" | grep "(none)" > /dev/null ||
|
|
||||||
+ echo "$FILEPREF 0 $DATE INFO/SUGGESTS"
|
+ echo "$FILEPREF 0 $DATE INFO/SUGGESTS"
|
||||||
+ $RPM -qp --qf "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" "$f" | grep "(none)" > /dev/null ||
|
|
||||||
+ echo "$FILEPREF 0 $DATE INFO/ENHANCES"
|
|
||||||
+ $RPM -qp --qf "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" "$f" | grep "(none)" > /dev/null ||
|
|
||||||
+ echo "$FILEPREF 0 $DATE INFO/SUGGESTS"
|
|
||||||
$RPM -qp --qf "[%{OBSOLETES}\n]" "$f" | grep "(none)" > /dev/null ||
|
|
||||||
echo "$FILEPREF 0 $DATE INFO/OBSOLETES"
|
|
||||||
$RPM -qp --qf "[%{PROVIDES}\n]" "$f" | grep "(none)" > /dev/null ||
|
|
||||||
@@ -130,6 +138,10 @@
|
|
||||||
echo "$FILEPREF 0 $DATE INFO/REQUIRENAME"
|
|
||||||
echo "$FILEPREF 0 $DATE INFO/OBSOLETES"
|
echo "$FILEPREF 0 $DATE INFO/OBSOLETES"
|
||||||
echo "$FILEPREF 0 $DATE INFO/PROVIDES"
|
echo "$FILEPREF 0 $DATE INFO/PROVIDES"
|
||||||
+ echo "$FILEPREF 0 $DATE INFO/ENHANCES"
|
+ echo "$FILEPREF 0 $DATE INFO/ENHANCES"
|
||||||
@ -55,15 +44,15 @@
|
|||||||
+ echo "$FILEPREF 0 $DATE INFO/SUPPLEMENTS"
|
+ echo "$FILEPREF 0 $DATE INFO/SUPPLEMENTS"
|
||||||
echo "$FILEPREF 0 $DATE INFO/CONFLICTS"
|
echo "$FILEPREF 0 $DATE INFO/CONFLICTS"
|
||||||
echo "$FILEPREF 0 $DATE INFO/CHANGELOG"
|
echo "$FILEPREF 0 $DATE INFO/CHANGELOG"
|
||||||
fi
|
}
|
||||||
@@ -162,6 +174,10 @@
|
@@ -273,6 +279,10 @@ mcrpmfs_copyout ()
|
||||||
INFO/LICENSE) $RPM -qp --qf "%{LICENSE}\n" "$f" >"$3"; exit 0;;
|
INFO/LICENSE) mcrpmfs_getOneTag "LICENSE" >"$2"; exit 0;;
|
||||||
INFO/RPMVERSION) $RPM -qp --qf "%{RPMVERSION}\n" "$f" >"$3"; exit 0;;
|
INFO/RPMVERSION) mcrpmfs_getRawOneTag "%{RPMVERSION}\n" >"$2"; exit 0;;
|
||||||
INFO/REQUIRENAME) $RPM -qp --qf "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" "$f" >"$3"; exit 0;;
|
INFO/REQUIRENAME) mcrpmfs_getRawOneTag "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" >"$2"; exit 0;;
|
||||||
+ INFO/ENHANCES) $RPM -qp --qf "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" "$f" >"$3"; exit 0;;
|
+ INFO/ENHANCES) mcrpmfs_getRawOneTag "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" "$f" >"$3"; exit 0;;
|
||||||
+ INFO/SUGGESTS) $RPM -qp --qf "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" "$f" >"$3"; exit 0;;
|
+ INFO/SUGGESTS) mcrpmfs_getRawOneTag "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" "$f" >"$3"; exit 0;;
|
||||||
+ INFO/RECOMMENDS) $RPM -qp --qf "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" "$f" >"$3"; exit 0;;
|
+ INFO/RECOMMENDS) mcrpmfs_getRawOneTag "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" "$f" >"$3"; exit 0;;
|
||||||
+ INFO/SUPPLEMENTS) $RPM -qp --qf "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" "$f" >"$3"; exit 0;;
|
+ INFO/SUPPLEMENTS) mcrpmfs_getRawOneTag "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" "$f" >"$3"; exit 0;;
|
||||||
INFO/PROVIDES) $RPM -qp --qf "[%{PROVIDES}\n]" "$f" >"$3"; exit 0;;
|
INFO/PROVIDES) mcrpmfs_getRawOneTag "[%{PROVIDES}\n]" >"$2"; exit 0;;
|
||||||
INFO/SCRIPTS/PREIN) $RPM -qp --qf "%{RPMTAG_PREIN}\n" "$f" >"$3"; exit 0;;
|
INFO/SCRIPTS/PREIN) mcrpmfs_getRawOneTag "%{RPMTAG_PREIN}\n" >"$2"; exit 0;;
|
||||||
INFO/SCRIPTS/POSTIN) $RPM -qp --qf "%{RPMTAG_POSTIN}\n" "$f" >"$3"; exit 0;;
|
INFO/SCRIPTS/POSTIN) mcrpmfs_getRawOneTag "%{RPMTAG_POSTIN}\n" >"$2"; exit 0;;
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
--- syntax/Syntax
|
Index: misc/syntax/Syntax
|
||||||
+++ syntax/Syntax
|
===================================================================
|
||||||
@@ -79,7 +79,7 @@
|
--- misc/syntax/Syntax.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
|
+++ misc/syntax/Syntax 2010-07-06 19:13:17.207010626 +0200
|
||||||
|
@@ -85,7 +85,7 @@ include texinfo.syntax
|
||||||
file ..\*\\.c$ C\sProgram
|
file ..\*\\.c$ C\sProgram
|
||||||
include c.syntax
|
include c.syntax
|
||||||
|
|
||||||
-file ..\*\\.([hC]|CC|cxx|cc|cpp|CPP|CXX|hxx|h\.in)$ C/C\+\+\sProgram
|
-file ..\*\\.([hC]|CC|cxx|cc|cpp|CPP|CXX|hxx|hh|hpp|h\.in)$ C/C\+\+\sProgram
|
||||||
+file ..\*\\.([hC]|CC|cxx|cc|cpp|CPP|CXX|hxx|hpp|HPP|h\.in)$ C/C\+\+\sProgram
|
+file ..\*\\.([hC]|CC|cxx|cc|cpp|CPP|CXX|hxx|hh|hpp|HPP|h\.in)$ C/C\+\+\sProgram
|
||||||
include cxx.syntax
|
include cxx.syntax
|
||||||
|
|
||||||
file ..\*\\.d$ D\sProgram
|
file ..\*\\.d$ D\sProgram
|
||||||
|
@ -1,206 +0,0 @@
|
|||||||
Index: mc-4.6.2~git20080311/src/main.c
|
|
||||||
================================================================================
|
|
||||||
--- mc-4.6.2/src/main.c
|
|
||||||
+++ mc-4.6.2/src/main.c
|
|
||||||
@@ -276,6 +276,9 @@
|
|
||||||
/* The user's shell */
|
|
||||||
const char *shell = NULL;
|
|
||||||
|
|
||||||
+/* Is the LANG UTF-8 ? */
|
|
||||||
+gboolean is_utf8 = FALSE;
|
|
||||||
+
|
|
||||||
/* mc_home: The home of MC */
|
|
||||||
char *mc_home = NULL;
|
|
||||||
|
|
||||||
@@ -2126,6 +2129,16 @@
|
|
||||||
int
|
|
||||||
main (int argc, char *argv[])
|
|
||||||
{
|
|
||||||
+ /* Check whether we have UTF-8 locale */
|
|
||||||
+ char *lang = getenv("LANG");
|
|
||||||
+ size_t len = 0;
|
|
||||||
+
|
|
||||||
+ if ( lang )
|
|
||||||
+ len = strlen(lang);
|
|
||||||
+
|
|
||||||
+ if ( len >= 5 && !strcasecmp(&lang[len-5],"UTF-8") )
|
|
||||||
+ is_utf8 = TRUE;
|
|
||||||
+
|
|
||||||
/* We had LC_CTYPE before, LC_ALL includs LC_TYPE as well */
|
|
||||||
setlocale (LC_ALL, "");
|
|
||||||
bindtextdomain ("mc", LOCALEDIR);
|
|
||||||
--- mc-4.6.2/src/main.h
|
|
||||||
+++ mc-4.6.2/src/main.h
|
|
||||||
@@ -69,6 +69,7 @@
|
|
||||||
extern int only_leading_plus_minus;
|
|
||||||
extern int output_starts_shell;
|
|
||||||
extern int midnight_shutdown;
|
|
||||||
+extern gboolean is_utf8;
|
|
||||||
extern char cmd_buf [512];
|
|
||||||
extern const char *shell;
|
|
||||||
|
|
||||||
--- mc-4.6.2/src/screen.c
|
|
||||||
+++ mc-4.6.2/src/screen.c
|
|
||||||
@@ -892,6 +892,9 @@
|
|
||||||
}
|
|
||||||
#endif /* HAVE_SLANG */
|
|
||||||
|
|
||||||
+ vscrollbar (panel->widget, panel->widget.lines, panel->widget.cols-1, 2, 2,
|
|
||||||
+ panel->selected, panel->count, TRUE);
|
|
||||||
+
|
|
||||||
if (panel->active)
|
|
||||||
attrset (REVERSE_COLOR);
|
|
||||||
|
|
||||||
@@ -1493,7 +1496,7 @@
|
|
||||||
panel->dirty = 1;
|
|
||||||
|
|
||||||
/* Status needn't to be split */
|
|
||||||
- usable_columns = ((panel->widget.cols-2)/((isstatus)
|
|
||||||
+ usable_columns = ((panel->widget.cols-3)/((isstatus)
|
|
||||||
? 1
|
|
||||||
: (panel->split+1))) - (!isstatus && panel->split);
|
|
||||||
|
|
||||||
--- mc-4.6.2/src/widget.c
|
|
||||||
+++ mc-4.6.2/src/widget.c
|
|
||||||
@@ -1944,52 +1944,86 @@
|
|
||||||
return in;
|
|
||||||
}
|
|
||||||
|
|
||||||
-
|
|
||||||
-/* Listbox widget */
|
|
||||||
+/* Vertical scrollbar widget */
|
|
||||||
|
|
||||||
-/* Should draw the scrollbar, but currently draws only
|
|
||||||
- * indications that there is more information
|
|
||||||
- */
|
|
||||||
-static int listbox_cdiff (WLEntry *s, WLEntry *e);
|
|
||||||
-
|
|
||||||
-static void
|
|
||||||
-listbox_drawscroll (WListbox *l)
|
|
||||||
+void
|
|
||||||
+vscrollbar (Widget widget, int height, int width, int tpad, int bpad,
|
|
||||||
+ int selected, int count, gboolean color)
|
|
||||||
{
|
|
||||||
int line;
|
|
||||||
- int i, top;
|
|
||||||
- int max_line = l->height-1;
|
|
||||||
-
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
/* Are we at the top? */
|
|
||||||
- widget_move (&l->widget, 0, l->width);
|
|
||||||
- if (l->list == l->top)
|
|
||||||
- one_vline ();
|
|
||||||
+ widget_move (&widget, tpad, width);
|
|
||||||
+#ifndef UTF8
|
|
||||||
+ if (!selected)
|
|
||||||
+ one_vline ();
|
|
||||||
else
|
|
||||||
- addch ('^');
|
|
||||||
+ addch ('^');
|
|
||||||
+#else
|
|
||||||
+ if (color) attrset (MARKED_COLOR);
|
|
||||||
+ if (is_utf8)
|
|
||||||
+ SLsmg_write_string("▴");
|
|
||||||
+ else
|
|
||||||
+ addch ('^');
|
|
||||||
+ if (color) attrset (NORMAL_COLOR);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* Are we at the bottom? */
|
|
||||||
- widget_move (&l->widget, max_line, l->width);
|
|
||||||
- top = listbox_cdiff (l->list, l->top);
|
|
||||||
- if ((top + l->height == l->count) || l->height >= l->count)
|
|
||||||
- one_vline ();
|
|
||||||
+ widget_move (&widget, height-1-bpad, width);
|
|
||||||
+#ifndef UTF8
|
|
||||||
+ if (selected == count-1)
|
|
||||||
+ one_vline ();
|
|
||||||
+ else
|
|
||||||
+ addch ('v');
|
|
||||||
+#else
|
|
||||||
+ if (color) attrset (MARKED_COLOR);
|
|
||||||
+ if (is_utf8)
|
|
||||||
+ SLsmg_write_string("▾");
|
|
||||||
else
|
|
||||||
- addch ('v');
|
|
||||||
+ addch('v');
|
|
||||||
+ if (color) attrset (NORMAL_COLOR);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* Now draw the nice relative pointer */
|
|
||||||
- if (l->count)
|
|
||||||
- line = 1+ ((l->pos * (l->height-2)) / l->count);
|
|
||||||
+ if (count > 1)
|
|
||||||
+ line = tpad + 1 + ((selected * (height-3-tpad-bpad)) / (count-1));
|
|
||||||
else
|
|
||||||
- line = 0;
|
|
||||||
-
|
|
||||||
- for (i = 1; i < max_line; i++){
|
|
||||||
- widget_move (&l->widget, i, l->width);
|
|
||||||
- if (i != line)
|
|
||||||
- one_vline ();
|
|
||||||
- else
|
|
||||||
- addch ('*');
|
|
||||||
+ line = 0;
|
|
||||||
+
|
|
||||||
+ for (i = tpad + 1; i < height-1-bpad; i++){
|
|
||||||
+ widget_move (&widget, i, width);
|
|
||||||
+ if (i != line)
|
|
||||||
+#ifndef UTF8
|
|
||||||
+ one_vline ();
|
|
||||||
+ else
|
|
||||||
+ addch ('*');
|
|
||||||
+#else
|
|
||||||
+ if (is_utf8)
|
|
||||||
+ SLsmg_write_string("▒");
|
|
||||||
+ else
|
|
||||||
+ one_vline();
|
|
||||||
+ else {
|
|
||||||
+ if (color) attrset (MARKED_COLOR);
|
|
||||||
+ if (is_utf8)
|
|
||||||
+ SLsmg_write_string("◈");
|
|
||||||
+ else
|
|
||||||
+ addch('*');
|
|
||||||
+ if (color) attrset (NORMAL_COLOR);
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-
|
|
||||||
-static void
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+/* Listbox widget */
|
|
||||||
+
|
|
||||||
+/* Should draw the scrollbar, but currently draws only
|
|
||||||
+ * indications that there is more information
|
|
||||||
+ */
|
|
||||||
+static int listbox_cdiff (WLEntry *s, WLEntry *e);
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
listbox_draw (WListbox *l, int focused)
|
|
||||||
{
|
|
||||||
WLEntry *e;
|
|
||||||
@@ -2032,7 +2066,7 @@
|
|
||||||
if (!l->scrollbar)
|
|
||||||
return;
|
|
||||||
attrset (normalc);
|
|
||||||
- listbox_drawscroll (l);
|
|
||||||
+ vscrollbar (l->widget, l->height, l->width, 0, 0, l->pos, l->count, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Returns the number of items between s and e,
|
|
||||||
--- mc-4.6.2/src/widget.h
|
|
||||||
+++ mc-4.6.2/src/widget.h
|
|
||||||
@@ -187,6 +187,10 @@
|
|
||||||
/* Listbox manager */
|
|
||||||
WLEntry *listbox_get_data (WListbox *l, int pos);
|
|
||||||
|
|
||||||
+/* Vertical scrollbar */
|
|
||||||
+void vscrollbar (Widget widget, int height, int width, int tpad, int bpad,
|
|
||||||
+ int selected, int count, gboolean color);
|
|
||||||
+
|
|
||||||
/* search text int listbox entries */
|
|
||||||
WLEntry *listbox_search_text (WListbox *l, const char *text);
|
|
||||||
void listbox_select_entry (WListbox *l, WLEntry *dest);
|
|
@ -1,11 +0,0 @@
|
|||||||
--- src/screen.c
|
|
||||||
+++ src/screen.c
|
|
||||||
@@ -671,7 +671,7 @@
|
|
||||||
SLsmg_write_nwchars (((wchar_t *) buffer)
|
|
||||||
+ txtlen - n2, n2);
|
|
||||||
} else
|
|
||||||
- SLsmg_write_nwchars ((wchar_t *) buffer, len);
|
|
||||||
+ SLsmg_write_nwchars ((wchar_t *) buffer + still, len);
|
|
||||||
} else {
|
|
||||||
printw ("%*s", still, "");
|
|
||||||
SLsmg_write_nwchars ((wchar_t *) buffer, txtlen);
|
|
@ -1,20 +0,0 @@
|
|||||||
--- mc-4.6.2/slang/slcommon.c
|
|
||||||
+++ mc-4.6.2/slang/slcommon.c
|
|
||||||
@@ -31,7 +31,7 @@
|
|
||||||
# include <locale.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#ifdef HAVE_LANGINFO_H
|
|
||||||
+#ifdef HAVE_LANGINFO_CODESET
|
|
||||||
# include <langinfo.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@
|
|
||||||
|
|
||||||
(void) setlocale (LC_ALL, "");
|
|
||||||
|
|
||||||
-#ifdef HAVE_NL_LANGINFO_CODESET
|
|
||||||
+#ifdef HAVE_LANGINFO_CODESET
|
|
||||||
locale = nl_langinfo (CODESET);
|
|
||||||
if ((locale != NULL) && (*locale))
|
|
||||||
{
|
|
140
mc-utf8.patch
140
mc-utf8.patch
@ -1,5 +1,5 @@
|
|||||||
--- mc-4.6.2/acinclude.m4
|
--- acinclude.m4
|
||||||
+++ mc-4.6.2/acinclude.m4
|
+++ acinclude.m4
|
||||||
@@ -399,14 +399,14 @@
|
@@ -399,14 +399,14 @@
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -23,8 +23,8 @@
|
|||||||
|
|
||||||
if test x$with_screen = xslang; then
|
if test x$with_screen = xslang; then
|
||||||
AC_DEFINE(HAVE_SYSTEM_SLANG, 1,
|
AC_DEFINE(HAVE_SYSTEM_SLANG, 1,
|
||||||
--- mc-4.6.2/edit/edit-widget.h
|
--- src/editor/edit-widget.h
|
||||||
+++ mc-4.6.2/edit/edit-widget.h
|
+++ src/editor/edit-widget.h
|
||||||
@@ -30,6 +30,11 @@
|
@@ -30,6 +30,11 @@
|
||||||
long command;
|
long command;
|
||||||
} edit_key_map_type;
|
} edit_key_map_type;
|
||||||
@ -64,8 +64,8 @@
|
|||||||
unsigned long stack_size;
|
unsigned long stack_size;
|
||||||
unsigned long stack_size_mask;
|
unsigned long stack_size_mask;
|
||||||
unsigned long stack_bottom;
|
unsigned long stack_bottom;
|
||||||
--- mc-4.6.2/edit/edit.c
|
--- src/editor/edit.c
|
||||||
+++ mc-4.6.2/edit/edit.c
|
+++ src/editor/edit.c
|
||||||
@@ -105,7 +105,11 @@
|
@@ -105,7 +105,11 @@
|
||||||
|
|
||||||
static void user_menu (WEdit *edit);
|
static void user_menu (WEdit *edit);
|
||||||
@ -767,8 +767,8 @@
|
|||||||
if (edit->overwrite) {
|
if (edit->overwrite) {
|
||||||
if (edit_get_byte (edit, edit->curs1) != '\n')
|
if (edit_get_byte (edit, edit->curs1) != '\n')
|
||||||
edit_delete (edit);
|
edit_delete (edit);
|
||||||
--- mc-4.6.2/edit/edit.h
|
--- src/editor/edit.h
|
||||||
+++ mc-4.6.2/edit/edit.h
|
+++ src/editor/edit.h
|
||||||
@@ -25,6 +25,27 @@
|
@@ -25,6 +25,27 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -861,8 +861,8 @@
|
|||||||
|
|
||||||
#define get_sys_error(s) (s)
|
#define get_sys_error(s) (s)
|
||||||
|
|
||||||
--- mc-4.6.2/edit/editcmd.c
|
--- src/editor/editcmd.c
|
||||||
+++ mc-4.6.2/edit/editcmd.c
|
+++ src/editor/editcmd.c
|
||||||
@@ -60,7 +60,7 @@
|
@@ -60,7 +60,7 @@
|
||||||
#include "../src/selcodepage.h"
|
#include "../src/selcodepage.h"
|
||||||
|
|
||||||
@ -1947,8 +1947,8 @@
|
|||||||
|
|
||||||
if (num_compl > 0) {
|
if (num_compl > 0) {
|
||||||
/* insert completed word if there is only one match */
|
/* insert completed word if there is only one match */
|
||||||
--- mc-4.6.2/edit/editdraw.c
|
--- src/editor/editdraw.c
|
||||||
+++ mc-4.6.2/edit/editdraw.c
|
+++ src/editor/editdraw.c
|
||||||
@@ -71,11 +71,16 @@
|
@@ -71,11 +71,16 @@
|
||||||
* as decimal and as hex.
|
* as decimal and as hex.
|
||||||
*/
|
*/
|
||||||
@ -2221,8 +2221,8 @@
|
|||||||
|
|
||||||
print_to_widget (edit, row, start_col, start_col_real, end_col, line);
|
print_to_widget (edit, row, start_col, start_col_real, end_col, line);
|
||||||
}
|
}
|
||||||
--- mc-4.6.2/edit/editkeys.c
|
--- src/editor/editkeys.c
|
||||||
+++ mc-4.6.2/edit/editkeys.c
|
+++ src/editor/editkeys.c
|
||||||
@@ -183,10 +183,10 @@
|
@@ -183,10 +183,10 @@
|
||||||
* 'command' is one of the editor commands from editcmddef.h.
|
* 'command' is one of the editor commands from editcmddef.h.
|
||||||
*/
|
*/
|
||||||
@ -2277,8 +2277,8 @@
|
|||||||
/* unchanged, key has no function here */
|
/* unchanged, key has no function here */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
--- mc-4.6.2/edit/editwidget.c
|
--- src/editor/editwidget.c
|
||||||
+++ mc-4.6.2/edit/editwidget.c
|
+++ src/editor/editwidget.c
|
||||||
@@ -333,7 +333,8 @@
|
@@ -333,7 +333,8 @@
|
||||||
|
|
||||||
case WIDGET_KEY:
|
case WIDGET_KEY:
|
||||||
@ -2289,8 +2289,8 @@
|
|||||||
|
|
||||||
/* The user may override the access-keys for the menu bar. */
|
/* The user may override the access-keys for the menu bar. */
|
||||||
if (edit_translate_key (e, parm, &cmd, &ch)) {
|
if (edit_translate_key (e, parm, &cmd, &ch)) {
|
||||||
--- mc-4.6.2/edit/wordproc.c
|
--- src/editor/wordproc.c
|
||||||
+++ mc-4.6.2/edit/wordproc.c
|
+++ src/editor/wordproc.c
|
||||||
@@ -40,7 +40,12 @@
|
@@ -40,7 +40,12 @@
|
||||||
|
|
||||||
#define tab_width option_tab_spacing
|
#define tab_width option_tab_spacing
|
||||||
@ -2510,8 +2510,8 @@
|
|||||||
g_free (t);
|
g_free (t);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
--- mc-4.6.2/src/achown.c
|
--- src/achown.c
|
||||||
+++ mc-4.6.2/src/achown.c
|
+++ src/achown.c
|
||||||
@@ -585,6 +585,12 @@
|
@@ -585,6 +585,12 @@
|
||||||
b_att[2] = button_new (XTRACT (6));
|
b_att[2] = button_new (XTRACT (6));
|
||||||
b_user = button_new (XTRACT (5));
|
b_user = button_new (XTRACT (5));
|
||||||
@ -2525,8 +2525,8 @@
|
|||||||
|
|
||||||
add_widget (ch_dlg, b_group);
|
add_widget (ch_dlg, b_group);
|
||||||
add_widget (ch_dlg, b_user);
|
add_widget (ch_dlg, b_user);
|
||||||
--- mc-4.6.2/src/boxes.c
|
--- src/boxes.c
|
||||||
+++ mc-4.6.2/src/boxes.c
|
+++ src/boxes.c
|
||||||
@@ -154,23 +154,23 @@
|
@@ -154,23 +154,23 @@
|
||||||
display_title = _(display_title);
|
display_title = _(display_title);
|
||||||
for (i = 0; i < LIST_TYPES; i++) {
|
for (i = 0; i < LIST_TYPES; i++) {
|
||||||
@ -2699,8 +2699,8 @@
|
|||||||
|
|
||||||
i18n_flag = 1;
|
i18n_flag = 1;
|
||||||
}
|
}
|
||||||
--- mc-4.6.2/src/dialog.c
|
--- src/dialog.c
|
||||||
+++ mc-4.6.2/src/dialog.c
|
+++ src/dialog.c
|
||||||
@@ -167,7 +167,7 @@
|
@@ -167,7 +167,7 @@
|
||||||
|
|
||||||
if (h->title) {
|
if (h->title) {
|
||||||
@ -2710,8 +2710,8 @@
|
|||||||
addstr (h->title);
|
addstr (h->title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
--- mc-4.6.2/src/file.c
|
--- src/file.c
|
||||||
+++ mc-4.6.2/src/file.c
|
+++ src/file.c
|
||||||
@@ -167,15 +167,20 @@
|
@@ -167,15 +167,20 @@
|
||||||
do_transform_source (FileOpContext *ctx, const char *source)
|
do_transform_source (FileOpContext *ctx, const char *source)
|
||||||
{
|
{
|
||||||
@ -2766,8 +2766,8 @@
|
|||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
fmd_xlen += i;
|
fmd_xlen += i;
|
||||||
fmd_init_i18n (TRUE); /* to recalculate positions of child widgets */
|
fmd_init_i18n (TRUE); /* to recalculate positions of child widgets */
|
||||||
--- mc-4.6.2/src/filegui.c
|
--- src/filegui.c
|
||||||
+++ mc-4.6.2/src/filegui.c
|
+++ src/filegui.c
|
||||||
@@ -66,6 +66,7 @@
|
@@ -66,6 +66,7 @@
|
||||||
#include "filegui.h"
|
#include "filegui.h"
|
||||||
#include "key.h" /* get_event */
|
#include "key.h" /* get_event */
|
||||||
@ -2913,8 +2913,8 @@
|
|||||||
+ g_free(def_text);
|
+ g_free(def_text);
|
||||||
return dest_dir;
|
return dest_dir;
|
||||||
}
|
}
|
||||||
--- mc-4.6.2/src/find.c
|
--- src/find.c
|
||||||
+++ mc-4.6.2/src/find.c
|
+++ src/find.c
|
||||||
@@ -219,7 +219,7 @@
|
@@ -219,7 +219,7 @@
|
||||||
int l1, maxlen = 0;
|
int l1, maxlen = 0;
|
||||||
|
|
||||||
@ -2962,8 +2962,8 @@
|
|||||||
list->list[next_free].fname = name;
|
list->list[next_free].fname = name;
|
||||||
list->list[next_free].f.marked = 0;
|
list->list[next_free].f.marked = 0;
|
||||||
list->list[next_free].f.link_to_dir = link_to_dir;
|
list->list[next_free].f.link_to_dir = link_to_dir;
|
||||||
--- mc-4.6.2/src/help.c
|
--- src/help.c
|
||||||
+++ mc-4.6.2/src/help.c
|
+++ src/help.c
|
||||||
@@ -416,10 +416,28 @@
|
@@ -416,10 +416,28 @@
|
||||||
#ifndef HAVE_SLANG
|
#ifndef HAVE_SLANG
|
||||||
addch (acs_map [c]);
|
addch (acs_map [c]);
|
||||||
@ -3006,8 +3006,8 @@
|
|||||||
|
|
||||||
if (!filename)
|
if (!filename)
|
||||||
g_free (hlpfile);
|
g_free (hlpfile);
|
||||||
--- mc-4.6.2/src/hotlist.c
|
--- src/hotlist.c
|
||||||
+++ mc-4.6.2/src/hotlist.c
|
+++ src/hotlist.c
|
||||||
@@ -566,7 +566,7 @@
|
@@ -566,7 +566,7 @@
|
||||||
|
|
||||||
row = hotlist_but [i].y;
|
row = hotlist_but [i].y;
|
||||||
@ -3068,8 +3068,8 @@
|
|||||||
char *label_string = g_strdup (current_panel->cwd);
|
char *label_string = g_strdup (current_panel->cwd);
|
||||||
|
|
||||||
strip_password (label_string, 1);
|
strip_password (label_string, 1);
|
||||||
--- mc-4.6.2/src/layout.c
|
--- src/layout.c
|
||||||
+++ mc-4.6.2/src/layout.c
|
+++ src/layout.c
|
||||||
@@ -367,36 +367,36 @@
|
@@ -367,36 +367,36 @@
|
||||||
|
|
||||||
while (i--) {
|
while (i--) {
|
||||||
@ -3143,8 +3143,8 @@
|
|||||||
|
|
||||||
widget_set_size (&the_menubar->widget, 0, 0, 1, COLS);
|
widget_set_size (&the_menubar->widget, 0, 0, 1, COLS);
|
||||||
|
|
||||||
--- mc-4.6.2/src/learn.c
|
--- src/learn.c
|
||||||
+++ mc-4.6.2/src/learn.c
|
+++ src/learn.c
|
||||||
@@ -238,7 +238,7 @@
|
@@ -238,7 +238,7 @@
|
||||||
learn_but[0].x = 78 / 2 + 4;
|
learn_but[0].x = 78 / 2 + 4;
|
||||||
|
|
||||||
@ -3154,8 +3154,8 @@
|
|||||||
|
|
||||||
learn_title = _(learn_title);
|
learn_title = _(learn_title);
|
||||||
i18n_flag = 1;
|
i18n_flag = 1;
|
||||||
--- mc-4.6.2/src/main.c
|
--- src/main.c
|
||||||
+++ mc-4.6.2/src/main.c
|
+++ src/main.c
|
||||||
@@ -706,7 +706,7 @@
|
@@ -706,7 +706,7 @@
|
||||||
int prompt_len;
|
int prompt_len;
|
||||||
|
|
||||||
@ -3177,8 +3177,8 @@
|
|||||||
*s = '?';
|
*s = '?';
|
||||||
} while (*++s);
|
} while (*++s);
|
||||||
if (!alternate_plus_minus)
|
if (!alternate_plus_minus)
|
||||||
--- mc-4.6.2/src/menu.c
|
--- src/menu.c
|
||||||
+++ mc-4.6.2/src/menu.c
|
+++ src/menu.c
|
||||||
@@ -23,6 +23,7 @@
|
@@ -23,6 +23,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@ -3380,8 +3380,8 @@
|
|||||||
g_free (menu->name);
|
g_free (menu->name);
|
||||||
g_free (menu->help_node);
|
g_free (menu->help_node);
|
||||||
g_free (menu);
|
g_free (menu);
|
||||||
--- mc-4.6.2/src/menu.h
|
--- src/menu.h
|
||||||
+++ mc-4.6.2/src/menu.h
|
+++ src/menu.h
|
||||||
@@ -21,6 +21,8 @@
|
@@ -21,6 +21,8 @@
|
||||||
menu_entry *entries;
|
menu_entry *entries;
|
||||||
int start_x; /* position relative to menubar start */
|
int start_x; /* position relative to menubar start */
|
||||||
@ -3391,8 +3391,8 @@
|
|||||||
} Menu;
|
} Menu;
|
||||||
|
|
||||||
extern int menubar_visible;
|
extern int menubar_visible;
|
||||||
--- mc-4.6.2/src/myslang.h
|
--- src/myslang.h
|
||||||
+++ mc-4.6.2/src/myslang.h
|
+++ src/myslang.h
|
||||||
@@ -11,6 +11,16 @@
|
@@ -11,6 +11,16 @@
|
||||||
#endif /* HAVE_SLANG_SLANG_H */
|
#endif /* HAVE_SLANG_SLANG_H */
|
||||||
#endif
|
#endif
|
||||||
@ -3410,8 +3410,8 @@
|
|||||||
enum {
|
enum {
|
||||||
KEY_BACKSPACE = 400,
|
KEY_BACKSPACE = 400,
|
||||||
KEY_END, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT,
|
KEY_END, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT,
|
||||||
--- mc-4.6.2/src/option.c
|
--- src/option.c
|
||||||
+++ mc-4.6.2/src/option.c
|
+++ src/option.c
|
||||||
@@ -124,12 +124,12 @@
|
@@ -124,12 +124,12 @@
|
||||||
title2 = _(" Pause after run... ");
|
title2 = _(" Pause after run... ");
|
||||||
title3 = _(" Other options ");
|
title3 = _(" Other options ");
|
||||||
@ -3459,8 +3459,8 @@
|
|||||||
|
|
||||||
i18n_config_flag = 1;
|
i18n_config_flag = 1;
|
||||||
}
|
}
|
||||||
--- mc-4.6.2/src/panelize.c
|
--- src/panelize.c
|
||||||
+++ mc-4.6.2/src/panelize.c
|
+++ src/panelize.c
|
||||||
@@ -129,7 +129,7 @@
|
@@ -129,7 +129,7 @@
|
||||||
i = sizeof (panelize_but) / sizeof (panelize_but[0]);
|
i = sizeof (panelize_but) / sizeof (panelize_but[0]);
|
||||||
while (i--) {
|
while (i--) {
|
||||||
@ -3485,8 +3485,8 @@
|
|||||||
|
|
||||||
#endif /* ENABLE_NLS */
|
#endif /* ENABLE_NLS */
|
||||||
|
|
||||||
--- mc-4.6.2/src/screen.c
|
--- src/screen.c
|
||||||
+++ mc-4.6.2/src/screen.c
|
+++ src/screen.c
|
||||||
@@ -173,21 +173,56 @@
|
@@ -173,21 +173,56 @@
|
||||||
static const char *
|
static const char *
|
||||||
string_file_name (file_entry *fe, int len)
|
string_file_name (file_entry *fe, int len)
|
||||||
@ -3914,8 +3914,8 @@
|
|||||||
|
|
||||||
paint_panel (panel);
|
paint_panel (panel);
|
||||||
}
|
}
|
||||||
--- mc-4.6.2/src/slint.c
|
--- src/slint.c
|
||||||
+++ mc-4.6.2/src/slint.c
|
+++ src/slint.c
|
||||||
@@ -142,7 +142,9 @@
|
@@ -142,7 +142,9 @@
|
||||||
slang_init (void)
|
slang_init (void)
|
||||||
{
|
{
|
||||||
@ -3927,8 +3927,8 @@
|
|||||||
/*
|
/*
|
||||||
* If the terminal in not in terminfo but begins with a well-known
|
* If the terminal in not in terminfo but begins with a well-known
|
||||||
* string such as "linux" or "xterm" S-Lang will go on, but the
|
* string such as "linux" or "xterm" S-Lang will go on, but the
|
||||||
--- mc-4.6.2/src/tty.c
|
--- src/tty.c
|
||||||
+++ mc-4.6.2/src/tty.c
|
+++ src/tty.c
|
||||||
@@ -134,10 +134,12 @@
|
@@ -134,10 +134,12 @@
|
||||||
* defined or not. Congratulations! At least, they left the API call
|
* defined or not. Congratulations! At least, they left the API call
|
||||||
* for SLsmg_write_nchars as it has always been.
|
* for SLsmg_write_nchars as it has always been.
|
||||||
@ -3946,8 +3946,8 @@
|
|||||||
#else
|
#else
|
||||||
addch(c);
|
addch(c);
|
||||||
#endif
|
#endif
|
||||||
--- mc-4.6.2/src/tty.h
|
--- src/tty.h
|
||||||
+++ mc-4.6.2/src/tty.h
|
+++ src/tty.h
|
||||||
@@ -8,6 +8,8 @@
|
@@ -8,6 +8,8 @@
|
||||||
of ifdefs in the other files small.
|
of ifdefs in the other files small.
|
||||||
*/
|
*/
|
||||||
@ -3957,8 +3957,8 @@
|
|||||||
#ifdef HAVE_SLANG
|
#ifdef HAVE_SLANG
|
||||||
# include "myslang.h"
|
# include "myslang.h"
|
||||||
#endif
|
#endif
|
||||||
--- mc-4.6.2/src/util.c
|
--- src/util.c
|
||||||
+++ mc-4.6.2/src/util.c
|
+++ src/util.c
|
||||||
@@ -34,7 +34,11 @@
|
@@ -34,7 +34,11 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@ -4425,8 +4425,8 @@
|
|||||||
}
|
}
|
||||||
*w = 0;
|
*w = 0;
|
||||||
return s;
|
return s;
|
||||||
--- mc-4.6.2/src/util.h
|
--- src/util.h
|
||||||
+++ mc-4.6.2/src/util.h
|
+++ src/util.h
|
||||||
@@ -102,6 +102,13 @@
|
@@ -102,6 +102,13 @@
|
||||||
char *get_group (int);
|
char *get_group (int);
|
||||||
char *get_owner (int);
|
char *get_owner (int);
|
||||||
@ -4441,8 +4441,8 @@
|
|||||||
#define MAX_I18NTIMELENGTH 14
|
#define MAX_I18NTIMELENGTH 14
|
||||||
#define MIN_I18NTIMELENGTH 10
|
#define MIN_I18NTIMELENGTH 10
|
||||||
#define STD_I18NTIMELENGTH 12
|
#define STD_I18NTIMELENGTH 12
|
||||||
--- mc-4.6.2/src/view.c
|
--- src/view.c
|
||||||
+++ mc-4.6.2/src/view.c
|
+++ src/view.c
|
||||||
@@ -44,6 +44,10 @@
|
@@ -44,6 +44,10 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -4533,8 +4533,8 @@
|
|||||||
}
|
}
|
||||||
col++;
|
col++;
|
||||||
tty_setcolor (NORMAL_COLOR);
|
tty_setcolor (NORMAL_COLOR);
|
||||||
--- mc-4.6.2/src/widget.c
|
--- src/widget.c
|
||||||
+++ mc-4.6.2/src/widget.c
|
+++ src/widget.c
|
||||||
@@ -38,6 +38,9 @@
|
@@ -38,6 +38,9 @@
|
||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
@ -5250,8 +5250,8 @@
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
--- mc-4.6.2/src/widget.h
|
--- src/widget.h
|
||||||
+++ mc-4.6.2/src/widget.h
|
+++ src/widget.h
|
||||||
@@ -39,6 +39,7 @@
|
@@ -39,6 +39,7 @@
|
||||||
char *text; /* text of button */
|
char *text; /* text of button */
|
||||||
int hotkey; /* hot KEY */
|
int hotkey; /* hot KEY */
|
||||||
@ -5294,8 +5294,8 @@
|
|||||||
GList *history; /* The history */
|
GList *history; /* The history */
|
||||||
int need_push; /* need to push the current Input on hist? */
|
int need_push; /* need to push the current Input on hist? */
|
||||||
char **completions; /* Possible completions array */
|
char **completions; /* Possible completions array */
|
||||||
--- mc-4.6.2/src/wtools.c
|
--- src/wtools.c
|
||||||
+++ mc-4.6.2/src/wtools.c
|
+++ src/wtools.c
|
||||||
@@ -49,11 +49,11 @@
|
@@ -49,11 +49,11 @@
|
||||||
/* Adjust sizes */
|
/* Adjust sizes */
|
||||||
lines = (lines > LINES - 6) ? LINES - 6 : lines;
|
lines = (lines > LINES - 6) ? LINES - 6 : lines;
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
--- lib/mc.ext.in
|
Index: misc/mc.ext.in
|
||||||
+++ lib/mc.ext.in
|
===================================================================
|
||||||
@@ -452,12 +452,17 @@
|
--- misc/mc.ext.in.orig 2010-07-06 18:51:59.439510211 +0200
|
||||||
|
+++ misc/mc.ext.in 2010-07-06 18:54:56.647019263 +0200
|
||||||
|
@@ -510,12 +510,17 @@ shell/.abw
|
||||||
Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
|
|
||||||
# Microsoft Word Document
|
# Microsoft Word Document
|
||||||
-regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
|
-regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
|
||||||
+type/^Microsoft\ Office\ Document
|
+type/^Microsoft\ Office\ Document
|
||||||
Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
- View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f
|
- View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
|
||||||
+ View=%view{ascii} wvText %f - || strings %f
|
+ View=%view{ascii} wvText %f - || strings %f
|
||||||
+
|
+
|
||||||
type/^Microsoft\ Word
|
type/^Microsoft\ Word
|
||||||
Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
|
||||||
- View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f
|
- View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
|
||||||
+ View=%view{ascii} wvText %f - || strings %f
|
+ View=%view{ascii} wvText %f - || strings %f
|
||||||
+
|
+
|
||||||
+regex/\.([Dd]ot|DOT|[Ww]ri|WRI)$
|
+regex/\.([Dd]ot|DOT|[Ww]ri|WRI)$
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
--- lib/mc.sh.in
|
Index: contrib/mc.sh.in
|
||||||
+++ lib/mc.sh.in
|
===================================================================
|
||||||
@@ -1 +1,8 @@
|
--- contrib/mc.sh.in.orig 2010-07-05 21:12:51.000000000 +0200
|
||||||
-alias mc='. @suppbindir@/mc-wrapper.sh'
|
+++ contrib/mc.sh.in 2010-07-06 19:10:33.155018811 +0200
|
||||||
|
@@ -1,3 +1,10 @@
|
||||||
|
# Don't define aliases in plain Bourne shell
|
||||||
|
[ -n "${BASH_VERSION}${KSH_VERSION}${ZSH_VERSION}" ] || return 0
|
||||||
|
-alias mc='. @pkglibexecdir@/mc-wrapper.sh'
|
||||||
+mc()
|
+mc()
|
||||||
+{
|
+{
|
||||||
+. @suppbindir@/mc-wrapper.sh
|
+. @datadir@/mc/mc-wrapper.sh'
|
||||||
+}
|
+}
|
||||||
+if [ -n "$BASH_VERSION" ]
|
+if [ -n "$BASH_VERSION" ]
|
||||||
+then
|
+then
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
--- lib/mc.ext.in
|
Index: misc/mc.ext.in
|
||||||
+++ lib/mc.ext.in
|
===================================================================
|
||||||
@@ -435,8 +435,8 @@
|
--- misc/mc.ext.in.orig 2010-07-06 18:56:05.000000000 +0200
|
||||||
|
+++ misc/mc.ext.in 2010-07-06 18:56:56.835018761 +0200
|
||||||
|
@@ -493,8 +493,8 @@ type/^PDF
|
||||||
|
|
||||||
# html
|
# html
|
||||||
regex/\.([hH][tT][mM][lL]?)$
|
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
|
- 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 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
|
||||||
+ Open=/usr/share/mc/bin/x11_browser %f
|
+ Open=/usr/share/mc/bin/x11_browser %f
|
||||||
+ View=%view{ascii} w3m -dump -T text/html %f;
|
+ View=%view{ascii} w3m -dump -T text/html %f;
|
||||||
|
|
||||||
|
131
mc.spec
131
mc.spec
@ -23,53 +23,34 @@ Summary: Midnight Commander
|
|||||||
Group: Productivity/File utilities
|
Group: Productivity/File utilities
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Url: http://www.ibiblio.org/mc/
|
Url: http://www.ibiblio.org/mc/
|
||||||
Version: 4.6.2
|
Version: 4.7.0.7
|
||||||
Release: 7
|
Release: 7
|
||||||
Source: mc-%{version}.tar.bz2
|
Source: mc-%{version}.tar.lzma
|
||||||
Source1: x11_browser
|
Source1: x11_browser
|
||||||
Source2: %{name}.desktop
|
Source2: %{name}.desktop
|
||||||
Source3: %{name}.png
|
Source3: %{name}.png
|
||||||
Patch0: mc-utf8.patch
|
Patch0: mc-fix_lib_search_path.patch
|
||||||
Patch1: 00-70-utf8-common.patch
|
|
||||||
Patch2: 00-73-utf8-bottom-buttons-width.patch
|
|
||||||
Patch3: 00-75-utf8-cmdline-help.patch
|
|
||||||
Patch4: 00-76-utf8-hotlist-highlight.patch
|
|
||||||
Patch5: 00-77-utf8-filename-search-highlight.patch
|
|
||||||
Patch6: mc-apps.patch
|
Patch6: mc-apps.patch
|
||||||
Patch7: mc-palmsupport.patch
|
Patch7: mc-palmsupport.patch
|
||||||
Patch8: mc-word_docs.patch
|
Patch8: mc-word_docs.patch
|
||||||
Patch9: mc-x11browser.diff
|
Patch9: mc-x11browser.diff
|
||||||
Patch10: mc-no-nb.diff
|
|
||||||
Patch12: mc-wrapper.patch
|
Patch12: mc-wrapper.patch
|
||||||
Patch14: mc-syntax-hpp.patch
|
Patch14: mc-syntax-hpp.patch
|
||||||
Patch15: mc-utf8-nlink.patch
|
|
||||||
Patch16: mc-esc-seq.patch
|
Patch16: mc-esc-seq.patch
|
||||||
Patch17: mc-rpm.patch
|
Patch17: mc-rpm.patch
|
||||||
Patch18: mc-cursor-appearance.patch
|
|
||||||
Patch20: mc-f-keys.patch
|
Patch20: mc-f-keys.patch
|
||||||
#debian fixes for utf8
|
|
||||||
Patch22: mc-utf8-look-and-feel.patch
|
|
||||||
#debian fixes for vfs
|
#debian fixes for vfs
|
||||||
Patch23: 01_ftpfs_symlink.patch
|
|
||||||
Patch24: 02_ignore_ftp_chmod_error.patch
|
Patch24: 02_ignore_ftp_chmod_error.patch
|
||||||
Patch28: 05_add_lzma_xz_support.patch
|
#Debian fixes
|
||||||
Patch30: 06_remove_obsolete_rpm_tags.patch
|
Patch30: 04_add_gem_extension.patch
|
||||||
Patch32: 08_improved_u7z_support.patch
|
Patch31: 09_uzip_broken_528239.patch
|
||||||
Patch33: 09_choose_correct_urar.patch
|
Patch32: 20_wrong_path_to_wrappers.patch
|
||||||
#other debian fixes
|
|
||||||
Patch38: 99b_fix-regex-pattern-lengths.patch
|
|
||||||
Patch40: 99_regexp-replace-fixed.patch
|
|
||||||
# PATCH-FIX-UPSTREAM mc-multi-press-f-keys.patch mc287 sbrabec@suse.cz - Fixed Esc + Numeral F-key emulation.
|
# PATCH-FIX-UPSTREAM mc-multi-press-f-keys.patch mc287 sbrabec@suse.cz - Fixed Esc + Numeral F-key emulation.
|
||||||
Patch41: mc-multi-press-f-keys.patch
|
Patch41: mc-multi-press-f-keys.patch
|
||||||
# PATCH-FIX-OPENSUSE mc-utf8-slang-codeset.patch sbrabec@suse.cz - Guess UTF-8 locale from codeset, not from locale variables (not needed for openSUSE, valuable for upstream).
|
# Patches from Fedora
|
||||||
Patch42: mc-utf8-slang-codeset.patch
|
Patch50: mc-extensions.patch
|
||||||
# PATCH-FIX-OPENSUSE mc-crash-bnc500516.patch nadvornik@suse.cz - fixes a bug in utf-8 patch
|
Patch51: mc-mcviewsegfault.patch
|
||||||
Patch43: mc-crash-bnc500516.patch
|
|
||||||
# PATCH-FIX-UPSTREAM mc-port-number-bnc483249.patch nadvornik@suse.cz - port number in shell link - midnight-commander.org/ticket/118
|
|
||||||
Patch44: mc-port-number-bnc483249.patch
|
|
||||||
# PATCH-FIX-UPSTREAM mc-mkdir_mc_home.patch mseben@suse.cz - create .mc home dir at startup (bnc#533262)
|
|
||||||
Patch45: mc-mkdir_mc_home.patch
|
|
||||||
#
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: audiofile-devel
|
BuildRequires: audiofile-devel
|
||||||
BuildRequires: docbook-toys
|
BuildRequires: docbook-toys
|
||||||
@ -86,6 +67,8 @@ BuildRequires: recode
|
|||||||
BuildRequires: slang-devel
|
BuildRequires: slang-devel
|
||||||
BuildRequires: update-desktop-files
|
BuildRequires: update-desktop-files
|
||||||
BuildRequires: xorg-x11-devel
|
BuildRequires: xorg-x11-devel
|
||||||
|
BuildRequires: xdg-utils
|
||||||
|
BuildRequires: xz
|
||||||
Requires(pre): permissions
|
Requires(pre): permissions
|
||||||
Recommends: %{name}-lang = %{version}
|
Recommends: %{name}-lang = %{version}
|
||||||
|
|
||||||
@ -113,42 +96,24 @@ target directory.
|
|||||||
%lang_package
|
%lang_package
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p 1
|
%patch0
|
||||||
%patch1 -p 1
|
|
||||||
%patch2 -p 1
|
|
||||||
%patch3 -p 1
|
|
||||||
%patch4 -p 1
|
|
||||||
%patch5 -p 1
|
|
||||||
%patch6
|
%patch6
|
||||||
%patch7 -p 1
|
%patch7
|
||||||
%patch8
|
%patch8
|
||||||
%patch9
|
%patch9
|
||||||
%patch10
|
|
||||||
%patch12
|
%patch12
|
||||||
%patch14
|
%patch14
|
||||||
%patch15
|
|
||||||
%patch16
|
%patch16
|
||||||
%patch17
|
%patch17
|
||||||
%patch18
|
|
||||||
%patch20
|
%patch20
|
||||||
%patch22 -p1
|
%patch24
|
||||||
%patch23 -p1
|
%patch30
|
||||||
%patch24 -p1
|
%patch31
|
||||||
%patch28 -p1
|
%patch32
|
||||||
%patch30 -p1
|
%patch41
|
||||||
%patch32 -p1
|
%patch50
|
||||||
%patch33 -p1
|
%patch51
|
||||||
%patch38 -p1
|
pushd doc/hints
|
||||||
%patch40 -p1
|
|
||||||
%patch41 -p1
|
|
||||||
%patch42 -p1
|
|
||||||
%patch43
|
|
||||||
%patch44 -p1
|
|
||||||
%patch45
|
|
||||||
pushd po
|
|
||||||
rename no nb no.*
|
|
||||||
popd
|
|
||||||
pushd lib
|
|
||||||
iconv -f iso8859-1 -t utf-8 -o mc.hint.tmp mc.hint && mv mc.hint.tmp mc.hint
|
iconv -f iso8859-1 -t utf-8 -o mc.hint.tmp mc.hint && mv mc.hint.tmp mc.hint
|
||||||
iconv -f iso8859-1 -t utf-8 -o mc.hint.es.tmp mc.hint.es && mv mc.hint.es.tmp mc.hint.es
|
iconv -f iso8859-1 -t utf-8 -o mc.hint.es.tmp mc.hint.es && mv mc.hint.es.tmp mc.hint.es
|
||||||
iconv -f iso8859-1 -t utf-8 -o mc.hint.it.tmp mc.hint.it && mv mc.hint.it.tmp mc.hint.it
|
iconv -f iso8859-1 -t utf-8 -o mc.hint.it.tmp mc.hint.it && mv mc.hint.it.tmp mc.hint.it
|
||||||
@ -160,35 +125,53 @@ iconv -f iso8859-5 -t utf-8 -o mc.hint.sr.tmp mc.hint.sr && mv mc.hint.sr.tmp mc
|
|||||||
iconv -f koi8-r -t utf8 -o mc.hint.ru.tmp mc.hint.ru && mv mc.hint.ru.tmp mc.hint.ru
|
iconv -f koi8-r -t utf8 -o mc.hint.ru.tmp mc.hint.ru && mv mc.hint.ru.tmp mc.hint.ru
|
||||||
iconv -f koi8-u -t utf8 -o mc.hint.uk.tmp mc.hint.uk && mv mc.hint.uk.tmp mc.hint.uk
|
iconv -f koi8-u -t utf8 -o mc.hint.uk.tmp mc.hint.uk && mv mc.hint.uk.tmp mc.hint.uk
|
||||||
iconv -f big5 -t utf8 -o mc.hint.zh.tmp mc.hint.zh && mv mc.hint.zh.tmp mc.hint.zh
|
iconv -f big5 -t utf8 -o mc.hint.zh.tmp mc.hint.zh && mv mc.hint.zh.tmp mc.hint.zh
|
||||||
|
popd
|
||||||
|
pushd misc
|
||||||
iconv -f iso8859-5 -t utf-8 -o mc.menu.sr.tmp mc.menu.sr && mv mc.menu.sr.tmp mc.menu.sr
|
iconv -f iso8859-5 -t utf-8 -o mc.menu.sr.tmp mc.menu.sr && mv mc.menu.sr.tmp mc.menu.sr
|
||||||
popd
|
popd
|
||||||
# convert docs to utf-8
|
# convert docs to utf-8
|
||||||
pushd doc
|
pushd doc
|
||||||
|
pushd man
|
||||||
pushd es
|
pushd es
|
||||||
iconv -f iso8859-1 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
|
iconv -f iso8859-1 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
|
||||||
iconv -f iso8859-1 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
|
|
||||||
popd
|
popd
|
||||||
pushd hu
|
pushd hu
|
||||||
iconv -f iso8859-2 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
|
iconv -f iso8859-2 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
|
||||||
iconv -f iso8859-2 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
|
|
||||||
popd
|
popd
|
||||||
pushd it
|
pushd it
|
||||||
iconv -f iso8859-1 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
|
iconv -f iso8859-1 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
|
||||||
iconv -f iso8859-1 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
|
|
||||||
popd
|
popd
|
||||||
pushd pl
|
pushd pl
|
||||||
iconv -f iso8859-2 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
|
iconv -f iso8859-2 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
|
||||||
iconv -f iso8859-2 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
|
|
||||||
popd
|
popd
|
||||||
pushd ru
|
pushd ru
|
||||||
iconv -f koi8-r -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
|
iconv -f koi8-r -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
|
||||||
iconv -f koi8-r -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
|
|
||||||
popd
|
popd
|
||||||
pushd sr
|
pushd sr
|
||||||
iconv -f iso8859-5 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
|
iconv -f iso8859-5 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
|
||||||
iconv -f iso8859-5 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
|
|
||||||
iconv -f iso8859-5 -t utf-8 -o mcserv.8.in.tmp mcserv.8.in && mv mcserv.8.in.tmp mcserv.8.in
|
iconv -f iso8859-5 -t utf-8 -o mcserv.8.in.tmp mcserv.8.in && mv mcserv.8.in.tmp mcserv.8.in
|
||||||
|
popd # doc/man
|
||||||
|
popd # doc/
|
||||||
|
pushd hlp
|
||||||
|
pushd es
|
||||||
|
iconv -f iso8859-1 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
|
||||||
popd
|
popd
|
||||||
|
pushd hu
|
||||||
|
iconv -f iso8859-2 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
|
||||||
|
popd
|
||||||
|
pushd it
|
||||||
|
iconv -f iso8859-1 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
|
||||||
|
popd
|
||||||
|
pushd pl
|
||||||
|
iconv -f iso8859-2 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
|
||||||
|
popd
|
||||||
|
pushd ru
|
||||||
|
iconv -f koi8-r -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
|
||||||
|
popd
|
||||||
|
pushd sr
|
||||||
|
iconv -f iso8859-5 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
|
||||||
|
popd # doc/hlp
|
||||||
|
popd # doc/
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -209,7 +192,7 @@ chmod 755 %{buildroot}/%{_libexecdir}/mc/cons.saver
|
|||||||
# install -m 0644 %{SOURCE3} %{datadir}/mc/
|
# install -m 0644 %{SOURCE3} %{datadir}/mc/
|
||||||
#install the shell functions for bourne shell and csh
|
#install the shell functions for bourne shell and csh
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
|
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
|
||||||
install -m 0644 lib/mc.sh lib/mc.csh %{buildroot}%{_sysconfdir}/profile.d
|
ln -fs -t %{buildroot}%{_sysconfdir}/profile.d %{_datadir}/mc/mc.{,c}sh
|
||||||
#support script for calling available GUI webbrosers
|
#support script for calling available GUI webbrosers
|
||||||
install -m 755 %{SOURCE1} %{buildroot}%{_datadir}/mc/bin
|
install -m 755 %{SOURCE1} %{buildroot}%{_datadir}/mc/bin
|
||||||
install -D -m 644 %{S:3} %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
install -D -m 644 %{S:3} %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
||||||
@ -231,14 +214,28 @@ rm -rf %{buildroot}
|
|||||||
%doc ABOUT-NLS COPYING NEWS README
|
%doc ABOUT-NLS COPYING NEWS README
|
||||||
%config %{_sysconfdir}/profile.d/*
|
%config %{_sysconfdir}/profile.d/*
|
||||||
%{_bindir}/mc*
|
%{_bindir}/mc*
|
||||||
|
%dir %{_sysconfdir}/mc
|
||||||
|
%config %{_sysconfdir}/mc/filehighlight.ini
|
||||||
|
%config %{_sysconfdir}/mc/sfs.ini
|
||||||
|
%config %{_sysconfdir}/mc/mc.menu
|
||||||
|
%config %{_sysconfdir}/mc/Syntax
|
||||||
|
%config %{_sysconfdir}/mc/mc.ext
|
||||||
|
%config %{_sysconfdir}/mc/mc.keymap.emacs
|
||||||
|
%config %{_sysconfdir}/mc/edit.spell.rc
|
||||||
|
%config %{_sysconfdir}/mc/mc.lib
|
||||||
|
%config %{_sysconfdir}/mc/cedit.menu
|
||||||
|
%config %{_sysconfdir}/mc/mc.keymap.default
|
||||||
|
%config %{_sysconfdir}/mc/mc.charsets
|
||||||
|
%config %{_sysconfdir}/mc/mc.keymap
|
||||||
|
%config %{_sysconfdir}/mc/edit.indent.rc
|
||||||
%dir %{_libexecdir}/mc
|
%dir %{_libexecdir}/mc
|
||||||
%verify(not mode) %{_libexecdir}/mc/cons.saver
|
%verify(not mode) %{_libexecdir}/mc/cons.saver
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
#%{_mandir}/man3/*
|
|
||||||
%{_datadir}/mc
|
%{_datadir}/mc
|
||||||
|
%{_libexecdir}/mc
|
||||||
%exclude %{_datadir}/mc/mc.hint.*
|
%exclude %{_datadir}/mc/mc.hint.*
|
||||||
%exclude %{_datadir}/mc/mc.hlp.*
|
%exclude %{_datadir}/mc/mc.hlp.*
|
||||||
%exclude %{_datadir}/mc/mc.menu.*
|
%exclude %{_sysconfdir}/mc/mc.menu.*
|
||||||
%{_datadir}/applications/%{name}.desktop
|
%{_datadir}/applications/%{name}.desktop
|
||||||
%{_datadir}/pixmaps/%{name}.png
|
%{_datadir}/pixmaps/%{name}.png
|
||||||
%lang(es) %doc %{_mandir}/es
|
%lang(es) %doc %{_mandir}/es
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Call appropriate brower
|
# Call appropriate brower
|
||||||
#
|
#
|
||||||
# Copyright (c) 2001 Philipp Thomas <pthomas@suse.de>
|
# Copyright (c) 2001 Philipp Thomas <pth@suse.de>
|
||||||
#
|
#
|
||||||
# Borrowed heavily from url_handler.sh by Werner Fink <werner@suse.de>
|
# Borrowed heavily from url_handler.sh by Werner Fink <werner@suse.de>
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user