lilypond-0.1.12
[lilypond.git] / flower / text-stream.cc
blob530c6f8ecd5f1c5b5b84fa7627b3b3e6c1ab70ab
1 #include "text-stream.hh"
3 Text_stream::Text_stream (String fn)
5 ios::sync_with_stdio();
6 if (fn == "")
8 name = "<STDIN>";
9 f = stdin;
12 else
14 name = fn;
15 f = fopen (fn, "r");
18 if (!f)
20 cerr <<__FUNCTION__<< ": can't open `" << fn << "'\n";
21 exit (1);
24 line_no = 1;
27 void
28 Text_stream::message (String s)
30 cerr << "\n"<<get_name() << ": " << line ()<<": "<<s<<endl;