Andrew Borodin
377807c5de
Fix search in internal viewer in case of nroff mode.
...
(mc_search__run_regex): fix conditions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-25 13:47:40 +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
Andrew Borodin
0a784f4d2e
(mc_search_regex__process_append_str): minor optimization and cosmetics.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:12:08 +04:00
Andrew Borodin
fbdf3adfbf
(mc_search__cond_struct_new_regex_accum_append): minor optimization.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:12:08 +04:00
Andrew Borodin
00f6272364
(mc_search__cond_struct_new_regex_hex_add): refactoring to get rid of extra memory allocation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:05 +04:00
Andrew Borodin
bb2f5d35f3
(mc_search__run_regex): optimization
...
...for case where there is no MC_SEARCH_CB_INVALID or MC_SEARCH_CB_SKIP
return codes (for search from file manager), so we can copy line
at regex buffer all at once.
Thanks Sergey Naumov <sknaumov@gmail.com> for the original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:05 +04:00
Andrew Borodin
82b1d7bff3
Parenthesis around some -1.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
e7fb3526f3
Core, mceditor, mcviewer and mcdiffviewer code tweak and cleanup
...
...in case of build with --disable-charset option.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-25 16:58:57 +04:00
Andrew Borodin
bbf534e7d7
Don't mix mc_search_cb_ret_t and int as result of search callback.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-05-08 18:57:55 +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
vokac
8c0621b2b6
Ticket #2764 : Case sensitive search with SEARCH_TYPE_PCRE
...
When mc is compiled with SEARCH_TYPE_PCRE (and without SEARCH_TYPE_GLIB,
e.g. on systems with old glib < 2.14) case (in)sensitive search works in opposite.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-09 11:30:15 +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
372cf39a4f
Fixed regexp error if current codepage isn't equal to UTF-8 in UTF-8 environment
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 13:50:02 +03:00
Slava Zanko
1940e8f5dd
Fixed broken search results highlighting
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-19 09:51:08 +03:00
Slava Zanko
e1edfd7c93
Remove replace_prepare_t type and use defined constants for use just one type (int) in functions
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 17:28:07 +03:00
Vitaliy Filippov
fb7b01eeb9
Despite of the fact that algorithm now ignores the absence of closing curly
...
brace '}' (which probably isn't 100% correct), this should be checked in tests
for replace_handle_esc_seq function, not process_escape_sequence - it is the
replace_handle_esq_seq who decides whether it is an escape sequence or not.
Also, \x{4344} is usually a code for wide character (UTF-8), and not for "CD".
So we can either ignore the higher bits, or generate wide character codes...
The second would be convenient, but would also introduce a hard-coded UTF-8 charset.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-08 17:28:07 +03:00
Vitaliy Filippov
aa2d0b07ed
Ticket #1882 : PCRE search: escape sequence support in replacements, UTF8 support (just a flag for libPCRE)
...
Enables use of escape sequences inside regex replace strings,
Enables UTF-8 caseless search in PCRE.
Supported escape sequences: \DEC, \xHEX, \0OCT, \n, \t, \v,
\b, \r, \f, \a. Any of them could be enclosed into \{}.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 17:26:30 +03:00
Slava Zanko
045debaa8a
Moved charsets.[ch] from src to lib directory
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Andrew Borodin
1192d34bd1
Clean up some empty lines.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:46 +03:00
Slava Zanko
feb733663f
Code indentation in lib directory
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:20 +03:00
Andrew Borodin
b6fd832a8a
Create strings with small preallocated sizes.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 15:48:39 +02:00
Andrew Borodin
69cebb9984
mc_search__cond_struct_new_regex_ci_str(): get rid of extra string duplication.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-01 15:48:38 +02:00
Andrew Borodin
5cac8caabe
Minor optimization of translation function arguments.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 15:48:38 +02:00
Slava Zanko
601047b6a1
Avoid extra-allocation of string while prepare to regexp-search.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-01 15:48:38 +02:00
Slava Zanko
863f1ec174
Fixed bit operations in mc_search_regex__process_append_str()
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-01 15:48:38 +02:00
Slava Zanko
3934c6fb8e
Ticket #2396 (Find File "Whole words" search bug)
...
when searching in files for non english word with "Whole words" set "on" - then nothig will be found
try search word: "время" and also "time" in next example:
'time'
Время
'Time'
'время'
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 15:48:38 +02:00
Slava Zanko
c5dfdac5fc
Ticket #2123 : Fix to properly parse the replacement string
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-07-08 22:15:09 +03:00
Andrew Borodin
ec7b039588
Ticket #2243 : code cleanup before 4.7.3 release.
...
Removed unneeded breaks from switch operators.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 21:35:18 +04:00
Andrew Borodin
aa0d96bd8b
Ticket #1646 : removed leading and trailing spaces in i18n resources.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-07 21:42:46 +04:00
Andrew Borodin
7e5f4a01c0
i18n of search error messages.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-04 23:34:28 +04:00
Andrew Borodin
e70db42deb
Grammar.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:13 +04:00
Andrew Borodin
5b68413e62
Applied MC indentation policy.
...
Applied MC indentation policy to all files modified in this branch
with some simple manual modifications.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-03-30 16:21:22 +04:00
Andrew Borodin
e94c1393e6
Fixed memory leak in mc_search__cond_struct_new_regex_accum_append().
...
Minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-03-30 16:21:22 +04:00
Slava Zanko
e07ba16b3b
Moved strecape.[ch] into library
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:25 +02:00
Slava Zanko
25155c311a
Move all interface includes from subdirs lib/*/*.h into lib/*.h
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:25 +02:00
Slava Zanko
cd4dbf3a09
Changes for build after moving strutil into lib
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:24 +02:00
Slava Zanko
93dbc46e9c
Reorganization of sources. Part 1.
...
* moved src/global.h into lib/global.h
* moved glibcompat.[ch] from ./src/ into ./lib/
* moved fs.h from ./src/ into ./lib/
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:23 +02:00
Slava Zanko
39d5b94cac
Reorganized pathes to files in '#include' directives
2010-01-26 10:30:22 +02:00
Slava Zanko
ddb9ada2e8
Changes in sources matched with mass movement of $(srcdir)/src/*/ into $(srcdir)/lib/*/
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:22 +02:00
Slava Zanko
4f11e4b665
Massive moved some dirs from $(srcdir)/src into $(srcdir)/lib
...
Moved subdirs:
* filehighlight
* mcconfig
* search
* skin
* tty
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:22 +02:00