MySQL  8.0.18
Source Code Documentation
uca-dump.cc File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Classes

struct  MY_UCA_ITEM
 
struct  MY_UCA_CONTRACTION
 
struct  MY_UCA
 

Macros

#define MY_UCA_MAXWEIGHT_TO_PARSE   64
 
#define MY_UCA_MAXWEIGHT_TO_DUMP   8
 
#define MY_UCA_MAXLEVEL   4
 
#define MY_UCA_VERSION_SIZE   32
 
#define MY_UCA_MAX_CONTRACTION   6
 
#define MY_UCA_NCONTRACTIONS   1024
 
#define MY_UCA_MAXCHAR   (0x10FFFF + 1)
 
#define MY_UCA_NCHARS   256
 
#define MY_UCA_CMASK   255
 
#define MY_UCA_PSHIFT   8
 
#define MY_UCA_NPAGES   MY_UCA_MAXCHAR / MY_UCA_NCHARS
 

Typedefs

typedef unsigned char uchar
 
typedef unsigned short uint16
 
typedef unsigned int uint
 

Functions

static int load_uca_file (MY_UCA *uca, size_t maxchar, int *pageloaded)
 
static void set_implicit_weights (MY_UCA *uca, size_t maxchar)
 
static void get_page_statistics (MY_UCA *uca, size_t page, size_t level, size_t *maxnum, size_t *ndefs)
 
static char * prefix_name (MY_UCA *uca)
 
static char * page_name (MY_UCA *uca, size_t page, size_t level)
 
static size_t normalize_weight (MY_UCA_ITEM *item, size_t level, uint16 *weight, size_t weight_elements)
 
static void print_one_page (MY_UCA *uca, size_t level, size_t page, size_t maxnum)
 
static int weight_cmp (uint16 *w1, uint16 *w2, size_t len)
 
static void print_contraction (MY_UCA *uca, MY_UCA_CONTRACTION *c, size_t level)
 
static void print_contractions (MY_UCA *uca, size_t level)
 
static void usage (FILE *file, int rc)
 
static int get_int_option (const char *str, const char *name, int *num)
 
static void process_options (int ac, char **av, MY_UCA *uca)
 
int main (int ac, char **av)
 

Variables

static const char * pname [] = {"", "_s", "_t", "_q"}
 
static const char * lname [] = {"primary", "secondary", "tertiary", "quaternary"}
 
static int contractions = 0
 
static int nlevels = 1
 

Macro Definition Documentation

◆ MY_UCA_CMASK

#define MY_UCA_CMASK   255

◆ MY_UCA_MAX_CONTRACTION

#define MY_UCA_MAX_CONTRACTION   6

◆ MY_UCA_MAXCHAR

#define MY_UCA_MAXCHAR   (0x10FFFF + 1)

◆ MY_UCA_MAXLEVEL

#define MY_UCA_MAXLEVEL   4

◆ MY_UCA_MAXWEIGHT_TO_DUMP

#define MY_UCA_MAXWEIGHT_TO_DUMP   8

◆ MY_UCA_MAXWEIGHT_TO_PARSE

#define MY_UCA_MAXWEIGHT_TO_PARSE   64

◆ MY_UCA_NCHARS

#define MY_UCA_NCHARS   256

◆ MY_UCA_NCONTRACTIONS

#define MY_UCA_NCONTRACTIONS   1024

◆ MY_UCA_NPAGES

#define MY_UCA_NPAGES   MY_UCA_MAXCHAR / MY_UCA_NCHARS

◆ MY_UCA_PSHIFT

#define MY_UCA_PSHIFT   8

◆ MY_UCA_VERSION_SIZE

#define MY_UCA_VERSION_SIZE   32

Typedef Documentation

◆ uchar

typedef unsigned char uchar

◆ uint

typedef unsigned int uint

◆ uint16

typedef unsigned short uint16

Function Documentation

◆ get_int_option()

static int get_int_option ( const char *  str,
const char *  name,
int *  num 
)
static

◆ get_page_statistics()

static void get_page_statistics ( MY_UCA uca,
size_t  page,
size_t  level,
size_t *  maxnum,
size_t *  ndefs 
)
static

◆ load_uca_file()

static int load_uca_file ( MY_UCA uca,
size_t  maxchar,
int *  pageloaded 
)
static

◆ main()

int main ( int  ac,
char **  av 
)

◆ normalize_weight()

static size_t normalize_weight ( MY_UCA_ITEM item,
size_t  level,
uint16 weight,
size_t  weight_elements 
)
static

◆ page_name()

static char* page_name ( MY_UCA uca,
size_t  page,
size_t  level 
)
static

◆ prefix_name()

static char* prefix_name ( MY_UCA uca)
static

◆ print_contraction()

static void print_contraction ( MY_UCA uca,
MY_UCA_CONTRACTION c,
size_t  level 
)
static

◆ print_contractions()

static void print_contractions ( MY_UCA uca,
size_t  level 
)
static

◆ print_one_page()

static void print_one_page ( MY_UCA uca,
size_t  level,
size_t  page,
size_t  maxnum 
)
static

◆ process_options()

static void process_options ( int  ac,
char **  av,
MY_UCA uca 
)
static

◆ set_implicit_weights()

static void set_implicit_weights ( MY_UCA uca,
size_t  maxchar 
)
static

◆ usage()

static void usage ( FILE *  file,
int  rc 
)
static

◆ weight_cmp()

static int weight_cmp ( uint16 w1,
uint16 w2,
size_t  len 
)
static

Variable Documentation

◆ contractions

int contractions = 0
static

◆ lname

const char* lname[] = {"primary", "secondary", "tertiary", "quaternary"}
static

◆ nlevels

int nlevels = 1
static

◆ pname

const char* pname[] = {"", "_s", "_t", "_q"}
static