Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/gen Add VIS_DQ (for OpenBSD compat)



details:   https://anonhg.NetBSD.org/src/rev/4cc1568be2ea
branches:  trunk
changeset: 823445:4cc1568be2ea
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Apr 23 01:58:48 2017 +0000

description:
Add VIS_DQ (for OpenBSD compat)

diffstat:

 lib/libc/gen/vis.3 |  6 ++++--
 lib/libc/gen/vis.c |  5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diffs (53 lines):

diff -r 8adde4eac815 -r 4cc1568be2ea lib/libc/gen/vis.3
--- a/lib/libc/gen/vis.3        Sun Apr 23 01:57:36 2017 +0000
+++ b/lib/libc/gen/vis.3        Sun Apr 23 01:58:48 2017 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: vis.3,v 1.45 2016/06/08 15:00:04 wiz Exp $
+.\"    $NetBSD: vis.3,v 1.46 2017/04/23 01:58:48 christos Exp $
 .\"
 .\" Copyright (c) 1989, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)vis.3      8.1 (Berkeley) 6/9/93
 .\"
-.Dd January 14, 2015
+.Dd April 22, 2017
 .Dt VIS 3
 .Os
 .Sh NAME
@@ -242,6 +242,8 @@
 The following flags
 alter this:
 .Bl -tag -width VIS_WHITEX
+.It Dv VIS_DW
+Also encode double quotes
 .It Dv VIS_GLOB
 Also encode the magic characters
 .Ql ( * ,
diff -r 8adde4eac815 -r 4cc1568be2ea lib/libc/gen/vis.c
--- a/lib/libc/gen/vis.c        Sun Apr 23 01:57:36 2017 +0000
+++ b/lib/libc/gen/vis.c        Sun Apr 23 01:58:48 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vis.c,v 1.72 2017/02/12 22:37:49 christos Exp $        */
+/*     $NetBSD: vis.c,v 1.73 2017/04/23 01:58:48 christos Exp $        */
 
 /*-
  * Copyright (c) 1989, 1993
@@ -57,7 +57,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: vis.c,v 1.72 2017/02/12 22:37:49 christos Exp $");
+__RCSID("$NetBSD: vis.c,v 1.73 2017/04/23 01:58:48 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 #ifdef __FBSDID
 __FBSDID("$FreeBSD$");
@@ -377,6 +377,7 @@
        if (flags & VIS_SP) *d++ = L' ';
        if (flags & VIS_TAB) *d++ = L'\t';
        if (flags & VIS_NL) *d++ = L'\n';
+       if (flags & VIS_DQ) *d++ = L'"';
        if ((flags & VIS_NOSLASH) == 0) *d++ = L'\\';
        *d = L'\0';
 



Home | Main Index | Thread Index | Old Index