/* * macunicode.h * MSUAM * * Created by mconrad on Fri Nov 16 2001 * Copyright (c) 2001 Microsoft Corp. All rights reserved. * */ #ifndef __MACUNICODE__ #define __MACUNICODE__ #ifdef SSP_TARGET_CARBON #include #else #include #include #include #endif #include #include #define CALC_UNICODE_CSTRING_LENGTH(s) ((strlen(s) * sizeof(UniChar)) + sizeof(UniChar)) #define CALC_UNICODE_PSTRING_LENGTH(s) ((s[0] * sizeof(UniChar)) + sizeof(UniChar)) #ifdef __cplusplus extern "C" { #endif OSStatus MacSspCStringToUnicode( IN PCSTR cString, OUT UInt16* unicodeLen, OUT UniCharArrayPtr* unicodeString ); OSStatus MacSspUnicodeToWindowsCString( IN UniCharArrayPtr unicodeString, IN UInt32 unicodeLen, IN UInt32 cStringBufferLen, OUT PCHAR cString ); OSStatus MacSspPStringToUnicode( IN Str255 PString, OUT UInt16* unicodeLen, OUT UniCharArrayPtr* unicodeString ); OSStatus MacSspGetCurrentTextEncoding( OUT TextEncoding* currentEncoding ); #ifdef __cplusplus } #endif #endif //__MACUNICODE__