winedump: Const correctness fixes.
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_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 @@
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 @@
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 @@
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 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 @@
{
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 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;