summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/lineedit.c2
-rw-r--r--libbb/printable_string.c7
-rw-r--r--libbb/unicode.c2
3 files changed, 8 insertions, 3 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index d5e92e8..b1e971f 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1086,7 +1086,7 @@ static void showfiles(void)
);
}
if (ENABLE_UNICODE_SUPPORT)
- puts(printable_string(NULL, matches[n]));
+ puts(printable_string(matches[n]));
else
puts(matches[n]);
}
diff --git a/libbb/printable_string.c b/libbb/printable_string.c
index 077d58d..a814fd0 100644
--- a/libbb/printable_string.c
+++ b/libbb/printable_string.c
@@ -9,7 +9,7 @@
#include "libbb.h"
#include "unicode.h"
-const char* FAST_FUNC printable_string(uni_stat_t *stats, const char *str)
+const char* FAST_FUNC printable_string2(uni_stat_t *stats, const char *str)
{
char *dst;
const char *s;
@@ -55,3 +55,8 @@ const char* FAST_FUNC printable_string(uni_stat_t *stats, const char *str)
#endif
return auto_string(dst);
}
+
+const char* FAST_FUNC printable_string(const char *str)
+{
+ return printable_string2(NULL, str);
+}
diff --git a/libbb/unicode.c b/libbb/unicode.c
index d378175..89d4217 100644
--- a/libbb/unicode.c
+++ b/libbb/unicode.c
@@ -996,7 +996,7 @@ size_t FAST_FUNC unicode_strlen(const char *string)
size_t FAST_FUNC unicode_strwidth(const char *string)
{
uni_stat_t uni_stat;
- printable_string(&uni_stat, string);
+ printable_string2(&uni_stat, string);
return uni_stat.unicode_width;
}