| 823 | } |
| 824 | |
| 825 | static bool cv2_hex64(cv2_context_t *ctx, cv2_span_t span, uint64_t *out) { |
| 826 | if (span.length != 16) |
| 827 | return cv2_fail(ctx, CBM_COVERAGE_PARSE_FORMAT); |
| 828 | uint64_t value = 0; |
| 829 | for (size_t i = 0; i < span.length; i++) { |
| 830 | if (!cv2_step(ctx)) |
| 831 | return false; |
| 832 | int digit = cv2_hex_digit(span.data[i]); |
| 833 | if (digit < 0) |
| 834 | return cv2_fail(ctx, CBM_COVERAGE_PARSE_FORMAT); |
| 835 | value = (value << 4) | (unsigned)digit; |
| 836 | } |
| 837 | *out = value; |
| 838 | return true; |
| 839 | } |
| 840 | |
| 841 | static bool cv2_image(cv2_context_t *ctx, cv2_span_t span) { |
| 842 | if (span.length != 64) |
no test coverage detected