add ext4,vfat and tar.bz2
[u-tools.git] / u-tools / apps / tar / gnu / uniwidth.in.h
blob1a01e2cf734bf4cf16b32f65175c44096fa58e06
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,
5 Inc.
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/>. */
20 #ifndef _UNIWIDTH_H
21 #define _UNIWIDTH_H
23 #include "unitypes.h"
25 /* Get size_t. */
26 #include <stddef.h>
28 /* Get locale_charset() declaration. */
29 #include "localcharset.h"
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
36 /* Display width. */
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. */
42 extern int
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. */
47 extern int
48 u8_width (const uint8_t *s, size_t n, const char *encoding);
49 extern int
50 u16_width (const uint16_t *s, size_t n, const char *encoding);
51 extern int
52 u32_width (const uint32_t *s, size_t n, const char *encoding);
54 /* Determine number of column positions required for S. */
55 extern int
56 u8_strwidth (const uint8_t *s, const char *encoding);
57 extern int
58 u16_strwidth (const uint16_t *s, const char *encoding);
59 extern int
60 u32_strwidth (const uint32_t *s, const char *encoding);
63 #ifdef __cplusplus
65 #endif
67 #endif /* _UNIWIDTH_H */