[sword-svn] r3754 - in trunk: include src/keys src/mgr src/modules/common src/modules/filters src/utilfuns tests utilities utilities/diatheke

scribe at crosswire.org scribe at crosswire.org
Fri Jul 10 13:45:48 EDT 2020


Author: scribe
Date: 2020-07-10 13:45:48 -0400 (Fri, 10 Jul 2020)
New Revision: 3754

Modified:
   trunk/include/encfiltmgr.h
   trunk/include/installmgr.h
   trunk/include/markupfiltmgr.h
   trunk/include/nullim.h
   trunk/include/roman.h
   trunk/include/swcipher.h
   trunk/include/swcomprs.h
   trunk/include/swlog.h
   trunk/include/utf8transliterator.h
   trunk/include/versekey.h
   trunk/include/versetreekey.h
   trunk/include/ztext.h
   trunk/include/ztext4.h
   trunk/src/keys/versekey.cpp
   trunk/src/keys/versetreekey.cpp
   trunk/src/mgr/encfiltmgr.cpp
   trunk/src/mgr/installmgr.cpp
   trunk/src/mgr/markupfiltmgr.cpp
   trunk/src/modules/common/bz2comprs.cpp
   trunk/src/modules/common/swcipher.cpp
   trunk/src/modules/common/swcomprs.cpp
   trunk/src/modules/common/xzcomprs.cpp
   trunk/src/modules/common/zstr.cpp
   trunk/src/modules/common/zverse.cpp
   trunk/src/modules/common/zverse4.cpp
   trunk/src/modules/filters/cipherfil.cpp
   trunk/src/utilfuns/roman.cpp
   trunk/tests/romantest.cpp
   trunk/utilities/diatheke/diathekemgr.h
   trunk/utilities/installmgr.cpp
   trunk/utilities/step2vpl.cpp
   trunk/utilities/stepdump.cpp
Log:
Finishing up refactoring work for 1.9 release


Modified: trunk/include/encfiltmgr.h
===================================================================
--- trunk/include/encfiltmgr.h	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/include/encfiltmgr.h	2020-07-10 17:45:48 UTC (rev 3754)
@@ -64,12 +64,17 @@
 	 */
 	~EncodingFilterMgr();
 
-	/** Markup sets/gets the encoding after initialization
+	/** getEncoding gets the encoding after initialization
 	 * 
+	 * @return The current encoding format.
+	 */
+	char getEncoding() const { return encoding; }
+
+	/** setEncoding sets the encoding after initialization
+	 * 
 	 * @param enc The new encoding or ENC_UNKNOWN if you just want to get the current markup.
-	 * @return The current (possibly changed) encoding format.
 	 */
-	char Encoding(char enc);
+	void setEncoding(char enc);
 
 	/**
 	 * Adds the raw filters which are defined in "section" to the SWModule object "module".

Modified: trunk/include/installmgr.h
===================================================================
--- trunk/include/installmgr.h	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/include/installmgr.h	2020-07-10 17:45:48 UTC (rev 3754)
@@ -140,15 +140,18 @@
          */
 	virtual int installModule(SWMgr *destMgr, const char *fromLocation, const char *modName, InstallSource *is = 0);
 
+
         /** call to obtain and locally cache the available content list of the remote source
          */
 	virtual int refreshRemoteSource(InstallSource *is);
 
+
         /** call to populate installmgr configuration with all known
          *  remote sources from the master list at CrossWire
          */
 	virtual int refreshRemoteSourceConfiguration();
 
+
 	/** Override this and provide an input mechanism to allow your users
 	 *  to confirm that they understand this important disclaimer.
 	 *  This method will be called immediately before attempting to perform
@@ -161,40 +164,46 @@
          *
 	 *  User disclaimer should ask user for confirmation of 2 critical items:
 	 *  and the default answer should be NO
-	 *  (possibly the wrong language for the disclaimer)
+	 *  (due to possibly the wrong language for the disclaimer)
 	 *
+	 *  1) detection OK (Not in persecuted country)
+	 *  2) repos other than CrossWire may have questionable content
+	 *
+	 *  A sample default impl is provided below:
+	 *
+         */
+	virtual bool isUserDisclaimerConfirmed() const; /* {
 
-A sample impl:
+		bool confirmed = userDisclaimerConfirmed;
+		
+		if (!confirmed) {
+			cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
+			cout << "                -=+* WARNING *+=- -=+* WARNING *+=-\n\n\n";
+			cout << "Although Install Manager provides a convenient way for installing\n";
+			cout << "and upgrading SWORD components, it also uses a systematic method\n";
+			cout << "for accessing sites which gives packet sniffers a target to lock\n";
+			cout << "into for singling out users. \n\n\n";
+			cout << "IF YOU LIVE IN A PERSECUTED COUNTRY AND DO NOT WISH TO RISK DETECTION,\n";
+			cout << "YOU SHOULD *NOT* USE INSTALL MANAGER'S REMOTE SOURCE FEATURES.\n\n\n";
+			cout << "Also, Remote Sources other than CrossWire may contain less than\n";
+			cout << "quality modules, modules with unorthodox content, or even modules\n";
+			cout << "which are not legitimately distributable.  Many repositories\n";
+			cout << "contain wonderfully useful content.  These repositories simply\n";
+			cout << "are not reviewed or maintained by CrossWire and CrossWire\n";
+			cout << "cannot be held responsible for their content. CAVEAT EMPTOR.\n\n\n";
+			cout << "If you understand this and are willing to enable remote source features\n";
+			cout << "then type yes at the prompt\n\n";
+			cout << "enable? [no] ";
 
-	static bool confirmed = false;
-        if (!confirmed) {
-		cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
-		cout << "                -=+* WARNING *+=- -=+* WARNING *+=-\n\n\n";
-		cout << "Although Install Manager provides a convenient way for installing\n";
-		cout << "and upgrading SWORD components, it also uses a systematic method\n";
-		cout << "for accessing sites which gives packet sniffers a target to lock\n";
-		cout << "into for singling out users. \n\n\n";
-		cout << "IF YOU LIVE IN A PERSECUTED COUNTRY AND DO NOT WISH TO RISK DETECTION,\n";
-		cout << "YOU SHOULD *NOT* USE INSTALL MANAGER'S REMOTE SOURCE FEATURES.\n\n\n";
-		cout << "Also, Remote Sources other than CrossWire may contain less than\n";
-		cout << "quality modules, modules with unorthodox content, or even modules\n";
-		cout << "which are not legitimately distributable.  Many repositories\n";
-		cout << "contain wonderfully useful content.  These repositories simply\n";
-		cout << "are not reviewed or maintained by CrossWire and CrossWire\n";
-		cout << "cannot be held responsible for their content. CAVEAT EMPTOR.\n\n\n";
-		cout << "If you understand this and are willing to enable remote source features\n";
-		cout << "then type yes at the prompt\n\n";
-		cout << "enable? [no] ";
+			char prompt[10];
+			fgets(prompt, 9, stdin);
+			confirmed = (!strcmp(prompt, "yes\n"));
+			cout << "\n";
+		}
+		return confirmed;
+	} */
 
