|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "common/unicode_norm.h"#include "common/unicode_norm_hashfunc.h"#include "common/unicode_normprops_table.h"#include "port/pg_bswap.h"
Go to the source code of this file.
Macros | |
| #define | ALLOC(size) palloc(size) |
| #define | FREE(size) pfree(size) |
| #define | SBASE 0xAC00 /* U+AC00 */ |
| #define | LBASE 0x1100 /* U+1100 */ |
| #define | VBASE 0x1161 /* U+1161 */ |
| #define | TBASE 0x11A7 /* U+11A7 */ |
| #define | LCOUNT 19 |
| #define | VCOUNT 21 |
| #define | TCOUNT 28 |
| #define | NCOUNT VCOUNT * TCOUNT |
| #define | SCOUNT LCOUNT * NCOUNT |
Definition at line 31 of file unicode_norm.c.
Definition at line 32 of file unicode_norm.c.
Definition at line 40 of file unicode_norm.c.
| #define LCOUNT 19 |
Definition at line 43 of file unicode_norm.c.
Definition at line 46 of file unicode_norm.c.
Definition at line 39 of file unicode_norm.c.
Definition at line 47 of file unicode_norm.c.
Definition at line 42 of file unicode_norm.c.
| #define TCOUNT 28 |
Definition at line 45 of file unicode_norm.c.
Definition at line 41 of file unicode_norm.c.
| #define VCOUNT 21 |
Definition at line 44 of file unicode_norm.c.
Definition at line 321 of file unicode_norm.c.
References compat, decompose_code(), DECOMPOSITION_IS_COMPAT, DECOMPOSITION_SIZE, fb(), get_code_decomposition(), get_code_entry(), i, LBASE, result, SBASE, SCOUNT, TBASE, TCOUNT, VBASE, and VCOUNT.
Referenced by decompose_code(), and unicode_normalize().
Definition at line 112 of file unicode_norm.c.
References pg_unicode_decomposition::comb_class, and get_code_entry().
Referenced by unicode_is_normalized_quickcheck(), and unicode_normalize().
|
static |
Definition at line 134 of file unicode_norm.c.
References Assert, pg_unicode_decomposition::dec_index, DECOMPOSITION_IS_INLINE, DECOMPOSITION_SIZE, fb(), UnicodeDecomp_codepoints, and x.
Referenced by decompose_code(), and get_decomposed_size().
|
static |
Definition at line 72 of file unicode_norm.c.
References fb(), lengthof, pg_hton32, UnicodeDecompInfo, and UnicodeDecompMain.
Referenced by decompose_code(), get_canonical_class(), and get_decomposed_size().
Definition at line 159 of file unicode_norm.c.
References compat, DECOMPOSITION_IS_COMPAT, DECOMPOSITION_SIZE, fb(), get_code_decomposition(), get_code_entry(), get_decomposed_size(), i, SBASE, SCOUNT, and TCOUNT.
Referenced by get_decomposed_size(), and unicode_normalize().
|
static |
Definition at line 543 of file unicode_norm.c.
References fb(), and pg_hton32.
Referenced by qc_is_allowed().
|
static |
Definition at line 574 of file unicode_norm.c.
References Assert, fb(), qc_hash_lookup(), pg_unicode_normprops::quickcheck, UNICODE_NFC, UNICODE_NFKC, UNICODE_NORM_QC_YES, UnicodeNormInfo_NFC_QC, and UnicodeNormInfo_NFKC_QC.
Referenced by unicode_is_normalized_quickcheck().
Definition at line 218 of file unicode_norm.c.
References pg_unicode_decomposition::codepoint, pg_unicode_decomposition::dec_index, DECOMPOSITION_NO_COMPOSE, DECOMPOSITION_SIZE, fb(), i, LBASE, LCOUNT, lengthof, pg_hton64, result, SBASE, SCOUNT, start, TBASE, TCOUNT, UnicodeDecomp_codepoints, UnicodeDecompMain, UnicodeRecompInfo, VBASE, and VCOUNT.
Referenced by unicode_normalize().
| UnicodeNormalizationQC unicode_is_normalized_quickcheck | ( | UnicodeNormalizationForm | form, |
| const char32_t * | input | ||
| ) |
Definition at line 598 of file unicode_norm.c.
References fb(), get_canonical_class(), input, qc_is_allowed(), result, UNICODE_NFD, UNICODE_NFKD, UNICODE_NORM_QC_MAYBE, UNICODE_NORM_QC_NO, and UNICODE_NORM_QC_YES.
Referenced by unicode_is_normalized().
| char32_t * unicode_normalize | ( | UnicodeNormalizationForm | form, |
| const char32_t * | input | ||
| ) |
Definition at line 402 of file unicode_norm.c.
References ALLOC, Assert, compat, current_size, decompose_code(), fb(), FREE, get_canonical_class(), get_decomposed_size(), input, next, recompose_code(), UNICODE_NFC, UNICODE_NFKC, and UNICODE_NFKD.
Referenced by main(), pg_saslprep(), unicode_is_normalized(), and unicode_normalize_func().