From 010ef9694d9a90843f316910cd8f848f935ce0cc Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:56:14 +0000 Subject: [PATCH] lilypond-0.1.12 --- VERSION | 2 +- lily/VERSION | 2 +- lily/header.cc | 3 +++ lily/include/header.hh | 1 + lily/include/main.hh | 8 ++++++++ lily/lily-version.cc | 10 +++++++++- lily/score.cc | 1 - lily/scores.cc | 17 ++++++++++------- lily/version.cc | 9 ++++++++- 9 files changed, 41 insertions(+), 12 deletions(-) diff --git a/VERSION b/VERSION index 3747f21228..1ae5036c7d 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 1 -TOPLEVEL_PATCH_LEVEL = 11 +TOPLEVEL_PATCH_LEVEL = 12 # use to send patches, always empty for released version: TOPLEVEL_MY_PATCH_LEVEL = diff --git a/lily/VERSION b/lily/VERSION index 7ce3b25fba..4d5a2603a5 100644 --- a/lily/VERSION +++ b/lily/VERSION @@ -1,6 +1,6 @@ MAJOR_VERSION = 0 MINOR_VERSION = 1 -PATCH_LEVEL = 11 +PATCH_LEVEL = 12 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf diff --git a/lily/header.cc b/lily/header.cc index f2a54aab2d..b64be42fee 100644 --- a/lily/header.cc +++ b/lily/header.cc @@ -14,6 +14,9 @@ String Header::TeX_string() const { String s; + + s+= "\\def\\LilyIdString{" + lily_id_str_ + "}"; + for (Assoc_iter i(*this); i.ok(); i++) { s += "\\def\\mudela" + i.key() + "{" + i.val() + "}"; diff --git a/lily/include/header.hh b/lily/include/header.hh index d5919b0de5..62ee98ddf4 100644 --- a/lily/include/header.hh +++ b/lily/include/header.hh @@ -16,6 +16,7 @@ struct Header : Assoc { + String lily_id_str_; String TeX_string() const; }; diff --git a/lily/include/main.hh b/lily/include/main.hh index 79ac1e878e..75fc6a1e54 100644 --- a/lily/include/main.hh +++ b/lily/include/main.hh @@ -1,3 +1,10 @@ +/* + main.hh -- declare global entry points + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ #ifndef MAIN_HH #define MAIN_HH #include "lily-proto.hh" @@ -10,6 +17,7 @@ void set_default_output (String s); Input_score* current_iscore_l(); String find_file (String); String get_version_str(); +String get_version_number_str(); extern Sources* source_l_g; extern bool only_midi; extern int exit_status_i_; diff --git a/lily/lily-version.cc b/lily/lily-version.cc index 68a6b49037..df773fa7cc 100644 --- a/lily/lily-version.cc +++ b/lily/lily-version.cc @@ -1,12 +1,20 @@ #include "version.hh" #include -static char *s = "GNU LilyPond " MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL MY_PATCH_LEVEL " #%d"; + +#define VERSION_SZ MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL MY_PATCH_LEVEL +static char *s = "GNU LilyPond " VERSION_SZ " #%d"; static const int build= #include ".build" ; +char const * +lily_version_number_sz() +{ + return VERSION_SZ; +} + char const * lily_version_sz() { diff --git a/lily/score.cc b/lily/score.cc index 04ed825768..3da46e2c23 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -10,7 +10,6 @@ #include "debug.hh" #include "music-output-def.hh" #include "music-output.hh" -#include "main.hh" #include "source.hh" #include "source-file.hh" #include "music-iterator.hh" diff --git a/lily/scores.cc b/lily/scores.cc index a1cb0830a1..3886a7715d 100644 --- a/lily/scores.cc +++ b/lily/scores.cc @@ -10,19 +10,22 @@ #include "score.hh" #include "string.hh" #include "paper-def.hh" +#include "header.hh" #include "debug.hh" +#include "parray.hh" -static Array score_array_global; +static Link_array global_score_array; String default_out_fn = "lelie"; void do_scores() { - for (int i=0; i < score_array_global.size(); i++) + for (int i=0; i < global_score_array.size(); i++) { - Score *&is_p = score_array_global[i]; - - + Score *&is_p = global_score_array[i]; + if (is_p->header_p_) + 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. "); @@ -37,13 +40,13 @@ do_scores() is_p =0; } - score_array_global.clear(); + global_score_array.clear(); } void add_score (Score * s) { - score_array_global.push (s); + global_score_array.push (s); } void diff --git a/lily/version.cc b/lily/version.cc index c219dfcd61..205e259b25 100644 --- a/lily/version.cc +++ b/lily/version.cc @@ -2,7 +2,8 @@ #include "string.hh" -extern char const * lily_version_sz(); +char const * lily_version_sz(); +char const * lily_version_number_sz(); String get_version_str() @@ -12,3 +13,9 @@ get_version_str() s+=flower_version_sz(); return s; } + +String +get_version_number_str() +{ + return lily_version_number_sz(); +} -- 2.39.5