X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd107c50be43e8d4dbdba20df162faf119a3781c..c354beeafacc20831ce76e266703d07f27e826c7:/utils/tex2rtf/src/texutils.cpp diff --git a/utils/tex2rtf/src/texutils.cpp b/utils/tex2rtf/src/texutils.cpp index ac68e43211..ef76580db1 100644 --- a/utils/tex2rtf/src/texutils.cpp +++ b/utils/tex2rtf/src/texutils.cpp @@ -24,7 +24,11 @@ #include "wx/wx.h" #endif -#include +#include "wx/hash.h" + +#ifdef new +#undef new +#endif #if wxUSE_IOSTREAMH #include @@ -146,7 +150,7 @@ void ResetTopicCounter(void) static char *forceTopicName = NULL; -void ForceTopicName(char *name) +void ForceTopicName(const char *name) { if (forceTopicName) delete[] forceTopicName; @@ -538,8 +542,9 @@ void BibReadValue(wxSTD istream& istr, char *buffer, bool ignoreBraces = TRUE, if (i >= 4000) { char buf[100]; - sprintf(buf, "Sorry, value > 4000 chars in bib file at line %ld, terminating.", BibLine); - wxFatalError(buf, "Tex2RTF Fatal Error"); + sprintf(buf, "Sorry, value > 4000 chars in bib file at line %ld.", BibLine); + wxLogError(buf, "Tex2RTF Fatal Error"); + return; } istr.get(ch); @@ -1179,6 +1184,13 @@ char *RegisterSetting(char *settingName, char *settingValue, bool interactive) htmlFrameContents = StringTobool(settingValue); else if (StringMatch(settingName, "upperCaseNames", FALSE, TRUE)) upperCaseNames = StringTobool(settingValue); + else if (StringMatch(settingName, "ignoreBadRefs", FALSE, TRUE)) + ignoreBadRefs = StringTobool(settingValue); + else if (StringMatch(settingName, "htmlFaceName", FALSE, TRUE)) + { + delete[] htmlFaceName; + htmlFaceName = copystring(settingValue); + } else if (StringMatch(settingName, "winHelpTitle", FALSE, TRUE)) { if (winHelpTitle) @@ -1459,7 +1471,7 @@ char *ParseMultifieldString(char *allFields, int *pos) * */ -ColourTableEntry::ColourTableEntry(char *theName, unsigned int r, unsigned int g, unsigned int b) +ColourTableEntry::ColourTableEntry(const char *theName, unsigned int r, unsigned int g, unsigned int b) { name = copystring(theName); red = r; @@ -1472,7 +1484,7 @@ ColourTableEntry::~ColourTableEntry(void) delete[] name; } -void AddColour(char *theName, unsigned int r, unsigned int g, unsigned int b) +void AddColour(const char *theName, unsigned int r, unsigned int g, unsigned int b) { wxNode *node = ColourTable.Find(theName); if (node)