1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* Display width functions.
4 Copyright (C) 2001-2002, 2005, 2007, 2009-2011 Free Software Foundation,
7 This program is free software: you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published
9 by the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
28 /* Get locale_charset() declaration. */
29 #include "localcharset.h"
38 /* These functions are locale dependent. The encoding argument identifies
39 the encoding (e.g. "ISO-8859-2" for Polish). */
41 /* Determine number of column positions required for UC. */
43 uc_width (ucs4_t uc
, const char *encoding
);
45 /* Determine number of column positions required for first N units
46 (or fewer if S ends before this) in S. */
48 u8_width (const uint8_t *s
, size_t n
, const char *encoding
);
50 u16_width (const uint16_t *s
, size_t n
, const char *encoding
);
52 u32_width (const uint32_t *s
, size_t n
, const char *encoding
);
54 /* Determine number of column positions required for S. */
56 u8_strwidth (const uint8_t *s
, const char *encoding
);
58 u16_strwidth (const uint16_t *s
, const char *encoding
);
60 u32_strwidth (const uint32_t *s
, const char *encoding
);
67 #endif /* _UNIWIDTH_H */