lilypond-0.1.37
[lilypond.git] / lily / scores.cc
blobedb4bbec801b5668cfbfe79f6d9748cefbd4030b
1 /*
2 scores.cc -- implement some globals
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
9 #include "main.hh"
10 #include "score.hh"
11 #include "string.hh"
12 #include "paper-def.hh"
13 #include "header.hh"
14 #include "debug.hh"
15 #include "parray.hh"
17 static Link_array<Score> global_score_array;
18 String default_out_fn = "lelie";
20 void
21 do_scores()
23 for (int i=0; i < global_score_array.size(); i++)
25 Score *&is_p = global_score_array[i];
26 if (!is_p->header_p_)
27 is_p->header_p_ = new Header;
29 is_p->header_p_->lily_id_str_ = "Lily was here, " +
30 get_version_number_str();
31 if (is_p->errorlevel_i_)
33 is_p->warning (_("Score contains errors. Will not process it. "));
34 exit_status_i_ |= 1;
36 else
38 is_p->process();
43 void
44 clear_scores ()
46 for (int i=0; i < global_score_array.size(); i++)
48 delete global_score_array[i];
50 global_score_array.clear();
53 void
54 add_score (Score * s)
56 global_score_array.push (s);
59 void
60 set_default_output (String s)
62 default_out_fn = s;