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