MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / hex2int

Function hex2int

ut.h:550–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548#define _isalnum(c) (_isalpha(c) || _isdigit(c))
549
550inline static int hex2int(char hex_digit)
551{
552 if (hex_digit>='0' && hex_digit<='9')
553 return hex_digit-'0';
554 if (hex_digit>='a' && hex_digit<='f')
555 return hex_digit-'a'+10;
556 if (hex_digit>='A' && hex_digit<='F')
557 return hex_digit-'A'+10;
558 /* no valid hex digit ... */
559 LM_ERR("'%c' is no hex char\n", hex_digit );
560 return -1;
561}
562
563/* Un-escape URI user -- it takes a pointer to original user
564 str, as well as the new, unescaped one, which MUST have

Callers 3

un_escapeFunction · 0.85
convert_utf16_to_ucs2Function · 0.85
decode_mail_urlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected