From: uz Date: Sun, 21 Aug 2011 19:35:51 +0000 (+0000) Subject: The string with index zero is the first string in the string pool. X-Git-Tag: V2.13.3~210 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f2de523b5d20d33a642e6a64bea9594a1723f865;p=cc65 The string with index zero is the first string in the string pool. git-svn-id: svn://svn.cc65.org/cc65/trunk@5252 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/spool.c b/src/ca65/spool.c index 0b77ef615..0cf829c06 100644 --- a/src/ca65/spool.c +++ b/src/ca65/spool.c @@ -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, ""); } diff --git a/src/ca65/spool.h b/src/ca65/spool.h index 050e63abb..d20b3014b 100644 --- a/src/ca65/spool.h +++ b/src/ca65/spool.h @@ -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 */ @@ -49,6 +49,10 @@ +/* The index for an empty string */ +#define EMPTY_STRING_ID 0U + +/* The string pool */ extern StringPool* StrPool;