| 28 | #include "ld_proto.h" |
| 29 | |
| 30 | static inline bool FAMILY1(texttype* cache, |
| 31 | SSHORT country, |
| 32 | USHORT flags, |
| 33 | const SortOrderTblEntry* NoCaseOrderTbl, |
| 34 | const BYTE* ToUpperConversionTbl, |
| 35 | const BYTE* ToLowerConversionTbl, |
| 36 | const CompressPair* CompressTbl, |
| 37 | const ExpandChar* ExpansionTbl, |
| 38 | const ASCII* POSIX, |
| 39 | USHORT attributes, |
| 40 | const UCHAR*, // specific_attributes, |
| 41 | ULONG specific_attributes_length) |
| 42 | //#define FAMILY1(id_number, name, charset, country) |
| 43 | { |
| 44 | if ((attributes & ~TEXTTYPE_ATTR_PAD_SPACE) || specific_attributes_length) |
| 45 | return false; |
| 46 | |
| 47 | TextTypeImpl* impl = FB_NEW TextTypeImpl; |
| 48 | |
| 49 | cache->texttype_version = TEXTTYPE_VERSION_1; |
| 50 | cache->texttype_name = POSIX; |
| 51 | cache->texttype_country = country; |
| 52 | cache->texttype_pad_option = (attributes & TEXTTYPE_ATTR_PAD_SPACE) ? true : false; |
| 53 | cache->texttype_fn_key_length = LC_NARROW_key_length; |
| 54 | cache->texttype_fn_string_to_key= LC_NARROW_string_to_key; |
| 55 | cache->texttype_fn_compare = LC_NARROW_compare; |
| 56 | cache->texttype_fn_str_to_upper = fam1_str_to_upper; |
| 57 | cache->texttype_fn_str_to_lower = fam1_str_to_lower; |
| 58 | cache->texttype_fn_destroy = LC_NARROW_destroy; |
| 59 | cache->texttype_impl = impl; |
| 60 | impl->texttype_collation_table = (const BYTE*) NoCaseOrderTbl; |
| 61 | impl->texttype_toupper_table = ToUpperConversionTbl; |
| 62 | impl->texttype_tolower_table = ToLowerConversionTbl; |
| 63 | impl->texttype_compress_table = (const BYTE*) CompressTbl; |
| 64 | impl->texttype_expand_table = (const BYTE*) ExpansionTbl; |
| 65 | impl->texttype_flags = ((flags) & REVERSE) ? (TEXTTYPE_reverse_secondary | TEXTTYPE_ignore_specials) : 0; |
| 66 | |
| 67 | return true; |
| 68 | } |
| 69 | |
| 70 | |
| 71 | |