8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 07:23:03 +01:00
firebird-mirror/src/intl/lc_dos.cpp

578 lines
16 KiB
C++
Raw Normal View History

2001-05-23 15:26:42 +02:00
/*
* PROGRAM: InterBase International support
* MODULE: lc_dos.cpp
2001-05-23 15:26:42 +02:00
* DESCRIPTION: Language Drivers for compatibility with DOS products.
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
2003-02-17 11:37:42 +01:00
#include "firebird.h"
2001-05-23 15:26:42 +02:00
#include "../intl/ldcommon.h"
#include "lc_dos.h"
#include "lc_narrow.h"
2003-09-21 01:33:36 +02:00
#include "ld_proto.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
static inline bool FAMILY1(TEXTTYPE cache,
2003-09-19 00:06:59 +02:00
SSHORT country,
USHORT flags,
const SortOrderTblEntry* NoCaseOrderTbl,
const BYTE* ToUpperConversionTbl,
const BYTE* ToLowerConversionTbl,
const CompressPair* CompressTbl,
const ExpandChar* ExpansionTbl,
2005-05-28 00:45:31 +02:00
const ASCII* POSIX,
USHORT attributes,
const UCHAR* specific_attributes,
ULONG specific_attributes_length)
2003-09-19 00:06:59 +02:00
//#define FAMILY1(id_number, name, charset, country)
{
2005-05-28 00:45:31 +02:00
if ((attributes & ~TEXTTYPE_ATTR_PAD_SPACE) || specific_attributes_length)
return false;
cache->texttype_version = TEXTTYPE_VERSION_1;
cache->texttype_name = POSIX;
2003-09-19 00:06:59 +02:00
cache->texttype_country = country;
2005-05-28 00:45:31 +02:00
cache->texttype_pad_option = (attributes & TEXTTYPE_ATTR_PAD_SPACE) ? true : false;
2004-03-07 08:58:55 +01:00
cache->texttype_fn_key_length = LC_NARROW_key_length;
cache->texttype_fn_string_to_key= LC_NARROW_string_to_key;
cache->texttype_fn_compare = LC_NARROW_compare;
cache->texttype_fn_str_to_upper = fam1_str_to_upper;
2005-05-28 00:45:31 +02:00
cache->texttype_fn_str_to_lower = fam1_str_to_lower;
cache->texttype_fn_destroy = LC_NARROW_destroy;
cache->texttype_impl = new TextTypeImpl;
cache->texttype_impl->texttype_collation_table = (const BYTE*) NoCaseOrderTbl;
cache->texttype_impl->texttype_toupper_table = ToUpperConversionTbl;
cache->texttype_impl->texttype_tolower_table = ToLowerConversionTbl;
cache->texttype_impl->texttype_compress_table = (const BYTE*) CompressTbl;
cache->texttype_impl->texttype_expand_table = (const BYTE*) ExpansionTbl;
cache->texttype_impl->texttype_flags = ((flags) & REVERSE) ? (TEXTTYPE_reverse_secondary | TEXTTYPE_ignore_specials) : 0;
return true;
2003-09-19 00:06:59 +02:00
}
2001-05-23 15:26:42 +02:00
TEXTTYPE_ENTRY(DOS102_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "INTL.DOS437";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/pd437intl.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_INTL, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS105_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "NORDAN4.DOS437";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/pd865nordan40.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_NORDAN, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS106_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "SWEDFIN.DOS437";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/pd437swedfin.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_SWEDFIN, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS101_c2_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS437";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db437de0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_GERMANY, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS101_c3_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS437";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db437es1.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_SPAIN, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS101_c4_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS437";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db437fi0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_FINLAND, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS101_c5_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS437";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db437fr0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_FRANCE, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS101_c6_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS437";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db437it0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_ITALY, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS101_c7_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS437";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db437nl0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_NEDERLANDS, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS101_c8_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS437";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db437sv0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_SWEDEN, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS101_c9_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS437";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db437uk0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_UK, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS101_c10_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS437";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db437us0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_US, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS160_c1_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS850";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db850cf0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_FRENCHCAN, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS160_c2_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS850";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db850de0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_GERMANY, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS160_c3_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS850";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db850es0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_SPAIN, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS160_c4_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS850";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db850fr0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_FRANCE, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS160_c5_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS850";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db850it1.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_ITALY, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS160_c6_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS850";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db850nl0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_NEDERLANDS, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS160_c7_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS850";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db850pt0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_PORTUGAL, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS160_c8_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS850";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db850sv1.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_SWEDEN, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS160_c9_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS850";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db850uk0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_UK, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS160_c10_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS850";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db850us0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_US, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS107_c1_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "PDOX.DOS865";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/pd865nordan40.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_NORDAN, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS107_c2_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS865";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db865da0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_DENMARK, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS107_c3_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS865";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db865no0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_NORWAY, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS852_c1_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS852";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db852cz0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_CZECH, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS852_c2_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS852";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db852po0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_POLAND, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS852_c4_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS852";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db852sl0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_YUGOSLAVIA, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS852_c5_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "PDOX.DOS852";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/pd852czech.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_CZECH, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS852_c6_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "PDOX.DOS852";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/pd852polish.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_POLAND, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS852_c7_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "PDOX.DOS852";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/pd852hundc.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_HUNGARY, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS852_c8_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "PDOX.DOS852";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/pd852slovene.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_YUGOSLAVIA, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS857_c1_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS857";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db857tr0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_TURKEY, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS860_c1_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS860";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db860pt0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_PORTUGAL, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS861_c1_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "PDOX.DOS861";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/pd861iceland.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_ICELAND, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(DOS863_c1_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.DOS863";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db863cf1.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_FRENCHCAN, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(CYRL_c1_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "DBASE.CYRL";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/db866ru0.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_RUSSIA, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
TEXTTYPE_ENTRY(CYRL_c2_init)
{
2003-02-13 10:58:19 +01:00
static const ASCII POSIX[] = "PDOX.CYRL";
2001-05-23 15:26:42 +02:00
2003-01-23 04:28:45 +01:00
#include "../intl/collations/pd866cyrr.h"
2001-05-23 15:26:42 +02:00
2005-05-28 00:45:31 +02:00
return FAMILY1(cache, CC_RUSSIA, LDRV_TIEBREAK,
2003-09-19 00:06:59 +02:00
NoCaseOrderTbl, ToUpperConversionTbl, ToLowerConversionTbl,
2005-05-28 00:45:31 +02:00
CompressTbl, ExpansionTbl, POSIX, attributes, specific_attributes, specific_attributes_length);
2001-05-23 15:26:42 +02:00
}
/*
* Generic base for InterBase 4.0 Language Driver - family1
* Paradox DOS/Windows compatible
*/
2005-05-28 00:45:31 +02:00
#define LOCALE_UPPER(ch) (obj->texttype_impl->texttype_toupper_table [(unsigned)(ch)])
#define LOCALE_LOWER(ch) (obj->texttype_impl->texttype_tolower_table [(unsigned)(ch)])
2001-05-23 15:26:42 +02:00
/*
2005-05-28 00:45:31 +02:00
* Returns INTL_BAD_STR_LENGTH if output buffer was too small
2001-05-23 15:26:42 +02:00
*/
2005-05-28 00:45:31 +02:00
ULONG fam1_str_to_upper(TEXTTYPE obj, ULONG iLen, const BYTE* pStr, ULONG iOutLen, BYTE *pOutStr)
2001-05-23 15:26:42 +02:00
{
2003-11-04 00:59:24 +01:00
fb_assert(pStr != NULL);
fb_assert(pOutStr != NULL);
fb_assert(iOutLen >= iLen);
2003-12-31 06:36:12 +01:00
const BYTE* const p = pOutStr;
2001-05-23 15:26:42 +02:00
while (iLen && iOutLen) {
*pOutStr++ = LOCALE_UPPER(*pStr);
pStr++;
iLen--;
iOutLen--;
}
2001-05-23 15:26:42 +02:00
if (iLen != 0)
2005-05-28 00:45:31 +02:00
return (INTL_BAD_STR_LENGTH);
2001-05-23 15:26:42 +02:00
return (pOutStr - p);
}
2005-05-28 00:45:31 +02:00
/*
* Returns INTL_BAD_STR_LENGTH if output buffer was too small
*/
ULONG fam1_str_to_lower(TEXTTYPE obj, ULONG iLen, const BYTE* pStr, ULONG iOutLen, BYTE *pOutStr)
2001-05-23 15:26:42 +02:00
{
2005-05-28 00:45:31 +02:00
fb_assert(pStr != NULL);
fb_assert(pOutStr != NULL);
fb_assert(iOutLen >= iLen);
const BYTE* const p = pOutStr;
while (iLen && iOutLen) {
*pOutStr++ = LOCALE_LOWER(*pStr);
pStr++;
iLen--;
iOutLen--;
2001-05-23 15:26:42 +02:00
}
2005-05-28 00:45:31 +02:00
if (iLen != 0)
return (INTL_BAD_STR_LENGTH);
return (pOutStr - p);
2001-05-23 15:26:42 +02:00
}