]> git.sur5r.net Git - cc65/blobdiff - src/cc65/litpool.c
Improved optimizations
[cc65] / src / cc65 / litpool.c
index b1675ad870d2c102924d3c53d6d84ad28ad2517b..e5bc9b737a29ca5bb652a02d6379a76057ac2315 100644 (file)
@@ -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 */
 {