Unified Messaging Subsystem
[supertux.git] / src / lisp / writer.cpp
index 3969789..ee0633c 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "writer.hpp"
 #include "physfs/physfs_stream.hpp"
+#include "msg.hpp"
 
 namespace lisp
 {
@@ -44,7 +45,7 @@ Writer::Writer(std::ostream* newout)
 Writer::~Writer()
 {
   if(lists.size() > 0) {
-    std::cerr << "Warning: Not all sections closed in lispwriter!\n";
+    msg_warning("Not all sections closed in lispwriter");
   }
   if(out_owned)
     delete out;
@@ -70,13 +71,13 @@ void
 Writer::end_list(const std::string& listname)
 {
   if(lists.size() == 0) {
-    std::cerr << "Trying to close list '" << listname 
-              << "', which is not open.\n";
+    msg_warning("Trying to close list '" << listname 
+              << "', which is not open");
     return;
   }
   if(lists.back() != listname) {
-    std::cerr << "Warning: trying to close list '" << listname 
-              << "' while list '" << lists.back() << "' is open.\n";
+    msg_warning("trying to close list '" << listname 
+              << "' while list '" << lists.back() << "' is open");
     return;
   }
   lists.pop_back();