+#include <stdlib.h>
#include <iostream.h>
#include "text-stream.hh"
Text_stream::Text_stream (String fn)
{
- ios::sync_with_stdio();
+ ios::sync_with_stdio ();
if (fn == "")
{
name = _ ("<stdin>");
if (!f)
{
cerr << __FUNCTION__
- << ": " << _f ("Can't open file: `%s'", fn) << '\n';
+ << ": " << _f ("can't open file: `%s'", fn) << '\n';
exit (1);
}
void
Text_stream::message (String s)
{
- cerr << '\n'<<get_name() << ": " << line ()<<": "<<s<<endl;
+ cerr << '\n'<<get_name () << ": " << line ()<<": "<<s<<endl;
}
bool
feof (f);
}
-Text_stream::~Text_stream()
+Text_stream::~Text_stream ()
{
- if (!eof_b())
+ if (!eof_b ())
cerr <<__FUNCTION__<< ": closing unended file";
fclose (f);