From 78d515e9c342e1760b4e8a966dd77cb1cc0218d7 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 28 Sep 2003 20:46:01 +0000 Subject: [PATCH] *** empty log message *** --- ChangeLog | 2 ++ lily/ambitus-engraver.cc | 3 --- lily/break-substitution.cc | 16 ++-------------- lily/cluster.cc | 4 ---- lily/font-metric.cc | 9 ++------- lily/input-file-results.cc | 5 ----- lily/lily-guile.cc | 2 ++ lily/molecule.cc | 5 ----- lily/moment.cc | 6 ------ lily/music-output-def.cc | 6 +----- lily/note-spacing.cc | 2 -- lily/phrasing-slur-engraver.cc | 4 ---- lily/slur-engraver.cc | 4 ---- lily/spacing-spanner.cc | 3 --- lily/system.cc | 26 -------------------------- lily/text-spanner-engraver.cc | 6 ------ 16 files changed, 9 insertions(+), 94 deletions(-) diff --git a/ChangeLog b/ChangeLog index b498fc0e59..b6440f55d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2003-09-28 Han-Wen Nienhuys + * lily/*.cc: remove #if 0'd code in couple of places. + * lily/midi-stream.cc (operator <<): rewrite. * lily/note-head.cc (internal_brew_molecule): diff --git a/lily/ambitus-engraver.cc b/lily/ambitus-engraver.cc index a413742f5b..563d06e8dc 100644 --- a/lily/ambitus-engraver.cc +++ b/lily/ambitus-engraver.cc @@ -186,9 +186,6 @@ Ambitus_engraver::finalize () * most probably arises from an empty voice, such as shared * global timesig/clef definitions. */ -#if 0 - ambitus_->warning("empty ambitus range [ignored]"); -#endif ambitus_->suicide(); } } diff --git a/lily/break-substitution.cc b/lily/break-substitution.cc index fe3b1ea182..b97380ee7b 100644 --- a/lily/break-substitution.cc +++ b/lily/break-substitution.cc @@ -396,25 +396,13 @@ Spanner::fast_fubstitute_grob_list (SCM sym, } } -#if 0 - qsort (vec + sp_index, len - sp_index, - sizeof (Substitution_entry), &Substitution_entry::spanner_compare); /* - This is a waste of time -- the staff-spanners screw up the + sorting vec[sp_index.. len] + is a waste of time -- the staff-spanners screw up the ordering, since they go across the entire score. */ - for (int i = sp_index; i < len ;i++) - { - - for (int j = vec[i].left_; j <= vec[i].right_; j++) - { - sp_indices[j - system_range[LEFT]].add_point (i); - } - } -#else for (int i = sp_indices.size(); i--;) sp_indices[i]= Slice (sp_index, len-1); -#endif assert (it_index <= sp_index); diff --git a/lily/cluster.cc b/lily/cluster.cc index a6caf0a7d5..c89b752fbe 100644 --- a/lily/cluster.cc +++ b/lily/cluster.cc @@ -30,11 +30,7 @@ Molecule brew_cluster_piece (Grob *me, Array bottom_points, Array top_points) { -#if 0 - Real blotdiameter = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter")); -#else Real blotdiameter = Staff_symbol_referencer::staff_space (me)/2; -#endif Real padding; SCM padding_scm = me->get_grob_property ("padding"); diff --git a/lily/font-metric.cc b/lily/font-metric.cc index a8f81640a6..90dcae5657 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -155,15 +155,10 @@ LY_DEFINE(ly_find_glyph_by_name, "ly:find-glyph-by-name", 2 , 0, 0, Molecule m = fm->find_by_name (ly_scm2string (name)); -#if 0 /* - should add to calling interface. + TODO: make optional argument for default if not found. + */ - if (m.get_expr () != SCM_EOL) - return m.smobbed_copy (); - else - return SCM_BOOL_F; -#endif return m.smobbed_copy (); } diff --git a/lily/input-file-results.cc b/lily/input-file-results.cc index 8239852e4b..f92671aa6c 100644 --- a/lily/input-file-results.cc +++ b/lily/input-file-results.cc @@ -88,12 +88,7 @@ write_dependency_file (String fn, String dep = deps[i]; if (!dependency_prefix_global.empty_b ()) { -#if 0//thinko? - if (stat (dep.to_str0 (), &stat_buf) == -1 && errno == ENOENT) - ; //make emacs happy -#else if (dep.index ('/') < 0) -#endif dep = dependency_prefix_global + dep; } out += " " + dep; diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 9646364087..1b423bc7c8 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -561,6 +561,8 @@ type_check_assignment (SCM sym, SCM val, SCM type_symbol) TODO: deprecate the use of \override and \revert for autoBeamSettings? + + or use a symbol autoBeamSettingS? */ return true; #endif diff --git a/lily/molecule.cc b/lily/molecule.cc index e05e643263..6e60f05660 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -173,11 +173,6 @@ int Molecule::print_smob (SCM , SCM port, scm_print_state *) { scm_puts ("#to_string ()); - scm_puts ((char *)str.to_str0 (), port); -#endif scm_puts (" >", port); return 1; diff --git a/lily/moment.cc b/lily/moment.cc index 43c3e0bf18..c23488e068 100644 --- a/lily/moment.cc +++ b/lily/moment.cc @@ -188,12 +188,6 @@ Moment::operator /= (Moment const &src) } -#if 0 -Moment::operator Rational() -{ - return main_part_; -} -#endif int Moment::den () const { return main_part_.den (); } diff --git a/lily/music-output-def.cc b/lily/music-output-def.cc index 8c353b6bc7..1f834889f4 100644 --- a/lily/music-output-def.cc +++ b/lily/music-output-def.cc @@ -113,11 +113,7 @@ Music_output_def::print_smob (SCM s, SCM p, scm_print_state *) { Music_output_def * def = unsmob_music_output_def (s); scm_puts ("#type_name_, p); -#else - (void) def; -#endif + (void)def; scm_puts (">", p); return 1; } diff --git a/lily/note-spacing.cc b/lily/note-spacing.cc index 80a789e418..de08af4efa 100644 --- a/lily/note-spacing.cc +++ b/lily/note-spacing.cc @@ -431,11 +431,9 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, *space += correction; -#if 0 /* there used to be a correction for bar_xextent() here, but it's unclear what that was good for ? */ -#endif } diff --git a/lily/phrasing-slur-engraver.cc b/lily/phrasing-slur-engraver.cc index 0906d16831..5103df8203 100644 --- a/lily/phrasing-slur-engraver.cc +++ b/lily/phrasing-slur-engraver.cc @@ -107,14 +107,10 @@ Phrasing_slur_engraver::finalize () { for (int i = 0; i < phrasing_slur_l_stack_.size (); i++) { -#if 0 - typeset_grob (phrasing_slur_l_stack_[i]); -#else /* Let's not typeset unterminated stuff */ phrasing_slur_l_stack_[i]->suicide (); -#endif } phrasing_slur_l_stack_.clear (); diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index 77e6ccd193..7441f52425 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -125,14 +125,10 @@ Slur_engraver::finalize () { for (int i = 0; i < slur_stack_.size (); i++) { -#if 0 - typeset_grob (slur_stack_[i]); -#else /* Let's not typeset unterminated stuff */ slur_stack_[i]->suicide (); -#endif } slur_stack_.clear (); diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 83902679d2..4e733fe639 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -826,9 +826,6 @@ Spacing_spanner::get_duration_space (Grob*me, Moment d, Rational shortest, bool */ Rational ratio = d.main_part_ / shortest; -#if 0 - *expand_only = true; -#endif return ((k-1) + double (ratio)) * incr; } else diff --git a/lily/system.cc b/lily/system.cc index aae85ea286..8aadfedb6d 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -201,31 +201,6 @@ set_loose_columns (System* which, Column_x_positions const *posns) } while (1); - -#if 0 - Real rx = right->relative_coordinate (right->get_parent (X_AXIS), X_AXIS); - Real lx = left->relative_coordinate (left->get_parent (X_AXIS), X_AXIS); - - /* - divide space equally over loose columns. - */ - int j = 1; - loose = col; - while (1) - { - SCM between = loose->get_grob_property ("between-cols"); - if (!gh_pair_p (between)) - break; - - Paper_column *thiscol = dynamic_cast (loose); - - thiscol->system_ = which; - thiscol->translate_axis (lx + j*(rx - lx)/divide_over, X_AXIS); - - j ++; - loose = dynamic_cast (unsmob_grob (ly_cdr (between))); - } -#else /* We divide the remaining space of the column over the left and right side. At the moment, we @@ -263,7 +238,6 @@ set_loose_columns (System* which, Column_x_positions const *posns) col->system_ = which; col->translate_axis (lx + dx - cval[LEFT], X_AXIS); -#endif } } diff --git a/lily/text-spanner-engraver.cc b/lily/text-spanner-engraver.cc index 7fd070d831..bbd3ef376c 100644 --- a/lily/text-spanner-engraver.cc +++ b/lily/text-spanner-engraver.cc @@ -99,12 +99,6 @@ Text_spanner_engraver::process_music () current_req_ = req_drul_[START]; span_ = new Spanner (get_property ("TextSpanner")); -#if 0 - /* Ugh. Reset (de)cresc. specific properties */ - span_->set_grob_property ("enclose-bounds", SCM_BOOL_T); - span_->set_grob_property ("if-text-padding", gh_double2scm (0)); - span_->set_grob_property ("width-correct", gh_double2scm (0)); -#endif Side_position_interface::set_axis (span_, Y_AXIS); announce_grob (span_, req_drul_[START]->self_scm()); -- 2.39.5