Andrew Borodin
6718b3ec26
Indentation using GNU indent-2.2.13.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-06-02 12:49:13 +03:00
Andrew Borodin
aa38245e85
Merge lib/strescape.h into lib/strutil.h. Rename functions.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:38:11 +03:00
Andrew Borodin
fe42478b97
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-01 09:46:17 +03:00
Andrew Borodin
044c035900
Use bit-field members of file_entry_t as integers explicitly.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
49624e473b
Ticket #4450 : support PCRE2 in the search engine.
...
* m4.include/ax_path_lib_pcre.m4: replace by recent version from GNU
Autoconf Archive.
* m4.include/ax_check_pcre2.m4: get grom GNU Autoconf Archive.
* m4.include/mc-check-search-type.m4: support both PCRE versions.
* */*/Makefile.am: remove @CHECK_CFLAGS@ and @PCRE_LIBS@ ads they are
added via AX_PATH_LIB_PCRE and AX_CHECK_PCRE2.
* lib/search.h, lib/search/: add support of PCRE2. Thanks broly <gagan@hotmail.com>
for the initial patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-25 10:07:41 +03:00
Andrew Borodin
7257f794d2
Update template for .c files.
...
Add section for forward declarations of local functions. This section is
located before file scope variables because functions can be used in
strucutres (see find.c for example):
/*** forward declarations (file scope functions) *************************************************/
/* button callbacks */
static int start_stop (WButton * button, int action);
static int find_do_view_file (WButton * button, int action);
static int find_do_edit_file (WButton * button, int action);
/*** file scope variables ************************************************************************/
static struct
{
...
bcback_fn callback;
} fbuts[] =
{
...
{ B_STOP, NORMAL_BUTTON, N_("S&uspend"), 0, 0, NULL, start_stop },
...
{ B_VIEW, NORMAL_BUTTON, N_("&View - F3"), 0, 0, NULL, find_do_view_file },
{ B_VIEW, NORMAL_BUTTON, N_("&Edit - F4"), 0, 0, NULL, find_do_edit_file }
};
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:24 +03:00
Andrew Borodin
e472f23c13
Don't NULLify objects by returned value of g_ptr_array_free().
...
g_ptr_array_free(obj, ...) returns a pointer (including NULL) to
obj->pdata, not to obj.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:23 +03:00
Andrew Borodin
8fdcbeed74
Move definition of file_entry_t to separate file.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:23 +03:00
Andrew Borodin
cf223bec27
Use g_ptr_array_new_with_free_func() where reasonably.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:23 +03:00
Andrew Borodin
381dc8732b
lib/filehighlight/ini-file-read.c: fix coding style.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:23 +03:00
Andrew Borodin
57c61b7681
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-01-28 21:38:05 +03:00
Andrew Borodin
2c205c5928
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:26 +03:00
Andrew Borodin
98932f51f4
lib/filehighlight/get-color.c: remove extra parenthesis.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:23 +03:00
Andrew Borodin
c70658ee55
Ticket #4270 : code clean up before 4.8.28 release.
...
lib/filehighlight/get-color.c: constify function arguments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:23 +03:00
Andrew Borodin
d35df9ad60
Use argument names in function declarations.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-06-20 15:14:56 +03:00
Andrew Borodin
6f859e52d0
(file_entry_t): use GString instead of fname & fnamelen.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:52:39 +03:00
Andrew Borodin
9ee52e77c3
Ticket #4179 : code clean up before 4.8.27 release.
...
Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +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
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
Andrew Borodin
566992da32
Ticket #1620 : change file highlighting defaults.
...
Now file highlighting by extension is case insensitive by
default.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-18 12:05:05 +03:00
Andrew Borodin
ddd645526a
Update copyright years.
2018-02-04 11:30:22 +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
be158faca6
filehighlight: clarify includes.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andrew Borodin
471ea781ca
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:10 +03:00
Andreas Mohr
5007d309bc
Fix -Wconversion warning for mc_search_new().
...
mc_search_new() parameter orignial_len use once only.
Factor out into own function mc_search_new_len().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:07 +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
d0d7d412a7
Better use of S_IS* macros.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andreas Mohr
ca95dec659
Ticket #3428 : fix -Wredundant-decls compiler warnings...
...
...and use compiler option for future compile checks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andrew Borodin
454479549c
Update copyright years.
2015-02-26 09:12:08 +03: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
Andrew Borodin
acf34eb98e
(mc_config_get_string_list): clarify usage.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
725997c8d0
(mc_config_get_groups): optimization of function itself and usage.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +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
0d489acd58
cppcheck: reduce variable scope.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Slava Zanko
0b0f7e3975
Refactoring: use define DEFAULT_CHARSET for "ASCII" charset.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-09-21 13:35:59 +04:00
Andrew Borodin
66da276200
Ticket 3069: fix of case-sensitive search
...
...if file encoding and locale are different.
Example: locale is KOI8-R, file encoding is UTF-8. Note: those encodings
are not same.
File content is following (in Russian):
йцукен
Йцукен
The difference is in first line char only: Й (lowercase letter) and й
(uppercase letter). The search of Ê gives the result Й independently of
case sensitivity. й isn't found.
If switch "All charsets" on, nothing is found.
The main idea of fix is modification of search API to allow set of search
pattern charset and use if within search engine.
Old API:
mc_search_new (pattern, pattern_len);
New API:
mc_search_new (pattern, pattern_len, pattern_charset);
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-21 13:35:31 +04:00
Slava Zanko
8a28d3bac4
Rename type file_entry to the file_entry_t.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-09-19 16:22:30 +04:00
Andrew Borodin
7b184ddea4
PCRE_CFLAGS are CPPFLAGS, actually.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-18 16:27:49 +04:00
Andrew Borodin
d82757d233
Ticket #2917 : Makefile.ams cleanup: remove unused AM_CPPFLAGS.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:24:30 +04:00
Andrew Borodin
908e747861
Optimization of ini files load.
...
Some ini files (keymaps, skins) are loaded in read-only mode. For those
files, we don't need load and keep comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-31 14:50:11 +04:00
Andrew Borodin
b37af47023
Makefile.ams cleanup.
...
Set defines via CPPFLAGS variable not via CFLAGS one.
Use AM_CPPFLAGS and AM_CFLAGS variables instead of per-target ones.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Andrew Borodin
2a5a5b4753
Ticket #2795 : hex search: can't find 00 (zeroes) in patterns.
...
Don't interpret the '0' character as end of search pattern.
Use pattern length for that.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-05-08 18:57:55 +04:00
Slava Zanko
6c32fa3b84
Added function mc_config_get_full_path() for search user's config files by short names.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
0138645541
Ticket 1551: Update GPL version from 2 to 3
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-18 14:08:34 +03:00
Slava Zanko
6016620f42
Remove backlinks from lib to src - move global variables(used in lib) to mc_global structure (see lib/global.c)
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:50 +02:00
Andrew Borodin
6484b1dce7
Allow remove key with empty value from target config.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Curtis Doty
264f90b675
Ticket #2478 : HARDLINK file type
...
It doesn't work as documented, but instead seems to *wrongly* identify/highlight symlinks instead.
Of course, the LINK type also fails to detect hardlinks.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-02-18 15:20:33 +02:00
Slava Zanko
c8982e822c
Updated docs (man pages and comments in source code)
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-20 17:38:27 +02:00
Slava Zanko
f31863a80a
Renamed variables mc_home to mc_sysconfig_dir and mc_home_alt to mc_share_data_dir for more sence
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-20 17:38:27 +02:00