Put a prolog at the top of configuration files
Later I'm going to put in there some more information about the format etc.
This commit is contained in:
@@ -1824,8 +1824,8 @@ read_config_file (struct str_map *config, struct error **e)
|
||||
}
|
||||
|
||||
static char *
|
||||
write_default_config (const char *filename, const struct config_item *table,
|
||||
struct error **e)
|
||||
write_default_config (const char *filename, const char *prolog,
|
||||
const struct config_item *table, struct error **e)
|
||||
{
|
||||
struct str path, base;
|
||||
|
||||
@@ -1861,6 +1861,9 @@ write_default_config (const char *filename, const struct config_item *table,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (prolog)
|
||||
fputs (prolog, fp);
|
||||
|
||||
errno = 0;
|
||||
for (; table->key != NULL; table++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user