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

Function hex_val

internal/cbm/pdf/pdf_obj.c:295–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295static int hex_val(unsigned char c) {
296 if (c >= '0' && c <= '9') {
297 return c - '0';
298 }
299 if (c >= 'a' && c <= 'f') {
300 return c - 'a' + 10;
301 }
302 if (c >= 'A' && c <= 'F') {
303 return c - 'A' + 10;
304 }
305 return -1;
306}
307
308/* A digit run as a saturated integer. */
309static int64_t sat_digits(const unsigned char *s, size_t n) {

Callers 3

lex_nameFunction · 0.70
lex_hstrFunction · 0.70
f_ahxFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected