Eric Pouech : winedump: Const correctness fixes.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Dec 13 04:58:25 CST 2005
Module: wine
Branch: refs/heads/master
Commit: a6e27ea9c0a0f901041b3973860d944831db2ce9
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=a6e27ea9c0a0f901041b3973860d944831db2ce9
Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date: Tue Dec 13 11:11:38 2005 +0100
winedump: Const correctness fixes.
---
tools/winedump/le.c | 10 +++++-----
tools/winedump/ne.c | 12 ++++++------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/tools/winedump/le.c b/tools/winedump/le.c
index 57b34a2..16646f3 100644
--- a/tools/winedump/le.c
+++ b/tools/winedump/le.c
@@ -228,15 +228,15 @@ static void dump_le_header( const IMAGE_
static void dump_le_objects( const void *base, const IMAGE_VXD_HEADER *le )
{
- struct o32_obj *pobj;
+ const struct o32_obj *pobj;
unsigned int i;
printf("\nObject table:\n");
- pobj = (struct o32_obj *)((const unsigned char *)le + le->e32_objtab);
+ pobj = (const struct o32_obj *)((const unsigned char *)le + le->e32_objtab);
for (i = 0; i < le->e32_objcnt; i++)
{
unsigned int j;
- struct o32_map *pmap=0;
+ const struct o32_map *pmap=0;
printf(" Obj. Rel.Base Codesize Flags Tableidx Tablesize Name\n");
printf(" %04X %08lx %08lx %08lx %08lx %08lx ", i + 1,
@@ -272,7 +272,7 @@ static void dump_le_objects( const void
printf(" Page tables:\n");
printf(" Tableidx Offset Flags\n");
- pmap = (struct o32_map *)((const unsigned char *)le + le->e32_objmap);
+ pmap = (const struct o32_map *)((const unsigned char *)le + le->e32_objmap);
pmap = &(pmap[pobj->o32_pagemap - 1]);
for (j = 0; j < pobj->o32_mapsize; j++)
{
@@ -300,7 +300,7 @@ static void dump_le_names( const void *b
if (le->e32_cbnrestab)
{
printf( "\nNon-resident name table:\n" );
- pstr = (unsigned char *)base + le->e32_nrestab;
+ pstr = (const unsigned char *)base + le->e32_nrestab;
while (*pstr)
{
printf( " %4d: %*.*s\n", get_word(pstr + *pstr + 1), *pstr, *pstr,
diff --git a/tools/winedump/ne.c b/tools/winedump/ne.c
index 47b3dae..2cc31a7 100644
--- a/tools/winedump/ne.c
+++ b/tools/winedump/ne.c
@@ -108,7 +108,7 @@ static void dump_ne_names( const void *b
if (ne->ne_cbnrestab)
{
printf( "\nNon-resident name table:\n" );
- pstr = (unsigned char *)base + ne->ne_nrestab;
+ pstr = (const unsigned char *)base + ne->ne_nrestab;
while (*pstr)
{
printf( " %4d: %*.*s\n", get_word(pstr + *pstr + 1), *pstr, *pstr, pstr + 1 );
@@ -171,7 +171,7 @@ static void dump_ne_resources( const voi
static const char *get_export_name( const void *base, const IMAGE_OS2_HEADER *ne, int ordinal )
{
static char name[256];
- BYTE *pstr;
+ const BYTE *pstr;
int pass = 0;
/* search the resident names */
@@ -180,13 +180,13 @@ static const char *get_export_name( cons
{
if (pass == 0) /* resident names */
{
- pstr = (BYTE *)ne + ne->ne_restab;
+ pstr = (const BYTE *)ne + ne->ne_restab;
if (*pstr) pstr += *pstr + 1 + sizeof(WORD); /* skip first entry (module name) */
}
else /* non-resident names */
{
if (!ne->ne_cbnrestab) break;
- pstr = (BYTE *)base + ne->ne_nrestab;
+ pstr = (const BYTE *)base + ne->ne_nrestab;
}
while (*pstr)
{
@@ -207,8 +207,8 @@ static const char *get_export_name( cons
static void dump_ne_exports( const void *base, const IMAGE_OS2_HEADER *ne )
{
- BYTE *ptr = (BYTE *)ne + ne->ne_enttab;
- BYTE *end = ptr + ne->ne_cbenttab;
+ const BYTE *ptr = (const BYTE *)ne + ne->ne_enttab;
+ const BYTE *end = ptr + ne->ne_cbenttab;
int i, ordinal = 1;
if (!ne->ne_cbenttab || !*ptr) return;
More information about the wine-cvs
mailing list