annotate lib/uniwidth.in.h @ 16358:a712776b11ce

maint: spelling fixes
author Paul Eggert <eggert@cs.ucla.edu>
date Sun, 05 Feb 2012 13:42:03 -0800
parents 8250f2777afc
children 079fb1e73828
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13354
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Display width functions.
16201
8250f2777afc maint: update all copyright year number ranges
Jim Meyering <meyering@redhat.com>
parents: 16128
diff changeset
2 Copyright (C) 2001-2002, 2005, 2007, 2009-2012 Free Software Foundation,
13354
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 Inc.
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 This program is free software: you can redistribute it and/or modify it
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 under the terms of the GNU Lesser General Public License as published
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 by the Free Software Foundation; either version 3 of the License, or
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 (at your option) any later version.
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 Lesser General Public License for more details.
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public License
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 #ifndef _UNIWIDTH_H
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 #define _UNIWIDTH_H
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 #include "unitypes.h"
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 /* Get size_t. */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 #include <stddef.h>
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 /* Get locale_charset() declaration. */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 #include "localcharset.h"
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 #ifdef __cplusplus
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 extern "C" {
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 #endif
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 /* Display width. */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 /* These functions are locale dependent. The encoding argument identifies
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 the encoding (e.g. "ISO-8859-2" for Polish). */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 /* Determine number of column positions required for UC. */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 extern int
16128
6beadb731202 mark functions with const and pure attributes
Jim Meyering <meyering@redhat.com>
parents: 14079
diff changeset
41 uc_width (ucs4_t uc, const char *encoding)
6beadb731202 mark functions with const and pure attributes
Jim Meyering <meyering@redhat.com>
parents: 14079
diff changeset
42 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
6beadb731202 mark functions with const and pure attributes
Jim Meyering <meyering@redhat.com>
parents: 14079
diff changeset
43 __attribute__ ((__pure__))
6beadb731202 mark functions with const and pure attributes
Jim Meyering <meyering@redhat.com>
parents: 14079
diff changeset
44 #endif
6beadb731202 mark functions with const and pure attributes
Jim Meyering <meyering@redhat.com>
parents: 14079
diff changeset
45 ;
13354
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 /* Determine number of column positions required for first N units
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 (or fewer if S ends before this) in S. */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 extern int
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 u8_width (const uint8_t *s, size_t n, const char *encoding);
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 extern int
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 u16_width (const uint16_t *s, size_t n, const char *encoding);
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 extern int
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 u32_width (const uint32_t *s, size_t n, const char *encoding);
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 /* Determine number of column positions required for S. */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 extern int
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58 u8_strwidth (const uint8_t *s, const char *encoding);
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59 extern int
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 u16_strwidth (const uint16_t *s, const char *encoding);
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 extern int
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 u32_strwidth (const uint32_t *s, const char *encoding);
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
65 #ifdef __cplusplus
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66 }
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 #endif
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 #endif /* _UNIWIDTH_H */