]> git.saurik.com Git - apple/icu.git/blob - icuSources/common/cwchar.h
ICU-6.2.22.tar.gz
[apple/icu.git] / icuSources / common / cwchar.h
1 /*
2 ******************************************************************************
3 *
4 * Copyright (C) 2001, International Business Machines
5 * Corporation and others. All Rights Reserved.
6 *
7 ******************************************************************************
8 * file name: cwchar.h
9 * encoding: US-ASCII
10 * tab size: 8 (not used)
11 * indentation:4
12 *
13 * created on: 2001may25
14 * created by: Markus W. Scherer
15 *
16 * This file contains ICU-internal definitions of wchar_t operations.
17 * These definitions were moved here from cstring.h so that fewer
18 * ICU implementation files include wchar.h.
19 */
20
21 #ifndef __CWCHAR_H__
22 #define __CWCHAR_H__
23
24 #include <string.h>
25 #include <stdlib.h>
26 #include "unicode/utypes.h"
27
28 /* Do this after utypes.h so that we have U_HAVE_WCHAR_H . */
29 #if U_HAVE_WCHAR_H
30 # include <wchar.h>
31 #endif
32
33 /*===========================================================================*/
34 /* Wide-character functions */
35 /*===========================================================================*/
36
37 /* The following are not available on all systems, defined in wchar.h or string.h. */
38 #if U_HAVE_WCSCPY
39 # define uprv_wcscpy wcscpy
40 # define uprv_wcscat wcscat
41 # define uprv_wcslen wcslen
42 #else
43 U_CAPI wchar_t* U_EXPORT2
44 uprv_wcscpy(wchar_t *dst, const wchar_t *src);
45 U_CAPI wchar_t* U_EXPORT2
46 uprv_wcscat(wchar_t *dst, const wchar_t *src);
47 U_CAPI size_t U_EXPORT2
48 uprv_wcslen(const wchar_t *src);
49 #endif
50
51 /* The following are part of the ANSI C standard, defined in stdlib.h . */
52 #define uprv_wcstombs(mbstr, wcstr, count) U_STANDARD_CPP_NAMESPACE wcstombs(mbstr, wcstr, count)
53 #define uprv_mbstowcs(wcstr, mbstr, count) U_STANDARD_CPP_NAMESPACE mbstowcs(wcstr, mbstr, count)
54
55
56 #endif