]> git.donarmstrong.com Git - lilypond.git/blob - lily/scores.cc
release: 0.1.9
[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     {
23         Score *&is_p = score_array_global[i];
24         
25         if (only_midi) 
26           {
27             delete is_p->paper_p_;
28             is_p->paper_p_ = 0;
29           }
30         
31         if (is_p->errorlevel_i_) 
32           {
33             is_p->warning ("Score contains errors. Will not process it. ");
34             exit_status_i_ |= 1;
35           }
36         else 
37           {
38             is_p->print();
39             is_p->process();
40           }
41         delete is_p;
42         is_p =0;
43
44     }
45   score_array_global.clear();
46 }
47
48 void
49 add_score (Score * s)
50 {
51   score_array_global.push (s);
52 }
53
54 void
55 set_default_output (String s)
56 {
57   default_out_fn = s;
58 }
59