diff --git a/lib/search.h b/lib/search.h index 9b7300612..faa320728 100644 --- a/lib/search.h +++ b/lib/search.h @@ -61,8 +61,10 @@ typedef struct mc_search_struct { /* public input data */ +#ifdef HAVE_CHARSET /* search in all charsets */ gboolean is_all_charsets; +#endif /* case sensitive search */ gboolean is_case_sensitive; diff --git a/src/diffviewer/search.c b/src/diffviewer/search.c index 437753fef..9a0ea67cd 100644 --- a/src/diffviewer/search.c +++ b/src/diffviewer/search.c @@ -258,7 +258,9 @@ dview_search_cmd (WDiff * dview) return; dview->search.handle->search_type = mcdiffview_search_options.type; +#ifdef HAVE_CHARSET dview->search.handle->is_all_charsets = mcdiffview_search_options.all_codepages; +#endif dview->search.handle->is_case_sensitive = mcdiffview_search_options.case_sens; dview->search.handle->whole_words = mcdiffview_search_options.whole_words; diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c index 4457976e1..a5bcd0ce2 100644 --- a/src/editor/editcmd.c +++ b/src/editor/editcmd.c @@ -2527,7 +2527,9 @@ edit_replace_cmd (WEdit * edit, int again) goto cleanup; } edit->search->search_type = edit_search_options.type; +#ifdef HAVE_CHARSET edit->search->is_all_charsets = edit_search_options.all_codepages; +#endif edit->search->is_case_sensitive = edit_search_options.case_sens; edit->search->whole_words = edit_search_options.whole_words; edit->search->search_fn = edit_search_cmd_callback; @@ -2729,7 +2731,9 @@ edit_search_cmd (WEdit * edit, gboolean again) else { edit->search->search_type = edit_search_options.type; +#ifdef HAVE_CHARSET edit->search->is_all_charsets = edit_search_options.all_codepages; +#endif edit->search->is_case_sensitive = edit_search_options.case_sens; edit->search->whole_words = edit_search_options.whole_words; edit->search->search_fn = edit_search_cmd_callback; diff --git a/src/editor/editcmd_dialogs.c b/src/editor/editcmd_dialogs.c index 3939e5b7f..bde36351d 100644 --- a/src/editor/editcmd_dialogs.c +++ b/src/editor/editcmd_dialogs.c @@ -170,7 +170,9 @@ editcmd_dialog_search_show (WEdit * edit) if (edit->search != NULL) { edit->search->search_type = edit_search_options.type; +#ifdef HAVE_CHARSET edit->search->is_all_charsets = edit_search_options.all_codepages; +#endif edit->search->is_case_sensitive = edit_search_options.case_sens; edit->search->whole_words = edit_search_options.whole_words; edit->search->search_fn = edit_search_cmd_callback; diff --git a/src/filemanager/find.c b/src/filemanager/find.c index 1887da83d..dd56ba036 100644 --- a/src/filemanager/find.c +++ b/src/filemanager/find.c @@ -1632,12 +1632,16 @@ run_process (void) options.content_regexp ? MC_SEARCH_T_REGEX : MC_SEARCH_T_NORMAL; search_content_handle->is_case_sensitive = options.content_case_sens; search_content_handle->whole_words = options.content_whole_words; +#ifdef HAVE_CHARSET search_content_handle->is_all_charsets = options.content_all_charsets; +#endif } search_file_handle = mc_search_new (find_pattern, -1, NULL); search_file_handle->search_type = options.file_pattern ? MC_SEARCH_T_GLOB : MC_SEARCH_T_REGEX; search_file_handle->is_case_sensitive = options.file_case_sens; +#ifdef HAVE_CHARSET search_file_handle->is_all_charsets = options.file_all_charsets; +#endif search_file_handle->is_entire_line = options.file_pattern; resuming = FALSE; diff --git a/src/viewer/actions_cmd.c b/src/viewer/actions_cmd.c index 6289f04ef..0de67db3b 100644 --- a/src/viewer/actions_cmd.c +++ b/src/viewer/actions_cmd.c @@ -163,7 +163,9 @@ mcview_continue_search_cmd (mcview_t * view) else { view->search->search_type = mcview_search_options.type; +#ifdef HAVE_CHARSET view->search->is_all_charsets = mcview_search_options.all_codepages; +#endif view->search->is_case_sensitive = mcview_search_options.case_sens; view->search->whole_words = mcview_search_options.whole_words; view->search->search_fn = mcview_search_cmd_callback; diff --git a/src/viewer/dialogs.c b/src/viewer/dialogs.c index ba3a1e3b7..21022f4cf 100644 --- a/src/viewer/dialogs.c +++ b/src/viewer/dialogs.c @@ -151,7 +151,9 @@ mcview_dialog_search (mcview_t * view) if (view->search != NULL) { view->search->search_type = mcview_search_options.type; +#ifdef HAVE_CHARSET view->search->is_all_charsets = mcview_search_options.all_codepages; +#endif view->search->is_case_sensitive = mcview_search_options.case_sens; view->search->whole_words = mcview_search_options.whole_words; view->search->search_fn = mcview_search_cmd_callback;