Andreas Mohr
40b96b67dd
(x_basename): the NULL check is unnecessary...
...
...because the pointer can't be NULL.
Found by Coverity.
Coverity id #110817 .
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andreas Mohr
57f5ab7c23
Add break before empty default in switch.
...
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andrew Borodin
9040cc3476
Fix typos.
2020-12-31 16:26:46 +03:00
Andrew Borodin
78893d85b8
Drop mc_timer. Use g_get_real_time() instead.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-12 20:39:01 +03:00
Andrew Borodin
31b37a1f79
Ticket #4050 : code cleanup before 4.8.25 release.
...
Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-02-29 19:10:17 +03:00
Andrew Borodin
f4d448629f
lib/util.c: fix coding style.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:47:59 +03:00
Andrew Borodin
1dd8a47987
Ticket #3955 : code cleanup before 4.8.23 release.
...
Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:44:40 +03:00
Adam Borowski
5eb9bd605e
Ticket #3906 : ZSTD support.
...
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-03-19 15:00:23 +03:00
Andrew Borodin
ddd645526a
Update copyright years.
2018-02-04 11:30:22 +03:00
Andrew Borodin
069306eb2e
Ticket #3883 : size_trunc_sep() breaks on multibyte locales.
...
The bug was introduced in b3867a6e15
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-02 14:41:35 +03:00
Andrew Borodin
cebede5e84
(diff_two_paths): optimizate path comparision.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:29 +03:00
Andrew Borodin
72056890a7
(diff_two_paths): minor optimization: exit loop ASAP.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:29 +03:00
Andrew Borodin
02effb2499
(diff_two_paths): reduce variable scopes.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:29 +03:00
Andrew Borodin
e9fd11bfcd
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 19:12:55 +03:00
Andrew Borodin
28ca14d73a
Aggressive use of whitespace() and whiteness() macros.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
496abc0e1f
Rename mc_config_get_profile_root() to mc_get_profile_root()
...
...and move it out from lib/mcconfig.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 09:37:50 +03:00
Andrew Borodin
83504f2bb5
Revert "(size_trunc_len): align to properly use either IEC or SI prefixes with the unit B (byte)."
...
This reverts commit bae814d0d4
.
2016-11-08 13:19:37 +03:00
Andrew Borodin
e3d457eb3d
Revert "Ticket #3666 : (size_trunc_len): fix segfault because of small buffer usage."
...
This reverts commit 3024f309c2
.
2016-11-08 13:19:29 +03:00
Michael Osipov
3024f309c2
Ticket #3666 : (size_trunc_len): fix segfault because of small buffer usage.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-06 18:30:41 +03:00
Michael Osipov
bae814d0d4
(size_trunc_len): align to properly use either IEC or SI prefixes with the unit B (byte).
...
Additionally always put a space between number and unit which is
required by the norms.
It is important to note that really small buffers have to be bigger than it
appears because they store bytes and non-Latin scripts need more than one byte
with UTF-8 to encode them, e.g., the string "1023 МиБ" in Russian requires
11 bytes + null terminator.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-10-26 13:33:12 +03:00
Michael Osipov
b3867a6e15
Ticket #3666 : Improper use of IEC and SI prefixes for size in size_trunc().
...
size_trunc() has been aligned to properly use either IEC or SI prefixes with
the unit B (byte). Additionally always put a space between number and unit
which is required by the norms.
Obsolete gettext message ids have been removed and some cleaned up for
duplicate words or leading spaces.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-10-26 13:33:12 +03:00
Andrew Borodin
2151edaff2
Get rid of global variables mc_main_config and mc_panels_config.
...
Use mc_global.main_config and mc_global.panels_congig instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
28ce7e566e
(load_mc_home_file): return data length.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andrew Borodin
8fc0e1d76d
Ticket #2673 : support LZIP compression.
...
Thanks Matias A. Fonzo <selk at dragora.org> for the original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-28 16:45:36 +03:00
Andreas Mohr
b5ccd12d32
Ticket #3523 : support lz4 compress format.
...
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-02 14:02:08 +03:00
Andrew Borodin
471ea781ca
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:10 +03:00
Andrew Borodin
fd4d25ae27
(strip_ctrl_codes): add missing default case.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 20:12:18 +03:00
Andrew Borodin
2789e6e390
Ticket #3431 : add missing default cases.
...
Introduce -Wswitch-default check.
Some minor cosmetics.
Thanks Andreas Mohr <and at gmx dot li> for original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:50 +03:00
Andreas Mohr
e9e6868789
is_7bit_printable() is used only if support of charset selection and conversion is disabled.
2015-05-03 19:43:49 +03:00
Andrew Borodin
b698b7e834
Ticket #3435 : clang compiler fixes/cleanups.
...
Since O_* macros are used in lib/global.h, include <fcntl.h> there.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:49 +03:00
Andrew Borodin
42e7e39bd8
Add IS_PATH_SEP macro and use it.
...
Also massive use of PATH_SEP and PATH_SEP_STR macros.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:13:02 +03:00
Andrew Borodin
454479549c
Update copyright years.
2015-02-26 09:12:08 +03:00
Andrew Borodin
ce568de9b9
(name_quote): refactoring
...
...and related modifications.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 12:57:47 +03:00
Andrew Borodin
89621050e3
(mc_time_elapsed): add new function to detect elapsed time intervals.
...
The author of initial patch is Egmont Koblinger.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-10-03 13:19:25 +04:00
Egmont Koblinger
a3d75ae300
Ticket #3241 : colon was not recognized inside escape seq in prompt.
...
export PS1=$'\[\e[38:5:214m\]orange$\[\e[0m\]'
mc
Expected: "orange$" prompt shows up in black under the panels.
Actual: some additional garbage.
The 256-color and true-color escape sequences should allow either ';' or
':' inside as separator, actually, ':' is the more correct according to
ECMA-48. Some terminal emulators (e.g. xterm, gnome-terminal) support
this.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-09-03 11:31:14 +04:00
Andrew Borodin
6d82155270
Massive use of MC_PTR_FREE macro.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-09-02 15:32:36 +04:00
Slava Zanko
512ad7d962
Make working with GError in more right way (like with exceptions).
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2014-07-22 13:12:07 +04:00
Andrew Borodin
8c040b46b8
(x_basename): fix dereference of null pointer.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
e5203cb023
Fix name of FSF in all *.c files.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-28 13:33:17 +04:00
Andrew Borodin
f0da49345a
Collapse list of copyright years to ranges. Add 2014 year.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-10 16:27:03 +04:00
Slava Zanko
0ed4a91d7d
Reduce cppcheck warnings (style) in lib subdirectory.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Veres Lajos
805703523d
Misspellings fixes by https://github.com/vlajos/misspell_fixer
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-15 11:10:41 +04:00
Andrew Borodin
5b1982a6bb
(strip_ctrl_codes): type accuracy.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-08 18:06:55 +04:00
Andrew Borodin
d83902e7fc
(size_trunc_len): minor optimization.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-07 13:06:51 +04:00
Andrew Borodin
ceff7c5922
size_trunc_len() generates incorrect result in some cases.
...
Revert "(size_trunc_len): support automatic maximum unit for specified size."
This reverts commit ef94b84eaf
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-07 12:12:34 +04:00
Slava Zanko
2640b21bb9
Remove vfs_path_to_str() function for avoid often memory allocations.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-06-03 14:21:01 +03:00
Andrew Borodin
ef94b84eaf
(size_trunc_len): support automatic maximum unit for specified size.
...
Fix typos.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:19 +04:00
Slava Zanko
6447c76cca
Implementation of getting last editing/viewing position of file.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:40:37 +03:00
Slava Zanko
ee8aaf6181
Avoid compiler errors like: error: variable 'xxx' set but not used [-Werror=unused-but-set-variable]
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-01-17 15:21:35 +03:00
Andrew Borodin
6cd19ea6cb
Remove irrelevant comments about file_date() function.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:34 +04:00