| 3 | #include <string.h> |
| 4 | |
| 5 | void gi_error(cbm_ignore_checked_error_t *error, cbm_ignore_checked_status_t status, |
| 6 | cbm_ignore_cap_t cap, size_t offset) { |
| 7 | if (!error) { |
| 8 | return; |
| 9 | } |
| 10 | memset(error, 0, sizeof(*error)); |
| 11 | error->status = status; |
| 12 | error->cap = cap; |
| 13 | error->byte_offset = offset; |
| 14 | if (status != CBM_IGNORE_CHECKED_OK) { |
| 15 | static const char message[] = "checked ignore operation failed"; |
| 16 | memcpy(error->diagnostic, message, sizeof(message)); |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | bool gi_active(const gi_guard_t *guard) { |
| 21 | return !guard || guard->owner->usage.terminal_status == CBM_IGNORE_CHECKED_OK; |
no outgoing calls
no test coverage detected