src/search fixed variable declaration and code mix
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
Этот коммит содержится в:
родитель
798205ce07
Коммит
16811ed607
@ -71,8 +71,8 @@ mc_search__hex_translate_to_regex (gchar * str, gsize * len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (*(tmp_str + loop) == '"') {
|
if (*(tmp_str + loop) == '"') {
|
||||||
loop++;
|
|
||||||
gsize loop2 = 0;
|
gsize loop2 = 0;
|
||||||
|
loop++;
|
||||||
while (loop + loop2 < *len) {
|
while (loop + loop2 < *len) {
|
||||||
if (*(tmp_str + loop + loop2) == '"' &&
|
if (*(tmp_str + loop + loop2) == '"' &&
|
||||||
!strutils_is_char_escaped (tmp_str, tmp_str + loop + loop2))
|
!strutils_is_char_escaped (tmp_str, tmp_str + loop + loop2))
|
||||||
|
@ -387,10 +387,12 @@ mc_search_getstart_rezult_by_num (mc_search_t * mc_search, int index)
|
|||||||
if (mc_search->search_type == MC_SEARCH_T_NORMAL)
|
if (mc_search->search_type == MC_SEARCH_T_NORMAL)
|
||||||
return 0;
|
return 0;
|
||||||
#ifdef SEARCH_TYPE_GLIB
|
#ifdef SEARCH_TYPE_GLIB
|
||||||
gint start_pos;
|
{
|
||||||
gint end_pos;
|
gint start_pos;
|
||||||
g_match_info_fetch_pos (mc_search->regex_match_info, index, &start_pos, &end_pos);
|
gint end_pos;
|
||||||
return (int) start_pos;
|
g_match_info_fetch_pos (mc_search->regex_match_info, index, &start_pos, &end_pos);
|
||||||
|
return (int) start_pos;
|
||||||
|
}
|
||||||
#else /* SEARCH_TYPE_GLIB */
|
#else /* SEARCH_TYPE_GLIB */
|
||||||
return mc_search->iovector[index * 2];
|
return mc_search->iovector[index * 2];
|
||||||
#endif /* SEARCH_TYPE_GLIB */
|
#endif /* SEARCH_TYPE_GLIB */
|
||||||
@ -407,10 +409,12 @@ mc_search_getend_rezult_by_num (mc_search_t * mc_search, int index)
|
|||||||
if (mc_search->search_type == MC_SEARCH_T_NORMAL)
|
if (mc_search->search_type == MC_SEARCH_T_NORMAL)
|
||||||
return 0;
|
return 0;
|
||||||
#ifdef SEARCH_TYPE_GLIB
|
#ifdef SEARCH_TYPE_GLIB
|
||||||
gint start_pos;
|
{
|
||||||
gint end_pos;
|
gint start_pos;
|
||||||
g_match_info_fetch_pos (mc_search->regex_match_info, index, &start_pos, &end_pos);
|
gint end_pos;
|
||||||
return (int) end_pos;
|
g_match_info_fetch_pos (mc_search->regex_match_info, index, &start_pos, &end_pos);
|
||||||
|
return (int) end_pos;
|
||||||
|
}
|
||||||
#else /* SEARCH_TYPE_GLIB */
|
#else /* SEARCH_TYPE_GLIB */
|
||||||
return mc_search->iovector[index * 2 + 1];
|
return mc_search->iovector[index * 2 + 1];
|
||||||
#endif /* SEARCH_TYPE_GLIB */
|
#endif /* SEARCH_TYPE_GLIB */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user