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