Re: heax search (was: Re: mc Digest, Vol 145, Issue 7)

2016-09-26 Thread Mooffie
On 9/21/16, chris glur  wrote:
>> you should tick the "All charsets" and "Case sensitive"
>> checkboxes first.
>
>  Previously I never succeeded.
> With those 2 'ticks', it finds the first matching byte on the display only.
>
> Once the endianism is determined you can use:
> ->  cat Log | hexdump | grep 2f3a ==

Maybe you entered, in MC's search dialog, "2f3a" instead of "2f 3a"?

(When ticket #3694 gets in you'll be notified of such "mistakes".)
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: display thousands separator in file size

2016-09-26 Thread Mooffie
On 9/26/16, Fourhundred Thecat <400the...@gmx.ch> wrote:
>
> I am using thousands separator with ls, and it hugely increases
> readability:
>
>   BLOCK_SIZE="'1" ls -lAF
>

You'll have this feature when ticket #3666 advances.[1]

>
> is there a simple way how I could modify the code, so that file size
> displayed in mc has thousands separator?

If you know how to compile code then simply install mc^2. It has this
feature.[2]

>
> is there a simple way how I could modify the code, so that file size
> displayed in mc has thousands separator?

It's not a simple one-line fix to the code. That's because the
thousands separators consume space, and the available space affects
the units used (which affects the space!). So it's like a
chicken-and-egg problem.

But, if you feel adventurous, and don't expect hand-holding from us:

In lib/utils.c find the function size_trunc_len(). Change the three
character string "%" (there's only one there!) to "%'". But now the
separators will consume space and the size column will cut off a digit
or two. So go to "Listing mode", choose "User defined", and change
"size" to "size:10" to give it 10 columns (or more). But, as I
explained, you'll sooner or later find that it's not perfect.

[1] http://www.midnight-commander.org/ticket/3666
[2] http://www.typo.co.il/~mooffie/mc-lua/docs/html/index.html
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: change "timeformat_old" from 6 months to 1 year

2016-09-26 Thread Mooffie
On 9/20/16, Fourhundred Thecat <400the...@gmx.ch> wrote:
>> On 2016-09-19 05:11, Mooffie wrote:
>> That expression (6 * 30 * 24 * 60 * 60) equals 0x00ed4e00. Use MC's
>> viewer to edit /usr/bin/mc: press  for hex view. Search for "00 4e
>> ed 00" (assuming little endian).
>
> I did not manage to find the hex string 0x00ed4e00, using any of my hex
> editors, so I ended up recompiling mc.

That's weird. For the record: I grabbed a few MC binaries off the
"Binaries" webpage and found `00 4e ed 00` in all of them.

Perhaps you forgot to select the "Hexadecimal" radio button in the
search dialog.

Whatever, if you feel adventurous and want to investigate this matter
further, compile MC with debugging support (e.g., "./configure .
CFLAGS='-g -O0'"), and then interact with gdb:

$ gdb ./mc
# break file_date
# run
( when it returns to the debugger: )
# disassemble /mr

You'll then see what bytes the expression "if (current_time > ... + 6L
* 30L * 24L * 60L * 60L)" got compiled into.)

>
> Perhaps, it would make sense to make this option configurable
> via the ini file?

I don't know. Personally I'd aim higher: make it possible to color
fields (preferably at individual character level). You'd then use this
feature to display old dates dimmed. But this feature only makes sense
if MC had scripting support, to let users describe their logic using
code. Simple settings, like those in ini files, aren't flexible
enough.

>
> Or set 12 months by default, because that makes more
> logical sense than 6 months.

The "6 months" boundary isn't arbitrary: it's intended to match the
behavior of 'ls' (
http://pubs.opengroup.org/onlinepubs/007908799/xcu/ls.html ).
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


display thousands separator in file size

2016-09-26 Thread Fourhundred Thecat
Hello,

is there a simple way how I could modify the code, so that file size
displayed in mc has thousands separator?

I am using thousands separator with ls, and it hugely increases readability:

  BLOCK_SIZE="'1" ls -lAF

i.e. it takes couple of seconds to see the magnitude of a number like
this: 85249204057. Whereas the magnitude of a number with thousands
separators is immediately obvious: 85,249,204,057

Cheers,
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: Help testing the pre-release of mc-4.8.18

2016-09-26 Thread Yury V. Zaytsev

On Mon, 26 Sep 2016, Andrey Tataranovich wrote:


I think that must have the same underlying reason as this ticket:

http://www.midnight-commander.org/ticket/3406

... do you have the same issue with 4.8.17, i.e. is this a regression, 
or an old bug? In any case, I've just tried it, and for me it works 
fine.


I'm sorry. I have rechecked and find that cyrillic names do not lead to 
this issue but a broken symlink that points to currently unavailable 
location.


Try to create broken symlink and view this directory via SFTP.


Okay, so that's really the old #3406 bug...

I couldn't find any ticket re. zoo listing on the Trac. Could you 
please make one with a reproducer? If it's not a regression, this won't 
be a priority, but it would be nice to fix it for the next release.


I have created ticket for this issue: 
https://www.midnight-commander.org/ticket/3696


Thank you very much! One day, we'll get to it. Hopefully.

--
Sincerely yours,
Yury V. Zaytsev
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: Help testing the pre-release of mc-4.8.18

2016-09-26 Thread Andrey Tataranovich
On Mon, 26 Sep 2016 13:17:36 +0200 (CEST)
"Yury V. Zaytsev"  wrote:

> Hi Andrey,
> 
> Thank you for testing!
> 
> On Mon, 26 Sep 2016, Andrey Tataranovich wrote:
> 
> > Have found "SFTP Protocol error (-31)" when entering directory with 
> > cyrillic names in it. But after error MC show correct directory
> > listing.  
> 
> I think that must have the same underlying reason as this ticket:
> 
> http://www.midnight-commander.org/ticket/3406
> 
> ... do you have the same issue with 4.8.17, i.e. is this a
> regression, or an old bug? In any case, I've just tried it, and for
> me it works fine.

I'm sorry. I have rechecked and find that cyrillic names do not lead to
this issue but a broken symlink that points to currently unavailable
location.

Try to create broken symlink and view this directory via SFTP.

> > Checked multiple archive formats and noticed that zoo archive
> > listing is broken (was already broken in 4.8.17).  
> 
> I couldn't find any ticket re. zoo listing on the Trac. Could you
> please make one with a reproducer? If it's not a regression, this
> won't be a priority, but it would be nice to fix it for the next
> release.

I have created ticket for this issue:
https://www.midnight-commander.org/ticket/3696

-- 
WBR, Andrey Tataranovich
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: Help testing the pre-release of mc-4.8.18

2016-09-26 Thread Yury V. Zaytsev

Hi Andrey,

Thank you for testing!

On Mon, 26 Sep 2016, Andrey Tataranovich wrote:

Have found "SFTP Protocol error (-31)" when entering directory with 
cyrillic names in it. But after error MC show correct directory listing.


I think that must have the same underlying reason as this ticket:

http://www.midnight-commander.org/ticket/3406

... do you have the same issue with 4.8.17, i.e. is this a regression, or 
an old bug? In any case, I've just tried it, and for me it works fine.


Checked multiple archive formats and noticed that zoo archive listing is 
broken (was already broken in 4.8.17).


I couldn't find any ticket re. zoo listing on the Trac. Could you please 
make one with a reproducer? If it's not a regression, this won't be a 
priority, but it would be nice to fix it for the next release.


--
Sincerely yours,
Yury V. Zaytsev
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel


Re: Help testing the pre-release of mc-4.8.18

2016-09-26 Thread Andrey Tataranovich
On Sun, 25 Sep 2016 20:43:46 +0200
"Yury V. Zaytsev"  wrote:

> TLDR; we would appreciate if you could test the following tarball on
> your systems and report any blocker regressions as compared to 4.8.17:
> 
> http://www.midnight-commander.org/nopaste/tarball/mc-4.8.17-122-g6822251.tar.xz
> 
> $ sha256sum mc-4.8.17-122-g6822251.tar.xz
> e9a4a418d9d551b4a58fffa907c001a5eb84d2fe2e490d221f99c1d1642fecbd

Have found "SFTP Protocol error (-31)" when entering directory with
cyrillic names in it. But after error MC show correct directory
listing.

Checked multiple archive formats and noticed that zoo archive
listing is broken (was already broken in 4.8.17).

-- 
WBR, Andrey Tataranovich
___
mc-devel mailing list
https://mail.gnome.org/mailman/listinfo/mc-devel