From 31ad62bc096aaa3de3e0702c92d75b2e43c32605 Mon Sep 17 00:00:00 2001 From: George Tasker Date: Fri, 25 May 2001 13:02:53 +0000 Subject: [PATCH] Changes to detect unresolved references (REF NOT FOUND) during HTML conversion Filenames with underscores are no longer reported as errant uses of '_' character Minor GUI display tweeks. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/tex2rtf/src/htmlutil.cpp | 3 +++ utils/tex2rtf/src/rtfutils.cpp | 2 +- utils/tex2rtf/src/tex2any.cpp | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/utils/tex2rtf/src/htmlutil.cpp b/utils/tex2rtf/src/htmlutil.cpp index f95065016d..c91ca52c9f 100644 --- a/utils/tex2rtf/src/htmlutil.cpp +++ b/utils/tex2rtf/src/htmlutil.cpp @@ -1907,6 +1907,9 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) if (helpRefText) TraverseChildrenFromChunk(helpRefText); TexOutput(" (REF NOT FOUND)"); + wxString errBuf; + errBuf.Printf("Warning: unresolved reference '%s'", refName); + OnInform((char *)errBuf.c_str()); } } else TexOutput("??"); diff --git a/utils/tex2rtf/src/rtfutils.cpp b/utils/tex2rtf/src/rtfutils.cpp index c3a3968f1b..3a596413a8 100644 --- a/utils/tex2rtf/src/rtfutils.cpp +++ b/utils/tex2rtf/src/rtfutils.cpp @@ -3375,7 +3375,7 @@ bool RTFOnArgument(int macroId, int arg_no, bool start) else { TexOutput("??"); - sprintf(buf, "Warning: unresolved reference %s.", refName); + sprintf(buf, "Warning: unresolved reference '%s'", refName); OnInform(buf); } } diff --git a/utils/tex2rtf/src/tex2any.cpp b/utils/tex2rtf/src/tex2any.cpp index d689c9e17e..4f63fba613 100644 --- a/utils/tex2rtf/src/tex2any.cpp +++ b/utils/tex2rtf/src/tex2any.cpp @@ -600,7 +600,8 @@ bool read_a_line(char *buf) errBuf.Printf("An underscore ('_') was detected at line %lu inside file %s that may need a '\\' before it.",LineNumbers[CurrentInputIndex], (const char*) currentFileName.c_str()); OnError((char *)errBuf.c_str()); } - else if ((buf[bufIndex-1] != '\\') && (buf[0] != '%')) // If it is a comment line, then no warnings + else if ((buf[bufIndex-1] != '\\') && (buf[0] != '%') && // If it is a comment line, then no warnings + (strncmp(buf, "\\input", 6))) // do not report filenames that have underscores in them { wxString errBuf; errBuf.Printf("An underscore ('_') was detected at line %lu inside file %s that may need a '\\' before it.",LineNumbers[CurrentInputIndex], (const char*) currentFileName.c_str()); @@ -3133,7 +3134,7 @@ bool DefaultOnArgument(int macroId, int arg_no, bool start) { char buf[300]; TexOutput("??", TRUE); - sprintf(buf, "Warning: unresolved reference %s.", refName); + sprintf(buf, "Warning: unresolved reference '%s'", refName); OnInform(buf); } } -- 2.45.2