Mercurial > hg > octave-nkf > gnulib-hg
annotate lib/uninorm/normalize-internal.h @ 14079:97fc9a21a8fb
maint: update almost all copyright ranges to include 2011
Run the new "make update-copyright" rule.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Sat, 01 Jan 2011 20:17:23 +0100 |
parents | c2cbabec01dd |
children | eb791b56afa2 |
rev | line source |
---|---|
11188
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 /* Normalization of Unicode strings. |
14079
97fc9a21a8fb
maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents:
12559
diff
changeset
|
2 Copyright (C) 2009-2011 Free Software Foundation, Inc. |
11188
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 Written by Bruno Haible <bruno@clisp.org>, 2009. |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
5 This program is free software: you can redistribute it and/or modify it |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 under the terms of the GNU Lesser General Public License as published |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 by the Free Software Foundation; either version 3 of the License, or |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 (at your option) any later version. |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 This program is distributed in the hope that it will be useful, |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 Lesser General Public License for more details. |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public License |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
17 |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 #include <stddef.h> |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 #include "unitypes.h" |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
22 /* Complete definition of normalization form descriptor. */ |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 struct unicode_normalization_form |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 { |
11200 | 25 /* Bit mask containing meta-information. |
26 This must be the first field. */ | |
11188
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
27 unsigned int description; |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 #define NF_IS_COMPAT_DECOMPOSING (1 << 0) |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 #define NF_IS_COMPOSING (1 << 1) |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 /* Function that decomposes a Unicode character. */ |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
31 int (*decomposer) (ucs4_t uc, ucs4_t *decomposition); |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
32 /* Function that combines two Unicode characters, a starter and another |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
33 character. */ |
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
34 ucs4_t (*composer) (ucs4_t uc1, ucs4_t uc2); |
11280
6f6a66491611
New module 'uninorm/decomposing-form'.
Bruno Haible <bruno@clisp.org>
parents:
11200
diff
changeset
|
35 /* Decomposing variant. */ |
6f6a66491611
New module 'uninorm/decomposing-form'.
Bruno Haible <bruno@clisp.org>
parents:
11200
diff
changeset
|
36 const struct unicode_normalization_form *decomposing_variant; |
11188
44ff96171fda
New module 'uninorm/u8-normalize'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
37 }; |