-		char prompt[10];
-		fgets(prompt, 9, stdin);
-		confirmed = (!strcmp(prompt, "yes\n"));
-        }
-        return confirmed;
 
-         */
-	virtual bool isUserDisclaimerConfirmed() const { return userDisclaimerConfirmed; }
-
 	/** Preferred method of reporting user disclaimer confirmation is to override the above method
 	 * instead of using the setter below. This is provided for clients who don't wish to inherit
 	 * InstallMgr and override method.
@@ -206,42 +215,49 @@
 	 * to enter the decipher code for a module.
 	 * return true you added the cipher code to the config.
 	 * default to return 'aborted'
+	 */
+	virtual bool getCipherCode(const char *modName, SWConfig *config) {
+		(void) modName; (void) config;	// to avoid "unused variable" warnings
+		return false;
 
-A sample implementation, roughly taken from the windows installmgr:
+		/*
+		A sample implementation, roughly taken from the windows installmgr:
 
-	SectionMap::iterator section;
-	ConfigEntMap::iterator entry;
-	SWBuf tmpBuf;
-	section = config->Sections.find(modName);
-	if (section != config->Sections.end()) {
-		entry = section->second.find("CipherKey");
-		if (entry != section->second.end()) {
-			entry->second = GET_USER_INPUT();
-			config->Save();
+		SectionMap::iterator section;
+		ConfigEntMap::iterator entry;
+		SWBuf tmpBuf;
+		section = config->Sections.find(modName);
+		if (section != config->Sections.end()) {
+			entry = section->second.find("CipherKey");
+			if (entry != section->second.end()) {
+				entry->second = ASK_USER_FOR_CIPHER_CODE();
+				config->Save();
 
-			// LET'S SHOW THE USER SOME SAMPLE TEXT FROM THE MODULE
-			SWMgr *mgr = new SWMgr();
-			SWModule *mod = mgr->getModule(modName);
-			mod->setKey("Ipet 2:12");
-			tmpBuf = mod->StripText();
-			mod->setKey("gen 1:10");
-			tmpBuf += "\n\n";
-			tmpBuf += mod->StripText();
-			SOME_DIALOG_CONTROL->SETTEXT(tmpBuf.c_str());
-			delete mgr;
+				// LET'S SHOW THE USER SOME SAMPLE TEXT FROM THE MODULE
+				SWMgr *mgr = new SWMgr();
+				SWModule *mod = mgr->getModule(modName);
+				mod->setKey("Ipet 2:12");
+				tmpBuf = mod->StripText();
+				mod->setKey("gen 1:10");
+				tmpBuf += "\n\n";
+				tmpBuf += mod->StripText();
+				if (SOME_DIALOG_CONFIRMATION(SWBuf(
+							"Using your provided cipher code,	\
+							here is the data from the module.	\
+							Does this look good?\n\n") + tmpBuf.c_str())) {
 
-			// if USER CLICKS OK means we should return true
-			return true;
+					// if USER CLICKS OK means we should return true
+					return true;
+				}
+				delete mgr;
+			}
 		}
+		return false;
+		*/
 	}
-	return false;
-}
-	*/
 
-	virtual bool getCipherCode(const char *modName, SWConfig *config) { (void) modName; (void) config; return false; }
 
 
-
 	/** whether or not to use passive mode when doing ftp transfers
          */
 	void setFTPPassive(bool passive) { this->passive = passive; }

Modified: trunk/include/markupfiltmgr.h
===================================================================
--- trunk/include/markupfiltmgr.h	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/include/markupfiltmgr.h	2020-07-10 17:45:48 UTC (rev 3754)
@@ -39,12 +39,12 @@
         SWFilter* fromosis;
         SWFilter* fromtei;
 
-				/**
-	 			* current markup value
-	 			*/
+	/**
+	 * current markup value
+	 */
         char markup;
 
-        void CreateFilters(char markup);
+        void createFilters(char markup);
 public:
 	/** Constructor of SWMarkupMgr.
 	 *
@@ -63,7 +63,8 @@
 	 * @param m The new markup or FMT_UNKNOWN if you just want to get the current markup.
 	 * @return The current (possibly changed) markup format.
 	 */
-        char Markup(char m = FMT_UNKNOWN);
+        void setMarkup(char m = FMT_UNKNOWN);
+        char getMarkup() const { return markup; }
 
 	/**
 	 * Adds the render filters which are defined in "section" to the SWModule object "module".

Modified: trunk/include/nullim.h
===================================================================
--- trunk/include/nullim.h	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/include/nullim.h	2020-07-10 17:45:48 UTC (rev 3754)
@@ -31,7 +31,7 @@
 
 public:
 	NullIM();
-	int * translate(char ch);
+	int *translate(char ch);
 };
 
 SWORD_NAMESPACE_END

Modified: trunk/include/roman.h
===================================================================
--- trunk/include/roman.h	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/include/roman.h	2020-07-10 17:45:48 UTC (rev 3754)
@@ -27,13 +27,12 @@
 
 /** Checks if a string is a roman numeral.
 */
-char isroman(const char *, int maxchars = 0);
-/* char* to_rom(int num, char *p); */
+char isRoman(const char *, int maxchars = 0);
 
-/** Converts a roman numeral to a string.
+/** Converts a roman numeral to a value.
 * @param s Roman numeral to convert.
 */
-int from_rom(const char *s);
+int fromRoman(const char *s);
 
 SWORD_NAMESPACE_END
 #endif

Modified: trunk/include/swcipher.h
===================================================================
--- trunk/include/swcipher.h	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/include/swcipher.h	2020-07-10 17:45:48 UTC (rev 3754)
@@ -45,8 +45,10 @@
     SWCipher (unsigned char *key);
   virtual void setCipherKey (const char *key);
     virtual ~ SWCipher ();
