1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00

Make arrays of option change hooks const.

This commit is contained in:
Kalle Olavi Niemitalo 2007-01-27 19:00:47 +02:00 committed by Kalle Olavi Niemitalo
parent ba5f683dcb
commit 22f7468013
7 changed files with 9 additions and 9 deletions

View File

@ -135,7 +135,7 @@ change_hook_folder_state(struct session *ses, struct option *current,
static void
init_bookmarks(struct module *module)
{
struct change_hook_info bookmarks_change_hooks[] = {
static const struct change_hook_info bookmarks_change_hooks[] = {
{ "bookmarks.folder_state", change_hook_folder_state },
{ NULL, NULL },
};

View File

@ -680,7 +680,7 @@ register_autocreated_options(void)
static struct option_info config_options_info[];
extern struct option_info cmdline_options_info[];
static struct change_hook_info change_hooks[];
static const struct change_hook_info change_hooks[];
void
init_options(void)
@ -716,7 +716,7 @@ done_options(void)
}
void
register_change_hooks(struct change_hook_info *change_hooks)
register_change_hooks(const struct change_hook_info *change_hooks)
{
int i;
@ -976,7 +976,7 @@ change_hook_language(struct session *ses, struct option *current, struct option
return 0;
}
static struct change_hook_info change_hooks[] = {
static const struct change_hook_info change_hooks[] = {
{ "config.show_template", change_hook_stemplate },
{ "connection", change_hook_connection },
{ "document.browse", change_hook_html },

View File

@ -145,7 +145,7 @@ struct change_hook_info {
change_hook_T change_hook;
};
extern void register_change_hooks(struct change_hook_info *change_hooks);
extern void register_change_hooks(const struct change_hook_info *change_hooks);
extern struct list_head *init_options_tree(void);

View File

@ -63,7 +63,7 @@ periodic_save_change_hook(struct session *ses, struct option *current,
static void
init_timer(struct module *module)
{
struct change_hook_info timer_change_hooks[] = {
static const struct change_hook_info timer_change_hooks[] = {
{ "infofiles.save_interval", periodic_save_change_hook },
{ NULL, NULL },
};

View File

@ -135,7 +135,7 @@ change_hook_css(struct session *ses, struct option *current, struct option *chan
static void
init_css(struct module *module)
{
struct change_hook_info css_change_hooks[] = {
static const struct change_hook_info css_change_hooks[] = {
{ "document.css", change_hook_css },
{ NULL, NULL },
};

View File

@ -456,7 +456,7 @@ change_hook_mailcap(struct session *ses, struct option *current, struct option *
static void
init_mailcap(struct module *module)
{
struct change_hook_info mimetypes_change_hooks[] = {
static const struct change_hook_info mimetypes_change_hooks[] = {
{ "mime.mailcap", change_hook_mailcap },
{ NULL, NULL },
};

View File

@ -221,7 +221,7 @@ change_hook_mimetypes(struct session *ses, struct option *current, struct option
static void
init_mimetypes(struct module *module)
{
struct change_hook_info mimetypes_change_hooks[] = {
static const struct change_hook_info mimetypes_change_hooks[] = {
{ "mime.mimetypes", change_hook_mimetypes },
{ NULL, NULL },
};