safec 3.15
Safe C Library - ISO TR24731 Bounds Checking Interface
Loading...
Searching...
No Matches
u8_private.h File Reference
#include <stdint.h>
#include <stdbool.h>
Include dependency graph for u8_private.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  _utf_t

Macros

#define U8_UNUSED
#define UTF_N   (sizeof(utf) / sizeof(utf[0]))

Functions

static int utf8_len (const char8_t ch) U8_UNUSED
static uint32_t dec_utf8 (char8_t **strp) U8_UNUSED
static int enc_utf8 (char8_t *dest, const uint32_t cp) U8_UNUSED
static int u8_seqlen (const char8_t *s, size_t n) U8_UNUSED
static bool u8_is_valid (const char8_t *s, rsize_t smax) U8_UNUSED
int _u8_towfc (uint32_t *dest, const uint32_t src)

Variables

static const _utf_t utf []

Macro Definition Documentation

◆ U8_UNUSED

#define U8_UNUSED

◆ UTF_N

#define UTF_N   (sizeof(utf) / sizeof(utf[0]))

Function Documentation

◆ utf8_len()

int utf8_len ( const char8_t ch)
static

◆ dec_utf8()

uint32_t dec_utf8 ( char8_t ** strp)
static

◆ enc_utf8()

int enc_utf8 ( char8_t * dest,
const uint32_t cp )
static

◆ u8_seqlen()

int u8_seqlen ( const char8_t * s,
size_t n )
static

◆ u8_is_valid()

bool u8_is_valid ( const char8_t * s,
rsize_t smax )
static

◆ _u8_towfc()

int _u8_towfc ( uint32_t * dest,
const uint32_t src )

Variable Documentation

◆ utf

const _utf_t utf[]
static
Initial value:
= {
{0x3f , 0x80 , 0, 0, 6},
{0x7f , 0x00 , 0000, 0177, 7},
{0x1f , 0xc0 , 0200, 03777, 5},
{0x0f , 0xe0 , 04000, 0177777, 4},
{0x07 , 0xf0 , 0200000, 04177777, 3},
}