Blame lib/uniwidth.in.h

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