winedump: Add print_string() helper.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2018-07-10 11:41:49 +08:00 committed by Alexandre Julliard
parent 597b1804c1
commit 9723142c2a
1 changed files with 8 additions and 2 deletions

View File

@ -517,11 +517,17 @@ static BOOL dump_msft_namehashtab(seg_t *seg)
return TRUE;
}
static void dump_string(int len, int align_off)
static void print_string(int len)
{
printf("\"");
fwrite(tlb_read(len), len, 1, stdout);
printf("\" ");
printf("\"");
}
static void dump_string(int len, int align_off)
{
print_string(len);
printf(" ");
while((len++ + align_off) & 3)
printf("\\%2.2x", tlb_read_byte());
}