From 9a34fdb41e0a3905f8aa0262dbda778ff5140709 Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 10 Aug 2003 16:27:35 +0000 Subject: [PATCH] Two parts were not converted from using embedded strings to use of the new string table. git-svn-id: svn://svn.cc65.org/cc65/trunk@2258 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/od65/dump.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/od65/dump.c b/src/od65/dump.c index 6a2256a54..d3f52a9e7 100644 --- a/src/od65/dump.c +++ b/src/od65/dump.c @@ -434,7 +434,7 @@ void DumpObjSegments (FILE* F, unsigned long Offset) /* Read the data for one segments */ unsigned long DataSize = Read32 (F); unsigned long NextSeg = ftell (F) + DataSize; - char* Name = ReadStr (F); + const char* Name = GetString (&StrPool, ReadVar (F)); unsigned Len = strlen (Name); unsigned long Size = Read32 (F); unsigned Align = (1U << Read8 (F)); @@ -444,10 +444,10 @@ void DumpObjSegments (FILE* F, unsigned long Offset) /* Get the description for the type */ const char* TypeDesc; switch (Type) { - case SEGTYPE_DEFAULT: TypeDesc = "SEGTYPE_DEFAULT"; break; - case SEGTYPE_ABS: TypeDesc = "SEGTYPE_ABS"; break; - case SEGTYPE_ZP: TypeDesc = "SEGTYPE_ZP"; break; - case SEGTYPE_FAR: TypeDesc = "SEGTYPE_FAR"; break; + case SEGTYPE_DEFAULT: TypeDesc = "SEGTYPE_DEFAULT"; break; + case SEGTYPE_ABS: TypeDesc = "SEGTYPE_ABS"; break; + case SEGTYPE_ZP: TypeDesc = "SEGTYPE_ZP"; break; + case SEGTYPE_FAR: TypeDesc = "SEGTYPE_FAR"; break; default: TypeDesc = "SEGTYPE_UNKNOWN"; break; } @@ -461,9 +461,6 @@ void DumpObjSegments (FILE* F, unsigned long Offset) printf (" Type:%22s0x%02X (%s)\n", "", Type, TypeDesc); printf (" Fragment count:%16lu\n", FragCount); - /* Free the Name */ - xfree (Name); - /* Seek to the end of the segment data (start of next) */ FileSetPos (F, NextSeg); } @@ -649,7 +646,7 @@ void DumpObjDbgSyms (FILE* F, unsigned long Offset) /* Read the data for one symbol */ Type = Read8 (F); ReadData (F, ConDes, GET_EXP_CONDES_COUNT (Type)); - Name = GetString (&StrPool, ReadVar (F)); + Name = GetString (&StrPool, ReadVar (F)); Len = strlen (Name); if (IS_EXP_EXPR (Type)) { SkipExpr (F); @@ -763,7 +760,7 @@ void DumpObjSegSize (FILE* F, unsigned long Offset) /* Read the data for one segments */ unsigned long DataSize = Read32 (F); unsigned long NextSeg = ftell (F) + DataSize; - char* Name = ReadStr (F); + const char* Name = GetString (&StrPool, ReadVar (F)); unsigned Len = strlen (Name); unsigned long Size = Read32 (F); @@ -775,12 +772,9 @@ void DumpObjSegSize (FILE* F, unsigned long Offset) /* Print the size for this segment */ printf (" %s:%*s%6lu\n", Name, 24-Len, "", Size); - /* Free the Name */ - xfree (Name); - /* Seek to the end of the segment data (start of next) */ FileSetPos (F, NextSeg); - } + } /* Destroy the string pool */ DestroyStrPool (&StrPool); -- 2.39.5