1 /* Copyright (C) 2018 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
3 /** \file lsu.h Lopsub Utilities, enums and public functions. */
4 int lsu_com_help(bool long_help, const struct lls_parse_result *lpr,
5 const struct lls_suite *suite,
6 const char *(*aux_info_cb)(unsigned cmd_num, bool verbose),
7 char **result, unsigned *num_chars);
9 /** Flags for \ref lsu_merge_config_file_options(). */
10 enum lsu_merge_cf_flags {
12 * Whether the options specified in the configuration file should
13 * override the currently effective options. At application startup
14 * this is usually unset so that command line options take precedence
15 * over config file options. However, if the application supports
16 * re-reading the configuration, it can make sense to enable this flag.
20 * After the two lopsub parse results have been merged, the merged
21 * parse result usually becomes the effective configuration and the
22 * parse result which corresponds to the former effective options is no
23 * longer needed. Therefore \ref lsu_merge_config_file_options() frees
24 * this former parse result by default. This flag instructs the
25 * function to keep it. This is mostly useful if the application
26 * supports re-reading the config file so that the parse result which
27 * corresponds to the command line options is kept for future calls to
28 * \ref lsu_merge_config_file_options().
33 int lsu_merge_config_file_options(const char *path, const char *dflt,
34 struct lls_parse_result **lpr, const struct lls_command *cmd,
35 const struct lls_suite *suite, unsigned flags);