Module Name:    src
Committed By:   roy
Date:           Fri Sep 26 12:59:28 UTC 2014

Modified Files:
        src/lib/libc/gen: unvis.c

Log Message:
Decode any printable characters encoded with VIS_CSTYLE so
unvis(3) works with vis.c r1.25


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/lib/libc/gen/unvis.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/gen/unvis.c
diff -u src/lib/libc/gen/unvis.c:1.41 src/lib/libc/gen/unvis.c:1.42
--- src/lib/libc/gen/unvis.c:1.41	Sat Dec 15 04:29:53 2012
+++ src/lib/libc/gen/unvis.c	Fri Sep 26 12:59:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $	*/
+/*	$NetBSD: unvis.c,v 1.42 2014/09/26 12:59:28 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.42 2014/09/26 12:59:28 roy Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -313,6 +313,12 @@ unvis(char *cp, int c, int *astate, int 
 			 */
 			*astate = SS(0, S_GROUND);
 			return UNVIS_NOCHAR;
+		default:
+			if (isgraph(c)) {
+				*cp = c;
+				*astate = SS(0, S_GROUND);
+				return UNVIS_VALID;
+			}
 		}
 		goto bad;
 

Reply via email to