summaryrefslogtreecommitdiff
path: root/lib/libc/gen
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-08-16 05:58:20 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-08-16 05:58:20 +0000
commitf05fcbde99fa90c9381a79e10b7eb349aaa4491c (patch)
tree86f1216757c402c623a86d5cd1578e71de5371ae /lib/libc/gen
parentbce570d08083523723a1c79a5ec46cbbd09ea90e (diff)
Document _toupper(3) and _tolower(3) and mention XPG4.2.
Diffstat (limited to 'lib/libc/gen')
-rw-r--r--lib/libc/gen/tolower.336
-rw-r--r--lib/libc/gen/toupper.336
2 files changed, 53 insertions, 19 deletions
diff --git a/lib/libc/gen/tolower.3 b/lib/libc/gen/tolower.3
index e3320397980..d1de787b368 100644
--- a/lib/libc/gen/tolower.3
+++ b/lib/libc/gen/tolower.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tolower.3,v 1.3 1996/11/02 00:12:57 deraadt Exp $
+.\" $OpenBSD: tolower.3,v 1.4 1997/08/16 05:58:19 millert Exp $
.\"
.\" Copyright (c) 1989, 1991 The Regents of the University of California.
.\" All rights reserved.
@@ -35,26 +35,39 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd June 29, 1991
+.Dd August 15, 1997
.Dt TOLOWER 3
.Os
.Sh NAME
-.Nm tolower
+.Nm tolower ,
+.Nm _tolower
.Nd upper case to lower case letter conversion
.Sh SYNOPSIS
.Fd #include <ctype.h>
.Ft int
.Fn tolower "int c"
+.Ft int
+.Fn _tolower "int c"
.Sh DESCRIPTION
The
.Fn tolower
function converts an upper-case letter to the corresponding lower-case
-letter.
+letter. The
+.Fn _tolower
+function is identical to
+.Fn tolower
+except that
+.Ar c
+must be an upper-case letter.
.Sh RETURN VALUES
-If the argument is an upper-case letter, the
+If the argument to the
.Fn tolower
-function returns the corresponding lower-case letter if there is
-one; otherwise the argument is returned unchanged.
+function is an upper-case letter, the corresponding lower-case letter
+is returned if there is one; otherwise the argument is returned unchanged.
+If the argument to the
+.Fn _tolower
+function is an upper-case letter, the corresponding lower-case letter
+is returned; otherwise the output is undefined.
.\" In the
.\" .Em ``C''
.\" locale,
@@ -79,10 +92,15 @@ one; otherwise the argument is returned unchanged.
.Xr isxdigit 3 ,
.Xr toascii 3 ,
.Xr toupper 3 ,
+.Xr _toupper 3 ,
.Xr stdio 3 ,
.Xr ascii 7
.Sh STANDARDS
The
.Fn tolower
-function conforms to
-.St -ansiC .
+and
+.Fn _tolower
+functions conform to
+.St -ansiC
+and
+.St -xpg4.2 .
diff --git a/lib/libc/gen/toupper.3 b/lib/libc/gen/toupper.3
index 3b977c7e0a1..a946d953e74 100644
--- a/lib/libc/gen/toupper.3
+++ b/lib/libc/gen/toupper.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: toupper.3,v 1.5 1997/07/29 02:29:10 flipk Exp $
+.\" $OpenBSD: toupper.3,v 1.6 1997/08/16 05:58:19 millert Exp $
.\"
.\" Copyright (c) 1989, 1991 The Regents of the University of California.
.\" All rights reserved.
@@ -35,27 +35,40 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd June 29, 1991
+.Dd August 15, 1997
.Dt TOUPPER 3
.Os
.Sh NAME
-.Nm toupper
+.Nm toupper ,
+.Nm _toupper
.Nd lower case to upper case letter conversion
.Sh SYNOPSIS
.Fd #include <ctype.h>
.Ft int
.Fn toupper "int c"
+.Ft int
+.Fn _toupper "int c"
.Sh DESCRIPTION
The
.Fn toupper
-function converts a lower-case letter to the corresponding
-upper-case letter.
+function converts a lower-case letter to the corresponding
+upper-case letter. The
+.Fn _toupper
+function is identical to
+.Fn toupper
+except that
+.Ar c
+must be a lower-case letter.
.Sh RETURN VALUES
-If the argument is a lower-case letter, the
+If the argument to the
.Fn toupper
-function returns the corresponding upper-case letter if there is
-one; otherwise the argument is returned unchanged.
-.\" In the
+function is a lower-case letter, the corresponding upper-case letter
+is returned if there is one; otherwise the argument is returned unchanged.
+If the argument to the
+.Fn _toupper
+function is a lower-case letter, the corresponding upper-case letter
+is returned; otherwise the output is undefined.
+.\" In the
.\" .Em ``C''
.\" locale,
.\" .Fn toupper
@@ -79,10 +92,13 @@ one; otherwise the argument is returned unchanged.
.Xr isxdigit 3 ,
.Xr toascii 3 ,
.Xr tolower 3 ,
+.Xr _tolower 3 ,
.Xr stdio 3 ,
.Xr ascii 7
.Sh STANDARDS
The
.Fn toupper
function conforms to
-.St -ansiC .
+.St -ansiC
+and
+.St -xpg4.2 .