Mercurial > gnulib
annotate lib/unicase/u16-toupper.c @ 11311:db6302d3ac3c
New module 'unicase/u16-toupper'.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 08 Mar 2009 14:28:11 +0100 |
parents | |
children | 89abd81242f3 |
rev | line source |
---|---|
11311
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 /* Uppercase mapping for UTF-16 strings (locale dependent). |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
2 Copyright (C) 2009 Free Software Foundation, Inc. |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 Written by Bruno Haible <bruno@clisp.org>, 2009. |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
5 This program is free software: you can redistribute it and/or modify it |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 under the terms of the GNU Lesser General Public License as published |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 by the Free Software Foundation; either version 3 of the License, or |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 (at your option) any later version. |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 This program is distributed in the hope that it will be useful, |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 Lesser General Public License for more details. |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public License |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
17 |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 #include <config.h> |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 /* Specification. */ |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 #include "unicase.h" |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
22 |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 #include <stddef.h> |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 #include "unicasemap.h" |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 #include "special-casing.h" |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
27 |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 uint16_t * |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 u16_toupper (const uint16_t *s, size_t n, const char *iso639_language, |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 uninorm_t nf, |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
31 uint16_t *resultbuf, size_t *lengthp) |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
32 { |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
33 return u16_casemap (s, n, iso639_language, |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
34 uc_toupper, offsetof (struct special_casing_rule, upper[0]), |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
35 nf, |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
36 resultbuf, lengthp); |
db6302d3ac3c
New module 'unicase/u16-toupper'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
37 } |