/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2006--2012 Joe Neeman <joeneeman@gmail.com>
+ Copyright (C) 2006--2015 Joe Neeman <joeneeman@gmail.com>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
if (duration_[LEFT] < penalty.duration_[LEFT])
ret.push_back (Page_turn_event (duration_[LEFT], penalty.duration_[LEFT], permission_, penalty_));
- if (penalty.permission_ != SCM_EOL)
+ if (!scm_is_null (penalty.permission_))
ret.push_back (Page_turn_event (intersect[LEFT], intersect[RIGHT], permission_, new_pen));
if (penalty.duration_[RIGHT] < duration_[RIGHT])
Stream_event *cause = gi.event_cause ();
Duration *dur_ptr = cause
- ? unsmob_duration (cause->get_property ("duration"))
+ ? unsmob<Duration> (cause->get_property ("duration"))
: 0;
if (!dur_ptr)
void
Page_turn_engraver::stop_translation_timestep ()
{
- Grob *pc = unsmob_grob (get_property ("currentCommandColumn"));
+ Grob *pc = unsmob<Grob> (get_property ("currentCommandColumn"));
if (pc)
{
for (; scm_is_pair (cs); cs = scm_cdr (cs))
{
SCM command = scm_car (cs);
- if (command == ly_symbol2scm ("start-repeat"))
+ if (scm_is_eq (command, ly_symbol2scm ("start-repeat")))
start = true;
- else if (command == ly_symbol2scm ("end-repeat"))
+ else if (scm_is_eq (command, ly_symbol2scm ("end-repeat")))
end = true;
}
{
Rational now = now_mom ().main_part_;
Real pen = penalty ((now_mom () - rest_begin_).main_part_ + repeat_begin_rest_length_);
- Moment *m = unsmob_moment (get_property ("minimumRepeatLengthForPageTurn"));
+ Moment *m = unsmob<Moment> (get_property ("minimumRepeatLengthForPageTurn"));
if (m && *m > (now_mom () - repeat_begin_))
pen = infinity_f;
SCM
Page_turn_engraver::max_permission (SCM perm1, SCM perm2)
{
- if (perm1 == SCM_EOL)
+ if (scm_is_null (perm1))
return perm2;
- if (perm1 == ly_symbol2scm ("allow") && perm2 == ly_symbol2scm ("force"))
+ if (scm_is_eq (perm1, ly_symbol2scm ("allow"))
+ && scm_is_eq (perm2, ly_symbol2scm ("force")))
return perm2;
return perm1;
}