X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Flitpool.c;h=e5bc9b737a29ca5bb652a02d6379a76057ac2315;hb=4a667ead00c10797fb57298b3dd33c2efc6c8d3f;hp=b1675ad870d2c102924d3c53d6d84ad28ad2517b;hpb=c090f90172662e0a878545ca5c06b9d1a54c3f01;p=cc65 diff --git a/src/cc65/litpool.c b/src/cc65/litpool.c index b1675ad87..e5bc9b737 100644 --- a/src/cc65/litpool.c +++ b/src/cc65/litpool.c @@ -37,7 +37,6 @@ /* common */ #include "check.h" -#include "strbuf.h" #include "tgttrans.h" /* cc65 */ @@ -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 */ {