Rizin
unix-like reverse engineering framework and cli tools
unicode.h File Reference
#include <limits.h>
#include <stdint.h>
#include "unicode/utf8.h"
#include "unicode/utf16.h"

Go to the source code of this file.

Macros

#define U_EXPORT
 
#define U_EXPORT2
 

Typedefs

typedef uint32_t(* UnicodeDecodeFunction) (const uint8_t *string, uint32_t length, int32_t *code_point)
 

Functions

static uint32_t ts_decode_utf8 (const uint8_t *string, uint32_t length, int32_t *code_point)
 
static uint32_t ts_decode_utf16 (const uint8_t *string, uint32_t length, int32_t *code_point)
 

Variables

static const int32_t TS_DECODE_ERROR = U_SENTINEL
 

Macro Definition Documentation

◆ U_EXPORT

#define U_EXPORT

Definition at line 11 of file unicode.h.

◆ U_EXPORT2

#define U_EXPORT2

Definition at line 12 of file unicode.h.

Typedef Documentation

◆ UnicodeDecodeFunction

typedef uint32_t(* UnicodeDecodeFunction) (const uint8_t *string, uint32_t length, int32_t *code_point)

Definition at line 20 of file unicode.h.

Function Documentation

◆ ts_decode_utf16()

static uint32_t ts_decode_utf16 ( const uint8_t string,
uint32_t  length,
int32_t code_point 
)
inlinestatic

Definition at line 36 of file unicode.h.

40  {
41  uint32_t i = 0;
42  U16_NEXT(((uint16_t *)string), i, length, *code_point);
43  return i * 2;
44 }
lzma_index ** i
Definition: index.h:629
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
Definition: sflib.h:133
unsigned short uint16_t
Definition: sftypes.h:30
unsigned int uint32_t
Definition: sftypes.h:29
#define U16_NEXT(s, i, length, c)
Definition: utf16.h:308

References i, length, and U16_NEXT.

Referenced by ts_lexer__get_lookahead().

◆ ts_decode_utf8()

static uint32_t ts_decode_utf8 ( const uint8_t string,
uint32_t  length,
int32_t code_point 
)
inlinestatic

Definition at line 26 of file unicode.h.

30  {
31  uint32_t i = 0;
32  U8_NEXT(string, i, length, *code_point);
33  return i;
34 }
#define U8_NEXT(s, i, length, c)
Definition: utf8.h:351

References i, length, and U8_NEXT.

Referenced by stream_advance(), and ts_lexer__get_lookahead().

Variable Documentation

◆ TS_DECODE_ERROR

const int32_t TS_DECODE_ERROR = U_SENTINEL
static

Definition at line 16 of file unicode.h.

Referenced by ts_lexer__get_lookahead(), and ts_lexer_finish().