| 58 | } |
| 59 | |
| 60 | bool is_true(const char *arg) { |
| 61 | if (strcasecmp(arg, "true") == 0 || strcasecmp(arg, "1") == 0 || |
| 62 | strcasecmp(arg, "yes") == 0 || strcasecmp(arg, "y") == 0) { |
| 63 | return true; |
| 64 | } else if (strcasecmp(arg, "false") == 0 || strcasecmp(arg, "0") == 0 || |
| 65 | strcasecmp(arg, "no") == 0 || strcasecmp(arg, "n") == 0) { |
| 66 | return false; |
| 67 | } else { |
| 68 | ERROR("Invalid value: %s, expect true/false", arg); |
| 69 | abort(); |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | static void _check_parsed_result(char *end, int col_idx) { |
| 74 | if (strlen(end) > 2) { |
no outgoing calls
no test coverage detected