X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Flitpool.c;h=e026db0d49af72c85687d75068e9ef46c7bfa785;hb=f196e7c5c93c3f29f1bb672d70be20e120d68729;hp=b1675ad870d2c102924d3c53d6d84ad28ad2517b;hpb=c090f90172662e0a878545ca5c06b9d1a54c3f01;p=cc65 diff --git a/src/cc65/litpool.c b/src/cc65/litpool.c index b1675ad87..e026db0d4 100644 --- a/src/cc65/litpool.c +++ b/src/cc65/litpool.c @@ -6,10 +6,10 @@ /* */ /* */ /* */ -/* (C) 1998 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@musoftware.de */ +/* (C) 1998-2004 Ullrich von Bassewitz */ +/* Römerstraße 52 */ +/* D-70794 Filderstadt */ +/* EMail: uz@cc65.org */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */ @@ -37,7 +37,6 @@ /* common */ #include "check.h" -#include "strbuf.h" #include "tgttrans.h" /* cc65 */ @@ -94,7 +93,7 @@ void DumpLiteralPool (void) } /* Switch to the data segment */ - if (WriteableStrings) { + if (IS_Get (&WritableStrings)) { g_usedata (); } else { g_userodata (); @@ -165,6 +164,17 @@ const char* GetLiteral (unsigned Offs) +void GetLiteralStrBuf (StrBuf* Target, unsigned Offs) +/* Copy the string starting at Offs and lasting to the end of the buffer + * into Target. + */ +{ + CHECK (Offs <= SB_GetLen (&LiteralPool)); + SB_Slice (Target, &LiteralPool, Offs, SB_GetLen (&LiteralPool) - Offs); +} + + + void PrintLiteralPoolStats (FILE* F) /* Print statistics about the literal space used */ {