| 19 | #include <strings.h> |
| 20 | |
| 21 | bool get_env_bool(const char *key) |
| 22 | { |
| 23 | const char *val = getenv(key); |
| 24 | if (!val) |
| 25 | return false; |
| 26 | if (strcasecmp(val, "off") == 0) |
| 27 | return false; |
| 28 | if (strcasecmp(val, "no") == 0) |
| 29 | return false; |
| 30 | if (strcasecmp(val, "false") == 0) |
| 31 | return false; |
| 32 | if (strcasecmp(val, "0") == 0) |
| 33 | return false; |
| 34 | return true; |
| 35 | } |
| 36 | |
| 37 | int get_env_int(const char *key) |
| 38 | { |
no test coverage detected