Blame gllib/uniwidth.in.h

rpm-build 858c0f
/* Display width functions.
rpm-build 858c0f
   Copyright (C) 2001-2002, 2005, 2007, 2009-2017 Free Software Foundation,
rpm-build 858c0f
   Inc.
rpm-build 858c0f
rpm-build 858c0f
   This program is free software: you can redistribute it and/or modify it
rpm-build 858c0f
   under the terms of the GNU General Public License as published
rpm-build 858c0f
   by the Free Software Foundation; either version 3 of the License, or
rpm-build 858c0f
   (at your option) any later version.
rpm-build 858c0f
rpm-build 858c0f
   This program is distributed in the hope that it will be useful,
rpm-build 858c0f
   but WITHOUT ANY WARRANTY; without even the implied warranty of
rpm-build 858c0f
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
rpm-build 858c0f
   General Public License for more details.
rpm-build 858c0f
rpm-build 858c0f
   You should have received a copy of the GNU General Public License
rpm-build 858c0f
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
rpm-build 858c0f
rpm-build 858c0f
#ifndef _UNIWIDTH_H
rpm-build 858c0f
#define _UNIWIDTH_H
rpm-build 858c0f
rpm-build 858c0f
#include "unitypes.h"
rpm-build 858c0f
rpm-build 858c0f
/* Get size_t.  */
rpm-build 858c0f
#include <stddef.h>
rpm-build 858c0f
rpm-build 858c0f
/* Get locale_charset() declaration.  */
rpm-build 858c0f
#include "localcharset.h"
rpm-build 858c0f
rpm-build 858c0f
#ifdef __cplusplus
rpm-build 858c0f
extern "C" {
rpm-build 858c0f
#endif
rpm-build 858c0f
rpm-build 858c0f
rpm-build 858c0f
/* Display width.  */
rpm-build 858c0f
rpm-build 858c0f
/* These functions are locale dependent.  The encoding argument identifies
rpm-build 858c0f
   the encoding (e.g. "ISO-8859-2" for Polish).  */
rpm-build 858c0f
rpm-build 858c0f
/* Determine number of column positions required for UC.  */
rpm-build 858c0f
extern int
rpm-build 858c0f
       uc_width (ucs4_t uc, const char *encoding)
rpm-build 858c0f
       _UC_ATTRIBUTE_PURE;
rpm-build 858c0f
rpm-build 858c0f
/* Determine number of column positions required for first N units
rpm-build 858c0f
   (or fewer if S ends before this) in S.  */
rpm-build 858c0f
extern int
rpm-build 858c0f
       u8_width (const uint8_t *s, size_t n, const char *encoding)
rpm-build 858c0f
       _UC_ATTRIBUTE_PURE;
rpm-build 858c0f
extern int
rpm-build 858c0f
       u16_width (const uint16_t *s, size_t n, const char *encoding)
rpm-build 858c0f
       _UC_ATTRIBUTE_PURE;
rpm-build 858c0f
extern int
rpm-build 858c0f
       u32_width (const uint32_t *s, size_t n, const char *encoding)
rpm-build 858c0f
       _UC_ATTRIBUTE_PURE;
rpm-build 858c0f
rpm-build 858c0f
/* Determine number of column positions required for S.  */
rpm-build 858c0f
extern int
rpm-build 858c0f
       u8_strwidth (const uint8_t *s, const char *encoding)
rpm-build 858c0f
       _UC_ATTRIBUTE_PURE;
rpm-build 858c0f
extern int
rpm-build 858c0f
       u16_strwidth (const uint16_t *s, const char *encoding)
rpm-build 858c0f
       _UC_ATTRIBUTE_PURE;
rpm-build 858c0f
extern int
rpm-build 858c0f
       u32_strwidth (const uint32_t *s, const char *encoding)
rpm-build 858c0f
       _UC_ATTRIBUTE_PURE;
rpm-build 858c0f
rpm-build 858c0f
rpm-build 858c0f
#ifdef __cplusplus
rpm-build 858c0f
}
rpm-build 858c0f
#endif
rpm-build 858c0f
rpm-build 858c0f
#endif /* _UNIWIDTH_H */