| 711 | static const char c2x_table[] = "0123456789abcdef"; |
| 712 | |
| 713 | static APR_INLINE unsigned char *c2x(unsigned what, unsigned char prefix, |
| 714 | unsigned char *where) |
| 715 | { |
| 716 | #if APR_CHARSET_EBCDIC |
| 717 | what = apr_xlate_conv_byte(ap_hdrs_to_ascii, (unsigned char)what); |
| 718 | #endif /*APR_CHARSET_EBCDIC*/ |
| 719 | *where++ = prefix; |
| 720 | *where++ = c2x_table[what >> 4]; |
| 721 | *where++ = c2x_table[what & 0xf]; |
| 722 | return where; |
| 723 | } |
| 724 | |
| 725 | /* |
| 726 | * Escapes a backreference in a similar way as php's urlencode does. |