Skip to content

Commit

Permalink
remove cube2uni conversion table for #199
Browse files Browse the repository at this point in the history
  • Loading branch information
no-lex committed Oct 22, 2022
1 parent 440e55e commit 9be92d9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
19 changes: 0 additions & 19 deletions src/shared/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,6 @@ extern const uchar cubectype[256] =
CubeType_Print | CubeType_Unicode | CubeType_Alpha | CubeType_Lower,
CubeType_Print | CubeType_Unicode | CubeType_Alpha | CubeType_Upper)
};
extern const int cube2unichars[256] =
{
0, 192, 193, 194, 195, 196, 197, 198, 199, 9, 10, 11, 12, 13, 200, 201,
202, 203, 204, 205, 206, 207, 209, 210, 211, 212, 213, 214, 216, 217, 218, 219,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 220,
221, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
238, 239, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, 255, 0x104,
0x105, 0x106, 0x107, 0x10C, 0x10D, 0x10E, 0x10F, 0x118, 0x119, 0x11A, 0x11B, 0x11E, 0x11F, 0x130, 0x131, 0x141,
0x142, 0x143, 0x144, 0x147, 0x148, 0x150, 0x151, 0x152, 0x153, 0x158, 0x159, 0x15A, 0x15B, 0x15E, 0x15F, 0x160,
0x161, 0x164, 0x165, 0x16E, 0x16F, 0x170, 0x171, 0x178, 0x179, 0x17A, 0x17B, 0x17C, 0x17D, 0x17E, 0x404, 0x411,
0x413, 0x414, 0x416, 0x417, 0x418, 0x419, 0x41B, 0x41F, 0x423, 0x424, 0x426, 0x427, 0x428, 0x429, 0x42A, 0x42B,
0x42C, 0x42D, 0x42E, 0x42F, 0x431, 0x432, 0x433, 0x434, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B, 0x43C, 0x43D,
0x43F, 0x442, 0x444, 0x446, 0x447, 0x448, 0x449, 0x44A, 0x44B, 0x44C, 0x44D, 0x44E, 0x44F, 0x454, 0x490, 0x491
};

size_t encodeutf8(uchar *dstbuf, size_t dstlen, const uchar *srcbuf, size_t srclen, size_t *carry)
{
Expand Down
3 changes: 1 addition & 2 deletions src/shared/stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ inline int iscubealnum(uchar c) { return cubectype[c]&(CubeType_Alpha | CubeType
inline int iscubepunct(uchar c) { return cubectype[c] == CubeType_Print; }
inline int cube2uni(uchar c)
{
extern const int cube2unichars[256];
return cube2unichars[c];
return c;
}

inline uchar cubelower(uchar c)
Expand Down

0 comments on commit 9be92d9

Please sign in to comment.