| 1843 | } |
| 1844 | |
| 1845 | static char x2c(const char *what) |
| 1846 | { |
| 1847 | char digit; |
| 1848 | |
| 1849 | #if !APR_CHARSET_EBCDIC |
| 1850 | digit = ((what[0] >= 'A') ? ((what[0] & 0xdf) - 'A') + 10 |
| 1851 | : (what[0] - '0')); |
| 1852 | digit *= 16; |
| 1853 | digit += (what[1] >= 'A' ? ((what[1] & 0xdf) - 'A') + 10 |
| 1854 | : (what[1] - '0')); |
| 1855 | #else /*APR_CHARSET_EBCDIC*/ |
| 1856 | char xstr[5]; |
| 1857 | xstr[0]='0'; |
| 1858 | xstr[1]='x'; |
| 1859 | xstr[2]=what[0]; |
| 1860 | xstr[3]=what[1]; |
| 1861 | xstr[4]='\0'; |
| 1862 | digit = apr_xlate_conv_byte(ap_hdrs_from_ascii, |
| 1863 | 0xFF & strtol(xstr, NULL, 16)); |
| 1864 | #endif /*APR_CHARSET_EBCDIC*/ |
| 1865 | return (digit); |
| 1866 | } |
| 1867 | |
| 1868 | /* |
| 1869 | * Unescapes a URL, leaving reserved characters intact. |
no outgoing calls
no test coverage detected