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 File_string the file to be opened, name might be changed if it is
36 found in a search path.
39 Sources::get_file (string *file_string) //UGH
41 if (*file_string != "-" && path_)
43 string file_string_o = path_->find (*file_string);
44 if ((file_string_o == "") && (*file_string != ""))
46 *file_string = file_string_o;
48 Source_file *f = new Source_file (*file_string);
54 Sources::add (Source_file *sourcefile)
56 sourcefiles_.push_back (sourcefile);
61 junk_pointers (sourcefiles_);
65 Sources::get_sourcefile (char const *str0)
67 for (vector<Source_file*>::iterator i = sourcefiles_.begin();
68 i != sourcefiles_.end (); i++)
70 if ((*i)->contains (str0))