-  virtual char *Buf (const char *buf = 0, unsigned long len = 0);
-  virtual char *cipherBuf (unsigned long *len, const char *buf = 0);
+  virtual void setUncipheredBuf(const char *buf = 0, unsigned long len = 0);
+  virtual char *getUncipheredBuf();
+  virtual void setCipheredBuf(unsigned long *len, const char *buf = 0);
+  virtual char *getCipheredBuf(unsigned long *len = 0);
   virtual void encode (void);
   virtual void decode (void);
   static SWBuf personalize(const SWBuf &buf, bool encode);

Modified: trunk/include/swcomprs.h
===================================================================
--- trunk/include/swcomprs.h	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/include/swcomprs.h	2020-07-10 17:45:48 UTC (rev 3754)
@@ -30,17 +30,20 @@
 
 class SWDLLEXPORT SWCompress
 {
-  void Init ();
-  void cycleStream ();
+private:
+  void init();
+  void cycleStream();
 protected:
-  char *buf, *zbuf, direct;	// 0 - encode; 1 - decode
+  mutable char *buf, *zbuf, direct;	// 0 - encode; 1 - decode
   unsigned long zlen, zpos, pos, slen;
   int level;
 public:
   SWCompress ();
   virtual ~ SWCompress ();
-  virtual char *Buf (const char *buf = 0, unsigned long *len = 0);
-  virtual char *zBuf (unsigned long *len, char *buf = 0);
+  virtual void setUncompressedBuf(const char *buf = 0, unsigned long *len = 0);
+  virtual char *getUncompressedBuf(unsigned long *len = 0);
+  virtual void setCompressedBuf(unsigned long *len, char *buf = 0);
+  virtual char *getCompressedBuf(unsigned long *len = 0);
   virtual unsigned long getChars (char *buf, unsigned long len);	// override for other than buffer compression
   virtual unsigned long sendChars (char *buf, unsigned long len);	// override for other than buffer compression
   virtual void encode (void);	// override to provide compression algorythm

Modified: trunk/include/swlog.h
===================================================================
--- trunk/include/swlog.h	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/include/swlog.h	2020-07-10 17:45:48 UTC (rev 3754)
@@ -53,11 +53,13 @@
 	void logWarning(const char *fmt, ...) const;
 	void logError(const char *fmt, ...) const;
 	void logInformation(const char *fmt, ...) const;
-	virtual void logTimedInformation(const char *fmt, ...) const;
 	void logDebug(const char *fmt, ...) const;
 
 	// Override this method if you want to have a custom logger
 	virtual void logMessage(const char *message, int level) const;
+
+	// Override if you need to use a special OS clock for timing
+	virtual void logTimedInformation(const char *fmt, ...) const;
 };
 
 SWORD_NAMESPACE_END

Modified: trunk/include/utf8transliterator.h
===================================================================
--- trunk/include/utf8transliterator.h	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/include/utf8transliterator.h	2020-07-10 17:45:48 UTC (rev 3754)
@@ -76,7 +76,7 @@
 	static SWTransMap transMap;
 	UErrorCode utf8status;
 
-	void Load(UErrorCode &status);
+	void load(UErrorCode &status);
 	void registerTrans(const UnicodeString& ID, const UnicodeString& resource, UTransDirection dir, UErrorCode &status);	
 	bool checkTrans(const UnicodeString& ID, UErrorCode &status);
 #endif

Modified: trunk/include/versekey.h
===================================================================
--- trunk/include/versekey.h	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/include/versekey.h	2020-07-10 17:45:48 UTC (rev 3754)
@@ -116,12 +116,6 @@
 	*/
 	virtual char parse(bool checkNormalize = true);
 public:
-#if 0
-	static long otbks[];
-	static long otcps[];
-	static long ntbks[];
-	static long ntcps[];
-#endif
 	int BMAX[2];
 
 	/**

Modified: trunk/include/versetreekey.h
===================================================================
--- trunk/include/versetreekey.h	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/include/versetreekey.h	2020-07-10 17:45:48 UTC (rev 3754)
@@ -112,7 +112,7 @@
 	virtual void Normalize(char autocheck = 0);
 
 	virtual void setPosition(SW_POSITION newpos);
-	virtual long NewIndex() const;
+	virtual long newIndex() const;
 	// OPERATORS --------------------------------------------------------------------
 
 

Modified: trunk/include/ztext.h
===================================================================
--- trunk/include/ztext.h	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/include/ztext.h	2020-07-10 17:45:48 UTC (rev 3754)
@@ -29,14 +29,7 @@
 
 #include <defs.h>
 
-namespace lucene { namespace index {
-class IndexReader;
-}}
 
-namespace lucene { namespace search {
-class IndexSearcher;
-}}
-
 SWORD_NAMESPACE_START
 
 /*** SWModule implementation for compressed modules

Modified: trunk/include/ztext4.h
===================================================================
--- trunk/include/ztext4.h	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/include/ztext4.h	2020-07-10 17:45:48 UTC (rev 3754)
@@ -29,14 +29,7 @@
 
 #include <defs.h>
 
-namespace lucene { namespace index {
-class IndexReader;
-}}
 
-namespace lucene { namespace search {
-class IndexSearcher;
-}}
-
 SWORD_NAMESPACE_START
 
 /*** SWModule implementation for compressed modules

Modified: trunk/src/keys/versekey.cpp
===================================================================
--- trunk/src/keys/versekey.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/src/keys/versekey.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -670,10 +670,10 @@
 				for (loop = (int)strlen(book) - 1; loop+1; loop--) {
 					if (book[loop] == ' ') {
 						// "PS C" is ok, but "II C" is not ok
-						if (isroman(&book[loop+1]) && !isroman(book,loop)) {
+						if (isRoman(&book[loop+1]) && !isRoman(book,loop)) {
 							if (verse == -1) {
 								verse = chap;
-								chap = from_rom(&book[loop+1]);
+								chap = fromRoman(&book[loop+1]);
 								book[loop] = 0;
 							}
 						}
@@ -947,10 +947,10 @@
 		for (loop = (int)strlen(book) - 1; loop+1; loop--) {
 			if (book[loop] == ' ') {
 				// "PS C" is ok, but "II C" is not ok
-				if (isroman(&book[loop+1]) && !isroman(book,loop)) {
+				if (isRoman(&book[loop+1]) && !isRoman(book,loop)) {
 					if (verse == -1) {
 						verse = chap;
-						chap = from_rom(&book[loop+1]);
+						chap = fromRoman(&book[loop+1]);
 						book[loop] = 0;
 					}
 				}

Modified: trunk/src/keys/versetreekey.cpp
===================================================================
--- trunk/src/keys/versetreekey.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/src/keys/versetreekey.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -261,7 +261,7 @@
 	error = 0;
 }
 
-long VerseTreeKey::NewIndex() const {
+long VerseTreeKey::newIndex() const {
 	return treeKey->getOffset();
 }
 

Modified: trunk/src/mgr/encfiltmgr.cpp
===================================================================
--- trunk/src/mgr/encfiltmgr.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/src/mgr/encfiltmgr.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -116,8 +116,7 @@
  *
  * RET: encoding
  */
