/*
* 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
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* Trivial typedef to ensure that ZipEntry is not treated as a simple
* integer. We use NULL to indicate an invalid value.
/*
* 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.
* 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;
*/
int mHashTableSize;
ZipHashEntry* mHashTable;
-} ZipArchive;
+};
/* Zip compression methods we support */
enum {
u4 dexInitCrc32(void);
u4 dexComputeCrc32(u4 crc, const void* buf, size_t len);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*_LIBDEX_ZIPARCHIVE*/
+#endif // LIBDEX_ZIPARCHIVE_H_