diff options
author | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
---|---|---|
committer | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
commit | e611b132f9b8abe35b362e5870b74bce94a1e58e (patch) | |
tree | a5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/crt32/convert/_wctype.c | |
download | NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2 NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip |
Diffstat (limited to 'private/crt32/convert/_wctype.c')
-rw-r--r-- | private/crt32/convert/_wctype.c | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/private/crt32/convert/_wctype.c b/private/crt32/convert/_wctype.c new file mode 100644 index 000000000..989d1a2a3 --- /dev/null +++ b/private/crt32/convert/_wctype.c @@ -0,0 +1,140 @@ +/*** +*_wctype.c - function versions of wctype macros +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file provides function versions of the wide character +* classification and conversion macros in ctype.h. +* +*Revision History: +* 10-11-91 ETC Created from _ctype.c +* 12-08-91 ETC Surround with #ifdef _INTL +* 04-06-92 KRS Remove _INTL rwitches again +* 10-26-92 GJF Cleaned up a bit. +* +*******************************************************************************/ + +/*** +*wctype - Function versions of wctype macros +* +*Purpose: +* Function versions of the wide char macros in ctype.h, +* including isleadbyte and iswascii. In order to define +* these, we use a trick -- we undefine the macro so we can use the +* name in the function declaration, then re-include the file so +* we can use the macro in the definition part. +* +* Functions defined: +* iswalpha iswupper iswlower +* iswdigit iswxdigit iswspace +* iswpunct iswalnum iswprint +* iswgraph iswctrl iswascii +* isleadbyte +* +*Entry: +* wchar_t c = character to be tested +*Exit: +* returns non-zero = character is of the requested type +* 0 = character is NOT of the requested type +* +*Exceptions: +* None. +* +*******************************************************************************/ + +#include <cruntime.h> +#define __STDC__ 1 +#include <stdlib.h> +#include <ctype.h> + +int (_CRTAPI1 isleadbyte) ( + int c + ) +{ + return isleadbyte(c); +} + +int (_CRTAPI1 iswalpha) ( + wchar_t c + ) +{ + return iswalpha(c); +} + +int (_CRTAPI1 iswupper) ( + wchar_t c + ) +{ + return iswupper(c); +} + +int (_CRTAPI1 iswlower) ( + wchar_t c + ) +{ + return iswlower(c); +} + +int (_CRTAPI1 iswdigit) ( + wchar_t c + ) +{ + return iswdigit(c); +} + +int (_CRTAPI1 iswxdigit) ( + wchar_t c + ) +{ + return iswxdigit(c); +} + +int (_CRTAPI1 iswspace) ( + wchar_t c + ) +{ + return iswspace(c); +} + +int (_CRTAPI1 iswpunct) ( + wchar_t c + ) +{ + return iswpunct(c); +} + +int (_CRTAPI1 iswalnum) ( + wchar_t c + ) +{ + return iswalnum(c); +} + +int (_CRTAPI1 iswprint) ( + wchar_t c + ) +{ + return iswprint(c); +} + +int (_CRTAPI1 iswgraph) ( + wchar_t c + ) +{ + return iswgraph(c); +} + +int (_CRTAPI1 iswcntrl) ( + wchar_t c + ) +{ + return iswcntrl(c); +} + +int (_CRTAPI1 iswascii) ( + wchar_t c + ) +{ + return iswascii(c); +} |