X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fgeneral-scheme.cc;h=95d4081f3938863d160fa5d07d61aca5d3488ee3;hb=730d4eb3e0328e8ba0b376f8191a5bb6ae7f904c;hp=a930d1b527ac21cbbeddb7d9d7ae30c0ae8a1884;hpb=08560a1b8076630c4fc6cb9b902614d8b74fd6fc;p=lilypond.git diff --git a/lily/general-scheme.cc b/lily/general-scheme.cc index a930d1b527..95d4081f39 100644 --- a/lily/general-scheme.cc +++ b/lily/general-scheme.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1998--2012 Jan Nieuwenhuizen + Copyright (C) 1998--2014 Jan Nieuwenhuizen Han-Wen Nienhuys 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", @@ -478,7 +471,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 ();