OSDN Git Service

dalvik: return positive hash code in Dalvik with Houdini
[android-x86/dalvik.git] / libdex / ZipArchive.h
index bf4edf9..df5c49a 100644 (file)
 /*
  * Read-only access to Zip archives, with minimal heap allocation.
  */
-#ifndef _LIBDEX_ZIPARCHIVE
-#define _LIBDEX_ZIPARCHIVE
+#ifndef LIBDEX_ZIPARCHIVE_H_
+#define LIBDEX_ZIPARCHIVE_H_
 
 #include "SysUtil.h"
 #include "DexFile.h"            // need DEX_INLINE
 
-
 /*
  * Trivial typedef to ensure that ZipEntry is not treated as a simple
  * integer.  We use NULL to indicate an invalid value.
@@ -33,11 +32,10 @@ typedef void* ZipEntry;
 /*
  * One entry in the hash table.
  */
-typedef struct ZipHashEntry {
+struct ZipHashEntry {
     const char*     name;
     unsigned short  nameLen;
-    //unsigned int    hash;
-} ZipHashEntry;
+};
 
 /*
  * Read-only Zip archive.
@@ -58,7 +56,7 @@ typedef struct ZipHashEntry {
  * every page that the Central Directory touches.  Easier to tuck a copy
  * of the string length into the hash table entry.
  */
-typedef struct ZipArchive {
+struct ZipArchive {
     /* open Zip archive */
     int         mFd;
 
@@ -75,7 +73,7 @@ typedef struct ZipArchive {
      */
     int         mHashTableSize;
     ZipHashEntry* mHashTable;
-} ZipArchive;
+};
 
 /* Zip compression methods we support */
 enum {
@@ -179,4 +177,4 @@ int dexZipExtractEntryToFile(const ZipArchive* pArchive,
 u4 dexInitCrc32(void);
 u4 dexComputeCrc32(u4 crc, const void* buf, size_t len);
 
-#endif /*_LIBDEX_ZIPARCHIVE*/
+#endif  // LIBDEX_ZIPARCHIVE_H_