]> git.sur5r.net Git - cc65/commitdiff
The string with index zero is the first string in the string pool.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 21 Aug 2011 19:35:51 +0000 (19:35 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 21 Aug 2011 19:35:51 +0000 (19:35 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@5252 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65/spool.c
src/ca65/spool.h

index 0b77ef6157d83206f930e7066e3eb607907e9322..0cf829c063fe212af8746cf4c6733505c333ec02 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2003      Ullrich von Bassewitz                                       */
-/*               Römerstrasse 52                                             */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 2003-2011, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -83,7 +83,11 @@ void WriteStrPool (void)
 void InitStrPool (void)
 /* Initialize the string pool */
 {
+    /* Create a string pool */
     StrPool = NewStringPool (1103);
+
+    /* Insert an empty string. It will have string id 0 */
+    SP_AddStr (StrPool, "");
 }
 
 
index 050e63abbe6b898d27bc7f747aed2f4c9cbe6932..d20b3014bff2b43e757875fcef41ad9109d94851 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2003      Ullrich von Bassewitz                                       */
-/*               Römerstrasse 52                                             */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 2003-2011, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 
 
 
+/* The index for an empty string */
+#define EMPTY_STRING_ID         0U
+
+/* The string pool */
 extern StringPool* StrPool;