Restore MIDI output for DrumStaff.
[lilypond/mpolesky.git] / lily / guile-init.cc
blob6c2422e76b9cbc7bf61d5ed16d70f95a2eef3cb5
1 /*
2 guile-init.cc -- implement GUILE init routines.
4 source file of the GNU LilyPond music typesetter
6 (c) 2006--2009 Han-Wen Nienhuys <hanwen@lilypond.org>
8 */
10 #include "lily-guile.hh"
11 #include "main.hh"
12 #include "warn.hh"
15 INIT
19 typedef void (*Void_fptr) ();
20 vector<Void_fptr> *scm_init_funcs_;
22 void add_scm_init_func (void (*f) ())
24 if (!scm_init_funcs_)
25 scm_init_funcs_ = new vector<Void_fptr>;
27 scm_init_funcs_->push_back (f);
30 void
31 ly_init_ly_module (void *)
33 for (vsize i = scm_init_funcs_->size (); i--;)
34 (scm_init_funcs_->at (i)) ();
36 if (be_verbose_global)
38 progress_indication ("[");
39 scm_display (scm_c_eval_string ("(%search-load-path \"lily.scm\")"),
40 scm_current_error_port ());
41 progress_indication ("]\n");
44 scm_primitive_load_path (scm_from_locale_string ("lily.scm"));
47 SCM global_lily_module;
49 void
50 ly_c_init_guile ()
52 global_lily_module = scm_c_define_module ("lily", ly_init_ly_module, 0);
53 scm_c_use_module ("lily");