112{
113 if (!he || !value || !fp)
114 return;
115
117
120 {
121 return;
122 }
123
125 {
127 const char *syn = (
const char *) cdef->
initial;
128 fprintf(fp,
"# synonym: %s -> %s\n",
name, syn);
129 return;
130 }
131
133 {
135 fprintf(fp,
"# %s\n", cdef->
docs);
136 }
137
140
141 if (show_name && show_value)
142 fprintf(fp, "set ");
143 if (show_name)
144 {
146 {
147
148 static int seq_num = 1;
149
151 {
152 static const char *url = "https://neomutt.org/guide/configuration#set-myvar";
153 fprintf(fp,
"\033]8;id=%d;%s\a%s\033]8;;\a", seq_num++, url,
name);
154 }
155 else
156 {
158 for (char *underscore = fragment; (underscore = strchr(underscore, '_')); underscore++)
159 {
160 *underscore = '-';
161 }
162
163 static const char *url = "https://neomutt.org/guide/reference";
164 fprintf(fp,
"\033]8;id=%d;%s#%s\a%s\033]8;;\a", seq_num++, url, fragment,
name);
166 }
167 }
168 else
169 {
170 fprintf(fp,
"%s",
name);
171 }
172 }
173 if (show_name && show_value)
174 fprintf(fp, " = ");
175 if (show_value)
176 fprintf(fp,
"%s", value->
data);
177 if (show_name || show_value)
178 fprintf(fp, "\n");
179
181 {
183 if (cst)
184 fprintf(fp,
"# %s %s %s\n", cst->
name,
name, value->
data);
185 }
186
188 fprintf(fp, "\n");
189}
#define CS_DUMP_HIDE_VALUE
Do not print the value of the config item.
#define CS_DUMP_LINK_DOCS
Link to the online docs.
#define CS_DUMP_ONLY_CHANGED
Only show config that the user has changed.
#define CS_DUMP_HIDE_NAME
Do not print the name of the config item.
#define CS_DUMP_SHOW_DEFAULTS
Show the default value for the config item.
#define CS_DUMP_SHOW_DOCS
Show one-liner documentation for the config item.
const struct ConfigSetType * cs_get_type_def(const struct ConfigSet *cs, unsigned int type)
Get the definition for a type.
#define FREE(x)
Free memory and set the pointer to NULL.
char * mutt_str_dup(const char *str)
Copy a string, safely.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
char * data
Pointer to data.
const char * name
User-visible name.
intptr_t initial
Initial value.
const char * docs
One-liner description.
const char * name
Name of the type, e.g. "String".
union HashKey key
Key representing the data.
int type
Type of data stored in Hash Table, e.g. DT_STRING.
void * data
User-supplied data.
#define CONFIG_TYPE(t)
Extract the type from the flags.
@ DT_SYNONYM
synonym for another variable
@ DT_MYVAR
a user-defined variable (my_foo)
const char * strkey
String key.