]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/uresimp.h
ICU-400.37.tar.gz
[apple/icu.git] / icuSources / common / uresimp.h
index 3e530d9e6d22b2ee622387b4255ed8d723ef1b96..4d9ed92da5048e6d9ddfd3c44921d43be4d60115 100644 (file)
@@ -1,6 +1,6 @@
 /*
 **********************************************************************
-*   Copyright (C) 2000-2006, International Business Machines
+*   Copyright (C) 2000-2008, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 **********************************************************************
 */
@@ -46,12 +46,12 @@ typedef struct UResourceDataEntry UResourceDataEntry;
 struct UResourceDataEntry {
     char *fName; /* name of the locale for bundle - still to decide whether it is original or fallback */
     char *fPath; /* path to bundle - used for distinguishing between resources with the same name */
-    uint32_t fCountExisting; /* how much is this resource used */
-    ResourceData fData; /* data for low level access */
     UResourceDataEntry *fParent; /*next resource in fallback chain*/
-/*    UResEntryType fStatus;*/
+    ResourceData fData; /* data for low level access */
+    char fNameBuffer[3]; /* A small buffer of free space for fName. The free space is due to struct padding. */
+    uint32_t fCountExisting; /* how much is this resource used */
     UErrorCode fBogus;
-    int32_t fHashKey; /* for faster access in the hashtable */
+    /* int32_t fHashKey;*/ /* for faster access in the hashtable */
 };
 
 #define RES_BUFSIZE 64
@@ -62,28 +62,29 @@ struct UResourceBundle {
     const char *fKey; /*tag*/
     UResourceDataEntry *fData; /*for low-level access*/
     char *fVersion;
+    UResourceDataEntry *fTopLevelData; /* for getting the valid locale */
     char *fResPath; /* full path to the resource: "zh_TW/CollationElements/Sequence" */
+    ResourceData fResData;
     char fResBuf[RES_BUFSIZE];
     int32_t fResPathLen;
+    Resource fRes;
     UBool fHasFallback;
     UBool fIsTopLevel;
     uint32_t fMagic1;   /* For determining if it's a stack object */
     uint32_t fMagic2;   /* For determining if it's a stack object */
     int32_t fIndex;
     int32_t fSize;
-    ResourceData fResData;
-    Resource fRes;
-
-    UResourceDataEntry *fTopLevelData; /* for getting the valid locale */
-    const UResourceBundle *fParentRes; /* needed to get the actual locale for a child resource */
 
+    /*const UResourceBundle *fParentRes;*/ /* needed to get the actual locale for a child resource */
 };
 
 U_CAPI void U_EXPORT2 ures_initStackObject(UResourceBundle* resB);
 
 /* Some getters used by the copy constructor */
 U_CFUNC const char* ures_getName(const UResourceBundle* resB);
+#ifdef URES_DEBUG
 U_CFUNC const char* ures_getPath(const UResourceBundle* resB);
+#endif
 /*U_CFUNC void ures_appendResPath(UResourceBundle *resB, const char* toAdd, int32_t lenToAdd);*/
 /*U_CFUNC void ures_setResPath(UResourceBundle *resB, const char* toAdd);*/
 /*U_CFUNC void ures_freeResPath(UResourceBundle *resB);*/
@@ -165,33 +166,6 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity,
 U_INTERNAL UEnumeration* U_EXPORT2
 ures_getKeywordValues(const char *path, const char *keyword, UErrorCode *status);
 
-/**
- * Test if 2 resource bundles are equal
- * @param res1
- * @param res2
- * @param status error code
- * @internal ICU 3.6
- */
-U_INTERNAL UBool U_EXPORT2
-ures_equal(const UResourceBundle* res1, const UResourceBundle* res2);
-
-/**
- * Clones the given resource bundle
- * @param res
- * @param status error code
- * @internal ICU 3.6
- */
-U_INTERNAL UResourceBundle* U_EXPORT2
-ures_clone(const UResourceBundle* res, UErrorCode* status);
-
-/**
- * Returns the parent bundle. Internal. DONOT close the returned bundle!!!
- * @param res
- * @internal ICU 3.6
- */
-U_INTERNAL const UResourceBundle* U_EXPORT2
-ures_getParentBundle(const UResourceBundle* res);
-
 
 /**
  * Get a resource with multi-level fallback. Normally only the top level resources will