X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3924dd226e469685d02fc2474a3fb149b1aeed2a..92209a39661334baa1552f50cdbf9698053c34de:/utils/tex2rtf/src/texutils.cpp diff --git a/utils/tex2rtf/src/texutils.cpp b/utils/tex2rtf/src/texutils.cpp index f3c25d42b7..7aec24bfc4 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; @@ -378,7 +382,7 @@ void AddTexRef(char *name, char *file, char *sectionName, void WriteTexReferences(char *filename) { - ofstream ostr(filename); + wxSTD ofstream ostr(filename); if (ostr.bad()) return; char buf[200]; @@ -405,7 +409,7 @@ void ReadTexReferences(char *filename) if (!wxFileExists(filename)) return; - ifstream istr(filename, ios::in); + wxSTD ifstream istr(filename, ios::in); if (istr.bad()) return; @@ -450,7 +454,7 @@ void ReadTexReferences(char *filename) * */ -void BibEatWhiteSpace(istream& str) +void BibEatWhiteSpace(wxSTD istream& str) { char ch = str.peek(); @@ -478,7 +482,7 @@ void BibEatWhiteSpace(istream& str) } // Read word up to { or , or space -void BibReadWord(istream& istr, char *buffer) +void BibReadWord(wxSTD istream& istr, char *buffer) { int i = 0; buffer[i] = 0; @@ -495,7 +499,7 @@ void BibReadWord(istream& istr, char *buffer) } // Read string (double-quoted or not) to end quote or EOL -void BibReadToEOL(istream& istr, char *buffer) +void BibReadToEOL(wxSTD istream& istr, char *buffer) { int i = 0; buffer[i] = 0; @@ -524,7 +528,7 @@ void BibReadToEOL(istream& istr, char *buffer) } // Read }-terminated value, taking nested braces into account. -void BibReadValue(istream& istr, char *buffer, bool ignoreBraces = TRUE, +void BibReadValue(wxSTD istream& istr, char *buffer, bool ignoreBraces = TRUE, bool quotesMayTerminate = TRUE) { int braceCount = 1; @@ -580,7 +584,7 @@ bool ReadBib(char *filename) return FALSE; char buf[300]; - ifstream istr(filename, ios::in); + wxSTD ifstream istr(filename, ios::in); if (istr.bad()) return FALSE; BibLine = 1; @@ -1302,7 +1306,7 @@ bool ReadCustomMacros(char *filename) if (!wxFileExists(filename)) return FALSE; - ifstream istr(filename, ios::in); + wxSTD ifstream istr(filename, ios::in); if (istr.bad()) return FALSE; @@ -1459,7 +1463,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 +1476,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)