13. Other Changes
========================================
+- EBCDIC targets are no longer supported, though it's unlikely that they were
+ still working in the first place.
+
========================================
14. Performance Improvements
========================================
#include "url.h"
#include "file.h"
-#ifdef _OSD_POSIX
-# ifndef CHARSET_EBCDIC
-# define CHARSET_EBCDIC /* this machine uses EBCDIC, not ASCII! */
-# endif
-# include "ebcdic.h"
-#endif /*_OSD_POSIX*/
/* {{{ free_url
*/
if (c == ' ') {
*to++ = '+';
-#ifndef CHARSET_EBCDIC
} else if ((c < '0' && c != '-' && c != '.') ||
(c < 'A' && c > '9') ||
(c > 'Z' && c < 'a' && c != '_') ||
to[1] = hexchars[c >> 4];
to[2] = hexchars[c & 15];
to += 3;
-#else /*CHARSET_EBCDIC*/
- } else if (!isalnum(c) && strchr("_-.", c) == NULL) {
- /* Allow only alphanumeric chars and '_', '-', '.'; escape the rest */
- to[0] = '%';
- to[1] = hexchars[os_toascii[c] >> 4];
- to[2] = hexchars[os_toascii[c] & 15];
- to += 3;
-#endif /*CHARSET_EBCDIC*/
} else {
*to++ = c;
}
}
else if (*data == '%' && len >= 2 && isxdigit((int) *(data + 1))
&& isxdigit((int) *(data + 2))) {
-#ifndef CHARSET_EBCDIC
*dest = (char) php_htoi(data + 1);
-#else
- *dest = os_toebcdic[(unsigned char) php_htoi(data + 1)];
-#endif
data += 2;
len -= 2;
} else {
char c = s[x];
ret[y] = c;
-#ifndef CHARSET_EBCDIC
if ((c < '0' && c != '-' && c != '.') ||
(c < 'A' && c > '9') ||
(c > 'Z' && c < 'a' && c != '_') ||
ret[y++] = '%';
ret[y++] = hexchars[(unsigned char) c >> 4];
ret[y] = hexchars[(unsigned char) c & 15];
-#else /*CHARSET_EBCDIC*/
- if (!isalnum(c) && strchr("_-.~", c) != NULL) {
- ret[y++] = '%';
- ret[y++] = hexchars[os_toascii[(unsigned char) c] >> 4];
- ret[y] = hexchars[os_toascii[(unsigned char) c] & 15];
-#endif /*CHARSET_EBCDIC*/
}
}
ret[y] = '\0';
while (len--) {
if (*data == '%' && len >= 2 && isxdigit((int) *(data + 1))
&& isxdigit((int) *(data + 2))) {
-#ifndef CHARSET_EBCDIC
*dest = (char) php_htoi(data + 1);
-#else
- *dest = os_toebcdic[(unsigned char) php_htoi(data + 1)];
-#endif
data += 2;
len -= 2;
} else {