Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handy.h: Add wrapper layer macros for isalnum() ...
This adds a new set of macros, forming a lower layer to what is currently there to wrap the character classification libc functions, isdigit() etc, and case changing ones, tolower(), toupper(). On most platforms these expand simply to the libc function call. But on windows, they expand to something more complex, to bring the Windows calls into POSIX compliance. Previously that was achieved at the higher level, with the result that lower level calls were broken. This resulted in parts of the test suite being skipped on Windows. The current level is rewritten to use the new lower layer, with the result that it is simpler, as the complexity is now done further down. I thought about calling these macros is_porcelain_isalnum or something similar to emphaisze that they are close to the bare libc version, but thought isU8_alnum() is shorter and conveys another truth, that being the input is assumed to be a byte, without checking.
- Loading branch information
1 parent
ef4975e
commit f3b64ef
Showing
1 changed file
with
59 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters