]> git.donarmstrong.com Git - lilypond.git/blob - lily/scores.cc
release: 0.1.41
[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_outname_suffix_global = "";
19 String default_outname_base_global =  "lelie";
20 int default_count_global;
21
22
23 void
24 do_scores()
25 {
26   for (int i=0; i < global_score_array.size(); i++)
27     {
28 //      Score *&is_p = global_score_array[i];
29       Score* is_p = global_score_array[i];
30       if (!is_p->header_p_)
31         is_p->header_p_ = new Header;
32       
33                 
34       is_p->header_p_->lily_id_str_ = "Lily was here, " +
35         get_version_number_str();
36       if (is_p->errorlevel_i_)
37         {
38           is_p->warning (_("Score contains errors. Will not process it. "));
39           exit_status_i_ |= 1;
40         }
41       else
42         {
43           is_p->process();
44         }
45     }
46 }
47
48 void
49 clear_scores ()
50 {
51   for (int i=0; i < global_score_array.size(); i++)
52     {
53       delete global_score_array[i];
54     }
55   global_score_array.clear();
56 }
57
58 void
59 add_score (Score * s)
60 {
61   global_score_array.push (s);
62 }
63