mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-27 02:56:18 -04:00
[options] these can be const
This commit is contained in:
parent
2f53629fea
commit
6c83455ab7
@ -118,7 +118,7 @@ static char *
|
||||
get_option_text(struct listbox_item *item, struct terminal *term)
|
||||
{
|
||||
struct option *option = (struct option *)item->udata;
|
||||
char *desc = option->capt ? option->capt : option->name;
|
||||
const char *desc = option->capt ? option->capt : option->name;
|
||||
|
||||
if (option->flags & OPT_TOUCHED)
|
||||
return straconcat(_(desc, term),
|
||||
|
@ -124,7 +124,7 @@ get_content_type_default(char *extension)
|
||||
assert(opt_tree);
|
||||
|
||||
foreach (opt, *opt_tree->value.tree) {
|
||||
char *namepos = opt->name + strlen(opt->name) - 1;
|
||||
const char *namepos = opt->name + strlen(opt->name) - 1;
|
||||
char *extpos = extend;
|
||||
|
||||
/* Match the longest possible part of URL.. */
|
||||
|
@ -592,7 +592,7 @@ screen_driver_change_hook(struct session *ses, struct option *term_spec,
|
||||
{
|
||||
term_mode_type_T type = get_opt_int_tree(term_spec, "type", NULL);
|
||||
struct screen_driver *driver;
|
||||
char *name = term_spec->name;
|
||||
const char *name = term_spec->name;
|
||||
|
||||
foreach (driver, active_screen_drivers)
|
||||
if (driver->type == type && !strcmp(driver->name, name)) {
|
||||
@ -632,7 +632,7 @@ static inline struct screen_driver *
|
||||
get_screen_driver(struct terminal *term)
|
||||
{
|
||||
term_mode_type_T type = get_opt_int_tree(term->spec, "type", NULL);
|
||||
char *name = term->spec->name;
|
||||
const char *name = term->spec->name;
|
||||
int len = strlen(name);
|
||||
struct screen_driver *driver;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user