From: Han-Wen Nienhuys Date: Mon, 14 Jun 2004 19:54:23 +0000 (+0000) Subject: * lily/paper-book.cc (output): load framework module X-Git-Tag: release/2.2.3~1^2~38 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d9c925ac84c351461d698d337f025c2f4a3d445f;p=lilypond.git * lily/paper-book.cc (output): load framework module scm_c_resolve_module(). * python/lilylib.py (exit): exit with argument i. --- diff --git a/ChangeLog b/ChangeLog index 3f65b6dc6c..0134056269 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-06-14 Han-Wen Nienhuys + + * lily/paper-book.cc (output): load framework module + scm_c_resolve_module(). + + * python/lilylib.py (exit): exit with argument i. + 2004-06-14 Jan Nieuwenhuizen * scm/framework-gnome.scm (output-framework-gnome): Try loading @@ -38,6 +45,8 @@ 2004-06-13 Han-Wen Nienhuys + * VERSION: release 2.3.4 + * Documentation/user/invoking.itexi (Invoking the lilypond binary): document --safe. diff --git a/lily/beam.cc b/lily/beam.cc index 91574c3484..6cc0a3a717 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -339,7 +339,7 @@ Beam::print (SCM grob) else pos= ly_scm2realdrul (posns); - scale_drul ( &pos, Staff_symbol_referencer::staff_space (me)); + scale_drul (&pos, Staff_symbol_referencer::staff_space (me)); Real dy = pos[RIGHT] - pos[LEFT]; Real dydx = (dy && dx) ? dy/dx : 0; @@ -351,7 +351,7 @@ Beam::print (SCM grob) Real last_xposn = -1; Real last_stem_width = -1 ; - Real gap_length =robust_scm2double ( me->get_property ("gap"), 0.0); + Real gap_length = robust_scm2double (me->get_property ("gap"), 0.0); Stencil the_beam; Real lt = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness")); @@ -369,7 +369,7 @@ Beam::print (SCM grob) right from the left stem, and rfliebertjes pointing left from right stem. */ - SCM left = (i>0) ? ly_cdr (last_beaming) : SCM_EOL; + SCM left = (i > 0) ? ly_cdr (last_beaming) : SCM_EOL; SCM right = st ? ly_car (this_beaming) : SCM_EOL; Array full_beams; diff --git a/lily/ly-module.cc b/lily/ly-module.cc index 24ddaf8d7e..247a456dc3 100644 --- a/lily/ly-module.cc +++ b/lily/ly-module.cc @@ -70,6 +70,13 @@ ly_module_define (void *closure, SCM key, SCM val, SCM result) /* Ugh signature of scm_internal_hash_fold () is inaccurate. */ typedef SCM (*Hash_cl_func)(); +/* + Check me. This is NOT an actual import. It just copies the + definitions. + + If a variable in changed in SRC, we DEST doesn't see the + definitions. + */ LY_DEFINE (ly_import_module, "ly:import-module", 2, 0, 0, (SCM dest, SCM src), "Import all bindings from module SRC into DEST.") diff --git a/lily/paper-book.cc b/lily/paper-book.cc index a25c0dedab..fe7105d9ea 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -135,8 +135,12 @@ Paper_book::output (String outname) String func_nm = format; func_nm = "output-framework-" + func_nm; - - SCM func = ly_scheme_function (func_nm.to_str0 ()); + String mod_nm = "scm framework-" + format; + + SCM mod = scm_c_resolve_module (mod_nm.to_str0 ()); + SCM func = scm_c_module_lookup (mod, func_nm.to_str0 ()); + + func = scm_variable_ref (func); scm_apply_0 (func, scm_list_n (out->self_scm (), self_scm (), scopes, diff --git a/python/lilylib.py b/python/lilylib.py index 01b3e80540..da44570a57 100644 --- a/python/lilylib.py +++ b/python/lilylib.py @@ -129,7 +129,7 @@ def exit (i): if __main__.verbose_p: raise _ ('Exiting (%d)...') % i else: - sys.exit (1) + sys.exit (i) def getopt_args (opts): '''Construct arguments (LONG, SHORT) for getopt from list of options.''' diff --git a/scm/define-music-properties.scm b/scm/define-music-properties.scm index 031bef9a9d..6e1940b94a 100644 --- a/scm/define-music-properties.scm +++ b/scm/define-music-properties.scm @@ -15,8 +15,7 @@ )) (set-object-property! symbol 'music-type? type?) (set-object-property! symbol 'music-doc description) - symbol ) - + symbol) (define-public all-music-properties (map diff --git a/scm/lily.scm b/scm/lily.scm index 945f26fb41..69a6f686f3 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -373,15 +373,6 @@ L1 is copied, L2 not. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; output - -;; only load modules necessary. -(eval - (cons use-modules - (map (lambda (x) - (list 'scm (string->symbol (string-append "framework-" x)))) - (ly:output-formats))) - (current-module)) - (define output-tex-module (make-module 1021 (list (resolve-interface '(scm output-tex)))))