~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/ctype.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-03-18 12:12:31 UTC
  • Revision ID: james.westby@ubuntu.com-20100318121231-k6g1xe6cshbwa0f8
Tags: upstream-2010.03.1347
ImportĀ upstreamĀ versionĀ 2010.03.1347

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2000 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; version 2 of the License.
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
 
 
16
#include "config.h"
 
17
#include "drizzled/internal/m_string.h"
 
18
#include "drizzled/charset_info.h"
 
19
 
 
20
namespace drizzled
 
21
{
 
22
 
 
23
/*
 
24
 
 
25
  This files implements routines which parse XML based
 
26
  character set and collation description files.
 
27
 
 
28
  Unicode collations are encoded according to
 
29
 
 
30
    Unicode Technical Standard #35
 
31
    Locale Data Markup Language (LDML)
 
32
    http://www.unicode.org/reports/tr35/
 
33
 
 
34
  and converted into ICU string according to
 
35
 
 
36
    Collation Customization
 
37
    http://oss.software.ibm.com/icu/userguide/Collate_Customization.html
 
38
 
 
39
*/
 
40
 
 
41
struct my_cs_file_section_st
 
42
{
 
43
  int        state;
 
44
  const char *str;
 
45
};
 
46
 
 
47
 
 
48
#define MY_CS_CSDESCR_SIZE      64
 
49
#define MY_CS_TAILORING_SIZE    1024
 
50
 
 
51
typedef struct my_cs_file_info
 
52
{
 
53
  char   csname[MY_CS_NAME_SIZE];
 
54
  char   name[MY_CS_NAME_SIZE];
 
55
  unsigned char  ctype[MY_CS_CTYPE_TABLE_SIZE];
 
56
  unsigned char  to_lower[MY_CS_TO_LOWER_TABLE_SIZE];
 
57
  unsigned char  to_upper[MY_CS_TO_UPPER_TABLE_SIZE];
 
58
  unsigned char  sort_order[MY_CS_SORT_ORDER_TABLE_SIZE];
 
59
  uint16_t tab_to_uni[MY_CS_TO_UNI_TABLE_SIZE];
 
60
  char   comment[MY_CS_CSDESCR_SIZE];
 
61
  char   tailoring[MY_CS_TAILORING_SIZE];
 
62
  size_t tailoring_length;
 
63
  CHARSET_INFO cs;
 
64
  int (*add_collation)(CHARSET_INFO *cs);
 
65
} MY_CHARSET_LOADER;
 
66
 
 
67
} /* namespace drizzled */