Permalink
Browse files

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
  • Loading branch information...
1 parent 7baeded commit 375fb116bcb817b37509ab579dbd55cdbb765cbf Carl Shapiro committed Jun 15, 2011
Showing with 339 additions and 339 deletions.
  1. +3 −3 libdex/CmdUtils.h
  2. +3 −3 libdex/DexCatch.h
  3. +3 −3 libdex/DexClass.h
  4. +3 −3 libdex/DexDataMap.h
  5. +3 −3 libdex/DexDebugInfo.h
  6. +3 −3 libdex/DexFile.h
  7. +3 −3 libdex/DexOpcodes.h
  8. +3 −3 libdex/DexProto.h
  9. +3 −3 libdex/DexUtf.h
  10. +3 −3 libdex/InstrUtils.h
  11. +2 −2 libdex/Leb128.h
  12. +3 −3 libdex/OptInvocation.h
  13. +3 −3 libdex/SysUtil.h
  14. +3 −3 libdex/ZipArchive.h
  15. +3 −3 libdex/sha1.h
  16. +3 −3 libnativehelper/include/nativehelper/JNIHelp.h
  17. +3 −3 libnativehelper/include/nativehelper/jni.h
  18. +3 −3 vm/AllocTracker.h
  19. +3 −3 vm/Atomic.h
  20. +3 −3 vm/AtomicCache.h
  21. +3 −3 vm/BitVector.h
  22. +3 −3 vm/Bits.h
  23. +3 −3 vm/Common.h
  24. +3 −3 vm/Dalvik.h
  25. +3 −3 vm/DalvikVersion.h
  26. +3 −3 vm/Ddm.h
  27. +3 −3 vm/Debugger.h
  28. +3 −3 vm/DvmDex.h
  29. +3 −3 vm/Exception.h
  30. +3 −3 vm/Globals.h
  31. +3 −3 vm/Hash.h
  32. +3 −3 vm/IndirectRefTable.h
  33. +3 −3 vm/Init.h
  34. +3 −3 vm/InlineNative.h
  35. +3 −3 vm/Intern.h
  36. +3 −3 vm/JarFile.h
  37. +3 −3 vm/JniInternal.h
  38. +3 −3 vm/LinearAlloc.h
  39. +3 −3 vm/Misc.h
  40. +3 −3 vm/Native.h
  41. +3 −3 vm/PointerSet.h
  42. +3 −3 vm/Profile.h
  43. +3 −3 vm/RawDexFile.h
  44. +3 −3 vm/ReferenceTable.h
  45. +3 −3 vm/SignalCatcher.h
  46. +3 −3 vm/StdioConverter.h
  47. +3 −3 vm/Sync.h
  48. +3 −3 vm/Thread.h
  49. +3 −3 vm/UtfString.h
  50. +3 −3 vm/alloc/Alloc.h
  51. +3 −3 vm/alloc/CardTable.h
  52. +3 −3 vm/alloc/DdmHeap.h
  53. +3 −3 vm/alloc/Heap.h
  54. +3 −3 vm/alloc/HeapBitmap.h
  55. +3 −3 vm/alloc/HeapBitmapInlines.h
  56. +3 −3 vm/alloc/HeapDebug.h
  57. +3 −3 vm/alloc/HeapInternal.h
  58. +3 −3 vm/alloc/HeapSource.h
  59. +3 −3 vm/alloc/MarkSweep.h
  60. +3 −3 vm/alloc/Verify.h
  61. +3 −3 vm/alloc/Visit.h
  62. +3 −3 vm/alloc/VisitInlines.h
  63. +3 −3 vm/alloc/WriteBarrier.h
  64. +3 −3 vm/analysis/CodeVerify.h
  65. +3 −3 vm/analysis/DexPrepare.h
  66. +3 −3 vm/analysis/DexVerify.h
  67. +3 −3 vm/analysis/Liveness.h
  68. +3 −3 vm/analysis/Optimize.h
  69. +3 −3 vm/analysis/RegisterMap.h
  70. +3 −3 vm/analysis/VerifySubs.h
  71. +3 −3 vm/analysis/VfyBasicBlock.h
  72. +3 −3 vm/compiler/Compiler.h
  73. +3 −3 vm/compiler/CompilerIR.h
  74. +3 −3 vm/compiler/CompilerInternals.h
  75. +3 −3 vm/compiler/CompilerUtility.h
  76. +3 −3 vm/compiler/Dataflow.h
  77. +3 −3 vm/compiler/Loop.h
  78. +3 −3 vm/compiler/codegen/CompilerCodegen.h
  79. +3 −3 vm/compiler/codegen/Optimizer.h
  80. +4 −4 vm/compiler/codegen/arm/ArmLIR.h
  81. +4 −4 vm/compiler/codegen/arm/CalloutHelper.h
  82. +3 −3 vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.h
  83. +3 −3 vm/compiler/codegen/arm/armv5te/ArchVariant.h
  84. +3 −3 vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.h
  85. +3 −3 vm/compiler/codegen/arm/armv7-a/ArchVariant.h
  86. +4 −4 vm/compiler/codegen/x86/CalloutHelper.h
  87. +4 −4 vm/compiler/codegen/x86/X86LIR.h
  88. +3 −3 vm/compiler/codegen/x86/ia32/ArchVariant.h
  89. +3 −3 vm/hprof/Hprof.h
  90. +3 −3 vm/interp/Interp.h
  91. +3 −3 vm/interp/InterpDefs.h
  92. +3 −3 vm/interp/InterpState.h
  93. +3 −3 vm/interp/Jit.h
  94. +3 −3 vm/interp/Stack.h
  95. +3 −3 vm/jdwp/ExpandBuf.h
  96. +3 −3 vm/jdwp/Jdwp.h
  97. +3 −3 vm/jdwp/JdwpConstants.h
  98. +3 −3 vm/jdwp/JdwpEvent.h
  99. +3 −3 vm/jdwp/JdwpHandler.h
  100. +3 −3 vm/jdwp/JdwpPriv.h
  101. +3 −3 vm/mterp/Mterp.h
  102. +3 −3 vm/native/InternalNative.h
  103. +3 −3 vm/native/InternalNativePriv.h
  104. +3 −3 vm/oo/AccessCheck.h
  105. +3 −3 vm/oo/Array.h
  106. +3 −3 vm/oo/Class.h
  107. +3 −3 vm/oo/Object.h
  108. +3 −3 vm/oo/ObjectInlines.h
  109. +3 −3 vm/oo/Resolve.h
  110. +3 −3 vm/oo/TypeCheck.h
  111. +3 −3 vm/reflect/Reflect.h
  112. +3 −3 vm/test/Test.h
