]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/text-stream.cc
release: 1.3.18
[lilypond.git] / flower / text-stream.cc
index 9c87211c252e02ff06cf9f9c60733936cff49731..cb88bcd498165d5db03eff0170050c90c5b524cf 100644 (file)
@@ -1,3 +1,4 @@
+#include <iostream.h>
 #include "text-stream.hh"
 
 Text_stream::Text_stream (String fn)
@@ -18,7 +19,7 @@ Text_stream::Text_stream (String fn)
   if (!f)
     {
       cerr << __FUNCTION__ 
-          << ": " << _f ("can't open file: `%s'", fn) << '\n';
+          << ": " << _f ("Can't open file: `%s'", fn) << '\n';
       exit (1);
     }
 
@@ -39,3 +40,11 @@ Text_stream::eof_b ()
       // !pushback.size () && 
       feof (f);
 }
+
+Text_stream::~Text_stream()
+{
+    if (!eof_b()) 
+      cerr <<__FUNCTION__<< ": closing unended file";
+    
+    fclose (f);
+  }