OBS User unknown 2009-02-12 21:03:01 +00:00 committed by Git OBS Bridge
parent 81b0ee623a
commit 06476b29bc
39 changed files with 484 additions and 1327 deletions

View File

@ -1,9 +1,9 @@
Some common stuff used by other UTF-8 patches.
================================================================================
--- mc-4.6.2-pre1/src/util.c
+++ mc-4.6.2-pre1/src/util.c
@@ -140,6 +140,30 @@
--- mc-4.6.2/src/util.c
+++ mc-4.6.2/src/util.c
@@ -145,6 +145,30 @@
return strlen (str);
}
@ -34,9 +34,9 @@ Some common stuff used by other UTF-8 patches.
#ifdef UTF8
void
--- mc-4.6.2-pre1/src/util.h
+++ mc-4.6.2-pre1/src/util.h
@@ -105,6 +105,7 @@
--- 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 *);

View File

@ -1,9 +1,9 @@
Use six character width cyan rectangles for bottom row's buttons.
================================================================================
--- mc-4.6.2-pre1/src/widget.c
+++ mc-4.6.2-pre1/src/widget.c
@@ -2549,11 +2549,14 @@
--- 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++) {

View File

@ -1,9 +1,9 @@
Fix formatting the output of "mc --help".
================================================================================
--- mc-4.6.2-pre1/src/main.c
+++ mc-4.6.2-pre1/src/main.c
@@ -1859,7 +1859,7 @@
--- 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);
@ -12,8 +12,8 @@ Fix formatting the output of "mc --help".
_("Set initial line number for the internal editor"));
fputs (_
("\n"
--- mc-4.6.2-pre1/src/popthelp.c
+++ mc-4.6.2-pre1/src/popthelp.c
--- mc-4.6.2/src/popthelp.c
+++ mc-4.6.2/src/popthelp.c
@@ -101,7 +101,7 @@
goto out;
}
@ -50,9 +50,9 @@ Fix formatting the output of "mc --help".
if (cursor > 79) fprintf(f, "\n ");
fprintf(f, " %s", con->otherHelp);
}
--- mc-4.6.2-pre1/src/util.c
+++ mc-4.6.2-pre1/src/util.c
@@ -147,7 +147,7 @@
--- 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

View File

@ -1,9 +1,9 @@
Highlight the lines of hotlist in full width.
================================================================================
--- mc-4.6.2-pre1/src/widget.c
+++ mc-4.6.2-pre1/src/widget.c
@@ -1995,6 +1995,7 @@
--- mc-4.6.2/src/widget.c
+++ mc-4.6.2/src/widget.c
@@ -1994,6 +1994,7 @@
{
WLEntry *e;
int i;
@ -11,7 +11,7 @@ Highlight the lines of hotlist in full width.
int sel_line;
Dlg_head *h = l->widget.parent;
int normalc = DLG_NORMALC (h);
@@ -2025,7 +2026,8 @@
@@ -2024,7 +2025,8 @@
text = e->text;
e = e->next;
}

View File

