git » fp-git.git » commit 3df7d37

moved code information contents to one const variable

author ecalot
2005-07-06 19:38:42 UTC
committer ecalot
2005-07-06 19:38:42 UTC
parent a134b84bee9570ec7fc865d5e897e7c6b5b880a3

moved code information contents to one const variable

PR/src/lib/layers/dat.c +3 -2

diff --git a/PR/src/lib/layers/dat.c b/PR/src/lib/layers/dat.c
index 9a20b93..8b0d8e1 100644
--- a/PR/src/lib/layers/dat.c
+++ b/PR/src/lib/layers/dat.c
@@ -62,6 +62,7 @@ typedef struct {
 static unsigned char* readDatFile;
 static int            readDatFileSize;
 static tIndexCursor   readIndexCursor;
+static const char*    textPop1="pop1";
 
 /***************************************************************\
 |                       Checksum handling                       |
@@ -283,7 +284,7 @@ tIndexCursor dat_createCursor(unsigned char* highData,int highDataSize,unsigned
 		r.slaveItems=array2short(highData);
 
 		/* remember the first slave index name */
-		strcpy(r.slaveIndexName,"pop1");
+		strcpy(r.slaveIndexName,textPop1);
 
 		/* jump to the first index */
 		r.currentSlaveItem=0;
@@ -497,7 +498,7 @@ void mWriteCloseDatFile(int dontSave,int optionflag, const char* backupExtension
 	resourceListStartIteration(&resIndex);
 	res=resourceListGetElement(&resIndex);
 	if (res) {
-		if (!strncmp(res->id.index,"pop1",4)) { /* POP1 */
+		if (!strncmp(res->id.index,textPop1,4)) { /* POP1 */
 			do {
 				totalItems++;
 				printf("Adding item id (%s,%d)\n",res->id.index,res->id.value);