+#include <iostream.h>
#include "text-stream.hh"
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);
}
// !pushback.size () &&
feof (f);
}
+
+Text_stream::~Text_stream()
+{
+ if (!eof_b())
+ cerr <<__FUNCTION__<< ": closing unended file";
+
+ fclose (f);
+ }