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