lilypond-1.3.115
[lilypond.git] / flower / textstream.cc
blob5ab3f3fcdef59f1e9f2fa5d58e2f89e2ec6d4d3a
1 #include "textstream.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) {
19 cerr <<__FUNCTION__<< ": can't open `" << fn << "'\n";
20 exit(1);
23 line_no = 1;
26 void
27 Text_stream::message(String s)
29 cerr << "\n"<<get_name() << ": " << line()<<": "<<s<<endl;