[C] Made wc functions internal
This commit is contained in:
parent
256f76f5d1
commit
1d21aa0169
18
lib/fort.c
18
lib/fort.c
@ -246,10 +246,17 @@ extern fort_status_t vector_swap(vector_t *cur_vec, vector_t *mv_vec, size_t pos
|
||||
#ifndef WCWIDTH_H
|
||||
#define WCWIDTH_H
|
||||
|
||||
/* #include "fort_utils.h" */ /* Commented by amalgamation script */
|
||||
|
||||
#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 */
|
||||
|
||||
/********************************************************
|
||||
End of file "wcwidth.h"
|
||||
@ -4706,7 +4713,10 @@ clear:
|
||||
* Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
|
||||
*/
|
||||
|
||||
#include <wchar.h>
|
||||
/* #include "wcwidth.h" */ /* Commented by amalgamation script */
|
||||
|
||||
#ifdef FT_HAVE_WCHAR
|
||||
|
||||
|
||||
struct interval {
|
||||
int first;
|
||||
@ -4767,7 +4777,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" */
|
||||
@ -4852,6 +4862,7 @@ int mk_wcwidth(wchar_t ucs)
|
||||
}
|
||||
|
||||
|
||||
FT_INTERNAL
|
||||
int mk_wcswidth(const wchar_t *pwcs, size_t n)
|
||||
{
|
||||
int w, width = 0;
|
||||
@ -4864,6 +4875,7 @@ int mk_wcswidth(const wchar_t *pwcs, size_t n)
|
||||
|
||||
return width;
|
||||
}
|
||||
#endif /* FT_HAVE_WCHAR */
|
||||
|
||||
/********************************************************
|
||||
End of file "wcwidth.c"
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user