#define SHORT_STRING 128
#define NONULL(x) (x?x:"")
-# define ISSPACE(c) isspace((unsigned char)c)
+#define ISSPACE(c) isspace((unsigned char)c)
+
+extern unsigned char const __m_strdigits[128];
+extern signed char const __m_b64digits[128];
+extern char const __m_b64chars[64];
+
+/****************************************************************************/
+/* char related */
+/****************************************************************************/
+
+static inline int hexval(int c) {
+ int v = __m_strdigits[c];
+ return !(c & ~127) && v < 16 ? v : -1;
+}
+
+static inline int base64val(int c) {
+ return (c & ~127) ? -1 : __m_b64digits[c];
+}
/****************************************************************************/
/* length related */