2 input-file.cc -- implement Input_file
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl> Jan Nieuwenhuizen <jan@digicash.com>
10 #include <strstream.h>
13 #include "input-file.hh"
15 #include "source-file.hh"
16 #include "binary-source-file.hh"
19 Input_file::Input_file(String s
)
30 Source_file
* sourcefile_p
= 0;
31 // ugh, very dirty, need to go away
32 if ( ( pf
.right_str( 3 ).lower_str() == "mid" ) || ( pf
.right_str( 4 ).lower_str() == "midi" ) )
33 sourcefile_p
= new Binary_source_file( pf
);
35 sourcefile_p
= new Source_file( pf
);
36 source_l_g
->add( sourcefile_p
);
37 sourcefile_l_
= sourcefile_p
;
38 is
= sourcefile_l_
->istream_l();
39 defined_ch_c_l_
= sourcefile_l_
->ch_c_l();
41 cout
<< "[" << pf
<< flush
;
44 Input_file::~Input_file()