aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/locale/isxdigit.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/locale/isxdigit.3')
-rw-r--r--lib/libc/locale/isxdigit.339
1 files changed, 29 insertions, 10 deletions
diff --git a/lib/libc/locale/isxdigit.3 b/lib/libc/locale/isxdigit.3
index 7e065a4e255a..f6c4a47b4971 100644
--- a/lib/libc/locale/isxdigit.3
+++ b/lib/libc/locale/isxdigit.3
@@ -29,15 +29,14 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)isxdigit.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD$
-.\"
-.Dd July 17, 2005
+.Dd December 19, 2022
.Dt ISXDIGIT 3
.Os
.Sh NAME
.Nm isxdigit ,
-.Nm ishexnumber
+.Nm ishexnumber ,
+.Nm isxdigit_l ,
+.Nm ishexnumber_l
.Nd hexadecimal-digit character test
.Sh LIBRARY
.Lb libc
@@ -47,10 +46,16 @@
.Fn isxdigit "int c"
.Ft int
.Fn ishexnumber "int c"
+.Ft int
+.Fn isxdigit_l "int c" "locale_t loc"
+.Ft int
+.Fn ishexnumber_l "int c" "locale_t loc"
.Sh DESCRIPTION
The
.Fn isxdigit
-function tests for any hexadecimal-digit character.
+and
+.Fn isxdigit_l
+functions test for any hexadecimal-digit character.
Regardless of locale, this includes the following characters only:
.Bl -column \&``0''______ \&``0''______ \&``0''______ \&``0''______ \&``0''______
.It "\&``0''" Ta "``1''" Ta "``2''" Ta "``3''" Ta "``4''"
@@ -62,8 +67,12 @@ Regardless of locale, this includes the following characters only:
.Pp
The
.Fn ishexnumber
-function behaves similarly to
-.Fn isxdigit ,
+and
+.Fn ishexnumber_l
+functions behave similarly to
+.Fn isxdigit
+and
+.Fn isxdigit_l ,
but may recognize additional characters,
depending on the current locale setting.
.Pp
@@ -71,11 +80,16 @@ The value of the argument must be representable as an
.Vt "unsigned char"
or the value of
.Dv EOF .
+.Pp
+The _l-suffixed versions take an explicit locale argument, whereas the
+non-suffixed versions use the current global or per-thread locale.
.Sh RETURN VALUES
The
.Fn isxdigit
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
+and
+.Fn isxdigit_l
+functions return zero if the character tests false and
+return non-zero if the character tests true.
.Sh COMPATIBILITY
The
.Bx 4.4
@@ -85,10 +99,15 @@ type in locales with large character sets is considered obsolete
and may not be supported in future releases.
The
.Fn iswxdigit
+or
+.Fn iswxdigit_l
function should be used instead.
.Sh SEE ALSO
.Xr ctype 3 ,
+.Xr ctype_l 3 ,
.Xr iswxdigit 3 ,
+.Xr iswxdigit_l 3 ,
+.Xr xlocale 3 ,
.Xr ascii 7
.Sh STANDARDS
The