lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [5429] Simplify


From: Greg Chicares
Subject: [lmi-commits] [5429] Simplify
Date: Mon, 12 Mar 2012 05:25:17 +0000

Revision: 5429
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5429
Author:   chicares
Date:     2012-03-12 05:25:16 +0000 (Mon, 12 Mar 2012)
Log Message:
-----------
Simplify

Modified Paths:
--------------
    lmi/trunk/input_test.cpp

Modified: lmi/trunk/input_test.cpp
===================================================================
--- lmi/trunk/input_test.cpp    2012-03-12 05:15:14 UTC (rev 5428)
+++ lmi/trunk/input_test.cpp    2012-03-12 05:25:16 UTC (rev 5429)
@@ -46,17 +46,12 @@
 
 #include <boost/bind.hpp>
 
-#define LMI_USING_XML_SAVE_OPTION
-
 #if defined BOOST_MSVC || defined __BORLANDC__
 #   include <cfloat> // floating-point hardware control
 #endif // defined BOOST_MSVC || defined __BORLANDC__
 #include <cstdio> // std::remove()
 #include <fstream>
 #include <ios>
-#if !defined LMI_USING_XML_SAVE_OPTION
-#   include <sstream>
-#endif // !defined LMI_USING_XML_SAVE_OPTION
 #include <string>
 
 class input_test
@@ -389,41 +384,12 @@
 {
     DocumentClass document(original_filename);
     std::ofstream ofs(replica_filename.c_str(), ios_out_trunc_binary());
-#if defined LMI_USING_XML_SAVE_OPTION
     document.write(ofs);
-#else  // !defined LMI_USING_XML_SAVE_OPTION
-// SOMEDAY !! XMLWRAPP !! Update 'xmlwrapp' to write empty elements as such:
-//   http://mail.gnome.org/archives/xml/2007-May/msg00007.html
-//   http://mail.gnome.org/archives/xml/2006-July/msg00048.html
-// Actually, the issue has been resolved in a better way:
-//   http://lists.nongnu.org/archive/html/lmi/2012-02/msg00007.html
-// and therefore this conditional block will soon be removed.
-
-    std::ostringstream oss0;
-    document.write(oss0);
-    std::string const s(oss0.str());
-
-    std::istringstream iss(s);
-    std::ostringstream oss1;
-    for(;EOF != iss.peek();)
-        {
-        std::string line;
-        std::getline(iss, line);
-        std::string::size_type z = line.find("><");
-        if(std::string::npos != z)
-            {
-            line.erase(z);
-            line += "/>";
-            }
-        oss1 << line << '\n';
-        }
-
-    ofs << oss1.str();
-#endif // !defined LMI_USING_XML_SAVE_OPTION
     if(test_speed_only)
         {
         return;
         }
+
     ofs.close();
     bool okay = files_are_identical(original_filename, replica_filename);
     INVOKE_BOOST_TEST(okay, file, line);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]