[sword-cvs] sword/src/modules/lexdict/zld zld.cpp,1.5,1.6

sword@www.crosswire.org sword@www.crosswire.org
Thu, 27 Feb 2003 00:39:39 -0700


Update of /usr/local/cvsroot/sword/src/modules/lexdict/zld
In directory www:/tmp/cvs-serv29516/src/modules/lexdict/zld

Modified Files:
	zld.cpp 
Log Message:
no message

Index: zld.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/lexdict/zld/zld.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** zld.cpp	7 Oct 2002 00:14:44 -0000	1.5
--- zld.cpp	27 Feb 2003 07:39:37 -0000	1.6
***************
*** 88,99 ****
  	strongsPad(buf);
  
! 	*entrybuf = 0;
  	if (!(retval = findKeyIndex(buf, &index, away))) {
  		getText(index, &idxbuf, &ebuf);
  		size = strlen(ebuf) + 1;
! 		entrybuf = new char [ size * FILTERPAD ];
! 		strcpy(entrybuf, ebuf);
  
! 		rawFilter(entrybuf, size*FILTERPAD, key);
  
  		entrySize = size;        // support getEntrySize call
--- 88,98 ----
  	strongsPad(buf);
  
! 	entryBuf = "";
  	if (!(retval = findKeyIndex(buf, &index, away))) {
  		getText(index, &idxbuf, &ebuf);
  		size = strlen(ebuf) + 1;
! 		entryBuf = ebuf;
  
! 		rawFilter(entryBuf, key);
  
  		entrySize = size;        // support getEntrySize call
***************
*** 105,113 ****
  		free(ebuf);
  	}
- 	else {
- 		entrybuf = new char [ 5 ];
- 		entrybuf[0] = 0;
- 		entrybuf[1] = 0;
- 	}
  		
  	delete [] buf;
--- 104,107 ----
***************
*** 123,132 ****
   */
  
! char *zLD::getRawEntry() {
  	if (!getEntry() && !isUnicode()) {
! 		prepText(entrybuf);
  	}
  
! 	return entrybuf;
  }
  
--- 117,126 ----
   */
  
! SWBuf &zLD::getRawEntryBuf() {
  	if (!getEntry() && !isUnicode()) {
! 		prepText(entryBuf);
  	}
  
! 	return entryBuf;
  }