U_CDECL_END
extern const UConverterSharedData _UTF16Data;
-#define IS_UTF16BE(cnv) ((cnv)->sharedData==&_UTF16BEData)
-#define IS_UTF16LE(cnv) ((cnv)->sharedData==&_UTF16LEData)
-#define IS_UTF16(cnv) ((cnv)->sharedData==&_UTF16Data || (cnv)->sharedData==&_UTF16v2Data)
+static inline bool IS_UTF16BE(const UConverter *cnv) {
+ return ((cnv)->sharedData == &_UTF16BEData);
+}
+
+static inline bool IS_UTF16LE(const UConverter *cnv) {
+ return ((cnv)->sharedData == &_UTF16LEData);
+}
+
+static inline bool IS_UTF16(const UConverter *cnv) {
+ return ((cnv)->sharedData==&_UTF16Data) || ((cnv)->sharedData == &_UTF16v2Data);
+}
U_CDECL_BEGIN
static void U_CALLCONV
#if !UCONFIG_NO_SERVICE
static icu::ICULocaleService* gService = NULL;
static icu::UInitOnce gServiceInitOnce = U_INITONCE_INITIALIZER;
-#endif
// INTERNAL - for cleanup
-
U_CDECL_BEGIN
static UBool calendar_cleanup(void) {
#if !UCONFIG_NO_SERVICE
return TRUE;
}
U_CDECL_END
+#endif
// ------------------------------------------
//
return CALTYPE_UNKNOWN;
}
+#if !UCONFIG_NO_SERVICE
+// Only used with service registration.
static UBool isStandardSupportedKeyword(const char *keyword, UErrorCode& status) {
if(U_FAILURE(status)) {
return FALSE;
return (calType != CALTYPE_UNKNOWN);
}
+// only used with service registration.
static void getCalendarKeyword(const UnicodeString &id, char *targetBuffer, int32_t targetBufferSize) {
UnicodeString calendarKeyword = UNICODE_STRING_SIMPLE("calendar=");
int32_t calKeyLen = calendarKeyword.length();
}
targetBuffer[keyLen] = 0;
}
+#endif
static ECalType getCalendarTypeForLocale(const char *locid) {
UErrorCode status = U_ZERO_ERROR;
static icu::Locale* availableLocaleList = NULL;
static int32_t availableLocaleListCount;
+#if !UCONFIG_NO_SERVICE
static icu::ICULocaleService* gService = NULL;
static icu::UInitOnce gServiceInitOnce = U_INITONCE_INITIALIZER;
+#endif
static icu::UInitOnce gAvailableLocaleListInitOnce;
/**
UnicodeString& toAppendTo,
FieldPosition& /* pos */) const
{
- int32_t startPos = toAppendTo.length();
UErrorCode status = U_ZERO_ERROR;
if (defaultRuleSet) {
format(number, *defaultRuleSet, toAppendTo, status);
*len = i+1;
}
+#if UCONFIG_NO_REGULAR_EXPRESSIONS==0 /* donot compile when no RegularExpressions are available */
static void
print(UChar* src, int32_t srcLen,const char *tagStart,const char *tagEnd, UErrorCode *status){
int32_t bufCapacity = srcLen*4;
}
}
+#endif
+
static void
printNoteElements(const UString *src, UErrorCode *status){
write_utf8_file(out, UnicodeString("\""));
}
+#if UCONFIG_NO_REGULAR_EXPRESSIONS==0 /* donot compile when no RegularExpressions are available */
static void printAttribute(const char *name, const UnicodeString value, int32_t /*len*/)
{
write_utf8_file(out, UnicodeString(" "));
write_utf8_file(out, value);
write_utf8_file(out, UnicodeString("\""));
}
+#endif
static void
printComments(struct UString *src, const char *resName, UBool printTranslate, UErrorCode *status){