]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-version.cc
* SConstruct: Further development.
[lilypond.git] / lily / lily-version.cc
index 03f605394de9ca9937a71fc6b168b2e350c8dec8..6bee35d852cd0baa8c97d71f6c37b7f6285bde2a 100644 (file)
@@ -1,16 +1,36 @@
+/*
+  lily-version.cc -- implement version strings
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1999--2004 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#include "config.hh"
 #include "version.hh"
-#include <stdio.h>
+#include "lily-version.hh"
 
-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];
-    sprintf(v, s, build);
-    return v;
+  String str = gnu_lilypond_string () + " " + version_string ();
+  return str;
 }
+