winedump: Use BOOL type where appropriate.

This commit is contained in:
Frédéric Delanoy 2013-12-24 10:24:27 +01:00 committed by Alexandre Julliard
parent dcb25e59cb
commit 2fd1b85c77
3 changed files with 42 additions and 42 deletions

View File

@ -126,7 +126,7 @@ void symbol_clear(parsed_symbol *sym)
* *
* Check if a symbol is a valid C identifier * Check if a symbol is a valid C identifier
*/ */
int symbol_is_valid_c(const parsed_symbol *sym) BOOL symbol_is_valid_c(const parsed_symbol *sym)
{ {
char *name; char *name;
@ -138,10 +138,10 @@ int symbol_is_valid_c(const parsed_symbol *sym)
while (*name) while (*name)
{ {
if (!isalnum (*name) && *name != '_') if (!isalnum (*name) && *name != '_')
return 0; return FALSE;
name++; name++;
} }
return 1; return TRUE;
} }

View File

@ -46,7 +46,7 @@ enum TYPEKIND {
struct seg_t; struct seg_t;
typedef int (*dump_seg_t)(struct seg_t*); typedef BOOL (*dump_seg_t)(struct seg_t*);
typedef struct seg_t { typedef struct seg_t {
const char *name; const char *name;
@ -59,7 +59,7 @@ static int offset=0;
static int indent; static int indent;
static int typeinfo_cnt; static int typeinfo_cnt;
static int header_flags = 0; static int header_flags = 0;
static int msft_eof = 0; static BOOL msft_eof = FALSE;
static int msft_typeinfo_offs[1000]; static int msft_typeinfo_offs[1000];
static int msft_typeinfo_kind[1000]; static int msft_typeinfo_kind[1000];
@ -73,7 +73,7 @@ static const void *tlb_read(int size) {
if(ret) if(ret)
offset += size; offset += size;
else else
msft_eof = -1; msft_eof = TRUE;
return ret; return ret;
} }
@ -277,7 +277,7 @@ static void dump_msft_typeinfobase(void)
print_end_block(); print_end_block();
} }
static int dump_msft_typeinfobases(seg_t *seg) static BOOL dump_msft_typeinfobases(seg_t *seg)
{ {
int i; int i;
@ -285,7 +285,7 @@ static int dump_msft_typeinfobases(seg_t *seg)
dump_msft_typeinfobase(); dump_msft_typeinfobase();
assert(offset == seg->offset+seg->length); assert(offset == seg->offset+seg->length);
return -1; return TRUE;
} }
static void dump_msft_impinfo(int n) static void dump_msft_impinfo(int n)
@ -299,7 +299,7 @@ static void dump_msft_impinfo(int n)
print_end_block(); print_end_block();
} }
static int dump_msft_impinfos(seg_t *seg) static BOOL dump_msft_impinfos(seg_t *seg)
{ {
int i; int i;
@ -307,7 +307,7 @@ static int dump_msft_impinfos(seg_t *seg)
dump_msft_impinfo(i); dump_msft_impinfo(i);
assert(offset == seg->offset+seg->length); assert(offset == seg->offset+seg->length);
return -1; return TRUE;
} }
static void dump_msft_impfile(int n) static void dump_msft_impfile(int n)
@ -322,7 +322,7 @@ static void dump_msft_impfile(int n)
print_end_block(); print_end_block();
} }
static int dump_msft_impfiles(seg_t *seg) static BOOL dump_msft_impfiles(seg_t *seg)
{ {
int i; int i;
@ -330,10 +330,10 @@ static int dump_msft_impfiles(seg_t *seg)
dump_msft_impfile(i); dump_msft_impfile(i);
assert(offset == seg->offset+seg->length); assert(offset == seg->offset+seg->length);
return -1; return TRUE;
} }
static int dump_msft_reftabs(seg_t *seg) static BOOL dump_msft_reftabs(seg_t *seg)
{ {
print_begin_block("RefTab"); print_begin_block("RefTab");
@ -341,10 +341,10 @@ static int dump_msft_reftabs(seg_t *seg)
print_end_block(); print_end_block();
return -1; return TRUE;
} }
static int dump_msft_guidhashtab(seg_t *seg) static BOOL dump_msft_guidhashtab(seg_t *seg)
{ {
print_begin_block("GuidHashTab"); print_begin_block("GuidHashTab");
@ -353,7 +353,7 @@ static int dump_msft_guidhashtab(seg_t *seg)
print_end_block(); print_end_block();
assert(offset == seg->offset+seg->length); assert(offset == seg->offset+seg->length);
return -1; return TRUE;
} }
static void dump_msft_guidentry(int n) static void dump_msft_guidentry(int n)
@ -367,7 +367,7 @@ static void dump_msft_guidentry(int n)
print_end_block(); print_end_block();
} }
static int dump_msft_guidtab(seg_t *seg) static BOOL dump_msft_guidtab(seg_t *seg)
{ {
int i; int i;
@ -375,17 +375,17 @@ static int dump_msft_guidtab(seg_t *seg)
dump_msft_guidentry(i); dump_msft_guidentry(i);
assert(offset == seg->offset+seg->length); assert(offset == seg->offset+seg->length);
return -1; return TRUE;
} }
static int dump_msft_namehashtab(seg_t *seg) static BOOL dump_msft_namehashtab(seg_t *seg)
{ {
print_begin_block("NameHashTab"); print_begin_block("NameHashTab");
dump_binary(seg->length); /* FIXME */ dump_binary(seg->length); /* FIXME */
print_end_block(); print_end_block();
return -1; return TRUE;
} }
static void dump_string(int len, int align_off) static void dump_string(int len, int align_off)
@ -415,7 +415,7 @@ static void dump_msft_name(int base, int n)
print_end_block(); print_end_block();
} }
static int dump_msft_nametab(seg_t *seg) static BOOL dump_msft_nametab(seg_t *seg)
{ {
int i, base = offset; int i, base = offset;
@ -423,7 +423,7 @@ static int dump_msft_nametab(seg_t *seg)
dump_msft_name(base, i); dump_msft_name(base, i);
assert(offset == seg->offset+seg->length); assert(offset == seg->offset+seg->length);
return -1; return TRUE;
} }
static void dump_msft_string(int n) static void dump_msft_string(int n)
@ -447,7 +447,7 @@ static void dump_msft_string(int n)
print_end_block(); print_end_block();
} }
static int dump_msft_stringtab(seg_t *seg) static BOOL dump_msft_stringtab(seg_t *seg)
{ {
int i; int i;
@ -455,7 +455,7 @@ static int dump_msft_stringtab(seg_t *seg)
dump_msft_string(i); dump_msft_string(i);
assert(offset == seg->offset+seg->length); assert(offset == seg->offset+seg->length);
return -1; return TRUE;
} }
static void dump_msft_typedesc(int n) static void dump_msft_typedesc(int n)
@ -468,7 +468,7 @@ static void dump_msft_typedesc(int n)
print_end_block(); print_end_block();
} }
static int dump_msft_typedesctab(seg_t *seg) static BOOL dump_msft_typedesctab(seg_t *seg)
{ {
int i; int i;
@ -480,20 +480,20 @@ static int dump_msft_typedesctab(seg_t *seg)
print_end_block(); print_end_block();
assert(offset == seg->offset+seg->length); assert(offset == seg->offset+seg->length);
return -1; return TRUE;
} }
static int dump_msft_arraydescs(seg_t *seg) static BOOL dump_msft_arraydescs(seg_t *seg)
{ {
print_begin_block("ArrayDescriptions"); print_begin_block("ArrayDescriptions");
dump_binary(seg->length); /* FIXME */ dump_binary(seg->length); /* FIXME */
print_end_block(); print_end_block();
return -1; return TRUE;
} }
static int dump_msft_custdata(seg_t *seg) static BOOL dump_msft_custdata(seg_t *seg)
{ {
unsigned short vt; unsigned short vt;
unsigned i, n; unsigned i, n;
@ -520,7 +520,7 @@ static int dump_msft_custdata(seg_t *seg)
} }
print_end_block(); print_end_block();
return -1; return TRUE;
} }
static void dump_msft_cdguid(int n) static void dump_msft_cdguid(int n)
@ -534,7 +534,7 @@ static void dump_msft_cdguid(int n)
print_end_block(); print_end_block();
} }
static int dump_msft_cdguids(seg_t *seg) static BOOL dump_msft_cdguids(seg_t *seg)
{ {
int i; int i;
@ -542,25 +542,25 @@ static int dump_msft_cdguids(seg_t *seg)
dump_msft_cdguid(i); dump_msft_cdguid(i);
assert(offset == seg->offset+seg->length); assert(offset == seg->offset+seg->length);
return -1; return TRUE;
} }
static int dump_msft_res0e(seg_t *seg) static BOOL dump_msft_res0e(seg_t *seg)
{ {
print_begin_block("res0e"); print_begin_block("res0e");
dump_binary(seg->length); dump_binary(seg->length);
print_end_block(); print_end_block();
return -1; return TRUE;
} }
static int dump_msft_res0f(seg_t *seg) static BOOL dump_msft_res0f(seg_t *seg)
{ {
print_begin_block("res0f"); print_begin_block("res0f");
dump_binary(seg->length); dump_binary(seg->length);
print_end_block(); print_end_block();
return -1; return TRUE;
} }
static void dump_msft_func(int n) static void dump_msft_func(int n)
@ -658,7 +658,7 @@ static void dump_msft_coclass(int n)
dump_msft_ref(i); dump_msft_ref(i);
} }
static int dump_msft_typeinfo(int n) static BOOL dump_msft_typeinfo(int n)
{ {
int i; int i;
@ -667,7 +667,7 @@ static int dump_msft_typeinfo(int n)
if((msft_typeinfo_kind[n] & 0xf) == TKIND_COCLASS) { if((msft_typeinfo_kind[n] & 0xf) == TKIND_COCLASS) {
dump_msft_coclass(n); dump_msft_coclass(n);
print_end_block(); print_end_block();
return -1; return TRUE;
} }
print_dec("size"); print_dec("size");
@ -698,7 +698,7 @@ static int dump_msft_typeinfo(int n)
print_end_block(); print_end_block();
return -1; return TRUE;
} }
static seg_t segdir[] = { static seg_t segdir[] = {
@ -743,7 +743,7 @@ static void dump_msft_segdir(void)
print_end_block(); print_end_block();
} }
static int dump_offset(void) static BOOL dump_offset(void)
{ {
int i; int i;
@ -755,7 +755,7 @@ static int dump_offset(void)
if(msft_typeinfo_offs[i] == offset) if(msft_typeinfo_offs[i] == offset)
return dump_msft_typeinfo(i); return dump_msft_typeinfo(i);
return 0; return FALSE;
} }
enum FileSig get_kind_msft(void) enum FileSig get_kind_msft(void)

View File

@ -170,7 +170,7 @@ int symbol_search (parsed_symbol *symbol);
void symbol_clear(parsed_symbol *sym); void symbol_clear(parsed_symbol *sym);
int symbol_is_valid_c(const parsed_symbol *sym); BOOL symbol_is_valid_c(const parsed_symbol *sym);
const char *symbol_get_call_convention(const parsed_symbol *sym); const char *symbol_get_call_convention(const parsed_symbol *sym);