diff --git a/src/bfu/inphist.c b/src/bfu/inphist.c index 5e4ab6d6e..969b04fab 100644 --- a/src/bfu/inphist.c +++ b/src/bfu/inphist.c @@ -284,9 +284,9 @@ add_to_input_history(struct input_history *history, char *data, /* Load history file */ int -load_input_history(struct input_history *history, char *filename) +load_input_history(struct input_history *history, const char *filename) { - char *history_file = filename; + char *history_file = (char *)filename; char line[MAX_STR_LEN]; FILE *file; @@ -319,7 +319,7 @@ load_input_history(struct input_history *history, char *filename) /* Write history list to file. It returns a value different from 0 in case of * failure, 0 on success. */ int -save_input_history(struct input_history *history, char *filename) +save_input_history(struct input_history *history, const char *filename) { struct input_history_entry *entry; struct secure_save_info *ssi; diff --git a/src/bfu/inphist.h b/src/bfu/inphist.h index 2f71e84eb..a51962e90 100644 --- a/src/bfu/inphist.h +++ b/src/bfu/inphist.h @@ -54,11 +54,11 @@ void do_tab_compl_unambiguous(struct dialog_data *, LIST_OF(struct input_history_entry) *); /* Load history file from elinks home. */ -int load_input_history(struct input_history *history, char *filename); +int load_input_history(struct input_history *history, const char *filename); /* Write history list to @filebane in elinks home. It returns a value different * from 0 in case of failure, 0 on success. */ -int save_input_history(struct input_history *history, char *filename); +int save_input_history(struct input_history *history, const char *filename); void dlg_set_history(struct widget_data *); diff --git a/src/viewer/text/search.c b/src/viewer/text/search.c index c97bcbc2f..c0f7a0d2f 100644 --- a/src/viewer/text/search.c +++ b/src/viewer/text/search.c @@ -987,7 +987,7 @@ get_searched_all(struct session *ses, struct document_view *doc_view, struct poi } static enum find_error -search_for_do(struct session *ses, char *str, int direction, +search_for_do(struct session *ses, const char *str, int direction, int report_errors) { struct document_view *doc_view; @@ -1031,7 +1031,7 @@ search_for_do(struct session *ses, char *str, int direction, } static void -search_for_back(struct session *ses, char *str) +search_for_back(struct session *ses, const char *str) { assert(ses && str); if_assert_failed return; @@ -1040,7 +1040,7 @@ search_for_back(struct session *ses, char *str) } void -search_for(struct session *ses, char *str) +search_for(struct session *ses, const char *str) { assert(ses && str); if_assert_failed return; diff --git a/src/viewer/text/search.h b/src/viewer/text/search.h index b0c932971..e9a14e4e0 100644 --- a/src/viewer/text/search.h +++ b/src/viewer/text/search.h @@ -22,7 +22,7 @@ enum frame_event_status find_next(struct session *ses, struct document_view *doc enum frame_event_status move_search_next(struct session *ses, struct document_view *doc_view); enum frame_event_status move_search_prev(struct session *ses, struct document_view *doc_view); -void search_for(struct session *ses, char *str); +void search_for(struct session *ses, const char *str); enum frame_event_status search_dlg(struct session *ses, struct document_view *doc_view, int direction); enum frame_event_status search_typeahead(struct session *ses, struct document_view *doc_view, action_id_T action_id);