Debian Codegraph @

mingw-w64-crt/ctype/iswprint.c

raw
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6
7 #define _CTYPE_DISABLE_MACROS
8 #include <wctype.h>
9
10 /**
11 * Calls to `iswprint (L'\t')` return inconsistent results depending on CRT
12 * and active locale.
13 *
14 * In all CRTs up to msvcrt.dll version 6.1, it returns zero in "C" locale
15 * and non-zero otherwise.
16 *
17 * Since msvcr70.dll up to msvcr110.dll, it always returns non-zero;
18 * OS-specific versions of msvcrt.dll follow this behavior.
19 *
20 * In msvcr120.dll and UCRT, it always returns zero.
21 */
22
23 int __cdecl iswprint (wint_t _C) {
24 /**
25 * mingw-w64's `iswctype` is a wrapper around CRT's `iswctype` which
26 * properly handles TAB character.
27 */
28 return iswctype (_C, _ALPHA | _BLANK | _DIGIT | _PUNCT);
29 }
30
31 int (__cdecl *__MINGW_IMP_SYMBOL(iswprint))(wint_t) = iswprint;