X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Flitpool.h;h=99fd27bfbe15c0fda7d2ce18a8b8bb6b68a0c5d4;hb=3f4096d3030095605f28b4cfa73563c53a563df6;hp=f168d89cf01bf86d95a6ac71794facdfd0ec3edf;hpb=53dd513176425872128ef26031d00952ef7a0628;p=cc65 diff --git a/src/cc65/litpool.h b/src/cc65/litpool.h index f168d89cf..99fd27bfb 100644 --- a/src/cc65/litpool.h +++ b/src/cc65/litpool.h @@ -6,10 +6,10 @@ /* */ /* */ /* */ -/* (C) 1998 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@musoftware.de */ +/* (C) 1998-2001 Ullrich von Bassewitz */ +/* Wacholderweg 14 */ +/* D-70597 Stuttgart */ +/* EMail: uz@cc65.org */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */ @@ -38,22 +38,32 @@ +#include + +/* common */ +#include "strbuf.h" + + + /*****************************************************************************/ -/* Data */ +/* Data */ /*****************************************************************************/ -extern unsigned LiteralLabel; /* Pool asm label */ +extern unsigned LiteralPoolLabel; /* Pool asm label */ /*****************************************************************************/ -/* Code */ +/* Code */ /*****************************************************************************/ +void InitLiteralPool (void); +/* Initialize the literal pool */ + void TranslateLiteralPool (unsigned Offs); /* Translate the literals starting from the given offset into the target * charset. @@ -62,10 +72,10 @@ void TranslateLiteralPool (unsigned Offs); void DumpLiteralPool (void); /* Dump the literal pool */ -unsigned GetLiteralOffs (void); +unsigned GetLiteralPoolOffs (void); /* Return the current offset into the literal pool */ -void ResetLiteralOffs (unsigned Offs); +void ResetLiteralPoolOffs (unsigned Offs); /* Reset the offset into the literal pool to some earlier value, effectively * removing values from the pool. */ @@ -81,7 +91,12 @@ unsigned AddLiteral (const char* S); const char* GetLiteral (unsigned Offs); /* Get a pointer to the literal with the given offset in the pool */ -void PrintLiteralStats (FILE* F); +void GetLiteralStrBuf (StrBuf* Target, unsigned Offs); +/* Copy the string starting at Offs and lasting to the end of the buffer + * into Target. + */ + +void PrintLiteralPoolStats (FILE* F); /* Print statistics about the literal space used */ @@ -91,3 +106,4 @@ void PrintLiteralStats (FILE* F); +