aboutsummaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-06-25 15:50:03 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-06-25 15:50:03 +0000
commitdff949747c6c060cb2970d2d183ef69d25066abd (patch)
treeee330f8e73a9a1783fc1d978581c7fac2d921fbc /util.c
parent7597cb68345d1ff96c34d61f73cbeba1e98484ec (diff)
downloadrtmux-dff949747c6c060cb2970d2d183ef69d25066abd.tar.gz
rtmux-dff949747c6c060cb2970d2d183ef69d25066abd.tar.bz2
rtmux-dff949747c6c060cb2970d2d183ef69d25066abd.zip
Use vis(3) instead of handrolled function.
Diffstat (limited to 'util.c')
-rw-r--r--util.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/util.c b/util.c
index 6e0763cf..65f709a1 100644
--- a/util.c
+++ b/util.c
@@ -1,4 +1,4 @@
-/* $Id: util.c,v 1.5 2009-04-30 16:24:20 nicm Exp $ */
+/* $OpenBSD: util.c,v 1.2 2009/06/03 19:37:27 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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';
-}