summaryrefslogtreecommitdiff
path: root/bin/ls/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ls/util.c')
-rw-r--r--bin/ls/util.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/ls/util.c b/bin/ls/util.c
index 6ba1a7e2cee..d9a0552fe04 100644
--- a/bin/ls/util.c
+++ b/bin/ls/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.16 2013/11/21 15:54:45 deraadt Exp $ */
+/* $OpenBSD: util.c,v 1.17 2015/12/01 18:36:13 schwarze Exp $ */
/* $NetBSD: util.c,v 1.12 1995/09/07 06:43:02 jtc Exp $ */
/*
@@ -45,15 +45,20 @@
#include "ls.h"
#include "extern.h"
+#ifdef SMALL
int
-putname(char *name)
+mbsprint(const char *name, int print)
{
int len;
+ if (print == 0)
+ return strlen(name);
+
for (len = 0; *name; len++, name++)
putchar((!isprint((unsigned char)*name) && f_nonprint) ? '?' : *name);
return len;
}
+#endif
void
usage(void)