]> git.donarmstrong.com Git - lilypond.git/blob - lily/scores.cc
release: 0.0.68pre
[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 "debug.hh"
14
15 static Array<Score*> score_array_global;
16 String default_out_fn = "lelie";
17
18 void
19 do_scores()
20 {
21     for (int i=0; i < score_array_global.size(); i++) {
22         Score *&is_p = score_array_global[i];
23         
24         if (only_midi) {
25             delete is_p->paper_p_;
26             is_p->paper_p_ = 0;
27         }
28         
29         if (is_p->errorlevel_i_) {
30             is_p->warning("Score contains errors. Will not process it. ");
31           
32         } else { 
33         
34             is_p->print ();
35             is_p->process();
36         }
37         delete is_p;
38         is_p =0;
39
40     }
41     score_array_global.set_size(0);
42 }
43
44 void
45 add_score(Score * s)
46 {
47     score_array_global.push(s);
48 }
49
50 void
51 set_default_output(String s)
52 {
53     default_out_fn = s;
54 }
55