]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/scores.cc
partial: 0.1.61.jcn
[lilypond.git] / lily / scores.cc
index 3cfc56969cb4ce3d91cca71a1a1a51a00ea9bf85..5badc05fb00bb0f2e53c445c417aa8a17b361675 100644 (file)
 #include "score.hh"
 #include "string.hh"
 #include "paper-def.hh"
+#include "header.hh"
 #include "debug.hh"
+#include "parray.hh"
+
+static Link_array<Score> global_score_array;
+String default_outname_suffix_global = "";
+String default_outname_base_global =  "lelie";
+int default_count_global;
 
-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;
+  for (int i=0; i < global_score_array.size(); i++)
+    {
+//      Score *&is_p = global_score_array[i];
+      Score* is_p = global_score_array[i];
+      if (!is_p->header_p_)
+       is_p->header_p_ = new Header;
+      
+                
+      is_p->header_p_->lily_id_str_ = "Lily was here, " +
+       get_version_number_str();
+      if (is_p->errorlevel_i_)
+       {
+         is_p->warning (_("Score contains errors. Will not process it. "));
+         exit_status_i_ |= 1;
        }
-       
-       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();
+      else
+       {
+         is_p->process();
        }
-       delete is_p;
-       is_p =0;
-
     }
-    score_array_global.clear();
 }
 
 void
-add_score(Score * s)
+clear_scores ()
 {
-    score_array_global.push(s);
+  for (int i=0; i < global_score_array.size(); i++)
+    {
+      delete global_score_array[i];
+    }
+  global_score_array.clear();
 }
 
 void
-set_default_output(String s)
+add_score (Score * s)
 {
-    default_out_fn = s;
+  global_score_array.push (s);
 }