]> git.donarmstrong.com Git - lilypond.git/blob - lily/scores.cc
release: 0.1.12
[lilypond.git] / lily / scores.cc
1 /*
2   scores.cc -- implement some globals
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
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"
16
17 static Link_array<Score> global_score_array;
18 String default_out_fn = "lelie";
19
20 void
21 do_scores()
22 {
23   for (int i=0; i < global_score_array.size(); i++) 
24     {
25         Score *&is_p = global_score_array[i];
26         if (is_p->header_p_)
27           is_p->header_p_->lily_id_str_ = "Lily was here, " + 
28             get_version_number_str();
29         if (is_p->errorlevel_i_) 
30           {
31             is_p->warning ("Score contains errors. Will not process it. ");
32             exit_status_i_ |= 1;
33           }
34         else 
35           {
36             is_p->print();
37             is_p->process();
38           }
39         delete is_p;
40         is_p =0;
41
42     }
43   global_score_array.clear();
44 }
45
46 void
47 add_score (Score * s)
48 {
49   global_score_array.push (s);
50 }
51
52 void
53 set_default_output (String s)
54 {
55   default_out_fn = s;
56 }
57