safec  3.3
Safe C Library - ISO TR24731 Bounds Checking Interface
towfc_s.c File Reference
#include "safe_str_lib.h"
+ Include dependency graph for towfc_s.c:

Functions

int iswfc (const uint32_t wc)
 
int _towfc_single (wchar_t *restrict dest, const uint32_t src)
 
EXPORT int _towfc_s_chk (wchar_t *restrict dest, rsize_t dmax, const uint32_t src, const size_t destbos)
 

Variables

struct {
   unsigned short   upper
 
   unsigned short   lower1
 
   unsigned short   lower2
 
tbl2 []
 iswfc() checks the uppercase character for a mapping to foldcase, returning the number of new wide character codepoints needed. More...
 
struct {
   unsigned short   upper
 
   unsigned short   lower1
 
   unsigned short   lower2
 
   unsigned short   lower3
 
tbl3 []
 

Function Documentation

◆ iswfc()

int iswfc ( const uint32_t  wc)

◆ _towfc_single()

int _towfc_single ( wchar_t *restrict  dest,
const uint32_t  src 
)

◆ _towfc_s_chk()

EXPORT int _towfc_s_chk ( wchar_t *restrict  dest,
rsize_t  dmax,
const uint32_t  src,
const size_t  destbos 
)

Variable Documentation

◆ upper

unsigned short upper

◆ lower1

unsigned short lower1

◆ lower2

unsigned short lower2

◆ tbl2

const { ... } tbl2[]

iswfc() checks the uppercase character for a mapping to foldcase, returning the number of new wide character codepoints needed.

The usual iswupper(wc) case returns 1, and the special 104 full folding cases as specified in Unicode 10.0 CaseFolding.txt return either 2 or 3.

Parameters
[in]wcunicode character codepoint
Return values
0when there is no corresponding lowercase mapping.
1when there is a corresponding common or simple foldcase mapping.
2a full case-folding expands to 2 characters
3a full case-folding expands to 3 characters
See also
towfc_s(), wcsfc_s(), towupper()

◆ lower3

unsigned short lower3

◆ tbl3

const { ... } tbl3[]
Initial value:
= {
{ 0x0390, 0x03B9,0x0308,0x0301 },
{ 0x03B0, 0x03C5,0x0308,0x0301 },
{ 0x1F52, 0x03C5,0x0313,0x0300 },
{ 0x1F54, 0x03C5,0x0313,0x0301 },
{ 0x1F56, 0x03C5,0x0313,0x0342 },
{ 0x1FB7, 0x03B1,0x0342,0x03B9 },
{ 0x1FC7, 0x03B7,0x0342,0x03B9 },
{ 0x1FD2, 0x03B9,0x0308,0x0300 },
{ 0x1FD3, 0x03B9,0x0308,0x0301 },
{ 0x1FD7, 0x03B9,0x0308,0x0342 },
{ 0x1FE2, 0x03C5,0x0308,0x0300 },
{ 0x1FE3, 0x03C5,0x0308,0x0301 },
{ 0x1FE7, 0x03C5,0x0308,0x0342 },
{ 0x1FF7, 0x03C9,0x0342,0x03B9 },
{ 0xFB03, 0x0066,0x0066,0x0069 },
{ 0xFB04, 0x0066,0x0066,0x006C },
{ 0, 0,0,0 }
}