[sword-cvs] sword/utilities cipherraw.cpp,1.10,1.11 ciphertest.cpp,1.6,1.7

sword@www.crosswire.org sword@www.crosswire.org
Tue, 12 Aug 2003 03:37:09 -0700


Update of /usr/local/cvsroot/sword/utilities
In directory www:/tmp/cvs-serv6658/utilities

Modified Files:
	cipherraw.cpp ciphertest.cpp 
Log Message:



Index: cipherraw.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/utilities/cipherraw.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cipherraw.cpp	27 Feb 2003 08:17:06 -0000	1.10
+++ cipherraw.cpp	12 Aug 2003 10:37:07 -0000	1.11
@@ -80,14 +80,18 @@
 				SWBuf tmpbuf;
 				rawdrv->readText(key.Testament(), offset, size, tmpbuf);
 				zobj->Buf(tmpbuf.c_str(), size);
-				zobj->cipherBuf((unsigned int *)&size);
+				unsigned long ulSize = size;
+				zobj->cipherBuf(&ulSize);
+				size = (unsigned int)ulSize;
 			}
 			offset = lseek(ofd[key.Testament() - 1], 0, SEEK_CUR);
 			tmpoff = lseek(oxfd[key.Testament() - 1], 0, SEEK_CUR);
 			printf("%s: (%ld) NEW offset: %ld; size: %d\n", (const char *)key, tmpoff, offset, size);
 			write(oxfd[key.Testament() - 1], &offset, 4);
+			unsigned long ulSize = size;
 			if (size) 
-				write(ofd[key.Testament() - 1], zobj->cipherBuf((unsigned int *)&size), size);
+				write(ofd[key.Testament() - 1], zobj->cipherBuf(&ulSize), size);
+			size = (unsigned int)ulSize;
 			lzoffset = offset;
 			write(oxfd[key.Testament() - 1], &size, 2);
 			lzsize = size;

Index: ciphertest.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/utilities/ciphertest.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ciphertest.cpp	27 Feb 2003 08:17:06 -0000	1.6
+++ ciphertest.cpp	12 Aug 2003 10:37:07 -0000	1.7
@@ -24,7 +24,7 @@
 	RawVerse *rawdrv;
 	long offset;
 	unsigned short size;
-	unsigned int len;
+	unsigned long len;
 	char *tmpbuf;
 	
 	if (argc != 3) {