aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/locale
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2004-03-30 07:02:04 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2004-03-30 07:02:04 +0000
commitba6699086d058be1322bfb9cdb7a83323f0e7ef8 (patch)
tree5e5b78d3553e9abbe794f410c00dd09527be7245 /lib/libc/locale
parentdd1c7d137382f149908f30d5b4bb7046224e6063 (diff)
downloadsrc-ba6699086d058be1322bfb9cdb7a83323f0e7ef8.tar.gz
src-ba6699086d058be1322bfb9cdb7a83323f0e7ef8.zip
Document the isnumber() and ishexnumber() functions, and explain how they
differ (at least in theory) from isdigit() and isxdigit().
Notes
Notes: svn path=/head/; revision=127606
Diffstat (limited to 'lib/libc/locale')
-rw-r--r--lib/libc/locale/isdigit.323
-rw-r--r--lib/libc/locale/isxdigit.324
2 files changed, 34 insertions, 13 deletions
diff --git a/lib/libc/locale/isdigit.3 b/lib/libc/locale/isdigit.3
index bb7dd720fbf5..42503ad304c6 100644
--- a/lib/libc/locale/isdigit.3
+++ b/lib/libc/locale/isdigit.3
@@ -36,7 +36,7 @@
.\" @(#)isdigit.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd October 6, 2002
+.Dd March 30, 2004
.Dt ISDIGIT 3
.Os
.Sh NAME
@@ -53,15 +53,21 @@
.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
+The
+.Fn isnumber
+function behaves similarly to
+.Fn isdigit ,
+but may recognize additional characters, depending on the current locale
+setting.
+.Pp
For single C
.Va char Ns s
locales (see
@@ -74,7 +80,9 @@ or the value of
.Sh RETURN VALUES
The
.Fn isdigit
-function returns zero if the character tests false and
+and
+.Fn isnumber
+functions return zero if the character tests false and
returns non-zero if the character tests true.
.Sh COMPATIBILITY
Although
@@ -97,3 +105,8 @@ The
.Fn isdigit
function conforms to
.St -isoC .
+.Sh HISTORY
+The
+.Fn isnumber
+function appeared in
+.Bx 4.4 .
diff --git a/lib/libc/locale/isxdigit.3 b/lib/libc/locale/isxdigit.3
index 661b7fb947df..df5074411f15 100644
--- a/lib/libc/locale/isxdigit.3
+++ b/lib/libc/locale/isxdigit.3
@@ -36,7 +36,7 @@
.\" @(#)isxdigit.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd October 6, 2002
+.Dd March 30, 2004
.Dt ISXDIGIT 3
.Os
.Sh NAME
@@ -54,7 +54,7 @@
The
.Fn isxdigit
function tests for any hexadecimal-digit character.
-For any locale, this includes the following characters only:
+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''"
@@ -64,6 +64,13 @@ For any locale, this includes the following characters only:
.It "\&``e''\t``f''"
.El
.Pp
+The
+.Fn ishexnumber
+function behaves similarly to
+.Fn isxdigit ,
+but may recognize additional characters,
+depennding on the current locale setting.
+.Pp
For single C
.Va char Ns s
locales (see
@@ -81,18 +88,14 @@ returns non-zero if the character tests true.
.Sh COMPATIBILITY
Although
.Fn isxdigit
-and
-.Fn ishexnumber
-accept arguments outside of the range of the
+accepts arguments outside of the range of the
.Vt "unsigned char"
type in locales with large character sets,
this is a
.Bx 4.4
extension and the
.Fn isxwdigit
-and
-.Fn iswhexnumber
-functions should be used instead for maximum portability.
+function should be used instead for maximum portability.
.Sh SEE ALSO
.Xr ctype 3 ,
.Xr iswxdigit 3 ,
@@ -103,3 +106,8 @@ The
.Fn isxdigit
function conforms to
.St -isoC .
+.Sh HISTORY
+The
+.Fn ishexnumber
+function appeared in
+.Bx 4.4 .