source file of the GNU LilyPond music typesetter
- (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ (c) 2004--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include "music-sequence.hh"
#include "lily-guile.hh"
#include "music-wrapper-iterator.hh"
-#include "music.hh"
-#include "input.hh"
#include "warn.hh"
-#include "interpretation-context-handle.hh"
class Quote_iterator : public Music_wrapper_iterator
{
int
-binsearch_scm_vector (SCM vec, SCM key, bool (*is_less)(SCM a,SCM b))
+binsearch_scm_vector (SCM vec, SCM key, bool (*is_less)(SCM a, SCM b))
{
int lo = 0;
- int hi = SCM_VECTOR_LENGTH (vec);
+ int hi = scm_c_vector_length (vec);
/* binary search */
do
{
int cmp = (lo + hi) / 2;
- SCM when = scm_caar (SCM_VECTOR_REF (vec, cmp));
+ SCM when = scm_caar (scm_c_vector_ref (vec, cmp));
bool result = (*is_less) (key, when);
if (result)
hi = cmp;
Quote_iterator::quote_ok () const
{
return (event_idx_ >= 0
- && ly_c_vector_p (event_vector_)
+ && scm_is_vector (event_vector_)
&& event_idx_ <= end_idx_
/*
Moment
Quote_iterator::vector_moment (int idx) const
{
- SCM entry = SCM_VECTOR_REF (event_vector_, idx);
+ SCM entry = scm_c_vector_ref (event_vector_, idx);
return *unsmob_moment (scm_caar (entry));
}
if (Music_wrapper_iterator::ok())
Music_wrapper_iterator::process (m);
- if (!ly_c_vector_p (event_vector_))
+ if (!scm_is_vector (event_vector_))
return ;
if (event_idx_ < 0)
if (quote_ok ())
{
- SCM entry = SCM_VECTOR_REF (event_vector_, event_idx_);
+ SCM entry = scm_c_vector_ref (event_vector_, event_idx_);
Pitch * quote_pitch = unsmob_pitch (scm_cdar (entry));
/*
Pitch diff = pitch_interval (qp, mp);
- SCM copy = ly_deep_mus_copy (mus->self_scm ());
+ SCM copy = ly_music_deep_copy (mus->self_scm ());
mus = unsmob_music (copy);
transposed_musics_ = scm_cons (copy, transposed_musics_);