|
||||
File indexing completed on 2025-01-17 09:56:14
0001 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ 0002 /* Display width functions. 0003 Copyright (C) 2001-2002, 2005, 2007, 2009-2024 Free Software Foundation, 0004 Inc. 0005 0006 This file is free software: you can redistribute it and/or modify 0007 it under the terms of the GNU Lesser General Public License as 0008 published by the Free Software Foundation; either version 2.1 of the 0009 License, or (at your option) any later version. 0010 0011 This file is distributed in the hope that it will be useful, 0012 but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0014 GNU Lesser General Public License for more details. 0015 0016 You should have received a copy of the GNU Lesser General Public License 0017 along with this program. If not, see <https://www.gnu.org/licenses/>. */ 0018 0019 #ifndef _UNIWIDTH_H 0020 #define _UNIWIDTH_H 0021 0022 #include "unitypes.h" 0023 0024 /* Get size_t. */ 0025 #include <stddef.h> 0026 0027 /* Get locale_charset() declaration. */ 0028 #include <unistring/localcharset.h> 0029 0030 #ifdef __cplusplus 0031 extern "C" { 0032 #endif 0033 0034 0035 /* Display width. */ 0036 0037 /* These functions are locale dependent. The encoding argument identifies 0038 the encoding (e.g. "ISO-8859-2" for Polish). */ 0039 0040 /* Determine number of column positions required for UC. */ 0041 extern int 0042 uc_width (ucs4_t uc, const char *encoding) 0043 _UC_ATTRIBUTE_PURE; 0044 0045 /* Determine number of column positions required for first N units 0046 (or fewer if S ends before this) in S. */ 0047 extern int 0048 u8_width (const uint8_t *s, size_t n, const char *encoding) 0049 _UC_ATTRIBUTE_PURE; 0050 extern int 0051 u16_width (const uint16_t *s, size_t n, const char *encoding) 0052 _UC_ATTRIBUTE_PURE; 0053 extern int 0054 u32_width (const uint32_t *s, size_t n, const char *encoding) 0055 _UC_ATTRIBUTE_PURE; 0056 0057 /* Determine number of column positions required for S. */ 0058 extern int 0059 u8_strwidth (const uint8_t *s, const char *encoding) 0060 _UC_ATTRIBUTE_PURE; 0061 extern int 0062 u16_strwidth (const uint16_t *s, const char *encoding) 0063 _UC_ATTRIBUTE_PURE; 0064 extern int 0065 u32_strwidth (const uint32_t *s, const char *encoding) 0066 _UC_ATTRIBUTE_PURE; 0067 0068 0069 #ifdef __cplusplus 0070 } 0071 #endif 0072 0073 #endif /* _UNIWIDTH_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |