summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenys Vlasenko2010-01-30 23:16:21 +0100
committerDenys Vlasenko2010-01-30 23:16:21 +0100
commite17764c8fb566f85020217dd8fd05fb6bc227e98 (patch)
treecf0a42cc23cd4aae92e69924087610a941c712a4 /include
parentecd90fd488cd0c519070656f5cfa0b0959979be9 (diff)
downloadbusybox-e17764c8fb566f85020217dd8fd05fb6bc227e98.zip
busybox-e17764c8fb566f85020217dd8fd05fb6bc227e98.tar.gz
further work on unicodization
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r--include/unicode.h16
1 files changed, 13 insertions, 3 deletions
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