PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "common/unicode_category.h"
#include "common/unicode_category_table.h"
Go to the source code of this file.
#define PG_U_C_MASK |
Definition at line 73 of file unicode_category.c.
#define PG_U_CATEGORY_MASK | ( | X | ) | ((uint32)(1 << (X))) |
Definition at line 32 of file unicode_category.c.
#define PG_U_CC_MASK PG_U_CATEGORY_MASK(PG_U_CONTROL) |
Definition at line 68 of file unicode_category.c.
#define PG_U_CF_MASK PG_U_CATEGORY_MASK(PG_U_FORMAT) |
Definition at line 69 of file unicode_category.c.
#define PG_U_CHARACTER_TAB 0x09 |
Definition at line 76 of file unicode_category.c.
#define PG_U_CN_MASK PG_U_CATEGORY_MASK(PG_U_UNASSIGNED) |
Definition at line 72 of file unicode_category.c.
#define PG_U_CO_MASK PG_U_CATEGORY_MASK(PG_U_PRIVATE_USE) |
Definition at line 71 of file unicode_category.c.
#define PG_U_CS_MASK PG_U_CATEGORY_MASK(PG_U_SURROGATE) |
Definition at line 70 of file unicode_category.c.
#define PG_U_L_MASK |
Definition at line 40 of file unicode_category.c.
#define PG_U_LC_MASK (PG_U_LU_MASK|PG_U_LL_MASK|PG_U_LT_MASK) |
Definition at line 37 of file unicode_category.c.
#define PG_U_LL_MASK PG_U_CATEGORY_MASK(PG_U_LOWERCASE_LETTER) |
Definition at line 35 of file unicode_category.c.
#define PG_U_LM_MASK PG_U_CATEGORY_MASK(PG_U_MODIFIER_LETTER) |
Definition at line 38 of file unicode_category.c.
#define PG_U_LO_MASK PG_U_CATEGORY_MASK(PG_U_OTHER_LETTER) |
Definition at line 39 of file unicode_category.c.
#define PG_U_LT_MASK PG_U_CATEGORY_MASK(PG_U_TITLECASE_LETTER) |
Definition at line 36 of file unicode_category.c.
#define PG_U_LU_MASK PG_U_CATEGORY_MASK(PG_U_UPPERCASE_LETTER) |
Definition at line 34 of file unicode_category.c.
#define PG_U_M_MASK (PG_U_MN_MASK|PG_U_MC_MASK|PG_U_ME_MASK) |
Definition at line 45 of file unicode_category.c.
#define PG_U_MC_MASK PG_U_CATEGORY_MASK(PG_U_SPACING_MARK) |
Definition at line 44 of file unicode_category.c.
#define PG_U_ME_MASK PG_U_CATEGORY_MASK(PG_U_ENCLOSING_MARK) |
Definition at line 43 of file unicode_category.c.
#define PG_U_MN_MASK PG_U_CATEGORY_MASK(PG_U_NONSPACING_MARK) |
Definition at line 42 of file unicode_category.c.
#define PG_U_N_MASK (PG_U_ND_MASK|PG_U_NL_MASK|PG_U_NO_MASK) |
Definition at line 49 of file unicode_category.c.
#define PG_U_ND_MASK PG_U_CATEGORY_MASK(PG_U_DECIMAL_NUMBER) |
Definition at line 46 of file unicode_category.c.
#define PG_U_NL_MASK PG_U_CATEGORY_MASK(PG_U_LETTER_NUMBER) |
Definition at line 47 of file unicode_category.c.
#define PG_U_NO_MASK PG_U_CATEGORY_MASK(PG_U_OTHER_NUMBER) |
Definition at line 48 of file unicode_category.c.
#define PG_U_P_MASK |
Definition at line 57 of file unicode_category.c.
#define PG_U_PC_MASK PG_U_CATEGORY_MASK(PG_U_CONNECTOR_PUNCTUATION) |
Definition at line 50 of file unicode_category.c.
#define PG_U_PD_MASK PG_U_CATEGORY_MASK(PG_U_DASH_PUNCTUATION) |
Definition at line 51 of file unicode_category.c.
#define PG_U_PE_MASK PG_U_CATEGORY_MASK(PG_U_CLOSE_PUNCTUATION) |
Definition at line 53 of file unicode_category.c.
#define PG_U_PF_MASK PG_U_CATEGORY_MASK(PG_U_FINAL_PUNCTUATION) |
Definition at line 55 of file unicode_category.c.
#define PG_U_PI_MASK PG_U_CATEGORY_MASK(PG_U_INITIAL_PUNCTUATION) |
Definition at line 54 of file unicode_category.c.
#define PG_U_PO_MASK PG_U_CATEGORY_MASK(PG_U_OTHER_PUNCTUATION) |
Definition at line 56 of file unicode_category.c.
#define PG_U_PS_MASK PG_U_CATEGORY_MASK(PG_U_OPEN_PUNCTUATION) |
Definition at line 52 of file unicode_category.c.
#define PG_U_S_MASK (PG_U_SM_MASK|PG_U_SC_MASK|PG_U_SK_MASK|PG_U_SO_MASK) |
Definition at line 63 of file unicode_category.c.
#define PG_U_SC_MASK PG_U_CATEGORY_MASK(PG_U_CURRENCY_SYMBOL) |
Definition at line 60 of file unicode_category.c.
#define PG_U_SK_MASK PG_U_CATEGORY_MASK(PG_U_MODIFIER_SYMBOL) |
Definition at line 61 of file unicode_category.c.
#define PG_U_SM_MASK PG_U_CATEGORY_MASK(PG_U_MATH_SYMBOL) |
Definition at line 59 of file unicode_category.c.
#define PG_U_SO_MASK PG_U_CATEGORY_MASK(PG_U_OTHER_SYMBOL) |
Definition at line 62 of file unicode_category.c.
#define PG_U_Z_MASK (PG_U_ZS_MASK|PG_U_ZL_MASK|PG_U_ZP_MASK) |
Definition at line 67 of file unicode_category.c.
#define PG_U_ZL_MASK PG_U_CATEGORY_MASK(PG_U_LINE_SEPARATOR) |
Definition at line 65 of file unicode_category.c.
#define PG_U_ZP_MASK PG_U_CATEGORY_MASK(PG_U_PARAGRAPH_SEPARATOR) |
Definition at line 66 of file unicode_category.c.
#define PG_U_ZS_MASK PG_U_CATEGORY_MASK(PG_U_SPACE_SEPARATOR) |
Definition at line 64 of file unicode_category.c.
bool pg_u_isalnum | ( | pg_wchar | code, |
bool | posix | ||
) |
Definition at line 226 of file unicode_category.c.
References pg_u_isalpha(), and pg_u_isdigit().
Referenced by initcap_wbnext(), and pg_wc_isalnum().
bool pg_u_isalpha | ( | pg_wchar | code | ) |
Definition at line 220 of file unicode_category.c.
References pg_u_prop_alphabetic().
Referenced by pg_u_isalnum(), pg_u_ispunct(), pg_u_isword(), and pg_wc_isalpha().
bool pg_u_isblank | ( | pg_wchar | code | ) |
Definition at line 255 of file unicode_category.c.
References PG_U_CHARACTER_TAB, PG_U_SPACE_SEPARATOR, and unicode_category().
Referenced by pg_u_isprint().
bool pg_u_iscntrl | ( | pg_wchar | code | ) |
bool pg_u_isdigit | ( | pg_wchar | code, |
bool | posix | ||
) |
Definition at line 211 of file unicode_category.c.
References PG_U_DECIMAL_NUMBER, and unicode_category().
Referenced by pg_u_isalnum(), and pg_wc_isdigit().
bool pg_u_isgraph | ( | pg_wchar | code | ) |
Definition at line 268 of file unicode_category.c.
References PG_U_CATEGORY_MASK, PG_U_CC_MASK, PG_U_CN_MASK, PG_U_CS_MASK, pg_u_isspace(), and unicode_category().
Referenced by pg_u_isprint(), and pg_wc_isgraph().
bool pg_u_islower | ( | pg_wchar | code | ) |
Definition at line 249 of file unicode_category.c.
References pg_u_prop_lowercase().
Referenced by pg_wc_islower().
bool pg_u_isprint | ( | pg_wchar | code | ) |
Definition at line 279 of file unicode_category.c.
References PG_U_CONTROL, pg_u_isblank(), pg_u_isgraph(), and unicode_category().
Referenced by pg_wc_isprint().
bool pg_u_ispunct | ( | pg_wchar | code, |
bool | posix | ||
) |
Definition at line 290 of file unicode_category.c.
References PG_U_CATEGORY_MASK, pg_u_isalpha(), PG_U_P_MASK, PG_U_S_MASK, and unicode_category().
Referenced by pg_wc_ispunct().
bool pg_u_isspace | ( | pg_wchar | code | ) |
Definition at line 311 of file unicode_category.c.
References pg_u_prop_white_space().
Referenced by pg_u_isgraph(), and pg_wc_isspace().
bool pg_u_isupper | ( | pg_wchar | code | ) |
Definition at line 243 of file unicode_category.c.
References pg_u_prop_uppercase().
Referenced by pg_wc_isupper().
bool pg_u_isword | ( | pg_wchar | code | ) |
Definition at line 232 of file unicode_category.c.
References PG_U_CATEGORY_MASK, pg_u_isalpha(), PG_U_M_MASK, PG_U_ND_MASK, PG_U_PC_MASK, pg_u_prop_join_control(), and unicode_category().
bool pg_u_isxdigit | ( | pg_wchar | code, |
bool | posix | ||
) |
Definition at line 317 of file unicode_category.c.
References PG_U_DECIMAL_NUMBER, pg_u_prop_hex_digit(), and unicode_category().
bool pg_u_prop_alphabetic | ( | pg_wchar | code | ) |
Definition at line 111 of file unicode_category.c.
References lengthof, PG_U_PROP_ALPHABETIC, pg_unicode_properties::properties, range_search(), unicode_alphabetic, and unicode_opt_ascii.
Referenced by pg_u_isalpha().
bool pg_u_prop_case_ignorable | ( | pg_wchar | code | ) |
Definition at line 159 of file unicode_category.c.
References lengthof, PG_U_PROP_CASE_IGNORABLE, pg_unicode_properties::properties, range_search(), unicode_case_ignorable, and unicode_opt_ascii.
bool pg_u_prop_cased | ( | pg_wchar | code | ) |
Definition at line 144 of file unicode_category.c.
References PG_U_CATEGORY_MASK, PG_U_LT_MASK, PG_U_PROP_CASED, pg_u_prop_lowercase(), pg_u_prop_uppercase(), pg_unicode_properties::properties, unicode_category(), and unicode_opt_ascii.
bool pg_u_prop_hex_digit | ( | pg_wchar | code | ) |
Definition at line 181 of file unicode_category.c.
References lengthof, PG_U_PROP_HEX_DIGIT, pg_unicode_properties::properties, range_search(), unicode_hex_digit, and unicode_opt_ascii.
Referenced by pg_u_isxdigit().
bool pg_u_prop_join_control | ( | pg_wchar | code | ) |
Definition at line 192 of file unicode_category.c.
References lengthof, PG_U_PROP_JOIN_CONTROL, pg_unicode_properties::properties, range_search(), unicode_join_control, and unicode_opt_ascii.
Referenced by pg_u_isword().
bool pg_u_prop_lowercase | ( | pg_wchar | code | ) |
Definition at line 122 of file unicode_category.c.
References lengthof, PG_U_PROP_LOWERCASE, pg_unicode_properties::properties, range_search(), unicode_lowercase, and unicode_opt_ascii.
Referenced by pg_u_islower(), and pg_u_prop_cased().
bool pg_u_prop_uppercase | ( | pg_wchar | code | ) |
Definition at line 133 of file unicode_category.c.
References lengthof, PG_U_PROP_UPPERCASE, pg_unicode_properties::properties, range_search(), unicode_opt_ascii, and unicode_uppercase.
Referenced by pg_u_isupper(), and pg_u_prop_cased().
bool pg_u_prop_white_space | ( | pg_wchar | code | ) |
Definition at line 170 of file unicode_category.c.
References lengthof, PG_U_PROP_WHITE_SPACE, pg_unicode_properties::properties, range_search(), unicode_opt_ascii, and unicode_white_space.
Referenced by pg_u_isspace().
|
static |
Definition at line 481 of file unicode_category.c.
Referenced by pg_u_prop_alphabetic(), pg_u_prop_case_ignorable(), pg_u_prop_hex_digit(), pg_u_prop_join_control(), pg_u_prop_lowercase(), pg_u_prop_uppercase(), and pg_u_prop_white_space().
pg_unicode_category unicode_category | ( | pg_wchar | code | ) |
Definition at line 85 of file unicode_category.c.
References Assert, pg_category_range::category, pg_unicode_properties::category, lengthof, PG_U_UNASSIGNED, unicode_categories, and unicode_opt_ascii.
Referenced by pg_u_isblank(), pg_u_iscntrl(), pg_u_isdigit(), pg_u_isgraph(), pg_u_isprint(), pg_u_ispunct(), pg_u_isword(), pg_u_isxdigit(), pg_u_prop_cased(), and unicode_assigned().
const char* unicode_category_abbrev | ( | pg_unicode_category | category | ) |
Definition at line 406 of file unicode_category.c.
References Assert, PG_U_CLOSE_PUNCTUATION, PG_U_CONNECTOR_PUNCTUATION, PG_U_CONTROL, PG_U_CURRENCY_SYMBOL, PG_U_DASH_PUNCTUATION, PG_U_DECIMAL_NUMBER, PG_U_ENCLOSING_MARK, PG_U_FINAL_PUNCTUATION, PG_U_FORMAT, PG_U_INITIAL_PUNCTUATION, PG_U_LETTER_NUMBER, PG_U_LINE_SEPARATOR, PG_U_LOWERCASE_LETTER, PG_U_MATH_SYMBOL, PG_U_MODIFIER_LETTER, PG_U_MODIFIER_SYMBOL, PG_U_NONSPACING_MARK, PG_U_OPEN_PUNCTUATION, PG_U_OTHER_LETTER, PG_U_OTHER_NUMBER, PG_U_OTHER_PUNCTUATION, PG_U_OTHER_SYMBOL, PG_U_PARAGRAPH_SEPARATOR, PG_U_PRIVATE_USE, PG_U_SPACE_SEPARATOR, PG_U_SPACING_MARK, PG_U_SURROGATE, PG_U_TITLECASE_LETTER, PG_U_UNASSIGNED, and PG_U_UPPERCASE_LETTER.
const char* unicode_category_string | ( | pg_unicode_category | category | ) |
Definition at line 332 of file unicode_category.c.
References Assert, PG_U_CLOSE_PUNCTUATION, PG_U_CONNECTOR_PUNCTUATION, PG_U_CONTROL, PG_U_CURRENCY_SYMBOL, PG_U_DASH_PUNCTUATION, PG_U_DECIMAL_NUMBER, PG_U_ENCLOSING_MARK, PG_U_FINAL_PUNCTUATION, PG_U_FORMAT, PG_U_INITIAL_PUNCTUATION, PG_U_LETTER_NUMBER, PG_U_LINE_SEPARATOR, PG_U_LOWERCASE_LETTER, PG_U_MATH_SYMBOL, PG_U_MODIFIER_LETTER, PG_U_MODIFIER_SYMBOL, PG_U_NONSPACING_MARK, PG_U_OPEN_PUNCTUATION, PG_U_OTHER_LETTER, PG_U_OTHER_NUMBER, PG_U_OTHER_PUNCTUATION, PG_U_OTHER_SYMBOL, PG_U_PARAGRAPH_SEPARATOR, PG_U_PRIVATE_USE, PG_U_SPACE_SEPARATOR, PG_U_SPACING_MARK, PG_U_SURROGATE, PG_U_TITLECASE_LETTER, PG_U_UNASSIGNED, and PG_U_UPPERCASE_LETTER.