summaryrefslogtreecommitdiff
path: root/lib/libc/gen/vis.3
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>1999-06-04 01:30:13 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>1999-06-04 01:30:13 +0000
commit67797a0990e5f662d6d5a45d57b8df9621d9b446 (patch)
treed4f372c14f4e8c1daa17a45d570dc51ad209fa3b /lib/libc/gen/vis.3
parentbed33d97a346af66478a7c10a123af07e1608056 (diff)
After some constructive criticism from pjanzen@ and some e-mail tag:
- only use the .Dv NULL form when referring explicitly to a function argument or return value - otherwise, use these forms: o non-null o null-terminated (hyphenated form for predicate adjective) o else, null terminated, or null terminate, whichever the case o null pointer, null byte, null string, etc. - may use NUL to refer to an ASCII NUL, but it doesn't need a .Tn macro In general, capitalizing the word "null" everywhere is unnecessary and makes the man pages harder to read. The above is consistent with popular programming texts (i.e., K&R, Stevens).
Diffstat (limited to 'lib/libc/gen/vis.3')
-rw-r--r--lib/libc/gen/vis.321
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/libc/gen/vis.3 b/lib/libc/gen/vis.3
index 663355c95d3..aa2de9df014 100644
--- a/lib/libc/gen/vis.3
+++ b/lib/libc/gen/vis.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: vis.3,v 1.6 1999/05/29 22:38:37 aaron Exp $
+.\" $OpenBSD: vis.3,v 1.7 1999/06/04 01:30:12 aaron Exp $
.\"
.\" Copyright (c) 1989, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -58,14 +58,16 @@ a string which represents the character
If
.Fa c
needs no encoding, it is copied in unaltered. The string is
-NUL-terminated and a pointer to the end of the string is
+null terminated and a pointer to the end of the string is
returned. The maximum length of any encoding is four
characters (not including the trailing NUL);
thus, when
encoding a set of characters into a buffer, the size of the buffer should
be four times the number of characters encoded, plus one for the trailing
NUL.
-The flag parameter is used for altering the default range of
+The
+.Fa flag
+parameter is used for altering the default range of
characters considered for encoding and for altering the visual
representation.
The additional character,
@@ -95,8 +97,8 @@ function encodes exactly
characters from
.Fa src
(this
-is useful for encoding a block of data that may contain NUls).
-Both forms NUL-terminate
+is useful for encoding a block of data that may contain NULs).
+Both forms null terminate
.Fa dst .
The size of
.Fa dst
@@ -105,8 +107,9 @@ of characters encoded from
.Fa src
(plus one for the NUL).
Both
-forms return the number of characters in dst (not including
-the trailing NUL.
+forms return the number of characters in
+.Fa dst
+(not including the trailing NUL).
.Pp
The encoding is a unique, invertible representation composed entirely of
graphic characters; it can be decoded back into the original form using
@@ -220,7 +223,9 @@ The following sequences are used to represent the indicated characters:
.Li \e0 Tn - NUL No (000)
.Ed
.Pp
-When using this format, the nextc parameter is looked at to determine
+When using this format, the
+.Fa nextc
+parameter is looked at to determine
if a NUL character can be encoded as
.Ql \e0
instead of