This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Strip CR characters from configtool test output


This patch strips any CR characters from test output to avoid the
presence of square blocks in the output pane of the configtool's
run tests dialog box on Linux hosts. [ Bugzilla 85163 ]

John Dallaway
eCosCentric Limited

--cut here--

Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/ChangeLog,v
retrieving revision 1.40
diff -u -5 -r1.40 ChangeLog
--- ChangeLog	19 Mar 2003 17:39:03 -0000	1.40
+++ ChangeLog	25 Mar 2003 10:07:53 -0000
@@ -1,5 +1,10 @@
+2003-03-25  John Dallaway  <jld at ecoscentric dot com>
+
+	* standalone/wxwin/runtestsdlg.cpp: Remove CR characters in test
+	output. [ Bugzilla 85163 ]
+
 2003-03-19  John Dallaway  <jld at ecoscentric dot com>

 	* standalone/wxwin/appsettings.cpp,
 	  standalone/wxwin/configtooldoc.cpp,
 	  standalone/wxwin/ecpch.h,
Index: standalone/wxwin/runtestsdlg.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/runtestsdlg.cpp,v
retrieving revision 1.5
diff -u -5 -r1.5 runtestsdlg.cpp
--- standalone/wxwin/runtestsdlg.cpp	10 Feb 2003 16:16:10 -0000	1.5
+++ standalone/wxwin/runtestsdlg.cpp	25 Mar 2003 10:07:55 -0000
@@ -523,11 +523,20 @@
 void CALLBACK ecRunTestsDialog::TestOutputCallback(void *pParam,LPCTSTR psz)
 {
     ecRunTestsDialog* pWnd = (ecRunTestsDialog*)pParam;
     if (ecRunTestsDialog::m_runTestsDialog)
     {
+        // FIXME: test output should not contain CR characters on non-Windows
+        // platforms so need to find the root of this problem
+#ifndef __WXMSW__
+        wxString output(psz);
+        output.Replace(wxT("\r"), wxEmptyString); // remove CR characters
+        pWnd->OutputToBuffer(output);
+#else
+        // FIXME ends
         pWnd->OutputToBuffer(psz);
+#endif
     }
 }

 // Write to the output buffer for OnIdle to pick up
 void ecRunTestsDialog::OutputToBuffer(const wxString& str)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]