@ -1,9 +1,9 @@
Quick filename search (^S) highlights correct width.
================================================================================
--- mc-4.6.2-pre1/src/screen.c
+++ mc-4.6.2-pre1/src/screen.c
@@ -769,8 +769,10 @@
--- 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){

View File

@ -1,8 +1,6 @@
diff --git a/vfs/direntry.c b/vfs/direntry.c
index 3a52d22..b1dfdca 100644
--- a/vfs/direntry.c
+++ b/vfs/direntry.c
@@ -251,7 +251,13 @@ vfs_s_find_entry_tree (struct vfs_class *me, struct vfs_s_inode *root,
--- 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;
@ -17,7 +15,7 @@ index 3a52d22..b1dfdca 100644
while (root) {
while (*path == PATH_SEP) /* Strip leading '/' */
@@ -324,7 +330,13 @@ vfs_s_find_entry_linear (struct vfs_class *me, struct vfs_s_inode *root,
@@ -324,7 +330,13 @@
if (root->super->root != root)
vfs_die ("We have to use _real_ root. Always. Sorry.");

View File

@ -1,8 +1,6 @@
diff --git a/vfs/ftpfs.c b/vfs/ftpfs.c
index 43d363c..1b137ae 100644
--- a/vfs/ftpfs.c
+++ b/vfs/ftpfs.c
@@ -1526,7 +1526,7 @@ static int ftpfs_chmod (struct vfs_class *me, const char *path, int mode)
--- mc-4.6.2/vfs/ftpfs.c
+++ mc-4.6.2/vfs/ftpfs.c
@@ -1529,7 +1529,7 @@
char buf[BUF_SMALL];
g_snprintf(buf, sizeof(buf), "SITE CHMOD %4.4o /%%s", mode & 07777);

View File

@ -1,188 +0,0 @@
diff --git a/vfs/fish.c b/vfs/fish.c
index 2a2deb6..d03917e 100644
--- a/vfs/fish.c
+++ b/vfs/fish.c
@@ -366,15 +366,15 @@ fish_dir_load(struct vfs_class *me, struct vfs_s_inode *dir, char *remote_path)
dir->timestamp.tv_sec += fish_directory_timeout;
quoted_path = name_quote (remote_path, 0);
fish_command (me, super, NONE,
- "#LIST /%s\n"
- "if ls -1 /%s >/dev/null 2>&1 ;\n"
+ "#LIST \"/%s\"\n"
+ "if ls -1 \"/%s\" >/dev/null 2>&1 ;\n"
"then\n"
- "ls -lLan /%s 2>/dev/null | grep '^[^cbt]' | (\n"
+ "ls -lQLan \"/%s\" 2>/dev/null | grep '^[^cbt]' | (\n"
"while read p l u g s m d y n; do\n"
- "echo \"P$p $u.$g\nS$s\nd$m $d $y\n:$n\n\"\n"
+ "echo \"P$p $u.$g\nS$s\nd$m $d $y\n:$n\n\"|sed 's#\\\"##g'\n"
"done\n"
")\n"
- "ls -lan /%s 2>/dev/null | grep '^[cb]' | (\n"
+ "ls -lQan \"/%s\" 2>/dev/null | grep '^[cb]' | (\n"
"while read p l u g a i m d y n; do\n"
"echo \"P$p $u.$g\nE$a$i\nd$m $d $y\n:$n\n\"\n"
"done\n"
@@ -527,16 +527,16 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
* instead of stderr. It makes impossible the use of "head || dd"
* algorithm for file appending case, therefore just "dd" is used for it.
*/
-
+ name = unescape_string(name);
print_vfs_message(_("fish: store %s: sending command..."), name );
- quoted_name = name_quote (name, 0);
+ quoted_name = unescape_string (name_quote (name, 0));
/* FIXME: File size is limited to ULONG_MAX */
if (!fh->u.fish.append)
n = fish_command (me, super, WAIT_REPLY,
- "#STOR %lu /%s\n"
+ "#STOR %lu \"/%s\"\n"
"echo '### 001'\n"
- "file=/%s\n"
+ "file=\"/%s\"\n"
"res=`exec 3>&1\n"
"(\n"
"head -c %lu -q - || echo DD >&3\n"
@@ -558,10 +558,10 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
(unsigned long) s.st_size);
else
n = fish_command (me, super, WAIT_REPLY,
- "#STOR %lu /%s\n"
+ "#STOR %lu \"/%s\"\n"
"echo '### 001'\n"
"{\n"
- "file=/%s\n"
+ "file=\"/%s\"\n"
"rest=%lu\n"
"while [ $rest -gt 0 ]\n"
"do\n"
@@ -627,7 +627,7 @@ fish_linear_start (struct vfs_class *me, struct vfs_s_fh *fh, off_t offset)
return 0;
quoted_name = name_quote (name, 0);
g_free (name);
- name = quoted_name;
+ name = unescape_string(quoted_name);
fh->u.fish.append = 0;
/*
@@ -637,15 +637,15 @@ fish_linear_start (struct vfs_class *me, struct vfs_s_fh *fh, off_t offset)
* standard output (i.e. over the network).
*/
offset = fish_command (me, FH_SUPER, WANT_STRING,
- "#RETR /%s\n"
- "if dd if=/%s of=/dev/null bs=1 count=1 2>/dev/null ;\n"
+ "#RETR \"/%s\"\n"
+ "if dd if=\"/%s\" of=/dev/null bs=1 count=1 2>/dev/null ;\n"
"then\n"
- "ls -ln /%s 2>/dev/null | (\n"
+ "ls -ln \"/%s\" 2>/dev/null | (\n"
"read p l u g s r\n"
"echo \"$s\"\n"
")\n"
"echo '### 100'\n"
- "cat /%s\n"
+ "cat \"//%s\"\n"
"echo '### 200'\n"
"else\n"
"echo '### 500'\n"
@@ -767,6 +767,7 @@ fish_send_command(struct vfs_class *me, struct vfs_s_super *super, const char *c
return -1; \
} \
rpath = name_quote (crpath, 0); \
+ rpath = unescape_string(rpath); \
g_free (mpath);
#define POSTFIX(flags) \
@@ -777,7 +778,7 @@ static int
fish_chmod (struct vfs_class *me, const char *path, int mode)
{
PREFIX
- g_snprintf(buf, sizeof(buf), "#CHMOD %4.4o /%s\n"
+ g_snprintf(buf, sizeof(buf), "#CHMOD %4.4o \"/%s\"\n"
"chmod %4.4o \"/%s\" 2>/dev/null\n"
"echo '### 000'\n",
mode & 07777, rpath,
@@ -811,11 +812,11 @@ static int fish_##name (struct vfs_class *me, const char *path1, const char *pat
return fish_send_command(me, super2, buf, OPT_FLUSH); \
}
-FISH_OP(rename, "#RENAME /%s /%s\n"
- "mv /%s /%s 2>/dev/null\n"
+FISH_OP(rename, "#RENAME \"/%s\" \"/%s\"\n"
+ "mv \"/%s\" \"/%s\" 2>/dev/null\n"
"echo '### 000'" )
-FISH_OP(link, "#LINK /%s /%s\n"
- "ln /%s /%s 2>/dev/null\n"
+FISH_OP(link, "#LINK \"/%s\" \"/%s\"\n"
+ "ln \"/%s\" \"/%s\" 2>/dev/null\n"
"echo '### 000'" )
static int fish_symlink (struct vfs_class *me, const char *setto, const char *path)
@@ -824,8 +825,8 @@ static int fish_symlink (struct vfs_class *me, const char *setto, const char *pa
PREFIX
qsetto = name_quote (setto, 0);
g_snprintf(buf, sizeof(buf),
- "#SYMLINK %s /%s\n"
- "ln -s %s /%s 2>/dev/null\n"
+ "#SYMLINK \"%s\" \"/%s\"\n"
+ "ln -s \"%s\" \"/%s\" 2>/dev/null\n"
"echo '### 000'\n",
qsetto, rpath, qsetto, rpath);
g_free (qsetto);
@@ -850,16 +851,16 @@ fish_chown (struct vfs_class *me, const char *path, int owner, int group)
{
PREFIX
g_snprintf (buf, sizeof(buf),
- "#CHOWN /%s /%s\n"
- "chown %s /%s 2>/dev/null\n"
+ "#CHOWN /%s \"/%s\"\n"
+ "chown %s \"/%s\" 2>/dev/null\n"
"echo '### 000'\n",
sowner, rpath,
sowner, rpath);
fish_send_command (me, super, buf, OPT_FLUSH);
/* FIXME: what should we report if chgrp succeeds but chown fails? */
g_snprintf (buf, sizeof(buf),
- "#CHGRP /%s /%s\n"
- "chgrp %s /%s 2>/dev/null\n"
+ "#CHGRP /%s \"/%s\"\n"
+ "chgrp %s \"/%s\" 2>/dev/null\n"
"echo '### 000'\n",
sgroup, rpath,
sgroup, rpath);
@@ -872,8 +873,8 @@ static int fish_unlink (struct vfs_class *me, const char *path)
{
PREFIX
g_snprintf(buf, sizeof(buf),
- "#DELE /%s\n"
- "rm -f /%s 2>/dev/null\n"
+ "#DELE \"/%s\"\n"
+ "rm -f \"/%s\" 2>/dev/null\n"
"echo '### 000'\n",
rpath, rpath);
POSTFIX(OPT_FLUSH);
@@ -884,10 +885,9 @@ static int fish_mkdir (struct vfs_class *me, const char *path, mode_t mode)
PREFIX
(void) mode;
-
g_snprintf(buf, sizeof(buf),
- "#MKD /%s\n"
- "mkdir /%s 2>/dev/null\n"
+ "#MKD \"/%s\"\n"
+ "mkdir \"/%s\" 2>/dev/null\n"
"echo '### 000'\n",
rpath, rpath);
POSTFIX(OPT_FLUSH);
@@ -897,8 +897,8 @@ static int fish_rmdir (struct vfs_class *me, const char *path)
{
PREFIX
g_snprintf(buf, sizeof(buf),
- "#RMD /%s\n"
- "rmdir /%s 2>/dev/null\n"
+ "#RMD \"/%s\"\n"
+ "rmdir \"/%s\" 2>/dev/null\n"
"echo '### 000'\n",
rpath, rpath);
POSTFIX(OPT_FLUSH);

View File

@ -1,45 +0,0 @@
diff --git a/vfs/fish.c b/vfs/fish.c
index d03917e..e0e4471 100644
--- a/vfs/fish.c
+++ b/vfs/fish.c
@@ -536,6 +536,7 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
n = fish_command (me, super, WAIT_REPLY,
"#STOR %lu \"/%s\"\n"
"echo '### 001'\n"
+ "if touch \"/%s\"; then\n"
"file=\"/%s\"\n"
"res=`exec 3>&1\n"
"(\n"
@@ -552,14 +553,18 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
" n=`dd bs=256 count=$cnt | tee -a \"$file\" | wc -c`\n"
" rest=`expr $rest - $n`\n"
"done\n"
- "}; echo '### 200'\n",
- (unsigned long) s.st_size, name,
+ "}; echo '### 200'\n"
+ "else\n"
+ "echo '### 500'\n"
+ "fi\n",
+ (unsigned long) s.st_size, name, name,
quoted_name, (unsigned long) s.st_size,
(unsigned long) s.st_size);
else
n = fish_command (me, super, WAIT_REPLY,
"#STOR %lu \"/%s\"\n"
"echo '### 001'\n"
+ "if touch \"/%s\"; then\n"
"{\n"
"file=\"/%s\"\n"
"rest=%lu\n"
@@ -570,7 +575,10 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
" rest=`expr $rest - $n`\n"
"done\n"
"}; echo '### 200'\n",
- (unsigned long) s.st_size, name,
+ "else\n"
+ "echo '### 500'\n"
+ "fi\n",
+ (unsigned long) s.st_size, name, name,
quoted_name, (unsigned long) s.st_size);
g_free (quoted_name);

View File

@ -1,6 +1,6 @@
--- mc/vfs/extfs/rpm 2006-11-01 02:30:26.000000000 -0800
+++ mc/vfs/extfs/rpm.new 2007-10-18 14:39:23.000000000 -0700
@@ -95,10 +95,6 @@ mcrpmfs_list ()
--- 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"
@ -11,7 +11,7 @@
test "`$RPM -qp --qf \"%{EPOCH}\" \"$f\"`" = "(none)" ||
echo "$FILEPREF 0 $DATE INFO/EPOCH"
test "`$RPM -qp --qf \"%{LICENSE}\" \"$f\"`" = "(none)" ||
@@ -106,8 +102,6 @@ mcrpmfs_list ()
@@ -106,8 +102,6 @@
else
echo "$FILEPREF 0 $DATE INFO/PACKAGER"
echo "$FILEPREF 0 $DATE INFO/URL"
@ -20,7 +20,7 @@
echo "$FILEPREF 0 $DATE INFO/EPOCH"
echo "$FILEPREF 0 $DATE INFO/LICENSE"
fi
@@ -156,8 +150,6 @@ mcrpmfs_copyout ()
@@ -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;;
@ -29,9 +29,9 @@
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/vfs/extfs/trpm 2006-11-01 02:30:26.000000000 -0800
+++ mc/vfs/extfs/trpm.new 2007-10-18 14:40:12.000000000 -0700
@@ -85,10 +85,6 @@ mcrpmfs_list ()
--- 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"
@ -42,7 +42,7 @@
test "`$RPM -q --qf \"%{EPOCH}\" -- "$1"`" = "(none)" ||
echo "$FILEPREF 0 $DATE INFO/EPOCH"
test "`$RPM -q --qf \"%{LICENSE}\" -- "$1"`" = "(none)" ||
@@ -96,8 +92,6 @@ mcrpmfs_list ()
@@ -96,8 +92,6 @@
else
echo "$FILEPREF 0 $DATE INFO/PACKAGER"
echo "$FILEPREF 0 $DATE INFO/URL"
@ -51,7 +51,7 @@
echo "$FILEPREF 0 $DATE INFO/EPOCH"
echo "$FILEPREF 0 $DATE INFO/LICENSE"
fi
@@ -143,8 +137,6 @@ mcrpmfs_copyout ()
@@ -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;;

View File

@ -1,7 +1,5 @@
diff --git a/vfs/extfs/u7z b/vfs/extfs/u7z
index da2272e..c722388 100644
--- a/vfs/extfs/u7z
+++ b/vfs/extfs/u7z
--- mc-4.6.2/vfs/extfs/u7z
+++ mc-4.6.2/vfs/extfs/u7z
@@ -2,6 +2,7 @@
#
# extfs support for p7zip
@ -10,7 +8,7 @@ index da2272e..c722388 100644
# Licensed under GNU GPL version 2 or later version.
P7ZIP=7za
@@ -19,7 +20,10 @@ mcu7zip_list ()
@@ -19,7 +20,10 @@
mcu7zip_copyout ()
{
@ -22,7 +20,7 @@ index da2272e..c722388 100644
}
mcu7zip_copyin ()
@@ -31,19 +35,27 @@ mcu7zip_mkdir ()
@@ -31,19 +35,27 @@
{
dir=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-u7z.XXXXXX"` || exit 1
mkdir -p "$dir"/"$2"
@ -38,8 +36,8 @@ index da2272e..c722388 100644
+ #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 && \
+ { echo -e "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; }
+ $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 ()
@ -48,8 +46,8 @@ index da2272e..c722388 100644
+ #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 && \
+ { echo -e "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; }
+ $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

View File

@ -1,8 +1,6 @@
diff --git a/vfs/extfs/urar.in b/vfs/extfs/urar.in
index c8dbde1..6d29cd0 100644
--- a/vfs/extfs/urar.in
+++ b/vfs/extfs/urar.in
@@ -22,6 +22,10 @@ for dir in $PATH; do
--- mc-4.6.2/vfs/extfs/urar.in
+++ mc-4.6.2/vfs/extfs/urar.in
@@ -22,6 +22,10 @@
fi
done

View File

@ -1,61 +0,0 @@
diff -Nurwd orig/mc-4.6.2~git20080311/vfs/extfs/u7z mc-4.6.2~git20080311/vfs/extfs/u7z
--- orig/mc-4.6.2~git20080311/vfs/extfs/u7z 2008-07-26 11:26:48.000000000 +0200
+++ mc-4.6.2~git20080311/vfs/extfs/u7z 2008-07-26 11:30:24.000000000 +0200
@@ -45,8 +45,8 @@
#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 && \
- { echo -e "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; }
+ $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 ()
@@ -54,8 +54,8 @@
#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 && \
- { echo -e "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; }
+ $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
diff -Nurwd orig/mc-4.6.2~git20080311/vfs/extfs/uarj.in mc-4.6.2~git20080311/vfs/extfs/uarj.in
--- orig/mc-4.6.2~git20080311/vfs/extfs/uarj.in 2008-07-26 11:26:48.000000000 +0200
+++ mc-4.6.2~git20080311/vfs/extfs/uarj.in 2008-07-26 11:34:19.000000000 +0200
@@ -16,7 +16,7 @@
mcarjfs_list ()
{
- $ARJ v "$1" | @AWK@ -v uuid=${UID-0} '
+ $ARJ v "$1" | @AWK@ -v uuid=$(id -ru) '
{
if (($0 ~ /^[0-9]+\) .*/)||($0 ~ /^------------ ---------- ---------- -----/)){
if (filestr ~ /^[0-9]+\) .*/) {
diff -Nurwd orig/mc-4.6.2~git20080311/vfs/extfs/uha.in mc-4.6.2~git20080311/vfs/extfs/uha.in
--- orig/mc-4.6.2~git20080311/vfs/extfs/uha.in 2008-07-26 11:26:48.000000000 +0200
+++ mc-4.6.2~git20080311/vfs/extfs/uha.in 2008-07-26 11:34:39.000000000 +0200
@@ -10,7 +10,7 @@
mchafs_list ()
{
- $HA lf "$1" 2>/dev/null | @AWK@ -v uid=${UID-0} '
+ $HA lf "$1" 2>/dev/null | @AWK@ -v uid=$(id -ru) '
/^===========/ {next}
{
if ($5="%" && $8~/DIR|ASC|HSC|CPY/) {
diff -Nurwd orig/mc-4.6.2~git20080311/vfs/extfs/uzoo.in mc-4.6.2~git20080311/vfs/extfs/uzoo.in
--- orig/mc-4.6.2~git20080311/vfs/extfs/uzoo.in 2008-07-26 11:26:48.000000000 +0200
+++ mc-4.6.2~git20080311/vfs/extfs/uzoo.in 2008-07-26 11:36:00.000000000 +0200
@@ -23,7 +23,7 @@
mczoofs_list ()
{
mklink "$1"
- $ZOO lq "$ARCHIVE" | @AWK@ -v uid=${UID-0} '
+ $ZOO lq "$ARCHIVE" | @AWK@ -v uid=$(id -ru) '
/^[^\ ]/ { next }
{
if (NF < 8)

View File

@ -1,12 +0,0 @@
diff -Nurwd ./mc-4.6.2~pre1/edit/editcmd.c ./mc-4.6.2~pre1.patched/edit/editcmd.c
--- ./edit/editcmd.c 2008-02-12 19:58:24.000000000 +0100
+++ ./edit/editcmd.c 2008-02-12 19:57:11.000000000 +0100
@@ -243,7 +243,7 @@
this_save_mode = option_save_mode;
if (this_save_mode != EDIT_QUICK_SAVE) {
if (!vfs_file_is_local (filename) ||
- (fd = mc_open (filename, O_WRONLY | O_BINARY)) == -1) {
+ (fd = mc_open (filename, O_RDONLY | O_BINARY)) == -1) {
/*
* The file does not exists yet, so no safe save or
* backup are necessary.

View File

@ -1,166 +0,0 @@
diff -u -w -r1.141 util.c
--- ./src/util.c 25 Sep 2007 15:33:37 -0000 1.141
+++ ./src/util.c 27 Feb 2008 15:38:13 -0000
@@ -1525,3 +1525,58 @@
return (sep != NULL) ? sep + 1 : result;
}
+/* Unescape paths or other strings for e.g the internal cd */
+char *
+unescape_string ( const char * in ) {
+ char * local = NULL;
+ int i = 0;
+ int j = 20;
+ int k = 0;
+
+ local = g_malloc(j);
+
+ for (i=0;i<=strlen(in);i++) {
+ if (i-k+1 >= j ) {
+ j = j + 20;
+ local = g_realloc(local,j);
+ }
+ if ( (strchr(" \t*|;<>~#()?[]{}&",in[i])) && ( strchr("\\",in[i-1])) ) {
+ k++;
+ local[i-k] = in[i];
+ } else {
+ local[i-k] = in[i];
+ }
+ }
+ local[i-k] = '\0';
+
+ return local;
+}
+
+/* To be compatible with the general posix command lines we have to escape *
+ * strings for the command line */
+char *
+escape_string ( const char * in ) {
+ char * local = NULL;
+ int i = 0;
+ int j = 20;
+ int k = 0;
+
+ local = g_malloc(j);
+
+ for (i=0;i<strlen(in);i++) {
+ if (i+k+1 >= j ) { //If 20 chars is too low for the path
+ j = j + 20;
+ local = g_realloc(local,j);
+ }
+ if ( (strchr(" \t*|;<>~#()?[]{}&",in[i])) && (! strchr("\\",in[i-1])) ) {
+ local[i+k] = 92; // Ascii for "\"
+ k = k+1;
+ local[i+k] = in[i];
+ } else {
+ local[i+k] = in[i];
+ }
+ }
+ local[i+k] = '\0';
+
+ return local;
+}
diff -u -w -r1.78 util.h
--- ./src/util.h 3 Feb 2006 17:04:17 -0000 1.78
+++ ./src/util.h 27 Feb 2008 15:38:13 -0000
@@ -14,6 +14,8 @@
extern const char *cstrcasestr (const char *haystack, const char *needle);
extern const char *cstrstr (const char *haystack, const char *needle);
+char *unescape_string ( const char * in );
+char *escape_string ( const char * in );
void str_replace(char *s, char from, char to);
int is_printable (int c);
void msglen (const char *text, /*@out@*/ int *lines, /*@out@*/ int *columns);
diff -u -w -r1.61 complete.c
--- ./src/complete.c 25 Sep 2007 15:33:36 -0000 1.61
+++ ./src/complete.c 27 Feb 2008 15:38:14 -0000
@@ -40,6 +40,7 @@
#include "wtools.h"
#include "complete.h"
#include "main.h"
+#include "util.h"
#include "key.h" /* XCTRL and ALT macros */
typedef char *CompletionFunction (char *, int);
@@ -911,6 +912,7 @@
static int
complete_engine (WInput *in, int what_to_do)
{
+ char *complete = NULL;
if (in->completions && in->point != end)
free_completions (in);
if (!in->completions){
@@ -924,7 +926,8 @@
}
if (in->completions){
if (what_to_do & DO_INSERTION || ((what_to_do & DO_QUERY) && !in->completions[1])) {
- if (insert_text (in, in->completions [0], strlen (in->completions [0]))){
+ complete = escape_string(in->completions [0]);
+ if (insert_text (in, complete, strlen (complete))){
if (in->completions [1])
beep ();
else
@@ -940,9 +943,11 @@
Dlg_head *query_dlg;
WListbox *query_list;
- for (p=in->completions + 1; *p; count++, p++)
+ for (p=in->completions + 1; *p; count++, p++) {
+ *p = escape_string(*p);
if ((i = strlen (*p)) > maxlen)
maxlen = i;
+ }
start_x = in->widget.x;
start_y = in->widget.y;
if (start_y - 2 >= count) {
diff -u -w -r1.34 command.c
--- ./src/command.c 26 Sep 2007 10:22:25 -0000 1.34
+++ ./src/command.c 27 Feb 2008 15:38:15 -0000
@@ -64,6 +64,7 @@
const char *t;
/* Tilde expansion */
+ path = unescape_string(path);
path_tilde = tilde_expand (path);
/* Leave space for further expansion */
diff -u -w -r1.151 file.c
--- ./src/file.c 25 Sep 2007 15:33:36 -0000 1.151
+++ ./src/file.c 5 Mar 2008 09:15:47 -0000
@@ -63,6 +63,7 @@
#include "widget.h"
#include "wtools.h"
#include "background.h" /* we_are_background */
+#include "util.h"
/* Needed for current_panel, other_panel and WTree */
#include "dir.h"
@@ -791,7 +807,7 @@
}
}
- if (!appending) {
+ if (!appending && ctx->preserve) {
while (mc_chmod (dst_path, (src_mode & ctx->umask_kill))) {
temp_status = file_error (
_(" Cannot chmod target file \"%s\" \n %s "), dst_path);
@@ -1872,6 +1890,8 @@
dest = temp2;
temp = NULL;
+ source_with_path = unescape_string(source_with_path);
+ dest = unescape_string(dest);
switch (operation) {
case OP_COPY:
/*
@@ -1963,6 +1983,9 @@
else {
char *temp2 = concat_dir_and_file (dest, temp);
+ source_with_path = unescape_string(source_with_path);
+ temp2 = unescape_string(temp2);
+
switch (operation) {
case OP_COPY:
/*

View File

@ -1,23 +0,0 @@
--- ./src/setup.c 26 Sep 2007 10:22:25 -0000 1.93
+++ ./src/setup.c 27 Feb 2008 18:48:37 -0000
@@ -216,6 +216,8 @@
{ "editor_option_typewriter_wrap", &option_typewriter_wrap },
{ "editor_edit_confirm_save", &edit_confirm_save },
{ "editor_syntax_highlighting", &option_syntax_highlighting },
+ { "editor_visible_tabs", &visible_tabs },
+ { "editor_visible_spaces", &visible_tws },
#endif /* USE_INTERNAL_EDIT */
{ "nice_rotating_dash", &nice_rotating_dash },
--- ./edit/edit.h 24 Sep 2007 09:28:35 -0000 1.88
+++ ./edit/edit.h 27 Feb 2008 18:48:37 -0000
@@ -298,6 +298,9 @@
extern int edit_confirm_save;
extern int column_highlighting;
+extern int visible_tabs;
+extern int visible_tws;
+
/* File names */
#define EDIT_DIR ".mc" PATH_SEP_STR "cedit"
#define SYNTAX_FILE EDIT_DIR PATH_SEP_STR "Syntax"

View File

@ -1,6 +1,6 @@
--- mc-4.6.2~git20080311/edit/editcmd.c.orig 2008-06-22 14:47:49.000000000 +0200
+++ mc-4.6.2~git20080311/edit/editcmd.c 2008-06-22 14:47:41.000000000 +0200
@@ -2076,6 +2076,33 @@
--- 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 "));
}
@ -34,7 +34,7 @@
/* call with edit = 0 before shutdown to close memory leaks */
void
edit_replace_cmd (WEdit *edit, int again)
@@ -2092,6 +2119,8 @@
@@ -2119,6 +2146,8 @@
int replace_continue;
int treplace_prompt = 0;
long times_replaced = 0, last_search;
@ -43,7 +43,7 @@
int argord[NUM_REPL_ARGS];
if (!edit) {
@@ -2145,7 +2174,68 @@
@@ -2172,7 +2201,68 @@
}
@ -113,7 +113,7 @@
const char *s;
int ord;
size_t i;
@@ -2176,6 +2266,12 @@
@@ -2203,6 +2293,12 @@
&& !replace_backwards)
edit->search_start++;
@ -126,7 +126,7 @@
do {
int len = 0;
long new_start;
@@ -2200,8 +2296,47 @@
@@ -2227,8 +2323,47 @@
replace_yes = 1;
@ -174,7 +174,7 @@
l = edit->curs_row - edit->num_widget_lines / 3;
if (l > 0)
edit_scroll_downward (edit, l);
@@ -2215,7 +2350,15 @@
@@ -2242,7 +2377,15 @@
/*so that undo stops at each query */
edit_push_key_press (edit);
@ -191,7 +191,7 @@
(edit->num_widget_columns -
CONFIRM_DLG_WIDTH) / 2,
edit->num_widget_lines * 2 /
@@ -2237,99 +2380,15 @@
@@ -2264,99 +2407,15 @@
replace_continue = 0;
break;
}
@ -297,7 +297,7 @@
}
/* so that we don't find the same string again */
if (replace_backwards) {
@@ -2358,6 +2417,12 @@
@@ -2385,6 +2444,12 @@
}
} while (replace_continue);

View File

@ -1,11 +0,0 @@
--- mc-4.6.2~git20080311/edit/editcmd.c.orig 2008-06-22 16:58:16.000000000 +0200
+++ mc-4.6.2~git20080311/edit/editcmd.c 2008-06-22 16:58:53.000000000 +0200
@@ -1721,7 +1721,7 @@
int found_start, match_bol, move_win = 0;
while (start + offset < last_byte) {
- match_bol = (offset == 0 || (*get_byte) (data, start + offset - 1) == '\n');
+ match_bol = (start == 0 || (*get_byte) (data, start + offset - 1) == '\n');
if (!move_win) {
p = start + offset;
q = 0;

View File

@ -1,5 +1,5 @@
--- mc-4.6.2~git20080311/edit/editcmd.c.orig 2008-06-23 01:48:03.000000000 +0200
+++ mc-4.6.2~git20080311/edit/editcmd.c 2008-06-23 01:58:32.000000000 +0200
--- 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]]
@ -33,7 +33,7 @@
/* 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 */
@@ -1581,7 +1607,7 @@
@@ -1582,7 +1608,7 @@
continue;
tmp = string[pmatch[i].rm_so];
string[pmatch[i].rm_so] = 0;
@ -42,7 +42,7 @@
string[pmatch[i].rm_so] = tmp;
pmatch[i].rm_so = new_o;
@@ -1589,7 +1615,7 @@
@@ -1590,7 +1616,7 @@
continue;
tmp = string[pmatch[i].rm_eo];
string[pmatch[i].rm_eo] = 0;

View File

@ -1,12 +0,0 @@
--- mc-4.6.2~git20080311/edit/editcmd.c.orig 2008-06-23 02:22:30.000000000 +0200
+++ mc-4.6.2~git20080311/edit/editcmd.c 2008-06-23 02:23:34.000000000 +0200
@@ -1570,7 +1570,8 @@
g_free (old_pattern);
old_pattern = 0;
}
- if (regcomp (&r, pattern, REG_EXTENDED | (icase ? REG_ICASE : 0))) {
+ if (regcomp (&r, pattern, REG_EXTENDED | (icase ? REG_ICASE : 0) |
+ REG_NEWLINE)) {
*found_len = 0;
return -3;
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5c9767d297e99f30adf8dd0fb662eb4fe14c6c19e400e5f29b8f9b54fc2d31fd
size 2967846

3
mc-4.6.2.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8762d46a8107ef86d55ccaa54128331e06e48dbf998515a627caaaa48132ee86
size 2548118

View File

@ -1,33 +0,0 @@
--- mc-4.6.2-pre1/src/cmd.c
+++ mc-4.6.2-pre1/src/cmd.c
@@ -1229,7 +1229,7 @@
sync_profiles ();
str = g_strconcat ( _(" Setup saved to ~/"), PROFILE_NAME, (char *) NULL);
- message (0, _(" Setup "), str);
+ message (0, _(" Setup "), "%s", str);
g_free (str);
}
--- mc-4.6.2-pre1/src/hotlist.c
+++ mc-4.6.2-pre1/src/hotlist.c
@@ -1475,7 +1475,7 @@
msg = g_strconcat (_("MC was unable to write ~/"), HOTLIST_FILENAME,
_(" file, your old hotlist entries were not deleted"), (char *) NULL);
- message (D_ERROR, _(" Hotlist Load "), msg);
+ message (D_ERROR, _(" Hotlist Load "), "%s", msg);
g_free (msg);
}
} else {
--- mc-4.6.2-pre1/vfs/smbfs.c
+++ mc-4.6.2-pre1/vfs/smbfs.c
@@ -566,7 +566,7 @@
if (p)
my_remote = p; /* strip off share/service name */
/* create remote filename as understood by smb clientgen */
- result = g_strconcat (my_remote, trailing_asterik ? "/*" : "", 0);
+ result = g_strconcat (my_remote, trailing_asterik ? "/*" : "", (char *) NULL);
unix_to_dos (result, /* inplace = */ 1); /* code page conversion */
str_replace(result, '/', '\\');
return result;

View File

@ -1,14 +0,0 @@
--- src/x11conn.c
+++ src/x11conn.c
@@ -135,6 +135,11 @@
x11_module = g_module_open (x11_module_fname, G_MODULE_BIND_LAZY);
g_free (x11_module_fname);
+ /* loading libX11 via g_module seems to be a bad idea,
+ this hack fixes it at least for openSUSE */
+ if (x11_module == NULL)
+ x11_module = g_module_open ("libX11.so.6", G_MODULE_BIND_LAZY);
+
if (x11_module == NULL)
return FALSE;

View File

@ -41,7 +41,7 @@
View=%view{ascii} ogginfo %s
regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
@@ -417,12 +417,12 @@
@@ -420,12 +420,12 @@
# Postscript
type/^PostScript
@ -56,7 +56,7 @@
#Open=(acroread %f &)
#Open=(ghostview %f &)
View=%view{ascii} pdftotext %f -
@@ -437,54 +437,53 @@
@@ -440,54 +440,53 @@
# StarOffice 5.2
shell/.sdw
@ -68,7 +68,7 @@
- Open=(ooffice %f &)
+regex/\.(odb|odc|odf|odg|odi|odm|odp|ods|odt|otg|oth|otp|ots|ott|sda|sdc|sdd|sdp|sds|sdw|sgl|smf|stc|std|sti|stw|sxc|sxd|sxg|sxi|sxm|sxw|vor)$
+ Open=(ooffice %f >/dev/null 2>&1 &)
View=%view{ascii} unzip -p %f content.xml | o3totxt
View=%view{ascii} odt2txt %f
# AbiWord
shell/.abw

View File

@ -1,6 +1,6 @@
--- edit/editdraw.c
+++ edit/editdraw.c
@@ -354,8 +354,13 @@
@@ -356,8 +356,13 @@
if (use_colors && visible_tabs) {
c = (p->style & ~MOD_CURSOR) | MOD_WHITESPACE;
if (i > 2) {
@ -16,7 +16,7 @@
p++;
while (--i > 1) {
p->style = c;
@@ -378,8 +383,13 @@
@@ -380,8 +385,13 @@
p++;
}
} else if (use_colors && visible_tws && q >= tws) {
@ -32,7 +32,7 @@
p++;
c = p->style & ~MOD_CURSOR;
while (--i) {
@@ -388,7 +398,7 @@
@@ -390,7 +400,7 @@
p++;
}
} else {
@ -41,7 +41,7 @@
c = p->style & ~MOD_CURSOR;
p++;
while (--i) {
@@ -399,7 +409,7 @@
@@ -401,7 +411,7 @@
}
break;
case ' ':

View File

@ -1,227 +0,0 @@
--- src/achown.c
+++ src/achown.c
@@ -265,7 +265,7 @@
/* get and put user names in the listbox */
setpwent ();
while ((chl_pass = getpwent ())) {
- listbox_add_item (chl_list, LISTBOX_APPEND_AT_END, 0,
+ listbox_add_item (chl_list, LISTBOX_APPEND_SORTED, 0,
chl_pass->pw_name, NULL);
}
endpwent ();
@@ -275,7 +275,7 @@
/* get and put group names in the listbox */
setgrent ();
while ((chl_grp = getgrent ())) {
- listbox_add_item (chl_list, LISTBOX_APPEND_AT_END, 0,
+ listbox_add_item (chl_list, LISTBOX_APPEND_SORTED, 0,
chl_grp->gr_name, NULL);
}
endgrent ();
--- src/chown.c
+++ src/chown.c
@@ -180,14 +180,14 @@
/* get and put user names in the listbox */
setpwent ();
while ((l_pass = getpwent ())) {
- listbox_add_item (l_user, 0, 0, l_pass->pw_name, NULL);
+ listbox_add_item (l_user, LISTBOX_APPEND_SORTED, 0, l_pass->pw_name, NULL);
}
endpwent ();
/* get and put group names in the listbox */
setgrent ();
while ((l_grp = getgrent ())) {
- listbox_add_item (l_group, 0, 0, l_grp->gr_name, NULL);
+ listbox_add_item (l_group, LISTBOX_APPEND_SORTED, 0, l_grp->gr_name, NULL);
}
endgrent ();
--- src/widget.c
+++ src/widget.c
@@ -2402,8 +2402,6 @@
else
l->height = height;
l->count = 0;
- l->top = 0;
- l->current = 0;
l->cback = callback;
l->allow_duplicates = 1;
l->scrollbar = slow_terminal ? 0 : 1;
@@ -2443,6 +2441,22 @@
e->next = l->current->next;
l->current->next->prev = e;
l->current->next = e;
+ } else if (pos == LISTBOX_APPEND_SORTED) {
+ WLEntry *w = l->list;
+
+ while (w->next != l->list && strcmp (e->text, w->text) > 0)
+ w = w->next;
+ if (w->next == l->list) {
+ e->prev = w;
+ e->next = l->list;
+ w->next = e;
+ l->list->prev = e;
+ } else {
+ e->next = w;
+ e->prev = w->prev;
+ w->prev->next = e;
+ w->prev = e;
+ }
}
l->count++;
}
--- src/widget.h
+++ src/widget.h
@@ -181,7 +181,8 @@
enum append_pos {
LISTBOX_APPEND_AT_END, /* append at the end */
LISTBOX_APPEND_BEFORE, /* insert before current */
- LISTBOX_APPEND_AFTER /* insert after current */
+ LISTBOX_APPEND_AFTER, /* insert after current */
+ LISTBOX_APPEND_SORTED /* insert alphabetically */
};
char *listbox_add_item (WListbox *l, enum append_pos pos, int
--- vfs/direntry.c
+++ vfs/direntry.c
@@ -447,7 +447,6 @@
CALL (free_archive) (me, super);
g_free (super->name);
- super->name = NULL;
g_free(super);
}
--- vfs/fish.c
+++ vfs/fish.c
@@ -355,6 +355,7 @@
struct vfs_s_entry *ent = NULL;
FILE *logfile;
char *quoted_path;
+ int reply_code;
logfile = MEDATA->logfile;
@@ -365,6 +366,8 @@
quoted_path = name_quote (remote_path, 0);
fish_command (me, super, NONE,
"#LIST /%s\n"
+ "if ls -1 /%s >/dev/null 2>&1 ;\n"
+ "then\n"
"ls -lLan /%s 2>/dev/null | grep '^[^cbt]' | (\n"
"while read p l u g s m d y n; do\n"
"echo \"P$p $u.$g\nS$s\nd$m $d $y\n:$n\n\"\n"
@@ -375,8 +378,11 @@
"echo \"P$p $u.$g\nE$a$i\nd$m $d $y\n:$n\n\"\n"
"done\n"
")\n"
- "echo '### 200'\n",
- remote_path, quoted_path, quoted_path);
+ "echo '### 200'\n"
+ "else\n"
+ "echo '### 500'\n"
+ "fi\n",
+ remote_path, quoted_path, quoted_path, quoted_path);
g_free (quoted_path);
ent = vfs_s_generate_entry(me, NULL, dir, 0);
while (1) {
@@ -455,17 +461,21 @@
}
vfs_s_free_entry (me, ent);
- me->verrno = E_REMOTE;
- if (fish_decode_reply(buffer+4, 0) == COMPLETE) {
+ reply_code = fish_decode_reply(buffer + 4, 0);
+ if (reply_code == COMPLETE) {
g_free (SUP.cwdir);
SUP.cwdir = g_strdup (remote_path);
print_vfs_message (_("%s: done."), me->name);
return 0;
+ } else if (reply_code == ERROR) {
+ me->verrno = EACCES;
+ } else {
+ me->verrno = E_REMOTE;
}
error:
print_vfs_message (_("%s: failure"), me->name);
- return 1;
+ return -1;
}
static int
@@ -618,25 +628,39 @@
g_free (name);
name = quoted_name;
fh->u.fish.append = 0;
+
+ /*
+ * Check whether the remote file is readable by using `dd' to copy
+ * a single byte from the remote file to /dev/null. If `dd' completes
+ * with exit status of 0 use `cat' to send the file contents to the
+ * standard output (i.e. over the network).
+ */
offset = fish_command (me, FH_SUPER, WANT_STRING,
"#RETR /%s\n"
+ "if dd if=/%s of=/dev/null bs=1 count=1 2>/dev/null ;\n"
+ "then\n"
"ls -ln /%s 2>/dev/null | (\n"
"read p l u g s r\n"
"echo \"$s\"\n"
")\n"
"echo '### 100'\n"
"cat /%s\n"
- "echo '### 200'\n",
- name, name, name );
+ "echo '### 200'\n"
+ "else\n"
+ "echo '### 500'\n"
+ "fi\n",
+ name, name, name, name );
g_free (name);
if (offset != PRELIM) ERRNOR (E_REMOTE, 0);
fh->linear = LS_LINEAR_OPEN;
fh->u.fish.got = 0;
-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 || (defined _LARGE_FILES && _LARGE_FILES)
- if (sscanf( reply_str, "%llu", &fh->u.fish.total )!=1)
+ errno = 0;
+#if SIZEOF_OFF_T == SIZEOF_LONG
+ fh->u.fish.total = strtol (reply_str, NULL, 10);
#else
- if (sscanf( reply_str, "%u", &fh->u.fish.total )!=1)
+ fh->u.fish.total = strtoll (reply_str, NULL, 10);
#endif
+ if (errno != 0)
ERRNOR (E_REMOTE, 0);
return 1;
}
@@ -760,7 +784,7 @@
POSTFIX(OPT_FLUSH);
}
-#define FISH_OP(name, chk, string) \
+#define FISH_OP(name, string) \
static int fish_##name (struct vfs_class *me, const char *path1, const char *path2) \
{ \
char buf[BUF_LARGE]; \
@@ -786,13 +810,12 @@
return fish_send_command(me, super2, buf, OPT_FLUSH); \
}
-#define XTEST if (bucket1 != bucket2) { ERRNOR (EXDEV, -1); }
-FISH_OP(rename, XTEST, "#RENAME /%s /%s\n"
- "mv /%s /%s 2>/dev/null\n"
- "echo '### 000'" )
-FISH_OP(link, XTEST, "#LINK /%s /%s\n"
- "ln /%s /%s 2>/dev/null\n"
- "echo '### 000'" )
+FISH_OP(rename, "#RENAME /%s /%s\n"
+ "mv /%s /%s 2>/dev/null\n"
+ "echo '### 000'" )
+FISH_OP(link, "#LINK /%s /%s\n"
+ "ln /%s /%s 2>/dev/null\n"
+ "echo '### 000'" )
static int fish_symlink (struct vfs_class *me, const char *setto, const char *path)
{

View File

@ -1,6 +1,6 @@
--- src/util.c
+++ src/util.c
@@ -1193,6 +1193,8 @@
@@ -1205,6 +1205,8 @@
/* strchr() matches trailing binary 0 */
while (*(++r) && strchr ("0123456789;?", *r));
}

View File

@ -1,6 +1,6 @@
--- src/key.c
+++ src/key.c
@@ -233,6 +233,11 @@
@@ -234,6 +234,11 @@
{ KEY_F(9), ESC_STR "[20~", MCKEY_NOACTION },
{ KEY_F(10), ESC_STR "[21~", MCKEY_NOACTION },

View File

@ -1,16 +0,0 @@
--- edit/editlock.c
+++ edit/editlock.c
@@ -69,9 +69,11 @@
lock_build_name (void)
{
char host[BUF_SIZE];
- const char *user;
+ const char *user = NULL;
+ struct passwd *pw;
- user = getpwuid (getuid ())->pw_name;
+ pw = getpwuid (getuid ());
+ if (pw) user = pw->pw_name;
if (!user) user = getenv ("USER");
if (!user) user = getenv ("USERNAME");
if (!user) user = getenv ("LOGNAME");

View File

@ -1,5 +1,5 @@
--- mc-4.6.2-pre1/lib/mc.menu
+++ mc-4.6.2-pre1/lib/mc.menu
--- mc-4.6.2/lib/mc.menu
+++ mc-4.6.2/lib/mc.menu
@@ -186,6 +186,33 @@
fi
echo "Please test the output file before deleting anything"

View File

@ -1,11 +1,11 @@
--- syntax/Syntax
+++ syntax/Syntax
@@ -76,7 +76,7 @@
file ..\*\.(texi|texinfo|TEXI|TEXINFO)$ Texinfo\sDocument
include texinfo.syntax
-file ..\*\\.([chC]|CC|cxx|cc|cpp|CPP|CXX|hxx|h\.in)$ C/C\+\+\sProgram
+file ..\*\\.([chC]|CC|cxx|cc|cpp|CPP|CXX|hxx|hpp|HPP|h\.in)$ C/C\+\+\sProgram
@@ -79,7 +79,7 @@
file ..\*\\.c$ C\sProgram
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|hpp|HPP|h\.in)$ C/C\+\+\sProgram
include cxx.syntax
file ..\*\\.d$ D\sProgram

View File

@ -1,7 +1,7 @@
Index: mc-4.6.2~git20080311/src/main.c
===================================================================
--- mc-4.6.2~git20080311.orig/src/main.c 2008-05-18 14:10:20.000000000 +0200
+++ mc-4.6.2~git20080311/src/main.c 2008-05-18 14:11:06.000000000 +0200
================================================================================
--- 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;
@ -12,10 +12,10 @@ Index: mc-4.6.2~git20080311/src/main.c
/* mc_home: The home of MC */
char *mc_home = NULL;
@@ -2141,6 +2144,16 @@
/* if on, it displays the information that files have been moved to ~/.mc */
int show_change_notice = 0;
@@ -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;
@ -29,23 +29,52 @@ Index: mc-4.6.2~git20080311/src/main.c
/* We had LC_CTYPE before, LC_ALL includs LC_TYPE as well */
setlocale (LC_ALL, "");
bindtextdomain ("mc", LOCALEDIR);
Index: mc-4.6.2~git20080311/src/widget.c
===================================================================
--- mc-4.6.2~git20080311.orig/src/widget.c 2008-05-18 14:10:20.000000000 +0200
+++ mc-4.6.2~git20080311/src/widget.c 2008-05-18 14:10:26.000000000 +0200
@@ -1946,52 +1946,86 @@
--- 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);
+/* Vertical scrollbar widget */
-
-static void
-listbox_drawscroll (WListbox *l)
+void
@ -162,34 +191,9 @@ Index: mc-4.6.2~git20080311/src/widget.c
}
/* Returns the number of items between s and e,
Index: mc-4.6.2~git20080311/src/screen.c
===================================================================
--- mc-4.6.2~git20080311.orig/src/screen.c 2008-05-18 14:10:20.000000000 +0200
+++ mc-4.6.2~git20080311/src/screen.c 2008-05-18 14:10:26.000000000 +0200
@@ -889,6 +889,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);
@@ -1489,7 +1492,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);
Index: mc-4.6.2~git20080311/src/widget.h
===================================================================
--- mc-4.6.2~git20080311.orig/src/widget.h 2008-05-18 14:10:20.000000000 +0200
+++ mc-4.6.2~git20080311/src/widget.h 2008-05-18 14:10:26.000000000 +0200
@@ -169,6 +169,10 @@
--- 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);
@ -200,15 +204,3 @@ Index: mc-4.6.2~git20080311/src/widget.h
/* search text int listbox entries */
WLEntry *listbox_search_text (WListbox *l, const char *text);
void listbox_select_entry (WListbox *l, WLEntry *dest);
Index: mc-4.6.2~git20080311/src/main.h
===================================================================
--- mc-4.6.2~git20080311.orig/src/main.h 2008-02-19 18:25:27.000000000 +0100
+++ mc-4.6.2~git20080311/src/main.h 2008-05-18 14:10:26.000000000 +0200
@@ -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;

View File

@ -1,6 +1,6 @@
--- src/screen.c
+++ src/screen.c
@@ -669,7 +669,7 @@
@@ -671,7 +671,7 @@
SLsmg_write_nwchars (((wchar_t *) buffer)
+ txtlen - n2, n2);
} else

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
--- lib/mc.ext.in
+++ lib/mc.ext.in
@@ -449,12 +449,17 @@
@@ -452,12 +452,17 @@
Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
# Microsoft Word Document

View File

@ -1,6 +1,6 @@
--- lib/mc.ext.in
+++ lib/mc.ext.in
@@ -432,8 +432,8 @@
@@ -435,8 +435,8 @@
# html
regex/\.([hH][tT][mM][lL]?)$

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Feb 12 14:42:05 CET 2009 - nadvornik@suse.cz
- updated to final 4.6.2:
* many patches mentioned bellow were included upstream
-------------------------------------------------------------------
Thu Nov 27 11:14:29 CET 2008 - nadvornik@suse.cz

40
mc.spec
View File

@ -1,7 +1,7 @@
#
# spec file for package mc (Version 4.6.2.pre1)
# spec file for package mc (Version 4.6.2)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -25,10 +25,10 @@ License: GPL v2 or later
Group: Productivity/File utilities
PreReq: permissions
AutoReqProv: on
Version: 4.6.2.pre1
Release: 121
Version: 4.6.2
Release: 1
Summary: Midnight Commander
Source: mc-4.6.2-pre1.tar.bz2
Source: mc-4.6.2.tar.bz2
Source1: x11_browser
Source2: %name.desktop
Source3: %name.png
@ -43,38 +43,26 @@ Patch7: mc-palmsupport.patch
Patch8: mc-word_docs.patch
Patch9: mc-x11browser.diff
Patch10: mc-no-nb.diff
Patch11: mc-NULL.patch
Patch12: mc-wrapper.patch
Patch13: mc-getpwuid.patch
Patch14: mc-syntax-hpp.patch
Patch15: mc-utf8-nlink.patch
Patch16: mc-esc-seq.patch
Patch17: mc-rpm.patch
Patch18: mc-cursor-appearance.patch
Patch19: mc-cvs-fixes.patch
Patch20: mc-f-keys.patch
#debian fixes for utf8
Patch22: mc-utf8-look-and-feel.patch
#debian fixes for vfs
Patch23: 01_ftpfs_symlink.patch
Patch24: 02_ignore_ftp_chmod_error.patch
Patch25: 03_fix_whitespace_via_fish.patch
Patch26: 04_error_on_copymove_over_fish.patch
Patch28: 05_add_lzma_support.patch
Patch30: 06_remove_obsolete_rpm_tags.patch
Patch32: 08_improved_u7z_support.patch
Patch33: 09_choose_correct_urar.patch
#other debian fixes
Patch34: 28_mc-dontrewrite.patch
Patch35: 61_escaping.patch
Patch36: 64_visible_tabs.patch
Patch37: 99a_fix-regex-bol-match.patch
Patch38: 99b_fix-regex-pattern-lengths.patch
Patch39: 99c_fix-regex-newline-match.patch
Patch40: 99_regexp-replace-fixed.patch
Patch41: 100_fix_bashisms.patch
#
Patch42: mc-X11.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://www.ibiblio.org/mc/
Requires: %{name}-lang = %{version}
@ -138,7 +126,7 @@ Authors:
%lang_package
%prep
%setup -q -n mc-4.6.2-pre1
%setup -q
%patch0 -p 1
%patch1 -p 1
%patch2 -p 1
@ -150,34 +138,21 @@ Authors:
%patch8
%patch9
%patch10
%patch11 -p 1
%patch12
%patch13
%patch14
%patch15
%patch16
%patch17
%patch18
%patch19
%patch20
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch28 -p1
%patch30 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch38 -p1
%patch39 -p1
%patch40 -p1
%patch41 -p1
%patch42
%build
pushd po
@ -278,6 +253,9 @@ rm -rf %{buildroot}
%files lang -f %{name}.lang
%changelog
* Thu Feb 12 2009 nadvornik@suse.cz
- updated to final 4.6.2:
* many patches mentioned bellow were included upstream
* Thu Nov 27 2008 nadvornik@suse.cz
- added desktop file [bnc#434809]
* Thu Oct 09 2008 nadvornik@suse.cz