ICU-5304 Allow source code to work again without using U_NAMESPACE_USE
X-SVN-Rev: 20240
This commit is contained in:
parent
0445548bae
commit
b27729b208
@ -129,7 +129,7 @@ ICULanguageBreakFactory::~ICULanguageBreakFactory() {
|
||||
U_NAMESPACE_END
|
||||
U_CDECL_BEGIN
|
||||
static void U_CALLCONV _deleteEngine(void *obj) {
|
||||
delete (const LanguageBreakEngine *) obj;
|
||||
delete (const U_NAMESPACE_QUALIFIER LanguageBreakEngine *) obj;
|
||||
}
|
||||
U_CDECL_END
|
||||
U_NAMESPACE_BEGIN
|
||||
|
@ -238,8 +238,6 @@ BreakIterator::~BreakIterator()
|
||||
//-------------------------------------------
|
||||
#if !UCONFIG_NO_SERVICE
|
||||
|
||||
static ICULocaleService* gService = NULL;
|
||||
|
||||
// -------------------------------------
|
||||
|
||||
class ICUBreakIteratorFactory : public ICUResourceBundleFactory {
|
||||
@ -283,6 +281,8 @@ U_NAMESPACE_END
|
||||
|
||||
// defined in ucln_cmn.h
|
||||
|
||||
static U_NAMESPACE_QUALIFIER ICULocaleService* gService = NULL;
|
||||
|
||||
/**
|
||||
* Release all static memory held by breakiterator.
|
||||
*/
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
|
||||
|
||||
static Locale* availableLocaleList = NULL;
|
||||
static U_NAMESPACE_QUALIFIER Locale* availableLocaleList = NULL;
|
||||
static int32_t availableLocaleListCount;
|
||||
typedef enum ELocalePos {
|
||||
eENGLISH,
|
||||
@ -76,9 +76,9 @@ U_CFUNC int32_t locale_getKeywords(const char *localeID,
|
||||
UBool valuesToo,
|
||||
UErrorCode *status);
|
||||
|
||||
static Locale *gLocaleCache = NULL;
|
||||
static const Locale *gDefaultLocale = NULL;
|
||||
static UHashtable *gDefaultLocalesHashT = NULL;
|
||||
static U_NAMESPACE_QUALIFIER Locale *gLocaleCache = NULL;
|
||||
static const U_NAMESPACE_QUALIFIER Locale *gDefaultLocale = NULL;
|
||||
static UHashtable *gDefaultLocalesHashT = NULL;
|
||||
|
||||
U_CDECL_BEGIN
|
||||
//
|
||||
@ -86,7 +86,7 @@ U_CDECL_BEGIN
|
||||
//
|
||||
static void U_CALLCONV
|
||||
deleteLocale(void *obj) {
|
||||
delete (Locale *) obj;
|
||||
delete (U_NAMESPACE_QUALIFIER Locale *) obj;
|
||||
}
|
||||
|
||||
static UBool U_CALLCONV locale_cleanup(void)
|
||||
@ -115,14 +115,11 @@ static UBool U_CALLCONV locale_cleanup(void)
|
||||
U_CDECL_END
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Locale)
|
||||
|
||||
//
|
||||
// locale_set_default_internal.
|
||||
//
|
||||
void locale_set_default_internal(const char *id)
|
||||
{
|
||||
U_NAMESPACE_USE
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UBool canonicalize = FALSE;
|
||||
|
||||
@ -218,7 +215,6 @@ void locale_set_default_internal(const char *id)
|
||||
}
|
||||
U_NAMESPACE_END
|
||||
|
||||
|
||||
/* sfb 07/21/99 */
|
||||
U_CFUNC void
|
||||
locale_set_default(const char *id)
|
||||
@ -239,6 +235,8 @@ locale_get_default(void)
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Locale)
|
||||
|
||||
/*Character separating the posix id fields*/
|
||||
// '_'
|
||||
// In the platform codepage.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2005, International Business Machines Corporation and *
|
||||
* Copyright (C) 2002-2006, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*
|
||||
@ -20,7 +20,7 @@
|
||||
#include "umutex.h"
|
||||
|
||||
// see LocaleUtility::getAvailableLocaleNames
|
||||
static Hashtable * LocaleUtility_cache = NULL;
|
||||
static U_NAMESPACE_QUALIFIER Hashtable * LocaleUtility_cache = NULL;
|
||||
|
||||
#define UNDERSCORE_CHAR ((UChar)0x005f)
|
||||
#define AT_SIGN_CHAR ((UChar)64)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
**********************************************************************
|
||||
* Copyright (c) 2002-2005, International Business Machines
|
||||
* Copyright (c) 2002-2006, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**********************************************************************
|
||||
* Author: Alan Liu
|
||||
@ -204,6 +204,7 @@ PropertyAliases::getPropertyValueEnum(EnumValue prop,
|
||||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
U_NAMESPACE_USE
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// UDataMemory structures
|
||||
|
@ -1674,12 +1674,12 @@ int32_t RuleBasedBreakIterator::checkDictionary(int32_t startPos,
|
||||
return (reverse ? startPos : endPos);
|
||||
}
|
||||
|
||||
static UStack *gLanguageBreakFactories = NULL;
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
// defined in ucln_cmn.h
|
||||
|
||||
static U_NAMESPACE_QUALIFIER UStack *gLanguageBreakFactories = NULL;
|
||||
|
||||
/**
|
||||
* Release all static memory held by breakiterator.
|
||||
*/
|
||||
@ -1695,7 +1695,7 @@ U_CDECL_END
|
||||
|
||||
U_CDECL_BEGIN
|
||||
static void U_CALLCONV _deleteFactory(void *obj) {
|
||||
delete (LanguageBreakFactory *) obj;
|
||||
delete (U_NAMESPACE_QUALIFIER LanguageBreakFactory *) obj;
|
||||
}
|
||||
U_CDECL_END
|
||||
U_NAMESPACE_BEGIN
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
***************************************************************************
|
||||
* Copyright (C) 1999-2005 International Business Machines Corporation *
|
||||
* Copyright (C) 1999-2006 International Business Machines Corporation *
|
||||
* and others. All rights reserved. *
|
||||
***************************************************************************
|
||||
*/
|
||||
@ -257,6 +257,7 @@ void RBBIDataWrapper::printData() {
|
||||
|
||||
|
||||
U_NAMESPACE_END
|
||||
U_NAMESPACE_USE
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
|
@ -72,7 +72,7 @@ static const UChar kAny[] = {0x61, 0x6e, 0x79, 0x00}; // "any"
|
||||
|
||||
U_CDECL_BEGIN
|
||||
static void U_CALLCONV RBBISetTable_deleter(void *p) {
|
||||
RBBISetTableEl *px = (RBBISetTableEl *)p;
|
||||
U_NAMESPACE_QUALIFIER RBBISetTableEl *px = (U_NAMESPACE_QUALIFIER RBBISetTableEl *)p;
|
||||
delete px->key;
|
||||
// Note: px->val is owned by the linked list "fSetsListHead" in scanner.
|
||||
// Don't delete the value nodes here.
|
||||
|
@ -3,7 +3,7 @@
|
||||
//
|
||||
/*
|
||||
***************************************************************************
|
||||
* Copyright (C) 2002-2005 International Business Machines Corporation *
|
||||
* Copyright (C) 2002-2006 International Business Machines Corporation *
|
||||
* and others. All rights reserved. *
|
||||
***************************************************************************
|
||||
*/
|
||||
@ -29,7 +29,7 @@
|
||||
//
|
||||
U_CDECL_BEGIN
|
||||
static void U_CALLCONV RBBISymbolTableEntry_deleter(void *p) {
|
||||
RBBISymbolTableEntry *px = (RBBISymbolTableEntry *)p;
|
||||
U_NAMESPACE_QUALIFIER RBBISymbolTableEntry *px = (U_NAMESPACE_QUALIFIER RBBISymbolTableEntry *)p;
|
||||
delete px;
|
||||
}
|
||||
U_CDECL_END
|
||||
|
@ -876,6 +876,7 @@ static void walkHorizontal(const TernaryNode *node,
|
||||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
U_NAMESPACE_USE
|
||||
U_CDECL_BEGIN
|
||||
static int32_t U_CALLCONV
|
||||
_sortBuildNodes(const void * /*context*/, const void *voidl, const void *voidr) {
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "unicode/uiter.h"
|
||||
#include "cstring.h"
|
||||
|
||||
U_NAMESPACE_USE
|
||||
|
||||
#define IS_EVEN(n) (((n)&1)==0)
|
||||
#define IS_POINTER_EVEN(p) IS_EVEN((size_t)p)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
* Copyright (C) 1999-2005, International Business Machines Corporation and *
|
||||
* Copyright (C) 1999-2006, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
******************************************************************************
|
||||
*
|
||||
@ -90,7 +90,7 @@ us_arrayCopy(const UChar *src, int32_t srcStart,
|
||||
U_CDECL_BEGIN
|
||||
static UChar U_CALLCONV
|
||||
UnicodeString_charAt(int32_t offset, void *context) {
|
||||
return ((UnicodeString*) context)->charAt(offset);
|
||||
return ((U_NAMESPACE_QUALIFIER UnicodeString*) context)->charAt(offset);
|
||||
}
|
||||
U_CDECL_END
|
||||
|
||||
|
@ -78,6 +78,8 @@
|
||||
*/
|
||||
#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
|
||||
|
||||
U_NAMESPACE_USE
|
||||
|
||||
/*
|
||||
* This new implementation of the normalization code loads its data from
|
||||
* unorm.dat, which is generated with the gennorm tool.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2001-2005, International Business Machines
|
||||
* Copyright (C) 2001-2006, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
@ -29,6 +29,8 @@
|
||||
#include "ucase.h"
|
||||
#include "cmemory.h"
|
||||
|
||||
U_NAMESPACE_USE
|
||||
|
||||
#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
|
||||
|
||||
/* compare canonically equivalent ------------------------------------------- */
|
||||
|
@ -29,6 +29,8 @@
|
||||
#include "unicode/ustring.h"
|
||||
#include "unicode/parsepos.h"
|
||||
|
||||
U_NAMESPACE_USE
|
||||
|
||||
U_CAPI USet* U_EXPORT2
|
||||
uset_open(UChar32 start, UChar32 end) {
|
||||
return (USet*) new UnicodeSet(start, end);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2002-2005, International Business Machines
|
||||
* Copyright (C) 2002-2006, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
@ -25,6 +25,8 @@
|
||||
#include "unicode/ustring.h"
|
||||
#include "unicode/parsepos.h"
|
||||
|
||||
U_NAMESPACE_USE
|
||||
|
||||
U_CAPI USet* U_EXPORT2
|
||||
uset_openPattern(const UChar* pattern, int32_t patternLength,
|
||||
UErrorCode* ec)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
**********************************************************************
|
||||
* Copyright (c) 2002-2005, International Business Machines
|
||||
* Copyright (c) 2002-2006, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**********************************************************************
|
||||
* Author: Alan Liu
|
||||
@ -149,12 +149,12 @@ void UStringEnumeration::reset(UErrorCode& status) {
|
||||
uenum_reset(uenum, &status);
|
||||
}
|
||||
|
||||
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UStringEnumeration/*, StringEnumeration*/)
|
||||
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UStringEnumeration)
|
||||
U_NAMESPACE_END
|
||||
|
||||
// C wrapper --------------------------------------------------------------- ***
|
||||
|
||||
#define THIS(en) ((StringEnumeration*)(en->context))
|
||||
#define THIS(en) ((U_NAMESPACE_QUALIFIER StringEnumeration*)(en->context))
|
||||
|
||||
U_CDECL_BEGIN
|
||||
|
||||
@ -231,7 +231,7 @@ U_CDECL_END
|
||||
* delete it (regardless of error status).
|
||||
*/
|
||||
U_CAPI UEnumeration* U_EXPORT2
|
||||
uenum_openStringEnumeration(StringEnumeration* adopted, UErrorCode* ec) {
|
||||
uenum_openStringEnumeration(U_NAMESPACE_QUALIFIER StringEnumeration* adopted, UErrorCode* ec) {
|
||||
UEnumeration* result = NULL;
|
||||
if (U_SUCCESS(*ec) && adopted != NULL) {
|
||||
result = (UEnumeration*) uprv_malloc(sizeof(UEnumeration));
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "cstring.h"
|
||||
#include "uassert.h"
|
||||
|
||||
U_NAMESPACE_USE
|
||||
|
||||
#define I32_FLAG(bitIndex) ((int32_t)1<<(bitIndex))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user