diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-18 01:55:00 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-18 01:55:00 +0100 |
commit | 9c3b84a3049a152dd6a2b9e3aecaf897f57ac28e (patch) | |
tree | 97a510f4effe3a9d074db41c0996b8e74b216811 /include/unicode.h | |
parent | b972f949577301bd7a66e88c11b9e26431d80a11 (diff) | |
download | busybox-w32-9c3b84a3049a152dd6a2b9e3aecaf897f57ac28e.tar.gz busybox-w32-9c3b84a3049a152dd6a2b9e3aecaf897f57ac28e.tar.bz2 busybox-w32-9c3b84a3049a152dd6a2b9e3aecaf897f57ac28e.zip |
ls: make it so that group never glues itself to file size
+ smaller enhancements: inode is long long; -h is a bit narrower; etc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include/unicode.h')
-rw-r--r-- | include/unicode.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/unicode.h b/include/unicode.h index 9f27657df..e11f2f9da 100644 --- a/include/unicode.h +++ b/include/unicode.h | |||
@@ -65,8 +65,30 @@ int iswspace(wint_t wc) FAST_FUNC; | |||
65 | int iswalnum(wint_t wc) FAST_FUNC; | 65 | int iswalnum(wint_t wc) FAST_FUNC; |
66 | int iswpunct(wint_t wc) FAST_FUNC; | 66 | int iswpunct(wint_t wc) FAST_FUNC; |
67 | 67 | ||
68 | |||
68 | # endif /* !LOCALE_SUPPORT */ | 69 | # endif /* !LOCALE_SUPPORT */ |
69 | 70 | ||
71 | |||
72 | # if 0 /* TODO: better support for printfing Unicode fields: */ | ||
73 | |||
74 | /* equivalent to printf("%-20.20s", str) */ | ||
75 | char unicode_buffer[20 * MB_CUR_MAX]; | ||
76 | printf("%s", unicode_exact(20, str, unicode_buffer); | ||
77 | /* no need to free() anything */ | ||
78 | |||
79 | /* equivalent to printf("%-20s", str) */ | ||
80 | char *malloced = unicode_minimum(20, str); | ||
81 | printf("%s", malloced); | ||
82 | free(malloced); /* ugh */ | ||
83 | |||
84 | /* equivalent to printf("%-20s", str), better one */ | ||
85 | printf("%s%*s", str, unicode_pad_to_width(str, 20), ""); | ||
86 | /* equivalent to printf("%20s", str) */ | ||
87 | printf("%*s%s", unicode_pad_to_width(str, 20), "", str); | ||
88 | |||
89 | # endif | ||
90 | |||
91 | |||
70 | #endif /* FEATURE_ASSUME_UNICODE */ | 92 | #endif /* FEATURE_ASSUME_UNICODE */ |
71 | 93 | ||
72 | #endif | 94 | #endif |