X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fmodule-scheme.cc;h=192fcf49664d0a08f2fdba8c09d1eead7db3d2c1;hb=a77737811657427f9037db99ebaf091ae66d6fc9;hp=ea50e4e7d1326034a992da4a98babff7e757030f;hpb=2c22efe5a46a37065b10c3f51c5d7db00d07d318;p=lilypond.git diff --git a/lily/module-scheme.cc b/lily/module-scheme.cc index ea50e4e7d1..192fcf4966 100644 --- a/lily/module-scheme.cc +++ b/lily/module-scheme.cc @@ -1,27 +1,40 @@ /* - lily/module-scheme.cc -- implement module bindings + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2005--2010 Han-Wen Nienhuys - (c) 2005 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ -#include "lily-guile.hh" +#include "ly-module.hh" + #include "warn.hh" #include "main.hh" -#include "string.hh" +#include "std-string.hh" -#include "ly-module.hh" /* - If a variable in changed in SRC, we DEST doesn't see the + If a variable is changed in SRC, then DEST doesn't see the definitions. */ static SCM -module_define_closure_func (void *closure, SCM key, SCM val, SCM result) +module_define_closure_func (void *closure, + SCM key, + SCM val, + SCM /* result */) { - (void) result; SCM module = (SCM) closure; if (scm_variable_bound_p (val) == SCM_BOOL_T) scm_module_define (module, key, scm_variable_ref (val)); @@ -30,7 +43,7 @@ module_define_closure_func (void *closure, SCM key, SCM val, SCM result) LY_DEFINE (ly_module_copy, "ly:module-copy", 2, 0, 0, (SCM dest, SCM src), - "Copy all bindings from module SRC into DEST.") + "Copy all bindings from module @var{src} into @var{dest}.") { #define FUNC_NAME __FUNCTION__ SCM_VALIDATE_MODULE (1, src); @@ -42,8 +55,8 @@ LY_DEFINE (ly_module_copy, "ly:module-copy", LY_DEFINE (ly_clear_anonymous_modules, "ly:clear-anonymous-modules", 0, 0, 0, (), - "Plug a GUILE 1.6 and 1.7 memory leak by breaking a weak reference " - "pointer cycle explicitly.") + "Plug a GUILE 1.6 and 1.7 memory leak by breaking a weak" + " reference pointer cycle explicitly.") { #ifdef MODULE_GC_KLUDGE clear_anonymous_modules (); @@ -68,9 +81,9 @@ ly_module_lookup (SCM module, SCM sym) LY_DEFINE (ly_modules_lookup, "ly:modules-lookup", 2, 1, 0, (SCM modules, SCM sym, SCM def), - "Lookup @var{sym} in the list @var{modules}, " - "returning the first occurence. " - "If not found, return @var{default}, or @code{#f}.") + "Look up @var{sym} in the list @var{modules}," + " returning the first occurence. If not found, return" + " @var{def} or @code{#f} if @var{def} isn't specified.") { for (SCM s = modules; scm_is_pair (s); s = scm_cdr (s)) {