Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions | Variables
cube_unicode.cpp File Reference
#include "inexor/shared/cube_unicode.hpp"
#include "inexor/shared/cube_types.hpp"
#include <algorithm>

Macros

#define CUBECTYPE(s, p, d, a, A, u, U)
 

Functions

size_t decodeutf8 (uchar *dstbuf, size_t dstlen, const uchar *srcbuf, size_t srclen, size_t *carry)
 Legacy file for UTF8 support. More...
 
size_t encodeutf8 (uchar *dstbuf, size_t dstlen, const uchar *srcbuf, size_t srclen, size_t *carry)
 

Variables

const uchar cubectype [256]
 
const int cube2unichars [256]
 
const int uni2cubeoffsets [8]
 
const uchar uni2cubechars [878]
 
const uchar cubelowerchars [256]
 
const uchar cubeupperchars [256]
 

Macro Definition Documentation

#define CUBECTYPE (   s,
  p,
  d,
  a,
  A,
  u,
 
)
Value:
0, U, U, U, U, U, U, U, U, s, s, s, s, s, U, U, \
U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, \
s, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p, \
d, d, d, d, d, d, d, d, d, d, p, p, p, p, p, p, \
p, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, \
A, A, A, A, A, A, A, A, A, A, A, p, p, p, p, p, \
p, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, \
a, a, a, a, a, a, a, a, a, a, a, p, p, p, p, U, \
U, u, u, u, u, u, u, u, u, u, u, u, u, u, u, u, \
u, u, u, u, u, u, u, u, u, u, u, u, u, u, u, U, \
u, U, u, U, u, U, u, U, u, U, u, U, u, U, u, U, \
u, U, u, U, u, U, u, U, u, U, u, U, u, U, u, U, \
u, U, u, U, u, U, u, U, U, u, U, u, U, u, U, U, \
U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, \
U, U, U, U, u, u, u, u, u, u, u, u, u, u, u, u, \
u, u, u, u, u, u, u, u, u, u, u, u, u, u, U, u
int d
Definition: octaedit.cpp:1749

Function Documentation

size_t decodeutf8 ( uchar dst,
size_t  dstlen,
const uchar src,
size_t  srclen,
size_t *  carry = nullptr 
)

Legacy file for UTF8 support.

Use codecvt_utf8 for a std way (maybe provide a wrapper). UTF-8 encoder/decoder function prototypes

References gle::end(), inexor::rpc::min(), and uni2cube().

Referenced by inexor::io::InputRouter::checkinput(), loadfile(), pasteconsole(), and utf8stream::readbuf().

size_t encodeutf8 ( uchar dstbuf,
size_t  dstlen,
const uchar srcbuf,
size_t  srclen,
size_t *  carry 
)

References cube2uni(), gle::end(), and inexor::rpc::min().

Referenced by utf8stream::write().

Variable Documentation

const int cube2unichars[256]
Initial value:
=
{
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
}

Referenced by cube2uni().

const uchar cubectype[256]
Initial value:
=
{
}
Definition: cube_unicode.hpp:17
Definition: cube_unicode.hpp:22
#define CUBECTYPE(s, p, d, a, A, u, U)
Definition: cube_unicode.cpp:7
Definition: cube_unicode.hpp:23
Definition: cube_unicode.hpp:20
Definition: cube_unicode.hpp:21
Definition: cube_unicode.hpp:19
Definition: cube_unicode.hpp:18
const uchar cubelowerchars[256]
Initial value:
=
{
0, 130, 131, 132, 133, 134, 135, 136, 137, 9, 10, 11, 12, 13, 138, 139,
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
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, 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, 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, 156,
157, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 160,
160, 162, 162, 164, 164, 166, 166, 168, 168, 170, 170, 172, 172, 105, 174, 176,
176, 178, 178, 180, 180, 182, 182, 184, 184, 186, 186, 188, 188, 190, 190, 192,
192, 194, 194, 196, 196, 198, 198, 158, 201, 201, 203, 203, 205, 205, 206, 207,
208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
}

Referenced by cubelower().

const uchar cubeupperchars[256]
Initial value:
=
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
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, 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, 123, 124, 125, 126, 127,
128, 129, 1, 2, 3, 4, 5, 6, 7, 8, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 127, 128, 199, 159,
159, 161, 161, 163, 163, 165, 165, 167, 167, 169, 169, 171, 171, 173, 73, 175,
175, 177, 177, 179, 179, 181, 181, 183, 183, 185, 185, 187, 187, 189, 189, 191,
191, 193, 193, 195, 195, 197, 197, 199, 200, 200, 202, 202, 204, 204, 206, 207,
208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
}

Referenced by cubeupper().

const uchar uni2cubechars[878]

Referenced by uni2cube().

const int uni2cubeoffsets[8]
Initial value:
=
{
0, 256, 658, 658, 512, 658, 658, 658
}

Referenced by uni2cube().