From b36dc16c428cc2b1371bb99c0581aa014f302791 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Thu, 2 Nov 2006 01:16:41 +0100 Subject: [PATCH 1/1] add more encoding arrays Signed-off-by: Pierre Habouzit --- lib-lib/str.c | 14 ++++++++++++++ lib-lib/str.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/lib-lib/str.c b/lib-lib/str.c index 7225483..3b9b5b5 100644 --- a/lib-lib/str.c +++ b/lib-lib/str.c @@ -54,6 +54,20 @@ char const __m_b64chars[64] = { '8', '9', '+', '/' }; +char const __m_b36chars_lower[36] = { + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', + 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', + 'u', 'v', 'w', 'x', 'y', 'z' +}; + +char const __m_b36chars_upper[36] = { + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', + 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', + 'U', 'V', 'W', 'X', 'Y', 'Z' +}; + ssize_t m_strcpy(char *dst, ssize_t n, const char *src) { diff --git a/lib-lib/str.h b/lib-lib/str.h index e1b3511..29b8817 100644 --- a/lib-lib/str.h +++ b/lib-lib/str.h @@ -39,6 +39,9 @@ extern unsigned char const __m_strdigits[128]; extern signed char const __m_b64digits[128]; extern char const __m_b64chars[64]; +extern char const __m_b36chars_lower[36]; +extern char const __m_b36chars_upper[36]; + /****************************************************************************/ /* char related */ /****************************************************************************/ -- 2.20.1