Module Name: src
Committed By: christos
Date: Sun Apr 23 01:58:48 UTC 2017
Modified Files:
src/lib/libc/gen: vis.3 vis.c
Log Message:
Add VIS_DQ (for OpenBSD compat)
To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/lib/libc/gen/vis.3
cvs rdiff -u -r1.72 -r1.73 src/lib/libc/gen/vis.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/vis.3
diff -u src/lib/libc/gen/vis.3:1.45 src/lib/libc/gen/vis.3:1.46
--- src/lib/libc/gen/vis.3:1.45 Wed Jun 8 11:00:04 2016
+++ src/lib/libc/gen/vis.3 Sat Apr 22 21:58:48 2017
@@ -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 @@ except space, tab, and newline are encod
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 ( * ,
Index: src/lib/libc/gen/vis.c
diff -u src/lib/libc/gen/vis.c:1.72 src/lib/libc/gen/vis.c:1.73
--- src/lib/libc/gen/vis.c:1.72 Sun Feb 12 17:37:49 2017
+++ src/lib/libc/gen/vis.c Sat Apr 22 21:58:48 2017
@@ -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 @@ makeextralist(int flags, const char *src
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';