MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cli_checksum_hex_nibble

Function cli_checksum_hex_nibble

src/cli/cli.c:7929–7940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7927}
7928
7929static int cli_checksum_hex_nibble(unsigned char value) {
7930 if (value >= (unsigned char)'0' && value <= (unsigned char)'9') {
7931 return (int)(value - (unsigned char)'0');
7932 }
7933 if (value >= (unsigned char)'a' && value <= (unsigned char)'f') {
7934 return (int)(value - (unsigned char)'a') + 10;
7935 }
7936 if (value >= (unsigned char)'A' && value <= (unsigned char)'F') {
7937 return (int)(value - (unsigned char)'A') + 10;
7938 }
7939 return CLI_ERR;
7940}
7941
7942static bool cli_checksum_line_references_archive(const unsigned char *line, size_t line_length,
7943 const char *archive_name,

Callers 1

cli_checksum_line_digestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected