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

[options] const desc

This commit is contained in:
Witold Filipczyk 2022-01-29 18:37:02 +01:00
parent 157f1978cf
commit 0689f0502e
2 changed files with 5 additions and 5 deletions

View File

@ -847,8 +847,8 @@ static int indentation = 2;
/* 0 -> none, 1 -> only option full name+type, 2 -> only desc, 3 -> both */
static int comments = 3;
static inline char *
conf_i18n(char *s, int i18n)
static inline const char *
conf_i18n(const char *s, int i18n)
{
if (i18n) return gettext(s);
return s;
@ -908,7 +908,7 @@ static void
output_option_desc_as_comment(struct string *out, const struct option *option,
int i18n, int depth)
{
char *desc_i18n = conf_i18n(option->desc, i18n);
const char *desc_i18n = conf_i18n(option->desc, i18n);
struct string indent;
if (!init_string(&indent)) return;
@ -1069,7 +1069,7 @@ smart_config_output_fn_html(struct string *string, struct option *option,
}
static void
add_cfg_header_to_string(struct string *string, char *text)
add_cfg_header_to_string(struct string *string, const char *text)
{
int n = strlen(text) + 2;

View File

@ -201,7 +201,7 @@ struct option {
enum option_type type;
long min, max;
union option_value value;
char *desc;
const char *desc;
char *capt;
struct option *root;