mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
Merge branch 'master' of ssh://angel_il@midnight-commander.org:2222/git/mc
This commit is contained in:
commit
86ca1f6663
@ -253,16 +253,16 @@ mc_search__regex_found_cond_one (mc_search_t * mc_search, mc_search_regex_t * re
|
|||||||
#if HAVE_LIBPCRE
|
#if HAVE_LIBPCRE
|
||||||
mc_search->num_rezults = pcre_exec (regex, mc_search->regex_match_info,
|
mc_search->num_rezults = pcre_exec (regex, mc_search->regex_match_info,
|
||||||
search_str->str, search_str->len, 0, 0, mc_search->iovector,
|
search_str->str, search_str->len, 0, 0, mc_search->iovector,
|
||||||
MC_SEARCH__PCRE_MAX_MATCHES);
|
MC_SEARCH__NUM_REPLACE_ARGS);
|
||||||
if (mc_search->num_rezults < 0) {
|
if (mc_search->num_rezults < 0) {
|
||||||
return COND__NOT_FOUND;
|
return COND__NOT_FOUND;
|
||||||
}
|
}
|
||||||
#else /* HAVE_LIBPCRE */
|
#else /* HAVE_LIBPCRE */
|
||||||
|
|
||||||
if (regexec (regex, search_str->str, MC_SEARCH__NUM_REPL_ARGS, mc_search->regex_match_info, 0))
|
if (regexec (regex, search_str->str, MC_SEARCH__NUM_REPLACE_ARGS, mc_search->regex_match_info, 0))
|
||||||
return COND__NOT_FOUND;
|
return COND__NOT_FOUND;
|
||||||
|
|
||||||
for (mc_search->num_rezults = 0; mc_search->num_rezults < MC_SEARCH__NUM_REPL_ARGS;
|
for (mc_search->num_rezults = 0; mc_search->num_rezults < MC_SEARCH__NUM_REPLACE_ARGS;
|
||||||
mc_search->num_rezults++) {
|
mc_search->num_rezults++) {
|
||||||
if (mc_search->regex_match_info[mc_search->num_rezults].rm_eo == 0)
|
if (mc_search->regex_match_info[mc_search->num_rezults].rm_eo == 0)
|
||||||
break;
|
break;
|
||||||
@ -549,7 +549,7 @@ mc_search__cond_struct_new_init_regex (const char *charset, mc_search_t * mc_sea
|
|||||||
mc_search_cond->regex_handle = NULL;
|
mc_search_cond->regex_handle = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mc_search->regex_match_info = g_new0 (mc_search_matchinfo_t, MC_SEARCH__NUM_REPL_ARGS);
|
mc_search->regex_match_info = g_new0 (mc_search_matchinfo_t, MC_SEARCH__NUM_REPLACE_ARGS);
|
||||||
#endif /* HAVE_LIBPCRE */
|
#endif /* HAVE_LIBPCRE */
|
||||||
#endif /* GLIB_CHECK_VERSION (2, 14, 0) */
|
#endif /* GLIB_CHECK_VERSION (2, 14, 0) */
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user