From e17764c8fb566f85020217dd8fd05fb6bc227e98 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 30 Jan 2010 23:16:21 +0100 Subject: further work on unicodization Signed-off-by: Denys Vlasenko --- include/unicode.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/unicode.h b/include/unicode.h index f1a252c..f32e565 100644 --- a/include/unicode.h +++ b/include/unicode.h @@ -14,15 +14,25 @@ enum { #if !ENABLE_FEATURE_ASSUME_UNICODE # define unicode_strlen(string) strlen(string) -# define unicode_scrlen(string) TODO # define unicode_status UNICODE_OFF # define init_unicode() ((void)0) #else size_t FAST_FUNC unicode_strlen(const char *string); -char* FAST_FUNC unicode_cut_nchars(unsigned width, const char *src); -unsigned FAST_FUNC unicode_padding_to_width(unsigned width, const char *src); +enum { + UNI_FLAG_PAD = (1 << 0), +}; +typedef struct uni_stat_t { + unsigned byte_count; + unsigned unicode_count; + unsigned unicode_width; +} uni_stat_t; +//UNUSED: unsigned FAST_FUNC unicode_padding_to_width(unsigned width, const char *src); +//UNUSED: char* FAST_FUNC unicode_conv_to_printable2(uni_stat_t *stats, const char *src, unsigned width, int flags); +char* FAST_FUNC unicode_conv_to_printable(uni_stat_t *stats, const char *src); +char* FAST_FUNC unicode_conv_to_printable_maxwidth(uni_stat_t *stats, const char *src, unsigned maxwidth); +char* FAST_FUNC unicode_conv_to_printable_fixedwidth(uni_stat_t *stats, const char *src, unsigned width); # if ENABLE_LOCALE_SUPPORT -- cgit v1.1