wchar.mh
来自「开放源码的编译器open watcom 1.6.0版的源代码」· MH 代码 · 共 385 行 · 第 1/2 页
MH
385 行
/***************************************************************************
* FILE: wchar.h/cwchar (Wide character functions)
*
:include crwat.sp
*
* Description: This header is part of the C/C++ standard library. It
* declares functions and types pertaining to the use of
* wide characters.
***************************************************************************/
:segment CNAME
#ifndef _CWCHAR_INCLUDED
#define _CWCHAR_INCLUDED
#ifndef __cplusplus
#error the header cwchar requires C++
#endif
:elsesegment
#ifndef _WCHAR_H_INCLUDED
#define _WCHAR_H_INCLUDED
:endsegment
:include readonly.sp
::
:: The following somewhat long segment only appears in wchar.h.
:segment !CNAME
#ifdef __cplusplus
#include <cwchar>
// C99 types in wchar.h
using std::mbstate_t;
#ifndef _SIZE_T_DEFINED
#define _SIZE_T_DEFINED
#define _SIZE_T_DEFINED_
using std::size_t;
#endif
using std::tm; // <= Fix me?
#ifndef _WCTYPE_T_DEFINED
#define _WCTYPE_T_DEFINED
#define _WCTYPE_T_DEFINED_
using std::wint_t;
#endif
// C99 functions in wchar.h
using std::fgetwc;
using std::fgetws;
using std::fputwc;
using std::fputws;
using std::fwprintf;
using std::fwscanf;
using std::getwc;
using std::getwchar;
using std::mbrlen;
using std::mbrtowc;
using std::mbsrtowcs;
using std::putwc;
using std::putwchar;
using std::swprintf;
using std::swscanf;
using std::ungetwc;
using std::vfwprintf;
using std::vswprintf;
using std::vwprintf;
using std::vwscanf;
using std::wcrtomb;
using std::wcscat;
using std::wcschr;
using std::wcscmp;
using std::wcscoll;
using std::wcscpy;
using std::wcscspn;
using std::wcsftime;
using std::wcslen;
using std::wcsncat;
using std::wcsncmp;
using std::wcsncpy;
using std::wcspbrk;
using std::wcsrchr;
using std::wcsrtombs;
using std::wcsspn;
using std::wcsstr;
using std::wcstod;
using std::wcstok;
using std::wcstol;
using std::wcstoll;
using std::wcstoul;
using std::wcstoull;
using std::wcsxfrm;
using std::wctob;
using std::wmemchr;
using std::wmemcmp;
using std::wmemcpy;
using std::wmemmove;
using std::wmemset;
using std::wprintf;
using std::wscanf;
:include ext.sp
// C99 functions not specified for wchar.h
using std::iswalnum;
using std::iswalpha;
using std::iswascii;
using std::iswcntrl;
using std::iswdigit;
using std::iswgraph;
using std::iswlower;
using std::iswprint;
using std::iswpunct;
using std::iswspace;
using std::iswupper;
using std::iswxdigit;
using std::iswctype;
using std::wctype;
using std::towlower;
using std::towupper;
#endif
#else /* __cplusplus not defined */
:: End of segment that is only in wchar.h
:endsegment
#ifndef _COMDEF_H_INCLUDED
#include <_comdef.h>
#endif
:segment !QNX & !LINUX
#ifndef _IO_H_INCLUDED
#include <io.h>
#endif
#ifndef _STAT_H_INCLUDED
#include <sys/stat.h>
#endif
:endsegment
:segment CNAME
#ifndef _CSTDARG_INCLUDED
#include <cstdarg>
#endif
#ifndef _CSTDIO_INCLUDED
#include <cstdio>
#endif
#ifndef _CSTDLIB_INCLUDED
#include <cstdlib>
#endif
#ifndef _CTIME_INCLUDED
#include <ctime>
#endif
:elsesegment
#ifndef _STDARG_H_INCLUDED
#include <stdarg.h>
#endif
#ifndef _STDIO_H_INCLUDED
#include <stdio.h>
#endif
#ifndef _STDLIB_H_INCLUDED
#include <stdlib.h>
#endif
#ifndef _TIME_H_INCLUDED
#include <time.h>
#endif
:endsegment
:: Only need extern "C" in cwchar
:segment CNAME
:include cpluspro.sp
:endsegment
:include wchar_t.sp
:include wctypet.sp
:include sizet.sp
:segment !CNAME
:include saferpro.sp
:include errnot.sp
:include rsizet.sp
:include saferepi.sp
:endsegment
:include null.sp
:include mbmax.sp
:segment CNAME
namespace std {
:endsegment
typedef int mbstate_t;
_WCRTLINK extern wint_t btowc( int __c );
_WCRTLINK extern wint_t fgetwc( FILE *__strm );
_WCRTLINK extern wchar_t *fgetws( wchar_t *__s, int __n, FILE *__strm );
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?