.\" 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.26 2004/07/17 12:27:25 tjr Exp $
.\"
-.Dd July 25, 1996
+.Dd March 21, 2004
.Dt VIS 3
.Os
.Sh NAME
.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
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
\&|
.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
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 ) .
.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
.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.)