| 548 | #define _isalnum(c) (_isalpha(c) || _isdigit(c)) |
| 549 | |
| 550 | inline 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 |
no outgoing calls
no test coverage detected