diff options
Diffstat (limited to 'utilities/diatheke')
-rw-r--r-- | utilities/diatheke/CMakeLists.txt | 24 | ||||
-rw-r--r-- | utilities/diatheke/Makefile.in | 2 | ||||
-rw-r--r-- | utilities/diatheke/README | 9 | ||||
-rw-r--r-- | utilities/diatheke/corediatheke.cpp | 533 | ||||
-rw-r--r-- | utilities/diatheke/corediatheke.h | 4 | ||||
-rw-r--r-- | utilities/diatheke/diafiltmgr.cpp | 201 | ||||
-rw-r--r-- | utilities/diatheke/diafiltmgr.h | 4 | ||||
-rw-r--r-- | utilities/diatheke/diatheke.cpp | 155 | ||||
-rw-r--r-- | utilities/diatheke/diatheke.sln | 40 | ||||
-rw-r--r-- | utilities/diatheke/diatheke.vcxproj | 396 | ||||
-rw-r--r-- | utilities/diatheke/diathekemgr.cpp | 18 | ||||
-rw-r--r-- | utilities/diatheke/diathekemgr.h | 8 | ||||
-rw-r--r-- | utilities/diatheke/tcl/README | 106 | ||||
-rw-r--r-- | utilities/diatheke/thmlcgi.cpp | 7 |
14 files changed, 789 insertions, 718 deletions
diff --git a/utilities/diatheke/CMakeLists.txt b/utilities/diatheke/CMakeLists.txt new file mode 100644 index 0000000..ab11cb1 --- /dev/null +++ b/utilities/diatheke/CMakeLists.txt @@ -0,0 +1,24 @@ +#################################################################### +# And, of course, diatheke is a beast unto itself +# +# Let's go! +# +ADD_EXECUTABLE(diatheke + diatheke.cpp + corediatheke.cpp + diathekemgr.cpp + diafiltmgr.cpp + thmlcgi.cpp + gbfcgi.cpp + osiscgi.cpp +) +IF(BUILDING_SHARED) + TARGET_LINK_LIBRARIES(diatheke sword) +ELSE(BUILDING_SHARED) + TARGET_LINK_LIBRARIES(diatheke sword_static) +ENDIF(BUILDING_SHARED) +INSTALL(TARGETS diatheke + DESTINATION "${BINDIR}" + COMPONENT utilities +) + diff --git a/utilities/diatheke/Makefile.in b/utilities/diatheke/Makefile.in index 3971a8a..722cfff 100644 --- a/utilities/diatheke/Makefile.in +++ b/utilities/diatheke/Makefile.in @@ -324,9 +324,11 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +with_bzip2 = @with_bzip2@ with_conf = @with_conf@ with_icu = @with_icu@ with_icusword = @with_icusword@ +with_xz = @with_xz@ with_zlib = @with_zlib@ AUTOMAKE_OPTIONS = 1.6 LDADD = $(top_builddir)/lib/libsword.la diff --git a/utilities/diatheke/README b/utilities/diatheke/README index df39d86..483118d 100644 --- a/utilities/diatheke/README +++ b/utilities/diatheke/README @@ -47,12 +47,17 @@ default page to create a custom index.html for your users. ---------------------------------------------------------------------- VERSION HISTORY -4.7 +4.7 ..., 2014 + Updated for Sword 1.8.0. + Supports LaTeX, XHTML, & WEBIF output. + Supports outputting SCSU-encoded text. + Added 'internal' output format, which applies no formatting + filtes--useful for debugging & diagnostics. 4.6 July 16, 2013 Updated for Sword 1.7.0. -4.5 +4.5 4.0 July 8, 2001 Updated to Sword 1.5.2 with innumerable bug fixes. diff --git a/utilities/diatheke/corediatheke.cpp b/utilities/diatheke/corediatheke.cpp index 6e05e7c..6221604 100644 --- a/utilities/diatheke/corediatheke.cpp +++ b/utilities/diatheke/corediatheke.cpp @@ -2,7 +2,7 @@ * * corediatheke.cpp - * - * $Id: corediatheke.cpp 3207 2014-05-01 02:48:10Z greg.hellings $ + * $Id: corediatheke.cpp 3446 2017-02-28 17:54:34Z refdoc $ * * Copyright 2001-2014 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -43,14 +43,13 @@ void systemquery(const char * key, ostream* output){ SWModule *target; - bool types = false, descriptions = false, names = false; + bool types = false, descriptions = false, names = false, bibliography = false; if (!::stricmp(key, "localelist")) { LocaleMgr *lm = LocaleMgr::getSystemLocaleMgr(); list<SWBuf> loclist = lm->getAvailableLocales(); - list<SWBuf>::iterator li = loclist.begin(); - for (;li != loclist.end(); li++) { - *output << li->c_str() << endl; + for (list<SWBuf>::iterator li = loclist.begin(); li != loclist.end(); ++li) { + *output << li->c_str() << endl; } } else if (!::stricmp(key, "modulelist")) { @@ -64,71 +63,57 @@ void systemquery(const char * key, ostream* output){ else if (!::stricmp(key, "modulelistdescriptions")) { descriptions = true; } + else if (!::stricmp(key, "bibliography")) { + types = true; + names = true; + bibliography = true; + } + if (types || descriptions || names || bibliography) { + const char *modTypes[] = { + SWMgr::MODTYPE_BIBLES, + SWMgr::MODTYPE_COMMENTARIES, + SWMgr::MODTYPE_LEXDICTS, + SWMgr::MODTYPE_DAILYDEVOS, + SWMgr::MODTYPE_GENBOOKS, + 0 + }; + + for (int i = 0; modTypes[i]; ++i) { - if (types || descriptions || names) { - if (types) *output << "Biblical Texts:\n"; - for (it = manager.Modules.begin(); it != manager.Modules.end(); it++) { - target = it->second; - if (!strcmp(target->getType(), "Biblical Texts")) { - if (names) *output << target->getName(); - if (names && descriptions) *output << " : "; - if (descriptions) *output << target->getDescription(); - *output << endl; - } - } - if (types) *output << "Commentaries:\n"; - for (it = manager.Modules.begin(); it != manager.Modules.end(); it++) { - target = it->second; - if (!strcmp(target->getType(), "Commentaries")) { - if (names) *output << target->getName(); - if (names && descriptions) *output << " : "; - if (descriptions) *output << target->getDescription(); - *output << endl; - } - } - if (types) *output << "Dictionaries:\n"; - for (it = manager.Modules.begin(); it != manager.Modules.end(); it++) { - target = it->second; - if (!strcmp(target->getType(), "Lexicons / Dictionaries")) { - if (names) *output << target->getName(); - if (names && descriptions) *output << " : "; - if (descriptions) *output << target->getDescription(); - *output << endl; - } - } - if (types) *output << "Generic books:\n"; - for (it = manager.Modules.begin(); it != manager.Modules.end(); it++) { - target = it->second; - if (!strcmp(target->getType(), "Generic Books")) { - if (names) *output << target->getName(); - if (names && descriptions) *output << " : "; - if (descriptions) *output << target->getDescription(); - *output << endl; + if (types) *output << modTypes[i] << ":\n"; + for (it = manager.Modules.begin(); it != manager.Modules.end(); it++) { + target = it->second; + if (!strcmp(target->getType(), modTypes[i])) { + if (names) *output << target->getName(); + if (names && (descriptions || bibliography)) *output << " : "; + if (descriptions) *output << target->getDescription(); + if (bibliography) *output << target->getBibliography(); + *output << endl; + } } } } } + void doquery(unsigned long maxverses = -1, unsigned char outputformat = FMT_PLAIN, unsigned char outputencoding = ENC_UTF8, unsigned long optionfilters = 0, unsigned char searchtype = ST_NONE, const char *range = 0, const char *text = 0, const char *locale = 0, const char *ref = 0, ostream* output = &cout, const char *script = 0, signed char variants = 0) { - static DiathekeMgr manager(NULL, NULL, false, outputencoding, outputformat, - ((OP_BIDI & optionfilters) == OP_BIDI), - ((OP_ARSHAPE & optionfilters) == OP_ARSHAPE)); - ModMap::iterator it; + static DiathekeMgr manager(NULL, NULL, false, outputencoding, outputformat, ((OP_BIDI & optionfilters) == OP_BIDI), ((OP_ARSHAPE & optionfilters) == OP_ARSHAPE)); + ListKey listkey; - SectionMap::iterator sit; - ConfigEntMap::iterator eit; + const char *DEFAULT_FONT = "Gentium"; SWModule *target; - char *font = 0; + const char *font = 0; SWBuf modlanguage; SWBuf modlocale; SWBuf syslanguage; SWBuf syslocale; + SWBuf header; + char inputformat = 0; - SWBuf encoding; char querytype = 0; if (!locale) { locale = "en"; @@ -152,80 +137,45 @@ void doquery(unsigned long maxverses = -1, unsigned char outputformat = FMT_PLAI text = ref; } //otherwise, we have a real book - it = manager.Modules.find(text); - if (it == manager.Modules.end()) { //book not found - return; - } - target = (*it).second; - SWKey *p = target->createKey(); - VerseKey *parser = SWDYNAMIC_CAST(VerseKey, p); - - + target = manager.getModule(text); + if (!target) return; + if (target->getLanguage()) { modlocale = target->getLanguage(); LocaleMgr *lm = LocaleMgr::getSystemLocaleMgr(); modlanguage = lm->translate(modlocale.append(".en"), "locales"); modlocale -= 3; - } + } else { modlocale = "en"; modlanguage = "English"; - } + } - if (!parser) { - delete p; - parser = new VerseKey(); - } - if ((sit = manager.config->Sections.find((*it).second->getName())) != manager.config->Sections.end()) { - if ((eit = (*sit).second.find("SourceType")) != (*sit).second.end()) { - if (!::stricmp((char *)(*eit).second.c_str(), "GBF")) - inputformat = FMT_GBF; - else if (!::stricmp((char *)(*eit).second.c_str(), "ThML")) - inputformat = FMT_THML; - else if (!::stricmp((char *)(*eit).second.c_str(), "OSIS")) - inputformat = FMT_OSIS; - else if (!::stricmp((char *)(*eit).second.c_str(), "TEI")) - inputformat = FMT_TEI; - } - encoding = ((eit = (*sit).second.find("Encoding")) != (*sit).second.end()) ? (*eit).second : (SWBuf)""; - } + SWBuf sourceType = target->getConfigEntry("SourceType"); + if (sourceType == "GBF") inputformat = FMT_GBF; + else if (sourceType == "ThML") inputformat = FMT_THML; + else if (sourceType == "OSIS") inputformat = FMT_OSIS; + else if (sourceType == "TEI") inputformat = FMT_TEI; + + SWBuf encoding = target->getConfigEntry("Encoding"); if (querytype == QT_INFO) { - switch (inputformat) { - case FMT_THML : - *output << "ThML"; - break; - case FMT_GBF : - *output << "GBF"; - break; - case FMT_OSIS : - *output << "OSIS"; - break; - case FMT_TEI : - *output << "TEI"; - break; - default: - *output << "Other"; - } - *output << ";"; - *output << target->getType(); - *output << ";"; - delete parser; - return; + switch (inputformat) { + case FMT_THML : *output << "ThML"; break; + case FMT_GBF : *output << "GBF" ; break; + case FMT_OSIS : *output << "OSIS"; break; + case FMT_TEI : *output << "TEI" ; break; + default: *output << "Other"; + } + *output << ";"; + *output << target->getType(); + *output << ";"; + return; } - if (searchtype) - querytype = QT_SEARCH; - else if (!strcmp(target->getType(), "Biblical Texts")) - querytype = QT_BIBLE; - else if (!strcmp(target->getType(), "Commentaries")) - querytype = QT_COMM; - else if (!strcmp(target->getType(), "Lexicons / Dictionaries")) - querytype = QT_LD; - else if (!strcmp(target->getType(), "Generic Books")) - querytype = QT_LD; + if (searchtype) querytype = QT_SEARCH; manager.setGlobalOption("Footnotes", (optionfilters & OP_FOOTNOTES) ? "On": "Off"); manager.setGlobalOption("Headings", (optionfilters & OP_HEADINGS) ? "On": "Off"); @@ -241,8 +191,11 @@ void doquery(unsigned long maxverses = -1, unsigned char outputformat = FMT_PLAI manager.setGlobalOption("Glosses", (optionfilters & OP_GLOSSES) ? "On": "Off"); manager.setGlobalOption("Transliterated Forms", (optionfilters & OP_XLIT) ? "On": "Off"); manager.setGlobalOption("Enumerations", (optionfilters & OP_ENUM) ? "On": "Off"); - + manager.setGlobalOption("Morpheme Segmentation", (optionfilters & OP_MORPHSEG) ? "On": "Off"); manager.setGlobalOption("Transliteration", (optionfilters & OP_TRANSLITERATOR && script) ? script : "Off"); + + VerseKey *parser = (SWDYNAMIC_CAST(VerseKey, target->getKey())) ? (VerseKey *)target->createKey() : 0; + if (parser && (optionfilters & OP_INTROS)) { parser->setIntros(true); ((VerseKey *)target->getKey())->setIntros(true); } if ((optionfilters & OP_VARIANTS) && variants) { @@ -251,251 +204,227 @@ void doquery(unsigned long maxverses = -1, unsigned char outputformat = FMT_PLAI else if (variants == 1) manager.setGlobalOption("Textual Variants", "Secondary Reading"); } - else - manager.setGlobalOption("Textual Variants", "Primary Reading"); + else manager.setGlobalOption("Textual Variants", "Primary Reading"); if (querytype == QT_SEARCH) { - - //this test is just to determine if we've got SWKeys or VerseKeys - if (!strcmp(target->getType(), "Biblical Texts")) - querytype = QT_BIBLE; - else if (!strcmp(target->getType(), "Commentaries")) - querytype = QT_BIBLE; - else if (!strcmp(target->getType(), "Lexicons / Dictionaries")) - querytype = QT_LD; - else if (!strcmp(target->getType(), "Generic Books")) - querytype = QT_LD; - //do search stuff char st = 1 - searchtype; if (querytype == QT_BIBLE) { - *output << "Verses containing \""; + *output << "Verses containing \""; } - else *output << "Entries containing \""; + else *output << "Entries containing \""; *output << ref; *output << "\"-- "; - if (range) { + if (range && parser) { ListKey scope = parser->parseVerseList(range, "Gen 1:1", true); listkey = target->search(ref, st, REG_ICASE, &scope); } else listkey = target->search(ref, st, REG_ICASE); - if (strlen((const char*)listkey)) { - if (!listkey.popError()) { - if (outputformat == FMT_CGI) *output << "<entry>"; - if (querytype == QT_BIBLE) { - *parser = listkey; - *output << (const char *)*parser; - } - else *output << (const char *)listkey; - if (outputformat == FMT_CGI) *output << "</entry>"; - } - listkey++; - while (!listkey.popError()) { - *output << " ; "; - if (outputformat == FMT_CGI) *output << "<entry>"; - if (querytype == QT_BIBLE) { - *parser = listkey; - *output << (const char *)*parser; - } - else *output << (const char *)listkey; - if (outputformat == FMT_CGI) *output << "</entry>"; - listkey++; - } - *output << " -- "; - - char *temp = new char[10]; - sprintf(temp, "%u", listkey.getCount()); - *output << temp; - delete [] temp; - - *output << " matches total ("; - *output << target->getName(); - *output << ")\n"; + bool first = true; + if (listkey.getCount()) { + for (listkey = TOP; !listkey.popError(); listkey++) { + if (!listkey.popError()) { + if (outputformat == FMT_CGI) *output << "<entry>"; + *output << listkey.getText(); + if (outputformat == FMT_CGI) *output << "</entry>"; + } + if (first) first = false; + else *output << " ; "; + } + *output << " -- "; + + *output << listkey.getCount() << " matches total ("; } else { - *output << "none ("; - *output << target->getName(); - *output << ")\n"; + *output << "none ("; } + *output << target->getName(); + *output << ")\n"; } + else { - else if (querytype == QT_LD) { - //do dictionary stuff - - target->setKey(ref); - - SWBuf text = target->renderText(); + if (parser) { + listkey = parser->parseVerseList(ref, "Gen1:1", true); + } + else listkey << ref; + + font = target->getConfigEntry("Font"); + if (!font) font = DEFAULT_FONT; if (outputformat == FMT_RTF) { *output << "{\\rtf1\\ansi{\\fonttbl{\\f0\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f1\\fdecor\\fprq2 "; - if (font) - *output << font; - else - *output << "Times New Roman"; - *output << ";}}"; - } - else if (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML) { - *output << "<meta http-equiv=\"content-type\" content=\"text/html\" charset=\"UTF-8\"" - " lang=\"" << locale << "\" xml:lang=\"" << locale << "\"/>"; + *output << font; + *output << ";}{\\f7\\froman\\fcharset2\\fprq2 Symbol;}}"; } + else if (outputformat == FMT_LATEX) { + *output << "\\documentclass{bibletext}\n" + "\\usepackage{sword}\n" + "\\title{" << target->getDescription() << " \\\\\\small " << ref << "}\n"; - if (text.length()) { - *output << (char*)target->getKeyText(); - *output << (char*)target->getKeyText(); - if (font && (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI)) { - *output << ": <span style=\"font:\"" << font << ";\"" - << " lang=\"" << modlocale << "\">"; + if (syslanguage.size()) { + syslanguage[0] = tolower(syslanguage[0]); + *output << "\\setmainlanguage{" << syslanguage << "}\n"; } - else if (outputformat == FMT_RTF) { - *output << ": {\\f1 "; + + if (modlanguage.size()) { + modlanguage[0] = tolower(modlanguage[0]); } - else { - *output << ": "; + else { + modlanguage = "english"; } - *output << text; - if (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI) { - *output << "</span>"; - } - else if (outputformat == FMT_RTF) { - *output << "}"; + + if (!(modlanguage == syslanguage)) { + *output << "\\setotherlanguage{" << modlanguage << "}\n"; } - - *output << "(" << target->getName() << ")\n"; - } - - if (outputformat == FMT_RTF) { - *output << "}"; - } - - } - - else if (querytype == QT_BIBLE || querytype == QT_COMM) { - //do commentary/Bible stuff - - if ((sit = manager.config->Sections.find((*it).second->getName())) != manager.config->Sections.end()) { - if ((eit = (*sit).second.find("Font")) != (*sit).second.end()) { - font = (char *)(*eit).second.c_str(); - if (strlen(font) == 0) font = 0; + + + *output << "\\date{}\n" + "\\begin{document}\n" + "\\maketitle\n"; + + if (!(modlanguage == syslanguage)) { + *output << "\\begin{" << modlanguage << "}\n"; } } - listkey = parser->parseVerseList(ref, "Gen1:1", true); - int i; - if (outputformat == FMT_RTF) { - *output << "{\\rtf1\\ansi{\\fonttbl{\\f0\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f1\\fdecor\\fprq2 "; - if (font) - *output << font; - else - *output << "Times New Roman"; - *output << ";}{\\f7\\froman\\fcharset2\\fprq2 Symbol;}}"; - } else if (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML) { - *output << "<meta http-equiv=\"content-type\" content=\"text/html\" charset=\"UTF-8\"" - " lang=\"" << locale << "\" xml:lang=\"" << locale << "\"/>"; + *output << "<html><head><meta http-equiv=\"content-type\" content=\"text/html\" charset=\"UTF-8\"" + " lang=\"" << locale << "\" xml:lang=\"" << locale << "\"/>\n" + "<style type=\"text/css\">" << target->getRenderHeader() << "</style></head><body>"; + } - for (i = 0; i < listkey.getCount() && maxverses; i++) { - VerseKey *element = SWDYNAMIC_CAST(VerseKey, listkey.getElement(i)); - if (element && element->isBoundSet()) { - target->setKey(element->getLowerBound()); - *parser = element->getUpperBound(); - while (maxverses && *target->getKey() <= *parser) { - *output << (char*)target->getKeyText(); - if (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI) { - *output << ": <span "; - if (font) { *output << "style=\"font:\"" << font << ";\" " ;} - if (strcmp(modlocale,locale) !=0 ) { *output << "lang=\"" << modlocale << "\"";} - *output << ">"; - } - if (font && (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI)) { - *output << ": <span style=\"font:\"" << font << ";\"" << " lang=\"" << modlocale << "\">"; - } - else if (outputformat == FMT_RTF) { - *output << ": {\\f1 "; + for (listkey = TOP; !listkey.popError() && maxverses; listkey++) { + target->setKey(listkey); + VerseKey *vk = SWDYNAMIC_CAST(VerseKey, target->getKey()); + + // if we've got a VerseKey (Bible or Commentary) + if (vk) { + // let's do some special processing if we're at verse 1 + if (vk->getVerse() == 1) { + if (vk->getChapter() == 1) { + if (vk->getBook() == 1) { + if (vk->getTestament() == 1) { + // MODULE START SPECIAL PROCESSING + if (outputformat == FMT_LATEX) + { *output << "\\swordmodule\n"; + // put your latex module start stuff here + } + } + // TESTAMENT START SPECIAL PROCESSING + if (outputformat == FMT_LATEX) { + // put your latex testament start stuff here + *output << "\\swordtestament\n"; + } + } + // BOOK START SPECIAL PROCESSING + if (outputformat == FMT_LATEX) { + // put your latex book start stuff here + *output << "\\swordbook\n"; + } } - else { - *output << ": "; + // CHAPTER START SPECIAL PROCESSING + if (outputformat == FMT_LATEX) { + *output << "\n\\swordchapter{" + << vk->getOSISRef() << "}{" + << vk->getText() << "}{" + << vk->getChapter() << "}"; } - *output << target->renderText(); - if (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI) { - *output << "</span>"; - } - else if (outputformat == FMT_RTF) { - *output << "}"; - } - - if (inputformat != FMT_THML && (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI)) - *output << "<br />"; - else if (outputformat == FMT_OSIS) - *output << "<milestone type=\"line\"/>"; - else if (outputformat == FMT_RTF) - *output << "\\par "; - else if (outputformat == FMT_GBF) - *output << "<CM>"; - - *output << "\n"; - - if (*target->getKey() == *parser) - break; - maxverses--; - (*target)++; } - } - else { - target->setKey(*listkey.getElement(i)); - *output << (char*)target->getKeyText(); - if (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI) { - *output << ": <span "; - if (font) { *output << "style=\"font:\"" << font << ";\" " ;} - if (strcmp(modlocale,locale) !=0 ) { *output << "lang=\"" << modlocale << "\"";} - *output << ">"; - } - } - if (font && (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI)) { - *output << ": <font face=\"" << font << "\">"; - } - else if (outputformat == FMT_RTF) { - *output << ": {\\f1 "; + // PREVERSE MATTER + header = target->getEntryAttributes()["Heading"]["Preverse"]["0"]; + *output << target->renderText(header); + + // VERSE PROCESSING + if (outputformat == FMT_LATEX) { + *output << "\\swordverse{" + << vk->getOSISRef() << "}{" + << vk->getText() << "}{" + << vk->getVerse() << "} "; } + // no special format processing default: just show the key else { - *output << ": "; - } - *output << target->renderText(); - if (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI) { - *output << "</span>"; - } - else if (outputformat == FMT_RTF) { - *output << "}"; + *output << target->getKeyText(); } + } + // if we're not a VerseKey, then simply output the key + else { + *output << target->getKeyText(); + } - if (inputformat != FMT_THML && (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI)) - *output << "<br />"; - else if (outputformat == FMT_OSIS) - *output << "<milestone type=\"line\"/>"; - else if (outputformat == FMT_RTF) - *output << "\\par "; - else if (outputformat == FMT_GBF) - *output << "<CM>"; - - *output << "\n"; - maxverses--; + // OUTPUT RENDER ENTRY + if (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI) { + *output << ": <span "; + *output << "style=\"font:" << font << ";\" "; + if (strcmp(modlocale,locale) !=0 ) { *output << "lang=\"" << modlocale << "\"";} + *output << ">"; } + else if (outputformat == FMT_RTF) { + *output << ": {\\f1 "; + } + else if (outputformat == FMT_LATEX) { + *output << " "; + } + else { + *output << ": "; + } + + *output << target->renderText(); + + + if (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI) { + *output << "</span>"; + } + else if (outputformat == FMT_RTF) { + *output << "}"; + } + + if (inputformat != FMT_THML && (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI)) + *output << "<br />"; + else if (outputformat == FMT_OSIS) + *output << "<milestone type=\"line\"/>"; + else if (outputformat == FMT_RTF) + *output << "\\par "; + else if (outputformat == FMT_GBF) + *output << "<CM>"; + + *output << "\n"; + + maxverses--; + } + + if ((outputformat == FMT_LATEX) && (!(modlanguage == syslanguage))) { + *output << "\\end{" << modlanguage << "}\n"; } *output << "("; *output << target->getName(); + + if (outputformat == FMT_LATEX) { + *output << ", "; + *output << target->getConfigEntry("DistributionLicense"); + + } + *output << ")\n"; if (outputformat == FMT_RTF) { *output << "}"; } - + else if (outputformat == FMT_LATEX) { + *output << "\\end{document}\n"; + } + else if (outputformat == FMT_HTML || outputformat == FMT_HTMLHREF || outputformat == FMT_XHTML || outputformat == FMT_THML || outputformat == FMT_CGI) { + *output << "</body></html>\n"; + } } + delete parser; +} diff --git a/utilities/diatheke/corediatheke.h b/utilities/diatheke/corediatheke.h index cac0845..98b3bb5 100644 --- a/utilities/diatheke/corediatheke.h +++ b/utilities/diatheke/corediatheke.h @@ -2,7 +2,7 @@ * * corediatheke.h - * - * $Id: corediatheke.h 3189 2014-04-17 05:00:28Z greg.hellings $ + * $Id: corediatheke.h 3359 2015-03-22 23:31:43Z refdoc $ * * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -58,6 +58,8 @@ #define OP_GLOSSES (1<<15) #define OP_XLIT (1<<16) #define OP_ENUM (1<<17) +#define OP_MORPHSEG (1<<18) +#define OP_INTROS (1<<19) #define ST_NONE 0 #define ST_REGEX 1 // 0 diff --git a/utilities/diatheke/diafiltmgr.cpp b/utilities/diatheke/diafiltmgr.cpp index be091a9..564896e 100644 --- a/utilities/diatheke/diafiltmgr.cpp +++ b/utilities/diatheke/diafiltmgr.cpp @@ -2,7 +2,7 @@ * * diafiltmgr.cpp - DiathekeFilterMgr * - * $Id: diafiltmgr.cpp 2843 2013-06-29 11:22:27Z chrislit $ + * $Id: diafiltmgr.cpp 3113 2014-03-12 12:42:07Z chrislit $ * * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -20,24 +20,42 @@ * */ +#include <swmgr.h> +#include <swmodule.h> + #include <thmlplain.h> -#include <gbfplain.h> #include <thmlgbf.h> -#include <gbfthml.h> +#include <thmlosis.h> #include <thmlhtml.h> -#include <gbfhtml.h> #include <thmlhtmlhref.h> -#include <gbfhtmlhref.h> +#include <thmlxhtml.h> +#include <thmllatex.h> #include <thmlrtf.h> +#include <thmlwebif.h> + +#include <gbfplain.h> +#include <gbfthml.h> +#include <gbfosis.h> +#include <gbfhtml.h> +#include <gbfhtmlhref.h> +#include <gbfxhtml.h> +#include <gbflatex.h> #include <gbfrtf.h> +#include <gbfwebif.h> + +#include <osisplain.h> +#include <osisosis.h> #include <osisrtf.h> #include <osishtmlhref.h> -#include <swmodule.h> -#include <osisplain.h> -#include <thmlosis.h> -#include <gbfosis.h> +#include <osisxhtml.h> +#include <osislatex.h> +#include <osiswebif.h> -#include <swmgr.h> +#include <teiplain.h> +#include <teirtf.h> +#include <teihtmlhref.h> +#include <teixhtml.h> +#include <teilatex.h> #include "diafiltmgr.h" #include "thmlcgi.h" @@ -61,6 +79,8 @@ DiathekeFilterMgr::~DiathekeFilterMgr() { delete (fromplain); if (fromosis) delete (fromosis); + if (fromtei) + delete (fromtei); } void DiathekeFilterMgr::AddRenderFilters(SWModule *module, ConfigEntMap §ion) { @@ -81,6 +101,10 @@ void DiathekeFilterMgr::AddRenderFilters(SWModule *module, ConfigEntMap §ion if (fromosis) module->addRenderFilter(fromosis); break; + case FMT_TEI: + if (fromtei) + module->addRenderFilter(fromtei); + break; } EncodingFilterMgr::AddRenderFilters(module, section); } @@ -95,6 +119,7 @@ char DiathekeFilterMgr::Markup(char mark) { SWFilter * oldthml = fromthml; SWFilter * oldgbf = fromgbf; SWFilter * oldosis = fromosis; + SWFilter * oldtei = fromtei; CreateFilters(markup); @@ -160,6 +185,21 @@ char DiathekeFilterMgr::Markup(char mark) { } break; } + case FMT_TEI: + if (oldtei != fromtei) { + if (oldtei) { + if (!fromtei) { + module->second->removeRenderFilter(oldtei); + } + else { + module->second->replaceRenderFilter(oldtei, fromtei); + } + } + else if (fromtei) { + module->second->addRenderFilter(fromtei); + } + break; + } } if (oldthml) @@ -170,6 +210,8 @@ char DiathekeFilterMgr::Markup(char mark) { delete oldplain; if (oldosis) delete oldosis; + if (oldtei) + delete oldtei; } return markup; } @@ -177,54 +219,109 @@ char DiathekeFilterMgr::Markup(char mark) { void DiathekeFilterMgr::CreateFilters(char markup) { switch (markup) { + case FMT_INTERNAL: + fromplain = NULL; + fromthml = NULL; + fromgbf = NULL; + fromosis = NULL; + fromtei = NULL; + break; + case FMT_CGI: fromplain = NULL; fromthml = new ThMLCGI(); fromgbf = new GBFCGI(); fromosis = new OSISCGI(); + fromtei = NULL; // TODO: write TEICGI() + break; + + case FMT_PLAIN: + fromplain = NULL; + fromthml = new ThMLPlain(); + fromgbf = new GBFPlain(); + fromosis = new OSISPlain(); + fromtei = new TEIPlain(); + break; + + case FMT_THML: + fromplain = NULL; + fromthml = NULL; + fromgbf = new GBFThML(); + fromosis = NULL; + fromtei = NULL; + break; + + case FMT_GBF: + fromplain = NULL; + fromthml = new ThMLGBF(); + fromgbf = NULL; + fromosis = NULL; + fromtei = NULL; + break; + + case FMT_HTML: + fromplain = NULL; + fromthml = new ThMLHTML(); + fromgbf = new GBFHTML(); + fromosis = NULL; + fromtei = NULL; + break; + + case FMT_HTMLHREF: + fromplain = NULL; + fromthml = new ThMLHTMLHREF(); + fromgbf = new GBFHTMLHREF(); + fromosis = new OSISHTMLHREF(); + fromtei = new TEIHTMLHREF(); + break; + + case FMT_RTF: + fromplain = NULL; + fromthml = new ThMLRTF(); + fromgbf = new GBFRTF(); + fromosis = new OSISRTF(); + fromtei = new TEIRTF(); + break; + + case FMT_LATEX: + fromplain = NULL; + fromthml = new ThMLLaTeX(); + fromgbf = new GBFLaTeX(); + fromosis = new OSISLaTeX(); + fromtei = new TEILaTeX(); + break; + + case FMT_OSIS: + fromplain = NULL; + fromthml = new ThMLOSIS(); + fromgbf = new GBFOSIS(); + fromosis = new OSISOSIS(); + fromtei = NULL; + break; + + case FMT_WEBIF: + fromplain = NULL; + fromthml = new ThMLWEBIF(); + fromgbf = new GBFWEBIF(); + fromosis = new OSISWEBIF(); + fromtei = NULL; + break; + + case FMT_TEI: + fromplain = NULL; + fromthml = NULL; + fromgbf = NULL; + fromosis = NULL; + fromtei = NULL; + break; + + case FMT_XHTML: + fromplain = NULL; + fromthml = new ThMLXHTML(); + fromgbf = new GBFXHTML(); + fromosis = new OSISXHTML(); + fromtei = new TEIXHTML(); break; - case FMT_PLAIN: - fromplain = NULL; - fromthml = new ThMLPlain(); - fromgbf = new GBFPlain(); - fromosis = new OSISPlain(); - break; - case FMT_THML: - fromplain = NULL; - fromthml = NULL; - fromgbf = new GBFThML(); - fromosis = NULL; - break; - case FMT_GBF: - fromplain = NULL; - fromthml = new ThMLGBF(); - fromgbf = NULL; - fromosis = NULL; - break; - case FMT_HTML: - fromplain = NULL; - fromthml = new ThMLHTML(); - fromgbf = new GBFHTML(); - fromosis = NULL; - break; - case FMT_HTMLHREF: - fromplain = NULL; - fromthml = new ThMLHTMLHREF(); - fromgbf = new GBFHTMLHREF(); - fromosis = new OSISHTMLHREF(); - break; - case FMT_RTF: - fromplain = NULL; - fromthml = new ThMLRTF(); - fromgbf = new GBFRTF(); - fromosis = new OSISRTF(); - break; - case FMT_OSIS: - fromplain = NULL; - fromthml = new ThMLOSIS(); - fromgbf = new GBFOSIS(); - fromosis = NULL; - break; } } diff --git a/utilities/diatheke/diafiltmgr.h b/utilities/diatheke/diafiltmgr.h index 120fc6e..c6d5dd0 100644 --- a/utilities/diatheke/diafiltmgr.h +++ b/utilities/diatheke/diafiltmgr.h @@ -2,7 +2,7 @@ * * diafiltmgr.h - DiathekeFilterMgr * - * $Id: diafiltmgr.h 2833 2013-06-29 06:40:28Z chrislit $ + * $Id: diafiltmgr.h 3113 2014-03-12 12:42:07Z chrislit $ * * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -24,6 +24,7 @@ #define DIAFILTMGR_H #define FMT_CGI 127 +#define FMT_INTERNAL 126 #include <encfiltmgr.h> @@ -37,6 +38,7 @@ protected: SWFilter* fromgbf; SWFilter* fromplain; SWFilter* fromosis; + SWFilter* fromtei; char markup; diff --git a/utilities/diatheke/diatheke.cpp b/utilities/diatheke/diatheke.cpp index 1649169..83f30ff 100644 --- a/utilities/diatheke/diatheke.cpp +++ b/utilities/diatheke/diatheke.cpp @@ -2,7 +2,7 @@ * * diatheke.cpp - * - * $Id: diatheke.cpp 3170 2014-04-17 04:14:38Z greg.hellings $ + * $Id: diatheke.cpp 3450 2017-02-28 23:28:03Z refdoc $ * * Copyright 1999-2014 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -47,22 +47,25 @@ void printsyntax() { fprintf (stderr, " [-l locale] <-k query_key>\n"); fprintf (stderr, "\n"); fprintf (stderr, "If <book> is \"system\" you may use these system keys: \"modulelist\",\n"); - fprintf (stderr, "\"modulelistnames\", and \"localelist\"."); + fprintf (stderr, "\"modulelistnames\", \"bibliography\", and \"localelist\"."); fprintf (stderr, "\n"); - fprintf (stderr, "Valid search_type values are: phrase (default), regex, multiword,\n"); - fprintf (stderr, " attribute, lucene, multilemma.\n"); + fprintf (stderr, "Valid search_type values are: phrase , regex, multiword, attribute,\n"); + fprintf (stderr, " lucene, multilemma.\n"); fprintf (stderr, "Valid (output) option_filters values are: n (Strong's numbers),\n"); fprintf (stderr, " f (Footnotes), m (Morphology), h (Section Headings),\n"); fprintf (stderr, " c (Cantillation), v (Hebrew Vowels), a (Greek Accents), p (Arabic Vowels)\n"); fprintf (stderr, " l (Lemmas), s (Scripture Crossrefs), r (Arabic Shaping),\n"); fprintf (stderr, " b (Bi-Directional Reordering), w (Red Words of Christ),\n"); - fprintf (stderr, " g (Glosses/Ruby), e (Word Enumerations),\n"); - fprintf (stderr, " x (Encoded Transliterations), t (Algorithmic Transliterations via ICU)\n"); + fprintf (stderr, " g (Glosses/Ruby), e (Word Enumerations), i (Intros)\n"); + fprintf (stderr, " x (Encoded Transliterations), t (Algorithmic Transliterations via ICU),\n"); + fprintf (stderr, " M (morpheme segmentation)\n"); fprintf (stderr, "Maximum verses may be any integer value\n"); - fprintf (stderr, "Valid output_format values are: GBF, ThML, RTF, HTML, HTMLHREF, XHTML, OSIS,\n"); - fprintf (stderr, " CGI, and plain (def)\n"); - fprintf (stderr, "Valid output_encoding values are: Latin1, UTF8 (def), UTF16, HTML, and RTF\n"); + fprintf (stderr, "Valid output_format values are: CGI, GBF, HTML, HTMLHREF, LaTeX, OSIS, RTF,\n"); + fprintf (stderr, " ThML, WEBIF, XHTML, plain, and internal (def)\n"); + fprintf (stderr, "The option LaTeX will produce a compilable document, but may well require\n"); + fprintf (stderr, " tweaking to be usable.\n"); + fprintf (stderr, "Valid output_encoding values are: Latin1, UTF8 (def), UTF16, HTML, RTF, and SCSU\n"); fprintf (stderr, "Valid locale values depend on installed locales. en is default.\n"); fprintf (stderr, "The query_key must be the last argument because all following\n"); fprintf (stderr, " arguments are added to the key.\n"); @@ -78,7 +81,7 @@ void printsyntax() { int main(int argc, char **argv) { int maxverses = -1; - unsigned char outputformat = FMT_PLAIN, searchtype = ST_NONE, outputencoding = ENC_UTF8; + unsigned char outputformat = FMT_INTERNAL, searchtype = ST_NONE, outputencoding = ENC_UTF8; unsigned long optionfilters = OP_NONE; char *text = 0, *locale = 0, *ref = 0, *range = 0; char script[] = "Latin"; // for the moment, only this target script is supported @@ -87,17 +90,17 @@ int main(int argc, char **argv) char runquery = 0; // used to check that we have enough arguments to perform a legal query // (a querytype & text = 1 and a ref = 2) - for (int i = 1; i < argc; i++) { + for (int i = 1; i < argc; ++i) { if (!::stricmp("-b", argv[i])) { if (i+1 <= argc) { - text = argv[i+1]; - i++; + ++i; + text = argv[i]; runquery |= RQ_BOOK; } } else if (!::stricmp("-s", argv[i])) { if (i+1 <= argc) { - i++; + ++i; if (!::stricmp("phrase", argv[i])) { searchtype = ST_PHRASE; } @@ -125,129 +128,135 @@ int main(int argc, char **argv) } else if (!::stricmp("-r", argv[i])) { if (i+1 <= argc) { - range = argv[i+1]; - i++; + ++i; + range = argv[i]; } } else if (!::stricmp("-l", argv[i])) { if (i+1 <= argc) { - locale = argv[i+1]; - i++; + ++i; + locale = argv[i]; } } else if (!::stricmp("-m", argv[i])) { if (i+1 <= argc) { - maxverses = atoi(argv[i+1]); - i++; + ++i; + maxverses = atoi(argv[i]); } } else if (!::stricmp("-o", argv[i])) { if (i+1 <= argc) { - if (strchr(argv[i+1], 'f')) + ++i; + if (strchr(argv[i], 'f')) optionfilters |= OP_FOOTNOTES; - if (strchr(argv[i+1], 'n')) + if (strchr(argv[i], 'n')) optionfilters |= OP_STRONGS; - if (strchr(argv[i+1], 'h')) + if (strchr(argv[i], 'h')) optionfilters |= OP_HEADINGS; - if (strchr(argv[i+1], 'm')) + if (strchr(argv[i], 'm')) optionfilters |= OP_MORPH; - if (strchr(argv[i+1], 'c')) + if (strchr(argv[i], 'c')) optionfilters |= OP_CANTILLATION; - if (strchr(argv[i+1], 'v')) + if (strchr(argv[i], 'v')) optionfilters |= OP_HEBREWPOINTS; - if (strchr(argv[i+1], 'a')) + if (strchr(argv[i], 'a')) optionfilters |= OP_GREEKACCENTS; - if (strchr(argv[i+1], 'l')) + if (strchr(argv[i], 'l')) optionfilters |= OP_LEMMAS; - if (strchr(argv[i+1], 's')) + if (strchr(argv[i], 's')) optionfilters |= OP_SCRIPREF; - if (strchr(argv[i+1], 'r')) + if (strchr(argv[i], 'r')) optionfilters |= OP_ARSHAPE; - if (strchr(argv[i+1], 'b')) + if (strchr(argv[i], 'b')) optionfilters |= OP_BIDI; - if (strchr(argv[i+1], 'w')) + if (strchr(argv[i], 'w')) optionfilters |= OP_REDLETTERWORDS; - if (strchr(argv[i+1], 'p')) + if (strchr(argv[i], 'p')) optionfilters |= OP_ARABICPOINTS; - if (strchr(argv[i+1], 'g')) + if (strchr(argv[i], 'g')) optionfilters |= OP_GLOSSES; - if (strchr(argv[i+1], 'x')) + if (strchr(argv[i], 'x')) optionfilters |= OP_XLIT; - if (strchr(argv[i+1], 'e')) + if (strchr(argv[i], 'e')) optionfilters |= OP_ENUM; - if (strchr(argv[i+1], 't')) + if (strchr(argv[i], 'i')) + optionfilters |= OP_INTROS; + if (strchr(argv[i], 't')) optionfilters |= OP_TRANSLITERATOR; - i++; + if (strchr(argv[i], 'M')) + optionfilters |= OP_MORPHSEG; } } else if (!::stricmp("-f", argv[i])) { if (i+1 <= argc) { - if (!::stricmp("thml", argv[i+1])) { + ++i; + if (!::stricmp("thml", argv[i])) { outputformat = FMT_THML; - i++; } - else if (!::stricmp("cgi", argv[i+1])) { + else if (!::stricmp("cgi", argv[i])) { outputformat = FMT_CGI; - i++; } - else if (!::stricmp("gbf", argv[i+1])) { + else if (!::stricmp("gbf", argv[i])) { outputformat = FMT_GBF; - i++; } - else if (!::stricmp("htmlhref", argv[i+1])) { + else if (!::stricmp("htmlhref", argv[i])) { outputformat = FMT_HTMLHREF; - i++; } - else if (!::stricmp("html", argv[i+1])) { + else if (!::stricmp("html", argv[i])) { outputformat = FMT_HTML; - i++; } - else if (!::stricmp("xhtml", argv[i+1])) { + else if (!::stricmp("xhtml", argv[i])) { outputformat = FMT_XHTML; - i++; } - else if (!::stricmp("rtf", argv[i+1])) { + else if (!::stricmp("rtf", argv[i])) { outputformat = FMT_RTF; - i++; } - else if (!::stricmp("osis", argv[i+1])) { + else if (!::stricmp("osis", argv[i])) { outputformat = FMT_OSIS; - i++; } - else i++; + else if (!::stricmp("latex", argv[i])) { + outputformat = FMT_LATEX; + } + else if (!::stricmp("plain", argv[i])) { + outputformat = FMT_PLAIN; + } + else if (!::stricmp("webif", argv[i])) { + outputformat = FMT_WEBIF; + } + else if (!::stricmp("internal", argv[i])) { + outputformat = FMT_INTERNAL; + } } } else if (!::stricmp("-e", argv[i])) { if (i+1 <= argc) { - if (!::stricmp("utf8", argv[i+1])) { + ++i; + if (!::stricmp("utf8", argv[i])) { outputencoding = ENC_UTF8; - i++; } - else if (!::stricmp("rtf", argv[i+1])) { + else if (!::stricmp("rtf", argv[i])) { outputencoding = ENC_RTF; - i++; } - else if (!::stricmp("html", argv[i+1])) { + else if (!::stricmp("html", argv[i])) { outputencoding = ENC_HTML; - i++; } - else if (!::stricmp("latin1", argv[i+1])) { + else if (!::stricmp("latin1", argv[i])) { outputencoding = ENC_LATIN1; - i++; } - else if (!::stricmp("utf16", argv[i+1])) { + else if (!::stricmp("utf16", argv[i])) { outputencoding = ENC_UTF16; - i++; } - else i++; + else if (!::stricmp("scsu", argv[i])) { + outputencoding = ENC_SCSU; + } } } else if (!::stricmp("-k", argv[i])) { - i++; + ++i; if (i < argc) { SWBuf key = argv[i]; - i++; - for (; i < argc; i++) { + ++i; + for (; i < argc; ++i) { if (!::stricmp("-h", argv[i]) || !::stricmp("--help", argv[i])) printsyntax(); key = key + " " + argv[i]; @@ -260,17 +269,17 @@ int main(int argc, char **argv) } else if (!::stricmp("-v", argv[i])) { if (i+1 <= argc) { - variants = atoi(argv[i+1]); + ++i; + variants = atoi(argv[i]); optionfilters |= OP_VARIANTS; - i++; } } /* else if (!::stricmp("-t", argv[i])) { if (i+1 <= argc) { - script = argv[i+1]; + ++i; + script = argv[i]; optionfilters |= OP_TRANSLITERATOR; - i++; } } */ diff --git a/utilities/diatheke/diatheke.sln b/utilities/diatheke/diatheke.sln index 9d360da..361f0b9 100644 --- a/utilities/diatheke/diatheke.sln +++ b/utilities/diatheke/diatheke.sln @@ -1,20 +1,20 @@ -
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "diatheke", "diatheke.vcxproj", "{891A765C-5503-4FED-B427-7AE1413DB264}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {891A765C-5503-4FED-B427-7AE1413DB264}.Debug|Win32.ActiveCfg = Debug|Win32
- {891A765C-5503-4FED-B427-7AE1413DB264}.Debug|Win32.Build.0 = Debug|Win32
- {891A765C-5503-4FED-B427-7AE1413DB264}.Release|Win32.ActiveCfg = Release|Win32
- {891A765C-5503-4FED-B427-7AE1413DB264}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "diatheke", "diatheke.vcxproj", "{891A765C-5503-4FED-B427-7AE1413DB264}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {891A765C-5503-4FED-B427-7AE1413DB264}.Debug|Win32.ActiveCfg = Debug|Win32 + {891A765C-5503-4FED-B427-7AE1413DB264}.Debug|Win32.Build.0 = Debug|Win32 + {891A765C-5503-4FED-B427-7AE1413DB264}.Release|Win32.ActiveCfg = Release|Win32 + {891A765C-5503-4FED-B427-7AE1413DB264}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/utilities/diatheke/diatheke.vcxproj b/utilities/diatheke/diatheke.vcxproj index 7f698c1..cfd4ae1 100644 --- a/utilities/diatheke/diatheke.vcxproj +++ b/utilities/diatheke/diatheke.vcxproj @@ -1,198 +1,200 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{891A765C-5503-4FED-B427-7AE1413DB264}</ProjectGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v110</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v110</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- </LinkIncremental>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Midl>
- <TypeLibraryName>.\Debug/diatheke.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;../../src/utilfuns/win32;../../../icu-sword/include;../../include/internal/regex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;WIN32;_CONSOLE;_ICU_;_ICUSWORD_;SWUSINGDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeaderOutputFile>.\Debug/diatheke.pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
- <ObjectFileName>.\Debug/</ObjectFileName>
- <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
- <BrowseInformation>true</BrowseInformation>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>icuin.lib;icuuc.lib;icudt.lib;libsword.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>.\Debug/diatheke.exe</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <AdditionalLibraryDirectories>../../../icu-sword/lib;../../lib/vcppmake/Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>.\Debug/diatheke.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>.\Debug/diatheke.bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Midl>
- <TypeLibraryName>.\Release/diatheke.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>../../include;../../src/utilfuns/win32;../../../icu-sword/include;../../include/internal/regex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;_ICU_;_ICUSWORD_;SWUSINGDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeaderOutputFile>.\Release/diatheke.pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
- <ObjectFileName>.\Release/</ObjectFileName>
- <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
- <BrowseInformation>true</BrowseInformation>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>icuin.lib;icuuc.lib;icudt.lib;libsword.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>.\Release/diatheke.exe</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <AdditionalLibraryDirectories>../../../icu-sword/lib;../../lib/vcppmake/Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <ProgramDatabaseFile>.\Release/diatheke.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>.\Release/diatheke.bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="corediatheke.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="diafiltmgr.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="diatheke.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="diathekemgr.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="gbfcgi.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="osiscgi.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="thmlcgi.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="corediatheke.h" />
- <ClInclude Include="diafiltmgr.h" />
- <ClInclude Include="diathekemgr.h" />
- <ClInclude Include="gbfcgi.h" />
- <ClInclude Include="osiscgi.h" />
- <ClInclude Include="thmlcgi.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{891A765C-5503-4FED-B427-7AE1413DB264}</ProjectGuid> + <RootNamespace>diatheke</RootNamespace> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v120</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v120</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\diatheke\Debug\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)Debug\$(ProjectName)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\diatheke\Release\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)Release\$(ProjectName)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + </LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Midl> + <TypeLibraryName>.\Debug/diatheke.tlb</TypeLibraryName> + <HeaderFileName> + </HeaderFileName> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../include;../../src/utilfuns/win32;../../../icu-sword/include;../../include/internal/regex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;WIN32;_CONSOLE;_ICU_;_ICUSWORD_;SWUSINGDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeaderOutputFile>.\Debug/diatheke.pch</PrecompiledHeaderOutputFile> + <AssemblerListingLocation>.\Debug/</AssemblerListingLocation> + <ObjectFileName>.\Debug/</ObjectFileName> + <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName> + <BrowseInformation>true</BrowseInformation> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + <Link> + <AdditionalDependencies>icuin.lib;icuuc.lib;icudt.lib;libsword.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>Debug/diatheke.exe</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + <AdditionalLibraryDirectories>../../../icu-sword/lib;../../lib/vcppmake/Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>.\Debug/diatheke.pdb</ProgramDatabaseFile> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + </Link> + <Bscmake> + <SuppressStartupBanner>true</SuppressStartupBanner> + <OutputFile>.\Debug/diatheke.bsc</OutputFile> + </Bscmake> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Midl> + <TypeLibraryName>.\Release/diatheke.tlb</TypeLibraryName> + <HeaderFileName> + </HeaderFileName> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <AdditionalIncludeDirectories>../../include;../../src/utilfuns/win32;../../../icu-sword/include;../../include/internal/regex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;_ICU_;_ICUSWORD_;SWUSINGDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <PrecompiledHeaderOutputFile>.\Release/diatheke.pch</PrecompiledHeaderOutputFile> + <AssemblerListingLocation>.\Release/</AssemblerListingLocation> + <ObjectFileName>.\Release/</ObjectFileName> + <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName> + <BrowseInformation>true</BrowseInformation> + <SuppressStartupBanner>true</SuppressStartupBanner> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + <Link> + <AdditionalDependencies>icuin.lib;icuuc.lib;icudt.lib;libsword.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>Release/diatheke.exe</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + <AdditionalLibraryDirectories>../../../icu-sword/lib;../../lib/vcppmake/Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <ProgramDatabaseFile>.\Release/diatheke.pdb</ProgramDatabaseFile> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <Bscmake> + <SuppressStartupBanner>true</SuppressStartupBanner> + <OutputFile>.\Release/diatheke.bsc</OutputFile> + </Bscmake> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="corediatheke.cpp"> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="diafiltmgr.cpp"> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="diatheke.cpp"> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="diathekemgr.cpp"> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="gbfcgi.cpp"> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="osiscgi.cpp"> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + <ClCompile Include="thmlcgi.cpp"> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="corediatheke.h" /> + <ClInclude Include="diafiltmgr.h" /> + <ClInclude Include="diathekemgr.h" /> + <ClInclude Include="gbfcgi.h" /> + <ClInclude Include="osiscgi.h" /> + <ClInclude Include="thmlcgi.h" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> </Project>
\ No newline at end of file diff --git a/utilities/diatheke/diathekemgr.cpp b/utilities/diatheke/diathekemgr.cpp index aa79fcf..0dc766d 100644 --- a/utilities/diatheke/diathekemgr.cpp +++ b/utilities/diatheke/diathekemgr.cpp @@ -2,7 +2,7 @@ * * diathekemgr.cpp - DiathekeMgr * - * $Id: diathekemgr.cpp 3167 2014-04-17 04:12:12Z greg.hellings $ + * $Id: diathekemgr.cpp 3515 2017-11-01 11:38:09Z scribe $ * * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -47,7 +47,7 @@ DiathekeMgr::DiathekeMgr (SWConfig * iconfig, SWConfig * isysconfig, bool autolo bidireorder = new UTF8BiDiReorder(); transliterator = new UTF8Transliterator(); #endif - Load(); + load(); #ifdef WIN32 OSVERSIONINFO osvi; @@ -73,7 +73,7 @@ DiathekeMgr::~DiathekeMgr() } -void DiathekeMgr::AddRenderFilters(SWModule *module, ConfigEntMap §ion) +void DiathekeMgr::addRenderFilters(SWModule *module, ConfigEntMap §ion) { SWBuf lang; ConfigEntMap::iterator entry; @@ -91,11 +91,11 @@ void DiathekeMgr::AddRenderFilters(SWModule *module, ConfigEntMap §ion) module->addRenderFilter(bidireorder); } #endif - SWMgr::AddRenderFilters(module, section); + SWMgr::addRenderFilters(module, section); } -signed char DiathekeMgr::Load () { - signed char retval = SWMgr::Load(); +signed char DiathekeMgr::load() { + signed char retval = SWMgr::load(); #ifdef _ICU_ optionFilters["UTF8Transliterator"] = transliterator; options.push_back(transliterator->getOptionName()); @@ -103,11 +103,9 @@ signed char DiathekeMgr::Load () { return retval; }; -void DiathekeMgr::AddGlobalOptions (SWModule * module, ConfigEntMap & section, - ConfigEntMap::iterator start, - ConfigEntMap::iterator end) { +void DiathekeMgr::addGlobalOptionFilters(SWModule *module, ConfigEntMap §ion) { - SWMgr::AddGlobalOptions(module, section, start, end); + SWMgr::addGlobalOptionFilters(module, section); #ifdef _ICU_ module->addOptionFilter(transliterator); #endif diff --git a/utilities/diatheke/diathekemgr.h b/utilities/diatheke/diathekemgr.h index 4ad7367..3a59f1c 100644 --- a/utilities/diatheke/diathekemgr.h +++ b/utilities/diatheke/diathekemgr.h @@ -2,7 +2,7 @@ * * diathekemgr.h - DiathekeMgr * - * $Id: diathekemgr.h 2833 2013-06-29 06:40:28Z chrislit $ + * $Id: diathekemgr.h 3515 2017-11-01 11:38:09Z scribe $ * * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -38,9 +38,9 @@ class DiathekeMgr : public SWMgr { #endif protected: - virtual void AddRenderFilters(SWModule *module, ConfigEntMap §ion); - virtual signed char Load (); - virtual void AddGlobalOptions (SWModule * module, ConfigEntMap & section, ConfigEntMap::iterator start, ConfigEntMap::iterator end); + virtual void addRenderFilters(SWModule *module, ConfigEntMap §ion); + virtual signed char load(); + virtual void addGlobalOptionFilters(SWModule * module, ConfigEntMap & section); public: bool shape; diff --git a/utilities/diatheke/tcl/README b/utilities/diatheke/tcl/README index 4614422..e066efb 100644 --- a/utilities/diatheke/tcl/README +++ b/utilities/diatheke/tcl/README @@ -1,53 +1,53 @@ -Diatheke/Tcl by Chris Little <chrislit@crosswire.org>
-Based on code schema of <cking@acy.digex.net>
-
-#######################################################################
-Copyright 1999-2009 CrossWire Bible Society (http://www.crosswire.org)
- CrossWire Bible Society
- P. O. Box 2528
- Tempe, AZ 85280-2528
-
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation version 2.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-#######################################################################
-
-This script is intended for use with libraries and modules from
-The SWORD Project, available at http://www.crosswire.org/
-
-This script requires the Diatheke command line front end to The SWORD
-Project. You should really install this first, including all optional
-components: zlib, CLucene, ICU (preferrably icu-sword), and cURL. Then
-install any modules you want to make available to users.
-
-Modify the file biblebot-diatheke.tcl as necessary so that the two
-variables "diatheke" and "dict" point to the copies of the diatheke
-and dict programs on your system.
-
-Finally, run the Perl script makebooklist.pl, which will
-create/overwrite the file biblebot-diatheke-books.tcl. This includes
-all books installed on the system, so remove any entries you want to
-hide from users, as necessary.
-
-To install Diatheke/Tcl, install an eggdrop IRC bot, copy the
-Diatheke/Tcl .tcl files (biblebot-diatheke.tcl and
-biblebot-diatheke-books.tcl) to your eggdrop scripts directory, and
-add a line to the end of your bot startup script to load the two
-Diatheke/Tcl scripts, for example:
-
-source /usr/share/eggdrop/scripts/biblebot-diatheke.tcl
-source /usr/share/eggdrop/scripts/biblebot-diatheke-books.tcl
-
-This script has been tested with eggdrop 1.3.23 & 1.6.19, but should
-function fine in later versions.
-
-When you get the script loaded, type !biblehelp in a channel where
-the bot is present and it will give you a full list of commands.
-More commands will appear to you depending upon which mode the bot is
-in and whether you are an op on the bot or voiced in the channel.
+Diatheke/Tcl by Chris Little <chrislit@crosswire.org> +Based on code schema of <cking@acy.digex.net> + +####################################################################### +Copyright 1999-2009 CrossWire Bible Society (http://www.crosswire.org) + CrossWire Bible Society + P. O. Box 2528 + Tempe, AZ 85280-2528 + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation version 2. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +####################################################################### + +This script is intended for use with libraries and modules from +The SWORD Project, available at http://www.crosswire.org/ + +This script requires the Diatheke command line front end to The SWORD +Project. You should really install this first, including all optional +components: zlib, CLucene, ICU (preferrably icu-sword), and cURL. Then +install any modules you want to make available to users. + +Modify the file biblebot-diatheke.tcl as necessary so that the two +variables "diatheke" and "dict" point to the copies of the diatheke +and dict programs on your system. + +Finally, run the Perl script makebooklist.pl, which will +create/overwrite the file biblebot-diatheke-books.tcl. This includes +all books installed on the system, so remove any entries you want to +hide from users, as necessary. + +To install Diatheke/Tcl, install an eggdrop IRC bot, copy the +Diatheke/Tcl .tcl files (biblebot-diatheke.tcl and +biblebot-diatheke-books.tcl) to your eggdrop scripts directory, and +add a line to the end of your bot startup script to load the two +Diatheke/Tcl scripts, for example: + +source /usr/share/eggdrop/scripts/biblebot-diatheke.tcl +source /usr/share/eggdrop/scripts/biblebot-diatheke-books.tcl + +This script has been tested with eggdrop 1.3.23 & 1.6.19, but should +function fine in later versions. + +When you get the script loaded, type !biblehelp in a channel where +the bot is present and it will give you a full list of commands. +More commands will appear to you depending upon which mode the bot is +in and whether you are an op on the bot or voiced in the channel. diff --git a/utilities/diatheke/thmlcgi.cpp b/utilities/diatheke/thmlcgi.cpp index 9b85c35..e75ba50 100644 --- a/utilities/diatheke/thmlcgi.cpp +++ b/utilities/diatheke/thmlcgi.cpp @@ -2,7 +2,7 @@ * * thmlcgi.cpp - ThMLCGI: ThML to Diatheke/CGI format filter * - * $Id: thmlcgi.cpp 2833 2013-06-29 06:40:28Z chrislit $ + * $Id: thmlcgi.cpp 3427 2016-07-03 14:30:33Z scribe $ * * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -198,9 +198,10 @@ bool ThMLCGI::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *ba else { buf += '<'; - for (i = 0; i < strlen(token); i++) + for (i = 0; i < strlen(token); i++) { buf += token[i]; - buf += '>'; + } + buf += '>'; //return false; // we still didn't handle token } } |