Re: [BUG] urar extfs in mc-4.6.0-pre2

2003-01-02 Thread Tomas Styblo
* Tomas Styblo <[EMAIL PROTECTED]> [Thu, 02 Jan 2003]:
> New version of the bugfix is attached.

I have to reply to my own post.

This is an update to the patch.

I looked up the "test" command in the standard and noticed that the
"-o" option is an XSI extension.

The lines

if test $? -eq $RET_CMD_NOT_FOUND -o $? -eq $RET_CMD_NOT_EXEC; then

were changed to

if test $? -eq $RET_CMD_NOT_FOUND || test $? -eq $RET_CMD_NOT_EXEC; then

-- 
Tomas Styblo <[EMAIL PROTECTED]>
PGP: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC97EA4B6

diff -purN mc-4.6.0-pre2/vfs/extfs/urar.in mc-4.6.0-pre2.new/vfs/extfs/urar.in
--- mc-4.6.0-pre2/vfs/extfs/urar.in Thu Dec 12 15:08:25 2002
+++ mc-4.6.0-pre2.new/vfs/extfs/urar.in Fri Jan  3 06:58:54 2003
@@ -7,16 +7,25 @@
 # beta version 2.0
 #
 RAR=rar
-UNRAR=unrar # Prefer unrar (freeware)
+UNRAR=unrarx # Prefer unrar (freeware)
+RET_CMD_NOT_EXEC=126
+RET_CMD_NOT_FOUND=127
 #
 # NOTE: rar ver 2.0 by Eugene Roshal
 # ftp.elf.stuba.sk/pub/pc/pack
 #
 
-if ! unrar >/dev/null 2>&1; then
+$UNRAR >/dev/null 2>&1
+if test $? -eq $RET_CMD_NOT_FOUND || test $? -eq $RET_CMD_NOT_EXEC; then
 UNRAR=$RAR
+$UNRAR >/dev/null 2>&1
+if test $? -eq $RET_CMD_NOT_FOUND || test $? -eq $RET_CMD_NOT_EXEC; then
+echo "Cannot find rar or unrar in system PATH" >&2
+exit 1
+fi
 fi
 
