]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-version.cc
patch::: 1.5.22.jcn4
[lilypond.git] / lily / lily-version.cc
index 18696cbd3161d8dce5cdeb6c89a438826e6d56f7..40220a5532f2f8b42498d1575a7a277e785d0067 100644 (file)
@@ -1,21 +1,36 @@
-#include <stdio.h>
+/*
+  lily-version.cc -- implement version strings
 
-#include "config.hh"
-#include "version.hh"
+  source file of the GNU LilyPond music typesetter
 
-#define VERSION_SZ  MAJOR_VERSION "." MINOR_VERSION "."  PATCH_LEVEL "." MY_PATCH_LEVEL
+  (c)  1999--2001 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
 
-static char *s = "GNU LilyPond " VERSION_SZ ;
+#include "config.h"
+#include "version.hh"
+#include "lily-version.hh"
 
+String
+version_str ()
+{
+  String str (MAJOR_VERSION "." MINOR_VERSION "."  PATCH_LEVEL);
+  String mpl ("." MY_PATCH_LEVEL);
+  if (mpl != ".")
+    str += mpl;
+  return str;
+}
 
-char const *
-lily_version_number_sz()
+String 
+gnu_lilypond_str ()
 {
-  return VERSION_SZ;
+  String str = "GNU LilyPond";
+  return str;
 }
 
-char const * 
-lily_version_sz()
+String 
+gnu_lilypond_version_str ()
 {
-  return s;
+  String str = gnu_lilypond_str () + " " + version_str ();
+  return str;
 }
+