Commit Graph

15030 Commits

Author SHA1 Message Date
Andrew Borodin
b814b3dd02 extfs/uzip: add leading ./ to file name
...to handle files with name started with space or dash.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-11-21 14:48:06 +03:00
Andrew Borodin
d3c8e5bad7 Ticket #4077: extfs: handle file names started with dash or space.
* (extfs_open_archive): skip leading ./ in file names. extfs plug-ins
  are added leading ./ to handle files with name started with space.
  * (extfs_cmd): skip leading ./ added in name_quote(). ./ is added to
  handle files with name started with dash.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-11-21 14:48:06 +03:00
Andrew Borodin
a2bccac622 Merge branch '4130_unar'
* 4130_unar:
  Ticket #4130: add PAK archive support for extfs.
2020-11-08 17:37:59 +03:00
Ilia Maslakov
954e83191c Ticket #4130: add PAK archive support for extfs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-11-08 17:36:36 +03:00
Andrew Borodin
7f4960553a Merge branch '4100_wim'
* 4100_wim:
  Ticket #4100: extfs vfs: support of WIM archive (image).
2020-10-29 16:59:03 +03:00
Vadim Kalinnikov
942c5549c9 Ticket #4100: extfs vfs: support of WIM archive (image).
wimtools (https://wimlib.net/) are required.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-29 16:58:36 +03:00
Andrew Borodin
5bf714b008 Ticket #4131: use G_UNICODE_SPACING_MARK instead of G_UNICODE_COMBINING_MARK.
G_UNICODE_COMBINING_MARK is deperecated in glib >= 30.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-15 15:16:24 +03:00
Andrew Borodin
165ec38444 Merge branch '4103_cleanup'
* 4103_cleanup: (23 commits)
  src/subshell/common.c: clarify author list.
  iso9660.in: use grep directly.
  src/filemanager/chattr.c: support dax attribute.
  m4.include/gnulib/stat-size.m4: shorten https://lists.gnu.org/archive/html/... link.
  m4.include/gnulib/fsusage.m4: produce more regular configure output.
  src/filemanager/find.c: use g_get_real_time() instead of gettimeofday().
  mc_timer: use g_get_real_time() instead of gettimeofday().
  (do_view_cmd): rename parameter.
  (view_file): rename parameter in function declaration.
  (show_editor_viewer_history): fix call of view_file().
  Remove one-line header files.
  Sync with gnulib 85d1d48f6fa89de6a5de9e7794bda3255f0f32aa.
  Remove Cray support.
  Optimize comparisions in file sort functions.
  src/filemanager/boxes.c: rename variables.
  WPanel: reorder fields.
  WPanel: rename "panel_name" fileld to "name".
  WPanel: change type of "active" and "dirty" fields to gboolean.
  WPanel: use structure for quick search fields.
  WPanel: use structure for directory history fields.
  ...
2020-10-13 16:40:07 +03:00
Andrew Borodin
22adc618b2 src/subshell/common.c: clarify author list.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:37:46 +03:00
Andrew Borodin
7a641c0df2 iso9660.in: use grep directly.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:37:46 +03:00
Andrew Borodin
08e1a6ba9e src/filemanager/chattr.c: support dax attribute.
Sync with e2fsprogs 1dd48bc23c3776df76459aff0c7723fff850ea45.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:37:46 +03:00
Andrew Borodin
d640a1630a m4.include/gnulib/stat-size.m4: shorten https://lists.gnu.org/archive/html/... link.
Sync with gnulib 2a3dbe99a2aeb058ecb033d7d830e6600e16c91c.

/archive/html/ part can be replace with /r/.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:37:41 +03:00
Andrew Borodin
b0dba0a2b5 m4.include/gnulib/fsusage.m4: produce more regular configure output.
Sync with gnulib 875dff5812cb9de949727e1aa399a06b07a886a9.

Remove AC_MSG_CHECKING without corresponding AC_MSG_RESULT.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
5dce2402b0 src/filemanager/find.c: use g_get_real_time() instead of gettimeofday().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
3143196247 mc_timer: use g_get_real_time() instead of gettimeofday().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
63aba8f7e2 (do_view_cmd): rename parameter.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
69e0283794 (view_file): rename parameter in function declaration.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
f5e7a9d287 (show_editor_viewer_history): fix call of view_file().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
94fb03c604 Remove one-line header files.
Move declaration of {advanced_chown,chattr,chmod,chown}_cmd() into cmd.h.
Delete src/filemanager/{achown,chattr,chmod,chown}.h

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
d21c5946ce Sync with gnulib 85d1d48f6fa89de6a5de9e7794bda3255f0f32aa.
Fix quoting of AC_LANG_PROGRAM arguments.

* m4.include/gnulib//mountlist.m4 (gl_MOUNTLIST): Quote the
AC_LANG_PROGRAM arguments through [[...]].

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
c5c561274b Remove Cray support.
Sync with gnulib dea936112710e82dd42ffbea510f3bb644acdaaa.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
375839d657 Optimize comparisions in file sort functions.
Use three-valued comparison macro from gnulib
efa15594e17fc20827dba66414fb391e99905394.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
377476765a src/filemanager/boxes.c: rename variables.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
402f5d0791 WPanel: reorder fields.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
94b7c635a3 WPanel: rename "panel_name" fileld to "name".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
8550eee2f6 WPanel: change type of "active" and "dirty" fields to gboolean.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
da223237c8 WPanel: use structure for quick search fields.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
968d24a38c WPanel: use structure for directory history fields.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:55 +03:00
Andrew Borodin
2dc692c76b Create command_names using macro.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:34:47 +03:00
Andrew Borodin
0776f2a49c Fix typos.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:31:22 +03:00
Andrew Borodin
bae61137d0 Ticket #4103: code cleanup before 4.8.26 release.
doc/NEWS: cosmetics.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-13 16:31:22 +03:00
Andrew Borodin
eeb14d3f48 Merge branch '4128_mc.ext_compressed_content'
* 4128_mc.ext_compressed_content:
  Ticket #4128: improve handling of compressed content in mc.ext.
2020-10-12 08:38:28 +03:00
Oswald Buddenhagen
8857423e4e Ticket #4128: improve handling of compressed content in mc.ext.
call 'file' with -z switch to enable getting the type of compressed files,
and use that capability extensively.

the /logs?/ hacks in ext.d/text.sh need to remain for the time being, as
file -z doesn't handle .lz4 files as encapsulated content.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-12 08:36:09 +03:00
Andrew Borodin
723208aeab Merge branch '4126_persistent_subshell_command_buffer_fixups'
* 4126_persistent_subshell_command_buffer_fixups:
  Disable subshell cursor position translation for bash v5+.
  Optimize bash cursor position translation.
  Make query of subshell command buffer leading-dash-safe.
  Prevent word-splitting of the subshell command buffer.
  Fixup FISH subshell setup.
  Do not avoid big stack allocations.
  Ticket #4126: fixups to persistent subshell command line buffer support.
2020-10-12 08:23:25 +03:00
Oswald Buddenhagen
436296f517 Disable subshell cursor position translation for bash v5+.
the changelog clearly states that the position is now returned as a
character offset.

amends ff0fc17a.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-12 08:23:03 +03:00
Oswald Buddenhagen
b680f8198d Optimize bash cursor position translation.
the previous algorithm was O(n^2).

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-12 08:23:03 +03:00
Oswald Buddenhagen
563632819d Make query of subshell command buffer leading-dash-safe.
when the command buffer started with a valid option to the "echo"
command, weird things would happen. use "printf" instead, which doesn't
have this problem. this affected only the bash and zsh code paths.

amends ff0fc17a.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-12 08:23:03 +03:00
Oswald Buddenhagen
77c910a818 Prevent word-splitting of the subshell command buffer.
this avoids inadvertent whitespace normalization (compression and
trimming), which is annoying and additionally invalidates the cursor
position.

for bash and zsh that meant quoting the variable expansion, while for
fish it meant removing the pointless indirection through echo.
for bash we had to introduce an indirection through a function, as there
is apparently no way to get the quoting right inside the binding. zsh
already had such an indirection - maybe for the same reason?

amends ff0fc17a.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-12 08:23:03 +03:00
Oswald Buddenhagen
86397c87c6 Fixup FISH subshell setup.
move binding commands out of the fish_prompt function definition, use
consistent command separators, and remove excess backslashes from the
bindings.

amends ff0fc17a.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-12 08:23:03 +03:00
Oswald Buddenhagen
6b7c4f7c14 Do not avoid big stack allocations.
these are cheap and unproblematic (we aren't in the kernel here).

amends ff0fc17a.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-12 08:23:03 +03:00
Oswald Buddenhagen
0c1cb8f9a8 Ticket #4126: fixups to persistent subshell command line buffer support.
fix some comments

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-12 08:23:03 +03:00
Andrew Borodin
629eebd589 Merge branch '4127_mc.ext_improve'
* 4127_mc.ext_improve:
  Relax mc.ext matching rules for makefiles.
  Replace xmms with audacious in ext.d/shound.sh.
  Ticket #4127: several improvements to mc.ext and syntax highlighting.
2020-10-10 15:59:00 +03:00
Oswald Buddenhagen
f2cbaf19e5 Relax mc.ext matching rules for makefiles.
match the special cases first, and match makefiles irrespective of
extension. that is useful, as hand-written make-based build systems
often use qualifying suffixes, like .unix.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-10 15:56:05 +03:00
Oswald Buddenhagen
335c4eeec6 Replace xmms with audacious in ext.d/shound.sh.
xmms hasn't been maintained for ages. audacious is a maintained fork of
it.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-10 15:55:56 +03:00
Oswald Buddenhagen
31e7a7e963 Ticket #4127: several improvements to mc.ext and syntax highlighting.
add plenty of missing 'which' commands in ext.d.

the construct 'if <command>' to check the presence of a command would
work in some cases (though inefficiently), but it others it was just
bogus. in every case it was inconsistent and confusing.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-10 15:55:42 +03:00
Andrew Borodin
09473d87f0 Merge branch '4124_mcedit_crash'
* 4124_mcedit_crash:
  Ticket #4124: standalone mcedit crashes at startup.
2020-10-10 15:33:45 +03:00
Andrew Borodin
2f611780d3 Ticket #4124: standalone mcedit crashes at startup.
Subshell: don't setup command line promt if MC is run as standalone
editor/viewer/diffviewer.

Fix ff0fc17ae3.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-09 14:54:37 +03:00
Andrew Borodin
b05b4bb696 Merge branch '4120_tcsh_cant_change_directory'
* 4120_tcsh_cant_change_directory:
  Ticket #4120: tcsh error: "The Commander can't change to the directory".
2020-10-04 18:54:40 +03:00
Eric Roberts
631483ec52 Ticket #4120: tcsh error: "The Commander can't change to the directory".
How to reproduce:

Use tsch as your shell.
ctrl-o
ctrl-c
ctrl-o

mc gives the error:
The Commander can't change to the directory that the subshell claims you
are in. Perhaps you have deleted your working directory, or given
yourself extra permissions with the "su" command?

This commit is really simple workaround that makes the problem go away.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-10-04 18:51:31 +03:00
Andrew Borodin
c22387d433 Merge branch '4114_persistent_subshell_command_buffer'
* 4114_persistent_subshell_command_buffer:
  Ticket #4114: implement persistent command line buffer for subshell.
2020-09-27 19:48:47 +03:00