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 wchar_t *__wcscat(wchar_t *dest, const wchar_t *src); 37 extern wchar_t *__wcschr(const wchar_t *wcs, wchar_t wc); 38 extern wchar_t *__wcschrnul(const wchar_t *wcs, wchar_t wc); 39 extern int __wcscmp(const wchar_t *wcs1, const wchar_t *wcs2); 40 extern int __wcscoll(const wchar_t *wcs1, const wchar_t *wcs2); 41 extern wchar_t *__wcscpy(wchar_t *dest, const wchar_t *src); 42 extern size_t __wcscspn(const wchar_t *wcs, const wchar_t *reject); 43 extern wchar_t *__wcsdup(const wchar_t *wcs); 44 extern size_t __wcsftime(wchar_t *dest, size_t destLength, 45 const wchar_t *format, const struct tm *time); 46 extern size_t __wcslcat(wchar_t *dest, const wchar_t *src, size_t maxLength); 47 extern size_t __wcslcpy(wchar_t *dest, const wchar_t *src, size_t maxLength); 48 extern size_t __wcslen(const wchar_t *wcs); 49 extern int __wcsncasecmp(const wchar_t *wcs1, const wchar_t *wcs2, 50 size_t maxLength); 51 extern wchar_t *__wcsncat(wchar_t *dest, const wchar_t *src, size_t srcLength); 52 extern int __wcsncmp(const wchar_t *wcs1, const wchar_t *wcs2, 53 size_t length); 54 extern wchar_t *__wcsncpy(wchar_t *dest, const wchar_t *src, size_t srcLength); 55 extern size_t __wcsnlen(const wchar_t *wcs, size_t maxLength); 56 extern size_t __wcsnrtombs(char *dest, const wchar_t **src, size_t srcLength, 57 size_t destLength, mbstate_t *mbState); 58 extern wchar_t *__wcspbrk(const wchar_t *wcs, const wchar_t *accept); 59 extern wchar_t *__wcsrchr(const wchar_t *wcs, wchar_t wc); 60 extern size_t __wcsrtombs(char *dest, const wchar_t **src, size_t destLength, 61 mbstate_t *mbState); 62 extern size_t __wcsspn(const wchar_t *wcs, const wchar_t *accept); 63 extern wchar_t *__wcsstr(const wchar_t *haystack, const wchar_t *needle); 64 extern double __wcstod(const wchar_t *wcs, wchar_t **endPtr); 65 extern float __wcstof(const wchar_t *wcs, wchar_t **endPtr); 66 extern wchar_t *__wcstok(wchar_t *wcs1, const wchar_t *wcs2, wchar_t **ptr); 67 extern long __wcstol(const wchar_t *wcs, wchar_t **endPtr, int base); 68 extern long double __wcstold(const wchar_t *wcs, wchar_t **endPtr); 69 extern long long __wcstoll(const wchar_t *wcs, wchar_t **endPtr, int base); 70 extern unsigned long __wcstoul(const wchar_t *wcs, wchar_t **endPtr, 71 int base); 72 extern unsigned long long __wcstoull(const wchar_t *wcs, wchar_t **endPtr, 73 int base); 74 extern size_t __wcstombs(char *string, const wchar_t *wcs, size_t maxSize); 75 extern int __wctomb(char *string, wchar_t wc); 76 extern wchar_t *__wcswcs(const wchar_t *haystack, const wchar_t *needle); 77 extern int __wcswidth(const wchar_t *wcs, size_t length); 78 extern size_t __wcsxfrm(wchar_t *dest, const wchar_t *src, size_t destLength); 79 extern int __wctob(wint_t wc); 80 extern int __wcwidth(wchar_t wc); 81 extern wchar_t *__wmemchr(const wchar_t *wcs, wchar_t wc, size_t n); 82 extern int __wmemcmp(const wchar_t *wcs1, const wchar_t *wcs2, size_t n); 83 extern wchar_t *__wmemcpy(wchar_t *dest, const wchar_t *src, size_t n); 84 extern wchar_t *__wmempcpy(wchar_t *dest, const wchar_t *src, size_t n); 85 extern wchar_t *__wmemmove(wchar_t *dest, const wchar_t *src, size_t n); 86 extern wchar_t *__wmemset(wchar_t *dest, wchar_t wc, size_t n); 87 88 89 __END_DECLS 90 91 92 #endif // _LIBROOT_WCHAR_PRIVATE_H 93