[sword-cvs] sword/tests webiftest.cpp,NONE,1.1 Makefile.am,1.12,1.13

sword@www.crosswire.org sword@www.crosswire.org
Sun, 1 Jun 2003 07:32:16 -0700


Update of /usr/local/cvsroot/sword/tests
In directory www:/tmp/cvs-serv1646/tests

Modified Files:
	Makefile.am 
Added Files:
	webiftest.cpp 
Log Message:
added webif stuff, updated makefile.am files

--- NEW FILE: webiftest.cpp ---
#ifndef __GNUC__
#include <io.h>
#else
#include <unistd.h>
#endif
#ifndef O_BINARY
#define O_BINARY 0
#endif
#include <fcntl.h>
#include <errno.h>
#include <iostream>
#include <thmlhtmlhref.h>
#include <unicodertf.h>
#include <thmlosis.h>
#include <gbfosis.h>
#include <thmlosis.h>
#include <versekey.h>
#include <swmgr.h>
#include <markupfiltmgr.h>
#ifndef NO_SWORD_NAMESPACE
using namespace sword;
#endif
using namespace std;

#define MAXBUF 30000

int main(int argc, char **argv) {
	SWMgr mgr(0, 0, true, new MarkupFilterMgr(FMT_WEBIF, ENC_UTF8));
	mgr.setGlobalOption("Strong's Numbers", "on");
	mgr.setGlobalOption("Morphological Tags", "on");

	SWModule *module = mgr.Modules["KJV"];
	if (!module) {
		module = mgr.Modules.begin()->second;
	}

	module->setKey("John");
	std::cout << module->RenderText() << std::endl;

    	return 0;
}


Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/sword/tests/Makefile.am,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Makefile.am	26 May 2003 04:32:45 -0000	1.12
--- Makefile.am	1 Jun 2003 14:32:09 -0000	1.13
***************
*** 7,11 ****
  compnone complzss localetest keycast introtest indextest configtest \
  romantest testblocks filtertest rawldidxtest lextest swaptest genbooktest treeidxtest \
! swbuftest xmltest
  
  if ICU
--- 7,11 ----
  compnone complzss localetest keycast introtest indextest configtest \
  romantest testblocks filtertest rawldidxtest lextest swaptest genbooktest treeidxtest \
! swbuftest xmltest webiftest
  
  if ICU
***************
*** 59,62 ****
--- 59,63 ----
  genbooktest_SOURCES = genbooktest.cpp
  swbuftest_SOURCES = swbuftest.cpp
+ webiftest_SOURCES = webiftest.cpp
  xmltest_SOURCES = xmltest.cpp