2 source.cc -- implement Sources
4 source file of the LilyPond music typesetter
6 (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
11 #include "source-file.hh"
12 #include "file-path.hh"
20 Sources::Sources (Sources const &)
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 for (vsize i = 0; i < sourcefiles_.size (); i++)
63 sourcefiles_[i]->unprotect ();