View
@@ -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_
View
@@ -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_
View
@@ -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_
View
@@ -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_
View
@@ -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_
View
@@ -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_
View
@@ -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_
View
@@ -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_
View
@@ -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_
View
@@ -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_
View
@@ -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"
View
@@ -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_
View
@@ -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_
View
@@ -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_
View
@@ -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_
@@ -20,8 +20,8 @@
* This file may be included by C or C++ code, which is trouble because jni.h
* uses different typedefs for JNIEnv in each language.
*/
-#ifndef _NATIVEHELPER_JNIHELP_H
-#define _NATIVEHELPER_JNIHELP_H
+#ifndef NATIVEHELPER_JNIHELP_H_
+#define NATIVEHELPER_JNIHELP_H_
#include "jni.h"
#include "cutils/log.h"
@@ -189,4 +189,4 @@ inline void jniLogException(JNIEnv* env, int priority, const char* tag, jthrowab
_rc; })
#endif
-#endif /*_NATIVEHELPER_JNIHELP_H*/
+#endif /* NATIVEHELPER_JNIHELP_H_ */
@@ -21,8 +21,8 @@
* Everything here is expected to be VM-neutral.
*/
-#ifndef _JNI_H
-#define _JNI_H
+#ifndef JNI_H_
+#define JNI_H_
#include <stdarg.h>
@@ -1152,4 +1152,4 @@ void JNI_OnUnload(JavaVM* vm, void* reserved);
#define JNIEXPORT
#define JNICALL
-#endif /*_JNI_H*/
+#endif /* JNI_H_ */
View
@@ -16,8 +16,8 @@
/*
* Allocation tracking and reporting.
*/
-#ifndef _DALVIK_ALLOCTRACKER
-#define _DALVIK_ALLOCTRACKER
+#ifndef DALVIK_ALLOCTRACKER_H_
+#define DALVIK_ALLOCTRACKER_H_
/* initialization */
bool dvmAllocTrackerStartup(void);
@@ -59,4 +59,4 @@ bool dvmGenerateTrackedAllocationReport(u1** pData, size_t* pDataLen);
*/
void dvmDumpTrackedAllocations(bool enable);
-#endif /*_DALVIK_ALLOCTRACKER*/
+#endif // DALVIK_ALLOCTRACKER_H_
View
@@ -17,8 +17,8 @@
/*
* Atomic operations
*/
-#ifndef _DALVIK_ATOMIC
-#define _DALVIK_ATOMIC
+#ifndef DALVIK_ATOMIC_H_
+#define DALVIK_ATOMIC_H_
#include <cutils/atomic.h> /* use common Android atomic ops */
#include <cutils/atomic-inline.h> /* and some uncommon ones */
@@ -52,4 +52,4 @@ extern "C" int64_t dvmQuasiAtomicRead64(volatile const int64_t* addr);
int dvmQuasiAtomicCas64(int64_t oldvalue, int64_t newvalue,
volatile int64_t* addr);
-#endif /*_DALVIK_ATOMIC*/
+#endif // DALVIK_ATOMIC_H_
View
@@ -16,8 +16,8 @@
/*
* Mutex-free cache for key1+key2=value.
*/
-#ifndef _DALVIK_ATOMICCACHE
-#define _DALVIK_ATOMICCACHE
+#ifndef DALVIK_ATOMICCACHE_H_
+#define DALVIK_ATOMICCACHE_H_
/*
* If set to "1", gather some stats on our caching success rate.
@@ -170,4 +170,4 @@ void dvmUpdateAtomicCache(u4 key1, u4 key2, u4 value, AtomicCacheEntry* pEntry,
*/
void dvmDumpAtomicCacheStats(const AtomicCache* pCache);
-#endif /*_DALVIK_ATOMICCACHE*/
+#endif // DALVIK_ATOMICCACHE_H_
View
@@ -17,8 +17,8 @@
/*
* Miscellaneous utility functions.
*/
-#ifndef _DALVIK_BITVECTOR
-#define _DALVIK_BITVECTOR
+#ifndef DALVIK_BITVECTOR_H_
+#define DALVIK_BITVECTOR_H_
/*
* Expanding bitmap, used for tracking resources. Bits are numbered starting
@@ -100,4 +100,4 @@ void dvmBitVectorIteratorInit(BitVector* pBits, BitVectorIterator* iterator);
/* Return the next position set to 1. -1 means end-of-vector reached */
int dvmBitVectorIteratorNext(BitVectorIterator* iterator);
-#endif /*_DALVIK_BITVECTOR*/
+#endif // DALVIK_BITVECTOR_H_
View
@@ -18,8 +18,8 @@
*
* These get inlined, so prefer small size over maximum speed.
*/
-#ifndef _DALVIK_BITS
-#define _DALVIK_BITS
+#ifndef DALVIK_BITS_H_
+#define DALVIK_BITS_H_
#include "Common.h"
#include "Inlines.h"
@@ -355,4 +355,4 @@ INLINE void setUtf8String(u1* buf, const u1* str)
memcpy(buf + sizeof(u4), str, strLen);
}
-#endif /*_DALVIK_BITS*/
+#endif // DALVIK_BITS_H_
View
@@ -17,8 +17,8 @@
/*
* Common defines for all Dalvik code.
*/
-#ifndef _DALVIK_COMMON
-#define _DALVIK_COMMON
+#ifndef DALVIK_COMMON_H_
+#define DALVIK_COMMON_H_
#ifndef LOG_TAG
# define LOG_TAG "dalvikvm"
@@ -120,4 +120,4 @@ union JValue {
#define NELEM(x) ((int) (sizeof(x) / sizeof((x)[0])))
-#endif /*_DALVIK_COMMON*/
+#endif // DALVIK_COMMON_H_
Oops, something went wrong.

0 comments on commit 375fb11

Please sign in to comment.