[C] Refactoring for utf-8

This commit is contained in:
seleznevae
2019-08-14 22:01:57 +03:00
parent d3d3e1821c
commit 3e961b053a
19 changed files with 3532 additions and 1738 deletions

2899
lib/fort.c

File diff suppressed because it is too large Load Diff

View File

@@ -63,6 +63,10 @@ SOFTWARE.
#define FT_HAVE_WCHAR
#endif
#define FT_CONGIG_HAVE_UTF8
#if defined(FT_CONGIG_HAVE_UTF8)
#define FT_HAVE_UTF8
#endif
/*****************************************************************************
* RETURN CODES
@@ -483,8 +487,6 @@ int ft_nwrite_ln(ft_table_t *table, size_t count, const char *cell_content, ...)
/**
* Write strings from the array to the table.
*
@@ -899,6 +901,18 @@ const wchar_t *ft_to_wstring(const ft_table_t *table);
#ifdef FT_HAVE_UTF8
#define ft_u8write(table, ...)\
(ft_nu8write(table, FT_PP_NARG_(__VA_ARGS__), __VA_ARGS__))
#define ft_u8write_ln(table, ...)\
(ft_nu8write_ln(table, FT_PP_NARG_(__VA_ARGS__), __VA_ARGS__))
int ft_nu8write(ft_table_t *table, size_t n, const void *cell_content, ...);
int ft_nu8write_ln(ft_table_t *table, size_t n, const void *cell_content, ...);
const void *ft_to_u8string(const ft_table_t *table);
#endif /* FT_HAVE_UTF8 */
FT_END_DECLS
#endif /* LIBFORT_H */