Intentation consistency and misc formatting fixes

This commit is contained in:
gergely.erdelyi 2009-05-23 16:35:50 +00:00
parent f2e422d208
commit 7d468f3b94
13 changed files with 620 additions and 634 deletions

View File

@ -11,7 +11,6 @@ typedef struct
%feature("director") DBG_Hooks;
%inline %{
int idaapi DBG_Callback(void *ud, int notification_code, va_list va);
class DBG_Hooks
{

View File

@ -40,7 +40,7 @@ ea_t get_fchunk_referer(ea_t ea, size_t idx)
{
func_t *pfn = get_fchunk(ea);
func_parent_iterator_t dummy(pfn); // read referer info
if ( idx >= pfn->refqty || pfn->referers == NULL )
if (idx >= pfn->refqty || pfn->referers == NULL)
return BADADDR;
return pfn->referers[idx];
}

View File

@ -3,7 +3,6 @@
%include "idd.hpp"
%inline %{
char get_event_module_name(const debug_event_t* ev, char *buf, size_t bufsize)
{
qstrncpy(buf, ev->modinfo.name, bufsize);
@ -51,5 +50,4 @@ bool can_exc_continue(const debug_event_t* ev)
{
return ev->exc.can_cont;
}
%}

View File

@ -66,7 +66,6 @@
%feature("director") IDB_Hooks;
%inline %{
int idaapi IDB_Callback(void *ud, int notification_code, va_list va);
class IDB_Hooks
{

View File

@ -22,12 +22,12 @@
%include "segment.hpp"
%inline %{
sel_t get_defsr(segment_t *s, int reg)
{
sel_t get_defsr(segment_t *s, int reg)
{
return s->defsr[reg];
}
void set_defsr(segment_t *s, int reg, sel_t value)
{
}
void set_defsr(segment_t *s, int reg, sel_t value)
{
s->defsr[reg] = value;
}
}
%}

View File

@ -30,7 +30,7 @@
%define %cstring_output_maxstr_none(TYPEMAP, SIZE)
%typemap (default) SIZE {
$1 = MAXSTR;
}
}
%typemap(in,numinputs=0) (TYPEMAP, SIZE) {
#ifdef __cplusplus
$1 = ($1_ltype) new char[MAXSTR+1];
@ -145,7 +145,7 @@
}
%enddef
// Check that the argument is a callable Python object
// Check that the argument is a callable Python object
%typemap(in) PyObject *pyfunc {
if (!PyCallable_Check($input)) {
PyErr_SetString(PyExc_TypeError, "Expecting a callable object");

View File

@ -184,10 +184,8 @@ int idc_parse_types(const char *input, int flags)
{
int hti = ((flags >> 4) & 7) << HTI_PAK_SHIFT;
if ( (flags & 1) != 0 )
{
if ((flags & 1) != 0)
hti |= HTI_FIL;
}
return parse_types2(input, (flags & 2) == 0 ? msg : NULL, hti);
}
@ -201,10 +199,8 @@ char *idc_get_type(ea_t ea, char *buf, size_t bufsize)
{
int code = print_type_to_one_line(buf, bufsize, idati, type,
NULL, NULL, fnames);
if ( code == T_NORMAL )
{
if (code == T_NORMAL)
return buf;
}
} \
return NULL;
}
@ -218,10 +214,8 @@ char *idc_guess_type(ea_t ea, char *buf, size_t bufsize)
{
int code = print_type_to_one_line(buf, bufsize, idati, type,
NULL, NULL, fnames);
if ( code == T_NORMAL )
{
if (code == T_NORMAL)
return buf;
}
} \
return NULL;
}
@ -291,5 +285,4 @@ char idc_get_local_type_name(int ordinal, char *buf, size_t bufsize)
qstrncpy(buf, name, bufsize);
return true;
}
%}

View File

@ -15,10 +15,7 @@ insn_t * get_current_instruction()
op_t *get_instruction_operand(insn_t *ins, int n)
{
if (!ins)
{
return NULL;
}
return &(ins->Operands[n]);
}
}