PSP2SDK  dirty-f9e4f2d
The free SDK for PSP2
include/wchar.h
00001 /*
00002  *
00003  * Copyright (C) 2015 PSP2SDK Project
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  *
00009  * This file is modified for PSP2 by PSP2SDK Team
00010  */
00011 
00012 #ifndef _WCHAR_H_
00013 #define _WCHAR_H_
00014 
00015 #include <_ansi.h>
00016 
00017 #define __need_size_t
00018 #define __need_wchar_t
00019 #define __need_wint_t
00020 #define __need_NULL
00021 #include <stddef.h>
00022 
00023 #define __need___va_list
00024 #include <stdarg.h>
00025 
00026 /* For _mbstate_t definition. */
00027 #include <sys/_types.h>
00028 #include <sys/cdefs.h>
00029 /* For __STDC_ISO_10646__ */
00030 #include <sys/features.h>
00031 
00032 #ifndef WEOF
00033 # define WEOF ((wint_t)-1)
00034 #endif
00035 
00036 /* This must match definition in <stdint.h> */
00037 #ifndef WCHAR_MIN
00038 #ifdef __WCHAR_MIN__
00039 #define WCHAR_MIN __WCHAR_MIN__
00040 #elif defined(__WCHAR_UNSIGNED__) || (L'\0' - 1 > 0)
00041 #define WCHAR_MIN (0 + L'\0')
00042 #else
00043 #define WCHAR_MIN (-0x7fffffff - 1 + L'\0')
00044 #endif
00045 #endif
00046 
00047 /* This must match definition in <stdint.h> */
00048 #ifndef WCHAR_MAX
00049 #ifdef __WCHAR_MAX__
00050 #define WCHAR_MAX __WCHAR_MAX__
00051 #elif defined(__WCHAR_UNSIGNED__) || (L'\0' - 1 > 0)
00052 #define WCHAR_MAX (0xffffffffu + L'\0')
00053 #else
00054 #define WCHAR_MAX (0x7fffffff + L'\0')
00055 #endif
00056 #endif
00057 
00058 _BEGIN_STD_C
00059 
00060 typedef struct __FILE FILE;
00061 
00062 /* As required by POSIX.1-2008, declare tm as incomplete type.
00063    The actual definition is in time.h. */
00064 struct tm;
00065 
00066 #ifndef _MBSTATE_T
00067 #define _MBSTATE_T
00068 typedef _mbstate_t mbstate_t;
00069 #endif /* _MBSTATE_T */
00070 
00071 wint_t  _EXFUN(btowc, (int));
00072 int _EXFUN(wctob, (wint_t));
00073 size_t  _EXFUN(mbrlen, (const char *__restrict, size_t, mbstate_t *__restrict));
00074 size_t  _EXFUN(mbrtowc, (wchar_t *__restrict, const char *__restrict, size_t,
00075                         mbstate_t *__restrict));
00076 int _EXFUN(mbsinit, (const mbstate_t *));
00077 size_t  _EXFUN(mbsnrtowcs, (wchar_t *__restrict, const char **__restrict,
00078                 size_t, size_t, mbstate_t *__restrict));
00079 size_t  _EXFUN(mbsrtowcs, (wchar_t *__restrict, const char **__restrict, size_t,
00080                 mbstate_t *__restrict));
00081 size_t  _EXFUN(wcrtomb, (char *__restrict, wchar_t, mbstate_t *__restrict));
00082 size_t  _EXFUN(wcsnrtombs, (char *__restrict, const wchar_t **__restrict,
00083                 size_t, size_t, mbstate_t *__restrict));
00084 size_t  _EXFUN(wcsrtombs, (char *__restrict, const wchar_t **__restrict,
00085                 size_t, mbstate_t *__restrict));
00086 int _EXFUN(wcscasecmp, (const wchar_t *, const wchar_t *));
00087 wchar_t *_EXFUN(wcscat, (wchar_t *__restrict, const wchar_t *__restrict));
00088 wchar_t *_EXFUN(wcschr, (const wchar_t *, wchar_t));
00089 int _EXFUN(wcscmp, (const wchar_t *, const wchar_t *));
00090 int _EXFUN(wcscoll, (const wchar_t *, const wchar_t *));
00091 wchar_t *_EXFUN(wcscpy, (wchar_t *__restrict, const wchar_t *__restrict));
00092 wchar_t *_EXFUN(wcpcpy, (wchar_t *__restrict,
00093                  const wchar_t *__restrict));
00094 wchar_t *_EXFUN(wcsdup, (const wchar_t *));
00095 size_t  _EXFUN(wcscspn, (const wchar_t *, const wchar_t *));
00096 size_t  _EXFUN(wcsftime, (wchar_t *__restrict, size_t,
00097                 const wchar_t *__restrict, const struct tm *__restrict));
00098 size_t  _EXFUN(wcslcat, (wchar_t *, const wchar_t *, size_t));
00099 size_t  _EXFUN(wcslcpy, (wchar_t *, const wchar_t *, size_t));
00100 size_t  _EXFUN(wcslen, (const wchar_t *));
00101 int _EXFUN(wcsncasecmp, (const wchar_t *, const wchar_t *, size_t));
00102 wchar_t *_EXFUN(wcsncat, (wchar_t *__restrict,
00103                  const wchar_t *__restrict, size_t));
00104 int _EXFUN(wcsncmp, (const wchar_t *, const wchar_t *, size_t));
00105 wchar_t *_EXFUN(wcsncpy, (wchar_t *__restrict,
00106                  const wchar_t *__restrict, size_t));
00107 wchar_t *_EXFUN(wcpncpy, (wchar_t *__restrict,
00108                  const wchar_t *__restrict, size_t));
00109 size_t  _EXFUN(wcsnlen, (const wchar_t *, size_t));
00110 wchar_t *_EXFUN(wcspbrk, (const wchar_t *, const wchar_t *));
00111 wchar_t *_EXFUN(wcsrchr, (const wchar_t *, wchar_t));
00112 size_t  _EXFUN(wcsspn, (const wchar_t *, const wchar_t *));
00113 wchar_t *_EXFUN(wcsstr, (const wchar_t *__restrict,
00114                  const wchar_t *__restrict));
00115 wchar_t *_EXFUN(wcstok, (wchar_t *__restrict, const wchar_t *__restrict,
00116                  wchar_t **__restrict));
00117 double _EXFUN(wcstod, (const wchar_t *__restrict, wchar_t **__restrict));
00118 float _EXFUN(wcstof, (const wchar_t *__restrict, wchar_t **__restrict));
00119 int _EXFUN(wcswidth, (const wchar_t *, size_t));
00120 size_t  _EXFUN(wcsxfrm, (wchar_t *__restrict, const wchar_t *__restrict,
00121                 size_t));
00122 int _EXFUN(wcwidth, (const wchar_t));
00123 wchar_t *_EXFUN(wmemchr, (const wchar_t *, wchar_t, size_t));
00124 int _EXFUN(wmemcmp, (const wchar_t *, const wchar_t *, size_t));
00125 wchar_t *_EXFUN(wmemcpy, (wchar_t *__restrict, const wchar_t *__restrict,
00126                  size_t));
00127 wchar_t *_EXFUN(wmemmove, (wchar_t *, const wchar_t *, size_t));
00128 wchar_t *_EXFUN(wmemset, (wchar_t *, wchar_t, size_t));
00129 
00130 long    _EXFUN(wcstol, (const wchar_t *__restrict, wchar_t **__restrict, int));
00131 long long _EXFUN(wcstoll, (const wchar_t *__restrict, wchar_t **__restrict,
00132                   int));
00133 unsigned long _EXFUN(wcstoul, (const wchar_t *__restrict, wchar_t **__restrict,
00134                       int));
00135 unsigned long long _EXFUN(wcstoull, (const wchar_t *__restrict,
00136                            wchar_t **__restrict, int));
00137 /* On platforms where long double equals double.  */
00138 #ifdef _LDBL_EQ_DBL
00139 long double _EXFUN(wcstold, (const wchar_t *, wchar_t **));
00140 #endif /* _LDBL_EQ_DBL */
00141 
00142 wint_t _EXFUN(fgetwc, (FILE *));
00143 wchar_t *_EXFUN(fgetws, (wchar_t *__restrict, int, FILE *__restrict));
00144 wint_t _EXFUN(fputwc, (wchar_t, FILE *));
00145 int _EXFUN(fputws, (const wchar_t *__restrict, FILE *__restrict));
00146 int _EXFUN (fwide, (FILE *, int));
00147 wint_t _EXFUN (getwc, (FILE *));
00148 wint_t _EXFUN (getwchar, (void));
00149 wint_t _EXFUN(putwc, (wchar_t, FILE *));
00150 wint_t _EXFUN(putwchar, (wchar_t));
00151 wint_t _EXFUN (ungetwc, (wint_t wc, FILE *));
00152 
00153 FILE *_EXFUN (open_wmemstream, (wchar_t **, size_t *));
00154 
00155 #ifndef __VALIST
00156 #ifdef __GNUC__
00157 #define __VALIST __gnuc_va_list
00158 #else
00159 #define __VALIST char*
00160 #endif
00161 #endif
00162 
00163 int _EXFUN(fwprintf, (FILE *__restrict, const wchar_t *__restrict, ...));
00164 int _EXFUN(swprintf, (wchar_t *__restrict, size_t,
00165             const wchar_t *__restrict, ...));
00166 int _EXFUN(vfwprintf, (FILE *__restrict, const wchar_t *__restrict,
00167             __VALIST));
00168 int _EXFUN(vswprintf, (wchar_t *__restrict, size_t,
00169             const wchar_t *__restrict, __VALIST));
00170 int _EXFUN(vwprintf, (const wchar_t *__restrict, __VALIST));
00171 int _EXFUN(wprintf, (const wchar_t *__restrict, ...));
00172 
00173 int _EXFUN(fwscanf, (FILE *__restrict, const wchar_t *__restrict, ...));
00174 int _EXFUN(swscanf, (const wchar_t *__restrict,
00175             const wchar_t *__restrict, ...));
00176 int _EXFUN(vfwscanf, (FILE *__restrict, const wchar_t *__restrict,
00177             __VALIST));
00178 int _EXFUN(vswscanf, (const wchar_t *__restrict, const wchar_t *__restrict,
00179             __VALIST));
00180 int _EXFUN(vwscanf, (const wchar_t *__restrict, __VALIST));
00181 int _EXFUN(wscanf, (const wchar_t *__restrict, ...));
00182 
00183 extern FILE _Stdin, _Stdout;
00184 
00185 #define getwc(fp)   fgetwc(fp)
00186 #define putwc(wc,fp)    fputwc((wc), (fp))
00187 #define getwchar()  fgetwc(&_Stdin)
00188 #define putwchar(wc)    fputwc((wc), &_Stdout)
00189 
00190 _END_STD_C
00191 
00192 #endif /* _WCHAR_H_ */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines