1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[bfu] const in load_input_history and save_input_history

This commit is contained in:
Witold Filipczyk 2022-02-11 19:57:36 +01:00
parent b9701abffb
commit 6575f71dd4
4 changed files with 9 additions and 9 deletions

View File

@ -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;

View File

@ -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 *);

View File

@ -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;

View File

@ -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);