Thread (24 messages) 24 messages, 2 authors, 2025-03-23

Re: [PATCH v1] man/man3/strtoul.3: BUGS: Signed numbers are not rejected

From: Bruno Haible <hidden>
Date: 2025-03-21 21:31:48

Alejandro Colomar wrote:
This is one of the patches I will apply after your report.  Please
review.
Looks good to me, except for one line in the sample:
+	if (!isxdigit((unsigned char) *s))
For a general base, this should be

          if (!isalnum((unsigned char) *s))

For base <= 16, it can be simplified to

          if (!isxdigit((unsigned char) *s))

For base <= 10, it can be simplified to

          if (!isdigit((unsigned char) *s))

Bruno


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help