summaryrefslogtreecommitdiff
path: root/lily/scores.cc
blob: 3cfc56969cb4ce3d91cca71a1a1a51a00ea9bf85 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
  scores.cc -- implement some globals

  source file of the GNU LilyPond music typesetter

  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/

#include "main.hh"
#include "score.hh"
#include "string.hh"
#include "paper-def.hh"
#include "debug.hh"

static Array<Score*> score_array_global;
String default_out_fn = "lelie";

void
do_scores()
{
    for (int i=0; i < score_array_global.size(); i++) {
	Score *&is_p = score_array_global[i];
	
	if (only_midi) {
	    delete is_p->paper_p_;
	    is_p->paper_p_ = 0;
	}
	
	if (is_p->errorlevel_i_) {
	    is_p->warning("Score contains errors. Will not process it. ");
	    exit_status_i_ |= 1;
	} else { 
	    is_p->print ();
	    is_p->process();
	}
	delete is_p;
	is_p =0;

    }
    score_array_global.clear();
}

void
add_score(Score * s)
{
    score_array_global.push(s);
}

void
set_default_output(String s)
{
    default_out_fn = s;
}