Nikolay Sivov : winedump: Improve typelib header dumping.
Alexandre Julliard
julliard at winehq.org
Mon Mar 17 15:51:35 CDT 2014
Module: wine
Branch: master
Commit: 74f39d20d55ec6c163ea0517eba62bc0c1ea0c43
URL: http://source.winehq.org/git/wine.git/?a=commit;h=74f39d20d55ec6c163ea0517eba62bc0c1ea0c43
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun Mar 16 18:35:04 2014 +0400
winedump: Improve typelib header dumping.
---
tools/winedump/tlb.c | 37 ++++++++++++++++++++++++++++++-------
1 file changed, 30 insertions(+), 7 deletions(-)
diff --git a/tools/winedump/tlb.c b/tools/winedump/tlb.c
index 9c3067b..bcaa859 100644
--- a/tools/winedump/tlb.c
+++ b/tools/winedump/tlb.c
@@ -214,6 +214,29 @@ static void dump_binary(int n)
printf("\n");
}
+static int dump_msft_varflags(void)
+{
+ static const char *syskind[] = {
+ "SYS_WIN16", "SYS_WIN32", "SYS_MAC", "SYS_WIN64", "unknown"
+ };
+ int kind, flags;
+
+ print_offset();
+ flags = tlb_read_int();
+ kind = flags & 0xf;
+ if (kind > 3) kind = 4;
+ printf("varflags = %08x, syskind = %s\n", flags, syskind[kind]);
+ return flags;
+}
+
+static void dump_msft_version(void)
+{
+ int version;
+ print_offset();
+ version = tlb_read_int();
+ printf("version = %d.%d\n", version & 0xff, version >> 16);
+}
+
static void dump_msft_header(void)
{
print_begin_block("Header");
@@ -222,15 +245,15 @@ static void dump_msft_header(void)
print_hex("magic2");
print_hex("posguid");
print_hex("lcid");
- print_hex("lsid2");
- header_flags = print_hex("varflags");
- print_hex("version");
+ print_hex("lcid2");
+ header_flags = dump_msft_varflags();
+ dump_msft_version();
print_hex("flags");
typeinfo_cnt = print_dec("ntypeinfos");
- print_hex("helpstring");
- print_hex("helpstringcontext");
- print_hex("helpcontext");
- print_dec("nametablecont");
+ print_dec("helpstring");
+ print_dec("helpstringcontext");
+ print_dec("helpcontext");
+ print_dec("nametablecount");
print_dec("nametablechars");
print_hex("NameOffset");
print_hex("helpfile");
More information about the wine-cvs
mailing list