xref: /haiku/headers/private/libroot/wchar_private.h (revision 13581b3d2a71545960b98fefebc5225b5bf29072)
1 /*
2  * Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de>. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _LIBROOT_WCHAR_PRIVATE_H
6 #define _LIBROOT_WCHAR_PRIVATE_H
7 
8 
9 #include <BeBuild.h>
10 
11 #include <sys/cdefs.h>
12 #include <wchar.h>
13 
14 
15 __BEGIN_DECLS
16 
17 
18 extern wint_t	__btowc(int c);
19 
20 extern int		__mblen(const char *string, size_t length);
21 extern size_t 	__mbrlen(const char *s, size_t n, mbstate_t *mbState);
22 extern size_t 	__mbrtowc(wchar_t *dest, const char *src, size_t srcLength,
23 					mbstate_t *mbState);
24 extern int		__mbsinit(const mbstate_t *mbState);
25 extern size_t	__mbsnrtowcs(wchar_t *dest, const char **src, size_t srcLength,
26 					size_t destLength, mbstate_t *mbState);
27 extern size_t	__mbsrtowcs(wchar_t *dest, const char **src, size_t destLength,
28 					mbstate_t *mbState);
29 extern size_t	__mbstowcs(wchar_t *dest, const char *src, size_t destLength);
30 extern int		__mbtowc(wchar_t *dest, const char *src, size_t destLength);
31 
32 extern wchar_t	*__wcpcpy(wchar_t *dest, const wchar_t *src);
33 extern wchar_t	*__wcpncpy(wchar_t *dest, const wchar_t *src, size_t srcLength);
34 extern size_t   __wcrtomb(char *dest, wchar_t wc, mbstate_t *mbState);
35 extern int		__wcscasecmp(const wchar_t *wcs1, const wchar_t *wcs2);
36 extern int		__wcscasecmp_l(const wchar_t *wcs1, const wchar_t *wcs2,
37 					locale_t locale);
38 extern wchar_t	*__wcscat(wchar_t *dest, const wchar_t *src);
39 extern wchar_t	*__wcschr(const wchar_t *wcs, wchar_t wc);
40 extern wchar_t	*__wcschrnul(const wchar_t *wcs, wchar_t wc);
41 extern int      __wcscmp(const wchar_t *wcs1, const wchar_t *wcs2);
42 extern int      __wcscoll(const wchar_t *wcs1, const wchar_t *wcs2);
43 extern int      __wcscoll_l(const wchar_t *wcs1, const wchar_t *wcs2,
44 					locale_t locale);
45 extern wchar_t	*__wcscpy(wchar_t *dest, const wchar_t *src);
46 extern size_t	__wcscspn(const wchar_t *wcs, const wchar_t *reject);
47 extern wchar_t	*__wcsdup(const wchar_t *wcs);
48 extern size_t	__wcsftime(wchar_t *dest, size_t destLength,
49 					const wchar_t *format, const struct tm *time);
50 extern size_t	__wcslcat(wchar_t *dest, const wchar_t *src, size_t maxLength);
51 extern size_t	__wcslcpy(wchar_t *dest, const wchar_t *src, size_t maxLength);
52 extern size_t	__wcslen(const wchar_t *wcs);
53 extern int		__wcsncasecmp(const wchar_t *wcs1, const wchar_t *wcs2,
54 					size_t maxLength);
55 extern int		__wcsncasecmp_l(const wchar_t *wcs1, const wchar_t *wcs2,
56 					size_t maxLength, locale_t locale);
57 extern wchar_t 	*__wcsncat(wchar_t *dest, const wchar_t *src, size_t srcLength);
58 extern int		__wcsncmp(const wchar_t *wcs1, const wchar_t *wcs2,
59 					size_t length);
60 extern wchar_t	*__wcsncpy(wchar_t *dest, const wchar_t *src, size_t srcLength);
61 extern size_t	__wcsnlen(const wchar_t *wcs, size_t maxLength);
62 extern size_t   __wcsnrtombs(char *dest, const wchar_t **src, size_t srcLength,
63 					size_t destLength, mbstate_t *mbState);
64 extern wchar_t	*__wcspbrk(const wchar_t *wcs, const wchar_t *accept);
65 extern wchar_t	*__wcsrchr(const wchar_t *wcs, wchar_t wc);
66 extern size_t   __wcsrtombs(char *dest, const wchar_t **src, size_t destLength,
67 					mbstate_t *mbState);
68 extern size_t	__wcsspn(const wchar_t *wcs, const wchar_t *accept);
69 extern wchar_t	*__wcsstr(const wchar_t *haystack, const wchar_t *needle);
70 extern double	__wcstod(const wchar_t *wcs, wchar_t **endPtr);
71 extern float	__wcstof(const wchar_t *wcs, wchar_t **endPtr);
72 extern wchar_t	*__wcstok(wchar_t *wcs1, const wchar_t *wcs2, wchar_t **ptr);
73 extern long		__wcstol(const wchar_t *wcs, wchar_t **endPtr, int base);
74 extern long double	__wcstold(const wchar_t *wcs, wchar_t **endPtr);
75 extern long long	__wcstoll(const wchar_t *wcs, wchar_t **endPtr, int base);
76 extern unsigned long	__wcstoul(const wchar_t *wcs, wchar_t **endPtr,
77 							int base);
78 extern unsigned long long	__wcstoull(const wchar_t *wcs, wchar_t **endPtr,
79 								int base);
80 extern size_t	__wcstombs(char *string, const wchar_t *wcs, size_t maxSize);
81 extern int		__wctomb(char *string, wchar_t wc);
82 extern wchar_t	*__wcswcs(const wchar_t *haystack, const wchar_t *needle);
83 extern int		__wcswidth(const wchar_t *wcs, size_t length);
84 extern size_t	__wcsxfrm(wchar_t *dest, const wchar_t *src, size_t destLength);
85 extern size_t	__wcsxfrm_l(wchar_t *dest, const wchar_t *src, size_t destLength,
86 					locale_t locale);
87 extern int		__wctob(wint_t wc);
88 extern int		__wcwidth(wchar_t wc);
89 extern wchar_t	*__wmemchr(const wchar_t *wcs, wchar_t wc, size_t n);
90 extern int		__wmemcmp(const wchar_t *wcs1, const wchar_t *wcs2, size_t n);
91 extern wchar_t	*__wmemcpy(wchar_t *dest, const wchar_t *src, size_t n);
92 extern wchar_t	*__wmempcpy(wchar_t *dest, const wchar_t *src, size_t n);
93 extern wchar_t	*__wmemmove(wchar_t *dest, const wchar_t *src, size_t n);
94 extern wchar_t	*__wmemset(wchar_t *dest, wchar_t wc, size_t n);
95 
96 
97 __END_DECLS
98 
99 
100 #endif	// _LIBROOT_WCHAR_PRIVATE_H
101