-char EncodingFilterMgr::Encoding(char enc) {
-	if (enc && enc != encoding) {
+void EncodingFilterMgr::setEncoding(char enc) {
 		encoding = enc;
 		SWFilter *oldfilter = targetenc;
 
@@ -152,8 +151,6 @@
 					module->second->addRenderFilter(targetenc);
 			}
 		}
-	}
-	return encoding;
 }
 
 

Modified: trunk/src/mgr/installmgr.cpp
===================================================================
--- trunk/src/mgr/installmgr.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/src/mgr/installmgr.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -766,5 +766,57 @@
 }
 
 
+/** Override this and provide an input mechanism to allow your users
+ *  to confirm that they understand this important disclaimer.
+ *  This method will be called immediately before attempting to perform
+ *  any network function.
+ *  If you would like your confirmation to always show at a predefined
+ *  time before attempting network operations, then you can call this
+ *  method yourself at the desired time.
+ *
+ *  Return true if your user confirms.
+ *
+ *  User disclaimer should ask user for confirmation of 2 critical items:
+ *  and the default answer should be NO
+ *  (due to possibly the wrong language for the disclaimer)
+ *
+ *  1) detection OK (Not in persecuted country)
+ *  2) repos other than CrossWire may have questionable content
+ *
+ *  A sample default impl is provided below:
+ *
+ */
+bool InstallMgr::isUserDisclaimerConfirmed() const {
+
+	bool confirmed = userDisclaimerConfirmed;
+	
+	if (!confirmed) {
+		std::cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
+		std::cout << "                -=+* WARNING *+=- -=+* WARNING *+=-\n\n\n";
+		std::cout << "Although Install Manager provides a convenient way for installing\n";
+		std::cout << "and upgrading SWORD components, it also uses a systematic method\n";
+		std::cout << "for accessing sites which gives packet sniffers a target to lock\n";
+		std::cout << "into for singling out users. \n\n\n";
+		std::cout << "IF YOU LIVE IN A PERSECUTED COUNTRY AND DO NOT WISH TO RISK DETECTION,\n";
+		std::cout << "YOU SHOULD *NOT* USE INSTALL MANAGER'S REMOTE SOURCE FEATURES.\n\n\n";
+		std::cout << "Also, Remote Sources other than CrossWire may contain less than\n";
+		std::cout << "quality modules, modules with unorthodox content, or even modules\n";
+		std::cout << "which are not legitimately distributable.  Many repositories\n";
+		std::cout << "contain wonderfully useful content.  These repositories simply\n";
+		std::cout << "are not reviewed or maintained by CrossWire and CrossWire\n";
+		std::cout << "cannot be held responsible for their content. CAVEAT EMPTOR.\n\n\n";
+		std::cout << "If you understand this and are willing to enable remote source features\n";
+		std::cout << "then type yes at the prompt\n\n";
+		std::cout << "enable? [no] ";
+
+		char prompt[10];
+		fgets(prompt, 9, stdin);
+		confirmed = (!strcmp(prompt, "yes\n"));
+		std::cout << "\n";
+	}
+	return confirmed;
+}
+
+
 SWORD_NAMESPACE_END
 

Modified: trunk/src/mgr/markupfiltmgr.cpp
===================================================================
--- trunk/src/mgr/markupfiltmgr.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/src/mgr/markupfiltmgr.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -75,7 +75,7 @@
 
 	markup = mark;
 
-	CreateFilters(markup);
+	createFilters(markup);
 }
 
 
@@ -99,8 +99,7 @@
  *
  * RET: markup
  */
