aboutsummaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/util.c b/util.c
index 1455214a..5c871ca1 100644
--- a/util.c
+++ b/util.c
@@ -50,23 +50,3 @@ section_string(char *buf, size_t len, size_t sectoff, size_t sectlen)
(int) (last - first), buf + first, last == len ? "" : "...");
return (s);
}
-
-/* Clean string of invisible characters. */
-void
-clean_string(const char *in, char *buf, size_t len)
-{
- const u_char *cp;
- size_t off;
-
- off = 0;
- for (cp = in; *cp != '\0'; cp++) {
- if (off >= len)
- break;
- if (*cp >= 0x20 && *cp <= 0x7f)
- buf[off++] = *cp;
- else
- off += xsnprintf(buf + off, len - off, "\\%03hho", *cp);
- }
- if (off < len)
- buf[off] = '\0';
-}