+++ /dev/null
-/*
- lilypond-version.hh -- declare LilyPond_version
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1998--2006 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#ifndef LILYPOND_VERSION_HH
-#define LILYPOND_VERSION_HH
-
-#include "std-string.hh"
-
-struct Lilypond_version
-{
- Lilypond_version (int major, int minor, int patch);
- Lilypond_version (string str);
-
- string to_string () const;
- operator int () const;
-
- int major_;
- int minor_;
- int patch_;
- string extra_patch_string_;
-};
-
-extern Lilypond_version oldest_version;
-
-#endif // LILYPOND_VERSION_HH
--- /dev/null
+/*
+ lilypond-version.hh -- declare LilyPond_version
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1998--2006 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#ifndef LILYPOND_VERSION_HH
+#define LILYPOND_VERSION_HH
+
+#include "std-string.hh"
+
+struct Lilypond_version
+{
+ Lilypond_version (int major, int minor, int patch);
+ Lilypond_version (string str);
+
+ string to_string () const;
+ operator int () const;
+
+ int major_;
+ int minor_;
+ int patch_;
+ string extra_patch_string_;
+};
+
+extern Lilypond_version oldest_version;
+
+#endif // LILYPOND_VERSION_HH
#include "interval.hh"
#include "lily-guile.hh"
#include "lily-lexer.hh"
-#include "lilypond-input-version.hh"
+#include "lilypond-version.hh"
#include "main.hh"
#include "music.hh"
#include "music-function.hh"
{
Lilypond_version current ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL );
Lilypond_version ver (s);
- if (! ((ver >= oldest_version) && (ver <= current)))
+ if (int (ver) < oldest_version)
{
- non_fatal_error (_f ("Incorrect lilypond version: %s (%s, %s)", ver.to_string (), oldest_version.to_string (), current.to_string ()));
- non_fatal_error (_ ("Consider updating the input with the convert-ly script"));
+ non_fatal_error (_f ("file too old: %s (oldest supported: %s)", ver.to_string (), oldest_version.to_string ()));
+ non_fatal_error (_ ("consider updating the input with the convert-ly script"));
return false;
- }
+ }
+
+ if (ver > current)
+ {
+ non_fatal_error (_f ("program too old: %s (file requires: %s)", current.to_string (), ver.to_string ()));
+ return false;
+ }
return true;
}
#include <ctype.h>
-#include "lilypond-input-version.hh"
+#include "lilypond-version.hh"
#include "string-convert.hh"
#include "misc.hh"
#include "lily-guile.hh"
#include "lily-lexer.hh"
#include "lily-parser.hh"
-#include "lilypond-input-version.hh"
#include "main.hh"
#include "misc.hh"
#include "music.hh"