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

Go to the source code of this file.

Enumerations

enum  {
  CT_PRINT = 1<<0, CT_SPACE = 1<<1, CT_DIGIT = 1<<2, CT_ALPHA = 1<<3,
  CT_LOWER = 1<<4, CT_UPPER = 1<<5, CT_UNICODE = 1<<6
}
 

Functions

size_t decodeutf8 (uchar *dst, size_t dstlen, const uchar *src, size_t srclen, size_t *carry=nullptr)
 Legacy file for UTF8 support. More...
 
size_t encodeutf8 (uchar *dstbuf, size_t dstlen, const uchar *srcbuf, size_t srclen, size_t *carry=nullptr)
 
static int iscubeprint (uchar c)
 
static int iscubespace (uchar c)
 
static int iscubealpha (uchar c)
 
static int iscubealnum (uchar c)
 
static int iscubelower (uchar c)
 
static int iscubeupper (uchar c)
 
static int cube2uni (uchar c)
 
static uchar uni2cube (int c)
 
static uchar cubelower (uchar c)
 
static uchar cubeupper (uchar c)
 

Variables

const uchar cubectype [256]
 

Enumeration Type Documentation

anonymous enum
Enumerator
CT_PRINT 
CT_SPACE 
CT_DIGIT 
CT_ALPHA 
CT_LOWER 
CT_UPPER 
CT_UNICODE 

Function Documentation

static int cube2uni ( uchar  c)
inlinestatic

References cube2unichars.

Referenced by encodeutf8().

static uchar cubelower ( uchar  c)
inlinestatic

References cubelowerchars.

static uchar cubeupper ( uchar  c)
inlinestatic

References cubeupperchars.

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().

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

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

Referenced by utf8stream::write().

static int iscubealnum ( uchar  c)
inlinestatic

References CT_ALPHA, CT_DIGIT, and cubectype.

Referenced by compileblocksub().

static int iscubealpha ( uchar  c)
inlinestatic

References CT_ALPHA, and cubectype.

Referenced by genfogshader().

static int iscubelower ( uchar  c)
inlinestatic

References CT_LOWER, and cubectype.

static int iscubeprint ( uchar  c)
inlinestatic

References CT_PRINT, and cubectype.

Referenced by filtertext().

static int iscubespace ( uchar  c)
inlinestatic
static int iscubeupper ( uchar  c)
inlinestatic

References CT_UPPER, and cubectype.

static uchar uni2cube ( int  c)
inlinestatic

References uni2cubechars, and uni2cubeoffsets.

Referenced by decodeutf8().

Variable Documentation

const uchar cubectype[256]