| 112 | } |
| 113 | |
| 114 | char *opt_set_autobool_arg(const char *arg, enum opt_autobool *b) |
| 115 | { |
| 116 | if (!strcasecmp(arg, "yes") || |
| 117 | !strcasecmp(arg, "true")) { |
| 118 | *b = OPT_AUTOBOOL_TRUE; |
| 119 | return NULL; |
| 120 | } |
| 121 | if (!strcasecmp(arg, "no") || |
| 122 | !strcasecmp(arg, "false")) { |
| 123 | *b = OPT_AUTOBOOL_FALSE; |
| 124 | return NULL; |
| 125 | } |
| 126 | if (!strcasecmp(arg, "auto") || |
| 127 | !strcasecmp(arg, "default")) { |
| 128 | *b = OPT_AUTOBOOL_AUTO; |
| 129 | return NULL; |
| 130 | } |
| 131 | return opt_invalid_argument(arg); |
| 132 | } |
| 133 | |
| 134 | bool opt_show_autobool(char *buf, size_t len, const enum opt_autobool *b) |
| 135 | { |
nothing calls this directly
no test coverage detected