diff --git a/lib/util.c b/lib/util.c
index 4b5b37339..c4d5c46a5 100644
a
|
b
|
get_compression_type (int fd, const char *name) |
891 | 891 | && magic[2] == 'Z' && magic[3] == 'M' && magic[4] == 'A' && magic[5] == 0x00) |
892 | 892 | return COMPRESSION_LZMA; |
893 | 893 | |
| 894 | /* LZO format - \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data */ |
| 895 | if (magic[0] == 0x89 && magic[1] == 0x4c && |
| 896 | magic[2] == 0x5a && magic[3] == 0x4f && |
| 897 | magic[4] == 0x00 && magic[5] == 0x0d) |
| 898 | return COMPRESSION_LZO; |
| 899 | |
894 | 900 | /* XZ compression magic */ |
895 | 901 | if (magic[0] == 0xFD |
896 | 902 | && magic[1] == 0x37 |
… |
… |
decompress_extension (int type) |
930 | 936 | return "/ulz4" VFS_PATH_URL_DELIMITER; |
931 | 937 | case COMPRESSION_LZMA: |
932 | 938 | return "/ulzma" VFS_PATH_URL_DELIMITER; |
| 939 | case COMPRESSION_LZO: |
| 940 | return "/ulzo" VFS_PATH_URL_DELIMITER; |
933 | 941 | case COMPRESSION_XZ: |
934 | 942 | return "/uxz" VFS_PATH_URL_DELIMITER; |
935 | 943 | case COMPRESSION_ZSTD: |
diff --git a/lib/util.h b/lib/util.h
index ec8b25ec5..1ead0fb97 100644
a
|
b
|
enum compression_type |
84 | 84 | COMPRESSION_LZIP, |
85 | 85 | COMPRESSION_LZ4, |
86 | 86 | COMPRESSION_LZMA, |
| 87 | COMPRESSION_LZO, |
87 | 88 | COMPRESSION_XZ, |
88 | 89 | COMPRESSION_ZSTD, |
89 | 90 | }; |
diff --git a/misc/ext.d/archive.sh b/misc/ext.d/archive.sh
index 840fd4717..12beb0158 100755
a
|
b
|
do_view_action() { |
32 | 32 | lzma) |
33 | 33 | lzma -dc "${MC_EXT_FILENAME}" 2>/dev/null |
34 | 34 | ;; |
| 35 | lzo) |
| 36 | lzop -dc "${MC_EXT_FILENAME}" 2>/dev/null |
| 37 | ;; |
35 | 38 | xz) |
36 | 39 | xz -dc "${MC_EXT_FILENAME}" 2>/dev/null |
37 | 40 | ;; |
… |
… |
do_view_action() { |
65 | 68 | lzma -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ |
66 | 69 | tar tvvf - |
67 | 70 | ;; |
| 71 | tar.lzo|tzo) |
| 72 | lzop -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ |
| 73 | tar tvvf - |
| 74 | ;; |
68 | 75 | tar.xz) |
69 | 76 | xz -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ |
70 | 77 | tar tvvf - |
… |
… |
do_view_action() { |
114 | 121 | lz4 -dc "${MC_EXT_FILENAME}" | \ |
115 | 122 | cpio -itv 2>/dev/null |
116 | 123 | ;; |
| 124 | cpio.lzo) |
| 125 | lzop -dc "${MC_EXT_FILENAME}" | \ |
| 126 | cpio -itv 2>/dev/null |
| 127 | ;; |
117 | 128 | cpio.xz) |
118 | 129 | xz -dc "${MC_EXT_FILENAME}" | \ |
119 | 130 | cpio -itv 2>/dev/null |
… |
… |
do_open_action() { |
177 | 188 | lzma) |
178 | 189 | lzma -dc "${MC_EXT_FILENAME}" | ${pager} |
179 | 190 | ;; |
| 191 | lzo) |
| 192 | lzop -dc "${MC_EXT_FILENAME}" | ${pager} |
| 193 | ;; |
180 | 194 | xz) |
181 | 195 | xz -dc "${MC_EXT_FILENAME}" | ${pager} |
182 | 196 | ;; |
diff --git a/misc/ext.d/text.sh.in b/misc/ext.d/text.sh.in
index 2bd6ca05c..357f9e11d 100644
a
|
b
|
get_unpacker() { |
31 | 31 | man.lzma) |
32 | 32 | unpacker="lzma -dc" |
33 | 33 | ;; |
| 34 | man.lzo) |
| 35 | unpacker="lzop -dc" |
| 36 | ;; |
34 | 37 | man.xz) |
35 | 38 | unpacker="xz -dc" |
36 | 39 | ;; |
… |
… |
do_view_action() { |
67 | 70 | nroff.ms) |
68 | 71 | nroff @MAN_FLAGS@ -ms "${MC_EXT_FILENAME}" |
69 | 72 | ;; |
70 | | man.gz|man.bz|man.bz2|man.lz|man.lz4|man.lzma|man.xz|man.zst) |
| 73 | man.gz|man.bz|man.bz2|man.lz|man.lz4|man.lzma|man.lzo|man.xz|man.zst) |
71 | 74 | case "${MC_EXT_FILENAME}" in |
72 | 75 | */log/*|*/logs/*) |
73 | 76 | ${unpacker} "${MC_EXT_FILENAME}" |
… |
… |
do_open_action() { |
114 | 117 | nroff.ms) |
115 | 118 | nroff @MAN_FLAGS@ -ms "${MC_EXT_FILENAME}" | ${pager} |
116 | 119 | ;; |
117 | | man.gz|man.bz|man.bz2|man.lz|man.lz4|man.lzma|man.xz|man.zst) |
| 120 | man.gz|man.bz|man.bz2|man.lz|man.lz4|man.lzma|man.lzo|man.xz|man.zst) |
118 | 121 | case "${MC_EXT_FILENAME}" in |
119 | 122 | */log/*|*/logs/*) |
120 | 123 | ${unpacker} "${MC_EXT_FILENAME}" |
diff --git a/misc/filehighlight.ini b/misc/filehighlight.ini
index c31f562e6..28824238d 100644
a
|
b
|
|
25 | 25 | regexp=(^#.*|.*~$) |
26 | 26 | |
27 | 27 | [archive] |
28 | | extensions=7z;Z;ace;apk;arc;arj;ark;bz2;cab;cpio;deb;gz;lha;lz;lz4;lzh;lzma;rar;rpm;tar;tbz;tbz2;tgz;tlz;txz;tzst;vsix;xz;zip;zoo;zst |
| 28 | extensions=7z;Z;ace;apk;arc;arj;ark;bz2;cab;cpio;deb;gz;lha;lz;lz4;lzh;lzma;lzo;rar;rpm;tar;tbz;tbz2;tgz;tlz;txz;tzo;tzst;vsix;xz;zip;zoo;zst |
29 | 29 | |
30 | 30 | [doc] |
31 | 31 | extensions=chm;css;ctl;diz;doc;docm;docx;dtd;fodg;fodp;fods;fodt;htm;html;json;letter;lsm;mail;man;markdown;md;me;mkd;msg;nroff;odg;odp;ods;odt;pdf;po;ppt;pptm;pptx;ps;rtf;sgml;shtml;tex;text;txt;xls;xlsm;xlsx;xml;xsd;xslt |
diff --git a/misc/mc.ext.ini.in b/misc/mc.ext.ini.in
index 54ea7bf59..3d961a95c 100644
a
|
b
|
Regex=\\.t(ar\\.lz4|lz4)$ |
242 | 242 | Open=%cd %p/utar:// |
243 | 243 | View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lz4 |
244 | 244 | |
| 245 | # .tar.lzo, .tzo |
| 246 | [tar.lzo] |
| 247 | Regex=\\.t(ar\\.lzo|zo)$ |
| 248 | Open=%cd %p/utar:// |
| 249 | View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.lzo |
| 250 | |
245 | 251 | # .tar.xz, .txz |
246 | 252 | [tar.xz] |
247 | 253 | Regex=\\.t(ar\\.xz|xz)$ |
… |
… |
Shell=.cpio.lz4 |
318 | 324 | Open=%cd %p/ucpio:// |
319 | 325 | View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.lz4 |
320 | 326 | |
| 327 | [cpio.lzo] |
| 328 | Shell=.cpio.lzo |
| 329 | Open=%cd %p/ucpio:// |
| 330 | View=%view{ascii} @EXTHELPERSDIR@/archive.sh view cpio.lzo |
| 331 | |
321 | 332 | [cpio.xz] |
322 | 333 | Shell=.cpio.xz |
323 | 334 | Open=%cd %p/ucpio:// |
… |
… |
Regex=([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])\\.lzma$ |
515 | 526 | Open=@EXTHELPERSDIR@/text.sh open man.lzma %var{PAGER:more} |
516 | 527 | View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lzma %var{PAGER:more} |
517 | 528 | |
| 529 | [man.lzo] |
| 530 | Regex=([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])\\.lzo$ |
| 531 | Open=@EXTHELPERSDIR@/text.sh open man.lzo %var{PAGER:more} |
| 532 | View=%view{ascii,nroff} @EXTHELPERSDIR@/text.sh view man.lzo %var{PAGER:more} |
| 533 | |
518 | 534 | [man.xz] |
519 | 535 | Regex=([^0-9]|^[^\\.]*)\\.([1-9][A-Za-z]*|[ln])\\.xz$ |
520 | 536 | Open=@EXTHELPERSDIR@/text.sh open man.xz %var{PAGER:more} |
… |
… |
ShellIgnoreCase=true |
882 | 898 | Open=@EXTHELPERSDIR@/archive.sh view lz4 %var{PAGER:more} |
883 | 899 | View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lz4 |
884 | 900 | |
| 901 | [lzo] |
| 902 | Shell=.lzo |
| 903 | ShellIgnoreCase=true |
| 904 | Open=@EXTHELPERSDIR@/archive.sh view lzo %var{PAGER:more} |
| 905 | View=%view{ascii} @EXTHELPERSDIR@/archive.sh view lzo |
| 906 | |
885 | 907 | [wim] |
886 | 908 | Shell=.wim |
887 | 909 | ShellIgnoreCase=true |
diff --git a/misc/mc.menu.in b/misc/mc.menu.in
index c491858f5..9d37e378a 100644
a
|
b
|
shell_patterns=0 |
93 | 93 | tar cf - "$Pwd" | zstd -f > "$tar.tar.zst" && \ |
94 | 94 | echo "../$tar.tar.zst created." |
95 | 95 | |
| 96 | 8 Compress the current subdirectory (tar.lzo) |
| 97 | Pwd=`basename %d /` |
| 98 | echo -n "Name of the compressed file (without extension) [$Pwd]: " |
| 99 | read tar |
| 100 | [ "$tar"x = x ] && tar="$Pwd" |
| 101 | cd .. && \ |
| 102 | tar cf - "$Pwd" | lzop -f > "$tar.tar.lzo" && \ |
| 103 | echo "../$tar.tar.lzo created." |
| 104 | |
96 | 105 | = f \.c$ & t r |
97 | 106 | + f \.c$ & t r & ! t t |
98 | 107 | c Compile and link current .c file |
… |
… |
U Uudecode marked news articles (needs work) |
228 | 237 | fi |
229 | 238 | echo "Please test the output file before deleting anything." |
230 | 239 | |
231 | | =+ f \.tar\.gz$ | f \.tar\.z$ | f \.tgz$ | f \.tpz$ | f \.tar\.lz$ | f \.tar\.lz4$ | f \.tar\.lzma$ | f \.tar\.7z$ | f \.tar\.xz$ | f \.tar\.zst | f \.tar\.Z$ | f \.tar\.bz2$ & t rl |
| 240 | =+ f \.tar\.gz$ | f \.tar\.z$ | f \.tgz$ | f \.tpz$ | f \.tar\.lz$ | f \.tar\.lz4$ | f \.tar\.lzma$ | f \.tar\.lzo$ | f \.tar\.7z$ | f \.tar\.xz$ | f \.tar\.zst | f \.tar\.Z$ | f \.tar\.bz2$ & t rl |
232 | 241 | x Extract the contents of a compressed tar file |
233 | 242 | unset PRG |
234 | 243 | case %f in |
… |
… |
x Extract the contents of a compressed tar file |
238 | 247 | *.tar.lz) PRG="lzip -dc";; |
239 | 248 | *.tar.lz4) PRG="lz4 -dc";; |
240 | 249 | *.tar.lzma) PRG="lzma -dc";; |
| 250 | *.tar.lzo) PRG="lzop -dc";; |
241 | 251 | *.tar.xz) PRG="xz -dc";; |
242 | 252 | *.tar.zst) PRG="zstd -dc";; |
243 | 253 | *) exit 1;; |
diff --git a/misc/syntax/sh.syntax b/misc/syntax/sh.syntax
index e89142d66..3f4754d9e 100644
a
|
b
|
wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._ |
1564 | 1564 | keyword whole lsusb cyan |
1565 | 1565 | keyword whole lzip cyan |
1566 | 1566 | keyword whole lziprecover cyan |
| 1567 | keyword whole lzop cyan |
1567 | 1568 | keyword whole lynx cyan |
1568 | 1569 | keyword whole MAKEDEV cyan |
1569 | 1570 | keyword whole MAKEFLOPPIES cyan |
diff --git a/src/editor/edit.c b/src/editor/edit.c
index 0ecaab2d9..9308f260f 100644
a
|
b
|
static const struct edit_filters |
142 | 142 | { "lz4 -cd %s 2>&1", "lz4 > %s", ".lz4" }, |
143 | 143 | { "lzip -cd %s 2>&1", "lzip > %s", ".lz"}, |
144 | 144 | { "lzma -cd %s 2>&1", "lzma > %s", ".lzma" }, |
| 145 | { "lzop -cd %s 2>&1", "lzop > %s", ".lzo"}, |
145 | 146 | { "bzip2 -cd %s 2>&1", "bzip2 > %s", ".bz2" }, |
146 | 147 | { "gzip -cd %s 2>&1", "gzip > %s", ".gz" }, |
147 | 148 | { "gzip -cd %s 2>&1", "gzip > %s", ".Z" } |
diff --git a/src/vfs/extfs/helpers/iso9660.in b/src/vfs/extfs/helpers/iso9660.in
index 5a6f1d565..f78db61cd 100644
a
|
b
|
mcisofs_list () { |
132 | 132 | *.lz) MYCAT="lzip -dc";; |
133 | 133 | *.lz4) MYCAT="lz4 -dc";; |
134 | 134 | *.lzma) MYCAT="lzma -dc";; |
| 135 | *.lzo) MYCAT="lzop -dc";; |
135 | 136 | *.xz) MYCAT="xz -dc";; |
136 | 137 | *.zst) MYCAT="zstd -dc";; |
137 | 138 | *.bz2) MYCAT="bzip2 -dc";; |
diff --git a/src/vfs/extfs/helpers/lslR.in b/src/vfs/extfs/helpers/lslR.in
index 69b663b40..f568c02a5 100644
a
|
b
|
case "$1" in |
15 | 15 | *.lz) MYCAT="lzip -dc";; |
16 | 16 | *.lz4) MYCAT="lz4 -dc";; |
17 | 17 | *.lzma) MYCAT="lzma -dc";; |
| 18 | *.lzo) MYCAT="lzop -dc";; |
18 | 19 | *.xz) MYCAT="xz -dc";; |
19 | 20 | *.zst) MYCAT="zstd -dc";; |
20 | 21 | *.bz2) MYCAT="bzip2 -dc";; |
diff --git a/src/vfs/extfs/helpers/mailfs.in b/src/vfs/extfs/helpers/mailfs.in
index 5bb373b67..20cfae317 100644
a
|
b
|
$bzcat="bzip2 -dc"; # bunzip2 to stdout |
11 | 11 | $lzipcat="lzip -dc"; # unlzip to stdout |
12 | 12 | $lz4cat="lz4 -dc"; # unlz4 to stdout |
13 | 13 | $lzcat="lzma -dc"; # unlzma to stdout |
| 14 | $lzocat="lzop -dc"; # unlzo to stdout |
14 | 15 | $xzcat="xz -dc"; # unxz to stdout |
15 | 16 | $zstdcat="zstd -dc"; # unzstd to stdout |
16 | 17 | $file="file"; # "file" command |
… |
… |
if (/gzip/) { |
194 | 195 | exit 1 unless (open IN, "$lz4cat $mbox_qname|"); |
195 | 196 | } elsif (/lzma/) { |
196 | 197 | exit 1 unless (open IN, "$lzcat $mbox_qname|"); |
| 198 | } elsif (/lzo/) { |
| 199 | exit 1 unless (open IN, "$lzocat $mbox_qname|"); |
197 | 200 | } elsif (/xz/) { |
198 | 201 | exit 1 unless (open IN, "$xzcat $mbox_qname|"); |
199 | 202 | } elsif (/zst/) { |
diff --git a/src/vfs/extfs/helpers/patchfs.in b/src/vfs/extfs/helpers/patchfs.in
index ee1e6515d..59fdde1fc 100644
a
|
b
|
use File::Temp 'tempfile'; |
17 | 17 | my $lzip = 'lzip'; |
18 | 18 | my $lz4 = 'lz4'; |
19 | 19 | my $lzma = 'lzma'; |
| 20 | my $lzo = 'lzop'; |
20 | 21 | my $xz = 'xz'; |
21 | 22 | my $zstd = 'zstd'; |
22 | 23 | my $bzip = 'bzip2'; |
… |
… |
sub myin |
88 | 89 | return "$lzip -dc $qfname"; |
89 | 90 | } elsif (/^'*lzma/) { |
90 | 91 | return "$lzma -dc $qfname"; |
| 92 | } elsif (/^'*lzo/) { |
| 93 | return "$lzo -dc $qfname"; |
91 | 94 | } elsif (/^'*xz/) { |
92 | 95 | return "$xz -dc $qfname"; |
93 | 96 | } elsif (/^'*zst/) { |
… |
… |
sub myout |
114 | 117 | return "$lzip -c $sep $qfname"; |
115 | 118 | } elsif (/^'*lzma/) { |
116 | 119 | return "$lzma -c $sep $qfname"; |
| 120 | } elsif (/^'*lzo/) { |
| 121 | return "$lzo -c $sep $qfname"; |
117 | 122 | } elsif (/^'*xz/) { |
118 | 123 | return "$xz -c $sep $qfname"; |
119 | 124 | } elsif (/^'*zst/) { |
diff --git a/src/vfs/sfs/sfs.ini b/src/vfs/sfs/sfs.ini
index d817dc9f4..a7b059be0 100644
a
|
b
|
lz4/1 lz4 < %1 > %3 |
16 | 16 | ulz4/1 lz4 -d < %1 > %3 |
17 | 17 | lzma/1 lzma < %1 > %3 |
18 | 18 | ulzma/1 lzma -d < %1 > %3 |
| 19 | lzo/1 lzop < %1 > %3 |
| 20 | ulzo/1 lzop -d < %1 > %3 |
19 | 21 | xz/1 xz < %1 > %3 |
20 | 22 | uxz/1 xz -d < %1 > %3 |
21 | 23 | zst/1 zstd < %1 > %3 |