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 "source-file.hh"
12 #include "file-path.hh"
21 Sources::set_binary (bool bo)
27 Sources::set_path (File_path *f)
35 @param file_string the file to be opened, name might be changed if it
36 is found in a search path. UGH!
38 @return 0 if no file found
41 Sources::get_file (string &file_string) //UGH
43 if ((file_string != "-") && path_)
45 string file_string_o = path_->find (file_string);
46 if ((file_string_o == "") && (file_string != ""))
48 file_string = file_string_o;
50 Source_file *f = new Source_file (file_string);
56 Sources::add (Source_file *sourcefile)
58 sourcefiles_.push_back (sourcefile);
63 junk_pointers (sourcefiles_);
67 Sources::get_sourcefile (char const *str0)
69 for (vector<Source_file*>::iterator i = sourcefiles_.begin();
70 i != sourcefiles_.end (); i++)
72 if ((*i)->contains (str0))