aboutsummaryrefslogtreecommitdiff
path: root/libdex
diff options
context:
space:
mode:
authorCarl Shapiro <cshapiro@google.com>2011-06-14 20:31:24 -0700
committerCarl Shapiro <cshapiro@google.com>2011-06-14 20:42:37 -0700
commit375fb116bcb817b37509ab579dbd55cdbb765cbf (patch)
tree8e033bfca03e94b0fc561f2bd6b94d5f8d11b0a3 /libdex
parent7baeded82e40352ebfb43b716e0b1dd752e72e7e (diff)
Normalize the include guard style.
An leading underscore followed by a capital letter is a reserved name space in C and C++. This change also moves any #include directives within the include guard in some of the compiler/codegen/arm header files. Change-Id: I9715e2c5301699d31886e61d0fe6e29483555a2a
Diffstat (limited to 'libdex')
-rw-r--r--libdex/CmdUtils.h6
-rw-r--r--libdex/DexCatch.h6
-rw-r--r--libdex/DexClass.h6
-rw-r--r--libdex/DexDataMap.h6
-rw-r--r--libdex/DexDebugInfo.h6
-rw-r--r--libdex/DexFile.h6
-rw-r--r--libdex/DexOpcodes.h6
-rw-r--r--libdex/DexProto.h6
-rw-r--r--libdex/DexUtf.h6
-rw-r--r--libdex/InstrUtils.h6
-rw-r--r--libdex/Leb128.h4
-rw-r--r--libdex/OptInvocation.h6
-rw-r--r--libdex/SysUtil.h6
-rw-r--r--libdex/ZipArchive.h6
-rw-r--r--libdex/sha1.h6
15 files changed, 44 insertions, 44 deletions
diff --git a/libdex/CmdUtils.h b/libdex/CmdUtils.h
index 62ce73a25..887eed9ba 100644
--- a/libdex/CmdUtils.h
+++ b/libdex/CmdUtils.h
@@ -28,8 +28,8 @@
*
* All memory-mapped structures are 32-bit aligned unless otherwise noted.
*/
-#ifndef _LIBDEX_CMDUTILS
-#define _LIBDEX_CMDUTILS
+#ifndef LIBDEX_CMDUTILS_H_
+#define LIBDEX_CMDUTILS_H_
/* encode the result of unzipping to a file */
enum UnzipToFileResult {
@@ -70,4 +70,4 @@ UnzipToFileResult dexOpenAndMap(const char* fileName, const char* tempFileName,
UnzipToFileResult dexUnzipToFile(const char* zipFileName,
const char* outFileName, bool quiet);
-#endif /*_LIBDEX_CMDUTILS*/
+#endif // LIBDEX_CMDUTILS_H_
diff --git a/libdex/DexCatch.h b/libdex/DexCatch.h
index 19ea54129..cfea2d900 100644
--- a/libdex/DexCatch.h
+++ b/libdex/DexCatch.h
@@ -18,8 +18,8 @@
* Functions for dealing with try-catch info.
*/
-#ifndef _LIBDEX_DEXCATCH
-#define _LIBDEX_DEXCATCH
+#ifndef LIBDEX_DEXCATCH_H_
+#define LIBDEX_DEXCATCH_H_
#include "DexFile.h"
#include "Leb128.h"
@@ -159,4 +159,4 @@ DEX_INLINE bool dexFindCatchHandler(DexCatchIterator *pIterator,
}
}
-#endif
+#endif // LIBDEX_DEXCATCH_H_
diff --git a/libdex/DexClass.h b/libdex/DexClass.h
index d2d92c00b..11b3b0eee 100644
--- a/libdex/DexClass.h
+++ b/libdex/DexClass.h
@@ -18,8 +18,8 @@
* Functions to deal with class definition structures in DEX files
*/
-#ifndef _LIBDEX_DEXCLASS
-#define _LIBDEX_DEXCLASS
+#ifndef LIBDEX_DEXCLASS_H_
+#define LIBDEX_DEXCLASS_H_
#include "DexFile.h"
#include "Leb128.h"
@@ -159,4 +159,4 @@ DEX_INLINE void dexReadClassDataMethod(const u1** pData, DexMethod* pMethod,
*lastIndex = index;
}
-#endif
+#endif // LIBDEX_DEXCLASS_H_
diff --git a/libdex/DexDataMap.h b/libdex/DexDataMap.h
index 359d3adae..7e43dc934 100644
--- a/libdex/DexDataMap.h
+++ b/libdex/DexDataMap.h
@@ -18,8 +18,8 @@
* Verification-time map of data section items
*/
-#ifndef _LIBDEX_DEXDATAMAP
-#define _LIBDEX_DEXDATAMAP
+#ifndef LIBDEX_DEXDATAMAP_H_
+#define LIBDEX_DEXDATAMAP_H_
#include "DexFile.h"
@@ -70,4 +70,4 @@ DEX_INLINE bool dexDataMapVerify0Ok(DexDataMap* map, u4 offset, u2 type) {
return dexDataMapVerify(map, offset, type);
}
-#endif /*_LIBDEX_DEXDATAMAP*/
+#endif // LIBDEX_DEXDATAMAP_H_
diff --git a/libdex/DexDebugInfo.h b/libdex/DexDebugInfo.h
index 9ab67f5d7..bd0954c8c 100644
--- a/libdex/DexDebugInfo.h
+++ b/libdex/DexDebugInfo.h
@@ -18,8 +18,8 @@
* Handling of method debug info in a .dex file.
*/
-#ifndef _LIBDEX_DEXDEBUGINFO
-#define _LIBDEX_DEXDEBUGINFO
+#ifndef LIBDEX_DEXDEBUGINFO_H_
+#define LIBDEX_DEXDEBUGINFO_H_
#include "DexFile.h"
@@ -52,4 +52,4 @@ void dexDecodeDebugInfo(
DexDebugNewPositionCb posCb, DexDebugNewLocalCb localCb,
void* cnxt);
-#endif /* def _LIBDEX_DEXDEBUGINFO */
+#endif // LIBDEX_DEXDEBUGINFO_H_
diff --git a/libdex/DexFile.h b/libdex/DexFile.h
index c4f3f09b1..38e6eca70 100644
--- a/libdex/DexFile.h
+++ b/libdex/DexFile.h
@@ -30,8 +30,8 @@
* All memory-mapped structures are 32-bit aligned unless otherwise noted.
*/
-#ifndef _LIBDEX_DEXFILE
-#define _LIBDEX_DEXFILE
+#ifndef LIBDEX_DEXFILE_H_
+#define LIBDEX_DEXFILE_H_
#include "vm/Common.h" // basic type defs, e.g. u1/u2/u4/u8, and LOG
#include "libdex/SysUtil.h"
@@ -974,4 +974,4 @@ const char* dexGetBoxedTypeDescriptor(PrimitiveType type);
*/
PrimitiveType dexGetPrimitiveTypeFromDescriptorChar(char descriptorChar);
-#endif /*_LIBDEX_DEXFILE*/
+#endif // LIBDEX_DEXFILE_H_
diff --git a/libdex/DexOpcodes.h b/libdex/DexOpcodes.h
index d8dc9a7b6..472fe36fe 100644
--- a/libdex/DexOpcodes.h
+++ b/libdex/DexOpcodes.h
@@ -25,8 +25,8 @@
* opcodes and instruction formats.
*/
-#ifndef _LIBDEX_DEXOPCODES
-#define _LIBDEX_DEXOPCODES
+#ifndef LIBDEX_DEXOPCODES_H_
+#define LIBDEX_DEXOPCODES_H_
#include "DexFile.h"
@@ -1133,4 +1133,4 @@ DEX_INLINE Opcode dexOpcodeFromCodeUnit(u2 codeUnit) {
*/
const char* dexGetOpcodeName(Opcode op);
-#endif /*_LIBDEX_DEXOPCODES*/
+#endif // LIBDEX_DEXOPCODES_H_
diff --git a/libdex/DexProto.h b/libdex/DexProto.h
index 591c27440..dccae6c04 100644
--- a/libdex/DexProto.h
+++ b/libdex/DexProto.h
@@ -18,8 +18,8 @@
* Functions for dealing with method prototypes
*/
-#ifndef _LIBDEX_DEXPROTO
-#define _LIBDEX_DEXPROTO
+#ifndef LIBDEX_DEXPROTO_H_
+#define LIBDEX_DEXPROTO_H_
#include "DexFile.h"
@@ -226,4 +226,4 @@ u4 dexParameterIteratorNextIndex(DexParameterIterator* pIterator);
const char* dexParameterIteratorNextDescriptor(
DexParameterIterator* pIterator);
-#endif /*_LIBDEX_DEXPROTO*/
+#endif // LIBDEX_DEXPROTO_H_
diff --git a/libdex/DexUtf.h b/libdex/DexUtf.h
index a7eb28ceb..cb3d919ae 100644
--- a/libdex/DexUtf.h
+++ b/libdex/DexUtf.h
@@ -18,8 +18,8 @@
* Validate and manipulate MUTF-8 (modified UTF-8) encoded string data.
*/
-#ifndef _LIBDEX_DEXUTF
-#define _LIBDEX_DEXUTF
+#ifndef LIBDEX_DEXUTF_H_
+#define LIBDEX_DEXUTF_H_
#include "DexFile.h"
@@ -128,4 +128,4 @@ bool dexIsClassDescriptor(const char* s);
* is for anything but "void". */
bool dexIsFieldDescriptor(const char* s);
-#endif /* def _LIBDEX_DEXUTF */
+#endif // LIBDEX_DEXUTF_H_
diff --git a/libdex/InstrUtils.h b/libdex/InstrUtils.h
index 187fd5c6b..708a479af 100644
--- a/libdex/InstrUtils.h
+++ b/libdex/InstrUtils.h
@@ -17,8 +17,8 @@
/*
* Dalvik instruction utility functions.
*/
-#ifndef _LIBDEX_INSTRUTILS
-#define _LIBDEX_INSTRUTILS
+#ifndef LIBDEX_INSTRUTILS_H_
+#define LIBDEX_INSTRUTILS_H_
#include "DexFile.h"
#include "DexOpcodes.h"
@@ -198,4 +198,4 @@ DEX_INLINE InstructionIndexType dexGetIndexTypeFromOpcode(Opcode opcode)
*/
void dexDecodeInstruction(const u2* insns, DecodedInstruction* pDec);
-#endif /*_LIBDEX_INSTRUTILS*/
+#endif // LIBDEX_INSTRUTILS_H_
diff --git a/libdex/Leb128.h b/libdex/Leb128.h
index 41799fe5e..21f4edaa1 100644
--- a/libdex/Leb128.h
+++ b/libdex/Leb128.h
@@ -18,8 +18,8 @@
* Functions for interpreting LEB128 (little endian base 128) values
*/
-#ifndef _LIBDEX_LEB128
-#define _LIBDEX_LEB128
+#ifndef LIBDEX_LEB128_H_
+#define LIBDEX_LEB128_H_
#include "DexFile.h"
diff --git a/libdex/OptInvocation.h b/libdex/OptInvocation.h
index e44ce544f..3f32b94bf 100644
--- a/libdex/OptInvocation.h
+++ b/libdex/OptInvocation.h
@@ -17,8 +17,8 @@
/*
* Utility functions related to "dexopt".
*/
-#ifndef _LIBDEX_OPTINVOCATION
-#define _LIBDEX_OPTINVOCATION
+#ifndef LIBDEX_OPTINVOCATION_H_
+#define LIBDEX_OPTINVOCATION_H_
/*
* Utility routines, used by the VM.
@@ -27,4 +27,4 @@ char* dexOptGenerateCacheFileName(const char* fileName,
const char* subFileName);
int dexOptCreateEmptyHeader(int fd);
-#endif /*_LIBDEX_OPTINVOCATION*/
+#endif // LIBDEX_OPTINVOCATION_H_
diff --git a/libdex/SysUtil.h b/libdex/SysUtil.h
index e297dc05d..100c31260 100644
--- a/libdex/SysUtil.h
+++ b/libdex/SysUtil.h
@@ -17,8 +17,8 @@
/*
* System utilities.
*/
-#ifndef _LIBDEX_SYSUTIL
-#define _LIBDEX_SYSUTIL
+#ifndef LIBDEX_SYSUTIL_H_
+#define LIBDEX_SYSUTIL_H_
#include <sys/types.h>
@@ -119,4 +119,4 @@ int sysWriteFully(int fd, const void* buf, size_t count, const char* logMsg);
*/
int sysCopyFileToFile(int outFd, int inFd, size_t count);
-#endif /*_DALVIK_SYSUTIL*/
+#endif // LIBDEX_SYSUTIL_H_
diff --git a/libdex/ZipArchive.h b/libdex/ZipArchive.h
index 8d15cf6da..df5c49a6b 100644
--- a/libdex/ZipArchive.h
+++ b/libdex/ZipArchive.h
@@ -17,8 +17,8 @@
/*
* 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
@@ -177,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_
diff --git a/libdex/sha1.h b/libdex/sha1.h
index f18a8c0b3..28907dedc 100644
--- a/libdex/sha1.h
+++ b/libdex/sha1.h
@@ -1,8 +1,8 @@
/*
* See "sha1.cpp" for author info.
*/
-#ifndef _DALVIK_SHA1
-#define _DALVIK_SHA1
+#ifndef LIBDEX_SHA1_H_
+#define LIBDEX_SHA1_H_
struct SHA1_CTX {
unsigned long state[5];
@@ -17,4 +17,4 @@ void SHA1Update(SHA1_CTX* context, const unsigned char* data,
unsigned long len);
void SHA1Final(unsigned char digest[HASHSIZE], SHA1_CTX* context);
-#endif /*_DALVIK_SHA1*/
+#endif // LIBDEX_SHA1_H_