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