]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/general-scheme.cc
Merge remote branch 'origin/master' into release/unstable
[lilypond.git] / lily / general-scheme.cc
index e73ab0b9272d7bdf1d3f07d5d7e35d24367ba4e2..068fb27aad255427f4c6239bfa8c370242985a19 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1998--2011 Jan Nieuwenhuizen <janneke@gnu.org>
+  Copyright (C) 1998--2015 Jan Nieuwenhuizen <janneke@gnu.org>
   Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
@@ -114,18 +114,6 @@ LY_DEFINE (ly_dir_p, "ly:dir?",
   return SCM_BOOL_F;
 }
 
-LY_DEFINE (ly_vsize_p, "ly:vsize?",
-           1, 0, 0, (SCM s),
-           "Is @var{s} a vsize?")
-{
-  if (scm_is_integer (s))
-    {
-      int i = scm_to_int (s);
-      return i >= 0 ? SCM_BOOL_T : SCM_BOOL_F;
-    }
-  return SCM_BOOL_F;
-}
-
 LY_DEFINE (ly_assoc_get, "ly:assoc-get",
            2, 2, 0,
            (SCM key, SCM alist, SCM default_value, SCM strict_checking),
@@ -283,7 +271,12 @@ LY_DEFINE (ly_protects, "ly:protects",
            0, 0, 0, (),
            "Return hash of protected objects.")
 {
+  //scm_protects is available only in Guile versions before 2.1.
+#if SCM_MAJOR_VERSION < 2 || SCM_MAJOR_VERSION == 2 && SCM_MINOR_VERSION < 1
   return scm_protects;
+#else
+  return programming_error ("ly:protects is not supported in Guile 2.1");
+#endif
 }
 
 LY_DEFINE (ly_gettext, "ly:gettext",
@@ -309,6 +302,14 @@ LY_DEFINE (ly_output_formats, "ly:output-formats",
   return lst;
 }
 
+LY_DEFINE (ly_bigpdfs, "ly:bigpdfs",
+           0, 0, 0, (),
+           "Return true if the command line includes the @option{--bigpdf} parameter."
+)
+{
+  return bigpdfs ? SCM_BOOL_T : SCM_BOOL_F;
+}
+
 LY_DEFINE (ly_wide_char_2_utf_8, "ly:wide-char->utf-8",
            1, 0, 0, (SCM wc),
            "Encode the Unicode codepoint @var{wc}, an integer, as UTF-8.")
@@ -478,7 +479,7 @@ format_single_argument (SCM arg, int precision, bool escape = false)
 
       if (isnan (val) || isinf (val))
         {
-          warning (_ ("Found infinity or nan in output. Substituting 0.0"));
+          warning (_ ("Found infinity or nan in output.  Substituting 0.0"));
           return ("0.0");
           if (strict_infinity_checking)
             abort ();