From ddc4f3b52892cad6d4f54577e78a76889e8ff6b4 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 11 Dec 2003 09:01:25 +0000 Subject: [PATCH] Applied patch [ 817317 ] fixes for errors and warnings reported by MinGW for utils git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- .cvsignore | 12 +++ docs/changes.txt | 1 + utils/HelpGen/src/sourcepainter.cpp | 2 +- utils/configtool/src/configitemselector.cpp | 2 +- utils/configtool/src/configtooldoc.cpp | 2 +- utils/helpview/src/helpview.cpp | 10 +-- utils/tex2rtf/src/htmlutil.cpp | 38 ++++----- utils/tex2rtf/src/rtfutils.cpp | 94 ++++++++++----------- utils/tex2rtf/src/tex2any.cpp | 68 +++++++-------- utils/tex2rtf/src/tex2rtf.cpp | 8 +- utils/tex2rtf/src/texutils.cpp | 53 ++++++------ utils/tex2rtf/src/xlputils.cpp | 18 ++-- 12 files changed, 160 insertions(+), 148 deletions(-) diff --git a/.cvsignore b/.cvsignore index 4258488c81..09c40eb50f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -23,6 +23,18 @@ linux-gnu.system.cache *.swo Release Debug +ReleaseUnicode +DebugUnicode +ReleaseUnicodeARM +DebugUnicodeARM +ReleaseUnicodeMIPS +DebugUnicodeMIPS +ReleaseUnicodeSH3 +DebugUnicodeSH3 +ReleaseUnicodeX86 +DebugUnicodeX86 +ReleaseUnicodeX86EM +DebugUnicodeX86EM ReleaseDLL DebugDLL ReleaseUnicodeDLL diff --git a/docs/changes.txt b/docs/changes.txt index 8bf520f4c2..ffacdc8ae0 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -119,6 +119,7 @@ wxGTK: - fixes to wxTextCtrl scrolling under GTK2 (Nerijus Baliunas) - fix for crash when using user-dashed lines (Chris Borgolte) - fixed wxChoice::Delete() in presence of client data +- allow calling wxWindow::SetFont if window not yet created wxHTML: diff --git a/utils/HelpGen/src/sourcepainter.cpp b/utils/HelpGen/src/sourcepainter.cpp index 333f4aedbb..0c58ea5452 100644 --- a/utils/HelpGen/src/sourcepainter.cpp +++ b/utils/HelpGen/src/sourcepainter.cpp @@ -652,7 +652,7 @@ void SourcePainter::GetResultString(string& result, MarkupTagsT tags) for( unsigned n = 0; n != len; ++n ) - result += mResultStr[pos+n]; + result += mResultStr[(unsigned int)(pos+n)]; pos += len; diff --git a/utils/configtool/src/configitemselector.cpp b/utils/configtool/src/configitemselector.cpp index ae71281e7f..e773e02e30 100644 --- a/utils/configtool/src/configitemselector.cpp +++ b/utils/configtool/src/configitemselector.cpp @@ -248,7 +248,7 @@ void ctConfigItemsSelector::InitSourceConfigList(ctConfigItem* item) ctConfigItem* child = (ctConfigItem*) node->GetData(); InitSourceConfigList(child); - node = node->Next(); + node = node->GetNext(); } } diff --git a/utils/configtool/src/configtooldoc.cpp b/utils/configtool/src/configtooldoc.cpp index a2875fc05e..30588737ae 100644 --- a/utils/configtool/src/configtooldoc.cpp +++ b/utils/configtool/src/configtooldoc.cpp @@ -1229,10 +1229,10 @@ void ctConfiguration::Detach() /// the config items void ctConfiguration::DetachFromTree() { +/* wxTreeItemId item = GetTreeItemId(); // TODO -/* ctTreeItemData* data = (ctTreeItemData*) wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetItemData(item); data->SetConfigItem(NULL); m_treeItemId = wxTreeItemId(); diff --git a/utils/helpview/src/helpview.cpp b/utils/helpview/src/helpview.cpp index 22474726a2..e288092dcb 100644 --- a/utils/helpview/src/helpview.cpp +++ b/utils/helpview/src/helpview.cpp @@ -153,9 +153,7 @@ bool hvApp::OnInit() wxGetCwd(), wxEmptyString, wxEmptyString, - wxT( - "Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|\ - HTML Help Project (*.hhp)|*.hhp"), + wxT("Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp"), wxOPEN | wxFILE_MUST_EXIST, NULL); @@ -226,11 +224,11 @@ bool hvApp::OnInit() int hvApp::OnExit() { #if hvUSE_IPC - wxNode* node = m_connections.First(); + wxNode* node = m_connections.GetFirst(); while (node) { - wxNode* next = node->Next(); - hvConnection* connection = (hvConnection*) node->Data(); + wxNode* next = node->GetNext(); + hvConnection* connection = (hvConnection*) node->GetData(); connection->Disconnect(); delete connection; node = next; diff --git a/utils/tex2rtf/src/htmlutil.cpp b/utils/tex2rtf/src/htmlutil.cpp index d21efe7abd..46aa726a93 100644 --- a/utils/tex2rtf/src/htmlutil.cpp +++ b/utils/tex2rtf/src/htmlutil.cpp @@ -327,12 +327,12 @@ void Text2HTML(TexChunk *chunk) if (def && (def->macroId == ltVERBATIM || def->macroId == ltVERB || def->macroId == ltSPECIAL)) inVerbatim = TRUE; - wxNode *node = chunk->children.First(); + wxNode *node = chunk->children.GetFirst(); while (node) { - TexChunk *child_chunk = (TexChunk *)node->Data(); + TexChunk *child_chunk = (TexChunk *)node->GetData(); Text2HTML(child_chunk); - node = node->Next(); + node = node->GetNext(); } if (def && (def->macroId == ltVERBATIM || def->macroId == ltVERB || def->macroId == ltSPECIAL)) @@ -342,12 +342,12 @@ void Text2HTML(TexChunk *chunk) } case CHUNK_TYPE_ARG: { - wxNode *node = chunk->children.First(); + wxNode *node = chunk->children.GetFirst(); while (node) { - TexChunk *child_chunk = (TexChunk *)node->Data(); + TexChunk *child_chunk = (TexChunk *)node->GetData(); Text2HTML(child_chunk); - node = node->Next(); + node = node->GetNext(); } break; @@ -1215,9 +1215,9 @@ void HTMLOnMacro(int macroId, int no_args, bool start) else { indentLevel --; - if (itemizeStack.First()) + if (itemizeStack.GetFirst()) { - ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.First()->Data(); + ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.GetFirst()->GetData(); switch (struc->listType) { case LATEX_ITEMIZE: @@ -1233,7 +1233,7 @@ void HTMLOnMacro(int macroId, int no_args, bool start) } delete struc; - delete itemizeStack.First(); + delete itemizeStack.GetFirst(); } } break; @@ -1484,10 +1484,10 @@ void HTMLOnMacro(int macroId, int no_args, bool start) { if (!start) { - wxNode *node = itemizeStack.First(); + wxNode *node = itemizeStack.GetFirst(); if (node) { - ItemizeStruc *struc = (ItemizeStruc *)node->Data(); + ItemizeStruc *struc = (ItemizeStruc *)node->GetData(); struc->currentItem += 1; if (struc->listType == LATEX_DESCRIPTION) { @@ -3108,16 +3108,16 @@ void GenerateHTMLIndexFile(char *fname) wxNode *node = NULL; while ((node = TopicTable.Next())) { - TexTopic *texTopic = (TexTopic *)node->Data(); + TexTopic *texTopic = (TexTopic *)node->GetData(); const char *topicName = node->GetKeyString(); if (texTopic->filename && texTopic->keywords) { - wxNode *node1 = texTopic->keywords->First(); + wxStringListNode *node1 = texTopic->keywords->GetFirst(); while (node1) { - char *s = (char *)node1->Data(); + char *s = (char *)node1->GetData(); fprintf(fd, "%s|%s|%s\n", topicName, texTopic->filename, s); - node1 = node1->Next(); + node1 = node1->GetNext(); } } } @@ -3207,21 +3207,21 @@ void GenerateHTMLWorkshopFiles(char *fname) wxNode *node = NULL; while ((node = TopicTable.Next())) { - TexTopic *texTopic = (TexTopic *)node->Data(); + TexTopic *texTopic = (TexTopic *)node->GetData(); const char *topicName = node->GetKeyString(); if (texTopic->filename && texTopic->keywords) { - wxNode *node1 = texTopic->keywords->First(); + wxStringListNode *node1 = texTopic->keywords->GetFirst(); while (node1) { - char *s = (char *)node1->Data(); + char *s = (char *)node1->GetData(); fprintf(f, "
  • \n" " \n" " \n" " \n", texTopic->filename, topicName, s); - node1 = node1->Next(); + node1 = node1->GetNext(); } } } diff --git a/utils/tex2rtf/src/rtfutils.cpp b/utils/tex2rtf/src/rtfutils.cpp index ef7a745683..676d2f5613 100644 --- a/utils/tex2rtf/src/rtfutils.cpp +++ b/utils/tex2rtf/src/rtfutils.cpp @@ -347,10 +347,10 @@ void GenerateKeywordsForTopic(char *topic) wxStringList *list = texTopic->keywords; if (list) { - wxNode *node = list->First(); + wxStringListNode *node = list->GetFirst(); while (node) { - char *s = (char *)node->Data(); + char *s = (char *)node->GetData(); // Must separate out main entry form subentry (only 1 subentry allowed) char buf1[100]; char buf2[100]; @@ -376,7 +376,7 @@ void GenerateKeywordsForTopic(char *topic) TexOutput(buf2); } TexOutput("}\n"); - node = node->Next(); + node = node->GetNext(); } } } @@ -412,12 +412,12 @@ void GenerateIndexEntry(char *entry) void WriteColourTable(FILE *fd) { fprintf(fd, "{\\colortbl"); - wxNode *node = ColourTable.First(); + wxNode *node = ColourTable.GetFirst(); while (node) { - ColourTableEntry *entry = (ColourTableEntry *)node->Data(); + ColourTableEntry *entry = (ColourTableEntry *)node->GetData(); fprintf(fd, "\\red%d\\green%d\\blue%d;\n", entry->red, entry->green, entry->blue); - node = node->Next(); + node = node->GetNext(); } fprintf(fd, "}"); } @@ -717,12 +717,12 @@ void Text2RTF(TexChunk *chunk) if (def && (def->macroId == ltVERBATIM || def->macroId == ltVERB)) inVerbatim = TRUE; - wxNode *node = chunk->children.First(); + wxNode *node = chunk->children.GetFirst(); while (node) { - TexChunk *child_chunk = (TexChunk *)node->Data(); + TexChunk *child_chunk = (TexChunk *)node->GetData(); Text2RTF(child_chunk); - node = node->Next(); + node = node->GetNext(); } if (def && (def->macroId == ltVERBATIM || def->macroId == ltVERB)) @@ -732,12 +732,12 @@ void Text2RTF(TexChunk *chunk) } case CHUNK_TYPE_ARG: { - wxNode *node = chunk->children.First(); + wxNode *node = chunk->children.GetFirst(); while (node) { - TexChunk *child_chunk = (TexChunk *)node->Data(); + TexChunk *child_chunk = (TexChunk *)node->GetData(); Text2RTF(child_chunk); - node = node->Next(); + node = node->GetNext(); } break; @@ -784,10 +784,10 @@ void PushEnvironmentStyle(char *style) void PopEnvironmentStyle(void) { - wxNode *node = environmentStack.Last(); + wxStringListNode *node = environmentStack.GetLast(); if (node) { - char *val = (char *)node->Data(); + char *val = (char *)node->GetData(); delete[] val; delete node; } @@ -796,12 +796,12 @@ void PopEnvironmentStyle(void) // Write out the styles, most recent first. void WriteEnvironmentStyles(void) { - wxNode *node = environmentStack.Last(); + wxStringListNode *node = environmentStack.GetLast(); while (node) { - char *val = (char *)node->Data(); + char *val = (char *)node->GetData(); TexOutput(val); - node = node->Next(); + node = node->GetNext(); } if (!inTabular && (ParIndent > 0) && (forbidParindent == 0)) { @@ -809,7 +809,7 @@ void WriteEnvironmentStyles(void) sprintf(buf, "\\fi%d", ParIndent*20); // Convert points to TWIPS TexOutput(buf); } - if (environmentStack.Number() > 0 || (ParIndent > 0)) + if (environmentStack.GetCount() > 0 || (ParIndent > 0)) TexOutput("\n"); } @@ -2028,9 +2028,9 @@ void RTFOnMacro(int macroId, int no_args, bool start) listType = LATEX_DESCRIPTION; int oldIndent = 0; - wxNode *node = itemizeStack.First(); + wxNode *node = itemizeStack.GetFirst(); if (node) - oldIndent = ((ItemizeStruc *)node->Data())->indentation; + oldIndent = ((ItemizeStruc *)node->GetData())->indentation; int indentSize1 = oldIndent + 20*labelIndentTab; int indentSize2 = oldIndent + 20*itemIndentTab; @@ -2047,11 +2047,11 @@ void RTFOnMacro(int macroId, int no_args, bool start) indentLevel --; PopEnvironmentStyle(); - if (itemizeStack.First()) + if (itemizeStack.GetFirst()) { - ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.First()->Data(); + ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.GetFirst()->GetData(); delete struc; - delete itemizeStack.First(); + delete itemizeStack.GetFirst(); } /* Change 18/7/97 - don't know why we wish to do this if (itemizeStack.Number() == 0) @@ -2070,9 +2070,9 @@ void RTFOnMacro(int macroId, int no_args, bool start) { indentLevel ++; int oldIndent = 0; - wxNode *node = itemizeStack.First(); + wxNode *node = itemizeStack.GetFirst(); if (node) - oldIndent = ((ItemizeStruc *)node->Data())->indentation; + oldIndent = ((ItemizeStruc *)node->GetData())->indentation; int indentSize = oldIndent + TwoColWidthA; @@ -2087,11 +2087,11 @@ void RTFOnMacro(int macroId, int no_args, bool start) { indentLevel --; PopEnvironmentStyle(); - if (itemizeStack.First()) + if (itemizeStack.GetFirst()) { - ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.First()->Data(); + ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.GetFirst()->GetData(); delete struc; - delete itemizeStack.First(); + delete itemizeStack.GetFirst(); } /* // JACS June 1997 @@ -2099,7 +2099,7 @@ void RTFOnMacro(int macroId, int no_args, bool start) WriteEnvironmentStyles(); */ /* why do we need this? */ - if (itemizeStack.Number() == 0) + if (itemizeStack.GetCount() == 0) { issuedNewParagraph = 0; OnMacro(ltPAR, 0, TRUE); @@ -2110,10 +2110,10 @@ void RTFOnMacro(int macroId, int no_args, bool start) } case ltITEM: { - wxNode *node = itemizeStack.First(); + wxNode *node = itemizeStack.GetFirst(); if (node) { - ItemizeStruc *struc = (ItemizeStruc *)node->Data(); + ItemizeStruc *struc = (ItemizeStruc *)node->GetData(); if (!start) { struc->currentItem += 1; @@ -2200,20 +2200,20 @@ void RTFOnMacro(int macroId, int no_args, bool start) case ltTWOCOLITEM: case ltTWOCOLITEMRULED: { - wxNode *node = itemizeStack.First(); + wxNode *node = itemizeStack.GetFirst(); if (node) { - ItemizeStruc *struc = (ItemizeStruc *)node->Data(); + ItemizeStruc *struc = (ItemizeStruc *)node->GetData(); if (start) { struc->currentItem += 1; int oldIndent = 0; wxNode *node2 = NULL; - if (itemizeStack.Number() > 1) // TODO: do I actually mean Nth(0) here?? - node2 = itemizeStack.Nth(1); + if (itemizeStack.GetCount() > 1) // TODO: do I actually mean Nth(0) here?? + node2 = itemizeStack.Item(1); if (node2) - oldIndent = ((ItemizeStruc *)node2->Data())->indentation; + oldIndent = ((ItemizeStruc *)node2->GetData())->indentation; TexOutput("\n"); if (struc->currentItem > 1) @@ -4687,9 +4687,9 @@ bool RTFOnArgument(int macroId, int arg_no, bool start) // indentLevel ++; // TexOutput("\\fi0\n"); int oldIndent = 0; - wxNode *node = itemizeStack.First(); + wxNode *node = itemizeStack.GetFirst(); if (node) - oldIndent = ((ItemizeStruc *)node->Data())->indentation; + oldIndent = ((ItemizeStruc *)node->GetData())->indentation; int indentValue = 20*ParseUnitArgument(GetArgData()); int indentSize = indentValue + oldIndent; @@ -4705,13 +4705,13 @@ bool RTFOnArgument(int macroId, int arg_no, bool start) if (!start && (arg_no == 2)) { PopEnvironmentStyle(); - if (itemizeStack.First()) + if (itemizeStack.GetFirst()) { - ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.First()->Data(); + ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.GetFirst()->GetData(); delete struc; - delete itemizeStack.First(); + delete itemizeStack.GetFirst(); } - if (itemizeStack.Number() == 0) + if (itemizeStack.GetCount() == 0) { TexOutput("\\par\\pard\n"); issuedNewParagraph = 1; @@ -4728,9 +4728,9 @@ bool RTFOnArgument(int macroId, int arg_no, bool start) if (start && (arg_no == 1)) { int oldIndent = 0; - wxNode *node = itemizeStack.First(); + wxNode *node = itemizeStack.GetFirst(); if (node) - oldIndent = ((ItemizeStruc *)node->Data())->indentation; + oldIndent = ((ItemizeStruc *)node->GetData())->indentation; int boxWidth = 20*ParseUnitArgument(GetArgData()); @@ -4750,11 +4750,11 @@ bool RTFOnArgument(int macroId, int arg_no, bool start) if (!start && (arg_no == 2)) { PopEnvironmentStyle(); - if (itemizeStack.First()) + if (itemizeStack.GetFirst()) { - ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.First()->Data(); + ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.GetFirst()->GetData(); delete struc; - delete itemizeStack.First(); + delete itemizeStack.GetFirst(); } if (itemizeStack.Number() == 0) { diff --git a/utils/tex2rtf/src/tex2any.cpp b/utils/tex2rtf/src/tex2any.cpp index 2e5df17be9..de7e4b662a 100644 --- a/utils/tex2rtf/src/tex2any.cpp +++ b/utils/tex2rtf/src/tex2any.cpp @@ -1477,10 +1477,10 @@ int ParseArg(TexChunk *thisArg, wxList& children, char *buffer, int pos, char *e { int n = buffer[pos] - 48; pos ++; - wxNode *node = customMacroArgs->children.Nth(n-1); + wxNode *node = customMacroArgs->children.Item(n-1); if (node) { - TexChunk *argChunk = (TexChunk *)node->Data(); + TexChunk *argChunk = (TexChunk *)node->GetData(); children.Append((wxObject *)new TexChunk(*argChunk)); } } @@ -1654,12 +1654,12 @@ int ParseMacroBody(const char *macro_name, TexChunk *parent, parent->no_args = maxArgs; // Tell each argument how many args there are (useful when processing an arg) - wxNode *node = parent->children.First(); + wxNode *node = parent->children.GetFirst(); while (node) { - TexChunk *chunk = (TexChunk *)node->Data(); + TexChunk *chunk = (TexChunk *)node->GetData(); chunk->no_args = maxArgs; - node = node->Next(); + node = node->GetNext(); } return pos; } @@ -1739,12 +1739,12 @@ TexChunk::TexChunk(TexChunk& toCopy) value = NULL; optional = toCopy.optional; - wxNode *node = toCopy.children.First(); + wxNode *node = toCopy.children.GetFirst(); while (node) { - TexChunk *child = (TexChunk *)node->Data(); + TexChunk *child = (TexChunk *)node->GetData(); children.Append((wxObject *)new TexChunk(*child)); - node = node->Next(); + node = node->GetNext(); } } @@ -1752,12 +1752,12 @@ TexChunk::~TexChunk(void) { // if (name) delete[] name; if (value) delete[] value; - wxNode *node = children.First(); + wxNode *node = children.GetFirst(); while (node) { - TexChunk *child = (TexChunk *)node->Data(); + TexChunk *child = (TexChunk *)node->GetData(); delete child; - wxNode *next = node->Next(); + wxNode *next = node->GetNext(); delete node; node = next; } @@ -1794,25 +1794,25 @@ void GetArgData1(TexChunk *chunk) strcat(currentArgData, def->name); } - wxNode *node = chunk->children.First(); + wxNode *node = chunk->children.GetFirst(); while (node) { - TexChunk *child_chunk = (TexChunk *)node->Data(); + TexChunk *child_chunk = (TexChunk *)node->GetData(); strcat(currentArgData, "{"); GetArgData1(child_chunk); strcat(currentArgData, "}"); - node = node->Next(); + node = node->GetNext(); } break; } case CHUNK_TYPE_ARG: { - wxNode *node = chunk->children.First(); + wxNode *node = chunk->children.GetFirst(); while (node) { - TexChunk *child_chunk = (TexChunk *)node->Data(); + TexChunk *child_chunk = (TexChunk *)node->GetData(); GetArgData1(child_chunk); - node = node->Next(); + node = node->GetNext(); } break; } @@ -1885,17 +1885,17 @@ void TraverseFromChunk(TexChunk *chunk, wxNode *thisNode, bool childrenOnly) if (!childrenOnly) OnMacro(chunk->macroId, chunk->no_args, TRUE); - wxNode *node = chunk->children.First(); + wxNode *node = chunk->children.GetFirst(); TexChunk *child_chunk = NULL; while (node) { - child_chunk = (TexChunk *)node->Data(); + child_chunk = (TexChunk *)node->GetData(); TraverseFromChunk(child_chunk, node); - node = node->Next(); + node = node->GetNext(); } - if (thisNode && thisNode->Next()) - nextChunk = (TexChunk *)thisNode->Next()->Data(); + if (thisNode && thisNode->GetNext()) + nextChunk = (TexChunk *)thisNode->GetNext()->GetData(); if (!childrenOnly) OnMacro(chunk->macroId, chunk->no_args, FALSE); @@ -1912,19 +1912,19 @@ void TraverseFromChunk(TexChunk *chunk, wxNode *thisNode, bool childrenOnly) if (childrenOnly || OnArgument(chunk->macroId, chunk->argn, TRUE)) { - wxNode *node = chunk->children.First(); + wxNode *node = chunk->children.GetFirst(); while (node) { - TexChunk *child_chunk = (TexChunk *)node->Data(); + TexChunk *child_chunk = (TexChunk *)node->GetData(); TraverseFromChunk(child_chunk, node); - node = node->Next(); + node = node->GetNext(); } } currentArgument = chunk; - if (thisNode && thisNode->Next()) - nextChunk = (TexChunk *)thisNode->Next()->Data(); + if (thisNode && thisNode->GetNext()) + nextChunk = (TexChunk *)thisNode->GetNext()->GetData(); isArgOptional = chunk->optional; noArgs = chunk->no_args; @@ -2049,13 +2049,13 @@ void TexCleanUp(void) { /* Don't want to remove custom macros after each pass.*/ SetFontSizes(10); - wxNode *node = CustomMacroList.First(); + wxNode *node = CustomMacroList.GetFirst(); while (node) { - CustomMacro *macro = (CustomMacro *)node->Data(); + CustomMacro *macro = (CustomMacro *)node->GetData(); delete macro; delete node; - node = CustomMacroList.First(); + node = CustomMacroList.GetFirst(); } } /**/ @@ -2063,19 +2063,19 @@ void TexCleanUp(void) wxNode *node = TexReferences.Next(); while (node) { - TexRef *ref = (TexRef *)node->Data(); + TexRef *ref = (TexRef *)node->GetData(); delete ref; node = TexReferences.Next(); } TexReferences.Clear(); - node = BibList.First(); + node = BibList.GetFirst(); while (node) { - BibEntry *entry = (BibEntry *)node->Data(); + BibEntry *entry = (BibEntry *)node->GetData(); delete entry; delete node; - node = BibList.First(); + node = BibList.GetFirst(); } CitationList.Clear(); ResetTopicCounter(); diff --git a/utils/tex2rtf/src/tex2rtf.cpp b/utils/tex2rtf/src/tex2rtf.cpp index 2481b35b62..52294e31a3 100644 --- a/utils/tex2rtf/src/tex2rtf.cpp +++ b/utils/tex2rtf/src/tex2rtf.cpp @@ -457,19 +457,19 @@ bool MyApp::OnInit() #ifndef NO_GUI int MyApp::OnExit() { - wxNode *node = CustomMacroList.First(); + wxNode *node = CustomMacroList.GetFirst(); while (node) { - CustomMacro *macro = (CustomMacro *)node->Data(); + CustomMacro *macro = (CustomMacro *)node->GetData(); delete macro; delete node; - node = CustomMacroList.First(); + node = CustomMacroList.GetFirst(); } MacroDefs.BeginFind(); node = MacroDefs.Next(); while (node) { - TexMacroDef* def = (TexMacroDef*) node->Data(); + TexMacroDef* def = (TexMacroDef*) node->GetData(); delete def; node = MacroDefs.Next(); } diff --git a/utils/tex2rtf/src/texutils.cpp b/utils/tex2rtf/src/texutils.cpp index 30ce714099..e1ae599b59 100644 --- a/utils/tex2rtf/src/texutils.cpp +++ b/utils/tex2rtf/src/texutils.cpp @@ -24,6 +24,7 @@ #include "wx/log.h" #endif +#include "wx/app.h" #include "wx/hash.h" #ifdef new @@ -182,16 +183,16 @@ char *FindTopicName(TexChunk *chunk) if (chunk && (chunk->type == CHUNK_TYPE_MACRO) && (chunk->macroId == ltLABEL)) { - wxNode *node = chunk->children.First(); + wxNode *node = chunk->children.GetFirst(); if (node) { - TexChunk *child = (TexChunk *)node->Data(); + TexChunk *child = (TexChunk *)node->GetData(); if (child->type == CHUNK_TYPE_ARG) { - wxNode *snode = child->children.First(); + wxNode *snode = child->children.GetFirst(); if (snode) { - TexChunk *schunk = (TexChunk *)snode->Data(); + TexChunk *schunk = (TexChunk *)snode->GetData(); if (schunk->type == CHUNK_TYPE_STRING) topicName = schunk->value; } @@ -402,7 +403,7 @@ void WriteTexReferences(char *filename) while (node) { Tex2RTFYield(); - TexRef *ref = (TexRef *)node->Data(); + TexRef *ref = (TexRef *)node->GetData(); ostr << ref->refLabel << " " << (ref->refFile ? ref->refFile : "??") << " "; ostr << (ref->sectionName ? ref->sectionName : "??") << " "; ostr << (ref->sectionNumber ? ref->sectionNumber : "??") << "\n"; @@ -988,19 +989,19 @@ void OutputBib(void) OnMacro(ltPAR, 0, FALSE); } - wxNode *node = CitationList.First(); + wxStringListNode *node = CitationList.GetFirst(); while (node) { - char *citeKey = (char *)node->Data(); + char *citeKey = (char *)node->GetData(); // wxNode *texNode = TexReferences.Find(citeKey); TexRef *ref = (TexRef *)TexReferences.Get(citeKey); wxNode *bibNode = BibList.Find(citeKey); if (bibNode && ref) { - BibEntry *entry = (BibEntry *)bibNode->Data(); + BibEntry *entry = (BibEntry *)bibNode->GetData(); OutputBibItem(ref, entry); } - node = node->Next(); + node = node->GetNext(); } } @@ -1008,23 +1009,23 @@ static int citeCount = 1; void ResolveBibReferences(void) { - if (CitationList.Number() > 0) + if (CitationList.GetCount() > 0) OnInform("Resolving bibliographic references..."); citeCount = 1; char buf[200]; - wxNode *node = CitationList.First(); + wxStringListNode *node = CitationList.GetFirst(); while (node) { Tex2RTFYield(); - char *citeKey = (char *)node->Data(); + char *citeKey = (char *)node->GetData(); // wxNode *texNode = TexReferences.Find(citeKey); TexRef *ref = (TexRef *)TexReferences.Get(citeKey); wxNode *bibNode = BibList.Find(citeKey); if (bibNode && ref) { // Unused Variable - //BibEntry *entry = (BibEntry *)bibNode->Data(); + //BibEntry *entry = (BibEntry *)bibNode->GetData(); if (ref->sectionNumber) delete[] ref->sectionNumber; sprintf(buf, "[%d]", citeCount); ref->sectionNumber = copystring(buf); @@ -1035,7 +1036,7 @@ void ResolveBibReferences(void) sprintf(buf, "Warning: bib ref %s not resolved.", citeKey); OnInform(buf); } - node = node->Next(); + node = node->GetNext(); } } @@ -1412,7 +1413,7 @@ CustomMacro *FindCustomMacro(char *name) wxNode *node = CustomMacroList.Find(name); if (node) { - CustomMacro *macro = (CustomMacro *)node->Data(); + CustomMacro *macro = (CustomMacro *)node->GetData(); return macro; } return NULL; @@ -1421,7 +1422,7 @@ CustomMacro *FindCustomMacro(char *name) // Display custom macros void ShowCustomMacros(void) { - wxNode *node = CustomMacroList.First(); + wxNode *node = CustomMacroList.GetFirst(); if (!node) { OnInform("No custom macros loaded.\n"); @@ -1431,11 +1432,11 @@ void ShowCustomMacros(void) char buf[400]; while (node) { - CustomMacro *macro = (CustomMacro *)node->Data(); + CustomMacro *macro = (CustomMacro *)node->GetData(); sprintf(buf, "\\%s[%d]\n {%s}", macro->macroName, macro->noArgs, macro->macroBody ? macro->macroBody : ""); OnInform(buf); - node = node->Next(); + node = node->GetNext(); } } @@ -1505,7 +1506,7 @@ void AddColour(const char *theName, unsigned int r, unsigned int g, unsigned i wxNode *node = ColourTable.Find(theName); if (node) { - ColourTableEntry *entry = (ColourTableEntry *)node->Data(); + ColourTableEntry *entry = (ColourTableEntry *)node->GetData(); if (entry->red == r || entry->green == g || entry->blue == b) return; else @@ -1521,14 +1522,14 @@ void AddColour(const char *theName, unsigned int r, unsigned int g, unsigned i int FindColourPosition(char *theName) { int i = 0; - wxNode *node = ColourTable.First(); + wxNode *node = ColourTable.GetFirst(); while (node) { - ColourTableEntry *entry = (ColourTableEntry *)node->Data(); + ColourTableEntry *entry = (ColourTableEntry *)node->GetData(); if (strcmp(theName, entry->name) == 0) return i; i ++; - node = node->Next(); + node = node->GetNext(); } return -1; } @@ -1538,10 +1539,10 @@ extern void DecToHex(int, char *); bool FindColourHTMLString(char *theName, char *buf) { int i = 0; - wxNode *node = ColourTable.First(); + wxNode *node = ColourTable.GetFirst(); while (node) { - ColourTableEntry *entry = (ColourTableEntry *)node->Data(); + ColourTableEntry *entry = (ColourTableEntry *)node->GetData(); if (strcmp(theName, entry->name) == 0) { strcpy(buf, "#"); @@ -1557,7 +1558,7 @@ bool FindColourHTMLString(char *theName, char *buf) return TRUE; } i ++; - node = node->Next(); + node = node->GetNext(); } return FALSE; } @@ -1637,7 +1638,7 @@ void ClearKeyWordTable(void) wxNode *node = TopicTable.Next(); while (node) { - TexTopic *texTopic = (TexTopic *)node->Data(); + TexTopic *texTopic = (TexTopic *)node->GetData(); delete texTopic; node = TopicTable.Next(); } diff --git a/utils/tex2rtf/src/xlputils.cpp b/utils/tex2rtf/src/xlputils.cpp index 99c7fbd3ad..148f877dd9 100644 --- a/utils/tex2rtf/src/xlputils.cpp +++ b/utils/tex2rtf/src/xlputils.cpp @@ -348,21 +348,21 @@ void XLPOnMacro(int macroId, int no_args, bool start) { indentLevel --; - if (itemizeStack.First()) + if (itemizeStack.GetFirst()) { - ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.First()->Data(); + ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.GetFirst()->GetData(); delete struc; - delete itemizeStack.First(); + delete itemizeStack.GetFirst(); } } break; } case ltITEM: { - wxNode *node = itemizeStack.First(); + wxNode *node = itemizeStack.GetFirst(); if (node) { - ItemizeStruc *struc = (ItemizeStruc *)node->Data(); + ItemizeStruc *struc = (ItemizeStruc *)node->GetData(); if (!start) { struc->currentItem += 1; @@ -1176,18 +1176,18 @@ bool XLPGo(void) contentsString ? contentsString : "WXHELPCONTENTS"); TraverseDocument(); - wxNode *node = hyperLinks.First(); + wxNode *node = hyperLinks.GetFirst(); while (node) { long from = node->GetKeyInteger(); - char *label = (char *)node->Data(); + char *label = (char *)node->GetData(); wxNode *otherNode = hyperLabels.Find(label); if (otherNode) { - long to = (long)otherNode->Data(); + long to = (long)otherNode->GetData(); fprintf(Index, "%ld %ld\n", from, to); } - node = node->Next(); + node = node->GetNext(); } fprintf(Index, "}\n"); -- 2.45.2