From the PR:
1. ctype.h defines digittoint(), isnumber() and ishexnmber(), yet they are not documented in any of the manpages. 2. The ctype manpage references a non-existent manpage for digittoint(). 3. The isascii() manpage claims it is standards compliant, when it isn't. 4. isblank() claims it is _not_ standards compliant, when it is. Fix by including the appropriate .Nm entries, and with a new digittoint.3 page. PR: docs/26451 Submitted by: Adrian Filipi-Martin <adrian@ubergeeks.com>
This commit is contained in:
parent
bd6c1ea775
commit
acb209e8a4
@ -25,4 +25,6 @@ MLINKS+=rune.3 fgetrune.3 rune.3 fputrune.3 rune.3 fungetrune.3 \
|
||||
rune.3 setinvalidrune.3 rune.3 setrunelocale.3 rune.3 sgetrune.3 \
|
||||
rune.3 sputrune.3
|
||||
MLINKS+=setlocale.3 localeconv.3
|
||||
MLINKS+=isxdigit.3 ishexnumber.3
|
||||
MLINKS+=isdigit.3 isnumber.3
|
||||
.endif
|
||||
|
@ -55,6 +55,7 @@
|
||||
.Nm isspecial ,
|
||||
.Nm isupper ,
|
||||
.Nm isxdigit ,
|
||||
.Nm digittoint ,
|
||||
.Nm toascii ,
|
||||
.Nm tolower ,
|
||||
.Nm toupper
|
||||
@ -100,6 +101,8 @@
|
||||
.Ft int
|
||||
.Fn isxdigit "int c"
|
||||
.Ft int
|
||||
.Fn digittoint "int c"
|
||||
.Ft int
|
||||
.Fn toascii "int c"
|
||||
.Ft int
|
||||
.Fn tolower "int c"
|
||||
@ -126,6 +129,7 @@ See the specific manual pages for more information.
|
||||
.Xr isspace 3 ,
|
||||
.Xr isupper 3 ,
|
||||
.Xr isxdigit 3 ,
|
||||
.Xr digittoint 3 ,
|
||||
.Xr toascii 3 ,
|
||||
.Xr tolower 3 ,
|
||||
.Xr toupper 3 ,
|
||||
@ -134,7 +138,6 @@ See the specific manual pages for more information.
|
||||
These functions, except for
|
||||
.Fn digittoint ,
|
||||
.Fn isascii ,
|
||||
.Fn isblank ,
|
||||
.Fn ishexnumber ,
|
||||
.Fn isideogram ,
|
||||
.Fn isnumber ,
|
||||
@ -145,3 +148,6 @@ and
|
||||
.Fn toascii ,
|
||||
conform to
|
||||
.St -isoC .
|
||||
.Fn isblank
|
||||
conforms to
|
||||
.St -isoC-99 .
|
||||
|
76
lib/libc/locale/digittoint.3
Normal file
76
lib/libc/locale/digittoint.3
Normal file
@ -0,0 +1,76 @@
|
||||
.\" Copyright (c) 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 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.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)digittoint.3 8.1 (Berkeley) 6/4/93
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd April 6, 2001
|
||||
.Dt DIGITTOINT 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm digittoint
|
||||
.Nd convert a numeric character to its integer value
|
||||
.Sh LIBRARY
|
||||
.Lb libc
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <ctype.h>
|
||||
.Ft int
|
||||
.Fn digittoint "int c"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn digittoint
|
||||
function converts a numeric character to its corresponding integer value. The
|
||||
character can be any decimal digit or hexadecimal digit. With hexadecimal
|
||||
characters, the case of the values does not matter.
|
||||
.Sh RETURN VALUES
|
||||
The
|
||||
.Fn digittoint
|
||||
function always returns an integer from the range of 0 to 15. If the
|
||||
given character was not a digit as defined by
|
||||
.Xr isxdigit 3 , the function will return 0.
|
||||
.Sh SEE ALSO
|
||||
.Xr isalnum 3 ,
|
||||
.Xr isalpha 3 ,
|
||||
.Xr isascii 3 ,
|
||||
.Xr iscntrl 3 ,
|
||||
.Xr isdigit 3 ,
|
||||
.Xr isgraph 3 ,
|
||||
.Xr islower 3 ,
|
||||
.Xr isprint 3 ,
|
||||
.Xr ispunct 3 ,
|
||||
.Xr isspace 3 ,
|
||||
.Xr isupper 3 ,
|
||||
.Xr isxdigit 3 ,
|
||||
.Xr stdio 3 ,
|
||||
.Xr digittoint 3 ,
|
||||
.Xr tolower 3 ,
|
||||
.Xr toupper 3 ,
|
||||
.Xr ascii 7
|
@ -54,8 +54,3 @@ between 0 and octal 0177 inclusive.
|
||||
.Sh SEE ALSO
|
||||
.Xr ctype 3 ,
|
||||
.Xr ascii 7
|
||||
.Sh STANDARDS
|
||||
The
|
||||
.Fn isascii
|
||||
function conforms to
|
||||
.St -isoC .
|
||||
|
@ -76,6 +76,10 @@ returns non-zero if the character tests true.
|
||||
.Xr multibyte 3 ,
|
||||
.Xr ascii 7
|
||||
.Sh STANDARDS
|
||||
.Fn isblank
|
||||
conforms to
|
||||
.St -isoC-99 .
|
||||
.Sh STANDARDS
|
||||
The
|
||||
.Fn isblank
|
||||
function conforms to
|
||||
|
@ -40,7 +40,7 @@
|
||||
.Dt ISDIGIT 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm isdigit
|
||||
.Nm isdigit, isnumber
|
||||
.Nd decimal-digit character test
|
||||
.Sh LIBRARY
|
||||
.Lb libc
|
||||
@ -48,6 +48,8 @@
|
||||
.In ctype.h
|
||||
.Ft int
|
||||
.Fn isdigit "int c"
|
||||
.Ft int
|
||||
.Fn isnumber "int c"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn isdigit
|
||||
|
@ -40,7 +40,7 @@
|
||||
.Dt ISXDIGIT 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm isxdigit
|
||||
.Nm isxdigit, ishexnumber
|
||||
.Nd hexadecimal-digit character test
|
||||
.Sh LIBRARY
|
||||
.Lb libc
|
||||
@ -48,6 +48,8 @@
|
||||
.In ctype.h
|
||||
.Ft int
|
||||
.Fn isxdigit "int c"
|
||||
.Ft int
|
||||
.Fn ishexnumber "int c"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn isxdigit
|
||||
|
@ -54,6 +54,7 @@ The
|
||||
.Fn toascii
|
||||
function always returns a valid ASCII character.
|
||||
.Sh SEE ALSO
|
||||
.Xr digittoint 3 ,
|
||||
.Xr isalnum 3 ,
|
||||
.Xr isalpha 3 ,
|
||||
.Xr isascii 3 ,
|
||||
|
@ -68,6 +68,7 @@ If the argument is an upper-case letter, the
|
||||
function returns the corresponding lower-case letter if there is
|
||||
one; otherwise the argument is returned unchanged.
|
||||
.Sh SEE ALSO
|
||||
.Xr digittoint 3 ,
|
||||
.Xr isalnum 3 ,
|
||||
.Xr isalpha 3 ,
|
||||
.Xr isascii 3 ,
|
||||
|
@ -68,6 +68,7 @@ If the argument is a lower-case letter, the
|
||||
function returns the corresponding upper-case letter if there is
|
||||
one; otherwise the argument is returned unchanged.
|
||||
.Sh SEE ALSO
|
||||
.Xr digittoint 3 ,
|
||||
.Xr isalnum 3 ,
|
||||
.Xr isalpha 3 ,
|
||||
.Xr isascii 3 ,
|
||||
|
Loading…
Reference in New Issue
Block a user