[C] Made wc functions internal

This commit is contained in:
seleznevae
2018-08-31 20:17:10 +03:00
parent 256f76f5d1
commit 1d21aa0169
3 changed files with 30 additions and 6 deletions

View File

@@ -59,7 +59,10 @@
* Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
*/
#include <wchar.h>
#include "wcwidth.h"
#ifdef FT_HAVE_WCHAR
struct interval {
int first;
@@ -120,7 +123,7 @@ static int bisearch(wchar_t ucs, const struct interval *table, int max)
* in ISO 10646.
*/
int mk_wcwidth(wchar_t ucs)
static int mk_wcwidth(wchar_t ucs)
{
/* sorted list of non-overlapping intervals of non-spacing characters */
/* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */
@@ -205,6 +208,7 @@ int mk_wcwidth(wchar_t ucs)
}
FT_INTERNAL
int mk_wcswidth(const wchar_t *pwcs, size_t n)
{
int w, width = 0;
@@ -217,3 +221,4 @@ int mk_wcswidth(const wchar_t *pwcs, size_t n)
return width;
}
#endif /* FT_HAVE_WCHAR */

View File

@@ -1,7 +1,14 @@
#ifndef WCWIDTH_H
#define WCWIDTH_H
#include "fort_utils.h"
#ifdef FT_HAVE_WCHAR
#include <wchar.h>
FT_INTERNAL
int mk_wcswidth(const wchar_t *pwcs, size_t n);
#endif // WCWIDTH_H
#endif /* FT_HAVE_WCHAR */
#endif /* WCWIDTH_H */