diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-30 23:16:21 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-30 23:16:21 +0100 |
commit | e17764c8fb566f85020217dd8fd05fb6bc227e98 (patch) | |
tree | cf0a42cc23cd4aae92e69924087610a941c712a4 /networking | |
parent | ecd90fd488cd0c519070656f5cfa0b0959979be9 (diff) | |
download | busybox-w32-e17764c8fb566f85020217dd8fd05fb6bc227e98.tar.gz busybox-w32-e17764c8fb566f85020217dd8fd05fb6bc227e98.tar.bz2 busybox-w32-e17764c8fb566f85020217dd8fd05fb6bc227e98.zip |
further work on unicodization
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/udhcp/dumpleases.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index d8f5da7fb..eab9713f4 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c | |||
@@ -71,8 +71,11 @@ int dumpleases_main(int argc UNUSED_PARAM, char **argv) | |||
71 | /* actually, 15+1 and 19+1, +1 is a space between columns */ | 71 | /* actually, 15+1 and 19+1, +1 is a space between columns */ |
72 | /* lease.hostname is char[20] and is always NUL terminated */ | 72 | /* lease.hostname is char[20] and is always NUL terminated */ |
73 | #if ENABLE_FEATURE_ASSUME_UNICODE | 73 | #if ENABLE_FEATURE_ASSUME_UNICODE |
74 | printf(" %-16s%s%*s", inet_ntoa(addr), lease.hostname, | 74 | { |
75 | 20 - (int)unicode_strlen(lease.hostname), ""); | 75 | char *uni_name = unicode_conv_to_printable_fixedwidth(NULL, lease.hostname, 20); |
76 | printf(" %-16s%s", inet_ntoa(addr), uni_name); | ||
77 | free(uni_name); | ||
78 | } | ||
76 | #else | 79 | #else |
77 | printf(" %-16s%-20s", inet_ntoa(addr), lease.hostname); | 80 | printf(" %-16s%-20s", inet_ntoa(addr), lease.hostname); |
78 | #endif | 81 | #endif |