Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/gen Decode any printable characters encoded with VI...



details:   https://anonhg.NetBSD.org/src/rev/3e371f2c11ee
branches:  trunk
changeset: 332523:3e371f2c11ee
user:      roy <roy%NetBSD.org@localhost>
date:      Fri Sep 26 12:59:28 2014 +0000

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

diffstat:

 lib/libc/gen/unvis.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 2d8f0c13750a -r 3e371f2c11ee lib/libc/gen/unvis.c
--- a/lib/libc/gen/unvis.c      Fri Sep 26 11:04:06 2014 +0000
+++ b/lib/libc/gen/unvis.c      Fri Sep 26 12:59:28 2014 +0000
@@ -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 @@
                         */
                        *astate = SS(0, S_GROUND);
                        return UNVIS_NOCHAR;
+               default:
+                       if (isgraph(c)) {
+                               *cp = c;
+                               *astate = SS(0, S_GROUND);
+                               return UNVIS_VALID;
+                       }
                }
                goto bad;
 



Home | Main Index | Thread Index | Old Index