Loading...
--- Libc/Libc-320/gen/FreeBSD/vis.3
+++ Libc/Libc-825.26/gen/FreeBSD/vis.3
@@ -9,10 +9,6 @@
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
@@ -30,9 +26,9 @@
.\" SUCH DAMAGE.
.\"
.\" From: @(#)vis.3 8.1 (Berkeley) 6/9/93
-.\" $FreeBSD: src/lib/libc/gen/vis.3,v 1.20 2002/12/19 09:40:21 ru Exp $
+.\" $FreeBSD: src/lib/libc/gen/vis.3,v 1.30 2007/01/09 00:27:56 imp Exp $
.\"
-.Dd July 25, 1996
+.Dd April 9, 2006
.Dt VIS 3
.Os
.Sh NAME
@@ -58,9 +54,11 @@
.Fa c .
If
.Fa c
-needs no encoding, it is copied in unaltered. The string is
+needs no encoding, it is copied in unaltered.
+The string is
null terminated, and a pointer to the end of the string is
-returned. The maximum length of any encoding is four
+returned.
+The maximum length of any encoding is four
characters (not including the trailing
.Dv NUL ) ;
thus, when
@@ -137,6 +135,15 @@
The following flags
alter this:
.Bl -tag -width VIS_WHITEX
+.It Dv VIS_GLOB
+Also encode magic characters
+.Ql ( * ,
+.Ql \&? ,
+.Ql \&[
+and
+.Ql # )
+recognized by
+.Xr glob 3 .
.It Dv VIS_SP
Also encode space.
.It Dv VIS_TAB
@@ -151,9 +158,11 @@
\&|
.Dv VIS_NL .
.It Dv VIS_SAFE
-Only encode "unsafe" characters. Unsafe means control
+Only encode "unsafe" characters.
+Unsafe means control
characters which may cause common terminals to perform
-unexpected functions. Currently this form allows space,
+unexpected functions.
+Currently this form allows space,
tab, newline, backspace, bell, and return - in addition
to all graphic characters - unencoded.
.El
@@ -169,7 +178,7 @@
Use an
.Ql M
to represent meta characters (characters with the 8th
-bit set), and use carat
+bit set), and use caret
.Ql ^
to represent control characters see
.Pf ( Xr iscntrl 3 ) .
@@ -218,16 +227,27 @@
Use C-style backslash sequences to represent standard non-printable
characters.
The following sequences are used to represent the indicated characters:
-.Bd -unfilled -offset indent
-.Li \ea Tn - BEL No (007)
-.Li \eb Tn - BS No (010)
-.Li \ef Tn - NP No (014)
-.Li \en Tn - NL No (012)
-.Li \er Tn - CR No (015)
-.Li \et Tn - HT No (011)
-.Li \ev Tn - VT No (013)
-.Li \e0 Tn - NUL No (000)
-.Ed
+.Pp
+.Bl -tag -width ".Li \e0" -offset indent -compact
+.It Li \ea
+.Dv BEL No (007)
+.It Li \eb
+.Dv BS No (010)
+.It Li \ef
+.Dv NP No (014)
+.It Li \en
+.Dv NL No (012)
+.It Li \er
+.Dv CR No (015)
+.It Li \es
+.Dv SP No (040)
+.It Li \et
+.Dv HT No (011)
+.It Li \ev
+.Dv VT No (013)
+.It Li \e0
+.Dv NUL No (000)
+.El
.Pp
When using this format, the
.Fa nextc
@@ -250,7 +270,8 @@
.Ar d
represents a hexadecimal digit.
.It Dv VIS_OCTAL
-Use a three digit octal sequence. The form is
+Use a three digit octal sequence.
+The form is
.Ql \eddd
where
.Ar d
@@ -279,3 +300,9 @@
.Sh HISTORY
These functions first appeared in
.Bx 4.4 .
+.Sh BUGS
+The
+.Nm
+family of functions do not recognize multibyte characters, and thus
+may consider them to be non-printable when they are in fact printable
+(and vice versa.)