Skip to content

Commit

Permalink
rename all the constants marking ending from _MAX to _ENDING. this al…
Browse files Browse the repository at this point in the history
…so updates Java/Python/Ocaml bindings accordingly
  • Loading branch information
aquynh committed Sep 29, 2014
1 parent 0b702b8 commit d7e42b7
Show file tree
Hide file tree
Showing 40 changed files with 121 additions and 121 deletions.
6 changes: 3 additions & 3 deletions arch/AArch64/AArch64Mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ static name_map reg_name_maps[] = {
const char *AArch64_reg_name(csh handle, unsigned int reg)
{
#ifndef CAPSTONE_DIET
if (reg >= ARM64_REG_MAX)
if (reg >= ARM64_REG_ENDING)
return NULL;

return reg_name_maps[reg].name;
Expand Down Expand Up @@ -14781,7 +14781,7 @@ const char *AArch64_insn_name(csh handle, unsigned int id)
#ifndef CAPSTONE_DIET
unsigned int i;

if (id >= ARM64_INS_MAX)
if (id >= ARM64_INS_ENDING)
return NULL;

if (id < ARR_SIZE(insn_name_maps))
Expand Down Expand Up @@ -14815,7 +14815,7 @@ static name_map group_name_maps[] = {
const char *AArch64_group_name(csh handle, unsigned int id)
{
#ifndef CAPSTONE_DIET
if (id >= ARM64_GRP_MAX)
if (id >= ARM64_GRP_ENDING)
return NULL;

return group_name_maps[id].name;
Expand Down
8 changes: 4 additions & 4 deletions arch/ARM/ARMMapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static name_map reg_name_maps2[] = {
const char *ARM_reg_name(csh handle, unsigned int reg)
{
#ifndef CAPSTONE_DIET
if (reg >= ARM_REG_MAX)
if (reg >= ARM_REG_ENDING)
return NULL;

return reg_name_maps[reg].name;
Expand All @@ -257,7 +257,7 @@ const char *ARM_reg_name(csh handle, unsigned int reg)
const char *ARM_reg_name2(csh handle, unsigned int reg)
{
#ifndef CAPSTONE_DIET
if (reg >= ARM_REG_MAX)
if (reg >= ARM_REG_ENDING)
return NULL;

return reg_name_maps2[reg].name;
Expand Down Expand Up @@ -14021,7 +14021,7 @@ static name_map insn_name_maps[] = {
const char *ARM_insn_name(csh handle, unsigned int id)
{
#ifndef CAPSTONE_DIET
if (id >= ARM_INS_MAX)
if (id >= ARM_INS_ENDING)
return NULL;

return insn_name_maps[id].name;
Expand Down Expand Up @@ -14072,7 +14072,7 @@ static name_map group_name_maps[] = {
const char *ARM_group_name(csh handle, unsigned int id)
{
#ifndef CAPSTONE_DIET
if (id >= ARM_GRP_MAX)
if (id >= ARM_GRP_ENDING)
return NULL;

return group_name_maps[id].name;
Expand Down
6 changes: 3 additions & 3 deletions arch/Mips/MipsMapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static name_map reg_name_maps[] = {
const char *Mips_reg_name(csh handle, unsigned int reg)
{
#ifndef CAPSTONE_DIET
if (reg >= MIPS_REG_MAX)
if (reg >= MIPS_REG_ENDING)
return NULL;

return reg_name_maps[reg].name;
Expand Down Expand Up @@ -9875,7 +9875,7 @@ static name_map insn_name_maps[] = {
const char *Mips_insn_name(csh handle, unsigned int id)
{
#ifndef CAPSTONE_DIET
if (id >= MIPS_INS_MAXIMUM)
if (id >= MIPS_INS_ENDING)
return NULL;

return insn_name_maps[id].name;
Expand Down Expand Up @@ -9933,7 +9933,7 @@ static name_map group_name_maps[] = {
const char *Mips_group_name(csh handle, unsigned int id)
{
#ifndef CAPSTONE_DIET
if (id >= MIPS_GRP_MAX)
if (id >= MIPS_GRP_ENDING)
return NULL;

return group_name_maps[id].name;
Expand Down
6 changes: 3 additions & 3 deletions arch/PowerPC/PPCMapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static name_map reg_name_maps[] = {
const char *PPC_reg_name(csh handle, unsigned int reg)
{
#ifndef CAPSTONE_DIET
if (reg >= PPC_REG_MAX)
if (reg >= PPC_REG_ENDING)
return NULL;

return reg_name_maps[reg].name;
Expand Down Expand Up @@ -7875,7 +7875,7 @@ const char *PPC_insn_name(csh handle, unsigned int id)
#ifndef CAPSTONE_DIET
unsigned int i;

if (id >= PPC_INS_MAX)
if (id >= PPC_INS_ENDING)
return NULL;

// handle special alias first
Expand Down Expand Up @@ -7911,7 +7911,7 @@ static name_map group_name_maps[] = {
const char *PPC_group_name(csh handle, unsigned int id)
{
#ifndef CAPSTONE_DIET
if (id >= PPC_GRP_MAX)
if (id >= PPC_GRP_ENDING)
return NULL;

return group_name_maps[id].name;
Expand Down
6 changes: 3 additions & 3 deletions arch/Sparc/SparcMapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static name_map reg_name_maps[] = {
const char *Sparc_reg_name(csh handle, unsigned int reg)
{
#ifndef CAPSTONE_DIET
if (reg >= SPARC_REG_MAX)
if (reg >= SPARC_REG_ENDING)
return NULL;

return reg_name_maps[reg].name;
Expand Down Expand Up @@ -3130,7 +3130,7 @@ const char *Sparc_insn_name(csh handle, unsigned int id)
#ifndef CAPSTONE_DIET
unsigned int i;

if (id >= SPARC_INS_MAX)
if (id >= SPARC_INS_ENDING)
return NULL;

// handle special alias first
Expand Down Expand Up @@ -3163,7 +3163,7 @@ static name_map group_name_maps[] = {
const char *Sparc_group_name(csh handle, unsigned int id)
{
#ifndef CAPSTONE_DIET
if (id >= SPARC_GRP_MAX)
if (id >= SPARC_GRP_ENDING)
return NULL;

return group_name_maps[id].name;
Expand Down
6 changes: 3 additions & 3 deletions arch/SystemZ/SystemZMapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static name_map reg_name_maps[] = {
const char *SystemZ_reg_name(csh handle, unsigned int reg)
{
#ifndef CAPSTONE_DIET
if (reg >= SYSZ_REG_MAX)
if (reg >= SYSZ_REG_ENDING)
return NULL;

return reg_name_maps[reg].name;
Expand Down Expand Up @@ -5041,7 +5041,7 @@ const char *SystemZ_insn_name(csh handle, unsigned int id)
#ifndef CAPSTONE_DIET
unsigned int i;

if (id >= SYSZ_INS_MAX)
if (id >= SYSZ_INS_ENDING)
return NULL;

// handle special alias first
Expand Down Expand Up @@ -5072,7 +5072,7 @@ static name_map group_name_maps[] = {
const char *SystemZ_group_name(csh handle, unsigned int id)
{
#ifndef CAPSTONE_DIET
if (id >= SYSZ_GRP_MAX)
if (id >= SYSZ_GRP_ENDING)
return NULL;

return group_name_maps[id].name;
Expand Down
6 changes: 3 additions & 3 deletions arch/X86/X86Mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ const char *X86_reg_name(csh handle, unsigned int reg)
#ifndef CAPSTONE_DIET
cs_struct *ud = (cs_struct *)handle;

if (reg >= X86_REG_MAX)
if (reg >= X86_REG_ENDING)
return NULL;

if (reg == X86_REG_EFLAGS) {
Expand Down Expand Up @@ -2118,7 +2118,7 @@ static name_map insn_name_maps[] = {
const char *X86_insn_name(csh handle, unsigned int id)
{
#ifndef CAPSTONE_DIET
if (id >= X86_INS_MAX)
if (id >= X86_INS_ENDING)
return NULL;

return insn_name_maps[id].name;
Expand Down Expand Up @@ -2183,7 +2183,7 @@ static name_map group_name_maps[] = {
const char *X86_group_name(csh handle, unsigned int id)
{
#ifndef CAPSTONE_DIET
if (id >= X86_GRP_MAX)
if (id >= X86_GRP_ENDING)
return NULL;

return group_name_maps[id].name;
Expand Down
6 changes: 3 additions & 3 deletions arch/XCore/XCoreMapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static name_map reg_name_maps[] = {
const char *XCore_reg_name(csh handle, unsigned int reg)
{
#ifndef CAPSTONE_DIET
if (reg >= XCORE_REG_MAX)
if (reg >= XCORE_REG_ENDING)
return NULL;

return reg_name_maps[reg].name;
Expand Down Expand Up @@ -1533,7 +1533,7 @@ const char *XCore_insn_name(csh handle, unsigned int id)
#ifndef CAPSTONE_DIET
unsigned int i;

if (id >= XCORE_INS_MAX)
if (id >= XCORE_INS_ENDING)
return NULL;

// handle special alias first
Expand All @@ -1558,7 +1558,7 @@ static name_map group_name_maps[] = {
const char *XCore_group_name(csh handle, unsigned int id)
{
#ifndef CAPSTONE_DIET
if (id >= XCORE_GRP_MAX)
if (id >= XCORE_GRP_ENDING)
return NULL;

return group_name_maps[id].name;
Expand Down
6 changes: 3 additions & 3 deletions bindings/java/capstone/Arm64_const.java
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ public class Arm64_const {
public static final int ARM64_REG_V29 = 257;
public static final int ARM64_REG_V30 = 258;
public static final int ARM64_REG_V31 = 259;
public static final int ARM64_REG_MAX = 260;
public static final int ARM64_REG_ENDING = 260;

// alias registers
public static final int ARM64_REG_IP1 = ARM64_REG_X16;
Expand Down Expand Up @@ -1029,7 +1029,7 @@ public class Arm64_const {
public static final int ARM64_INS_DC = 449;
public static final int ARM64_INS_AT = 450;
public static final int ARM64_INS_TLBI = 451;
public static final int ARM64_INS_MAX = 452;
public static final int ARM64_INS_ENDING = 452;

// Group of ARM64 instructions

Expand All @@ -1039,5 +1039,5 @@ public class Arm64_const {
public static final int ARM64_GRP_NEON = 3;
public static final int ARM64_GRP_CRC = 4;
public static final int ARM64_GRP_JUMP = 5;
public static final int ARM64_GRP_MAX = 6;
public static final int ARM64_GRP_ENDING = 6;
}
6 changes: 3 additions & 3 deletions bindings/java/capstone/Arm_const.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public class Arm_const {
public static final int ARM_REG_S29 = 108;
public static final int ARM_REG_S30 = 109;
public static final int ARM_REG_S31 = 110;
public static final int ARM_REG_MAX = 111;
public static final int ARM_REG_ENDING = 111;

// alias registers
public static final int ARM_REG_R13 = ARM_REG_SP;
Expand Down Expand Up @@ -703,7 +703,7 @@ public class Arm_const {
public static final int ARM_INS_SEVL = 432;
public static final int ARM_INS_VPUSH = 433;
public static final int ARM_INS_VPOP = 434;
public static final int ARM_INS_MAX = 435;
public static final int ARM_INS_ENDING = 435;

// Group of ARM instructions

Expand Down Expand Up @@ -740,5 +740,5 @@ public class Arm_const {
public static final int ARM_GRP_DPVFP = 30;
public static final int ARM_GRP_V6M = 31;
public static final int ARM_GRP_JUMP = 32;
public static final int ARM_GRP_MAX = 33;
public static final int ARM_GRP_ENDING = 33;
}
6 changes: 3 additions & 3 deletions bindings/java/capstone/Mips_const.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public class Mips_const {
public static final int MIPS_REG_MPL0 = 134;
public static final int MIPS_REG_MPL1 = 135;
public static final int MIPS_REG_MPL2 = 136;
public static final int MIPS_REG_MAX = 137;
public static final int MIPS_REG_ENDING = 137;
public static final int MIPS_REG_ZERO = MIPS_REG_0;
public static final int MIPS_REG_AT = MIPS_REG_1;
public static final int MIPS_REG_V0 = MIPS_REG_2;
Expand Down Expand Up @@ -796,7 +796,7 @@ public class Mips_const {
// special instructions
public static final int MIPS_INS_JALR_HB = 584;
public static final int MIPS_INS_JR_HB = 585;
public static final int MIPS_INS_MAXIMUM = 586;
public static final int MIPS_INS_ENDING = 586;

// Group of MIPS instructions

Expand Down Expand Up @@ -835,5 +835,5 @@ public class Mips_const {
public static final int MIPS_GRP_GP32BIT = 32;
public static final int MIPS_GRP_GP64BIT = 33;
public static final int MIPS_GRP_JUMP = 34;
public static final int MIPS_GRP_MAX = 35;
public static final int MIPS_GRP_ENDING = 35;
}
6 changes: 3 additions & 3 deletions bindings/java/capstone/Ppc_const.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public class Ppc_const {
public static final int PPC_REG_CTR8 = 175;
public static final int PPC_REG_LR8 = 176;
public static final int PPC_REG_CR1EQ = 177;
public static final int PPC_REG_MAX = 178;
public static final int PPC_REG_ENDING = 178;

// PPC instruction

Expand Down Expand Up @@ -1148,7 +1148,7 @@ public class Ppc_const {
public static final int PPC_INS_BDNZFLRL = 931;
public static final int PPC_INS_BDZTLRL = 932;
public static final int PPC_INS_BDZFLRL = 933;
public static final int PPC_INS_MAX = 934;
public static final int PPC_INS_ENDING = 934;

// Group of PPC instructions

Expand All @@ -1164,5 +1164,5 @@ public class Ppc_const {
public static final int PPC_GRP_PPC4XX = 9;
public static final int PPC_GRP_PPC6XX = 10;
public static final int PPC_GRP_JUMP = 11;
public static final int PPC_GRP_MAX = 12;
public static final int PPC_GRP_ENDING = 12;
}
6 changes: 3 additions & 3 deletions bindings/java/capstone/Sparc_const.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public class Sparc_const {
public static final int SPARC_REG_SP = 85;
public static final int SPARC_REG_Y = 86;
public static final int SPARC_REG_XCC = 87;
public static final int SPARC_REG_MAX = 88;
public static final int SPARC_REG_ENDING = 88;
public static final int SPARC_REG_O6 = SPARC_REG_SP;
public static final int SPARC_REG_I6 = SPARC_REG_FP;

Expand Down Expand Up @@ -432,7 +432,7 @@ public class Sparc_const {
public static final int SPARC_INS_XOR = 276;
public static final int SPARC_INS_RET = 277;
public static final int SPARC_INS_RETL = 278;
public static final int SPARC_INS_MAX = 279;
public static final int SPARC_INS_ENDING = 279;

// Group of SPARC instructions

Expand All @@ -445,5 +445,5 @@ public class Sparc_const {
public static final int SPARC_GRP_32BIT = 6;
public static final int SPARC_GRP_64BIT = 7;
public static final int SPARC_GRP_JUMP = 8;
public static final int SPARC_GRP_MAX = 9;
public static final int SPARC_GRP_ENDING = 9;
}
6 changes: 3 additions & 3 deletions bindings/java/capstone/Sysz_const.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class Sysz_const {
public static final int SYSZ_REG_F14 = 32;
public static final int SYSZ_REG_F15 = 33;
public static final int SYSZ_REG_R0L = 34;
public static final int SYSZ_REG_MAX = 35;
public static final int SYSZ_REG_ENDING = 35;

// SystemZ instruction

Expand Down Expand Up @@ -752,7 +752,7 @@ public class Sysz_const {
public static final int SYSZ_INS_XR = 679;
public static final int SYSZ_INS_XRK = 680;
public static final int SYSZ_INS_XY = 681;
public static final int SYSZ_INS_MAX = 682;
public static final int SYSZ_INS_ENDING = 682;

// Group of SystemZ instructions

Expand All @@ -763,5 +763,5 @@ public class Sysz_const {
public static final int SYSZ_GRP_INTERLOCKEDACCESS1 = 4;
public static final int SYSZ_GRP_LOADSTOREONCOND = 5;
public static final int SYSZ_GRP_JUMP = 6;
public static final int SYSZ_GRP_MAX = 7;
public static final int SYSZ_GRP_ENDING = 7;
}
Loading

0 comments on commit d7e42b7

Please sign in to comment.