[sword-cvs] sword/apps/console/diatheke corediatheke.cpp,1.28,1.29 diathekemgr.cpp,1.9,1.10

sword@www.crosswire.org sword@www.crosswire.org
Thu, 26 Jun 2003 19:21:07 -0700


Update of /usr/local/cvsroot/sword/apps/console/diatheke
In directory www:/tmp/cvs-serv21064/apps/console/diatheke

Modified Files:
	corediatheke.cpp diathekemgr.cpp 
Log Message:
	Removed all std::string references from API and
		mostly replaced with SWBuf
	Added int max param to SWBuf::append
	Added some file copy functions to FileMgr
	Moved some more install stuff to installmgr



Index: corediatheke.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/console/diatheke/corediatheke.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** corediatheke.cpp	5 Apr 2003 04:13:23 -0000	1.28
--- corediatheke.cpp	27 Jun 2003 02:21:05 -0000	1.29
***************
*** 8,15 ****
  #include <regex.h>
  #include <iostream>
- #include <string>
  #include <list>
  
- using std::string;
  using std::list;
  using std::cout;
--- 8,13 ----
***************
*** 27,32 ****
  	if (!stricmp(key, "localelist")) {		
  		LocaleMgr *lm = &LocaleMgr::systemLocaleMgr;
! 		list<string> loclist =	lm->getAvailableLocales();
! 		list<string>::iterator li = loclist.begin();
  		for (;li != loclist.end(); li++) {
  		  *output << li->c_str() << endl;
--- 25,30 ----
  	if (!stricmp(key, "localelist")) {		
  		LocaleMgr *lm = &LocaleMgr::systemLocaleMgr;
! 		list<SWBuf> loclist =	lm->getAvailableLocales();
! 		list<SWBuf>::iterator li = loclist.begin();
  		for (;li != loclist.end(); li++) {
  		  *output << li->c_str() << endl;
***************
*** 91,95 ****
  	char *font = 0;
  	char inputformat = 0;
! 	string encoding;
  	char querytype = 0;	
  
--- 89,93 ----
  	char *font = 0;
  	char inputformat = 0;
! 	SWBuf encoding;
  	char querytype = 0;	
  
***************
*** 127,131 ****
  				inputformat = FMT_THML;
  		}
! 		encoding = ((eit = (*sit).second.find("Encoding")) != (*sit).second.end()) ? (*eit).second : (string)"";
  	}
  
--- 125,129 ----
  				inputformat = FMT_THML;
  		}
! 		encoding = ((eit = (*sit).second.find("Encoding")) != (*sit).second.end()) ? (*eit).second : (SWBuf)"";
  	}
  

Index: diathekemgr.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/console/diatheke/diathekemgr.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** diathekemgr.cpp	1 Oct 2002 22:04:58 -0000	1.9
--- diathekemgr.cpp	27 Jun 2003 02:21:05 -0000	1.10
***************
*** 29,34 ****
  #include "thmlcgi.h"
  
- using std::string;
- 
  //---------------------------------------------------------------------------
  DiathekeMgr::DiathekeMgr (SWConfig * iconfig, SWConfig * isysconfig, bool autoload, char enc, char mark, bool ibidi, bool ishape)
--- 29,32 ----
***************
*** 71,79 ****
  void DiathekeMgr::AddRenderFilters(SWModule *module, ConfigEntMap &section)
  {
! 	string lang;
  	bool rtl;
  	ConfigEntMap::iterator entry;
  
! 	lang = ((entry = section.find("Lang")) != section.end()) ? (*entry).second : (string)"en";
  	rtl = ((entry = section.find("Direction")) != section.end()) ? ((*entry).second == "RtoL") : false;
  
--- 69,77 ----
  void DiathekeMgr::AddRenderFilters(SWModule *module, ConfigEntMap &section)
  {
! 	SWBuf lang;
  	bool rtl;
  	ConfigEntMap::iterator entry;
  
! 	lang = ((entry = section.find("Lang")) != section.end()) ? (*entry).second : (SWBuf)"en";
  	rtl = ((entry = section.find("Direction")) != section.end()) ? ((*entry).second == "RtoL") : false;