| 676 | } |
| 677 | |
| 678 | static bool gf_oid(char out[65], const unsigned char *text, size_t length, unsigned width) { |
| 679 | if ((width != 40 && width != 64) || length != width) |
| 680 | return false; |
| 681 | for (unsigned i = 0; i < width; i++) { |
| 682 | unsigned char c = text[i]; |
| 683 | if (c >= 'A' && c <= 'F') |
| 684 | c = (unsigned char)(c + ('a' - 'A')); |
| 685 | if (!((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f'))) |
| 686 | return false; |
| 687 | out[i] = (char)c; |
| 688 | } |
| 689 | out[width] = '\0'; |
| 690 | return true; |
| 691 | } |
| 692 | |
| 693 | static bool gf_oid_line(cbm_git_facts_t *facts, const cbm_git_bytes_t *bytes, char out[65], |
| 694 | cbm_git_facts_error_t *error) { |
no outgoing calls
no test coverage detected