+2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * input/regression/accidental-tie.ly (mus): new file
+
+ * input/regression/tie-accidental, tie-break-accidental.ly: remove
+ these longish tests.
+
2004-02-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
* lily/include/*.hh (class Item): rename XXX_b () to is_XXX ().
TODO: strip hungarian suffix.
*/
bool is_empty () const { return elem (LEFT) > elem (RIGHT); }
- bool contains_b (Interval_t<T> const&) const;
+ bool superset (Interval_t<T> const&) const;
Interval_t () {
set_empty ();
}
template<class T>
bool
-Interval_t<T>::contains_b (Interval_t<T> const& a) const
+Interval_t<T>::superset (Interval_t<T> const& a) const
{
int c_i= _Interval__compare (*this, a);
if (c_i == -2)
--- /dev/null
+\version "2.1.25"
+
+\header {
+
+ texidoc = "The second and third notes should not get accidentals,
+ because they are tied to a note. However, an accidental is
+ present if the line is broken at the tie, which happens for the G
+ sharp."
+
+}
+
+mus = \notes \relative c' {
+ f1~
+ f2~f4 % ~ f8
+ fis8 gis8 ~
+ \break
+ gis1
+}
+
+\score {
+ \notes <<
+ \new NoteNames \mus
+ \new Voice { \key g \major \mus }
+ >>
+ \paper {
+ raggedright = ##t
+ }
+}
+++ /dev/null
-
-\version "2.1.22"
-
-\header{
-texidoc="
-When tying notes with accidentals across a bar boundary, the
-accidental must not be drawn on the note in the next bar. Unless the
-tie crosses a line break, in which case the accidental is repeated if
-it would be different from an untied note. The next note of the same
-pitch in this next bar should always show the accidental (even if it is
-natural). Slurring a accidentaled note to a natural one across bar
-boundaries should be explicit.
-
-Pitches can be verified by printing them with the @code{NoteNames} context.
-"
-}
-
-thenotes = \notes \relative cis' {
- \time 4/4
- g'2 g ~ |
- g g4 gis |
- gis2 gis ~ |
- gis4 gis8 ~ gis g4 gis |
- g2 gis ~ |
- gis g4 gis |
- g2 gis( |
- g!) gis4 gis |
- \break
- \key a \major
- gis2 gis ~ |
- gis4 gis8 ~ gis g4 gis |
- gis2 g ~ |
- g4 gis8 ~ gis g4 gis |
- g2 gis ~ |
- gis g4 gis |
- g2 gis( |
-
- % FIXME: check for accidentals at line break could look more cute
- % maybe move to tie-break-accidental?
-
- % Btw: I don't even know what the rule is for the second note in the
- % next bar, if a reminder accidental was printed. These are really
- % not very common cases. Technically, if it is not tied, it
- % should get an accidental but it looks a bit silly and redundant.
- % See last g.
-
- g!) gis4 gis ~ | \break
- gis2 gis ~ | gis g ~\break
- g2 g
-}
-
-\score {
- <<
- \context Staff \thenotes
- \context NoteNames \thenotes
- >>
-}
-
+++ /dev/null
-\version "2.1.22"
-
-\header {
-texidoc = "First and second bes (tied across line break)
-should get an accidental, but others should not.
-Only first b should get natural sign."
-}
-
-\score {
- \notes {
- bes1 ~ | \break
- bes2 ~ bes4 ~ bes4 ~ | bes1
- \key f\major
- bes1 ~|bes2 b ~|b ~ b ~|b1
- }
- \paper {
- linewidth = 40*\staffspace
- }
-}
-
*/
#include "event.hh"
-
-
+#include "spanner.hh"
#include "item.hh"
#include "tie.hh"
#include "rhythmic-head.hh"
Grob * accidental_;
Context *origin_;
Grob* head_;
+ bool tied_;
Accidental_entry();
};
Accidental_entry::Accidental_entry()
{
+ tied_ = false;
done_ = false;
melodic_ =0;
accidental_ = 0;
The next
*/
Array<Accidental_entry> accidentals_;
- Link_array<Grob> ties_;
+ Link_array<Spanner> ties_;
+
+ SCM get_bar_num ();
};
/*
-calculates the number of accidentals on basis of the current local key sig
- (passed as argument)
+ calculates the number of accidentals on basis of the current local key
+ sig (passed as argument)
+
Returns number of accidentals (0, 1 or 2).
- Negative (-1 or -2) if accidental has changed.
+ Negative (-1 or -2) if accidental has changed.
*/
static int
-number_accidentals_from_sig (SCM sig, Music *, Pitch *pitch, SCM curbarnum, SCM lazyness,
- bool ignore_octave_b)
+number_accidentals_from_sig (bool *different,
+ SCM sig, Pitch *pitch, SCM curbarnum, SCM lazyness,
+ bool ignore_octave)
{
int n = pitch->get_notename ();
int o = pitch->get_octave();
int accbarnum_i = 0;
SCM prev;
- if (ignore_octave_b)
+ if (ignore_octave)
prev = ly_assoc_cdr (scm_int2num (n), sig);
else
prev = scm_assoc (gh_cons (scm_int2num (o), scm_int2num (n)), sig);
num = 2;
else
num = 1;
-
- return a == p ? num : -num;
+
+ *different = (a != p);
+ return num;
}
static int
-number_accidentals (Music * note, Pitch *pitch, Context * origin,
+number_accidentals (bool *different,
+ Pitch *pitch, Context * origin,
SCM accidentals, SCM curbarnum)
{
int number = 0;
- bool diff = false;
+ *different = false;
if (gh_pair_p (accidentals) && !gh_symbol_p (ly_car (accidentals)))
warning (_f ("Accidental typesetting list must begin with context-name: %s",
ly_scm2string (ly_car (accidentals)).to_str0 ()));
if (same_octave_b || any_octave_b)
{
+ bool d = false;
int n = number_accidentals_from_sig
- (localsig, note, pitch, curbarnum, lazyness, any_octave_b);
- diff = diff || (n < 0);
- number = max (number, abs (n));
+ (&d, localsig, pitch, curbarnum, lazyness, any_octave_b);
+ *different = *different || d;
+ number = max (number, n);
}
else
warning (_f ("unknown accidental typesetting: %s. Ignored",
ly_scm2string (rule).to_str0 ()));
}
- return diff ? -number : number;
+ return number;
+}
+
+SCM
+Accidental_engraver::get_bar_num ()
+{
+ SCM barnum = get_property ("currentBarNumber");
+ SCM smp = get_property("measurePosition");
+
+ Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+ if (mp.main_part_ < Rational (0)
+ && gh_number_p (barnum))
+ barnum = scm_int2num (gh_scm2int (barnum) - 1);
+
+
+ return barnum ;
+
}
void
//SCM localsig = get_property ("localKeySignature");
SCM accidentals = get_property ("autoAccidentals");
SCM cautionaries = get_property ("autoCautionaries");
- SCM barnum = get_property ("currentBarNumber");
- SCM smp = get_property("measurePosition");
- Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
- if(mp.main_part_<Rational(0) && gh_number_p(barnum)) barnum = scm_int2num(gh_scm2int(barnum)-1);
+ SCM barnum = get_bar_num ();
+
bool extra_natural_b = get_property ("extraNatural") == SCM_BOOL_T;
for (int i = 0; i < accidentals_.size (); i++)
{
Pitch * pitch = unsmob_pitch (note->get_mus_property ("pitch"));
if (!pitch)
continue;
+
+ bool different = false;
+ bool different_caut = false;
- int num = number_accidentals (note, pitch, origin, accidentals, barnum);
- int num_caut = number_accidentals (note, pitch, origin, cautionaries, barnum);
+ int num = number_accidentals (&different,
+ pitch, origin,
+ accidentals, barnum);
+ int num_caut = number_accidentals (&different_caut,
+ pitch, origin,
+ cautionaries, barnum);
+
bool cautionary = to_boolean (note->get_mus_property ("cautionary"));
- if (abs (num_caut) > abs (num))
+ if (num_caut > num)
{
num = num_caut;
+ different = different_caut;
cautionary = true;
}
- if(num==0 && to_boolean (note->get_mus_property ("force-accidental")))
- num=1;
+ if (num == 0 && to_boolean (note->get_mus_property ("force-accidental")))
+ num = 1;
- bool different = num < 0;
- num = abs (num);
+ /*
+ Can not look for ties: it's not guaranteed that they reach
+ us before the notes
+ */
/* See if there's a tie that makes the accidental disappear */
Grob *tie_break_reminder = 0;
bool tie_changes = false;
for (int i = 0; i < right_objects_.size (); i++)
Side_position_interface::add_support (a, right_objects_[i]);
}
-
-
- /*
- We should not record the accidental if it is the first
- note and it is tied from the previous measure.
-
- Checking whether it is tied also works mostly, but will it
- always do the correct thing?
- */
-
-
- int n = pitch->get_notename ();
- int o = pitch->get_octave ();
- int a = pitch->get_alteration ();
- SCM on_s = gh_cons (scm_int2num (o), scm_int2num (n));
-
- while (origin)
- {
- /*
- huh? we set props all the way to the top?
- */
- SCM localsig = origin->get_property ("localKeySignature");
- bool change = false;
- if (tie_changes)
- {
- /*
- Remember an alteration that is different both from
- that of the tied note and of the key signature.
- */
- localsig = ly_assoc_front_x
- (localsig, on_s, gh_cons (SCM_BOOL_T, barnum));
-
- change = true;
- }
- else
- {
- /*
- not really really correct if there are more than one
- noteheads with the same notename.
- */
- localsig = ly_assoc_front_x
- (localsig, on_s, gh_cons (scm_int2num (a), barnum));
-
- change = true;
- }
-
- if (change)
- origin->set_property ("localKeySignature", localsig);
- origin = origin->daddy_context_;
- }
}
}
}
+
+
+
void
Accidental_engraver::finalize ()
{
- /*
- Must reset, since Accidental_engraver is GCd.
- */
last_keysig_ = SCM_EOL;
}
void
Accidental_engraver::stop_translation_timestep ()
{
- for (int i = 0; i < accidentals_.size(); i++)
+ for (int j = ties_.size (); j --; )
+ {
+ Grob * r = Tie::head (ties_[j], RIGHT);
+ for (int i = accidentals_.size (); i--;)
+ if (accidentals_[i].head_ == r)
+ {
+ if (Grob * g = accidentals_[i].accidental_)
+ {
+ g->set_grob_property ("tie", ties_[j]->self_scm ());
+ accidentals_[i].tied_ = true;
+ }
+
+ ties_.del (j);
+ break;
+ }
+ }
+
+ for (int i = accidentals_.size (); i--;)
{
- Grob *a = accidentals_[i].accidental_;
- if (a)
+ SCM barnum = get_bar_num ();
+
+ Music * note = accidentals_[i].melodic_;
+ Context * origin = accidentals_[i].origin_;
+
+ Pitch * pitch = unsmob_pitch (note->get_mus_property ("pitch"));
+ if (!pitch)
+ continue;
+
+ int n = pitch->get_notename ();
+ int o = pitch->get_octave ();
+ int a = pitch->get_alteration ();
+ SCM on_s = gh_cons (scm_int2num (o), scm_int2num (n));
+
+ while (origin)
{
- typeset_grob (a);
+ /*
+ huh? we set props all the way to the top?
+ */
+ SCM localsig = origin->get_property ("localKeySignature");
+ bool change = false;
+ if (accidentals_[i].tied_)
+ {
+ /*
+ Remember an alteration that is different both from
+ that of the tied note and of the key signature.
+ */
+ localsig = ly_assoc_front_x
+ (localsig, on_s, gh_cons (SCM_BOOL_T, barnum));
+
+ change = true;
+ }
+ else
+ {
+ /*
+ not really really correct if there are more than one
+ noteheads with the same notename.
+ */
+ localsig = ly_assoc_front_x
+ (localsig, on_s, gh_cons (scm_int2num (a), barnum));
+
+ change = true;
+ }
+
+ if (change)
+ origin->set_property ("localKeySignature", localsig);
+ origin = origin->daddy_context_;
}
}
+
+ for (int i = 0; i < accidentals_.size(); i++)
+ {
+ if (Grob *a = accidentals_[i].accidental_)
+ typeset_grob (a);
+ }
if (accidental_placement_)
typeset_grob(accidental_placement_);
accidentals_.clear();
left_objects_.clear ();
right_objects_.clear ();
- ties_.clear ();
}
void
}
else if (Tie::has_interface (info.grob_))
{
- ties_.push (info.grob_);
+ ties_.push (dynamic_cast<Spanner*> (info.grob_));
}
else if (Arpeggio::has_interface (info.grob_))
{
void begin_beam ();
void end_beam ();
void junk_beam ();
- bool same_grace_state_b (Grob* e);
+ bool is_same_grace_state (Grob* e);
void typeset_beam ();
/*
}
bool
-Axis_group_interface::axis_b (Grob*me,Axis a)
+Axis_group_interface::has_axis (Grob*me,Axis a)
{
/*
urg. FIXME, check for Hara_kiri_group_spanner shouldn't be necessary?
Binary_source_file::error_string (char const* pos_str0) const
{
assert (this);
- if (!in_b (pos_str0))
+ if (!contains (pos_str0))
return "";
char const* begin_str0 = pos_str0 - 8 >? to_str0 ();
int
Binary_source_file::get_line (char const* pos_str0) const
{
- if (!in_b (pos_str0))
+ if (!contains (pos_str0))
return 0;
return pos_str0 - to_str0 ();
static void add_element (Grob* me, Grob*);
static void set_axes (Grob*,Axis,Axis);
- static bool axis_b (Grob*,Axis);
+ static bool has_axis (Grob*,Axis);
static Link_array<Grob> get_children (Grob*);
static bool has_interface (Grob*);
*/
void add_dependency (Grob*);
virtual System * get_system () const;
- bool linked_b () const;
-
VIRTUAL_COPY_CONS (Grob);
void pop_state ();
void LexerError (char const *);
void set_identifier (SCM name_string, SCM);
- bool note_state_b () const;
- bool chord_state_b () const;
- bool lyric_state_b () const;
- bool figure_state_b () const;
+ bool is_note_state () const;
+ bool is_chord_state () const;
+ bool is_lyric_state () const;
+ bool is_figure_state () const;
private:
int lookup_keyword (String);
int scan_bare_word (String);
Real length (Real force) const;
Spring_description ();
- bool sane_b () const;
+ bool is_sane () const;
};
struct Simple_spacer
char const* to_str0 () const;
virtual String error_string (char const* pos_str0 ) const;
std::istream * get_istream ();
- bool in_b (char const* pos_str0 ) const;
+ bool contains (char const* pos_str0 ) const;
int length () const;
virtual int get_line (char const* pos_str0 ) const;
String name_string () const;
void post_processing (bool);
System (SCM);
- /// is #c# contained in #*this#?
- bool contains_b (Paper_column const *c) const;
int element_count () const;
int spanner_count () const;
*/
if (dynamic_cast<Spanner*> (i.grob_)
&& ((Axis_group_interface::has_interface (i.grob_)
- && Axis_group_interface::axis_b (i.grob_, Y_AXIS)))
+ && Axis_group_interface::has_axis (i.grob_, Y_AXIS)))
&& !Align_interface::has_interface (i.grob_))
{
SCM nl = gh_cons (i.grob_->self_scm (),
lookup_markup_command (String s);
bool
-valid_version_b (String s);
+is_valid_version (String s);
s = s.left_string (s.index_last ('\"'));
yy_pop_state();
- if (!valid_version_b (s))
+ if (!is_valid_version (s))
return INVALID;
}
<renameinput>\"[^"]*\" { /* got the version number */
}
bool
-My_lily_lexer::note_state_b () const
+My_lily_lexer::is_note_state () const
{
return YY_START == notes;
}
bool
-My_lily_lexer::chord_state_b () const
+My_lily_lexer::is_chord_state () const
{
return YY_START == chords;
}
bool
-My_lily_lexer::lyric_state_b () const
+My_lily_lexer::is_lyric_state () const
{
return YY_START == lyrics;
}
bool
-My_lily_lexer::figure_state_b () const
+My_lily_lexer::is_figure_state () const
{
return YY_START == figures;
}
bool
-valid_version_b (String s)
+is_valid_version (String s)
{
Lilypond_version current ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL );
Lilypond_version ver (s);
*space = (base_space - increment) + *fixed ;
if (!extents[RIGHT].is_empty ()
- && (Item::breakable_b (right_col)
+ && (Item::is_breakable (right_col)
|| right_col->original_))
{
/*
bool
Paper_column::is_used (Grob*me)
{
- return gh_pair_p (me->get_grob_property ("elements")) || Item::breakable_b (me)
+ return gh_pair_p (me->get_grob_property ("elements")) || Item::is_breakable (me)
|| gh_pair_p (me->get_grob_property ("bounded-by-me"))
;
}
bool
-regular_identifier_b (SCM id)
+is_regular_identifier (SCM id)
{
String str = ly_scm2string (id);
char const *s = str.to_str0 () ;
bool
-is_duration_b (int t)
+is_is_duration (int t)
{
return t && t == 1 << intlog2 (t);
}
*/
Input ip = THIS->pop_spot ();
- if (! regular_identifier_b ($1))
+ if (! is_regular_identifier ($1))
{
ip.warning (_ ("Identifier should have alphabetic characters only"));
}
$$ = $1;
}
| HYPHEN {
- if (!THIS->lexer_->lyric_state_b ())
+ if (!THIS->lexer_->is_lyric_state ())
THIS->parser_error (_ ("Have to be in Lyric mode for lyrics"));
$$ = MY_MAKE_MUSIC("HyphenEvent");
}
| EXTENDER {
- if (!THIS->lexer_->lyric_state_b ())
+ if (!THIS->lexer_->is_lyric_state ())
THIS->parser_error (_ ("Have to be in Lyric mode for lyrics"));
$$ = MY_MAKE_MUSIC("ExtenderEvent");
}
steno_duration:
bare_unsigned dots {
int l = 0;
- if (!is_duration_b ($1))
+ if (!is_is_duration ($1))
THIS->parser_error (_f ("not a duration: %d", $1));
else
l = intlog2 ($1);
$$ =0;
}
| ':' bare_unsigned {
- if (!is_duration_b ($2))
+ if (!is_is_duration ($2))
THIS->parser_error (_f ("not a duration: %d", $2));
$$ = $2;
}
pitch exclamations questions oct_check optional_notemode_duration optional_rest {
Input i = THIS->pop_spot ();
- if (!THIS->lexer_->note_state_b ())
+ if (!THIS->lexer_->is_note_state ())
THIS->parser_error (_ ("Have to be in Note mode for notes"));
Music *n = 0;
| lyric_element optional_notemode_duration {
Input i = THIS->pop_spot ();
- if (!THIS->lexer_->lyric_state_b ())
+ if (!THIS->lexer_->is_lyric_state ())
THIS->parser_error (_ ("Have to be in Lyric mode for lyrics"));
Music * lreq = MY_MAKE_MUSIC("LyricEvent");
| new_chord {
THIS->pop_spot ();
- if (!THIS->lexer_->chord_state_b ())
+ if (!THIS->lexer_->is_chord_state ())
THIS->parser_error (_ ("Have to be in Chord mode for chords"));
$$ = unsmob_music ($1);
}
Item *thing = dynamic_cast<Item*> (inf.grob_);
if (thing && Side_position_interface::has_interface (inf.grob_)) // ugh FIXME
{
- if (!Item::breakable_b (thing)
+ if (!Item::is_breakable (thing)
&& Side_position_interface::get_axis (inf.grob_) == Y_AXIS)
{
scripts_.push (thing);
return ;
}
- bool ib =Item::breakable_b (it);
+ bool ib =Item::is_breakable (it);
Item *&p_ref_ (ib ? break_item_
: musical_item_);
continue;
}
- if (!desc.sane_b ())
+ if (!desc.is_sane ())
{
programming_error ("Insane spring found. Setting to unit spring.");
bool
-Spring_description::sane_b () const
+Spring_description::is_sane () const
{
return (hooke_ > 0) && !isinf (ideal_) && !isnan (ideal_);
}
Slice
Source_file::line_slice (char const* pos_str0) const
{
- if (!in_b (pos_str0))
+ if (!contains (pos_str0))
return Slice (0,0);
char const* data_str0 = to_str0 ();
String
Source_file::line_string (char const* pos_str0) const
{
- if (!in_b (pos_str0))
+ if (!contains (pos_str0))
return "";
Slice line = line_slice (pos_str0);
int
Source_file::get_char (char const* pos_str0) const
{
- if (!in_b (pos_str0))
+ if (!contains (pos_str0))
return 0;
char const* data_str0 = to_str0 ();
int
Source_file::get_column (char const* pos_str0) const
{
- if (!in_b (pos_str0))
+ if (!contains (pos_str0))
return 0;
int ch_i = get_char (pos_str0);
String
Source_file::error_string (char const* pos_str0) const
{
- if (!in_b (pos_str0))
+ if (!contains (pos_str0))
return " (" + _ ("position unknown") + ")";
int ch_i = get_char (pos_str0);
}
bool
-Source_file::in_b (char const* pos_str0) const
+Source_file::contains (char const* pos_str0) const
{
return (pos_str0 && (pos_str0 >= to_str0 ()) && (pos_str0 <= to_str0 () + length ()));
}
int
Source_file::get_line (char const* pos_str0) const
{
- if (!in_b (pos_str0))
+ if (!contains (pos_str0))
return 0;
if (!newline_locations_.size())
void
Source_file::set_pos (char const * pos_str0)
{
- if (in_b (pos_str0))
+ if (contains (pos_str0))
pos_str0_ = pos_str0;
else
error (error_string (pos_str0) + "invalid pos");
char const* new_str0 = to_str0 () + n;
if (n < 0)
new_str0 += length ();
- if (in_b (new_str0))
+ if (contains (new_str0))
pos_str0_ = new_str0;
else
error (error_string (new_str0) + "seek past eof");
{
char const* old_pos = pos_str0_;
char const* new_str0 = pos_str0_ + n;
- if (in_b (new_str0))
+ if (contains (new_str0))
pos_str0_ = new_str0;
else
error (error_string (new_str0) + "forward past eof");
{
for (Cons<Source_file> *i = sourcefile_list_; i; i = i->next_)
- if (i->car_->in_b (str0))
+ if (i->car_->contains (str0))
return i->car_;
return 0;
}
some cases (two isolated, consecutive clef changes) won't be
nicely folded, but hey, then don't do that.
*/
- if(! ((Paper_column::is_musical (l_neighbor) || Item::breakable_b (l_neighbor))
- && (Paper_column::is_musical (r_neighbor) || Item::breakable_b (r_neighbor))) )
+ if(! ((Paper_column::is_musical (l_neighbor) || Item::is_breakable (l_neighbor))
+ && (Paper_column::is_musical (r_neighbor) || Item::is_breakable (r_neighbor))) )
{
return false;
}
Real increment = robust_scm2double (me->get_grob_property ("spacing-increment"), 1.2);
for (int i=0; i < cols->size (); i++)
{
- if (Item::breakable_b (cols->elem(i)) || Paper_column::is_musical (cols->elem (i)))
+ if (Item::is_breakable (cols->elem(i)) || Paper_column::is_musical (cols->elem (i)))
{
newcols.push (cols->elem(i));
continue;
for (int i = 0; i < cols.size (); i++)
{
Item * it = dynamic_cast<Item*>(cols[i]);
- if (!Item::breakable_b (it) && !Paper_column::is_musical (it))
+ if (!Item::is_breakable (it) && !Paper_column::is_musical (it))
continue;
// it->breakable || it->musical
for (int i = 1; i < all.size (); i++)
{
Grob *sc = all[i];
- if (Item::breakable_b (sc))
+ if (Item::is_breakable (sc))
{
Link_array<Grob> measure (all.slice (j, i+1));
do_measure (global_shortest, me, &measure);
shortest_in_measure = shortest_in_measure <? this_shortest.main_part_;
}
else if (!shortest_in_measure.is_infinity ()
- && Item::breakable_b (cols[i]))
+ && Item::is_breakable (cols[i]))
{
int j = 0;
for (; j < durations.size(); j++)
while (flip (&d) != LEFT);
- if (l->breakable_b (l) && r->breakable_b(r))
+ if (l->is_breakable (l) && r->is_breakable (r))
{
Moment *dt = unsmob_moment (l->get_grob_property ("measure-length"));
Moment mlen (1);
{
if (Spanner* parent = dynamic_cast<Spanner*> (get_parent ((Axis)a)))
{
- if (!parent->spanned_rank_iv ().contains_b (this->spanned_rank_iv ()))
+ if (!parent->spanned_rank_iv ().superset (this->spanned_rank_iv ()))
{
programming_error (to_string ("Spanner `%s' is not fully contained in parent spanner `%s'.",
name ().to_str0 (),
Kill no longer needed grobs.
*/
Item * it = dynamic_cast<Item*> (g);
- if (it && Item::breakable_b(it))
+ if (it && Item::is_breakable (it))
{
it->find_prebroken_piece (LEFT)->suicide();
it->find_prebroken_piece (RIGHT)->suicide();
while (gh_pair_p (s) && ly_car (s) != l->self_scm ())
{
Paper_column*c = dynamic_cast<Paper_column*> (unsmob_grob (ly_car (s)));
- if (Item::breakable_b (c) && !c->system_)
+ if (Item::is_breakable (c) && !c->system_)
ret.push (c);
s = ly_cdr (s);
bool bfound = false;
for (int i= acs.size (); i -- ;)
{
- bool brb = Item::breakable_b (acs[i]);
+ bool brb = Item::is_breakable (acs[i]);
bfound = bfound || brb;
/*
int sz = i.origin_contexts ((Translator*)this).size () ;
return sz > 0 && Axis_group_interface::has_interface (i.grob_)
- && !i.grob_->get_parent (Y_AXIS) && Axis_group_interface::axis_b (i.grob_, Y_AXIS);
+ && !i.grob_->get_parent (Y_AXIS) && Axis_group_interface::has_axis (i.grob_, Y_AXIS);
}
void