As a result, directory scannig is faster than before.
The author of idea and initial patch is Egmont Koblinger.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The percent in the upper right corner normally corresponds to the
cursor. Except when the bottom of the file is displayed, then it's
100%.
If the file is taller than the window, you can walk downwards to its
end and the percent is always correct. Then walk back a screenful and
it stays at 100%, and suddenly jumps back by a lot when the file starts
scrolling.
If the file is shorter than the window, it's always at 100%.
mcview_calc_percent() is supposed to calculate the percentage at offset
p, yet it executes a special branch when "dpy_end == filesize".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Add -cfg- option to the command used to detect UnRAR version. This
option prevents UnRAR from reading configuration from .rarrc file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(mcview_t): add new member 'active' to recognize current state in QuickView mode.
(mcview_callback): toggle mcview_t::active in MGS_FOCUS and MSG_UNFOCUS
event handlers.
(do_mcview_event): use mcview_t::active to grab focus.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Use $PWD variable instead of of calling pwd (which can be a function)
since it is read-only and not manipulated.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Support for fish subshell didn't show a prompt, because fish_prompt function
was overridden to pass current path to mc.
Now user can specify a fish_prompt_mc function to use a mc specific
prompt, if none is specified fish_prompt is copied to fish_prompt_mc to
use the default prompt. The new implementation of fish_prompt calls
fish_prompt_mc to display a prompt before exit. Cwd is passed to mc as
before.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Avoid hasmntopt const type warning on Solaris.
Solaris defines the OPT param of hasmntopt() with char * instead of
const char *. Passing the constant string "ignore" generates a compiler
warning. For Solaris cast MNT_IGNORE to avoid the warning.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(do_enter_on_file_entry_t): rename back to do_enter_on_file_entry and
return gboolean instead of int.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Port 'open' and 'close' redefinitions to AIX 7.1.
Do not #undef 'open' and 'close'. AIX 7 does '#define open open64' and
then 'int open64(const char *, int, ...);', which means the declaration
for 'open' gets lost if we later '#undef open'. Discovered while
building grep pretest 2.18.151-1c770 on AIX 7.1, where the compilation
reported the non-fatal error "In function 'openat_proc_name' ...
warning: implicit declaration of function 'open'". In this case the
error is relatively harmless, but in other cases it might not be so
minor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>