[sword-svn] r2466 - trunk/src/mgr

chrislit at crosswire.org chrislit at crosswire.org
Wed Oct 21 17:46:40 MST 2009


Author: chrislit
Date: 2009-10-21 17:46:40 -0700 (Wed, 21 Oct 2009)
New Revision: 2466

Modified:
   trunk/src/mgr/curlhttpt.cpp
Log:
corrected a number of type errors in which const char*s were being assigned to char*s


Modified: trunk/src/mgr/curlhttpt.cpp
===================================================================
--- trunk/src/mgr/curlhttpt.cpp	2009-10-21 07:39:32 UTC (rev 2465)
+++ trunk/src/mgr/curlhttpt.cpp	2009-10-22 00:46:40 UTC (rev 2466)
@@ -178,9 +178,9 @@
 
 
 // we need to find the 2nd "<td" & then find the ">" after that.  The size starts with the next non-space char
-char *findSizeStart(const char *buffer) {
+const char *findSizeStart(const char *buffer) {
 	const char *listing = buffer;
-	char *pEnd;
+	const char *pEnd;
 	
 	pEnd = strstr(listing, "<td");
 	if(pEnd == NULL) {
@@ -204,7 +204,7 @@
 	vector<struct DirEntry> dirList;
 	
 	SWBuf dirBuf;
-	char *pBuf;
+	const char *pBuf;
 	char *pBufRes;
 	char possibleName[400];
 	double fSize;
@@ -214,13 +214,13 @@
 		pBuf = strstr(dirBuf, "<a href=\"");//Find the next link to a possible file name.
 		while (pBuf != NULL) {
 			pBuf += 9;//move to the start of the actual name.
-			pBufRes = strchr(pBuf, '\"');//Find the end of the possible file name
+			pBufRes = (char *)strchr(pBuf, '\"');//Find the end of the possible file name
 			possibleNameLength = pBufRes - pBuf;
 			sprintf(possibleName, "%.*s", possibleNameLength, pBuf);
 			if (isalnum(possibleName[0])) {
 				SWLog::getSystemLog()->logDebug("getDirListHTTP: Found a file: %s", possibleName);
 				pBuf = pBufRes;
-				pBufRes = findSizeStart(pBuf);
+				pBufRes = (char *)findSizeStart(pBuf);
 				fSize = 0;
 				if(pBufRes != NULL) {
 					pBuf = pBufRes;




More information about the sword-cvs mailing list