liboptcfg

diff src/optcfg.h @ 4:a6f127f3408d

implemented -no- and -disable- prefixes
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 27 Jul 2016 05:05:45 +0300
parents f971dfa66076
children
line diff
     1.1 --- a/src/optcfg.h	Wed Jul 27 04:31:40 2016 +0300
     1.2 +++ b/src/optcfg.h	Wed Jul 27 05:05:45 2016 +0300
     1.3 @@ -7,10 +7,10 @@
     1.4  struct optcfg;
     1.5  
     1.6  struct optcfg_option {
     1.7 -	char c;		/* short (optional): used only for argument parsing */
     1.8 -	char *s;	/* long: used for long options and config files */
     1.9 -	int opt;	/* the corresponding option enumeration */
    1.10 -	char *desc;	/* text description for printing usage information */
    1.11 +	char c;				/* short (optional): used only for argument parsing */
    1.12 +	const char *s;		/* long: used for long options and config files */
    1.13 +	int opt;			/* the corresponding option enumeration */
    1.14 +	const char *desc;	/* text description for printing usage information */
    1.15  };
    1.16  
    1.17  #define OPTCFG_OPTIONS_END	{0, 0, -1, 0}
    1.18 @@ -63,7 +63,7 @@
    1.19   * optcfg_bool_value in sequence.
    1.20   * For argument parsing however, it doesn't consume further arguments. Merely
    1.21   * the presence of the option makes it enabled, and its presence with a -no-
    1.22 - * prefix disables it. (TODO the second part of this)
    1.23 + * or -disable- prefix disables it.
    1.24   */
    1.25  int optcfg_enabled_value(struct optcfg *oc, int *enabledp);
    1.26