2 source.cc -- implement Sources
4 source file of the LilyPond music typesetter
6 (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
11 #include "killing-cons.tcc"
12 #include "source-file.hh"
13 #include "file-path.hh"
22 Sources::set_binary (bool bo)
28 Sources::set_path (File_path *f)
36 @param file_string the file to be opened, name might be changed if it
37 is found in a search path. UGH!
39 @return 0 if no file found
42 Sources::get_file (string &file_string) //UGH
44 if ((file_string != "-") && path_)
46 string file_string_o = path_->find (file_string);
47 if ((file_string_o == "") && (file_string != ""))
49 file_string = file_string_o;
51 Source_file *f = new Source_file (file_string);
57 Sources::add (Source_file *sourcefile)
59 sourcefiles_.push_back (sourcefile);
64 junk_pointers (sourcefiles_);
68 Sources::get_sourcefile (char const *str0)
70 for (vector<Source_file*>::iterator i = sourcefiles_.begin();
71 i != sourcefiles_.end (); i++)
73 if ((*i)->contains (str0))