]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-version.cc
Run `make grand-replace'.
[lilypond.git] / lily / lily-version.cc
index df773fa7ccdb93c51859c6523348dc4023c84112..598943c2b3c22c2bcc3bc09d730caaf4211070f3 100644 (file)
@@ -1,24 +1,37 @@
-#include "version.hh"
-#include <stdio.h>
+/*
+  lily-version.cc -- implement version strings
+
+  source file of the GNU LilyPond music typesetter
 
+  (c) 1999--2008 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
 
-#define VERSION_SZ  MAJOR_VERSION "." MINOR_VERSION "."  PATCH_LEVEL MY_PATCH_LEVEL
-static char *s = "GNU LilyPond " VERSION_SZ " #%d";
+#include "lily-version.hh"
 
-static const int build=
-#include ".build"
-;
+#include "config.hh"
+#include "version.hh"
 
-char const *
-lily_version_number_sz()
+string
+version_string ()
 {
-  return VERSION_SZ;
+  string str = MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL;
+  string mpl ("." MY_PATCH_LEVEL);
+  if (mpl != ".")
+    str += mpl;
+  return str;
 }
 
-char const * 
-lily_version_sz()
+string
+gnu_lilypond_string ()
 {
-  static char v[1024]; // ugh
-  sprintf (v, s, build);
-  return v;
+  string str = "GNU LilyPond";
+  return str;
 }
+
+string
+gnu_lilypond_version_string ()
+{
+  string str = gnu_lilypond_string () + " " + version_string ();
+  return str;
+}
+