]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-version.cc
* Documentation/user/refman.itely: Compile fix for \mark #'(music ...).
[lilypond.git] / lily / lily-version.cc
index 2890cd3e8aaebb2443aa3f99bd5a6267b2dab69f..bc9c2bd876073e4b7734af036c55b277ed26c254 100644 (file)
@@ -1,16 +1,36 @@
+/*
+  lily-version.cc -- implement version strings
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1999--2002 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#include "config.h"
 #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_str ()
+{
+  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_str ()
+{
+  String str = "GNU LilyPond";
+  return str;
+}
 
-char const * 
-lily_version_sz()
+String 
+gnu_lilypond_version_str ()
 {
-    static char v[1024];       // ugh
-    sprintf(v, s, build);
-    return v;
+  String str = gnu_lilypond_str () + " " + version_str ();
+  return str;
 }
+