const struct lls_suite *suite,
const char *(*aux_info_cb)(unsigned cmd_num, bool verbose),
char **result, unsigned *num_chars);
+
+/** Flags for \ref lsu_merge_config_file_options(). */
+enum lsu_merge_cf_flags {
+ /**
+ * Whether the options specified in the configuration file should
+ * override the currently effective options. At application startup
+ * this is usually unset so that command line options take precedence
+ * over config file options. However, if the application supports
+ * re-reading the configuration, it can make sense to enable this flag.
+ */
+ MCF_OVERRIDE = 1,
+ /**
+ * After the two lopsub parse results have been merged, the merged
+ * parse result usually becomes the effective configuration and the
+ * parse result which corresponds to the former effective options is no
+ * longer needed. Therefore \ref lsu_merge_config_file_options() frees
+ * this former parse result by default. This flag instructs the
+ * function to keep it. This is mostly useful if the application
+ * supports re-reading the config file so that the parse result which
+ * corresponds to the command line options is kept for future calls to
+ * \ref lsu_merge_config_file_options().
+ */
+ MCF_DONT_FREE = 2,
+};
+
+int lsu_merge_config_file_options(const char *path, const char *dflt,
+ struct lls_parse_result **lpr, const struct lls_command *cmd,
+ const struct lls_suite *suite, unsigned flags);