1
0
mirror of https://github.com/bitdefender/bddisasm.git synced 2024-12-22 22:18:09 +00:00

Don't use reserved identifiers for include guards

This fixes #5
This commit is contained in:
Ionel-Cristinel ANICHITEI 2020-07-27 16:51:16 +03:00
parent 0d5d2a9625
commit 049ecc0ab7
18 changed files with 58 additions and 58 deletions

View File

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

View File

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

View File

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

View File

@ -2,8 +2,8 @@
* Copyright (c) 2020 Bitdefender
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _PREFIXES_H_
#define _PREFIXES_H_
#ifndef PREFIXES_H
#define PREFIXES_H
#define ND_PREF_CODE_NONE 0
#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
};
#endif // _PREFIXES_H_
#endif // PREFIXES_H

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -953,8 +953,8 @@ def generate_translations2(instructions):
#dump_hash_tree2(hash_st)
print('Writing the table_root.h file...')
f = open(r'../bddisasm/include/table_root.h', 'wt')
f.write("#ifndef _TABLE_ROOT_H_\n")
f.write("#define _TABLE_ROOT_H_\n\n")
f.write("#ifndef TABLE_ROOT_H\n")
f.write("#define TABLE_ROOT_H\n\n")
dump_translation_tree_c(hash_st, 'gRootTable', f)
f.write("\n#endif\n\n")
f.close()
@ -962,8 +962,8 @@ def generate_translations2(instructions):
#dump_hash_tree2(hash_vex)
print('Writing the table_vex.h file...')
f = open(r'../bddisasm/include/table_vex.h', 'wt')
f.write("#ifndef _TABLE_VEX_H_\n")
f.write("#define _TABLE_VEX_H_\n\n")
f.write("#ifndef TABLE_VEX_H\n")
f.write("#define TABLE_VEX_H\n\n")
dump_translation_tree_c(hash_vex, 'gVexTable', f)
f.write("\n#endif\n\n")
f.close()
@ -971,8 +971,8 @@ def generate_translations2(instructions):
#dump_hash_tree2(hash_xop)
print('Writing the table_xop.h file...')
f = open(r'../bddisasm/include/table_xop.h', 'wt')
f.write("#ifndef _TABLE_XOP_H_\n")
f.write("#define _TABLE_XOP_H_\n\n")
f.write("#ifndef TABLE_XOP_H\n")
f.write("#define TABLE_XOP_H\n\n")
dump_translation_tree_c(hash_xop, 'gXopTable', f)
f.write("\n#endif\n\n")
f.close()
@ -980,8 +980,8 @@ def generate_translations2(instructions):
#dump_hash_tree2(hash_evex)
print('Writing the table_evex.h file...')
f = open(r'../bddisasm/include/table_evex.h', 'wt')
f.write("#ifndef _TABLE_EVEX_H_\n")
f.write("#define _TABLE_EVEX_H_\n\n")
f.write("#ifndef TABLE_EVEX_H\n")
f.write("#define TABLE_EVEX_H\n\n")
dump_translation_tree_c(hash_evex, 'gEvexTable', f)
f.write("\n#endif\n\n")
f.close()
@ -1020,8 +1020,8 @@ def generate_constants2(instructions):
def dump_mnemonics(mnemonics, prefixes, fname):
f = open(fname, 'wt')
f.write('#ifndef _MNEMONICS_H_\n')
f.write('#define _MNEMONICS_H_\n')
f.write('#ifndef MNEMONICS_H\n')
f.write('#define MNEMONICS_H\n')
f.write('\n')
f.write('const char *gMnemonics[%d] = \n' % len(mnemonics))
f.write('{\n')
@ -1058,8 +1058,8 @@ def dump_constants(constants, prefixes, constants_sets, constants_types, fname):
f.write('//\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('#ifndef _CONSTANTS_H_\n')
f.write('#define _CONSTANTS_H_\n\n')
f.write('#ifndef CONSTANTS_H\n')
f.write('#define CONSTANTS_H\n\n')
f.write('\n')
f.write('typedef enum _ND_INS_CLASS\n')
f.write('{\n')
@ -1106,8 +1106,8 @@ def generate_master_table(instructions, fname):
f.write('//\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('#ifndef _INSTRUCTIONS_H_\n')
f.write('#define _INSTRUCTIONS_H_\n')
f.write('#ifndef INSTRUCTIONS_H\n')
f.write('#define INSTRUCTIONS_H\n')
f.write('\n')
flags = []
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):
f = open(fname, 'wt')
f.write('#ifndef _CPUID_FLAGS_H_\n')
f.write('#define _CPUID_FLAGS_H_\n')
f.write('#ifndef CPUID_FLAGS_H\n')
f.write('#define CPUID_FLAGS_H\n')
f.write('\n')
f.write('#define ND_CFF_NO_LEAF 0xFFFFFFFF\n')
@ -1200,7 +1200,7 @@ def generate_features(features, fname):
f.write('\n')
f.write('#endif // _CPUID_FLAGS_H_\n')
f.write('#endif // CPUID_FLAGS_H\n')
#
# =============================================================================