.\" 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.
.\"
.\" @(#)isdigit.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/locale/isdigit.3,v 1.16 2002/10/06 10:15:38 tjr Exp $
+.\" $FreeBSD: src/lib/libc/locale/isdigit.3,v 1.25 2009/09/04 07:44:58 des Exp $
.\"
-.Dd October 6, 2002
+.Dd May 4, 2007
.Dt ISDIGIT 3
.Os
.Sh NAME
.Sh DESCRIPTION
The
.Fn isdigit
-function tests for any decimal-digit character.
-For any locale,
-this includes the following characters only:
+function tests for a decimal digit character.
+Regardless of locale, this includes the following characters only:
.Pp
.Bl -column \&``0''______ \&``0''______ \&``0''______ \&``0''______ \&``0''______
.It "\&``0''\t``1''\t``2''\t``3''\t``4''"
.It "\&``5''\t``6''\t``7''\t``8''\t``9''"
.El
.Pp
-For single C
-.Va char Ns s
-locales (see
-.Xr multibyte 3 )
-the value of the argument is
-representable as an
-.Li unsigned char
+The
+.Fn isnumber
+function behaves similarly to
+.Fn isdigit ,
+but may recognize additional characters, depending on the current locale
+setting.
+.Pp
+The value of the argument must be representable as an
+.Vt "unsigned char"
or the value of
.Dv EOF .
.Sh RETURN VALUES
The
.Fn isdigit
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
+and
+.Fn isnumber
+functions return zero if the character tests false and
+return non-zero if the character tests true.
.Sh COMPATIBILITY
-Although
-.Fn isdigit
-accepts arguments outside of the range of the
-.Vt "unsigned char"
-type in locales with large character sets,
-this is a
+The
.Bx 4.4
-extension and the
+extension of accepting arguments outside of the range of the
+.Vt "unsigned char"
+type in locales with large character sets is considered obsolete
+and may not be supported in future releases.
+The
.Fn iswdigit
-function should be used instead for maximum portability.
+function should be used instead.
.Sh SEE ALSO
.Xr ctype 3 ,
+.Xr isalnum_l 3 ,
.Xr iswdigit 3 ,
.Xr multibyte 3 ,
.Xr ascii 7
.Fn isdigit
function conforms to
.St -isoC .
+.Sh HISTORY
+The
+.Fn isnumber
+function appeared in
+.Bx 4.4 .