PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
unicode_case_table.h File Reference
#include "common/unicode_case.h"
#include "mb/pg_wchar.h"
Include dependency graph for unicode_case_table.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pg_special_case
 

Macros

#define MAX_CASE_EXPANSION   3
 
#define PG_U_FINAL_SIGMA   (1 << 0)
 

Enumerations

enum  CaseKind {
  CaseLower = 0 , CaseTitle = 1 , CaseUpper = 2 , CaseFold = 3 ,
  NCaseKind
}
 

Functions

static uint16 case_index (pg_wchar cp)
 

Variables

static const pg_special_case special_case [106]
 
static const pg_wchar case_map_lower [1704]
 
static const pg_wchar case_map_title [1704]
 
static const pg_wchar case_map_upper [1704]
 
static const pg_wchar case_map_fold [1704]
 
static const uint8 case_map_special [1704]
 
static const uint16 case_map [4778]
 

Macro Definition Documentation

◆ MAX_CASE_EXPANSION

#define MAX_CASE_EXPANSION   3

Definition at line 27 of file unicode_case_table.h.

◆ PG_U_FINAL_SIGMA

#define PG_U_FINAL_SIGMA   (1 << 0)

Definition at line 34 of file unicode_case_table.h.

Enumeration Type Documentation

◆ CaseKind

enum CaseKind
Enumerator
CaseLower 
CaseTitle 
CaseUpper 
CaseFold 
NCaseKind 

Definition at line 36 of file unicode_case_table.h.

37{
38 CaseLower = 0,
39 CaseTitle = 1,
40 CaseUpper = 2,
41 CaseFold = 3,
43} CaseKind;
@ CaseFold
@ CaseTitle
@ NCaseKind
@ CaseLower
@ CaseUpper

Function Documentation

◆ case_index()

static uint16 case_index ( pg_wchar  cp)
inlinestatic

Definition at line 13525 of file unicode_case_table.h.

13526{
13527 /* Fast path for codepoints < 0x0588 */
13528 if (cp < 0x0588)
13529 {
13530 return case_map[cp];
13531 }
13532
13533 if (cp < 0xABC0)
13534 {
13535 if (cp < 0x2185)
13536 {
13537 if (cp >= 0x10A0 && cp < 0x1100)
13538 {
13539 return case_map[cp - 0x10A0 + 1416];
13540 }
13541 else if (cp >= 0x13A0)
13542 {
13543 if (cp < 0x13FE)
13544 {
13545 return case_map[cp - 0x13A0 + 1512];
13546 }
13547 else if (cp >= 0x1C80)
13548 {
13549 return case_map[cp - 0x1C80 + 1606];
13550 }
13551 }
13552 }
13553 else if (cp >= 0x24B6)
13554 {
13555 if (cp < 0x2D2E)
13556 {
13557 if (cp < 0x24EA)
13558 {
13559 return case_map[cp - 0x24B6 + 2891];
13560 }
13561 else if (cp >= 0x2C00)
13562 {
13563 return case_map[cp - 0x2C00 + 2943];
13564 }
13565 }
13566 else if (cp >= 0xA640)
13567 {
13568 if (cp < 0xA7F7)
13569 {
13570 return case_map[cp - 0xA640 + 3245];
13571 }
13572 else if (cp >= 0xAB53)
13573 {
13574 return case_map[cp - 0xAB53 + 3684];
13575 }
13576 }
13577 }
13578 }
13579 else if (cp >= 0xFB00)
13580 {
13581 if (cp < 0x10D86)
13582 {
13583 if (cp < 0xFF5B)
13584 {
13585 if (cp < 0xFB18)
13586 {
13587 return case_map[cp - 0xFB00 + 3793];
13588 }
13589 else if (cp >= 0xFF21)
13590 {
13591 return case_map[cp - 0xFF21 + 3817];
13592 }
13593 }
13594 else if (cp >= 0x10400)
13595 {
13596 if (cp < 0x105BD)
13597 {
13598 return case_map[cp - 0x10400 + 3875];
13599 }
13600 else if (cp >= 0x10C80)
13601 {
13602 return case_map[cp - 0x10C80 + 4320];
13603 }
13604 }
13605 }
13606 else if (cp >= 0x118A0)
13607 {
13608 if (cp < 0x16E80)
13609 {
13610 if (cp < 0x118E0)
13611 {
13612 return case_map[cp - 0x118A0 + 4582];
13613 }
13614 else if (cp >= 0x16E40)
13615 {
13616 return case_map[cp - 0x16E40 + 4646];
13617 }
13618 }
13619 else if (cp >= 0x1E900)
13620 {
13621 if (cp < 0x1E944)
13622 {
13623 return case_map[cp - 0x1E900 + 4710];
13624 }
13625 }
13626 }
13627 }
13628
13629 return 0;
13630}
static const uint16 case_map[4778]

References case_map.

Referenced by casemap(), and find_case_map().

Variable Documentation

◆ case_map

const uint16 case_map[4778]
static

Definition at line 8735 of file unicode_case_table.h.

Referenced by case_index().

◆ case_map_fold

const pg_wchar case_map_fold[1704]
static

Definition at line 5308 of file unicode_case_table.h.

Referenced by unicode_casefold_simple().

◆ case_map_lower

const pg_wchar case_map_lower[1704]
static

Definition at line 169 of file unicode_case_table.h.

Referenced by unicode_lowercase_simple().

◆ case_map_special

const uint8 case_map_special[1704]
static

Definition at line 7021 of file unicode_case_table.h.

Referenced by casemap().

◆ case_map_title

const pg_wchar case_map_title[1704]
static

Definition at line 1882 of file unicode_case_table.h.

Referenced by unicode_titlecase_simple().

◆ case_map_upper

const pg_wchar case_map_upper[1704]
static

Definition at line 3595 of file unicode_case_table.h.

Referenced by unicode_uppercase_simple().

◆ special_case

const pg_special_case special_case[106]
static

Definition at line 55 of file unicode_case_table.h.

Referenced by casemap().