-char MarkupFilterMgr::Markup(char mark) {
-	if (mark && mark != markup) {
+void MarkupFilterMgr::setMarkup(char mark) {
 		markup = mark;
 		ModMap::const_iterator module;
 
@@ -110,7 +109,7 @@
 		SWFilter *oldosis  = fromosis;
 		SWFilter *oldtei   = fromtei;
 
-		CreateFilters(markup);
+		createFilters(markup);
 
 		for (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); ++module) {
 			switch (module->second->getMarkup()) {
@@ -201,8 +200,6 @@
 		delete oldplain;
 		delete oldosis;
 		delete oldtei;
-	}
-	return markup;
 }
 
 
@@ -232,7 +229,7 @@
 }
 
 
-void MarkupFilterMgr::CreateFilters(char markup) {
+void MarkupFilterMgr::createFilters(char markup) {
 
 	switch (markup) {
 	case FMT_PLAIN:

Modified: trunk/src/modules/common/bz2comprs.cpp
===================================================================
--- trunk/src/modules/common/bz2comprs.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/src/modules/common/bz2comprs.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -58,8 +58,7 @@
  * 			compressed buffer.
  */
 
-void Bzip2Compress::Encode(void)
-{
+void Bzip2Compress::encode(void) {
 	direct = 0;	// set direction needed by parent [Get|Send]Chars()
 
 	// get buffer
@@ -68,7 +67,7 @@
 	char *chunkbuf = buf;
 	unsigned long chunklen;
 	unsigned long len = 0;
-	while((chunklen = GetChars(chunk, 1023))) {
+	while((chunklen = getChars(chunk, 1023))) {
 		memcpy(chunkbuf, chunk, chunklen);
 		len += chunklen;
 		if (chunklen < 1023)
@@ -88,7 +87,7 @@
 			printf("ERROR in compression\n");
 		}
 		else {
-			SendChars(zbuf, zlen);
+			sendChars(zbuf, zlen);
 		}
 	}
 	else
@@ -108,8 +107,7 @@
  *			i/o.
  */
 
-void Bzip2Compress::Decode(void)
-{
+void Bzip2Compress::decode(void) {
 	direct = 1;	// set direction needed by parent [Get|Send]Chars()
 
 	// get buffer
@@ -118,7 +116,7 @@
 	char *chunkbuf = zbuf;
 	int chunklen;
 	unsigned long zlen = 0;
-	while((chunklen = (int)GetChars(chunk, 1023))) {
+	while((chunklen = (int)getChars(chunk, 1023))) {
 		memcpy(chunkbuf, chunk, chunklen);
 		zlen += chunklen;
 		if (chunklen < 1023)
@@ -134,7 +132,7 @@
 		//printf("Doing decompress {%s}\n", zbuf);
 		slen = 0;
 		switch (BZ2_bzBuffToBuffDecompress(buf, &blen, zbuf, (unsigned int)zlen, 0, 0)){
-			case BZ_OK: SendChars(buf, blen); slen = blen; break;
+			case BZ_OK: sendChars(buf, blen); slen = blen; break;
 			case BZ_MEM_ERROR: fprintf(stderr, "ERROR: not enough memory during decompression.\n"); break;
 			case BZ_OUTBUFF_FULL: fprintf(stderr, "ERROR: not enough room in the out buffer during decompression.\n"); break;
 			case BZ_DATA_ERROR: fprintf(stderr, "ERROR: corrupt data during decompression.\n"); break;

Modified: trunk/src/modules/common/swcipher.cpp
===================================================================
--- trunk/src/modules/common/swcipher.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/src/modules/common/swcipher.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -64,8 +64,7 @@
 }
 
 
-char *SWCipher::Buf(const char *ibuf, unsigned long ilen)
-{
+void SWCipher::setUncipheredBuf(const char *ibuf, unsigned long ilen) {
 	if (ibuf) {
 	
 		if (buf)
@@ -83,13 +82,17 @@
 	}
 
 	decode();
+}
 
+char *SWCipher::getUncipheredBuf() {
+
+	decode();
+
 	return buf;
 }
 
 
-char *SWCipher::cipherBuf(unsigned long *ilen, const char *ibuf)
-{
+void SWCipher::setCipheredBuf(unsigned long *ilen, const char *ibuf) {
 	if (ibuf) {
 	
 		if (buf)
@@ -104,6 +107,14 @@
 	encode();
 
 	*ilen = len;
+}
+
+char *SWCipher::getCipheredBuf(unsigned long *ilen) {
+
+	encode();
+
+	if (ilen) *ilen = len;
+
 	return buf;
 }
 

Modified: trunk/src/modules/common/swcomprs.cpp
===================================================================
--- trunk/src/modules/common/swcomprs.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/src/modules/common/swcomprs.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -36,7 +36,7 @@
 {
 	buf = zbuf = 0;
 	level = 6;
-	Init();
+	init();
 }
 
 
@@ -54,7 +54,7 @@
 }
 
 
-void SWCompress::Init()
+void SWCompress::init()
 {
 		if (buf)
 			free(buf);
@@ -72,51 +72,53 @@
 }
 
 
-char *SWCompress::Buf(const char *ibuf, unsigned long *len) {
-	// setting an uncompressed buffer
+void SWCompress::setUncompressedBuf(const char *ibuf, unsigned long *len) {
 	if (ibuf) {
-		Init();
+		init();
 		slen = (len) ? *len : strlen(ibuf);
 		buf = (char *) calloc(slen + 1, 1);
 		memcpy(buf, ibuf, slen);
 	}
+	if (!buf) {
+		buf = (char *)calloc(1,1); // be sure we at least allocate an empty buf for return;
+		direct = 1;
+		decode();
+		*len = slen;
+	}
+}
 
-	// getting an uncompressed buffer
+char *SWCompress::getUncompressedBuf(unsigned long *len) {
 	if (!buf) {
 		buf = (char *)calloc(1,1); // be sure we at least allocate an empty buf for return;
 		direct = 1;
 		decode();
-//		slen = strlen(buf);
-		if (len)
-			*len = slen;
 	}
+	if (len) *len = slen;
 	return buf;
 }
 
 
-char *SWCompress::zBuf(unsigned long *len, char *ibuf)
-{
-	// setting a compressed buffer
+void SWCompress::setCompressedBuf(unsigned long *len, char *ibuf) {
 	if (ibuf) {
-		Init();
+		init();
 		zbuf = (char *) malloc(*len);
 		memcpy(zbuf, ibuf, *len);
 		zlen = *len;
 	}
+	*len = zlen;
+}
 
-	// getting a compressed buffer
+char *SWCompress::getCompressedBuf(unsigned long *len) {
 	if (!zbuf) {
 		direct = 0;
 		encode();
 	}
-
-	*len = zlen;
+	if (len) *len = zlen;
 	return zbuf;
 }
 
 
-unsigned long SWCompress::getChars(char *ibuf, unsigned long len)
-{
+unsigned long SWCompress::getChars(char *ibuf, unsigned long len) {
 	if (direct) {
 		len = (((zlen - zpos) > (unsigned)len) ? len : zlen - zpos);
 		if (len > 0) {
@@ -136,8 +138,7 @@
 }
 	
 
-unsigned long SWCompress::sendChars(char *ibuf, unsigned long len)
-{
+unsigned long SWCompress::sendChars(char *ibuf, unsigned long len) {
 	if (direct) {
 		if (buf) {
 //			slen = strlen(buf);
@@ -176,8 +177,7 @@
  *						i/o.
  */
 
-void SWCompress::encode(void)
-{
+void SWCompress::encode(void) {
 	cycleStream();
 }
 
@@ -190,8 +190,7 @@
  *						i/o.
  */
 
-void SWCompress::decode(void)
-{
+void SWCompress::decode(void) {
 	cycleStream();
 }
 

Modified: trunk/src/modules/common/xzcomprs.cpp
===================================================================
--- trunk/src/modules/common/xzcomprs.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/src/modules/common/xzcomprs.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -76,8 +76,7 @@
  * 			compressed buffer.
  */
 
-void XzCompress::Encode(void)
-{
+void XzCompress::encode(void) {
 	direct = 0;	// set direction needed by parent [Get|Send]Chars()
 
 	// get buffer
@@ -86,7 +85,7 @@
 	char *chunkbuf = buf;
 	unsigned long chunklen;
 	unsigned long len = 0;
-	while((chunklen = GetChars(chunk, 1023))) {
+	while((chunklen = getChars(chunk, 1023))) {
 		memcpy(chunkbuf, chunk, chunklen);
 		len += chunklen;
 		if (chunklen < 1023)
@@ -103,7 +102,7 @@
 	{
 		//printf("Doing compress\n");
 		switch (lzma_easy_buffer_encode(level | LZMA_PRESET_EXTREME, LZMA_CHECK_CRC64, NULL, (const uint8_t*)buf, (size_t)len, (uint8_t*)zbuf, &zpos, (size_t)zlen)) {
-		        case LZMA_OK: SendChars(zbuf, zpos);  break;
+		        case LZMA_OK: sendChars(zbuf, zpos);  break;
 			case LZMA_BUF_ERROR: fprintf(stderr, "ERROR: not enough room in the out buffer during compression.\n"); break;
 			case LZMA_UNSUPPORTED_CHECK: fprintf(stderr, "ERROR: unsupported_check error encountered during decompression.\n"); break;
 			case LZMA_OPTIONS_ERROR: fprintf(stderr, "ERROR: options error encountered during decompression.\n"); break;
@@ -130,8 +129,7 @@
  *			i/o.
  */
 
-void XzCompress::Decode(void)
-{
+void XzCompress::decode(void) {
 	direct = 1;	// set direction needed by parent [Get|Send]Chars()
 
 	// get buffer
@@ -140,7 +138,7 @@
 	char *chunkbuf = zbuf;
 	int chunklen;
 	unsigned long zlen = 0;
-	while((chunklen = GetChars(chunk, 1023))) {
+	while((chunklen = getChars(chunk, 1023))) {
 		memcpy(chunkbuf, chunk, chunklen);
 		zlen += chunklen;
 		if (chunklen < 1023)
@@ -159,7 +157,7 @@
 		size_t bpos = 0;
 
 		switch (lzma_stream_buffer_decode((uint64_t *)&memlimit, 0, NULL, (const uint8_t*)zbuf, &zpos, (size_t)zlen, (uint8_t*)buf, &bpos, (size_t)&blen)){
-			case LZMA_OK: SendChars(buf, bpos); slen = bpos; break;
+			case LZMA_OK: sendChars(buf, bpos); slen = bpos; break;
 			case LZMA_FORMAT_ERROR: fprintf(stderr, "ERROR: format error encountered during decompression.\n"); break;
 			case LZMA_OPTIONS_ERROR: fprintf(stderr, "ERROR: options error encountered during decompression.\n"); break;
 			case LZMA_DATA_ERROR: fprintf(stderr, "ERROR: corrupt data during decompression.\n"); break;

Modified: trunk/src/modules/common/zstr.cpp
===================================================================
--- trunk/src/modules/common/zstr.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/src/modules/common/zstr.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -413,8 +413,8 @@
 		buf.setSize(size);
 		rawZFilter(buf, 0); // 0 = decipher
 
-		compressor->zBuf(&len, buf.getRawData());
-		char *rawBuf = compressor->Buf(0, &len);
+		compressor->setCompressedBuf(&len, buf.getRawData());
+		char *rawBuf = compressor->getUncompressedBuf(&len);
 		cacheBlock = new EntriesBlock(rawBuf, len);
 		cacheBlockIndex = block;
 	}
@@ -598,12 +598,12 @@
 			SW_u32 outstart = 0, outsize = 0;
 
 			const char *rawBuf = cacheBlock->getRawData(&size);
-			compressor->Buf(rawBuf, &size);
-			compressor->zBuf(&size);
+			compressor->setUncompressedBuf(rawBuf, &size);
+			compressor->getCompressedBuf(&size);
 
 			SWBuf buf;
 			buf.setSize(size + 5);
-			memcpy(buf.getRawData(), compressor->zBuf(&size), size); // 1 = encipher
+			memcpy(buf.getRawData(), compressor->getCompressedBuf(&size), size); // 1 = encipher
 			buf.setSize(size);
 			rawZFilter(buf, 1); // 1 = encipher
 

Modified: trunk/src/modules/common/zverse.cpp
===================================================================
--- trunk/src/modules/common/zverse.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/src/modules/common/zverse.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -261,7 +261,7 @@
 		rawZFilter(pcCompText, 0); // 0 = decipher
 		
 		unsigned long bufSize = ulCompSize;
-		compressor->zBuf(&bufSize, pcCompText.getRawData());
+		compressor->setCompressedBuf(&bufSize, pcCompText.getRawData());
 
 		if (cacheBuf) {
 			flushCache();
@@ -269,9 +269,9 @@
 		}
 		
 		unsigned long len = 0;
-		compressor->Buf(0, &len);
+		compressor->setUncompressedBuf(0, &len);
 		cacheBuf = (char *)calloc(len + 1, 1);
-		memcpy(cacheBuf, compressor->Buf(), len);
+		memcpy(cacheBuf, compressor->getUncompressedBuf(), len);
 		cacheBufSize = (int)strlen(cacheBuf);  // TODO: can we just use len?
 		cacheTestament = testmt;
 		cacheBufIdx = ulBuffNum;
@@ -351,14 +351,14 @@
 	//				delete compressor;
 	//				compressor = new LZSSCompress();
 	//			}
-				compressor->Buf(cacheBuf);
+				compressor->setUncompressedBuf(cacheBuf);
 				unsigned long tmpSize;
-				compressor->zBuf(&tmpSize);
+				compressor->getCompressedBuf(&tmpSize);
 				outzsize = zsize = (SW_u32)tmpSize;
 
 				SWBuf buf;
 				buf.setSize(zsize + 5);
-				memcpy(buf.getRawData(), compressor->zBuf(&tmpSize), tmpSize);
+				memcpy(buf.getRawData(), compressor->getCompressedBuf(&tmpSize), tmpSize);
 				outzsize = zsize = (SW_u32)tmpSize;
 				buf.setSize(zsize);
 				rawZFilter(buf, 1); // 1 = encipher

Modified: trunk/src/modules/common/zverse4.cpp
===================================================================
--- trunk/src/modules/common/zverse4.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/src/modules/common/zverse4.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -259,7 +259,7 @@
 		rawZFilter(pcCompText, 0); // 0 = decipher
 		
 		unsigned long bufSize = ulCompSize;
-		compressor->zBuf(&bufSize, pcCompText.getRawData());
+		compressor->setCompressedBuf(&bufSize, pcCompText.getRawData());
 
 		if (cacheBuf) {
 			flushCache();
@@ -267,9 +267,9 @@
 		}
 		
 		unsigned long len = 0;
-		compressor->Buf(0, &len);
+		compressor->setUncompressedBuf(0, &len);
 		cacheBuf = (char *)calloc(len + 1, 1);
-		memcpy(cacheBuf, compressor->Buf(), len);
+		memcpy(cacheBuf, compressor->getUncompressedBuf(), len);
 		cacheBufSize = (int)strlen(cacheBuf);  // TODO: can we just use len?
 		cacheTestament = testmt;
 		cacheBufIdx = ulBuffNum;
@@ -345,14 +345,14 @@
 		if (cacheBuf) {
 			size = outsize = zsize = outzsize = (SW_u32)strlen(cacheBuf);
 			if (size) {
-				compressor->Buf(cacheBuf);
+				compressor->setUncompressedBuf(cacheBuf);
 				unsigned long tmpSize;
-				compressor->zBuf(&tmpSize);
+				compressor->getCompressedBuf(&tmpSize);
 				outzsize = zsize = (SW_u32)tmpSize;
 
 				SWBuf buf;
 				buf.setSize(zsize + 5);
-				memcpy(buf.getRawData(), compressor->zBuf(&tmpSize), tmpSize);
+				memcpy(buf.getRawData(), compressor->getCompressedBuf(&tmpSize), tmpSize);
 				outzsize = zsize = (SW_u32)tmpSize;
 				buf.setSize(zsize);
 				rawZFilter(buf, 1); // 1 = encipher

Modified: trunk/src/modules/filters/cipherfil.cpp
===================================================================
--- trunk/src/modules/filters/cipherfil.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/src/modules/filters/cipherfil.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -50,14 +50,17 @@
 	if (text.length() > 2) { //check if it's large enough to substract 2 in the next step.
 		unsigned long len = text.length();
 		if (!key) {	// hack, using key to determine encipher, or decipher
-			cipher->cipherBuf(&len, text.getRawData()); //set buffer to enciphered text
-			memcpy(text.getRawData(), cipher->Buf(), len);
-//			text = cipher->Buf(); //get the deciphered buffer
+			cipher->setCipheredBuf(&len, text.getRawData()); //set buffer to enciphered text
+			cipher->getUncipheredBuf();
+			// don't just assign text because we might be compressing binary data
+			text.setSize(len + 5);
+			memcpy(text.getRawData(), cipher->getUncipheredBuf(), len);
 		}
 		else if ((unsigned long)key == 1) {
-			cipher->Buf(text.getRawData(), len);
-			memcpy(text.getRawData(), cipher->cipherBuf(&len), len);
-//			text = cipher->cipherBuf(&len);
+			cipher->setUncipheredBuf(text.getRawData(), len);
+			cipher->getCipheredBuf(&len);
+			text.setSize(len + 5);
+			memcpy(text.getRawData(), cipher->getCipheredBuf(&len), len);
 		}
 	}
 	return 0;

Modified: trunk/src/utilfuns/roman.cpp
===================================================================
--- trunk/src/utilfuns/roman.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/src/utilfuns/roman.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -28,7 +28,7 @@
 SWORD_NAMESPACE_START
 
 
-char isroman (const char *str, int maxchars) {
+char isRoman(const char *str, int maxchars) {
 	char *ch = (char*)str;
 	for (; *ch && (!maxchars || (ch-str) <= maxchars); ch++)
 		if (!strchr("IVXLCDMivxlcdm ", *ch))
@@ -36,7 +36,7 @@
 	return 1;
 }
 
-int from_rom(const char* str) {
+int fromRoman(const char* str) {
 	int i, n = (int)strlen(str);
 	short * num= (short *) calloc(n, sizeof(short));
 	for (i = 0; str[i]; i++) {
@@ -83,7 +83,9 @@
 	for (i = 0; str[i]; i++) {
 		n += num[i];
 	}
-     free(num);
+
+	free(num);
+
 	return n;
 }
 

Modified: trunk/tests/romantest.cpp
===================================================================
--- trunk/tests/romantest.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/tests/romantest.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -27,7 +27,7 @@
 #include <roman.h>
 
 #ifndef NO_SWORD_NAMESPACE
-using sword::from_rom;
+using sword::fromRoman;
 #endif
 
 int main(int argc, char **argv) {
@@ -42,7 +42,7 @@
 		std::cout << buf << std::endl;
 	}
 	*/
-	else std::cout << from_rom(argv[1]) << std::endl;
+	else std::cout << fromRoman(argv[1]) << std::endl;
 	return 0;
 }
 

Modified: trunk/utilities/diatheke/diathekemgr.h
===================================================================
--- trunk/utilities/diatheke/diathekemgr.h	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/utilities/diatheke/diathekemgr.h	2020-07-10 17:45:48 UTC (rev 3754)
@@ -46,8 +46,9 @@
 	bool shape;
 	bool bidi;
 
-	unsigned char Markup(unsigned char m = FMT_UNKNOWN) {return ((DiathekeFilterMgr*)filterMgr)->Markup(m);};
-	unsigned char Encoding(unsigned char e = ENC_UNKNOWN) {return ((EncodingFilterMgr*)filterMgr)->Encoding(e);};
+	unsigned char Markup(unsigned char m = FMT_UNKNOWN) { return ((DiathekeFilterMgr*)filterMgr)->Markup(m); }
+	void setEncoding(unsigned char e = ENC_UNKNOWN) { ((EncodingFilterMgr*)filterMgr)->setEncoding(e); }
+	unsigned char getEncoding() { return ((EncodingFilterMgr*)filterMgr)->getEncoding(); }
 
 	DiathekeMgr(SWConfig * iconf = NULL, SWConfig * isysconfig = NULL, bool autoload = false, char enc = ENC_UTF8, char mark = FMT_PLAIN, bool bidi = false, bool shape = false);
 	virtual ~DiathekeMgr();

Modified: trunk/utilities/installmgr.cpp
===================================================================
--- trunk/utilities/installmgr.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/utilities/installmgr.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -49,50 +49,66 @@
 SWBuf baseDir;
 SWBuf confPath;
 
-bool isConfirmed;
+bool isConfirmedByForce;
 bool isUnvPeerAllowed;
 
+
 void usage(const char *progName = 0, const char *error = 0);
 
+
 class MyInstallMgr : public InstallMgr {
+
 public:
 	MyInstallMgr(const char *privatePath = "./", StatusReporter *sr = 0) : InstallMgr(privatePath, sr) {}
 
-virtual bool isUserDisclaimerConfirmed() const {
-	static bool confirmed = false;
+
+	/*************************************************************
+	 * Provide the necessary user disclaimer.  This is CrossWire
+	 * policy to show this disclaimer before enabling Internet
+	 * features.  Please follow this policy.
+	 */
+	virtual bool isUserDisclaimerConfirmed() const {
+		// override this and show user disclaimer in whatever
+		// display your UI prefers.  Here, we just use the
+		// InstallMgr-provided default which sends the disclaimer
+		// to std::cout and asks for confirmation with fgets
+		//
+		// This is unnecessarily duplicated here for your
+		// convenience as an example.
+		// you can copy and adjust for your frontend
+
+		bool confirmed = userDisclaimerConfirmed;
 	
-	if (isConfirmed) { 
-		confirmed = true;
-	}
-        if (!confirmed) {
-		cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
-		cout << "                -=+* WARNING *+=- -=+* WARNING *+=-\n\n\n";
-		cout << "Although Install Manager provides a convenient way for installing\n";
-		cout << "and upgrading SWORD components, it also uses a systematic method\n";
-		cout << "for accessing sites which gives packet sniffers a target to lock\n";
-		cout << "into for singling out users. \n\n\n";
-		cout << "IF YOU LIVE IN A PERSECUTED COUNTRY AND DO NOT WISH TO RISK DETECTION,\n";
-		cout << "YOU SHOULD *NOT* USE INSTALL MANAGER'S REMOTE SOURCE FEATURES.\n\n\n";
-		cout << "Also, Remote Sources other than CrossWire may contain less than\n";
-		cout << "quality modules, modules with unorthodox content, or even modules\n";
-		cout << "which are not legitimately distributable.  Many repositories\n";
-		cout << "contain wonderfully useful content.  These repositories simply\n";
-		cout << "are not reviewed or maintained by CrossWire and CrossWire\n";
-		cout << "cannot be held responsible for their content. CAVEAT EMPTOR.\n\n\n";
-		cout << "If you understand this and are willing to enable remote source features\n";
-		cout << "then type yes at the prompt\n\n";
-		cout << "enable? [no] ";
+		if (!confirmed) {
+			std::cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
+			std::cout << "                -=+* WARNING *+=- -=+* WARNING *+=-\n\n\n";
+			std::cout << "Although Install Manager provides a convenient way for installing\n";
+			std::cout << "and upgrading SWORD components, it also uses a systematic method\n";
+			std::cout << "for accessing sites which gives packet sniffers a target to lock\n";
+			std::cout << "into for singling out users. \n\n\n";
+			std::cout << "IF YOU LIVE IN A PERSECUTED COUNTRY AND DO NOT WISH TO RISK DETECTION,\n";
+			std::cout << "YOU SHOULD *NOT* USE INSTALL MANAGER'S REMOTE SOURCE FEATURES.\n\n\n";
+			std::cout << "Also, Remote Sources other than CrossWire may contain less than\n";
+			std::cout << "quality modules, modules with unorthodox content, or even modules\n";
+			std::cout << "which are not legitimately distributable.  Many repositories\n";
+			std::cout << "contain wonderfully useful content.  These repositories simply\n";
+			std::cout << "are not reviewed or maintained by CrossWire and CrossWire\n";
+			std::cout << "cannot be held responsible for their content. CAVEAT EMPTOR.\n\n\n";
+			std::cout << "If you understand this and are willing to enable remote source features\n";
+			std::cout << "then type yes at the prompt\n\n";
+			std::cout << "enable? [no] ";
 
-		char prompt[10];
-		fgets(prompt, 9, stdin);
-		confirmed = (!strcmp(prompt, "yes\n"));
-		cout << "\n";
+			char prompt[10];
+			fgets(prompt, 9, stdin);
+			confirmed = (!strcmp(prompt, "yes\n"));
+			std::cout << "\n";
+		}
+		return confirmed;
 	}
-	return confirmed;
-}
 
 };
 
+
 bool isUnverifiedPeerAllowed() {
 	static bool allowed = false;
 	
@@ -160,6 +176,9 @@
 		confPath = baseDir + "/InstallMgr.conf";
 		statusReporter = new MyStatusReporter();
 		installMgr = new MyInstallMgr(baseDir, statusReporter);
+		if (isConfirmedByForce) { 
+			installMgr->setUserDisclaimerConfirmed(true);
+		}
 	}
 }
 
@@ -420,7 +439,7 @@
 
 int main(int argc, char **argv) {
 	
-	isConfirmed = false;
+	isConfirmedByForce = false;
 	isUnvPeerAllowed = false;
 	
 	if (argc < 2) usage(*argv);
@@ -430,7 +449,7 @@
 			SWLog::getSystemLog()->setLogLevel(SWLog::LOG_DEBUG);
 		}
 		else if (!strcmp(argv[i], "--allow-internet-access-and-risk-tracing-and-jail-or-martyrdom")) {
-			isConfirmed = true;
+			isConfirmedByForce = true;
 		}
 		else if (!strcmp(argv[i], "--allow-unverified-tls-peer")) {
 			isUnvPeerAllowed = true;

Modified: trunk/utilities/step2vpl.cpp
===================================================================
--- trunk/utilities/step2vpl.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/utilities/step2vpl.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -316,8 +316,8 @@
 	lseek(fd, vb->offset, SEEK_SET);
 	read(fd, *buf, vb->size);
 
-	compress->zBuf(&size, *buf);
-	strcpy(*buf, compress->Buf());
+	compress->setCompressedBuf(&size, *buf);
+	strcpy(*buf, compress->getUncompressedBuf());
 }
 
 

Modified: trunk/utilities/stepdump.cpp
===================================================================
--- trunk/utilities/stepdump.cpp	2020-07-10 09:32:46 UTC (rev 3753)
+++ trunk/utilities/stepdump.cpp	2020-07-10 17:45:48 UTC (rev 3754)
@@ -244,8 +244,8 @@
 	lseek(fd, vb->offset, SEEK_SET);
 	read(fd, *buf, vb->size);
 
-	compress->zBuf(&size, *buf);
-	strcpy(*buf, compress->Buf());
+	compress->setCompressedBuf(&size, *buf);
+	strcpy(*buf, compress->getUncompressedBuf());
 	cout << "Viewable Block Text:\n";
 	cout << *buf << "\n\n";
 }



More information about the sword-cvs mailing list