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 <f4> 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

Reply via email to