MCPcopy Create free account
hub / github.com/apache/httpd / hextoint

Function hextoint

modules/metadata/mod_mime_magic.c:1418–1427  ·  view source on GitHub ↗

Single hex char to int; -1 if not a hex char. */

Source from the content-addressed store, hash-verified

1416
1417/* Single hex char to int; -1 if not a hex char. */
1418static int hextoint(int c)
1419{
1420 if (apr_isdigit(c))
1421 return c - '0';
1422 if ((c >= 'a') && (c <= 'f'))
1423 return c + 10 - 'a';
1424 if ((c >= 'A') && (c <= 'F'))
1425 return c + 10 - 'A';
1426 return -1;
1427}
1428
1429
1430/*

Callers 1

getstrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected