A latched failure leaves every accounting field and earlier program intact; * neither an ordinary parse nor a match may turn it into successful no-opinion. */
| 183 | /* A latched failure leaves every accounting field and earlier program intact; |
| 184 | * neither an ordinary parse nor a match may turn it into successful no-opinion. */ |
| 185 | static bool gic_terminal(cbm_ignore_checked_t *owner, const cbm_ignore_program_t *old_program, |
| 186 | cbm_ignore_checked_status_t expected) { |
| 187 | cbm_ignore_checked_usage_t before, after; |
| 188 | if (!cbm_ignore_checked_usage(owner, &before) || before.terminal_status != expected) |
| 189 | return false; |
| 190 | cbm_ignore_checked_control_t control = gic_control(); |
| 191 | cbm_ignore_checked_parse_result_t out = {.program = old_program, .pattern_count = 77}; |
| 192 | cbm_ignore_checked_error_t error; |
| 193 | if (!gic_status(cbm_ignore_checked_parse(owner, "x", 1, &control, &out, &error), expected, |
| 194 | &error) || |
| 195 | out.program || out.pattern_count) |
| 196 | return false; |
| 197 | if (old_program) { |
| 198 | cbm_ignore_decision_t decision = CBM_IGNORE_IGNORED; |
| 199 | if (!gic_status(cbm_ignore_checked_match(owner, old_program, "x", 1, false, &control, |
| 200 | &decision, &error), |
| 201 | expected, &error) || |
| 202 | decision != CBM_IGNORE_UNAVAILABLE) |
| 203 | return false; |
| 204 | } |
| 205 | return cbm_ignore_checked_usage(owner, &after) && gic_usage_equal(&before, &after); |
| 206 | } |
| 207 | |
| 208 | static bool gic_bad_span(cbm_ignore_checked_t *owner, const cbm_ignore_program_t *old_program, |
| 209 | unsigned kind) { |
no test coverage detected