Don't call ReadArgs() if started from WB.
[tangerine.git] / compiler / clib / include / wchar.h
blob5c6110a37dfba4c6a41091f67b4a3fdaf06be2d3
1 #ifndef _WCHAR_H_
2 #define _WCHAR_H_
3 /*
4 Copyright © 1995-2002, The AROS Development Team. All rights reserved.
5 $Id$
7 Standard C Library: Extended multibyte and wide character utilities.
8 */
10 #include <sys/_types.h>
11 #include <sys/cdefs.h>
13 #define __need_size_t
14 #define __need_wchar_t
15 #define __need_wint_t
16 #define __need_NULL
17 #include <stddef.h>
18 #include <stdarg.h>
20 #include <stdint.h>
22 /* FreeBSD 5.x headers do not define wchar_t */
23 #ifndef wint_t
24 typedef unsigned int wint_t;
25 #endif
27 __BEGIN_DECLS
29 /* Users are not allowed to access this type. */
30 typedef union
32 char _mbs[32];
33 int64_t _mbs_align;
34 } mbstate_t;
36 struct tm;
38 #define WCHAR_MIN (-__WCHAR_MAX__ - 1l)
39 #define WCHAR_MAX __WCHAR_MAX__
41 #ifndef WEOF
42 #define WEOF ((wint_t)-1)
43 #endif
45 /* wchar.h should not include stdio.h */
46 struct __sFILE;
49 /* Formatted wide-character input/output functions */
50 int fwprintf(struct __sFILE * restrict stream,
51 const wchar_t * restrict format, ...);
52 int fwscanf(struct __sFILE * restrict stream,
53 const wchar_t * restrict format, ...);
54 int swprintf(wchar_t * restrict s, size_t n,
55 const wchar_t * restrict format, ...);
56 int swscanf(const wchar_t * restrict s,
57 const wchar_t * restrict format, ...);
58 int vfwprintf(struct __sFILE * restrict stream,
59 const wchar_t * restrict format, va_list arg);
60 int vfwscanf(struct __sFILE * restrict stream,
61 const wchar_t * restrict format, va_list arg);
62 int vswprintf(wchar_t * restrict s, size_t n,
63 const wchar_t * restrict format, va_list arg);
64 int vswscanf(const wchar_t * restrict s,
65 const wchar_t * restrict format, va_list arg);
66 int vwprintf(const wchar_t * restrict format,
67 va_list arg);
68 int vwscanf(const wchar_t * restrict format,
69 va_list arg);
70 int wprintf(const wchar_t * restrict format, ...);
71 int wscanf(const wchar_t * restrict format, ...);
73 /* Wide-character input/output functions. */
74 wint_t fgetwc(struct __sFILE *stream);
75 wchar_t *fgetws(wchar_t * restrict s,
76 int n, struct __sFILE * restrict stream);
77 wint_t fputwc(wchar_t c, struct __sFILE *stream);
78 int fputws(const wchar_t * restrict s,
79 struct __sFILE * restrict stream);
80 int fwide(struct __sFILE *stream, int mode);
81 wint_t getwc(struct __sFILE *stream);
82 wint_t getwchar(void);
83 wint_t putwc(wchar_t c, struct __sFILE *stream);
84 wint_t putwchar(wchar_t c);
85 wint_t ungetwc(wint_t c, struct __sFILE *stream);
87 /* General wide-string utilities */
88 double wcstod(const wchar_t * restrict nptr,
89 wchar_t ** restrict endptr);
90 float wcstof(const wchar_t * restrict nptr,
91 wchar_t ** restrict endptr);
92 #if C99
93 long double wcstold(const wchar_t * restrict nptr,
94 wchar_t ** restrict endptr);
95 #endif
97 long int wcstol(const wchar_t * restrict nptr,
98 wchar_t ** restrict endptr, int base);
99 unsigned long int wcstoul(const wchar_t * restrict nptr,
100 wchar_t ** restrict endptr,
101 int base);
102 #if C99
103 long long int wcstoll(const wchar_t * restrict nptr,
104 wchar_t ** restrict endptr, int base);
105 unsigned long long int wcstoull(const wchar_t * restrict nptr,
106 wchar_t ** restrict endptr, int base);
107 #endif
109 wchar_t *wcscat(wchar_t * restrict s1, const wchar_t * restrict s2);
110 wchar_t *wcsncat(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n);
111 int wcscmp(const wchar_t *s1, const wchar_t *s2);
112 int wcscoll(const wchar_t *s1, const wchar_t *s2);
113 int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n);
114 size_t wcsxfrm(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n);
115 wchar_t *wcschr(const wchar_t *s, wchar_t c);
116 size_t wcscspn(const wchar_t *s1, const wchar_t *s2);
117 size_t wcslen(const wchar_t *s);
118 wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2);
119 wchar_t *wcsrchr(const wchar_t *s, wchar_t c);
120 size_t wcsspn(const wchar_t *s1, const wchar_t *s2);
121 wchar_t *wcsstr(const wchar_t *s1, const wchar_t *s2);
122 wchar_t *wcstok(wchar_t * restrict s1, const wchar_t * restrict s2,
123 wchar_t ** restrict ptr);
124 wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n);
125 int wmemcmp(const wchar_t * s1, const wchar_t * s2, size_t n);
126 wchar_t *wmemcpy(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n);
127 wchar_t *wmemmove(wchar_t *s1, const wchar_t *s2, size_t n);
128 wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n);
130 /* Wide-character time conversion utilities */
131 size_t wcsftime(wchar_t * restrict s, size_t maxsize,
132 const wchar_t * restrict format,
133 const struct tm * restrict timeptr);
135 /* Extended multibyte and wide character utilities */
136 wint_t btowc(int c);
137 int wctob(wint_t c);
138 int mbsinit(const mbstate_t *ps);
139 size_t mbrlen(const char * restrict s, size_t n, mbstate_t * restrict ps);
140 size_t mbrtowc(wchar_t * restrict pwc, const char * restrict s, size_t n,
141 mbstate_t * restrict ps);
142 size_t wcrtomb(char * restrict s, wchar_t wc, mbstate_t * restrict ps);
143 size_t mbsrtowcs(wchar_t * restrict dst, const char ** restrict src,
144 size_t len, mbstate_t * restrict ps);
145 size_t wcsrtombs(char * restrict dst, const wchar_t ** restrict src,
146 size_t len, mbstate_t * restrict ps);
148 __END_DECLS
150 #endif /* _WCHAR_T_ */