[sword-cvs] sword/src/modules/lexdict/rawld4 rawld4.cpp,1.15,1.16

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/rawld4
In directory www:/tmp/cvs-serv29516/src/modules/lexdict/rawld4

Modified Files:
	rawld4.cpp 
Log Message:
no message

Index: rawld4.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/lexdict/rawld4/rawld4.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** rawld4.cpp	7 Oct 2002 00:14:44 -0000	1.15
--- rawld4.cpp	27 Feb 2003 07:39:37 -0000	1.16
***************
*** 90,98 ****
  	strongsPad(buf);
  
! 	*entrybuf = 0;
! 	if (!(retval = findoffset(buf, &start, &size, away))) {
! 		readtext(start, &size, &idxbuf, &entrybuf);
! 		rawFilter(entrybuf, size, 0);	// hack, decipher
! 		rawFilter(entrybuf, size*FILTERPAD, key);
  		entrySize = size;        // support getEntrySize call
  		if (!key->Persist())			// If we have our own key
--- 90,98 ----
  	strongsPad(buf);
  
! 	entryBuf = "";
! 	if (!(retval = findOffset(buf, &start, &size, away))) {
! 		readText(start, &size, &idxbuf, entryBuf);
! 		rawFilter(entryBuf, 0);	// hack, decipher
! 		rawFilter(entryBuf, key);
  		entrySize = size;        // support getEntrySize call
  		if (!key->Persist())			// If we have our own key
***************
*** 102,109 ****
  		delete [] idxbuf;
  	}
- 	else {
- 		entrybuf = new char [ 5 ];
- 		*entrybuf = 0;
- 	}
  		
  	delete [] buf;
--- 102,105 ----
***************
*** 119,132 ****
   */
  
! char *RawLD4::getRawEntry() {
  
  	char ret = getEntry();
  	if (!ret) {
  		if (!isUnicode())
! 			preptext(entrybuf);
  	}
  	else error = ret;
  
! 	return entrybuf;
  }
  
--- 115,128 ----
   */
  
! SWBuf &RawLD4::getRawEntryBuf() {
  
  	char ret = getEntry();
  	if (!ret) {
  		if (!isUnicode())
! 			prepText(entryBuf);
  	}
  	else error = ret;
  
! 	return entryBuf;
  }
  
***************
*** 156,165 ****
  
  void RawLD4::setEntry(const char *inbuf, long len) {
! 	setText(*key, inbuf, len);
  }
  
  
  void RawLD4::linkEntry(const SWKey *inkey) {
! 	linkentry(*key, *inkey);
  }
  
--- 152,161 ----
  
  void RawLD4::setEntry(const char *inbuf, long len) {
! 	doSetText(*key, inbuf, len);
  }
  
  
  void RawLD4::linkEntry(const SWKey *inkey) {
! 	doLinkEntry(*key, *inkey);
  }
  
***************
*** 172,176 ****
  
  void RawLD4::deleteEntry() {
! 	setText(*key, "");
  }
  
--- 168,172 ----
  
  void RawLD4::deleteEntry() {
! 	doSetText(*key, "");
  }