aboutsummaryrefslogtreecommitdiff
path: root/contrib/libc-vis/unvis.c
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2016-06-08 18:21:27 +0000
committerBrooks Davis <brooks@FreeBSD.org>2016-06-08 18:21:27 +0000
commit8dfeba04eb36ced9343a0a924e18160d46b1fbca (patch)
tree3f99fb00dc2d55e5794e0ab55e71c9906fbad569 /contrib/libc-vis/unvis.c
parent63d5b568152cc18c3ba1e637a857c3e022cb2513 (diff)
parent46f0e7ccdfb34f49b0cc1de7d00c1429a00f1ff3 (diff)
downloadsrc-8dfeba04eb36ced9343a0a924e18160d46b1fbca.tar.gz
src-8dfeba04eb36ced9343a0a924e18160d46b1fbca.zip
Update to a June 8th snapshot of (un)vis form NetBSD.
This adds stravis() and some new encoding flags VIS_SHELL, VIS_META, and VIS_NOLOCALE. Assorted cleanups and fixes includeing a manpage typo[0]. PR: 210013 [0] Submitted by: pi [0]
Notes
Notes: svn path=/head/; revision=301679
Diffstat (limited to 'contrib/libc-vis/unvis.c')
-rw-r--r--contrib/libc-vis/unvis.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/contrib/libc-vis/unvis.c b/contrib/libc-vis/unvis.c
index 9cf112c0f31b..d96d231be96e 100644
--- a/contrib/libc-vis/unvis.c
+++ b/contrib/libc-vis/unvis.c
@@ -1,4 +1,4 @@
-/* $NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $ */
+/* $NetBSD: unvis.c,v 1.44 2014/09/26 15:43:36 roy Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $");
+__RCSID("$NetBSD: unvis.c,v 1.44 2014/09/26 15:43:36 roy Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
__FBSDID("$FreeBSD$");
@@ -322,6 +322,12 @@ unvis(char *cp, int c, int *astate, int flag)
*/
*astate = SS(0, S_GROUND);
return UNVIS_NOCHAR;
+ default:
+ if (isgraph(c)) {
+ *cp = c;
+ *astate = SS(0, S_GROUND);
+ return UNVIS_VALID;
+ }
}
goto bad;