#include <my_global.h>#include "m_string.h"#include "m_ctype.h"Include dependency graph for ctype-latin1.c:

Go to the source code of this file.
Functions | |
| static int | my_mb_wc_latin1 (CHARSET_INFO *cs __attribute__((unused)), my_wc_t *wc, const unsigned char *str, const unsigned char *end __attribute__((unused))) |
| static int | my_wc_mb_latin1 (CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, unsigned char *str, unsigned char *end __attribute__((unused))) |
| static int | my_strnncoll_latin1_de (CHARSET_INFO *cs __attribute__((unused)), const uchar *a, uint a_length, const uchar *b, uint b_length, my_bool b_is_prefix) |
| static int | my_strnncollsp_latin1_de (CHARSET_INFO *cs __attribute__((unused)), const uchar *a, uint a_length, const uchar *b, uint b_length, my_bool diff_if_only_endspace_difference) |
| static int | my_strnxfrm_latin1_de (CHARSET_INFO *cs __attribute__((unused)), uchar *dest, uint len, const uchar *src, uint srclen) |
| void | my_hash_sort_latin1_de (CHARSET_INFO *cs __attribute__((unused)), const uchar *key, uint len, ulong *nr1, ulong *nr2) |
Variables | |
| static uchar | ctype_latin1 [] |
| static uchar | to_lower_latin1 [] |
| static uchar | to_upper_latin1 [] |
| static uchar | sort_order_latin1 [] |
| unsigned short | cs_to_uni [256] |
| unsigned char | pl00 [256] |
| unsigned char | pl01 [256] |
| unsigned char | pl02 [256] |
| unsigned char | pl20 [256] |
| unsigned char | pl21 [256] |
| unsigned char * | uni_to_cs [256] |
| static MY_CHARSET_HANDLER | my_charset_handler |
| CHARSET_INFO | my_charset_latin1 |
| static uchar | sort_order_latin1_de [] |
| uchar | combo1map [] |
| uchar | combo2map [] |
| static MY_COLLATION_HANDLER | my_collation_german2_ci_handler |
| CHARSET_INFO | my_charset_latin1_german2_ci |
| CHARSET_INFO | my_charset_latin1_bin |
| void my_hash_sort_latin1_de | ( | CHARSET_INFO *cs | __attribute__((unused)), | |
| const uchar * | key, | |||
| uint | len, | |||
| ulong * | nr1, | |||
| ulong * | nr2 | |||
| ) |
Definition at line 677 of file ctype-latin1.c.
00680 { 00681 const uchar *end= key+len; 00682 /* 00683 Remove end space. We have to do this to be able to compare 00684 'AE' and 'Ä' as identical 00685 */ 00686 while (end > key && end[-1] == ' ') 00687 end--; 00688 00689 for (; key < end ; key++) 00690 { 00691 uint X= (uint) combo1map[(uint) *key]; 00692 nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) * X) + (nr1[0] << 8); 00693 nr2[0]+=3; 00694 if ((X= combo2map[*key])) 00695 { 00696 nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) * X) + (nr1[0] << 8); 00697 nr2[0]+=3; 00698 } 00699 } 00700 }
| static int my_mb_wc_latin1 | ( | CHARSET_INFO *cs | __attribute__((unused)), | |
| my_wc_t * | wc, | |||
| const unsigned char * | str, | |||
| const unsigned char *end | __attribute__((unused)) | |||
| ) | [static] |
Definition at line 360 of file ctype-latin1.c.
References cs_to_uni, and MY_CS_TOOSMALL.
00364 { 00365 if (str >= end) 00366 return MY_CS_TOOSMALL; 00367 00368 *wc=cs_to_uni[*str]; 00369 return (!wc[0] && str[0]) ? -1 : 1; 00370 }
| static int my_strnncoll_latin1_de | ( | CHARSET_INFO *cs | __attribute__((unused)), | |
| const uchar * | a, | |||
| uint | a_length, | |||
| const uchar * | b, | |||
| uint | b_length, | |||
| my_bool | b_is_prefix | |||
| ) | [static] |
Definition at line 545 of file ctype-latin1.c.
00549 { 00550 const uchar *a_end= a + a_length; 00551 const uchar *b_end= b + b_length; 00552 uchar a_char, a_extend= 0, b_char, b_extend= 0; 00553 00554 while ((a < a_end || a_extend) && (b < b_end || b_extend)) 00555 { 00556 if (a_extend) 00557 { 00558 a_char=a_extend; a_extend=0; 00559 } 00560 else 00561 { 00562 a_extend=combo2map[*a]; 00563 a_char=combo1map[*a++]; 00564 } 00565 if (b_extend) 00566 { 00567 b_char=b_extend; b_extend=0; 00568 } 00569 else 00570 { 00571 b_extend=combo2map[*b]; 00572 b_char=combo1map[*b++]; 00573 } 00574 if (a_char != b_char) 00575 return (int) a_char - (int) b_char; 00576 } 00577 /* 00578 A simple test of string lengths won't work -- we test to see 00579 which string ran out first 00580 */ 00581 return ((a < a_end || a_extend) ? (b_is_prefix ? 0 : 1) : 00582 (b < b_end || b_extend) ? -1 : 0); 00583 }
| static int my_strnncollsp_latin1_de | ( | CHARSET_INFO *cs | __attribute__((unused)), | |
| const uchar * | a, | |||
| uint | a_length, | |||
| const uchar * | b, | |||
| uint | b_length, | |||
| my_bool | diff_if_only_endspace_difference | |||
| ) | [static] |
Definition at line 586 of file ctype-latin1.c.
References mySTL::swap().
00590 { 00591 const uchar *a_end= a + a_length, *b_end= b + b_length; 00592 uchar a_char, a_extend= 0, b_char, b_extend= 0; 00593 int res; 00594 00595 #ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE 00596 diff_if_only_endspace_difference= 0; 00597 #endif 00598 00599 while ((a < a_end || a_extend) && (b < b_end || b_extend)) 00600 { 00601 if (a_extend) 00602 { 00603 a_char=a_extend; 00604 a_extend= 0; 00605 } 00606 else 00607 { 00608 a_extend= combo2map[*a]; 00609 a_char= combo1map[*a++]; 00610 } 00611 if (b_extend) 00612 { 00613 b_char= b_extend; 00614 b_extend= 0; 00615 } 00616 else 00617 { 00618 b_extend= combo2map[*b]; 00619 b_char= combo1map[*b++]; 00620 } 00621 if (a_char != b_char) 00622 return (int) a_char - (int) b_char; 00623 } 00624 /* Check if double character last */ 00625 if (a_extend) 00626 return 1; 00627 if (b_extend) 00628 return -1; 00629 00630 res= 0; 00631 if (a != a_end || b != b_end) 00632 { 00633 int swap= 1; 00634 if (diff_if_only_endspace_difference) 00635 res= 1; /* Assume 'a' is bigger */ 00636 /* 00637 Check the next not space character of the longer key. If it's < ' ', 00638 then it's smaller than the other key. 00639 */ 00640 if (a == a_end) 00641 { 00642 /* put shorter key in a */ 00643 a_end= b_end; 00644 a= b; 00645 swap= -1; /* swap sign of result */ 00646 res= -res; 00647 } 00648 for ( ; a < a_end ; a++) 00649 { 00650 if (*a != ' ') 00651 return (*a < ' ') ? -swap : swap; 00652 } 00653 } 00654 return res; 00655 }
Here is the call graph for this function:

| static int my_strnxfrm_latin1_de | ( | CHARSET_INFO *cs | __attribute__((unused)), | |
| uchar * | dest, | |||
| uint | len, | |||
| const uchar * | src, | |||
| uint | srclen | |||
| ) | [static] |
Definition at line 658 of file ctype-latin1.c.
References bfill.
00661 { 00662 const uchar *de = dest + len; 00663 const uchar *se = src + srclen; 00664 for ( ; src < se && dest < de ; src++) 00665 { 00666 uchar chr=combo1map[*src]; 00667 *dest++=chr; 00668 if ((chr=combo2map[*src]) && dest < de) 00669 *dest++=chr; 00670 } 00671 if (dest < de) 00672 bfill(dest, de - dest, ' '); 00673 return (int) len; 00674 }
| static int my_wc_mb_latin1 | ( | CHARSET_INFO *cs | __attribute__((unused)), | |
| my_wc_t | wc, | |||
| unsigned char * | str, | |||
| unsigned char *end | __attribute__((unused)) | |||
| ) | [static] |
Definition at line 373 of file ctype-latin1.c.
References MY_CS_ILUNI, MY_CS_TOOSMALL, and uni_to_cs.
00377 { 00378 unsigned char *pl; 00379 00380 if (str >= end) 00381 return MY_CS_TOOSMALL; 00382 00383 pl= uni_to_cs[(wc>>8) & 0xFF]; 00384 str[0]= pl ? pl[wc & 0xFF] : '\0'; 00385 return (!str[0] && wc) ? MY_CS_ILUNI : 1; 00386 }
Initial value:
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
65, 65, 65, 65, 65, 65, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
68, 78, 79, 79, 79, 79, 79,215,216, 85, 85, 85, 85, 89,222, 83,
65, 65, 65, 65, 65, 65, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
68, 78, 79, 79, 79, 79, 79,247,216, 85, 85, 85, 85, 89,222, 89
}
Definition at line 498 of file ctype-latin1.c.
Initial value:
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,69, 0, 0, 0, 0, 0,69, 0, 0,83, 0, 0, 0, 0,69, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,69, 0, 0, 0, 0, 0,69, 0, 0, 0, 0
}
Definition at line 517 of file ctype-latin1.c.
| unsigned short cs_to_uni[256] |
uchar ctype_latin1[] [static] |
Initial value:
{
0,
32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
16, 0, 16, 2, 16, 16, 16, 16, 16, 16, 1, 16, 1, 0, 1, 0,
0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 2, 0, 2, 1,
72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
}
Definition at line 21 of file ctype-latin1.c.
MY_CHARSET_HANDLER my_charset_handler [static] |
Initial value:
{
NULL,
NULL,
my_mbcharlen_8bit,
my_numchars_8bit,
my_charpos_8bit,
my_well_formed_len_8bit,
my_lengthsp_8bit,
my_numcells_8bit,
my_mb_wc_latin1,
my_wc_mb_latin1,
my_mb_ctype_8bit,
my_caseup_str_8bit,
my_casedn_str_8bit,
my_caseup_8bit,
my_casedn_8bit,
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit,
my_strtoll10_8bit,
my_scan_8bit
}
Definition at line 388 of file ctype-latin1.c.
Definition at line 419 of file ctype-latin1.c.
Definition at line 752 of file ctype-latin1.c.
Definition at line 719 of file ctype-latin1.c.
Initial value:
{
NULL,
my_strnncoll_latin1_de,
my_strnncollsp_latin1_de,
my_strnxfrm_latin1_de,
my_strnxfrmlen_simple,
my_like_range_simple,
my_wildcmp_8bit,
my_strcasecmp_8bit,
my_instr_simple,
my_hash_sort_latin1_de,
my_propagate_complex
}
Definition at line 703 of file ctype-latin1.c.
| unsigned char pl00[256] |
Definition at line 154 of file ctype-latin1.c.
| unsigned char pl01[256] |
Definition at line 188 of file ctype-latin1.c.
| unsigned char pl02[256] |
Definition at line 222 of file ctype-latin1.c.
| unsigned char pl20[256] |
Definition at line 256 of file ctype-latin1.c.
| unsigned char pl21[256] |
Definition at line 290 of file ctype-latin1.c.
uchar sort_order_latin1[] [static] |
Initial value:
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
65, 65, 65, 65, 92, 91, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
68, 78, 79, 79, 79, 79, 93,215,216, 85, 85, 85, 89, 89,222,223,
65, 65, 65, 65, 92, 91, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
68, 78, 79, 79, 79, 79, 93,247,216, 85, 85, 85, 89, 89,222,255
}
Definition at line 79 of file ctype-latin1.c.
uchar sort_order_latin1_de[] [static] |
Initial value:
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
65, 65, 65, 65,196, 65, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
68, 78, 79, 79, 79, 79,214,215,216, 85, 85, 85,220, 89,222,223,
65, 65, 65, 65,196, 65, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
68, 78, 79, 79, 79, 79,214,247,216, 85, 85, 85,220, 89,222, 89
}
Definition at line 474 of file ctype-latin1.c.
uchar to_lower_latin1[] [static] |
Initial value:
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
}
Definition at line 41 of file ctype-latin1.c.
uchar to_upper_latin1[] [static] |
Initial value:
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
}
Definition at line 60 of file ctype-latin1.c.
| unsigned char* uni_to_cs[256] |
1.4.7

