.\" 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.
.\" SUCH DAMAGE.
.\"
.\" @(#)digittoint.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/locale/digittoint.3,v 1.2 2002/03/18 15:44:27 ru Exp $
+.\" $FreeBSD: src/lib/libc/locale/digittoint.3,v 1.6 2009/09/04 07:44:58 des Exp $
.\"
.Dd April 6, 2001
.Dt DIGITTOINT 3
.Os
.Sh NAME
-.Nm digittoint
+.Nm digittoint ,
+.Nm digittoint_l
.Nd convert a numeric character to its integer value
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
.In ctype.h
.Ft int
-.Fn digittoint "int c"
+.Fo digittoint
+.Fa "int c"
+.Fc
+.In xlocale.h
+.In ctype.h
+.Ft int
+.Fo digittoint_l
+.Fa "int c"
+.Fa "locale_t loc"
+.Fc
.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.
+.Pp
+While the
+.Fn digittoint
+function uses the current locale, the
+.Fn digittoint_l
+function may be passed a locale directly. See
+.Xr xlocale 3
+for more information.
.Sh RETURN VALUES
The
.Fn digittoint
.Xr isxdigit 3 ,
the function will return 0.
.Sh SEE ALSO
-.Xr isalnum 3 ,
-.Xr isalpha 3 ,
-.Xr isascii 3 ,
-.Xr iscntrl 3 ,
+.Xr ctype 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 tolower 3 ,
-.Xr toupper 3 ,
-.Xr ascii 7
+.Xr xlocale 3