diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-06-03 19:37:27 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-06-03 19:37:27 +0000 |
commit | 3f16fcb30ab9865cb5cddb215da34842e1b8b5fe (patch) | |
tree | 5383aeac462d172c979aa17dd3391ad5ab11f1e2 /util.c | |
parent | 2faec76afad7f1a2e4096d04d1d894dcfb646cbf (diff) | |
download | rtmux-3f16fcb30ab9865cb5cddb215da34842e1b8b5fe.tar.gz rtmux-3f16fcb30ab9865cb5cddb215da34842e1b8b5fe.tar.bz2 rtmux-3f16fcb30ab9865cb5cddb215da34842e1b8b5fe.zip |
Use vis(3) instead of handrolled function.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 20 |
1 files changed, 0 insertions, 20 deletions
@@ -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'; -} |