From: Han-Wen Nienhuys Date: Fri, 12 Jan 2007 16:59:51 +0000 (+0100) Subject: coverage fixes. X-Git-Tag: release/2.11.12-1~35^2~12 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=aec3aaa108cd47f35bd74ca147cfbe095c130b0b;p=lilypond.git coverage fixes. --- diff --git a/input/regression/collision-manual.ly b/input/regression/collision-manual.ly new file mode 100644 index 0000000000..aaabb78a51 --- /dev/null +++ b/input/regression/collision-manual.ly @@ -0,0 +1,16 @@ +\header { + + texidoc = "Collision resolution may be forced manually with @code{force-hshift}. " +} + +\paper { + ragged-right = ##t +} + +\relative { + << { f + \override NoteColumn #'force-hshift = #0.1 + f } \\ + { e e } + >> +} diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index 8a0a54a46d..6eef555bf5 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -36,9 +36,6 @@ SCM ly_write2scm (SCM s); SCM ly_deep_copy (SCM); SCM ly_truncate_list (int k, SCM lst); -SCM ly_to_string (SCM scm); -SCM ly_to_symbol (SCM scm); - extern SCM global_lily_module; string gulp_file_to_string (string fn, bool must_exist, int size); @@ -82,7 +79,6 @@ SCM alist_to_hashq (SCM); SCM ly_alist_vals (SCM alist); SCM ly_hash2alist (SCM tab); SCM ly_hash_table_keys (SCM tab); -int procedure_arity (SCM); SCM ly_assoc_prepend_x (SCM alist, SCM key, SCM val); inline bool ly_is_list (SCM x) { return SCM_NFALSEP (scm_list_p (x)); } diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 7c61e123da..e7e286d5a6 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -34,19 +34,6 @@ using namespace std; /* symbols/strings. */ -SCM -ly_to_symbol (SCM scm) -{ - return scm_string_to_symbol (ly_to_string (scm)); -} - -SCM -ly_to_string (SCM scm) -{ - return scm_call_3 (ly_lily_module_constant ("format"), SCM_BOOL_F, - - scm_from_locale_string ("~S"), scm); -} SCM ly_write2scm (SCM s) @@ -624,16 +611,6 @@ ly_hash2alist (SCM tab) return scm_call_1 (func, tab); } -int -procedure_arity (SCM proc) -{ - assert (ly_is_procedure (proc)); - SCM arity = scm_procedure_property (proc, - ly_symbol2scm ("arity")); - - SCM fixed = scm_car (arity); - return scm_to_int (fixed); -} /* C++ interfacing. diff --git a/lily/melisma-translator.cc b/lily/melisma-translator.cc deleted file mode 100644 index 688216b8f0..0000000000 --- a/lily/melisma-translator.cc +++ /dev/null @@ -1,81 +0,0 @@ -/* - melisma-engraver.cc -- implement Melisma_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1999--2007 Han-Wen Nienhuys -*/ - -#include "engraver.hh" -#include "grob.hh" -#include "context.hh" -#include "music.hh" -#include "translator.icc" - -/* Remove this translator. */ - -/** - Signal existence of melismas. -*/ -class Melisma_translator : public Translator -{ -public: - TRANSLATOR_DECLARATIONS (Melisma_translator); -protected: - virtual bool try_music (Music *); - void process_music (); - void start_translation_timestep (); - Music *event_; -}; - -bool -Melisma_translator::try_music (Music *m) -{ - if (m->is_mus_type ("melisma-playing-event")) - return melisma_busy (context ()); - else if (m->is_mus_type ("melisma-span-event")) - { - event_ = m; - return true; - } - - return false; -} - -void -Melisma_translator::process_music () -{ - if (event_) - { - SCM sd = event_->get_property ("span-direction"); - Direction d = to_dir (sd); - if (d == START) - context ()->set_property ("melismaBusy", SCM_BOOL_T); - else - context ()->unset_property (ly_symbol2scm ("melismaBusy")); - } -} - -void -Melisma_translator::start_translation_timestep () -{ - event_ = 0; -} - -Melisma_translator::Melisma_translator () -{ - event_ = 0; -} - -ADD_TRANSLATOR (Melisma_translator, - /* doc */ "This translator collects melisma information about ties, beams, and user settings (@code{melismaBusy}, and signals it to the @code{\addlyrics} code. ", - /* create */ "", - /* read */ - "beamMelismaBusy " - "melismaBusy " - "melismaBusyProperties " - "slurMelismaBusy " - "tieMelismaBusy " - , - - /* write */ "");