2 input.cc -- implement Input
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
12 #include "source-file.hh"
14 Input::Input(Sources*s, char const *cl)
26 Input::Input(Input const &s)
28 sources_l_ = s.sources_l_;
29 defined_ch_C_ = s.defined_ch_C_;
33 Input::set_spot(Input const &i)
39 Input::message(String message_str)const
42 Source_file* sourcefile_l=0;
45 sourcefile_l = sources_l_->sourcefile_l( defined_ch_C_ );
48 str += sourcefile_l->file_line_no_str(defined_ch_C_) + String(": ");
54 str += sourcefile_l->error_str( defined_ch_C_);
64 Input::warning( String message_str)const
66 message( "warning: " + message_str);
69 Input::error(String s)const
71 message("error: "+ s);
76 Input::location_str()const
78 Source_file * sourcefile_l=0;
80 sourcefile_l = sources_l_->sourcefile_l (defined_ch_C_);
82 return sourcefile_l->file_line_no_str(defined_ch_C_);
84 return "(location unknown)";