Don't use reserved identifiers for include guards

This fixes #5
pull/9/head
Ionel-Cristinel ANICHITEI 4 years ago
parent 0d5d2a9625
commit 049ecc0ab7

@ -2,8 +2,8 @@
// This file was auto-generated by generate_tables.py from defs.dat. DO NOT MODIFY! // This file was auto-generated by generate_tables.py from defs.dat. DO NOT MODIFY!
// //
#ifndef _INSTRUCTIONS_H_ #ifndef INSTRUCTIONS_H
#define _INSTRUCTIONS_H_ #define INSTRUCTIONS_H
const ND_INSTRUCTION gInstructions[2557] = const ND_INSTRUCTION gInstructions[2557] =
{ {

@ -1,5 +1,5 @@
#ifndef _MNEMONICS_H_ #ifndef MNEMONICS_H
#define _MNEMONICS_H_ #define MNEMONICS_H
const char *gMnemonics[1567] = const char *gMnemonics[1567] =
{ {

@ -2,8 +2,8 @@
* Copyright (c) 2020 Bitdefender * Copyright (c) 2020 Bitdefender
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef _ND_CRT_H_ #ifndef ND_CRT_H
#define _ND_CRT_H_ #define ND_CRT_H
#include "../../inc/disasmtypes.h" #include "../../inc/disasmtypes.h"
@ -87,4 +87,4 @@ nd_strcat_s(
const char *src const char *src
); );
#endif // _ND_CRT_H_ #endif // ND_CRT_H

@ -2,8 +2,8 @@
* Copyright (c) 2020 Bitdefender * Copyright (c) 2020 Bitdefender
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef _PREFIXES_H_ #ifndef PREFIXES_H
#define _PREFIXES_H_ #define PREFIXES_H
#define ND_PREF_CODE_NONE 0 #define ND_PREF_CODE_NONE 0
#define ND_PREF_CODE_STANDARD 1 #define ND_PREF_CODE_STANDARD 1
@ -31,4 +31,4 @@ static const uint8_t gPrefixesMap[256] =
1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // F 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // F
}; };
#endif // _PREFIXES_H_ #endif // PREFIXES_H

@ -1,5 +1,5 @@
#ifndef _TABLE_EVEX_H_ #ifndef TABLE_EVEX_H
#define _TABLE_EVEX_H_ #define TABLE_EVEX_H
const ND_TABLE_INSTRUCTION gEvexTable_root_02_9a_03_mem_02_00_leaf = const ND_TABLE_INSTRUCTION gEvexTable_root_02_9a_03_mem_02_00_leaf =
{ {

@ -1,5 +1,5 @@
#ifndef _TABLE_ROOT_H_ #ifndef TABLE_ROOT_H
#define _TABLE_ROOT_H_ #define TABLE_ROOT_H
const ND_TABLE_INSTRUCTION gRootTable_root_37_leaf = const ND_TABLE_INSTRUCTION gRootTable_root_37_leaf =
{ {

@ -1,5 +1,5 @@
#ifndef _TABLE_VEX_H_ #ifndef TABLE_VEX_H
#define _TABLE_VEX_H_ #define TABLE_VEX_H
const ND_TABLE_INSTRUCTION gVexTable_root_02_f2_00_00_leaf = const ND_TABLE_INSTRUCTION gVexTable_root_02_f2_00_00_leaf =
{ {

@ -1,5 +1,5 @@
#ifndef _TABLE_XOP_H_ #ifndef TABLE_XOP_H
#define _TABLE_XOP_H_ #define TABLE_XOP_H
const ND_TABLE_INSTRUCTION gXopTable_root_0a_10_leaf = const ND_TABLE_INSTRUCTION gXopTable_root_0a_10_leaf =
{ {

@ -2,8 +2,8 @@
* Copyright (c) 2020 Bitdefender * Copyright (c) 2020 Bitdefender
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef _TABLEDEFS_H_ #ifndef TABLEDEFS_H
#define _TABLEDEFS_H_ #define TABLEDEFS_H
// //
// Types of tables. // Types of tables.
@ -494,4 +494,4 @@ typedef enum _ND_OPERAND_TYPE_SPEC
#include "table_vex.h" #include "table_vex.h"
#include "table_evex.h" #include "table_evex.h"
#endif // _TABLEDEFS_H_ #endif // TABLEDEFS_H

@ -2,8 +2,8 @@
* Copyright (c) 2020 Bitdefender * Copyright (c) 2020 Bitdefender
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef _BDDISASM_H_ #ifndef BDDISASM_H
#define _BDDISASM_H_ #define BDDISASM_H
#include "disasmstatus.h" #include "disasmstatus.h"
#include "registers.h" #include "registers.h"
@ -1470,4 +1470,4 @@ NdGetFullAccessMap(
#pragma warning(pop) #pragma warning(pop)
#endif #endif
#endif // _BDDISASM_H_ #endif // BDDISASM_H

@ -2,8 +2,8 @@
* Copyright (c) 2020 Bitdefender * Copyright (c) 2020 Bitdefender
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef _BDSHEMU_H_ #ifndef BDSHEMU_H
#define _BDSHEMU_H_ #define BDSHEMU_H
#include "bddisasm.h" #include "bddisasm.h"
@ -276,4 +276,4 @@ ShemuEmulate(
); );
#endif // !_BDSHEMU_H_ #endif // BDSHEMU_H

@ -2,8 +2,8 @@
// This file was auto-generated by generate_tables.py from defs.dat. DO NOT MODIFY! // This file was auto-generated by generate_tables.py from defs.dat. DO NOT MODIFY!
// //
#ifndef _CONSTANTS_H_ #ifndef CONSTANTS_H
#define _CONSTANTS_H_ #define CONSTANTS_H
typedef enum _ND_INS_CLASS typedef enum _ND_INS_CLASS

@ -1,5 +1,5 @@
#ifndef _CPUID_FLAGS_H_ #ifndef CPUID_FLAGS_H
#define _CPUID_FLAGS_H_ #define CPUID_FLAGS_H
#define ND_CFF_NO_LEAF 0xFFFFFFFF #define ND_CFF_NO_LEAF 0xFFFFFFFF
#define ND_CFF_NO_SUBLEAF 0x00FFFFFF #define ND_CFF_NO_SUBLEAF 0x00FFFFFF
@ -105,4 +105,4 @@
#define ND_CFF_MCOMMIT ND_CFF(0x80000008, 0xFFFFFFFF, REG_EBX, 8) #define ND_CFF_MCOMMIT ND_CFF(0x80000008, 0xFFFFFFFF, REG_EBX, 8)
#define ND_CFF_SNP ND_CFF(0x8000001F, 0xFFFFFFFF, REG_EAX, 4) #define ND_CFF_SNP ND_CFF(0x8000001F, 0xFFFFFFFF, REG_EAX, 4)
#endif // _CPUID_FLAGS_H_ #endif // CPUID_FLAGS_H

@ -2,8 +2,8 @@
* Copyright (c) 2020 Bitdefender * Copyright (c) 2020 Bitdefender
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef _DISASMSTATUS_H_ #ifndef DISASMSTATUS_H
#define _DISASMSTATUS_H_ #define DISASMSTATUS_H
// //
// Return statuses. // Return statuses.

@ -2,8 +2,8 @@
* Copyright (c) 2020 Bitdefender * Copyright (c) 2020 Bitdefender
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef _DISASM_TYPES_H_ #ifndef DISASM_TYPES_H
#define _DISASM_TYPES_H_ #define DISASM_TYPES_H
#if defined(KERNEL_MODE) && defined(_MSC_VER) #if defined(KERNEL_MODE) && defined(_MSC_VER)
# include <ntddk.h> # include <ntddk.h>

@ -2,8 +2,8 @@
* Copyright (c) 2020 Bitdefender * Copyright (c) 2020 Bitdefender
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef _REGISTERS_H_ #ifndef REGISTERS_H
#define _REGISTERS_H_ #define REGISTERS_H
// //
// Registers enumerations // Registers enumerations

@ -2,11 +2,11 @@
* Copyright (c) 2020 Bitdefender * Copyright (c) 2020 Bitdefender
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef _DISASM_VER_H_ #ifndef DISASM_VER_H
#define _DISASM_VER_H_ #define DISASM_VER_H
#define DISASM_VERSION_MAJOR 1 #define DISASM_VERSION_MAJOR 1
#define DISASM_VERSION_MINOR 26 #define DISASM_VERSION_MINOR 26
#define DISASM_VERSION_REVISION 3 #define DISASM_VERSION_REVISION 3
#endif // _DISASM_VER_H_ #endif // DISASM_VER_H

@ -953,8 +953,8 @@ def generate_translations2(instructions):
#dump_hash_tree2(hash_st) #dump_hash_tree2(hash_st)
print('Writing the table_root.h file...') print('Writing the table_root.h file...')
f = open(r'../bddisasm/include/table_root.h', 'wt') f = open(r'../bddisasm/include/table_root.h', 'wt')
f.write("#ifndef _TABLE_ROOT_H_\n") f.write("#ifndef TABLE_ROOT_H\n")
f.write("#define _TABLE_ROOT_H_\n\n") f.write("#define TABLE_ROOT_H\n\n")
dump_translation_tree_c(hash_st, 'gRootTable', f) dump_translation_tree_c(hash_st, 'gRootTable', f)
f.write("\n#endif\n\n") f.write("\n#endif\n\n")
f.close() f.close()
@ -962,8 +962,8 @@ def generate_translations2(instructions):
#dump_hash_tree2(hash_vex) #dump_hash_tree2(hash_vex)
print('Writing the table_vex.h file...') print('Writing the table_vex.h file...')
f = open(r'../bddisasm/include/table_vex.h', 'wt') f = open(r'../bddisasm/include/table_vex.h', 'wt')
f.write("#ifndef _TABLE_VEX_H_\n") f.write("#ifndef TABLE_VEX_H\n")
f.write("#define _TABLE_VEX_H_\n\n") f.write("#define TABLE_VEX_H\n\n")
dump_translation_tree_c(hash_vex, 'gVexTable', f) dump_translation_tree_c(hash_vex, 'gVexTable', f)
f.write("\n#endif\n\n") f.write("\n#endif\n\n")
f.close() f.close()
@ -971,8 +971,8 @@ def generate_translations2(instructions):
#dump_hash_tree2(hash_xop) #dump_hash_tree2(hash_xop)
print('Writing the table_xop.h file...') print('Writing the table_xop.h file...')
f = open(r'../bddisasm/include/table_xop.h', 'wt') f = open(r'../bddisasm/include/table_xop.h', 'wt')
f.write("#ifndef _TABLE_XOP_H_\n") f.write("#ifndef TABLE_XOP_H\n")
f.write("#define _TABLE_XOP_H_\n\n") f.write("#define TABLE_XOP_H\n\n")
dump_translation_tree_c(hash_xop, 'gXopTable', f) dump_translation_tree_c(hash_xop, 'gXopTable', f)
f.write("\n#endif\n\n") f.write("\n#endif\n\n")
f.close() f.close()
@ -980,8 +980,8 @@ def generate_translations2(instructions):
#dump_hash_tree2(hash_evex) #dump_hash_tree2(hash_evex)
print('Writing the table_evex.h file...') print('Writing the table_evex.h file...')
f = open(r'../bddisasm/include/table_evex.h', 'wt') f = open(r'../bddisasm/include/table_evex.h', 'wt')
f.write("#ifndef _TABLE_EVEX_H_\n") f.write("#ifndef TABLE_EVEX_H\n")
f.write("#define _TABLE_EVEX_H_\n\n") f.write("#define TABLE_EVEX_H\n\n")
dump_translation_tree_c(hash_evex, 'gEvexTable', f) dump_translation_tree_c(hash_evex, 'gEvexTable', f)
f.write("\n#endif\n\n") f.write("\n#endif\n\n")
f.close() f.close()
@ -1020,8 +1020,8 @@ def generate_constants2(instructions):
def dump_mnemonics(mnemonics, prefixes, fname): def dump_mnemonics(mnemonics, prefixes, fname):
f = open(fname, 'wt') f = open(fname, 'wt')
f.write('#ifndef _MNEMONICS_H_\n') f.write('#ifndef MNEMONICS_H\n')
f.write('#define _MNEMONICS_H_\n') f.write('#define MNEMONICS_H\n')
f.write('\n') f.write('\n')
f.write('const char *gMnemonics[%d] = \n' % len(mnemonics)) f.write('const char *gMnemonics[%d] = \n' % len(mnemonics))
f.write('{\n') f.write('{\n')
@ -1058,8 +1058,8 @@ def dump_constants(constants, prefixes, constants_sets, constants_types, fname):
f.write('//\n') f.write('//\n')
f.write('// This file was auto-generated by generate_tables.py from defs.dat. DO NOT MODIFY!\n') f.write('// This file was auto-generated by generate_tables.py from defs.dat. DO NOT MODIFY!\n')
f.write('//\n\n') f.write('//\n\n')
f.write('#ifndef _CONSTANTS_H_\n') f.write('#ifndef CONSTANTS_H\n')
f.write('#define _CONSTANTS_H_\n\n') f.write('#define CONSTANTS_H\n\n')
f.write('\n') f.write('\n')
f.write('typedef enum _ND_INS_CLASS\n') f.write('typedef enum _ND_INS_CLASS\n')
f.write('{\n') f.write('{\n')
@ -1106,8 +1106,8 @@ def generate_master_table(instructions, fname):
f.write('//\n') f.write('//\n')
f.write('// This file was auto-generated by generate_tables.py from defs.dat. DO NOT MODIFY!\n') f.write('// This file was auto-generated by generate_tables.py from defs.dat. DO NOT MODIFY!\n')
f.write('//\n\n') f.write('//\n\n')
f.write('#ifndef _INSTRUCTIONS_H_\n') f.write('#ifndef INSTRUCTIONS_H\n')
f.write('#define _INSTRUCTIONS_H_\n') f.write('#define INSTRUCTIONS_H\n')
f.write('\n') f.write('\n')
flags = [] flags = []
f.write('const ND_INSTRUCTION gInstructions[%s] = \n' % len(instructions)) f.write('const ND_INSTRUCTION gInstructions[%s] = \n' % len(instructions))
@ -1184,8 +1184,8 @@ def dump_translation_tree_c(t, hname, f):
def generate_features(features, fname): def generate_features(features, fname):
f = open(fname, 'wt') f = open(fname, 'wt')
f.write('#ifndef _CPUID_FLAGS_H_\n') f.write('#ifndef CPUID_FLAGS_H\n')
f.write('#define _CPUID_FLAGS_H_\n') f.write('#define CPUID_FLAGS_H\n')
f.write('\n') f.write('\n')
f.write('#define ND_CFF_NO_LEAF 0xFFFFFFFF\n') f.write('#define ND_CFF_NO_LEAF 0xFFFFFFFF\n')
@ -1200,7 +1200,7 @@ def generate_features(features, fname):
f.write('\n') f.write('\n')
f.write('#endif // _CPUID_FLAGS_H_\n') f.write('#endif // CPUID_FLAGS_H\n')
# #
# ============================================================================= # =============================================================================

Loading…
Cancel
Save