+
 mcrarfs_list ()
 {
  $UNRAR v -c- "$1" | @AWK@ -v uid=${UID-0} '



Re: [BUG] urar extfs in mc-4.6.0-pre2

2003-01-02 Thread Tomas Styblo
* Pavel Roskin <[EMAIL PROTECTED]> [Thu, 02 Jan 2003]:
> > Unfortunatelly which is not portable.  I don't know is it
> > documented in unrar to return 7 if it was called without
> > arguments, or this is some random value dependent on compiler,
> > architecture and temperature.
> 
> However, if unrar is missing, the error code is always the same
> (130 if I remember correctly) under every shell, so you can test
> it.

This is what SUSv3 says:

~~~ SNIP ~~~
If a command is not found, the exit status shall be 127. If the
command name is found, but it is not an executable utility, the
exit status shall be 126.
~~~ SNIP ~~~

Return value 130 would mean the process was killed by SIGINT.

> You can also find a simplified PATH search in shell in the
> "bootstrap" script in CVS automake.

It's less complicated to just test the return value.

New version of the bugfix is attached.

-- 
Tomas Styblo <[EMAIL PROTECTED]>
PGP: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC97EA4B6

diff -purN mc-4.6.0-pre2/vfs/extfs/urar.in mc-4.6.0-pre2.new/vfs/extfs/urar.in
--- mc-4.6.0-pre2/vfs/extfs/urar.in Thu Dec 12 15:08:25 2002
+++ mc-4.6.0-pre2.new/vfs/extfs/urar.in Thu Jan  2 23:45:15 2003
@@ -8,15 +8,24 @@
 #
 RAR=rar
 UNRAR=unrar # Prefer unrar (freeware)
+RET_CMD_NOT_EXEC=126
+RET_CMD_NOT_FOUND=127
 #
 # NOTE: rar ver 2.0 by Eugene Roshal
 # ftp.elf.stuba.sk/pub/pc/pack
 #
 
-if ! unrar >/dev/null 2>&1; then
+$UNRAR >/dev/null 2>&1
+if test $? -eq $RET_CMD_NOT_FOUND -o $? -eq $RET_CMD_NOT_EXEC; then
 UNRAR=$RAR
+$UNRAR >/dev/null 2>&1
+if test $? -eq $RET_CMD_NOT_FOUND -o $? -eq $RET_CMD_NOT_EXEC; then
+echo "Cannot find rar or unrar in system PATH" >&2
+exit 1
+fi
 fi
 
+
 mcrarfs_list ()
 {
  $UNRAR v -c- "$1" | @AWK@ -v uid=${UID-0} '



Re: [BUG] urar extfs in mc-4.6.0-pre2

2003-01-02 Thread Tomas Styblo
* Andrew V. Samoilov <[EMAIL PROTECTED]> [Thu, 02 Jan 2003]:
> Unfortunatelly which is not portable.  I don't know is it documented in 
> unrar to return 7 if it was called without arguments, or this is some 
> random value dependent on compiler, architecture and temperature.

It definitely is not documented in the documentation that comes
with the package.

-- 
Tomas Styblo <[EMAIL PROTECTED]>
PGP: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC97EA4B6
___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



Re: [PATCH] lynx-like jumpkeys

2003-01-02 Thread Tomas Styblo
* Pavel Machek <[EMAIL PROTECTED]> [Wed, 25 Dec 2002]:
> Timeout breaks randomly on overloaded systems
> and slow networks. Bad idea. 

I agree that the slow network argument is good.

> What about non-number key ending "move-by-number"
> mode? No timeouts neccessary.

Good idea. I'll try to implement that.

> I still dont see how it is better than C-S, through.

Dead Can Dance - Spiritchaser [01] - Nierika.mp3
Dead Can Dance - Spiritchaser [02] - Song Of The Stars.mp3
Dead Can Dance - Spiritchaser [03] - Indus.mp3
Dead Can Dance - Spiritchaser [04] - Song Of The Dispossessed.mp3
Dead Can Dance - Spiritchaser [05] - Dedicace Outo.mp3
Dead Can Dance - Spiritchaser [06] - Snake And The Moon.mp3
Dead Can Dance - Spiritchaser [07] - Song Of The Nile.mp3
Dead Can Dance - Spiritchaser [08] - Devorzhum.mp3
Dead Can Dance - Within The Realm Of A Dying Sun [01] - Anywhere Out Of ~.mp3
Dead Can Dance - Within The Realm Of A Dying Sun [02] - Windfall.mp3
Dead Can Dance - Within The Realm Of A Dying Sun [03] - In The Wake Of Ad~.mp3
Dead Can Dance - Within The Realm Of A Dying Sun [04] - Xavier.mp3
Dead Can Dance - Within The Realm Of A Dying Sun [05] - Dawn Of The Icono~.mp3
Dead Can Dance - Within The Realm Of A Dying Sun [06] - Cantara.mp3
Dead Can Dance - Within The Realm Of A Dying Sun [07] - Summoning Of The ~.mp3
Dead Can Dance - Within The Realm Of A Dying Sun [08] - Persephone.mp3



Additionaly, CTRL+S does not work in listboxes. I personally like
this feature especially in the directory hotlist listbox. It's very
convenient to remember those numbers and switch to a directory
quickly just by typing CTRL + / + 15 + ENTER.

Of course it would be possible to split the patch into two pieces.
The first one implementing the jumpkeys in panels and the second one
implementing them in listboxes.

-- 
Tomas Styblo <[EMAIL PROTECTED]>
PGP: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC97EA4B6
___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



Fwd: pre2 problem with gcc option

2003-01-02 Thread Pavel Roskin
Hello!

Forwarded by request of the author.
Please look at it - it should be trivial (but not over v32terbo :-)).
Maybe this option breaks ABI compatibility - then it's not a bug.

- Forwarded message from [EMAIL PROTECTED] -
Date: Tue, 31 Dec 2002 17:03:20 -0500 (EST)
From: Harka Steinhart <[EMAIL PROTECTED]>
 Subject: pre2 problem with gcc option
  To: [EMAIL PROTECTED]

Hi there,

I downloaded MC/pre2 and found an apparent bug after compiling it:

When compiled with -mdouble-align, MC does not funtion correctly, namely
all file sizes are displayed the same (some number like 16000G) and
viewing, editing or anything else does not work (file empty etc.). It is
specifically this option that causes the problem...I tracked it down by
adding one option at a time and no problems until this one. Took it back
out again...no problem.

This is what I am using: Slackware 8.1 (upgraded to --current), 2.4.19,
gcc 3.2.1, glibc 2.3.1, and I am using these compiler-options:

CFLAGS=-march=pentium-mmx -mcpu=pentium-mmx -funroll-all-loops
-fno-exceptions -fomit-frame-pointer -malign-double -mmmx -O3

If you can take a look at this, I'd appreciate it. Btw., thanx for working
on MC...it's my favorite program :-)

Happy New Year!

Harka




- End forwarded message -


-- 
Regards,
Pavel Roskin
___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



Re: [BUG] urar extfs in mc-4.6.0-pre2

2003-01-02 Thread Pavel Roskin
Hello!

> Unfortunatelly which is not portable.  I don't know is it documented in
> unrar to return 7 if it was called without arguments, or this is some
> random value dependent on compiler, architecture and temperature.

However, if unrar is missing, the error code is always the same (130 if I
remember correctly) under every shell, so you can test it.

You can also find a simplified PATH search in shell in the "bootstrap" script in
CVS automake.

-- 
Regards,
Pavel Roskin
___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



mc 4.60 manpage corrections.

2003-01-02 Thread Delanoy Frédéric
Hello.

Here are some typos and formatting corrections pertaining to mc-4.6.0-pre1
I hope it helps...

--- mc.12002-10-03 16:38:43.0 +0200
+++ mc-new.12002-12-29 19:05:30.0 +0100
@@ -627,3 +627,3 @@
 menus.
-.B ("Above"
+.BR ( "Above"
 and
@@ -680,3 +680,3 @@
 .B type,
-displays a one character field type.  This character is similar to
+displays a one character wide type field.  This character is similar to
 what is displayed by ls with the -F flag -
@@ -871,4 +871,4 @@
 .PP
-this command prompts for a command
-and it's arguments (the argument defaults to the currently selected
+This command prompts for a command
+and its arguments (the argument defaults to the currently selected
 file name), the output from such command is shown in the internal file
@@ -1738,3 +1738,3 @@
 If some keys do not work properly then you won't see OK appear after
-pressing that key.  Then you may want to redefine it.  Do it by pressing
+pressing one of these.  Then you may want to redefine it.  Do it by pressing
 the button with the name of that key (either by the mouse or by Enter
@@ -2245,3 +2245,3 @@
 file/directory being copied. The default action is to copy
-it's content into that directory, by enabling this
+its content into that directory, by enabling this
 you can copy the source directory into that directory.
@@ -2462,3 +2462,3 @@
 copies to the file
-.B cooledit.clip and
+.BR cooledit.clip and
 .B Shift-Ins
@@ -2483,3 +2483,4 @@
 like by pressing that key. The macro is executed when you press
-.B Ctrl-A and then the assigned key. The macro is also executed if
+.B Ctrl-A
+and then the assigned key. The macro is also executed if
 you press Meta, Ctrl, or Esc and the assigned key, provided that the
@@ -2534,3 +2535,3 @@
 matches the number given, which is not always a real match. Scanf also
-treats whitespace as being elastic.  Note that the scanf format % is
+treats whitespace as being elastic.  Note that the scanf format %[ is
 very useful for scanning strings, and whitespace.
@@ -2579,3 +2580,3 @@
 canceling keys
-.B Esc,
+.BR Esc ,
 .B F10
@@ -2719,3 +2720,3 @ The
-.I user,
+.IR user ,
 .I options
@@ -2758,3 +2759,3 @@
 The
-.I user, port
+.IR user ", " port
 and
@@ -2768,3 +2769,3 @@
 .I port
-element is used when the remote machine running on a special port
+element is used when the remote server is running on a special port
 (see the mcserv(8) manual page for more information about ports);
@@ -2821,3 +2822,3 @@
 The
-.I username, domain
+.IR username , domain
 and
@@ -3025,3 +3026,3 @@
 .IP
-set special treatment for '+', '-', '*' in command line (select,
+Set special treatment for '+', '-', '*' in command line (select,
 unselect, reverse selection) only if command line is empty. No need to
@@ -3029,2 +3030,3 @@
 change selection when command line is not empty.
+.PP
 .I panel_scroll_pages
@@ -3124,3 +3126,3 @@
 The program will retrieve all of its information relative to the
-MC_LIBDIR environment variable, if this variable is not set, then it will
+MC_LIBDIR environment variable; if this variable is not set, it will
 fall back to the /usr/lib/mc directory.

___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



Re: [BUG] Hintbar switch off in 4.6.0-pre2

2003-01-02 Thread Pavel Machek
Hi!

> When I'm switching off the hintbar via Options->Layout,
> the hintbar text starts to appear at the upper left corner of Linux
> console.

Its a feature; ftpfs progress is displayed there
even if hintbar is off.
-- 
Pavel
Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need...

___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



Re: [PATCH] lynx-like jumpkeys

2003-01-02 Thread Pavel Machek
Hi!

> > Relying on timeout seems like bad idea to me.
> > Its against UI guidelines (they say things should
> > not depend on timing, except in games).
> 
> That makes sense in general. That's why these timeout based
> features should be optional.

Being optional is not excuse for breaking guidelines.

> > Mutt cerainly waits for you to press , no timeouts there.
> 
> It the app waits for enter, then it also must provide an
> additional visual feedback - display the processed numbers
> somewhere (like mutt does). 
> 
> The timeout based solution has the advantage, that it provides the
> visual feedback, because the selection cursor moves immediately
> as the keys are pressed.
... 
> Implementing that enter based approach would also be much more
> complicated, you would need an additional text input widget
> somewhere. It also has no advantage for those people who don't
> mind the timeout. It only imposes an unnecessary additional key
> press on them.

Timeout breaks randomly on overloaded systems
and slow networks. Bad idea. What about
non-number key ending "move-by-number"
mode? No timeouts neccessary.

I still dont see how it is better than C-S, through.
-- 
Pavel
Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need...

___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



Re: [BUG] urar extfs in mc-4.6.0-pre2

2003-01-02 Thread Andrew V. Samoilov
Tomas Styblo wrote:

* Dmitry Semyonov <[EMAIL PROTECTED]> [Mon, 30 Dec 2002]:


I have only unrar installed. This shall be enough to brouse rar
archives and to extract files from them.  I'll try to upgrade to
unrar 3.x (after Jan,9), and see how it works.  But even if it
will work, do you think it is OK to use such unrar detection
code that can't properly detect old versions of unrar inside
urar extfs script?



The problem is not that mc can't find the unrar executable.

There is a bug in the new urar script.

The pre1 version of the script goes like:

DRAR=/usr/bin
RAR=$DRAR/rar
UNRAR=$DRAR/unrar # Prefer unrar (freeware)


The pre2 version goes like:

RAR=rar
UNRAR=unrar # Prefer unrar (freeware)
if ! unrar >/dev/null 2>&1; then
UNRAR=$RAR
fi


Therefore it fails if the rar executable is not present in the
system, because the "if ! unrar" test always fails. It always
fails, because unrar exits with code "7" if it is called with no
arguments.

Both the rar and unrar executables are installed by default if you
use the above mentioned version 3 of the rar package. It's
probably the easiest solution for you now. But the urar script of
course should be fixed.

The bugfix patch is attached to this message.





diff -purN mc-4.6.0-pre2/vfs/extfs/urar.in mc-4.6.0-pre2.new/vfs/extfs/urar.in
--- mc-4.6.0-pre2/vfs/extfs/urar.in	Thu Dec 12 15:08:25 2002
+++ mc-4.6.0-pre2.new/vfs/extfs/urar.in	Mon Dec 30 00:57:01 2002
@@ -6,17 +6,22 @@
 #Andrew V. Samoilov <[EMAIL PROTECTED]> 2000
 # beta version 2.0
 #
-RAR=rar
-UNRAR=unrar # Prefer unrar (freeware)
+RAR=`which rar 2>/dev/null`
+UNRAR=`which unrar 2>/dev/null` # Prefer unrar (freeware)


Unfortunatelly which is not portable.  I don't know is it documented in 
unrar to return 7 if it was called without arguments, or this is some 
random value dependent on compiler, architecture and temperature.

--
Regards,
Andrew V. Samoilov



___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel