]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' into lilypond/translation
authorFrancisco Vila <francisco.vila@hispalinux.es>
Mon, 8 Aug 2011 14:51:03 +0000 (16:51 +0200)
committerFrancisco Vila <francisco.vila@hispalinux.es>
Mon, 8 Aug 2011 14:51:03 +0000 (16:51 +0200)
706 files changed:
Documentation/GNUmakefile
Documentation/changes.tely
Documentation/common-macros.itexi
Documentation/contributor/programming-work.itexi
Documentation/contributor/release-work.itexi
Documentation/essay/computer-notation.bib
Documentation/extending/programming-interface.itely
Documentation/fr/learning/tweaks.itely
Documentation/fr/notation/changing-defaults.itely
Documentation/fr/notation/percussion.itely
Documentation/fr/notation/spacing.itely
Documentation/fr/notation/vocal.itely
Documentation/fr/search-box.ihtml
Documentation/it/texidocs/single-staff-template-with-only-notes.texidoc
Documentation/lilypond-texi2html.init
Documentation/notation/changing-defaults.itely
Documentation/notation/input.itely
Documentation/notation/keyboards.itely
Documentation/notation/notation-appendices.itely
Documentation/notation/repeats.itely
Documentation/notation/staff.itely
Documentation/snippets/accordion-discant-symbols.ly
Documentation/snippets/adding-bar-lines-to-chordnames-context.ly
Documentation/snippets/adding-drum-parts.ly
Documentation/snippets/adding-indicators-to-staves-which-get-split-after-a-break.ly
Documentation/snippets/ancient-fonts.ly
Documentation/snippets/ancient-notation-template----modern-transcription-of-gregorian-music.ly
Documentation/snippets/ancient-notation-template----modern-transcription-of-mensural-music.ly
Documentation/snippets/anglican-psalm-template.ly
Documentation/snippets/customizing-fretboard-fret-diagrams.ly
Documentation/snippets/demo-midiinstruments.ly
Documentation/snippets/engraving-ties-manually.ly
Documentation/snippets/hiding-the-extender-line-for-text-dynamics.ly
Documentation/snippets/hymn-template.ly
Documentation/snippets/jazz-combo-template.ly
Documentation/snippets/orchestra,-choir-and-piano-template.ly
Documentation/snippets/piano-template-simple.ly
Documentation/snippets/piano-template-with-centered-dynamics.ly
Documentation/snippets/piano-template-with-centered-lyrics.ly
Documentation/snippets/piano-template-with-melody-and-lyrics.ly
Documentation/snippets/removing-the-first-empty-line.ly
Documentation/snippets/satb-choir-template---four-staves.ly
Documentation/snippets/single-staff-template-with-notes,-lyrics,-and-chords.ly
Documentation/snippets/single-staff-template-with-notes-and-chords.ly
Documentation/snippets/single-staff-template-with-notes-and-lyrics.ly
Documentation/snippets/single-staff-template-with-only-notes.ly
Documentation/snippets/string-quartet-template-simple.ly
Documentation/snippets/string-quartet-template-with-separate-parts.ly
Documentation/snippets/suppressing-warnings-for-clashing-note-columns.ly
Documentation/snippets/vocal-ensemble-template-with-automatic-piano-reduction.ly
Documentation/snippets/vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
Documentation/snippets/vocal-ensemble-template-with-verse-and-refrain.ly
Documentation/snippets/vocal-ensemble-template.ly
Documentation/usage/lilypond-book.itely
Documentation/usage/running.itely
Documentation/web/manuals.itexi
Documentation/web/news-front.itexi
Documentation/web/news.itexi
VERSION
elisp/lilypond-mode.el
flower/file-cookie.cc
flower/file-name.cc
flower/file-path.cc
flower/getopt-long.cc
flower/include/arithmetic-operator.hh
flower/include/axis.hh
flower/include/compare.hh
flower/include/direction.hh
flower/include/drul-array.hh
flower/include/file-cookie.hh
flower/include/file-name.hh
flower/include/getopt-long.hh
flower/include/international.hh
flower/include/interval.hh
flower/include/interval.tcc
flower/include/libc-extension.hh
flower/include/matrix.hh
flower/include/offset.hh
flower/include/parray.hh
flower/include/polynomial.hh
flower/include/pqueue.hh
flower/include/rational.hh
flower/include/real.hh
flower/include/std-string.hh
flower/include/std-vector.hh
flower/include/string-convert.hh
flower/include/tuple.hh
flower/include/virtual-methods.hh
flower/include/yaffut-parameters.hh
flower/include/yaffut.hh
flower/international.cc
flower/interval-set.cc
flower/libc-extension.cc
flower/memory-stream.cc
flower/offset.cc
flower/polynomial.cc
flower/rational.cc
flower/std-string.cc
flower/string-convert.cc
flower/test-file-name.cc
flower/test-std.cc
flower/test-string.cc
input/regression/beam-skip.ly
input/regression/footnote-auto-numbering-page-reset.ly
input/regression/footnote-auto-numbering.ly
input/regression/lyric-hyphen-break.ly
input/regression/nested-property-revert.ly [deleted file]
lily/accidental-engraver.cc
lily/accidental-placement.cc
lily/accidental.cc
lily/align-interface.cc
lily/all-font-metrics-scheme.cc
lily/all-font-metrics.cc
lily/ambitus-engraver.cc
lily/arpeggio-engraver.cc
lily/arpeggio.cc
lily/articulations.cc
lily/audio-column.cc
lily/audio-element-info.cc
lily/audio-element.cc
lily/audio-item.cc
lily/audio-staff.cc
lily/auto-beam-engraver.cc
lily/auto-change-iterator.cc
lily/axis-group-engraver.cc
lily/axis-group-interface-scheme.cc
lily/axis-group-interface.cc
lily/balloon-engraver.cc
lily/balloon.cc
lily/bar-check-iterator.cc
lily/bar-engraver.cc
lily/bar-line.cc
lily/bar-number-engraver.cc
lily/beam-collision-engraver.cc
lily/beam-concave.cc
lily/beam-engraver.cc
lily/beam-performer.cc
lily/beam-quanting.cc
lily/beam.cc
lily/beaming-pattern.cc
lily/bend-engraver.cc
lily/bezier-bow.cc
lily/bezier.cc
lily/book-scheme.cc
lily/book.cc
lily/box.cc
lily/break-align-engraver.cc
lily/break-alignment-interface.cc
lily/break-substitution.cc
lily/breathing-sign-engraver.cc
lily/breathing-sign.cc
lily/change-iterator.cc
lily/chord-name-engraver.cc
lily/chord-name.cc
lily/chord-tremolo-engraver.cc
lily/chord-tremolo-iterator.cc
lily/clef-engraver.cc
lily/clef.cc
lily/cluster-engraver.cc
lily/cluster.cc
lily/coherent-ligature-engraver.cc
lily/collision-engraver.cc
lily/completion-note-heads-engraver.cc
lily/completion-rest-engraver.cc
lily/constrained-breaking.cc
lily/context-def.cc
lily/context-mod-scheme.cc
lily/context-mod.cc
lily/context-property.cc
lily/context-scheme.cc
lily/context-specced-music-iterator.cc
lily/context.cc
lily/control-track-performer.cc
lily/cue-clef-engraver.cc
lily/custos-engraver.cc
lily/custos.cc
lily/default-bar-line-engraver.cc
lily/dimension-cache.cc
lily/dimensions-scheme.cc
lily/dispatcher-scheme.cc
lily/dispatcher.cc
lily/dot-column-engraver.cc
lily/dot-column.cc
lily/dot-configuration.cc
lily/dot-formatting-problem.cc
lily/dots-engraver.cc
lily/dots.cc
lily/double-percent-repeat-engraver.cc
lily/drum-note-engraver.cc
lily/drum-note-performer.cc
lily/duration-scheme.cc
lily/duration.cc
lily/dynamic-align-engraver.cc
lily/dynamic-engraver.cc
lily/dynamic-performer.cc
lily/enclosing-bracket.cc
lily/engraver-group.cc
lily/engraver-scheme.cc
lily/engraver.cc
lily/episema-engraver.cc
lily/event-chord-iterator.cc
lily/extender-engraver.cc
lily/figured-bass-continuation.cc
lily/figured-bass-engraver.cc
lily/figured-bass-position-engraver.cc
lily/file-name-map.cc
lily/fingering-engraver.cc
lily/font-config-scheme.cc
lily/font-config.cc
lily/font-interface.cc
lily/font-metric-scheme.cc
lily/font-metric.cc
lily/font-select.cc
lily/font-size-engraver.cc
lily/footnote-engraver.cc
lily/forbid-break-engraver.cc
lily/freetype-error.cc
lily/fretboard-engraver.cc
lily/function-documentation.cc
lily/general-scheme.cc
lily/glissando-engraver.cc
lily/global-context-scheme.cc
lily/global-context.cc
lily/grace-engraver.cc
lily/grace-spacing-engraver.cc
lily/gregorian-ligature-engraver.cc
lily/gregorian-ligature.cc
lily/grid-line-interface.cc
lily/grid-line-span-engraver.cc
lily/grid-point-engraver.cc
lily/grob-array-scheme.cc
lily/grob-array.cc
lily/grob-closure.cc
lily/grob-info.cc
lily/grob-interface-scheme.cc
lily/grob-interface.cc
lily/grob-pq-engraver.cc
lily/grob-property.cc
lily/grob-scheme.cc
lily/grob-smob.cc
lily/grob.cc
lily/guile-init.cc
lily/hairpin.cc
lily/hara-kiri-engraver.cc
lily/hara-kiri-group-spanner.cc
lily/horizontal-bracket-engraver.cc
lily/horizontal-bracket.cc
lily/hyphen-engraver.cc
lily/identifier-smob.cc
lily/includable-lexer.cc
lily/include/accidental-interface.hh
lily/include/accidental-placement.hh
lily/include/align-interface.hh
lily/include/all-font-metrics.hh
lily/include/arpeggio.hh
lily/include/articulations.hh
lily/include/audio-column.hh
lily/include/audio-element-info.hh
lily/include/audio-element.hh
lily/include/audio-item.hh
lily/include/audio-staff.hh
lily/include/axis-group-engraver.hh
lily/include/axis-group-interface.hh
lily/include/bar-line.hh
lily/include/beam-scoring-problem.hh
lily/include/beam.hh
lily/include/beaming-pattern.hh
lily/include/bezier.hh
lily/include/book.hh
lily/include/box.hh
lily/include/break-align-interface.hh
lily/include/breathing-sign.hh
lily/include/change-iterator.hh
lily/include/chord-name.hh
lily/include/chord-tremolo-iterator.hh
lily/include/clef.hh
lily/include/cluster.hh
lily/include/coherent-ligature-engraver.hh
lily/include/column-x-positions.hh
lily/include/constrained-breaking.hh
lily/include/context-def.hh
lily/include/context-handle.hh
lily/include/context-mod.hh
lily/include/context.hh
lily/include/custos.hh
lily/include/dimension-cache.hh
lily/include/dot-column.hh
lily/include/dot-configuration.hh
lily/include/dot-formatting-problem.hh
lily/include/dots.hh
lily/include/engraver-group.hh
lily/include/engraver.hh
lily/include/event-chord-iterator.hh
lily/include/event-iterator.hh
lily/include/font-interface.hh
lily/include/font-metric.hh
lily/include/global-context.hh
lily/include/global-ctor.hh
lily/include/grace-iterator.hh
lily/include/gregorian-ligature-engraver.hh
lily/include/gregorian-ligature.hh
lily/include/grid-line-interface.hh
lily/include/grob-array.hh
lily/include/grob-info.hh
lily/include/grob-interface.hh
lily/include/grob.hh
lily/include/hairpin.hh
lily/include/hara-kiri-group-spanner.hh
lily/include/horizontal-bracket.hh
lily/include/includable-lexer.hh
lily/include/input.hh
lily/include/item.hh
lily/include/ligature-engraver.hh
lily/include/lily-guile-macros.hh
lily/include/lily-guile.hh
lily/include/lily-lexer.hh
lily/include/lily-parser.hh
lily/include/lily-proto.hh
lily/include/line-interface.hh
lily/include/listener.hh
lily/include/lookup.hh
lily/include/ly-module.hh
lily/include/ly-smobs.icc
lily/include/lyric-extender.hh
lily/include/lyric-hyphen.hh
lily/include/main.hh
lily/include/measure-grouping-spanner.hh
lily/include/melody-spanner.hh
lily/include/mensural-ligature.hh
lily/include/midi-chunk.hh
lily/include/midi-item.hh
lily/include/midi-walker.hh
lily/include/misc.hh
lily/include/moment.hh
lily/include/multi-measure-rest.hh
lily/include/music-iterator.hh
lily/include/music-output.hh
lily/include/music-wrapper-iterator.hh
lily/include/music.hh
lily/include/note-collision.hh
lily/include/note-column.hh
lily/include/note-head.hh
lily/include/note-spacing.hh
lily/include/open-type-font.hh
lily/include/page-breaking.hh
lily/include/page-layout-problem.hh
lily/include/page-spacing-result.hh
lily/include/page-spacing.hh
lily/include/page-turn-page-breaking.hh
lily/include/pango-font.hh
lily/include/paper-book.hh
lily/include/paper-column-engraver.hh
lily/include/paper-column.hh
lily/include/paper-score.hh
lily/include/parse-scm.hh
lily/include/percent-repeat-item.hh
lily/include/performance.hh
lily/include/pitch.hh
lily/include/pointer-group-interface.hh
lily/include/prob.hh
lily/include/property-iterator.hh
lily/include/rest-collision.hh
lily/include/rest.hh
lily/include/rhythmic-head.hh
lily/include/scale.hh
lily/include/scheme-engraver.hh
lily/include/score-engraver.hh
lily/include/script-column.hh
lily/include/script-interface.hh
lily/include/self-alignment-interface.hh
lily/include/semi-tie-column.hh
lily/include/semi-tie.hh
lily/include/sequential-iterator.hh
lily/include/side-position-interface.hh
lily/include/simple-music-iterator.hh
lily/include/simple-spacer.hh
lily/include/simultaneous-music-iterator.hh
lily/include/skyline-pair.hh
lily/include/skyline.hh
lily/include/slur-configuration.hh
lily/include/slur-scoring.hh
lily/include/slur.hh
lily/include/smobs.hh
lily/include/source-file.hh
lily/include/sources.hh
lily/include/spaceable-grob.hh
lily/include/spacing-interface.hh
lily/include/spacing-options.hh
lily/include/spacing-spanner.hh
lily/include/span-bar.hh
lily/include/spanner.hh
lily/include/spring.hh
lily/include/staff-spacing.hh
lily/include/staff-symbol-referencer.hh
lily/include/staff-symbol.hh
lily/include/stem-tremolo.hh
lily/include/stem.hh
lily/include/stencil.hh
lily/include/stream-event.hh
lily/include/stream.hh
lily/include/system-start-delimiter.hh
lily/include/system.hh
lily/include/text-interface.hh
lily/include/tie-column-format.hh
lily/include/tie-column.hh
lily/include/tie-configuration.hh
lily/include/tie-details.hh
lily/include/tie-formatting-problem.hh
lily/include/tie-specification.hh
lily/include/tie.hh
lily/include/time-scaled-music-iterator.hh
lily/include/time-signature.hh
lily/include/translator-dispatch-list.hh
lily/include/translator-group.hh
lily/include/translator.hh
lily/include/translator.icc
lily/include/tuplet-bracket.hh
lily/include/vaticana-ligature.hh
lily/include/volta-bracket.hh
lily/input-scheme.cc
lily/input-smob.cc
lily/input.cc
lily/instrument-name-engraver.cc
lily/instrument-switch-engraver.cc
lily/item-scheme.cc
lily/item.cc
lily/keep-alive-together-engraver.cc
lily/key-engraver.cc
lily/key-performer.cc
lily/key-signature-interface.cc
lily/laissez-vibrer-engraver.cc
lily/least-squares.cc
lily/ledger-line-engraver.cc
lily/ledger-line-spanner.cc
lily/ligature-bracket-engraver.cc
lily/ligature-engraver.cc
lily/lily-guile.cc
lily/lily-lexer-scheme.cc
lily/lily-lexer.cc
lily/lily-parser-scheme.cc
lily/lily-parser.cc
lily/lilypond-version.cc
lily/line-interface.cc
lily/line-spanner.cc
lily/listener.cc
lily/lookup.cc
lily/ly-module.cc
lily/lyric-combine-music-iterator.cc
lily/lyric-engraver.cc
lily/lyric-extender.cc
lily/lyric-hyphen.cc
lily/lyric-performer.cc
lily/main.cc
lily/mark-engraver.cc
lily/measure-grouping-engraver.cc
lily/measure-grouping-spanner.cc
lily/melody-engraver.cc
lily/melody-spanner.cc
lily/mensural-ligature-engraver.cc
lily/mensural-ligature.cc
lily/metronome-engraver.cc
lily/midi-chunk.cc
lily/midi-item.cc
lily/midi-walker.cc
lily/misc.cc
lily/modified-font-metric.cc
lily/module-scheme.cc
lily/moment-scheme.cc
lily/moment.cc
lily/multi-measure-rest-engraver.cc
lily/multi-measure-rest.cc
lily/music-function-scheme.cc
lily/music-function.cc
lily/music-iterator.cc
lily/music-output.cc
lily/music-scheme.cc
lily/music-sequence.cc
lily/music-wrapper-iterator.cc
lily/music.cc
lily/nested-property.cc
lily/new-dynamic-engraver.cc
lily/new-fingering-engraver.cc
lily/note-collision.cc
lily/note-column-scheme.cc
lily/note-column.cc
lily/note-head-line-engraver.cc
lily/note-head-scheme.cc
lily/note-head.cc
lily/note-heads-engraver.cc
lily/note-name-engraver.cc
lily/note-performer.cc
lily/note-spacing-engraver.cc
lily/note-spacing.cc
lily/open-type-font-scheme.cc
lily/open-type-font.cc
lily/optimal-page-breaking.cc
lily/ottava-bracket.cc
lily/ottava-engraver.cc
lily/page-breaking-scheme.cc
lily/page-breaking.cc
lily/page-layout-problem.cc
lily/page-marker-scheme.cc
lily/page-spacing-result.cc
lily/page-spacing.cc
lily/page-turn-engraver.cc
lily/page-turn-page-breaking.cc
lily/pango-font-scheme.cc
lily/pango-font.cc
lily/pango-select-scheme.cc
lily/pango-select.cc
lily/paper-book-scheme.cc
lily/paper-book.cc
lily/paper-column-engraver.cc
lily/paper-column.cc
lily/paper-def.cc
lily/paper-outputter-scheme.cc
lily/paper-outputter.cc
lily/paper-score-scheme.cc
lily/paper-score.cc
lily/paper-system-scheme.cc
lily/paper-system.cc
lily/parenthesis-engraver.cc
lily/parse-scm.cc
lily/parser.yy
lily/part-combine-engraver.cc
lily/part-combine-iterator.cc
lily/partial-iterator.cc
lily/pdf-scheme.cc
lily/percent-repeat-engraver.cc
lily/percent-repeat-item.cc
lily/percent-repeat-iterator.cc
lily/performance-scheme.cc
lily/performance.cc
lily/performer-group.cc
lily/performer.cc
lily/pfb-scheme.cc
lily/pfb.cc
lily/phrasing-slur-engraver.cc
lily/piano-pedal-align-engraver.cc
lily/piano-pedal-bracket.cc
lily/piano-pedal-engraver.cc
lily/piano-pedal-performer.cc
lily/pitch-interval.cc
lily/pitch-scheme.cc
lily/pitch-squash-engraver.cc
lily/pitch.cc
lily/pitched-trill-engraver.cc
lily/pointer-group-interface-scheme.cc
lily/pointer-group-interface.cc
lily/prob-scheme.cc
lily/prob.cc
lily/profile.cc
lily/program-option-scheme.cc
lily/program-option.cc
lily/property-iterator.cc
lily/protected-scm.cc
lily/quote-iterator.cc
lily/relative-octave-check.cc
lily/relative-octave-music.cc
lily/relocate.cc
lily/repeat-acknowledge-engraver.cc
lily/repeat-tie-engraver.cc
lily/repeated-music.cc
lily/rest-collision-engraver.cc
lily/rest-collision.cc
lily/rest-engraver.cc
lily/rest.cc
lily/rhythmic-column-engraver.cc
lily/rhythmic-head.cc
lily/rod.cc
lily/scale.cc
lily/scheme-engraver.cc
lily/scheme-listener-scheme.cc
lily/scheme-listener.cc
lily/scm-hash.cc
lily/score-engraver.cc
lily/score-performer.cc
lily/score-scheme.cc
lily/score.cc
lily/script-column-engraver.cc
lily/script-column.cc
lily/script-engraver.cc
lily/script-interface.cc
lily/script-row-engraver.cc
lily/self-alignment-interface.cc
lily/semi-tie-column.cc
lily/semi-tie.cc
lily/separating-line-group-engraver.cc
lily/separation-item.cc
lily/sequential-iterator.cc
lily/side-position-interface.cc
lily/simple-closure.cc
lily/simple-spacer-scheme.cc
lily/simple-spacer.cc
lily/simultaneous-music-iterator.cc
lily/skyline-pair.cc
lily/skyline.cc
lily/slash-repeat-engraver.cc
lily/slur-configuration.cc
lily/slur-engraver.cc
lily/slur-performer.cc
lily/slur-score-parameters.cc
lily/slur-scoring.cc
lily/slur.cc
lily/smobs.cc
lily/source-file.cc
lily/sources.cc
lily/spaceable-grob.cc
lily/spacing-basic.cc
lily/spacing-determine-loose-columns.cc
lily/spacing-engraver.cc
lily/spacing-interface.cc
lily/spacing-loose-columns.cc
lily/spacing-options.cc
lily/spacing-spanner.cc
lily/span-arpeggio-engraver.cc
lily/span-bar-engraver.cc
lily/span-bar.cc
lily/spanner-break-forbid-engraver.cc
lily/spanner-scheme.cc
lily/spanner.cc
lily/spring-smob.cc
lily/spring.cc
lily/staff-collecting-engraver.cc
lily/staff-grouper-interface.cc
lily/staff-performer.cc
lily/staff-spacing.cc
lily/staff-symbol-engraver.cc
lily/staff-symbol-referencer-scheme.cc
lily/staff-symbol-referencer.cc
lily/staff-symbol.cc
lily/stanza-number-align-engraver.cc
lily/stanza-number-engraver.cc
lily/stem-engraver.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/stencil-expression.cc
lily/stencil-interpret.cc
lily/stencil-scheme.cc
lily/stencil.cc
lily/stream-event-scheme.cc
lily/stream-event.cc
lily/sustain-pedal.cc
lily/system-start-delimiter-engraver.cc
lily/system-start-delimiter.cc
lily/system.cc
lily/tab-note-heads-engraver.cc
lily/tab-staff-symbol-engraver.cc
lily/tab-tie-follow-engraver.cc
lily/template5.cc
lily/tempo-performer.cc
lily/text-engraver.cc
lily/text-interface.cc
lily/text-spanner-engraver.cc
lily/tie-column.cc
lily/tie-configuration.cc
lily/tie-details.cc
lily/tie-engraver.cc
lily/tie-formatting-problem.cc
lily/tie-performer.cc
lily/tie-specification.cc
lily/tie.cc
lily/time-signature-engraver.cc
lily/time-signature-performer.cc
lily/time-signature.cc
lily/timing-translator.cc
lily/translator-ctors.cc
lily/translator-dispatch-list.cc
lily/translator-group-ctors.cc
lily/translator-group.cc
lily/translator-scheme.cc
lily/translator.cc
lily/trill-spanner-engraver.cc
lily/ttf.cc
lily/tuplet-bracket.cc
lily/tuplet-engraver.cc
lily/tuplet-iterator.cc
lily/tuplet-number.cc
lily/tweak-engraver.cc
lily/unfolded-repeat-iterator.cc
lily/vaticana-ligature-engraver.cc
lily/vaticana-ligature.cc
lily/vertical-align-engraver.cc
lily/volta-bracket.cc
lily/volta-engraver.cc
lily/volta-repeat-iterator.cc
ly/context-mods-init.ly
ly/music-functions-init.ly
make/doc-i18n-root-vars.make
mf/feta-noteheads.mf
po/fr.po
po/it.po
po/lilypond.pot
python/auxiliar/postprocess_html.py
python/convertrules.py
scm/document-context-mods.scm [new file with mode: 0644]
scm/document-identifiers.scm
scm/documentation-generate.scm
scm/documentation-lib.scm
scm/lily-library.scm
scm/ly-syntax-constructors.scm
scripts/auxiliar/fixcc.py
scripts/auxiliar/ref_check.tely
scripts/build/mf2pt1.pl
scripts/build/website-known-missing-files.txt
stepmake/stepmake/metafont-rules.make

index 19ae57769883b1d8f3667373d426ed2c1bc98544..9b598c923ac1f0107ae6e9feab0ee4eb36c85850 100644 (file)
@@ -57,19 +57,19 @@ TEXI_FILES_FROM_TELY = $(outdir)/internals.texi
 PDF_FILES = $(TEXINFO_MANUALS:%=$(outdir)/%.pdf)
 
 TOPDIR_HTML_MANUALS =
-UNSPLITTED_HTML_MANUALS =
-SPLITTED_HTML_MANUALS = $(foreach manual, $(TEXINFO_MANUALS),\
- $(if $(findstring $(manual), $(UNSPLITTED_HTML_MANUALS)),,$(manual)))
-NOT_TOPDIR_HTML_MANUALS = $(foreach manual, $(SPLITTED_HTML_MANUALS),\
+UNSPLIT_HTML_MANUALS =
+SPLIT_HTML_MANUALS = $(foreach manual, $(TEXINFO_MANUALS),\
+ $(if $(findstring $(manual), $(UNSPLIT_HTML_MANUALS)),,$(manual)))
+NOT_TOPDIR_HTML_MANUALS = $(foreach manual, $(SPLIT_HTML_MANUALS),\
  $(if $(findstring $(manual), $(TOPDIR_HTML_MANUALS)),,$(manual)))
 
-OUT_HTML_FILES = $(UNSPLITTED_HTML_MANUALS:%=$(outdir)/%.html)\
- $(SPLITTED_HTML_MANUALS:%=$(outdir)/%-big-page.html)
+OUT_HTML_FILES = $(UNSPLIT_HTML_MANUALS:%=$(outdir)/%.html)\
+ $(SPLIT_HTML_MANUALS:%=$(outdir)/%-big-page.html)
 DEEP_HTML_FILES = $(NOT_TOPDIR_HTML_MANUALS:%=$(outdir)/%/index.html)
 
 # Symlinks to refer to external source documents from split and non-split HTML
 source-links = $(outdir)/source\
- $(foreach manual, $(SPLITTED_HTML_MANUALS), $(outdir)/$(manual)/source)
+ $(foreach manual, $(SPLIT_HTML_MANUALS), $(outdir)/$(manual)/source)
 
 # Other out files
 
index babd796462716ad6e485b57d1c78d26cee7db953..5d87fc5e660ae161d473fe3d5abc7106190242b5 100644 (file)
@@ -36,11 +36,11 @@ See user manual, \NAME\
 @finalout
 
 @node Top
-@top New features in 2.14 since 2.12
+@top New features in 2.16 since 2.14
 
 @allowcodebreaks false
 
-@itemize @bullet
+@itemize
 
 @ignore
 
@@ -62,613 +62,51 @@ which scares away people.
 @end ignore
 
 @item
-Lilypond now helps beams avoid collisions with other grobs!  This feature
-works completely with manual beams.  It also works for all automatic beams
-that do not end right before a change in staff.  For this special case, please
-use manual beams.
-
-@item
-The Articulate script by Peter Chubb, which is GPLv3 licensed, is now
-a part of the distribution.  It allows easy generation of improved
-MIDI files that perform non-legato by default, legato slurs, staccato,
-tempo markings, trills, etc.
-
-@example
-\include "articulate.ly"
-\articulate <<
-      all the rest of the score...
->>
-@end example
-
-@item
-Single beat repeats for sixteenth or shorter notes and beat repeats for
-measures containing notes of varying durations are now supported.
-
-@lilypond[fragment,relative=2]
-\repeat percent 2 { c16 d }
-\repeat percent 2 { c32 e }
-\repeat percent 2 { c64 f }
-\repeat percent 2 { c128 g' }
-@end lilypond
-
-
-@item
-Lilypond now engraves woodwind fingering charts.
-
-@lilypond
-\relative c' {
-  \textLengthOn
-  des1^\markup {
-    \woodwind-diagram #'bassoon #'((lh . (thumb-cis))
-                                   (cc . (one two three five six))
-                                   (rh . (f)))
-    } _"bassoon"
-  c1^\markup {
-    \woodwind-diagram #'oboe #'((rh . (c))
-                                (lh . ())
-                                (cc . (one two three four five six)))
-    } _"oboe"
-
-}
-@end lilypond
-
-@item
-MIDI output has been improved
-@itemize @bullet
-@item the option @code{\set Score.midiChannelMapping = #'voice} puts each voice on its own midi MIDI channel
-@item the option @code{\set Score.midiChannelMapping = #'instrument} puts identical instruments on the same MIDI channel.  This means that e.g. for a full orchestral score there are always 16 (15 plus percussion) differently sounding instruments available, unrestricted by the number of staves or voices.  (Some MIDI players will cut off notes, however, if two voices play the same pitch simultaneously on the same channel.) This option also stores each voice in a separate track in the MIDI file.
-@item the default, @code{\set Score.midiChannelMapping = #'staff}, assigns one MIDI channel per staff.  This setting allows instrument changes (implemented as MIDI program changes) to re-use single MIDI channel.
-@item dynamics are now rendered as note velocities, no longer as midi volume.  This improves the sound on [high end] midi renderers.
-@end itemize
-
-@item
-MIDI-import through Midi2ly is improved
-@itemize @bullet
-@item Midi2ly now also works on Windows systems
-@item MIDI-files with more than 32 tracks are now handled
-@item notes on certain simultaneous voices no longer ignored
-@item notes overrunning a bar line are no longer truncated
-@item initial key signature and time signature are respected
-@item a problem with octaves in subsequent tracks/voices is fixed
-@item initial support for multiple voices notated on one staff
-@item the instrumentName is set from track data
-@item new --skip option, rests are displayed by default
-@item rests overrunning a bar line are not truncated
-@item new --include-header option for setting titles
-@item new --preview option for big MIDI-files
-@end itemize
-The first feature was sponsored by Valentin Villenave,
-the other features were sponsored by Image-Line Software for FL Studio.
-
-@item
-A new @code{Completion_rest_engraver} is available for automatically
-converting long rests which overrun bar lines, matching the
-@code{Completion_heads_engraver} for notes
-@example
-\layout @{
-  \context @{
-    \Voice
-    \remove "Note_heads_engraver"
-    \consists "Completion_heads_engraver"
-    \remove "Rest_engraver"
-    \consists "Completion_rest_engraver"
-  @}
-@}
-@end example
-This feature was sponsored by Image-Line Software for FL Studio.
-
-@item
-Dots can be added to the table of contents items using:
-@example
-\paper @{
-  tocItemMarkup = \tocItemWithDotsMarkup
-@}
-@end example
-
-@item
-New markup commands @code{\pattern} and @code{\fill-with-pattern} are available.
-@lilypond
-\markup \column {
-  \pattern #3 #Y #0.3 \flat
-  \null
-  \pattern #7 #X #2 \flat
-  \override #'(line-width . 40) \fill-with-pattern #1 #CENTER . left right
-}
-@end lilypond
-
-@item
-A minimal composer toolkit of modal transformations is provided.
-A motif may be @notation{transposed}, @notation{inverted} and/or
-converted to its @notation{retrograde} within any scale.
-
-@lilypond
-pentatonicScale = \relative a' { a c d f g }
-motif = \relative c'' { d8 c f,4 <a f'> <a f'> }
-
-\new Staff <<
-  {
-    \partial 4
-    \pentatonicScale
-    \motif
-    \modalTranspose c a, \pentatonicScale \motif
-    \modalInversion d'' a' \pentatonicScale \motif
-    \retrograde \motif
-  }
-  {
-    \partial 4
-    s4^"pentatonic scale"
-    s1
-    s1^"motif"
-    s1^"transposition"
-    s1^"inversion"
-    s1^"retrograde"
-  }
->>
-@end lilypond
-
-@item
-Added minimal support for black mensural notation.
-
-@item
-Enhanced support for obliqua shapes within white mensural ligatures.
-
-@lilypond
-\context MensuralStaff
-{
-  \clef "petrucci-c3"
-  \[
-    \override NoteHead #'style = #'semipetrucci
-    c'\maxima
-    \override NoteHead #'style = #'blackpetrucci
-    a\breve
-    \revert NoteHead #'style
-    \override NoteHead #'ligature-flexa = ##t
-    \override NoteHead #'flexa-width = #3
-    g
-    g'
-    \override NoteHead #'flexa-width = #5
-    c'
-    d'
-    \revert NoteHead #'style
-    c'\longa
-  \]
-}
-@end lilypond
-
-@item
-New markup functions @code{\with-link} and @code{\page-link} that add
-hyperlinks to a given label or a given page number. This works in the PDF
-backend only. All entries to the table of contents now automatically add
-hyperlinks to the pages they are referring to.
-
-@item
-Compound time signatures are now supported by the @code{\compoundMeter} command,
-which can be used instead of @code{\time}:
-
-@lilypond
-\relative c'' {
-  \compoundMeter #'(3 1 8)
-  c8 c c c
-  \compoundMeter #'((2 8) (5 8))
-  c8 c c c c c c
-  \compoundMeter #'((1 2 3 8) (1 4) (3 8))
-  c8 c c c c c c4 c8 c c
-}
+@code{\set \once} now correctly resets the property value to the previous value.
+@lilypond[fragment,quote,relative=2]
+  \set fingeringOrientations = #'(left)
+  <e-1>4
+  \once \set fingeringOrientations = #'(right)
+  <e-1>
+  <e-1>-"left"
 @end lilypond
 
-@item
-Lyrics above a staff must have their @code{staff-affinity} set to
-@code{DOWN} or must have their @code{alignAboveContext} property
-set in order to be properly aligned.  For more information, see
-@ruser{Placing lyrics vertically}.
 
 @item
-@code{stringTunings} property values have changed from a list of
-semitones above middle C to a list of LilyPond pitch values.
-convert-ly will handle the change automatically where the value
-of @code{stringTunings} is set to a Scheme constant value.
-
-New commands @code{makeStringTuning} and @code{contextStringTuning}
-allow the creation of string tunings in the form of a Lilypond
-chord construct.
-
-@item
-By using @code{\cueDuringWithClef}, cue notes can now also have their own
-clef, which is correctly reset at the end of the cue notes.  At the begin
-of each line, the standard clef is still displayed, but the cue clef is
-shown after the time/key signature in smaller size.
-
-@lilypond
-vI = \relative c'' { \clef "treble" \repeat unfold 40 g4 }
-\addQuote vIQuote { \vI }
-
-Solo = \relative c {
-  \clef "bass"
-  \cueDuringWithClef #"vIQuote" #DOWN #"treble" { R1 } |
-  c4 \cueDuringWithClef #"vIQuote" #DOWN #"treble" {
-    r4 r2 |
-    r4
-  } c4 c2 |
-  \cueDuringWithClef #"vIQuote" #DOWN "soprano" { R1*2 \break R1 } |
-  c1
-}
-
-\score {
-  <<
-    \new Staff \new Voice \Solo
-  >>
-}
+The alignment of dynamic spanners (hairpins, text crescendo, etc.) is now
+automatically broken if a different direction is explicitly given.
+@lilypond[fragment,quote,relative=2]
+c4_\< c c^\> c c1_\p
 @end lilypond
 
 
 @item
-Note names can be selected with a new
-@code{@bs{}language "italiano"} command, which
-can be used in safe mode.  The old
-@code{@bs{}include "italiano.ly"} syntax is
-still supported for now, but will be deprecated
-in the future.
-
-@item
-autobeaming is now disabled by @code{\cadenzaOn} and enabled by
-@code{\cadenzaOff}.  Beaming in cadenzas should be indicated manually.
-Also, if a cadenza is used in a piece with autobeaming disabled, it
-will need to be disabled again after the cadenza.
-
-@item
-The user is now able to specify the name of the predefined fretboard
-table.  This allows the use of multiple tables, with switching between them
-based on user input.
-
-@item
-The part-combiner's decision to combine/not combine notes can now be customized
-
-@lilypond[quote,relative=2]
-\partcombine
-\relative c' { c2 \partcombineApart c | \partcombineChordsOnce e' e }
-\relative c' { c2 \partcombineApart c | c c }
-@end lilypond
-
-@item
-Tablature staves show fret numbers only by default. To get the
-former style, @code{\tabFullNotation} is provided.
-
-@item
-Funk-style and Walker-style shape notes have been added.
-
-@item
-Rests will no longer keep a staff alive if @code{\RemoveEmptyStaffContext}
-is used.
-
-@item
-New option @code{-dinclude-settings=INCLUDEFILE.ly}, which causes lilypond
-to include the given file before the score is processed. This allows the
-user to change global settings without the need to change the score itself.
-That way, several different editions/version (e.g. different page sizes)
-can be generated from a file without having to modify the score for each
-version.
-
-@item
-The autobeaming settings syntax has been changed.  beatLength,
-beatGrouping, beamSettings, and measureGrouping have all been eliminated.
-Autobeaming is now controlled by baseMoment, beatStructure, and
-beamExceptions.  Default settings for each of these properties can be
-stored for any time signature in time-signature-settings, so that
-when the time signature is changed, the autobeaming will automatically
-change.  The new syntax should be much easier and require fewer
-overrides.
-
-@item
-The SVG backend has optional support for
-@uref{http://www.w3.org/Submission/WOFF, WOFF fonts}.  Using the Scheme
-option @code{-d svg-woff} together with the SVG backend selection
-@code{-d backend=svg}, produces SVG output with CSS WOFF font selection.
-
-@item
-The LilyPond G clef has been rotated 1.5 degrees clockwise for improved
-balance.  The old and new versions can be compared by looking at the
-documentation:
-@uref{http://lilypond.org/doc/v2.12/Documentation/user/lilypond/The-Feta-font.html#Clef-glyphs,
-old version},
-@uref{http://lilypond.org/doc/v2.14/Documentation/notation/the-feta-font.html#Clef-glyphs,
-new version}.
-
-
-@item
-Text crescendo spanners can now be added directly using @code{\cresc},
-@code{\dim} and @code{\decresc}.
-@lilypond[quote,relative=2]
-c4\cresc c c c\f |
-c4\dim c c c\!
-@end lilypond
-
-
-@item
-The documented syntax of @samp{lilypond} environments in the @LaTeX{}
-mode of @command{lilypond-book} has been changed to conform with
-standard @LaTeX{} syntax: options now come after the environment name:
-@example
-\begin@{lilypond@}[@var{options}] @dots{}
-@end example
-
-The previous syntax with options after @samp{\begin} is still accepted
-by @command{lilypond-book} but deprecated.  Something like
-@example
-sed -i '/begin\[/s/begin\(\[[^]]*]\)\(@{lilypond@}\)/begin\2\1/'
-@end example
-
-might do the trick for conversion.
-
-@item
-Aesthetics of shape note heads have been enhanced.  Variable line thicknesses
-have been implemented.  All note widths have been made consistent.
-Minor shape note commands that use the relative major key for scale steps
-have been added.
-
-@item
-A variant of the Segno sign is provided:
-@lilypond[quote,relative=2]
-c4 d e f \bar "S"
-g4 f e d
-@end lilypond
-
-@item
-Context modifications (@code{\with} blocks) can be stored in variables and
-inserted into contexts or other @code{\with} blocks:
-@lilypond[quote,verbatim]
-coloredheads = \with { \override NoteHead #'color = #red }
-noclef = \with { \remove "Clef_engraver" }
-\score {
-  \new Staff {
-    \new Voice \with { \coloredheads } \relative c' { c4 e g c }
-  }
-  \layout {
-    \context {
-      \Staff
-      \noclef
-    }
-  }
-}
-@end lilypond
-
-@item
-A half-open articulation was added:
-@lilypond[quote,relative=2]
-c4\halfopen
-@end lilypond
-This is sometimes used to indicate half-open hi-hats.
-
-@item
-The Unicode Bidirectional Algorithm is now fully supported for
-single-line markup due to enhanced integration with Pango.
-
-@item
-LilyPond is now licensed under the GNU GPL v3+.
-
-@item
-In tablature, frets can be indicated with labels other than numbers:
-
-@lilypond[verbatim,quote,relative=1]
-\new TabStaff
-\with {
-  stringTunings = #`(,(ly:make-pitch 1 3 NATURAL)
-                     ,(ly:make-pitch 1 1 NATURAL)
-                    ,(ly:make-pitch 0 5 NATURAL)
-                    ,(ly:make-pitch 0 3 NATURAL)
-                    ,(ly:make-pitch 0 1 NATURAL)
-                    ,(ly:make-pitch -1 5 NATURAL))
-  tablatureFormat = #fret-letter-tablature-format
-}
-\new TabVoice {
-  \set fretLabels = #`(,(markup #:with-color red "a")
-                       "b"
-                       ,(markup #:italic #:smaller "c"))
-  <f d>4. <bes>8 <g e>4
-}
-@end lilypond
-
-@item
-Layout objects can be printed over a white background, which whites-out objects
-in lower layers which lie beneath:
-
-@lilypond[verbatim,quote,relative=1]
-\time 3/4
-\override Staff.StaffSymbol #'layer = #4
-\once \override Tie #'layer = #2
-b'2.~
-\once \override Staff.TimeSignature #'whiteout = ##t
-\once \override Staff.TimeSignature #'layer = #3
-\time 5/4
-b4
-@end lilypond
-
-@item
-Chords can be repeated using the @code{q} shortcut:
-
-@lilypond[verbatim,quote,relative=2]
-<c e g>8.-^ q16 q4-^
-@end lilypond
-
-@item
-With two-sided mode, margins for odd and even pages can be set using
-@code{inner-margin} and @code{outer-margin}:
-
-@example
-\paper @{
-  two-sided = ##t
-  inner-margin = 10 \mm
-  outer-margin = 20 \mm
-@}
-@end example
-
-@item
-Paper margin defaults, as specified in @file{ly/paper@/-defaults-init.ly}, apply
-to the default paper size (a4) and are automatically scaled according to the
-paper size chosen.
-
-@item
-All combinations of @code{left-margin}, @code{right-margin} and
-@code{line-width} work now.  There is no more need to set @code{line-width}
-manually unless you explicitly want to.
-
-@item
-Support for using an alternative music font, such as Gonville, is now
-added.
-
-@item
-In addition to the existing @code{\hspace} markup command,
-a new @code{\vspace} command has been added to provide an easy
-and flexible way to add vertical space in markups.
-
-@item
-The direction of manual beams can be set with @code{^[} and @code{_[}.
-
-@item
-A version of the breve note head has been added with two vertical lines on each side.
-@lilypond[quote,relative=2]
-\time 4/2
-\override Staff.NoteHead #'style = #'altdefault
-c\breve | b\breve
-@end lilypond
-
-@item
-Instrument names and vocal names now take into account the extent of
-system start delimiters in other staves for their positioning,
-resulting in improved default alignment for left-, center- and
-right-aligned names.
-@lilypond[quote,indent=18\mm]
-<<
-  \new StaffGroup <<
-    \new GrandStaff <<
-      \new Staff {
-        \set Staff.instrumentName = #"Piccolo"
-        c''1
-      }
-      \new Staff {
-        \set Staff.instrumentName = #"Flute"
-        c''1
-      }
-    >>
-    \new Staff {
-      \set Staff.instrumentName = #"Bassoon"
-      \clef tenor
-      c'1
-    }
-  >>
-  \new PianoStaff <<
-    \set PianoStaff.instrumentName = #"Piano"
-    \context Staff = "up" {
-      c'1
-    }
-    \context Staff = "down" {
-      \clef bass
-      c1
-    }
-  >>
->>
-@end lilypond
-
-@item
-Braces in markup can now be selected by point size using the markup commands
-@code{\left-brace} and @code{\right-brace}.
-@lilypond[quote]
-\markup {
-  \left-brace #35
-  \hspace #2
-  \right-brace #45
-}
-@end lilypond
-
-@item
-Intermediate .ps files which are created by LilyPond
-during compilation are now deleted by default.  To keep them,
-add the following line to your input files:
-@example
-#(ly:set-option 'delete-intermediate-files #f)
-@end example
-
-@item
-Dashed and dotted slurs, phrasing slurs, and ties
-have been made variable thickness, and
-partially dashed slurs are now available:
-@lilypond[quote,relative=2]
-\slurDashed
-c4( d e f) |
-\slurDotted
-g4( f e d) |
-\slurHalfDashed
-c4( d e f)
-@end lilypond
-
-@item
-An eyeglasses markup was added, indicating strongly to look at the
-conductor for instructions:
-@lilypond[quote,relative=2]
-\mark \markup { \eyeglasses }
-c4_\markup { \eyeglasses }
+Appoggiaturas and acciaccaturas now also work inside a slur, not only inside
+a phrasing slur. Also, a function @code{\slashedGrace} was added that does
+does not use a slur from the acciaccatura note.
+@lilypond[fragment,relative=2]
+c4( \appoggiatura e8 d4 \acciaccatura e8 d4 \slashedGrace e8 c4)
 @end lilypond
 
-@item
-A snap-pizzicato (also known as Bartok-pizzicato) articulation was added:
-@lilypond[quote,relative=2]
-c4\snappizzicato
-@end lilypond
 
 @item
-Tuplet number formatting functions are now available to print other fractions
-and to add notes to the number or fraction:
-@lilypond[quote,relative=2]
-\once \override TupletNumber #'text =
-  #(tuplet-number::non-default-tuplet-denominator-text 7)
-\times 2/3 { c4. c4. c4. c4. }
-
-\once \override TupletNumber #'text =
-  #(tuplet-number::non-default-tuplet-fraction-text 12 7)
-\times 2/3 { c4. c4. c4. c4. }
-\once \override TupletNumber #'text =
-  #(tuplet-number::append-note-wrapper
-    (tuplet-number::non-default-tuplet-fraction-text 12 7) "8")
-\times 2/3 { c4. c4. c4. c4. }
-
-\once \override TupletNumber #'text =
-  #(tuplet-number::append-note-wrapper tuplet-number::calc-denominator-text "4")
-\times 2/3 { c8 c8 c8 c8 c8 c8 }
-\once \override TupletNumber #'text =
-  #(tuplet-number::append-note-wrapper tuplet-number::calc-fraction-text "4")
-\times 2/3 { c8 c8 c8 c8 c8 c8 }
-
-\once \override TupletNumber #'text =
-  #(tuplet-number::fraction-with-notes "4." "8")
-\times 2/3 { c4. c4. c4. c4. }
-\once \override TupletNumber #'text =
-  #(tuplet-number::non-default-fraction-with-notes 12 "8" 4 "4")
-\times 2/3  { c4. c4. c4. c4. }
+To suppress the line on a crescendo text spanner (and other similar spanners),
+LilyPond now fully supports the @code{#'style = #'none} property.
+@lilypond[fragment,quote,relative=2]
+\override DynamicTextSpanner #'style = #'none
+c4\cresc c c g, c'\p
 @end lilypond
 
-@item
-FretBoards now have a chordChanges property to keep repeated FretBoard objects
-from being typeset.
 
 @item
-The vertical spacing engine has been drastically changed, making
-it more flexible and easier to control.
-The spacing between staves within a system can now change
-to better use the space on the page.
-User-defined contexts may participate in this flexible spacing,
-depending on how their @code{staff-affinity} is defined.
-Some page formatting variables (@code{page-top-space},
-@code{between-system-space -padding}, and
-@code{before- between- after-title-space}) have been replaced
-by flexible vertical dimensions.
+Glissandi can now span multiple lines.
 
 @end itemize
 
-
-
 @ifhtml
 For older news, go to
+@uref{http://lilypond.org/doc/v2.14/Documentation/changes/},
 @uref{http://lilypond.org/doc/v2.12/Documentation/topdocs/NEWS.html},
-@uref{http://lilypond.org/doc/v2.10/Documentation/topdocs/NEWS.html},
 or @uref{../,go back} to the Documentation index.
 
 
index 11bae886e4613c31e968b31deb11a3cc2aa51268..ab45cbaf32cbd4fdd1af09c603977dd5b8ede136 100644 (file)
@@ -197,8 +197,8 @@ UNTRANSLATED NODE: IGNORE ME
 @macro imageClickable{IMAGE-FILE, EXT, MORE-TEXT, CLICK-FILE, CLICK-EXT, POSITION}
 @html
 <div class="float-\POSITION\">
-  <a class="clickable" href="../pictures/\CLICK-FILE\.\CLICK-EXT\">
-    <img src="../pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
+  <a class="clickable" href="pictures/\CLICK-FILE\.\CLICK-EXT\">
+    <img src="pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
   </a>
   <p style="text-align: center">
     \MORE-TEXT\
@@ -215,7 +215,7 @@ UNTRANSLATED NODE: IGNORE ME
 
 @macro imageFloat{IMAGE-FILE, EXT, POSITION}
 @html
-<img class="float-\POSITION\" src="../pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
+<img class="float-\POSITION\" src="pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
 @end html
 @iftex
 @image{pictures/\IMAGE-FILE\,,,\IMAGE-FILE\,\EXT\}
@@ -228,7 +228,7 @@ UNTRANSLATED NODE: IGNORE ME
 @macro imageId{ID, IMAGE-FILE, EXT, ALT}
 @html
 <div id="\ID\">
-  <img src="../pictures/\IMAGE-FILE\.\EXT\" alt="\ALT\">
+  <img src="pictures/\IMAGE-FILE\.\EXT\" alt="\ALT\">
 </div>
 @end html
 @iftex
index 7eb43e32a56c6cfb299e7e9f8d09524d4dcd23d6..e64fa1673ae6b6242671746e8f4a1d9d0518ab87 100644 (file)
@@ -335,7 +335,7 @@ for normal contributors or developers.
 
 @smallexample
 scripts/auxiliar/fixcc.py \
-  fixcc $(find flower lily -name '*cc' -o -name '*hh' | grep -v /out)
+  $(find flower lily -name '*cc' -o -name '*hh' | grep -v /out)
 @end smallexample
 
 
@@ -1679,6 +1679,16 @@ We create lots of extra grobs (eg. a BarNumber at every bar line) but
 most of them are not drawn.  See the break-visibility property in
 item-interface.
 
+Here is another e-mail exchange.  Janek Warchoł asked for a starting point
+to fixing 1301 (change clef colliding with notes).  Neil Puttock replied:
+
+The clef is on a loose column (it floats before the head), so the
+first place I'd look would be lily/spacing-loose-columns.cc (and
+possibly lily/spacing-determine-loose-columns.cc).
+I'd guess the problem is the way loose columns are spaced between
+other columns: in this snippet, the columns for the quaver and tuplet
+minim are so close together that the clef's column gets dumped on top
+of the quaver (since it's loose, it doesn't influence the spacing).
 
 @node Info from Han-Wen email
 @subsection Info from Han-Wen email
index ec31472083d65e176c7453ba73fd8ec9c2798ccf..ad6daf63404355e7328fec3f68b795c7a69a1c03 100644 (file)
@@ -309,6 +309,15 @@ previous contributors in:
 Documentation/included/authors.itexi
 @end example
 
+Also, delete old material in:
+
+@example
+Documentation/changes.tely
+@end example
+
+but don't forget to check it still compiles!  also update the
+version numbers.
+
 @item
 Website:
 
index 547a990c81b50c649d79f4c01989651f207cf191..23b0658066621c0501e64c704a23ae816924c5f4 100644 (file)
@@ -159,7 +159,7 @@ SMDL.  With a short  example that is quite  lengthy in SMDL}
   volume = 17,
   number = 3,
   note = {A categorisation of music representation systems (languages,
-OO systems etc) splitted into high level and low level expressiveness.
+OO systems etc) split into high level and low level expressiveness.
 The discussion of Charm and parallel processing for music
 representation is rather vague. HWN}
 }
index 72ca39e83d01a25f17d90614e10513c50fa8dae6..71865e7788d009dbe7bfe55f25f539128fb3cf39 100644 (file)
@@ -35,7 +35,8 @@ expressions automatically, and can be used to greatly simplify the
 input file.
 
 @menu
-* Music function syntax::
+* Music function definitions::
+* Music function usage::
 * Simple substitution functions::
 * Intermediate substitution functions::
 * Mathematics in functions::
@@ -44,10 +45,10 @@ input file.
 @end menu
 
 
-@node Music function syntax
-@subsection Music function syntax
+@node Music function definitions
+@subsection Music function definitions
 
-The general form for music functions is:
+The general form for defining music functions is:
 
 @example
 function =
@@ -67,17 +68,7 @@ where
 @item @code{@var{typeN?}}
 @tab a scheme @emph{type predicate} for which @code{@var{argN}}
 must return @code{#t}.  Some of these predicates are specially
-recognized by the parser, making the respective values be read in
-Lilypond syntax rather than in Scheme syntax.  Currently these are
-@code{ly:music?}, @code{markup?}, @code{ly:pitch?}, and
-@code{ly:duration?}.  Not all combinations are allowed: i.e., you can't
-look for a duration after music since music may end @emph{optionally}
-with a duration.
-
-If you really want to input some of those items as a Scheme rather than
-a Lilypond expression, you may wrap them in a call of @code{ly:export}.
-@c TODO: document what kind of argument lists are permitted in what
-@c syntactical context of a music function call.
+recognized by the parser, see below.
 
 @item @code{@var{music}}
 @tab A music expression, optionally written in scheme, with any
@@ -90,10 +81,20 @@ function arguments (eg., @w{@samp{$(cons arg1 arg2)}}).
 @end multitable
 
 @noindent
-For a list of available type predicates, see
-@ruser{Predefined type predicates}.  User-defined type predicates
-are also allowed.
+Some type predicates are specially recognized by the parser and will
+make the parser look for the respective arguments in Lilypond syntax
+rather than in Scheme syntax.  Currently these are @code{ly:music?},
+@code{markup?}, @code{ly:pitch?}, and @code{ly:duration?}.
+
+If you really want to input one of those items as a Scheme rather than a
+Lilypond expression, you may write them as a Scheme expression that
+calls @code{ly:export} at its outermost level.
+
+Other type predicates, including user-defined ones, will make the
+respective argument only be accepted as a Scheme expression.
 
+For a list of available type predicates, see
+@ruser{Predefined type predicates}.
 
 @seealso
 
@@ -106,6 +107,48 @@ Installed Files:
 @file{scm/lily.scm}.
 
 
+@node Music function usage
+@subsection Music function usage
+Music functions may currently be used in three places.  Depending on
+where they are used, restrictions apply in order to be able to parse
+them unambiguously.  The result a music function returns must be
+compatible with the context in which it is called.
+
+@itemize
+@item
+At top level in a music expression.  There are no special restrictions
+on the argument list.  Using the @code{#@{}@dots{}@code{#@}} construct
+produces a sequential music expression and consequently can only applied
+in this context.
+
+@item
+As a post-event.  All trailing arguments of the music function with the
+predicate @code{ly:music?} will get parsed also as post-events.  Note
+that returning post-events will also be acceptable for music functions
+called at top level, leading to a result roughly equivalent to
+@example
+s 1*0-\fun
+@end example
+
+@item
+As a chord constituent.  All trailing arguments of the music function
+with the predicate @code{ly:music?} will get parsed also as chord
+constituents.
+@end itemize
+
+@noindent
+The special rules for trailing arguments make it possible to write
+polymorphic functions like @code{\tweak} that can be applied to
+different constructs.
+
+There is another somewhat special rule: if you have a predicate
+@code{ly:music?} directly before a @code{ly:duration?} predicate, then
+the corresponding music expression must be either a music identifier, or
+literal sequential or parallel music enclosed in
+@code{@{}@dots{}@code{@}} or @code{<<}@dots{}@code{>>} explicitly.
+Otherwise, Lilypond could get confused about where the music ends and
+the duration starts.
+
 @node Simple substitution functions
 @subsection Simple substitution functions
 
index 888758007e8e785f8a0dadbf70773b2316dba471..485babb114bd9f152dcfb5abb083feb7882eb442 100644 (file)
@@ -2091,7 +2091,7 @@ passage musical.  L'extension s'étend depuis la commande
 @code{\startTextSpan} jusqu'à la commande @code{\stopTextSpan} et le
 format de texte est défini par la commande @code{\override TextSpanner}.
 Pour de plus amples détails, voir
-@ruser{Indication textuelle avec ligne d’extension}.
+@ruser{Indication textuelle avec extension}.
 
 Il montre aussi comment créer des marques d'octaviation.
 
index 05bb50dad769d0a2b0a237e5e7c7fc3664f12f4d..2bdd9ecf4c0b2054789193a55440d5bcc6902507 100644 (file)
@@ -458,7 +458,7 @@ deux.
 @translationof Changing context default settings
 
 Les réglages montrés dans les sous-sections
-@ref{La commande de fixation  (set)},
+@ref{La commande de fixation (set)},
 @ref{Modification des greffons de contexte}
 @c et @c r ef{Retouches de mise en forme au sein des contextes}
 peuvent également être saisis indépendamment de la musique dans le bloc
@@ -1118,7 +1118,7 @@ Le graveur Fingering_engraver fait partie des contextes@tie{}: @dots{}
 
 
 @node La commande de fixation (set)
-@subsection La commande @code{@bs{}set}
+@subsection La commande de fixation @code{@bs{}set}
 @translationof The set command
 
 @cindex propriétés
@@ -1250,7 +1250,7 @@ Translation @expansion{} Tunable context properties.
 
 
 @node La commande de dérogation (override)
-@subsection La commande @code{@bs{}override}
+@subsection La commande de dérogation @code{@bs{}override}
 @translationof The override command
 
 
@@ -1314,7 +1314,7 @@ propriétés causant des désagréments.
 
 
 @node La commande d'affinage (tweak)
-@subsection La commande @code{@bs{}tweak}
+@subsection La commande d'affinage @code{@bs{}tweak}
 @translationof The tweak command
 
 
index 3724d56c74df4f43740990c6de4c98292fecbd22..0031d5109a4997a84c1892fbec6026dc833e2643 100644 (file)
@@ -308,7 +308,8 @@ grâce à la commande @code{\parenthesize} décrite dans
 @ref{Parenthèses}. Cependant, le mode @code{\drummode} n'inclut pas par
 défaut le graveur @code{Parenthesis_engraver} qui permet d'imprimer ces
 signes.  Il faut donc l'ajouter explicitement dans la définition du
-contexte, suivant la manœuvre indiquée dans @ref{La commande set}.
+contexte, suivant la manœuvre indiquée dans 
+@ref{La commande de fixation (set)}.
 
 @lilypond[quote,ragged-right,verbatim]
 \new DrumStaff \with {
index 91a1e36faecf3a5e03a76ce287b30079cb47bd6f..9b1796b10ee93ccb3500459e1c30ae9be22cf42a 100644 (file)
@@ -1123,7 +1123,7 @@ affacteront la mise en forme de la partition.
 La fonction @code{layout-set-staff-size} fait l'objet de la rubrique
 suivante, @ref{Définition de la taille de portée}.  La modification des
 contextes est abordée dans d'autres chapitres -- voir
-@ref{Modification des propriétés d'un contexte} et
+@ref{Modification des greffons de contexte} et
 @ref{Modification des réglages par défaut d'un contexte}.  Les variables
 du bloc @code{\paper} que l'on peut retrouver dans un bloc
 @code{\layout} sont@tie{}:
index bd3f5afc64c1750fa16b481f5c8f5678d71f19cb..d6f08b51ea43b6707a2be2261d106b3e5ce4102c 100644 (file)
@@ -3162,7 +3162,7 @@ Manuel de notation :
 @ref{Notations anciennes},
 @ref{Barres de mesure},
 @ref{Modification des greffons de contexte},
-@ref{Typesetting Gregorian chant},
+@c r e f{Typesetting Gregorian chant}, ***A VENIR
 @ref{Musique sans métrique},
 @ref{Visibilité des objets}.
 
@@ -3334,11 +3334,11 @@ Manuel de notation :
 @unnumberedsubsubsec Mesure incomplète et musique liturgique
 @translationof Partial measures in hymn tunes
 
-Il arrive fréquemment que les chants liturgiques coportent des mesures
+Il arrive fréquemment que les chants liturgiques comportent des mesures
 incomplètes aussi bien en début qu'en fin de ligne, de telle sorte qu'à
 une portée corresponde une ligne de texte.  Ceci requiert donc
 l'utilisation de la commande @code{\partial} en début de partition et
-d'une commande @code{\bar@tie{}"|"} ou @code{\baràtie{}"||"} à la fin de
+d'une commande @code{\bar@tie{}"|"} ou @code{\bar@tie{}"||"} à la fin de
 chaque ligne.
 
 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
index 889c3432ab261a8d83e0948f1d3b61f46ea8e02c..6ef52e644c8be4f705dea620dab238198ec5fea5 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-    Translation of GIT committish: d4db4930cfb89a8d2f4bfa36e99e81710fa09caa
+    Translation of GIT committish: 02cc634b92fdce39d054ce787dcaa7c0338a11b0
 
     When revising a translation, copy the HEAD committish of the
     version that you are working on.  See TRANSLATION for details.
@@ -8,11 +8,11 @@
 <form action="http://google.com/search"
       method="get"
       name="search"
-      onSubmit="search.q.value='site:lilypond.org +v2.12 '
+      onSubmit="search.q.value='site:lilypond.org +v2.14 '
                + search.brute_query.value"
-      onMouseMove="search.q.value='site:lilypond.org +v2.12 '
+      onMouseMove="search.q.value='site:lilypond.org +v2.14 '
                   + search.brute_query.value"
-      onKeyUp="search.q.value='site:lilypond.org +v2.12 '
+      onKeyUp="search.q.value='site:lilypond.org +v2.14 '
               + search.brute_query.value">
   <input type="hidden" name="btnG" value="Recherche sur Google">
   <input type="text" name="brute_query" onfocus="this.value=''" value="Rechercher">
index 92ff692ba813c3b9417f20507c639b102143a3a0..a912115d902856e5b1f97b27553bb8c2fbe8aaa8 100644 (file)
@@ -1,7 +1,7 @@
 %% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
   texidocit = "
 Questo modello molto semplice mette a disposizione un rigo con delle note ed è
-quindi adatto per uno strumento non accompagnato o per un frammento 
+quindi adatto per uno strumento non accompagnato o per un frammento
 melodico. Copialo e incollalo in un file, aggiungi le note e hai finito!
 
 "
index 1e75f54aa762fd41335189c8f993ff349cad335d..6814aafed73b77435468900be865f84cf339a508 100644 (file)
@@ -1445,9 +1445,9 @@ sub remove_unneeded_anchor($)
   for ($i = 0; $i < @hrefsplit; $i++) {
     $item = @hrefsplit[$i];
     if ($item =~ /#/) {
-      @splitted = split(".html#", $item);
-      if (@splitted[0] eq @splitted[1]) {
-        @hrefsplit[$i] = @splitted[0] . ".html";
+      @split = split(".html#", $item);
+      if (@split[0] eq @split[1]) {
+        @hrefsplit[$i] = @split[0] . ".html";
       }
     }
   }
index 7f1bb0f0a0b790d8c051b4f97b2d947ad6968797..1b7614fa952f0b563632f3e279f63f705221bcc5 100644 (file)
@@ -3622,33 +3622,35 @@ Notation Reference:
 
 @cindex slurs, modifying
 @cindex ties, modifying
-@cindex Bézier curves
-@cindex Bézier control points
-
-Ties, slurs and phrasing slurs are drawn as third-order Bézier
-curves.  If the shape of the tie or slur which is calculated
-automatically is not optimum, the shape may be modified manually by
-explicitly specifying the four control points required to define
-a third-order Bézier curve.
-
-Third-order or cubic Bézier curves are defined by four control
-points.  The first and fourth control points are precisely the
-starting and ending points of the curve.  The intermediate two
-control points define the shape.  Animations showing how the curve
-is drawn can be found on the web, but the following description
-may be helpful.  The curve starts from the first control point
-heading directly towards the second, gradually bending over to
-head towards the third and continuing to bend over to head towards
-the fourth, arriving there travelling directly from the third
-control point.  The curve is entirely contained in the
-quadrilateral defined by the four control points.
-
-Here is an example of a case where the tie is not optimum, and
-where @code{\tieDown} would not help.
+@cindex Bézier curves, control points
+@cindex control points, Bézier curves
+
+If the shape of the tie or slur which is calculated automatically is not
+optimum, the shape may be modified manually by explicitly specifying the
+control points required to define the curve needed.
+
+Ties, slurs and phrasing slurs are drawn as @q{third-order} Bézier
+curves which are are defined by four control points.  The first and
+fourth control points are the start and end points of the curve
+respectively, and the two intermediate control points define the
+overall shape.
+
+Animations showing how the curve is drawn can be found on the web, but
+the following description may be helpful.  The curve starts from the
+first control point moving towards the second.  As the curve nears and
+passes through the second control point it begins to arc towards the
+third.  The curve continues on towards the the third control point,
+again starting to arc as it nears and passes through the third so as to
+finish the curve smoothly at the fourth and final control point.  The
+whole curve is contained in the quadrilateral defined by the four
+control points.
+
+Here is an example of a case where the tie is not optimum (and where the
+@code{\tieDown} command would not help).
 
 @lilypond[verbatim,quote,relative=1]
 <<
-  { e1 ~ e }
+  { e1~ e }
 \\
   { r4 <g c,> <g c,> <g c,> }
 >>
@@ -3681,23 +3683,24 @@ to which the start of the tie (or slur) is attached.
   {
     \once \override Tie
       #'control-points = #'((1 . -1) (3 . 0.6) (12.5 . 0.6) (14.5 . -1))
-     e1 ~ e1
+     e1 ~ e
   }
 \\
-  { r4 <g c,> <g c,> <g c,> }
+  { r4 <g c,> <g c,> <g c,> }
 >>
 @end lilypond
 
 @knownissues
-
 It is not possible to modify shapes of ties or slurs by changing
-the @code{control-points} property if there are more than one at
-the same musical moment, not even by using the @code{\tweak}
-command.  However, the @code{tie-configuration} property of
-@code{TieColumn} can be overridden to set start line and direction
-of ties as required.
-
+the @code{control-points} property if there are multiple ties or slurs
+at the same musical moment -- the @code{\tweak} command will also not
+work in this case.  However, the @code{tie-configuration} property of
+@code{TieColumn} can be overridden to set start line and direction as
+required.
 
+@seealso
+Internals Reference:
+@rinternals{TieColumn}.
 
 
 @node Using music functions
index b8339a02d77aeee4e94ca053855def242d8222b6..6d97c9957ef8bb9f14e593346868b80a0d77ce17 100644 (file)
@@ -1832,19 +1832,20 @@ Here are a few sample bars of music set in LilyPond's Feta font:
 
 Download and extract the zip file.  Copy the @code{lilyfonts}
 directory to @file{@var{SHARE_DIR}/lilypond/current}; for more
-information, see @rlearning{Other sources of information}.
-Move the existing @code{fonts} directory to @code{fonts_orig} and
-move the @code{lilyfonts} directory to @code{fonts}.  Simply move
-@code{fonts_orig} back to @code{fonts} to revert back to Feta.
+information, see @rlearning{Other sources of information}.  Rename the
+existing @code{fonts} directory to @code{fonts_orig} and the
+@code{lilyfonts} directory to @code{fonts}.  To revert back to Feta,
+reverse the process.
 
 @seealso
 Learning Manual: @rlearning{Other sources of information}.
 
 @knownissues
-
-Gonville cannot be used to typeset @q{Ancient Music} notation.  Please
-refer to the author's website for more information on this and other
-specifics including licensing of Gonville.
+Gonville cannot be used to typeset @q{Ancient Music} notation and it is
+likely newer glyphs in later releases of LilyPond may not exist in the
+Gonville font family.  Please refer to the author's website for more
+information on these and other specifics, including licensing of
+Gonville.
 
 
 @node MIDI output
index f62b210353465010649453db1dc29bb8f33dfb7e..ef294318fbc5201e8a2b02329e12f4511d555d15 100644 (file)
@@ -247,8 +247,7 @@ Internals Reference:
 
 @knownissues
 Beam collision avoidance does not work for automatic beams that end
-right before a change in staff. To make the latter work, use manual
-beaming.
+right before a change in staff.  In this case use manual beams.
 
 
 @node Changing staff automatically
index 66a907f7096c49ddce8ae0bbb21ea7896d89f563..ded7f6e624c2e67ed63968731f8666e6b0e4e30a 100644 (file)
@@ -30,6 +30,7 @@
 * All context properties::
 * Layout properties::
 * Available music functions::
+* Context modification identifiers::
 * Predefined type predicates::
 * Scheme functions::
 @end menu
@@ -1375,6 +1376,13 @@ Internals Reference:
 
 @include identifiers.tely
 
+@node Context modification identifiers
+@appendixsec Context modification identifiers
+
+The following commands are defined for use as context modifications
+within a @code{\layout} or @code{\with} block.
+
+@include context-mod-identifiers.tely
 
 @node Predefined type predicates
 @appendixsec Predefined type predicates
index 71d81fb01befdd8eacac9a526570895eaad3320e..124bdefe78989a24a3d7cca879ac44476cf2e441 100644 (file)
@@ -496,9 +496,9 @@ make up the total number of repeats.
 c1
 @end lilypond
 
-If there are more alternate endings than repeats then the first
-alternatives are applied, LilyPond will ignore the remaining
-alternatives which will not be printed.
+If there are more alternate endings than repeats then only the first
+alternatives are applied.  The remaining alternatives will be ignored
+and not printed.
 
 @lilypond[verbatim,quote,relative=2]
 \repeat unfold 2 { c4 d e f }
index 5344ab2b866ba8181d93084f9df01c385740487b..b4e471f7b09233c22d62a24c6ffe5cfc72346e7f 100644 (file)
@@ -1292,9 +1292,7 @@ oboeNotes = \relative c'' {
 @end lilypond
 
 @noindent
-In the above example, the @code{Voice} context had to be
-explicitly declared, or else the entire music expression would
-belong to the @code{CueVoice} context.
+
 
 It is possible to adjust which aspects of the music are quoted with
 @code{\cueDuring} by setting the @code{quotedCueEventTypes}
@@ -1303,6 +1301,10 @@ tie-event beam-event tuplet-span-event)}, which means that only
 notes, rests, ties, beams and tuplets are quoted, but not
 articulations, dynamic marks, markup etc.
 
+In this example, the @code{Voice} context must be
+explicitly declared, or else the entire music expression would
+belong to the @code{CueVoice} context.
+
 @lilypond[verbatim,quote]
 oboeNotes = \relative c'' {
   r2 r8 d16(\f f e g f a)
index b80f64472949b3935b050426bb98ec37c74292af..7b5cceb19b129777aa238bbfc878120868d42b0b 100644 (file)
@@ -4,7 +4,7 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.15.2"
+\version "2.15.7"
 
 \header {
   lsrtags = "keyboards"
index 2f9a611f7221c46973b0a388a3fb68a2c3b2bb9b..1c031725ff39d27bda829874526e82902274503e 100644 (file)
@@ -4,7 +4,7 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.15.2"
+\version "2.15.7"
 
 \header {
   lsrtags = "chords"
index bbcfee353afc34ff4a84c38866c1c9f27222ca29..7fdcb5b2f9da1eb53034f4bc651236f47190952d 100644 (file)
@@ -4,7 +4,7 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.15.2"
+\version "2.15.7"
 
 \header {
   lsrtags = "rhythms, percussion"
index 5749977d07af4aa22281d674dd43a0d2b49c6019..8557a8a611550ca45e37d030641e6da06f9723d3 100644 (file)
@@ -4,7 +4,7 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.15.2"
+\version "2.15.7"
 
 \header {
   lsrtags = "staff-notation, vocal-music"
index 9af86f0ff48bc5989d211f8f15026c156c377cd3..6e84c4050af681dfac664800cd6c4fc00db57532 100644 (file)
@@ -4,7 +4,7 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.15.2"
+\version "2.15.7"
 
 \header {
   lsrtags = "ancient-notation"
index 37037111bc000787fdd1e435ef373bd4990ccd20..d350b6907f817c30e554fcc527c8de0285e9fd76 100644 (file)
@@ -7,21 +7,8 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
-  texidocit = "
-Questo esempio mostra come realizzare una trascrizione moderna di musica
-gregoriana. La musica gregoriana non presenta suddivisione in misure né gambi;
-utilizza soltanto le teste della minima e della semiminima, e dei segni
-appositi che indicano pause di diversa lunghezza.
-
-"
-  doctitleit = "Modello per notazione antica -- trascrizione moderna di musica gregoriana"
-
   lsrtags = "vocal-music, ancient-notation, template"
 
-
-
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
 Este ejemplo muestra cómo hacer una transcripción moderna de canto
@@ -33,6 +20,16 @@ especiales que indican silencios de distintas longitudes.
 
   doctitlees = "Plantilla para notación de música antigua (transcripción moderna de canto gregoriano)"
 
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Questo esempio mostra come realizzare una trascrizione moderna di musica
+gregoriana. La musica gregoriana non presenta suddivisione in misure né gambi;
+utilizza soltanto le teste della minima e della semiminima, e dei segni
+appositi che indicano pause di diversa lunghezza.
+
+"
+  doctitleit = "Modello per notazione antica -- trascrizione moderna di musica gregoriana"
+
 %% Translation of GIT committish: 0a868be38a775ecb1ef935b079000cebbc64de40
 
   texidocde = "
index df5e844eb1e1c97992b8e0eea95e90b99bf91334..b298e1c0add1d1c9f88f8c1a9f400cdb33b328dd 100644 (file)
@@ -7,24 +7,8 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
-  texidocit = "
-Quando si trascrive musica mensurale, può essere utile inserire all'inizio del
-pezzo un incipit che indichi l'intonazione e il tempo originali. Le stanghette
-di battuta, a cui i musicisti di oggi sono abituati e che aiutano a riconoscere
-più velocemente gli schemi ritmici, durante l'epoca della musica mensurale non
-erano ancora state introdotte; infatti il metro cambiava spesso ogni poche
-note.  Come compromesso, le stanghette vengono spesso inserite tra i righi
-invece che al loro interno.
-
-"
-  doctitleit = "Modello per notazione antica -- trascrizione moderna di musica mensurale"
-
   lsrtags = "ancient-notation, template"
 
-
-
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
 Al transcribir música mensural, es útil un «incipit» al compienzo
@@ -41,6 +25,19 @@ encima de ellos.
   doctitlees = "Plantilla de notación de música antigua (transcripción moderna de música mensural)"
 
 
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Quando si trascrive musica mensurale, può essere utile inserire all'inizio del
+pezzo un incipit che indichi l'intonazione e il tempo originali. Le stanghette
+di battuta, a cui i musicisti di oggi sono abituati e che aiutano a riconoscere
+più velocemente gli schemi ritmici, durante l'epoca della musica mensurale non
+erano ancora state introdotte; infatti il metro cambiava spesso ogni poche
+note.  Come compromesso, le stanghette vengono spesso inserite tra i righi
+invece che al loro interno.
+
+"
+  doctitleit = "Modello per notazione antica -- trascrizione moderna di musica mensurale"
+
 %% Translation of GIT committish: 0a868be38a775ecb1ef935b079000cebbc64de40
   texidocde = "
 Bei der Transkription von Mensuralmusik ist es oft erwünscht, ein
index 0333c1af76446ee47578291afb5353dcc4a052ff..e40f8c06d89743cc391b155a5c7410ab6331f8eb 100644 (file)
@@ -7,7 +7,9 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: c3b519f0dd5ff0f8ccfc9a39ed1fe8df8b43741c
+  lsrtags = "vocal-music, template"
+
+%% Translation of GIT committish: b1bebb842d9762894fc7b2a178e2bdfcd544419f
   texidoces = "
 Esta plantilla muestra una forma de preparar un cántico salmódico
 anglicano.  También muestra cómo se pueden añadir estrofas adicionales
@@ -17,8 +19,7 @@ codifican en estilos diferentes para ilustrar más posibilidades.
 "
   doctitlees = "Plantilla de salmo del canto anglicano"
 
-
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
   texidocit = "
 Questo modello presenta un modo di impostare un salmo anglicano.  Mostra
 anche come le strofe possono essere aggiunte come testo separato al di sotto
@@ -28,11 +29,6 @@ le varie possibilità.
 "
   doctitleit = "Modello per salmo anglicano"
 
-  lsrtags = "vocal-music, template"
-
-
-
-
 %% Translation of GIT committish: 144cd434d02e6d90b2fb738eeee99119a7c5e1d2
 
   texidocde = "
index 0107eb535257b30adcd072a56e44cccfa201b6ff..9bc14d13a0d9bb2bb9aef96d7a21414b0553435d 100644 (file)
@@ -4,7 +4,7 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.15.2"
+\version "2.15.7"
 
 \header {
   lsrtags = "fretted-strings, tweaks-and-overrides"
index 78de4305ffdf926f7f4aa348ce0001fd080c968d..8ef9a3bcd7da04596d688cca25366d0c7c02cf37 100644 (file)
@@ -4,7 +4,7 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.15.2"
+\version "2.15.7"
 
 \header {
   lsrtags = "midi"
index 4306b711c167dcfa8ff2590ca4f424374f0c8ca7..f39d3fd353ae156ee8773033d24f7a11ae211a46 100644 (file)
@@ -47,7 +47,7 @@ le second la direction (1 pour haut, @minus{}1 pour bas).
   texidoc = "
 Ties may be engraved manually by changing the @code{tie-configuration}
 property of the @code{TieColumn} object. The first number indicates the
-distance from the center of the staff in staff-spaces, and the second
+distance from the center of the staff in half staff-spaces, and the second
 number indicates the direction (1 = up, -1 = down).
 
 "
@@ -55,9 +55,9 @@ number indicates the direction (1 = up, -1 = down).
 } % begin verbatim
 
 \relative c' {
-  <c e g>2 ~ <c e g>
+  <c e g>2~ <c e g>
   \override TieColumn #'tie-configuration =
     #'((0.0 . 1) (-2.0 . 1) (-4.0 . 1))
-  <c e g>2 ~ <c e g>
+  <c e g>2~ <c e g>
 }
 
index bbd0a9aa1825ef1c9d3a0e969a9f66c7fe002ee2..6bb2890870b38eb663ae35f8192c9f8738b029a2 100644 (file)
@@ -4,7 +4,7 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.15.2"
+\version "2.15.7"
 
 \header {
   lsrtags = "expressive-marks"
index 378295056f2b05953c79a09a173653fd751464d5..d0e43a26a0e7afa44a058cc2b4506648a4d504e9 100644 (file)
@@ -7,20 +7,8 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
-  texidocit = "
-Il codice seguente presenta un modo di impostare un inno in cui ogni verso
-inizia e finisce con una misura parziale.  Mostra anche come aggiungere delle
-strofe come testo separato sotto la musica.
-
-"
-  doctitleit = "Modello per inno"
-
   lsrtags = "vocal-music, template"
 
-
-
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
   Este fragmento de código muestra una forma de preparar un himno cuando
@@ -30,6 +18,15 @@ añadir los versos como texto independiente debajo de la música.
 "
 
   doctitlees = "Plantilla para himnos"
+
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Il codice seguente presenta un modo di impostare un inno in cui ogni verso
+inizia e finisce con una misura parziale.  Mostra anche come aggiungere delle
+strofe come testo separato sotto la musica.
+
+"
+  doctitleit = "Modello per inno"
 %%    Translation of GIT committish: ab9e3136d78bfaf15cc6d77ed1975d252c3fe506
 
   texidocde = "
index adfa2a46984195a740a6bf9e8135c14314f65aa6..c6839e5a8293a43c6cec696ce7eed943c3a4889d 100644 (file)
@@ -4,24 +4,11 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.15.2"
+\version "2.15.7"
 
 \header {
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
-  texidocit = "
-Ecco un modello piuttosto complesso, per un gruppo jazz. Si noti che tutti
-gli strumenti sono in @code{\\key c \\major}. Si tratta della tonalità
-reale; sarà trasposta automaticamente includendo la
-musica all'interno di una sezione @code{\\transpose}.
-
-"
-  doctitleit = "Modello per combo jazz"
-
   lsrtags = "keyboards, percussion, fretted-strings, template"
 
-
-
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
 Ésta es una plantilla bastante avanzada, para un conjunto de
@@ -34,6 +21,16 @@ dentro de una sección @code{\\transpose}.
   doctitlees = "Plantilla para combo de jazz"
 
 
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Ecco un modello piuttosto complesso, per un gruppo jazz. Si noti che tutti
+gli strumenti sono in @code{\\key c \\major}. Si tratta della tonalità
+reale; sarà trasposta automaticamente includendo la
+musica all'interno di una sezione @code{\\transpose}.
+
+"
+  doctitleit = "Modello per combo jazz"
+
 %% Translation of GIT committish: 0a868be38a775ecb1ef935b079000cebbc64de40
   texidocde = "
 Hier ist ein ziemlich kompliziertes Beispiel für ein Jazz-Ensemble. Achtung:
index e7c190465e603a8084ce2123804c2d1ed1214d07..f363075516fc9b66c2db9ccae8411c24aa25a146 100644 (file)
@@ -7,21 +7,8 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
-  texidocit = "
-Questo modello mostra come usare i contesti annidati @code{StaffGroup} e
-@code{GrandStaff} per creare sottogruppi degli strumenti dello stesso
-tipo.  Mostra anche come usare @code{\\transpose} in modo che le variabili
-mantengano la musica per gli strumenti traspositori nell'intonazione reale.
-
-"
-  doctitleit = "Modello per orchestra coro e pianoforte"
-
   lsrtags = "pitches, staff-notation, vocal-music, template"
 
-
-
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
 Esta plantilla muestra el uso de contextos @code{StaffGroup} y
@@ -33,6 +20,16 @@ afinación de concierto.
 "
   doctitlees = "Plantilla de orquesta con coro y piano"
 
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Questo modello mostra come usare i contesti annidati @code{StaffGroup} e
+@code{GrandStaff} per creare sottogruppi degli strumenti dello stesso
+tipo.  Mostra anche come usare @code{\\transpose} in modo che le variabili
+mantengano la musica per gli strumenti traspositori nell'intonazione reale.
+
+"
+  doctitleit = "Modello per orchestra coro e pianoforte"
+
 %% Translation of GIT committish: 64feeff58e5ce3397de87188a08ac99f7ef8e37b
 
   texidocde = "
index 8847cd074625769771cb925fe60a12e99135195f..8d0c1402107a3ae2db61c1bb5651ba47e6dfceeb 100644 (file)
@@ -7,18 +7,8 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
-  texidocit = "
-Ecco un comune doppio pentagramma per pianoforte con un po' di note.
-
-"
-  doctitleit = "Modello per pianoforte (semplice)"
-
   lsrtags = "keyboards, template"
 
-
-
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
 Presentamos a continuación una plantilla de piano sencilla con algunas
@@ -28,6 +18,13 @@ notas.
   doctitlees = "Plantilla de piano (sencilla)"
 
 
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Ecco un comune doppio pentagramma per pianoforte con un po' di note.
+
+"
+  doctitleit = "Modello per pianoforte (semplice)"
+
 %% Translation of GIT committish: 0a868be38a775ecb1ef935b079000cebbc64de40
   texidocde = "
 Hier ein einfaches Klaviersystem.
index f56fc58bcee24dd41a5ce3a420500e3b551dc64c..991479b451c333da18ccb7b419c2b426fb6bddbf 100644 (file)
@@ -26,7 +26,7 @@ automática.
 う必要はありません。
 "
 
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a428
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
   texidocit = "
 Molti spartiti per pianoforte hanno le dinamiche poste al centro dei due righi.
 Il contesto @code{Dynamics}, se collocato tra i righi, posiziona automaticamente
index 70601aac28a37e411f81d3256c5754ed65892295..cb4b2bd9c0648523908bda465a017a7fb83d8d50 100644 (file)
@@ -7,19 +7,8 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
-  texidocit = "
-Invece di destinare un rigo a parte alla linea melodica e al suo testo, è
-possibile collocare il testo al centro di un doppio pentagramma per pianoforte.
-
-"
-  doctitleit = "Modello per pianoforte con testo al centro"
-
   lsrtags = "text, keyboards, template"
 
-
-
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
 En lugar de tener un pentagrama dedicado a la melodía y la letra, ésta
@@ -34,6 +23,14 @@ se puede centrar entre los pentagramas de un sistema de piano.
 旋律と歌詞のための譜表を持つ代わりに、歌詞をピアノ譜の 2 つの譜の間に置くことができます。
 "
 
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Invece di destinare un rigo a parte alla linea melodica e al suo testo, è
+possibile collocare il testo al centro di un doppio pentagramma per pianoforte.
+
+"
+  doctitleit = "Modello per pianoforte con testo al centro"
+
 %% Translation of GIT committish: 0a868be38a775ecb1ef935b079000cebbc64de40
   texidocde = "
 Anstatt ein eigenes System für Melodie und Text zu schreiben, können
index 44109dcf69ad45585f7814c57fb0998333e508b9..d90618d5c475e5453756944379bdb75066355163 100644 (file)
@@ -4,22 +4,11 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.15.2"
+\version "2.15.7"
 
 \header {
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
-  texidocit = "
-Ecco un tipico formato per canzoni: un rigo con linea melodica e testo,
-e sotto l'accompagnamento per pianoforte.
-
-"
-  doctitleit = "Modello per pianoforte con melodia e testo"
-
   lsrtags = "vocal-music, keyboards, template"
 
-
-
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
 He aquí el típico formato dde una canción: un pentagrama con la
@@ -34,6 +23,14 @@ melodía y la letra, y el acompañamiento de piano por debajo.
 これは一般的な歌曲のフォーマットです: 旋律と歌詞を持つ譜表と、その下にピアノ伴奏譜があります。
 "
 
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Ecco un tipico formato per canzoni: un rigo con linea melodica e testo,
+e sotto l'accompagnamento per pianoforte.
+
+"
+  doctitleit = "Modello per pianoforte con melodia e testo"
+
 %% Translation of GIT committish: 0a868be38a775ecb1ef935b079000cebbc64de40
   texidocde = "
 Das nächste Beispiel ist typisch für ein Lied: Im oberen System die
index 3fd463cda091e2dda81a70ac2991daf612b27025..47d676591d257b8297b46e27eac52298a2e910e9 100644 (file)
@@ -4,7 +4,7 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.15.2"
+\version "2.15.7"
 
 \header {
   lsrtags = "staff-notation, tweaks-and-overrides, breaks"
index b1a18d64171b90666f5fa3281ca845c5d67f6025..2492732d45f0c582c33df4e0a27b162adb4c7719 100644 (file)
@@ -7,7 +7,9 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: c3b519f0dd5ff0f8ccfc9a39ed1fe8df8b43741c
+  lsrtags = "vocal-music, template"
+
+%% Translation of GIT committish: b1bebb842d9762894fc7b2a178e2bdfcd544419f
 
   texidoces = "
 Plantilla de coro SATB (en cuatro pentagramas)
@@ -15,18 +17,13 @@ Plantilla de coro SATB (en cuatro pentagramas)
 "
   doctitlees = "Plantilla de coro SATB a cuatro pentagramas"
 
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
   texidocit = "
 Modello per coro SATB (quattro righi)
 
 "
   doctitleit = "Modello per coro SATB - quattro righi"
 
-  lsrtags = "vocal-music, template"
-
-
-
-
 %% Translation of GIT committish:  144cd434d02e6d90b2fb738eeee99119a7c5e1d2
 
   texidocde = "
index 456f54c332098b1af219de1c973354f8ae9a9e39..593ca47d7e28747f7b90040377587fe92177a58a 100644 (file)
@@ -7,20 +7,8 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
-  texidocit = "
-Ecco il modello di un comune spartito semplificato (lead sheet): include
-linea melodica, testo vocale, sigle degli accordi e relativi diagrammi
-per chitarra.
-
-"
-  doctitleit = "Modello di rigo singolo con note testo accordi e tasti"
-
   lsrtags = "vocal-music, chords, template"
 
-
-
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
 Esta plantilla facilita la preparación de una canción con melodía,
@@ -35,6 +23,15 @@ letra y acordes.
 これは旋律、単語、コードを持つ歌曲の楽譜のためのテンプレートです。
 "
 
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Ecco il modello di un comune spartito semplificato (lead sheet): include
+linea melodica, testo vocale, sigle degli accordi e relativi diagrammi
+per chitarra.
+
+"
+  doctitleit = "Modello di rigo singolo con note testo accordi e tasti"
+
 %% Translation of GIT committish: 0a868be38a775ecb1ef935b079000cebbc64de40
   texidocde = "
 Mit diesem Beispiel können Sie einen Song mit Melodie,
index 381b63de3edbbba01dcdf42fd7baa46aea511c28..7fdf1d4463ed752cc0826bbf325cfc6fcedf6eab 100644 (file)
@@ -7,19 +7,8 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
-  texidocit = "
-Vuoi preparare uno spartito semplificato (lead sheet) con melodia e
-accordi?  La tua ricerca è finita!
-
-"
-  doctitleit = "Modello di rigo singolo con note e accordi"
-
   lsrtags = "chords, template"
 
-
-
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
 ¿Quiere preparar una hoja guía de acordes (o «lead sheet») con
@@ -35,6 +24,14 @@ doctitlees = "Plantilla de pentagrama único con música y acordes"
 旋律とコードを持つリード譜を欲しくはありませんか?他を見る必要はありません!
 "
 
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Vuoi preparare uno spartito semplificato (lead sheet) con melodia e
+accordi?  La tua ricerca è finita!
+
+"
+  doctitleit = "Modello di rigo singolo con note e accordi"
+
 %% Translation of GIT committish: 0a868be38a775ecb1ef935b079000cebbc64de40
   texidocde = "
 Wollen Sie ein Liedblatt mit Melodie und Akkorden schreiben?  Hier ist
index 7181b8a0dd5071d3f5a88d00f69ecee9cadebbc0..6b05e973d62e3dca7a39809a9d08688730e4e305 100644 (file)
@@ -7,22 +7,8 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
-  texidocit = "
-Questo piccolo modello presenta una semplice linea melodica con un testo. Copialo
-e incollalo, aggiungi le note e le parole. Questo esempio disabilita la
-disposizione automatica delle travature, come è consuetudine per le parti
-vocali. Per usare la disposizione automatica delle travature, cambia o
-commenta la relativa linea di codice.
-
-"
-  doctitleit = "Modello di rigo singolo con note e testo"
-
   lsrtags = "vocal-music, template"
 
-
-
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
 Esta pequeña plantilla muestra una melodía sencilla con letra. Córtela
@@ -44,6 +30,17 @@ comentario la línea correspondiente.
 "
 
 
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Questo piccolo modello presenta una semplice linea melodica con un testo. Copialo
+e incollalo, aggiungi le note e le parole. Questo esempio disabilita la
+disposizione automatica delle travature, come è consuetudine per le parti
+vocali. Per usare la disposizione automatica delle travature, cambia o
+commenta la relativa linea di codice.
+
+"
+  doctitleit = "Modello di rigo singolo con note e testo"
+
 %% Translation of GIT committish: 0a868be38a775ecb1ef935b079000cebbc64de40
   texidocde = "
 Das nächste Beispiel zeigt eine einfache Melodie mit Text. Kopieren
index 1427f451583921229e569668233307f21c8f3a8d..3eed5a65769b649fbebb8f971559275d2614b8cf 100644 (file)
@@ -7,20 +7,8 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
-  texidocit = "
-Questo modello molto semplice mette a disposizione un rigo con delle note ed è
-quindi adatto per uno strumento non accompagnato o per un frammento 
-melodico. Copialo e incollalo in un file, aggiungi le note e hai finito!
-
-"
-  doctitleit = "Modello di rigo singolo con solo note"
-
   lsrtags = "template"
 
-
-
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
 Esta plantilla simple prepara un pentagrama con notas, adecuado para
@@ -38,6 +26,15 @@ un archivo, escriba las notas y ¡ya está!
 "
 
 
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Questo modello molto semplice mette a disposizione un rigo con delle note ed è
+quindi adatto per uno strumento non accompagnato o per un frammento
+melodico. Copialo e incollalo in un file, aggiungi le note e hai finito!
+
+"
+  doctitleit = "Modello di rigo singolo con solo note"
+
 %% Translation of GIT committish: 0a868be38a775ecb1ef935b079000cebbc64de40
   texidocde = "
 Das erste Beispiel zeigt ein Notensystem mit Noten, passend für ein
index fb0ffe98a99404384a4ff62b677e23276047ca4a..f9baba8e593b51bfde91198e73d27517fac4d795 100644 (file)
@@ -7,19 +7,8 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
-  texidocit = "
-Questo modello presenta un semplice quartetto d'archi. Impiega anche una
-sezione @code{\\global} per definire il tempo e l'armatura di chiave.
-
-"
-  doctitleit = "Modello per quartetto d'archi (semplice)"
-
   lsrtags = "unfretted-strings, template"
 
-
-
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
 Esta plantilla muestra un cuarteto de cuerda normal. También utiliza
@@ -35,6 +24,14 @@ una sección @code{\\global} para el compás y la armadura
 @code{@bs{}global} セクションを使っています。
 "
 
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Questo modello presenta un semplice quartetto d'archi. Impiega anche una
+sezione @code{\\global} per definire il tempo e l'armatura di chiave.
+
+"
+  doctitleit = "Modello per quartetto d'archi (semplice)"
+
 %% Translation of GIT committish: 0a868be38a775ecb1ef935b079000cebbc64de40
   texidocde = "
 Dieses Beispiel demonstriert die Partitur für ein Streichquartett. Hier
index 786c53729cf95fcaf12576de06f5de5b3a55caeb..80c0b72a6016a18dcec3ac7a2aeccdaf5bcfc015 100644 (file)
@@ -7,29 +7,8 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
-  texidocit = "
-Il frammento di codice del @qq{Modello per quartetto d'archi} crea un bel
-quartetto, ma cosa fare se si ha bisogno di creare le singole parti? Questo
-nuovo modello mostra come usare la funzionalità @code{\\tag} per dividere
-facilmente un pezzo in parti staccate.
-
-Occorre dividere questo modello in file separati; i nomi dei file sono
-indicati nei commenti all'inizio di ogni file. @code{piece.ly}
-contiene tutte le definizioni musicali. Gli altri file – @code{score.ly},
-@code{vn1.ly}, @code{vn2.ly}, @code{vla.ly} e @code{vlc.ly} –
-creano ciascuna parte.
-
-
-Non dimenticare di togliere i commenti quando usi i file separati!
-
-"
-  doctitleit = "Modello per quartetto d'archi con parti separate"
-
-
   lsrtags = "unfretted-strings, template"
 
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
 El fragmento de código @qq{Plantilla de cuarteto de cuerda} produce un
@@ -67,6 +46,25 @@ los archivos independientes!
 別々のファイルに分ける場合は、指定されたコメントを外すことを忘れないでください!
 "
 
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Il frammento di codice del @qq{Modello per quartetto d'archi} crea un bel
+quartetto, ma cosa fare se si ha bisogno di creare le singole parti? Questo
+nuovo modello mostra come usare la funzionalità @code{\\tag} per dividere
+facilmente un pezzo in parti staccate.
+
+Occorre dividere questo modello in file separati; i nomi dei file sono
+indicati nei commenti all'inizio di ogni file. @code{piece.ly}
+contiene tutte le definizioni musicali. Gli altri file – @code{score.ly},
+@code{vn1.ly}, @code{vn2.ly}, @code{vla.ly} e @code{vlc.ly} –
+creano ciascuna parte.
+
+
+Non dimenticare di togliere i commenti quando usi i file separati!
+
+"
+  doctitleit = "Modello per quartetto d'archi con parti separate"
+
 %% Translation of GIT committish: 0a868be38a775ecb1ef935b079000cebbc64de40
   texidocde = "
 Mit diesem Beispiel können Sie ein schönes Streichquartett notieren,
index c73ff7a3050e3ab9a6bf3e6d0973873e67fe5bda..29de9a64ec4cfa08cedee811448ab615a0f17032 100644 (file)
@@ -15,7 +15,10 @@ the same position, and both voices have no shift or the same shift
 specified, the error message @samp{warning: ignoring too many clashing
 note columns} will appear when compiling the LilyPond file.  This
 message can be suppressed by setting the @code{'ignore-collision}
-property of the @code{NoteColumn} object to @code{#t}.
+property of the @code{NoteColumn} object to @code{#t}. Please note that
+this does not just suppress warnings  but stops LilyPond trying to
+resolve collisions at all and so may have  unintended results unless
+used with care.
 
 "
   doctitle = "Suppressing warnings for clashing note columns"
index dbaee280a53cd259c8c9cace2d62aa7fed9d2a61..270c7e56778b1b40caf74b02eff5d037a1db0b14 100644 (file)
@@ -30,7 +30,7 @@ entonces los cambios se aplicarán también a la reducción de piano.
 の音符) に変更が加えられた場合、その変更はピアノ譜にも適用されます。
 "
 
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
   texidocit = "
 Questo modello aggiunge una riduzione automatica per pianoforte alla tipica
 partitura vocale SATB illustrata in @qq{Modello per complesso vocale}. Si
index 2aa33091223c71b852925a2ae3b5a6a2c6db99da..505f917a4ef584e297394ea160acc0127f78c0bb 100644 (file)
@@ -7,20 +7,8 @@
 \version "2.14.0"
 
 \header {
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
-  texidocit = "
-Questo modello è fondamentalmente analogo al semplice modello @qq{Complesso vocale},
-con l'unica differenza che qui tutti i versi del testo sono posizionati
-usando @code{alignAboveContext} e @code{alignBelowContext}.
-
-"
-  doctitleit = "Modello per gruppo vocale con testo allineato sotto e sopra i righi"
-
   lsrtags = "text, vocal-music, contexts-and-engravers, template"
 
-
-
-
 %% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c
   texidoces = "
 Esta plantilla es, básicamente, la misma que la sencilla plantilla
@@ -38,6 +26,15 @@ colocan utilizando @code{alignAboveContext} y
 @code{alignAboveContext} と @code{alignBelowContext} を用いて配置されています。
 "
 
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
+  texidocit = "
+Questo modello è fondamentalmente analogo al semplice modello @qq{Complesso vocale},
+con l'unica differenza che qui tutti i versi del testo sono posizionati
+usando @code{alignAboveContext} e @code{alignBelowContext}.
+
+"
+  doctitleit = "Modello per gruppo vocale con testo allineato sotto e sopra i righi"
+
 %% Translation of GIT committish: 0a868be38a775ecb1ef935b079000cebbc64de40
   texidocde = "
 In diesem Beispiel werden die Texte mit den Befehlen
index 459e985c59b19bb8de18dd8e7c81aa4259ff722e..8aaa65dae49c4abd36d7857f494ffe35db8fa658 100644 (file)
@@ -21,7 +21,7 @@ todas las partes) a lo largo de toda la partitura.
 
   doctitlees = "Estrofa para solista y estribillo a dos voces"
 
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
   texidocit = "
 Questo modello crea una partitura che inizia con una sezione solistica e
 prosegue in un ritornello a due voci.  Illustra anche l'uso delle
index be94bf1975ceafbf9a64288742ce14cd8b190dce..aec0ddd40ab172505531cf1bfd0b02db05b7f6b7 100644 (file)
@@ -27,7 +27,7 @@ voces se reagrupan en sólo dos pentagramas.
 便利です。例えば、拍子記号と調号はほとんど常にすべてのパートで同じです。\"賛美@c
 歌\" テンプレートのように、4 つのボイスは 2 つの譜にグループ分けされています。"
 
-%% Translation of GIT committish: 4077120c18ac1dc490501b3d7d5886bc93e61a42
+%% Translation of GIT committish: 514674cb00c18629242dfcde0c1a4976758adc56
   texidocit = "
 Ecco una tipica partitura corale a quattro parti, SATB. Se il complesso è più
 ampio, è spesso comodo scrivere gli elementi comuni in un'unica sezione, che
index 9d018275ef1fa2b61426c0fbabff3f57c60d70c3..d1018be507685bbcd4dad5dc0c3988cf90bbe8c9 100644 (file)
@@ -959,6 +959,10 @@ Process LilyPond snippets using @var{command}.  The default command is
 @item --pdf
 Create PDF files for use with PDF@LaTeX{}.
 
+@item --redirect-lilypond-output
+By default, output is displayed on the terminal.  This option redirects
+all output to log files in the same directory as the source files.
+
 @itemx --use-source-file-names
 Write snippet output files with the same base name as their source file.
 This option works only for snippets included with @code{lilypondfile}
index 4d32d67e50414b7774a0515fac05e99db828823e..f37985396305b4e121422219e400e9fe42d2922b 100644 (file)
@@ -299,6 +299,16 @@ first system of every @code{\bookpart} will appear in the output.
 The @code{ps}, @code{eps}, and @code{svg} backends support this
 option.
 
+@item gui
+Runs silently and redirect all output to a log file.
+
+Note to Windows users: By default @code{lilypond.exe} outputs all
+progress information to the command window, @code{lilypond-windows.exe}
+does not and returns a prompt, with no progress information, immediately
+at the command line.  The @code{-dgui} option can be used in this case
+to redirect output to a log file.
+
+
 @item print-pages
 Generate the full pages, the default.  @code{-dno-print-pages} is
 useful in combination with @code{-dpreview}.
index 0fc2bed22dd3fdfd5339da378d34a152df1479a6..a46ab720da6d11303708974ac47b2d4a3808a775 100644 (file)
@@ -120,6 +120,10 @@ tweaks reference.
 
 @itemize
 
+@item
+@ref{All}:
+previous stable versions and current as a compressed archive.
+
 @item
 @ref{Translated}:
 translation status for non-English readers.
index e37958f42abea358fd59c56708c2c659fd2b7b72..2a74757d0cbda76a6fe50e5f04e0fb4f45f72732 100644 (file)
@@ -9,43 +9,26 @@
 @c used for news about the upcoming release; see CG 10.2
 
 @newsItem
-@subsubheading LilyPond 2.15.6 released!  @emph{July 26, 2011}
-
-We are happy to announce the release of LilyPond 2.15.6.  This
-release contains the usual number of bugfixes.
-
-It is strongly recommended that normal users do @strong{not} use
-this release, and instead use the stable 2.14 version.
-
-@newsEnd
-
-
-@newsItem
-@subsubheading LilyPond 2.14.2 released!  @emph{July 25, 2011}
-
-We are happy to announce the release of LilyPond 2.14.2.  This
-fixes a few minor bugs in the stable version, and should cause no
-problems.  We recommend that everybody upgrade to this version.
-
-@newsEnd
-
-
-@newsItem
-@subsubheading LilyPond 2.15.5 released!  @emph{July 12, 2011}
+@subsubheading Release candidate 1 of 2.16 - LilyPond 2.15.8 released!  @emph{Aug 01, 2011}
 
-We are happy to announce the release of LilyPond 2.15.5.  This
-release contains the usual number of bugfixes.
+LilyPond 2.15.8 is out; this is the first release candidate of
+the upcoming 2.16 stable release.  All users are invited to
+experiment with this version.  New features since 2.14.2 are
+listed in the @qq{Changes} manual on the website section about
+@ref{Development}.
 
-It is strongly recommended that normal users do @strong{not} use
-this release, and instead use the stable 2.14 version.
+There are no known Critical issues with this release.  If no
+Critical bugs are found, then the official 2.16.0 release will be
+on 08 Aug 2011.  If you discover any problems, please send us
+@ref{Bug reports}.
 
 @newsEnd
 
 
 @newsItem
-@subsubheading LilyPond 2.15.4 released!  @emph{July 4, 2011}
+@subsubheading LilyPond 2.15.7 released!  @emph{July 29, 2011}
 
-We are happy to announce the release of LilyPond 2.15.4.  This
+We are happy to announce the release of LilyPond 2.15.7.  This
 release contains the usual number of bugfixes.
 
 It is strongly recommended that normal users do @strong{not} use
@@ -55,21 +38,9 @@ this release, and instead use the stable 2.14 version.
 
 
 @newsItem
-@subsubheading LilyPond 2.15.3 released!  @emph{June 27, 2011}
-
-We are happy to announce the release of LilyPond 2.15.3.  This
-release contains the usual number of bugfixes.
-
-It is strongly recommended that normal users do @strong{not} use
-this release, and instead use the stable 2.14 version.
-
-@newsEnd
-
-
-@newsItem
-@subsubheading LilyPond 2.15.2 released!  @emph{June 18, 2011}
+@subsubheading LilyPond 2.15.6 released!  @emph{July 26, 2011}
 
-We are happy to announce the release of LilyPond 2.15.2.  This
+We are happy to announce the release of LilyPond 2.15.6.  This
 release contains the usual number of bugfixes.
 
 It is strongly recommended that normal users do @strong{not} use
@@ -79,114 +50,13 @@ this release, and instead use the stable 2.14 version.
 
 
 @newsItem
-@subsubheading LilyPond 2.14.1 released!  @emph{June 12, 2011}
+@subsubheading LilyPond 2.14.2 released!  @emph{July 25, 2011}
 
-We are happy to announce the release of LilyPond 2.14.1.  This
+We are happy to announce the release of LilyPond 2.14.2.  This
 fixes a few minor bugs in the stable version, and should cause no
 problems.  We recommend that everybody upgrade to this version.
 
 @newsEnd
 
-@newsItem
-@subsubheading LilyPond 2.15.1 released!  @emph{June 11, 2011}
-
-We are happy to announce the release of LilyPond 2.15.1.  This is
-the beginning of a new unstable development effort, and adds the
-usual number of bugs.
-
-It is strongly recommended that normal users do @strong{not} use
-this release, and instead use the stable 2.14 version.
-
-@newsEnd
-
-@newsItem
-@subsubheading LilyPond 2.15.0 released!  @emph{June 7, 2011}
-
-We are happy to announce the release of LilyPond 2.15.0.  This is
-the beginning of a new unstable development effort, and adds the
-usual number of bugs.
-
-It is strongly recommended that normal users do @strong{not} use
-this release, and instead use the stable 2.14 version.
-
-@newsEnd
-
-
-@newsItem
-@subsubheading LilyPond 2.14.0 released! @emph{June 6, 2011}
-
-We are proud to announce the release of GNU LilyPond 2.14.
-LilyPond is a music engraving program, devoted to producing the
-highest-quality sheet music possible.  It brings the aesthetics of
-traditionally engraved music to computer printouts.
-
-Many improvements have been made in the past two and a half years
-since the previous main stable version.  A few major improvements
-are:
-
-@itemize
-@item
-LilyPond is now licensed under the GNU GPL v3 or higher.
-
-@item
-The vertical spacing engine has been drastically changed, making
-it much more flexible and easier to control.
-
-@item
-Automatic beaming is now more flexible, and beam collisions are
-avoided.
-
-@end itemize
-
-A full list of new features is given in:
-
-@example
-@uref{http://lilypond.org/doc/v2.13/Documentation/changes/index.html}
-@end example
-
-Happy music typesetting!  LilyPond 2.14 was brought to you by...
-
-Main development team:
-
-Trevor Daniels, Reinhold Kainhofer, David Kastrup, Jonathan Kulp,
-Werner Lemberg, John Mandereau, Patrick McCarty, Joe Neeman,
-Han-Wen Nienhuys, Jan Nieuwenhuizen, Graham Percival, Mark
-Polesky, Neil Puttock, Mike Solomon, Carl Sorensen, Francisco
-Vila, Valentin Villenave.
-
-Programming contributors:
-
-Sven Axelsson, Pál Benkő, Bertrand Bordage, Frédéric Bron, Peter Chubb, Hajo Dezelski, Richard
-Gay, Keith OHara, Andrew Hawryluk, Christian Hitz, Marc Hohl,
-Henning Hraban Ramm, Ian Hulin, Michael Käppler, Marek Klein,
-Kieren MacMillan, Thomas Morgan, Benjamin Peterson, Nathan Reed,
-Julien Rioux, Boris Shingarov, Patrick Schmidt, Owen Tuz, Jan Warchoł, Andrew
-Wilson, Rodolfo Zitellini.
-
-Font contributors:
-
-Keith OHara, Marc Hohl, Alexander Kobel, Carsten Steger.
-
-Documentation contributors:
-
-Colin Campbell, Andrew Hawryluk, James Lowe, Mike Moral, Ralph
-Palmer, David Pounder, Patrick Schmidt.
-
-Bug squad:
-
-James E. Bailey, Colin Campbell, Phil Holmes, Urs Liska, Ralph
-Palmer, Kieren MacMillan, Dmytro O. Redchuk.
-
-Binaries support contributors:
-
-Christian Hitz.
-
-Translation contributors:
-
-Federico Bruni, Dénes Harmath, Jean-Charles Malahieude, Tineke de
-Munnik, Till Paala, Ralf Wildenhues, Yoshiki Sawada.
-
-@newsEnd
-
 
 
index fd4631431c42812c5eccadd95c0c433a3b9eb527..0dfa491ff5028470b75ac1e1e0413e54b48ca923 100644 (file)
@@ -26,6 +26,168 @@ NOTE:
   * don't duplicate entries from news-front.itexi
 @end ignore
 
+
+
+@newsItem
+@subsubheading LilyPond 2.15.5 released!  @emph{July 12, 2011}
+
+We are happy to announce the release of LilyPond 2.15.5.  This
+release contains the usual number of bugfixes.
+
+It is strongly recommended that normal users do @strong{not} use
+this release, and instead use the stable 2.14 version.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading LilyPond 2.15.4 released!  @emph{July 4, 2011}
+
+We are happy to announce the release of LilyPond 2.15.4.  This
+release contains the usual number of bugfixes.
+
+It is strongly recommended that normal users do @strong{not} use
+this release, and instead use the stable 2.14 version.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading LilyPond 2.15.3 released!  @emph{June 27, 2011}
+
+We are happy to announce the release of LilyPond 2.15.3.  This
+release contains the usual number of bugfixes.
+
+It is strongly recommended that normal users do @strong{not} use
+this release, and instead use the stable 2.14 version.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading LilyPond 2.15.2 released!  @emph{June 18, 2011}
+
+We are happy to announce the release of LilyPond 2.15.2.  This
+release contains the usual number of bugfixes.
+
+It is strongly recommended that normal users do @strong{not} use
+this release, and instead use the stable 2.14 version.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading LilyPond 2.14.1 released!  @emph{June 12, 2011}
+
+We are happy to announce the release of LilyPond 2.14.1.  This
+fixes a few minor bugs in the stable version, and should cause no
+problems.  We recommend that everybody upgrade to this version.
+
+@newsEnd
+
+@newsItem
+@subsubheading LilyPond 2.15.1 released!  @emph{June 11, 2011}
+
+We are happy to announce the release of LilyPond 2.15.1.  This is
+the beginning of a new unstable development effort, and adds the
+usual number of bugs.
+
+It is strongly recommended that normal users do @strong{not} use
+this release, and instead use the stable 2.14 version.
+
+@newsEnd
+
+@newsItem
+@subsubheading LilyPond 2.15.0 released!  @emph{June 7, 2011}
+
+We are happy to announce the release of LilyPond 2.15.0.  This is
+the beginning of a new unstable development effort, and adds the
+usual number of bugs.
+
+It is strongly recommended that normal users do @strong{not} use
+this release, and instead use the stable 2.14 version.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading LilyPond 2.14.0 released! @emph{June 6, 2011}
+
+We are proud to announce the release of GNU LilyPond 2.14.
+LilyPond is a music engraving program, devoted to producing the
+highest-quality sheet music possible.  It brings the aesthetics of
+traditionally engraved music to computer printouts.
+
+Many improvements have been made in the past two and a half years
+since the previous main stable version.  A few major improvements
+are:
+
+@itemize
+@item
+LilyPond is now licensed under the GNU GPL v3 or higher.
+
+@item
+The vertical spacing engine has been drastically changed, making
+it much more flexible and easier to control.
+
+@item
+Automatic beaming is now more flexible, and beam collisions are
+avoided.
+
+@end itemize
+
+A full list of new features is given in:
+
+@example
+@uref{http://lilypond.org/doc/v2.13/Documentation/changes/index.html}
+@end example
+
+Happy music typesetting!  LilyPond 2.14 was brought to you by...
+
+Main development team:
+
+Trevor Daniels, Reinhold Kainhofer, David Kastrup, Jonathan Kulp,
+Werner Lemberg, John Mandereau, Patrick McCarty, Joe Neeman,
+Han-Wen Nienhuys, Jan Nieuwenhuizen, Graham Percival, Mark
+Polesky, Neil Puttock, Mike Solomon, Carl Sorensen, Francisco
+Vila, Valentin Villenave.
+
+Programming contributors:
+
+Sven Axelsson, Pál Benkő, Bertrand Bordage, Frédéric Bron, Peter Chubb, Hajo Dezelski, Richard
+Gay, Keith OHara, Andrew Hawryluk, Christian Hitz, Marc Hohl,
+Henning Hraban Ramm, Ian Hulin, Michael Käppler, Marek Klein,
+Kieren MacMillan, Thomas Morgan, Benjamin Peterson, Nathan Reed,
+Julien Rioux, Boris Shingarov, Patrick Schmidt, Owen Tuz, Jan Warchoł, Andrew
+Wilson, Rodolfo Zitellini.
+
+Font contributors:
+
+Keith OHara, Marc Hohl, Alexander Kobel, Carsten Steger.
+
+Documentation contributors:
+
+Colin Campbell, Andrew Hawryluk, James Lowe, Mike Moral, Ralph
+Palmer, David Pounder, Patrick Schmidt.
+
+Bug squad:
+
+James E. Bailey, Colin Campbell, Phil Holmes, Urs Liska, Ralph
+Palmer, Kieren MacMillan, Dmytro O. Redchuk.
+
+Binaries support contributors:
+
+Christian Hitz.
+
+Translation contributors:
+
+Federico Bruni, Dénes Harmath, Jean-Charles Malahieude, Tineke de
+Munnik, Till Paala, Ralf Wildenhues, Yoshiki Sawada.
+
+@newsEnd
+
+
+
 @newsItem
 @subsubheading Release candidate 7 of 2.14 - LilyPond 2.13.63 released!  @emph{May 30, 2011}
 
diff --git a/VERSION b/VERSION
index d6ac95453de05a5c6cbdbda936a4270ca2d18560..cc895541aca245c50ac9f30c2188527a49227cef 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=15
-PATCH_LEVEL=7
+PATCH_LEVEL=9
 MY_PATCH_LEVEL=
 VERSION_STABLE=2.14.2
-VERSION_DEVEL=2.15.6
+VERSION_DEVEL=2.15.8
index d39b0d1d2fc827dc86d16ee11e83051572cc1835..0b01c192f136c95a341d6c6cfb4920222f10abd6 100644 (file)
@@ -995,17 +995,17 @@ command."
 (defun LilyPond-menu-keywords ()
   "Make Insert Tag menu. 
 
-The Insert Tag -menu is splitted into parts if it is long enough."
+The Insert Tag -menu is split into parts if it is long enough."
 
   (let ((li (mapcar 'LilyPond-menu-keywords-item LilyPond-menu-keywords))
        (w (round (sqrt (length LilyPond-menu-keywords))))
-       (splitted '())
+       (split '())
        (imin 0) imax lw rw)
     (while (< imin (length LilyPond-menu-keywords))
       (setq imax (- (min (+ imin w) (length LilyPond-menu-keywords)) 1))
       (setq lw (nth imin LilyPond-menu-keywords)) 
       (setq rw (nth imax LilyPond-menu-keywords))
-      (add-to-list 'splitted
+      (add-to-list 'split
          (let ((l (list (concat (substring lw 0 (min 7 (length lw))) 
                                " ... " 
                                (substring rw 0 (min 7 (length rw)))))))
@@ -1013,7 +1013,7 @@ The Insert Tag -menu is splitted into parts if it is long enough."
             (add-to-list 'l (nth imin li))
             (setq imin (1+ imin)))
           (reverse l))))
-    (if (> (length LilyPond-menu-keywords) 12) (reverse splitted) li)))
+    (if (> (length LilyPond-menu-keywords) 12) (reverse split) li)))
 
 ;;; LilyPond-mode-menu should not be interactive, via "M-x LilyPond-<Tab>"
 (easy-menu-define LilyPond-mode-menu
index bedb100a00b26b4ac246e7948dd4c3166795f8f2..39e76e35169710ee13c616f9b38d3d3c6811992e 100644 (file)
@@ -16,8 +16,8 @@ extern "C" {
 
   void *
   lily_fopencookie (void *cookie,
-                   char const * /* modes */,
-                   lily_cookie_io_functions_t /* io_funcs */)
+                    char const * /* modes */,
+                    lily_cookie_io_functions_t /* io_funcs */)
   {
     assert (is_memory_stream (cookie));
     return (FILE *) cookie;
index ccb923355f09077024e8fbc3b2bc6d49d3faea35..14812a034c39b87363c64d08372b0838750f6e8a 100644 (file)
@@ -68,7 +68,7 @@ dos_to_posix (string file_name)
     much be exchanged.  */
 #if 0
 static /* avoid warning */
-#endif 
+#endif
 string
 slashify (string file_name)
 {
@@ -89,7 +89,7 @@ dir_name (string const file_name)
     s = s.substr (0, s.rfind ('/'));
   else
     s = "";
-  
+
   return s;
 }
 
@@ -118,7 +118,6 @@ File_name::dir_part () const
   return s;
 }
 
-
 string
 File_name::file_part () const
 {
@@ -136,7 +135,7 @@ File_name::to_string () const
   string f = file_part ();
 
   if (!f.empty ()
-      && !dir_.empty())
+      && !dir_.empty ())
     {
       d += ::to_string (DIRSEP);
     }
@@ -184,13 +183,11 @@ bool
 File_name::is_absolute () const
 {
   /*
-    Hmm. Is c:foo absolute?  
+    Hmm. Is c:foo absolute?
    */
   return (dir_.length () && dir_[0] == DIRSEP) || root_.length ();
 }
 
-
-
 File_name
 File_name::canonicalized () const
 {
@@ -198,17 +195,17 @@ File_name::canonicalized () const
 
   replace_all (&c.dir_, string ("//"), string ("/"));
 
-  vector<string> components =  string_split (c.dir_, '/');
+  vector<string> components = string_split (c.dir_, '/');
   vector<string> new_components;
 
   for (vsize i = 0; i < components.size (); i++)
     {
       if (components[i] == "..")
-       new_components.pop_back ();
+        new_components.pop_back ();
       else
-       new_components.push_back (components[i]);
+        new_components.push_back (components[i]);
     }
 
-  c.dir_ = string_join (new_components,  "/");
-  return c;  
+  c.dir_ = string_join (new_components, "/");
+  return c;
 }
index 97b9f24362f0d9a7dfd1a5e630ef8d6752663bd7..850592bd36280cb622f1b3fde6f12ee2f90f37a7 100644 (file)
@@ -79,7 +79,7 @@ is_dir (string file_name)
     canonicalize; in particular, trailing slashes should disappear.
    */
   file_name = File_name (file_name).to_string ();
-  
+
 #if !STAT_MACROS_BROKEN
   struct stat sbuf;
   if (stat (file_name.c_str (), &sbuf) != 0)
@@ -128,12 +128,12 @@ File_path::find (string name) const
       file_name.root_ = dir.root_;
       dir.root_ = "";
       if (file_name.dir_.empty ())
-       file_name.dir_ = dir.to_string ();
+        file_name.dir_ = dir.to_string ();
       else if (!dir.to_string ().empty ())
-       file_name.dir_ = dir.to_string ()
-         + ::to_string (DIRSEP) + file_name.dir_;
+        file_name.dir_ = dir.to_string ()
+                         + ::to_string (DIRSEP) + file_name.dir_;
       if (is_file (file_name.to_string ()))
-       return file_name.to_string ();
+        return file_name.to_string ();
     }
   return "";
 }
@@ -150,20 +150,20 @@ File_path::find (string name, char const *extensions[])
 {
   if (name.empty () || name == "-")
     return name;
-  
+
   File_name file_name (name);
   string orig_ext = file_name.ext_;
   for (int i = 0; extensions[i]; i++)
     {
       file_name.ext_ = orig_ext;
       if (*extensions[i] && !file_name.ext_.empty ())
-       file_name.ext_ += ".";
+        file_name.ext_ += ".";
       file_name.ext_ += extensions[i];
       string found = find (file_name.to_string ());
       if (!found.empty ())
-       return found;
+        return found;
     }
-  
+
   return "";
 }
 
@@ -189,7 +189,7 @@ File_path::to_string () const
     {
       s = s + dirs_[i];
       if (i < dirs_.size () - 1)
-       s += ::to_string (PATHSEP);
+        s += ::to_string (PATHSEP);
     }
   return s;
 }
index 51e11d896c3908ba0056ce71894e0f1942095f65..915509b272882cfb43d6fed9fb050a9624b75fd9 100644 (file)
@@ -62,10 +62,10 @@ Getopt_long::parselong ()
       char const *ln = option_a_[i].longname_str0_;
 
       if (ln && !strncmp (ln, optnm, searchlen))
-       {
-         found_option_ = option_a_ + i;
-         break;
-       }
+        {
+          found_option_ = option_a_ + i;
+          break;
+        }
     }
 
   if (!found_option_)
@@ -79,20 +79,20 @@ Getopt_long::parselong ()
   if (found_option_->take_arg_str0_)
     {
       if (endopt)
-       optional_argument_str0_ = endopt +1; // a '='
+        optional_argument_str0_ = endopt + 1; // a '='
       else
-       {
-         optional_argument_str0_ = arg_value_char_a_a_[array_index_];
-         array_index_++;
-       }
+        {
+          optional_argument_str0_ = arg_value_char_a_a_[array_index_];
+          array_index_++;
+        }
       if (!optional_argument_str0_)
-       report (E_ARGEXPECT);
+        report (E_ARGEXPECT);
     }
   else
     {
       optional_argument_str0_ = 0;
       if (endopt)
-       report (E_NOARGEXPECT);
+        report (E_NOARGEXPECT);
     }
 
   return found_option_;
@@ -128,9 +128,9 @@ Long_option_init::str_for_help () const
   if (take_arg_str0_)
     {
       if (longname_str0_)
-       s = s + "=";
+        s = s + "=";
       else
-       s = s + " ";
+        s = s + " ";
 
       s = s + gettext (take_arg_str0_);
     }
@@ -151,21 +151,21 @@ Getopt_long::report (Errorcod c)
     {
     case E_ARGEXPECT:
       str += _f ("option `%s' requires an argument",
-                found_option_->to_string ());
+                 found_option_->to_string ());
       break;
     case E_NOARGEXPECT:
       str += _f ("option `%s' does not allow an argument",
-                found_option_->to_string ());
+                 found_option_->to_string ());
       break;
     case E_UNKNOWNOPTION:
       str += _f ("unrecognized option: `%s'",
-                string (argument_index_
-                            ? string ("-" + string (1, arg_value_char_a_a_[array_index_][argument_index_]))
-                        : string (arg_value_char_a_a_[array_index_])));
+                 string (argument_index_
+                         ? string ("-" + string (1, arg_value_char_a_a_[array_index_][argument_index_]))
+                         : string (arg_value_char_a_a_[array_index_])));
       break;
     case E_ILLEGALARG:
       str += _f ("invalid argument `%s' to option `%s'",
-                optional_argument_str0_, found_option_->to_string ());
+                 optional_argument_str0_, found_option_->to_string ());
       break;
     default:
       assert (false);
@@ -184,8 +184,8 @@ Getopt_long::parseshort ()
   for (int i = 0; i < table_len_; i++)
     if (option_a_[i].shortname_char_ == c)
       {
-       found_option_ = option_a_ + i;
-       break;
+        found_option_ = option_a_ + i;
+        break;
       }
 
   if (!found_option_)
@@ -234,21 +234,22 @@ Getopt_long::operator () ()
   if (argument[0] != '-')
     return 0;
 
-  if (argument[1] == '-') {// what to do with "command  --  bla"
-    if (argument[2])
-      return parselong ();
-    else
-      return 0;
-  }
+  if (argument[1] == '-')  // what to do with "command  --  bla"
+    {
+      if (argument[2])
+        return parselong ();
+      else
+        return 0;
+    }
   else
     {
       if (argument[ 1 ])
-       {
-         argument_index_ = 1;
-         return parseshort ();
-       }
+        {
+          argument_index_ = 1;
+          return parseshort ();
+        }
       else
-       return 0;
+        return 0;
     }
 }
 
@@ -278,7 +279,7 @@ Getopt_long::next ()
 {
   error_ = E_NOERROR;
   while (array_index_ < argument_count_
-        && !arg_value_char_a_a_[array_index_][argument_index_])
+         && !arg_value_char_a_a_[array_index_][argument_index_])
     {
       array_index_++;
       argument_index_ = 0;
@@ -315,7 +316,7 @@ Long_option_init::table_string (Long_option_init *l)
 
   int wid = 0;
   for (int i = 0; l[i].shortname_char_ || l[i].longname_str0_; i++)
-    wid = max (int(wid), int(l[i].str_for_help ().length ()));
+    wid = max (int (wid), int (l[i].str_for_help ().length ()));
 
   for (int i = 0; l[i].shortname_char_ || l[i].longname_str0_; i++)
     {
@@ -324,7 +325,7 @@ Long_option_init::table_string (Long_option_init *l)
 
       string help_text (gettext (l[i].help_str0_));
       replace_all (&help_text, "\n",
-                  "\n" + string (wid + EXTRA_SPACES + 2, ' '));
+                   "\n" + string (wid + EXTRA_SPACES + 2, ' '));
       tabstr += s + help_text + "\n";
     }
 
@@ -334,7 +335,7 @@ Long_option_init::table_string (Long_option_init *l)
 int
 Long_option_init::compare (Long_option_init const &a, Long_option_init const &b)
 {
-  if (a.shortname_char_ && b.shortname_char_ && a.shortname_char_- b.shortname_char_)
+  if (a.shortname_char_ && b.shortname_char_ && a.shortname_char_ - b.shortname_char_)
     return a.shortname_char_ - b.shortname_char_;
 
   if (b.shortname_char_ && a.longname_str0_)
index a1d6c6d3a3ddccb9f6c05f36c6e0223e8c9276f9..26fcecc19240c8c98a06ee5e7ae03e0c73f77d07 100644 (file)
 #ifndef ARITHMETIC_OPERATOR_HH
 #define ARITHMETIC_OPERATOR_HH
 
-#define IMPLEMENT_ARITHMETIC_OPERATOR(type, op)        \
-  inline type                                  \
-  operator op (type a1, type const &a2)                \
-  {                                            \
-    a1 op ## = a2;                             \
-    return a1;                                 \
+#define IMPLEMENT_ARITHMETIC_OPERATOR(type, op) \
+  inline type                                   \
+  operator op (type a1, type const &a2)         \
+  {                                             \
+    a1 op ## = a2;                              \
+    return a1;                                  \
   }
 
 #endif /* ARITHMETIC_OPERATOR_HH */
index 4d575a38aeb276dbd5c87bd06cba729a66f9f02d..f86bf2e8340eb0dca0bb6977d8d3e1410fcaf1d1 100644 (file)
 using namespace std;
 
 enum Axis
-  {
-    X_AXIS = 0,
-    Y_AXIS = 1,
-    NO_AXES = 2,
-  };
+{
+  X_AXIS = 0,
+  Y_AXIS = 1,
+  NO_AXES = 2,
+};
 
 static inline
 Axis
index cb4cbf3d17f816b923a9319c09c2f110903302e0..9d394a1b60070def1fbc5eccdda14474ff45b0b5 100644 (file)
 #ifndef COMPARE_HH
 #define COMPARE_HH
 
-#define ONE_OPERATOR(type, function, op)       \
-  inline bool                                  \
-  operator op (type t1, type t2)               \
-  {                                            \
-    return function (t1, t2) op 0;             \
+#define ONE_OPERATOR(type, function, op)        \
+  inline bool                                   \
+  operator op (type t1, type t2)                \
+  {                                             \
+    return function (t1, t2) op 0;              \
   }
 
 /**  handy notations for a signed comparison.
      make the operators{<,<=,==,>=,>} and the MAX and MIN of two.
      Please fill a & in the type argument if necessary.
 */
-#define TEMPLATE_INSTANTIATE_COMPARE(type, function, prefix)           \
-  prefix ONE_OPERATOR (type, function, >)                              \
-    prefix ONE_OPERATOR (type, function, >=)                           \
-    prefix ONE_OPERATOR (type, function, ==)                           \
-    prefix ONE_OPERATOR (type, function, !=)                           \
-    prefix ONE_OPERATOR (type, function, <)                            \
-    prefix ONE_OPERATOR (type, function, <=)                           \
-    /* namespace std { */                                              \
+#define TEMPLATE_INSTANTIATE_COMPARE(type, function, prefix)            \
+  prefix ONE_OPERATOR (type, function, >)                               \
+    prefix ONE_OPERATOR (type, function, >=)                            \
+    prefix ONE_OPERATOR (type, function, ==)                            \
+    prefix ONE_OPERATOR (type, function, !=)                            \
+    prefix ONE_OPERATOR (type, function, <)                             \
+    prefix ONE_OPERATOR (type, function, <=)                            \
+    /* namespace std { */                                               \
     prefix inline type max (type t1, type t2) { return (t1 > t2) ? t1 : t2; } \
     prefix inline type min (type t1, type t2) { return (t1 < t2) ? t1 : t2; } \
-  /* } */                                                              \
-  /* stupid fix to allow ; */                                          \
+  /* } */                                                               \
+  /* stupid fix to allow ; */                                           \
   prefix bool operator < (type t1, type t2)
 
 #define INSTANTIATE_COMPARE(type, func) TEMPLATE_INSTANTIATE_COMPARE (type, func,)
index befd0aa2ac207e4f2a18208a45bbf0ddb611047b..6fe5efcc19c8f446ebd16e63584dd146f056c8da 100644 (file)
 #include "axis.hh"
 
 enum Direction
-  {
-    UP = 1,
-    DOWN=-1,
-    LEFT=-1,
-    RIGHT = 1,
-    MIN=-1,
-    MAX = 1,
-    CENTER = 0,
-    SMALLER=-1,
-    BIGGER = 1,
-    START = -1,
-    STOP = 1,
-
-    /*
-      This is necessary to safely write loops,
-      since
-
-      dir <= RIGHT
-
-      is otherwise transformed into true unconditionally.
-    */
-    DIRECTION_LIMIT = 2,
-    DIRECTION_NEG_LIMIT = -2,
-  };
+{
+  UP = 1,
+  DOWN = -1,
+  LEFT = -1,
+  RIGHT = 1,
+  MIN = -1,
+  MAX = 1,
+  CENTER = 0,
+  SMALLER = -1,
+  BIGGER = 1,
+  START = -1,
+  STOP = 1,
+
+  /*
+    This is necessary to safely write loops,
+    since
+
+    dir <= RIGHT
+
+    is otherwise transformed into true unconditionally.
+  */
+  DIRECTION_LIMIT = 2,
+  DIRECTION_NEG_LIMIT = -2,
+};
 
 inline Direction
 other_dir (Direction const d)
index 4db1cb133b820206937be18d500c5b00a8656ec6..2ac9f1fea98c80c3be31ba94a29d8ec34df8ae89 100644 (file)
@@ -44,7 +44,7 @@ struct Drul_array
   {
     return at (d);
   }
-  T constoperator [] (Direction d) const
+  T const &operator [] (Direction d) const
   {
     return at (d);
   }
@@ -74,7 +74,7 @@ inline Real
 linear_combination (Drul_array<Real> const &d, Real x)
 {
   return ((1.0 - x) * Real (d.at (LEFT))
-         + (x + 1.0) * Real (d.at (RIGHT))) * 0.5;
+          + (x + 1.0) * Real (d.at (RIGHT))) * 0.5;
 }
 
 #endif /* DRUL_ARRAY_HH */
index ab2558fd14730d34adb1508d62fe51f5d66d116f..462ec6045baa97fee0e8402f9c30080c70ea16bd 100644 (file)
@@ -5,8 +5,7 @@ extern "C" {
 #include <unistd.h>
 
 #include <cstdio>
-using namespace std;
-
+  using namespace std;
 
 #if (! defined (__off64_t) && ! defined (__off64_t_defined)) || ! defined (__cplusplus)
 #define off64_t unsigned long long
@@ -21,11 +20,11 @@ using namespace std;
   } lily_cookie_io_functions_t;
 
   void *lily_fopencookie (void *cookie, char const *modes,
-                         lily_cookie_io_functions_t io_funcs);
+                          lily_cookie_io_functions_t io_funcs);
 
   int lily_cookie_fclose (void *);
   int lily_cookie_fprintf (void *file, char const *format, ...)
-    __attribute__ ((format (printf, 2, 3)));
+  __attribute__ ((format (printf, 2, 3)));
   int lily_cookie_putc (int c, void *file);
 
 #ifdef __cplusplus
index f0d982f017de905de94ef63521153377f75ede48..0e67deb9dcd11208caae67f7ea4d500b110c5516 100644 (file)
@@ -34,7 +34,7 @@ public:
   string base_;
   string ext_;
 
-  File_name (string="");
+  File_name (string = "");
 
   bool is_absolute () const;
   string to_string () const;
index ba5eb8df28c11dcb218e9e9e7334b5805b06c46f..52c819822c0facc1b68405ae4f7b6fc33378e840 100644 (file)
@@ -54,7 +54,8 @@ public:
   /** errorcodes: no error, argument expected, no argument expected,
       unknown option, illegal argument (eg. int expected).  */
   enum Errorcod { E_NOERROR = 0, E_ARGEXPECT, E_NOARGEXPECT, E_UNKNOWNOPTION,
-                 E_ILLEGALARG };
+                  E_ILLEGALARG
+                };
 
   /// argument. Set to 0 if not present
   char const *optional_argument_str0_;
index f20a49d8f3f5eb6a4baa03cc6b391386e25c8a7a..39306daabfde0a7ca2e20fb70fe347d11e60a224 100644 (file)
@@ -42,7 +42,7 @@ string _ (char const *ch);
    GNU gettext
 */
 string _f (char const *format, ...)
-          __attribute__ ((format (printf, 1, 2)));
+__attribute__ ((format (printf, 1, 2)));
 string _f (char const *format, string s, string s2 = "", string s3 = "");
 /**
    va_list version of _f
index be7074c242bec76dc2a599e4e9359e6ad9e73556..1ce6ac20988318a40af72585360e26e639f40523 100644 (file)
@@ -110,10 +110,10 @@ struct Interval_t : public Drul_array<T>
   {
     if (!is_empty ())
       {
-       at (LEFT) *= r;
-       at (RIGHT) *= r;
-       if (r < T (0))
-         swap ();
+        at (LEFT) *= r;
+        at (RIGHT) *= r;
+        if (r < T (0))
+          swap ();
       }
     return *this;
   }
@@ -228,7 +228,7 @@ Interval_t<T>::center () const
 }
 
 typedef Interval_t<Real> Interval;
-typedef Interval_t<int> Slice; // weird name
+typedef Interval_t<int> Slice;  // weird name
 
 
 #endif // INTERVAL_HH
index 2f002a7e008e24e438d306299268e2aeb8290013..b37f97261231420c224624a265b1b55ea546df9e 100644 (file)
@@ -70,14 +70,14 @@ void
 Interval_t<T>::set_empty ()
 {
   at (LEFT) = (T) infinity ();
-  at (RIGHT) = (T) -infinity ();
+  at (RIGHT) = (T) - infinity ();
 }
 
 template<class T>
 void
 Interval_t<T>::set_full ()
 {
-  at (LEFT) = (T) -infinity ();
+  at (LEFT) = (T) - infinity ();
   at (RIGHT) = (T) infinity ();
 }
 
@@ -149,7 +149,7 @@ Interval_t<T>::to_string () const
   string s ("[");
 
   return (s + T_to_string (at (LEFT)) + string (",")
-         + T_to_string (at (RIGHT)) + string ("]"));
+          + T_to_string (at (RIGHT)) + string ("]"));
 }
 
 template<class T>
@@ -159,7 +159,7 @@ Interval_t<T>::contains (T r) const
   return r >= at (LEFT) && r <= at (RIGHT);
 }
 
-#define INTERVAL__INSTANTIATE(T) struct Interval_t<T>;                 \
+#define INTERVAL__INSTANTIATE(T) struct Interval_t<T>;                  \
   template int Interval__compare (const Interval_t<T> &, Interval_t<T> const &)
 
 #endif // INTERVAL_TCC
index 3f356582c7b4672278044d28fcc92746378ab516..2d2c397c13c497e536fdd5b0742701c218ba1e4d 100644 (file)
@@ -29,9 +29,9 @@ using namespace std;
 char *strnlwr (char *start, int n);
 char *strnupr (char *start, int n);
 
-#if ! HAVE_MEMMEM              /* GNU extension. */
+#if ! HAVE_MEMMEM               /* GNU extension. */
 void *memmem (void const *haystack, int haystack_len,
-             void const *needle, int needle_len);
+              void const *needle, int needle_len);
 #endif /* HAVE_MEMMEM */
 
 #if ! HAVE_MEMRCHR
@@ -45,18 +45,18 @@ unsigned char *memrev (unsigned char *byte, int length_i);
 double my_round (double);
 
 /* namespace std { */
-  
-#if ! HAVE_SNPRINTF            /* GNU extension. */
+
+#if ! HAVE_SNPRINTF             /* GNU extension. */
 int snprintf (char *str, size_t n, char const *format, ...);
- __attribute__ ((format (printf, 3, 4)));
+__attribute__ ((format (printf, 3, 4)));
 #endif
 
-#if ! HAVE_VSNPRINTF           /* GNU extension. */
+#if ! HAVE_VSNPRINTF            /* GNU extension. */
 int vsnprintf (char *str, size_t, char const *format, va_list args);
 #endif
 
 #ifndef isinf
-#if ! HAVE_ISINF               /* BSD extension. */
+#if ! HAVE_ISINF                /* BSD extension. */
 int isinf (double x);
 #endif
 #endif
index 0447d4a17b19cbc73eb4de7b153f303014bbbd26..ac4c4327ebbd2bbb39cef80be44a14a71d737f8b 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "std-vector.hh"
 
-template<class T, class A=std::allocator<T> >
+template<class T, class A = std::allocator<T> >
 class Matrix
 {
 public:
@@ -32,7 +32,7 @@ public:
   }
 
   Matrix<T, A> (vsize rows, vsize columns, T const &t)
-  : data_(rows * columns, t)
+    : data_ (rows *columns, t)
   {
     rank_ = rows;
   }
@@ -57,15 +57,15 @@ public:
       data_.resize (rows * columns, t);
     else
       {
-       vector<T,A> new_data;
-       new_data.resize (rows * columns, t);
-       vsize cur_cols = rank_ ? data_.size () / rank_: 0;
-
-       for (vsize i = 0; i < cur_cols; i++)
-         for (vsize j = 0; j < rank_; j++)
-           new_data[i*rows + j] = data_[i*rank_ + j];
-       rank_ = rows;
-       data_ = new_data;
+        vector<T, A> new_data;
+        new_data.resize (rows * columns, t);
+        vsize cur_cols = rank_ ? data_.size () / rank_ : 0;
+
+        for (vsize i = 0; i < cur_cols; i++)
+          for (vsize j = 0; j < rank_; j++)
+            new_data[i * rows + j] = data_[i * rank_ + j];
+        rank_ = rows;
+        data_ = new_data;
       }
   }
 
index e5ee4d0730620e5bcb366a127416f03f1d9b581a..198c601cff36dc562ea7702abee325df62437684 100644 (file)
@@ -24,7 +24,6 @@
 #include "std-string.hh"
 #include "real.hh"
 
-
 /*
   This is a mixture a 2D vector. Sometimes it can
   also be convenient to think of 2D vectors as complex numbers
@@ -79,7 +78,7 @@ public:
 
   Offset &operator /= (Real a)
   {
-    (*this) *= 1/a;
+    (*this) *= 1 / a;
     return *this;
   }
 
@@ -111,7 +110,7 @@ public:
   }
   Offset direction () const;
   Offset swapped () const;
-  
+
   Real arg () const;
   Real angle_degrees () const;
   Real length () const;
@@ -124,8 +123,6 @@ IMPLEMENT_ARITHMETIC_OPERATOR (Offset, +);
 IMPLEMENT_ARITHMETIC_OPERATOR (Offset, -);
 IMPLEMENT_ARITHMETIC_OPERATOR (Offset, *);
 
-
-
 Offset complex_multiply (Offset, Offset);
 Offset complex_divide (Offset, Offset);
 Offset complex_exp (Offset);
index 7af20291e46ea5415db21d8f2564bd7c65e2cda4..796de9e522a5b8d063360166da040b8c3aec73fd 100644 (file)
@@ -27,7 +27,7 @@ using namespace std;
 template<class T>
 class Link_array : public vector<T *>
 {
-  
+
 };
 
 #endif // PARRAY_HH
index 6959dc40bfddbad1d68ce09976bb8637a516cf11..f575be35fd5a4ec5a0b17d2cfc2f0232360429f3 100644 (file)
 #include "arithmetic-operator.hh"
 #include "real.hh"
 
-/// structure for a polynomial in one var. 
+/// structure for a polynomial in one var.
 struct Polynomial
 {
   /// degree of polynomial
   int degree ()const;
 
-  /// coefficients 
+  /// coefficients
   vector<Real> coefs_;
 
   // leading coef
@@ -62,7 +62,7 @@ struct Polynomial
   void operator *= (Polynomial const &p2);
   void operator -= (Polynomial const &p2);
   Polynomial (Real a, Real b = 0.0);
-  Polynomial (){}
+  Polynomial () {}
   void set_negate (const Polynomial &src);
 
   /// take the derivative
index 981a37e463633968aaad6f288ad7a13f382229d4..96ae5da2223c97a921e4f7d86e8846e4994d59c4 100644 (file)
@@ -89,14 +89,14 @@ public:
     vsize j = i / 2;
     while (j)
       {
-       if (compare (elt (j), v) > 0)
-         {
-           elt (i) = elt (j);
-           i = j;
-           j = i / 2;
-         }
-       else
-         break;
+        if (compare (elt (j), v) > 0)
+          {
+            elt (i) = elt (j);
+            i = j;
+            j = i / 2;
+          }
+        else
+          break;
       }
     elt (i) = v;
     OK ();
@@ -117,13 +117,13 @@ public:
 
     while (mini < size ())
       {
-       if (compare (elt (mini + 1), elt (mini)) < 0)
-         mini++;
-       if (compare (last, elt (mini)) < 0)
-         break;
-       elt (lasti) = elt (mini);
-       lasti = mini;
-       mini *= 2;
+        if (compare (elt (mini + 1), elt (mini)) < 0)
+          mini++;
+        if (compare (last, elt (mini)) < 0)
+          break;
+        elt (lasti) = elt (mini);
+        lasti = mini;
+        mini *= 2;
       }
     elt (lasti) = last;
     heap_array_.pop_back ();
index bf01c8b9311572694af3d52ee81aaf7c06006c8f..b0dd95b10bb5f1541acf1d474d446acada28ec08 100644 (file)
@@ -74,7 +74,8 @@ public:
   Rational (Rational const &r) { copy (r);}
   Rational &operator = (Rational const &r)
   {
-    copy (r); return *this;
+    copy (r);
+    return *this;
   }
 
   Rational &operator *= (Rational);
@@ -89,11 +90,11 @@ public:
 
 #include "arithmetic-operator.hh"
 
-IMPLEMENT_ARITHMETIC_OPERATOR (Rational, /);
+IMPLEMENT_ARITHMETIC_OPERATOR (Rational, / );
 IMPLEMENT_ARITHMETIC_OPERATOR (Rational, +);
 IMPLEMENT_ARITHMETIC_OPERATOR (Rational, *);
 IMPLEMENT_ARITHMETIC_OPERATOR (Rational, -);
-IMPLEMENT_ARITHMETIC_OPERATOR (Rational, %);
+IMPLEMENT_ARITHMETIC_OPERATOR (Rational, % );
 
 INSTANTIATE_COMPARE (Rational const &, Rational::compare);
 
index a104454ad54783ea37083fec9390dc00c0ccf1be..f7847ae7ac36b68244c18a6c66b3c54154379edf 100644 (file)
@@ -29,7 +29,7 @@ typedef double Real;
 extern const Real infinity_f;
 
 /* namespace std { */
-  
+
 template<class T> inline T abs (T x)
 {
   return x > 0 ? x : -x;
index fc4a1d17452304f8ccd1aea733332418e2c24fd0..e3d790b43b4b3c753dd004dad47127b27ed2f453 100644 (file)
@@ -19,7 +19,7 @@
 
 #ifndef STD_STRING_HH
 #define STD_STRING_HH
+
 #include "compare.hh"
 #include "flower-proto.hh"
 
@@ -40,24 +40,23 @@ typedef size_t ssize;
 #define NPOS string::npos
 
 string to_string (string s);
-string to_string (char c, int n=1);
-string to_string (int i, char const *format=0);
-string to_string (double f, char const *format=0);
+string to_string (char c, int n = 1);
+string to_string (int i, char const *format = 0);
+string to_string (double f, char const *format = 0);
 string to_string (long);
 string to_string (long unsigned);
-string to_string (I64, char const *format=0);
+string to_string (I64, char const *format = 0);
 string to_string (unsigned);
 string to_string (bool b);
 string to_string (char const *format, ...)
-  __attribute__ ((format (printf, 1, 2)));
-  
-string &replace_all (stringstr, string const &find, string const &replace);
-string &replace_all (stringstr, char find, char replace);
+__attribute__ ((format (printf, 1, 2)));
+
+string &replace_all (string *str, string const &find, string const &replace);
+string &replace_all (string *str, char find, char replace);
 char *string_copy (string s);
 
 int string_compare (string const &, string const &);
 
 INSTANTIATE_COMPARE (string const &, string_compare);
 
-
 #endif /* STD_STRING_HH */
index 43fed22f6846af88b99c8b8dec7f1944e9b25f55..1d0cbbac3a2ad08a8d230482c09fc4ebffdd916b 100644 (file)
@@ -74,40 +74,41 @@ typedef size_t vsize;
 #include <vector>
 #undef vector
 
-namespace std {
+namespace std
+{
+
+/* Interface without pointer arithmetic (iterator) semantics.  */
+template<typename T, typename A = std::allocator<T> >
+class vector : public __flower_vector<T, A>
+{
+public:
+  typedef typename __flower_vector<T>::iterator iterator;
+  typedef typename __flower_vector<T>::const_iterator const_iterator;
+
+  vector<T, A> () : __flower_vector<T, A> ()
+  {
+  }
+
+  vector<T, A> (vector<T, A> const &v) : __flower_vector<T, A> (v)
+  {
+  }
 
-  /* Interface without pointer arithmetic (iterator) semantics.  */
-  template<typename T, typename A=std::allocator<T> >
-  class vector : public __flower_vector<T, A>
+  vector<T, A> (const_iterator b, const_iterator e) : __flower_vector<T, A> (b, e)
   {
-  public:
-    typedef typename __flower_vector<T>::iterator iterator;
-    typedef typename __flower_vector<T>::const_iterator const_iterator;
-
-    vector<T, A> () : __flower_vector<T, A> ()
-    {
-    }
-
-    vector<T, A> (vector<T, A> const& v) : __flower_vector<T, A> (v)
-    {
-    }
-
-    vector<T, A> (const_iterator b, const_iterator e) : __flower_vector<T, A> (b, e)
-    {
-    }
-
-    T*
-    data ()
-    {
-      return &(*this)[0];
-    }
-
-    T const*
-    data () const
-    {
-      return &(*this)[0];
-    }
-  };
+  }
+
+  T *
+  data ()
+  {
+    return &(*this)[0];
+  }
+
+  T const *
+  data () const
+  {
+    return &(*this)[0];
+  }
+};
 
 } /* namespace std */
 
@@ -137,7 +138,7 @@ back (vector<T> const &v, vsize i)
 }
 
 template<typename T>
-T&
+T &
 back (vector<T> &v, vsize i)
 {
   return v[v.size () - i - 1];
@@ -145,7 +146,7 @@ back (vector<T> &v, vsize i)
 
 template<typename T>
 void
-concat (vector<T> &v, vector<T> constw)
+concat (vector<T> &v, vector<T> const &w)
 {
   v.insert (v.end (), w.begin (), w.end ());
 }
@@ -153,16 +154,16 @@ concat (vector<T> &v, vector<T> const& w)
 template<typename T, typename Compare>
 vsize
 lower_bound (vector<T> const &v,
-            T const &key,
-            Compare less,
-            vsize b=0, vsize e=VPOS)
+             T const &key,
+             Compare less,
+             vsize b = 0, vsize e = VPOS)
 {
   if (e == VPOS)
     e = v.size ();
   typename vector<T>::const_iterator i = lower_bound (v.begin () + b,
-                                                     v.begin () + e,
-                                                     key,
-                                                     less);
+                                                      v.begin () + e,
+                                                      key,
+                                                      less);
 
   return i - v.begin ();
 }
@@ -170,17 +171,17 @@ lower_bound (vector<T> const &v,
 template<typename T, typename Compare>
 vsize
 upper_bound (vector<T> const &v,
-            T const &key,
-            Compare less,
-            vsize b=0, vsize e=VPOS)
+             T const &key,
+             Compare less,
+             vsize b = 0, vsize e = VPOS)
 {
   if (e == VPOS)
     e = v.size ();
 
   typename vector<T>::const_iterator i = upper_bound (v.begin () + b,
-                                                     v.begin () + e,
-                                                     key,
-                                                     less);
+                                                      v.begin () + e,
+                                                      key,
+                                                      less);
 
   return i - v.begin ();
 }
@@ -188,9 +189,9 @@ upper_bound (vector<T> const &v,
 template<typename T, typename Compare>
 vsize
 binary_search (vector<T> const &v,
-              T const &key,
-              Compare less=less<T> (),
-              vsize b=0, vsize e=VPOS)
+               T const &key,
+               Compare less = less<T> (),
+               vsize b = 0, vsize e = VPOS)
 {
   vsize lb = lower_bound (v, key, less, b, e);
 
@@ -202,8 +203,8 @@ binary_search (vector<T> const &v,
 template<typename T, typename Compare>
 void
 vector_sort (vector<T> &v,
-            Compare less,
-            vsize b=0, vsize e=VPOS)
+             Compare less,
+             vsize b = 0, vsize e = VPOS)
 {
   if (e == VPOS)
     e = v.size ();
@@ -236,7 +237,7 @@ find (vector<T> const &v, T const &key)
 
 template<typename T> struct del : public unary_function<T, void>
 {
-  void operator() (T x)
+  void operator () (T x)
   {
     delete x;
     x = 0;
index 21ec7f189e2dcd7789623ae1f31df4b8af29c7d3..55c14866a1785913e4cedfc9896df06844b5580e 100644 (file)
@@ -31,7 +31,7 @@ public:
   static int dec2int (string dec_string);
   static double dec2double (string dec_string);
   static string double_string (double f, char const *fmt = 0);
-  static string form_string (char const *format, ...) __attribute__ ((format (printf, 1,2)));
+  static string form_string (char const *format, ...) __attribute__ ((format (printf, 1, 2)));
   static string vform_string (char const *format, va_list args);
   static int hex2int (string str);
   static unsigned hex2unsigned (string str);
index 1f8b0b28fb61fc2886f119d06fae6d0f753bfb61..3c4c6112b6e746a11de8115dd6fb9341783bd14f 100644 (file)
@@ -27,7 +27,7 @@ struct Tuple
   Tuple ()
   {
   }
-  
+
   Tuple (T const *src)
   {
     for (int i = 0; i < N; i++)
@@ -42,28 +42,27 @@ struct Tuple2 : public Tuple<K, 2>
   {
 
   }
-  
+
   Tuple2 (K a, K b)
   {
-    Tuple<K,2> *p(this);       //  ugr.
-    
+    Tuple<K, 2> *p (this);       //  ugr.
+
     p->t_array[0] = a;
     p->t_array[1] = b;
   }
 };
 
-  
 template<class T, int N>
 inline bool
-operator<(Tuple<T, N> const &t1,
-         Tuple<T, N> const &t2)
+operator <(Tuple<T, N> const &t1,
+           Tuple<T, N> const &t2)
 {
-  for (int i = 0; i < N ; i++)
+  for (int i = 0; i < N; i++)
     {
       if (t1.t_array[i] > t2.t_array[i])
-       return false;
+        return false;
       if (t1.t_array[i] < t2.t_array[i])
-       return true;
+        return true;
     }
 
   return false;
index 1d6b02388eb059f1d53dad8779fe929ba22b7602..aa76632a9d3469f5824ddc84c83251882be6c913 100644 (file)
@@ -23,9 +23,7 @@
 #include <typeinfo>
 using namespace std;
 
-
 /*
-
 Virtual copy constructor.  Make up for C++'s lack of a standard
 factory or clone () function.  Usage:
 
@@ -33,19 +31,18 @@ class Foo : Baseclass
 {
 VIRTUAL_COPY_CONSTRUCTOR (Baseclass, Foo);
 };
-
 */
 
 #define DECLARE_CLASSNAME(name) \
-  virtual const char *class_name () const {    \
+  virtual const char *class_name () const {     \
     return #name; \
 }
 
-#define VIRTUAL_COPY_CONSTRUCTOR(Base, name)   \
+#define VIRTUAL_COPY_CONSTRUCTOR(Base, name)    \
   DECLARE_CLASSNAME(name);\
-  virtual Base *clone () const                 \
-  {                                            \
-    return new name (*this);                   \
+  virtual Base *clone () const                  \
+  {                                             \
+    return new name (*this);                    \
   }
 
 #endif /* VIRTUAL_METHODS_HH */
index 57429e64baa362c380a7eda4c3e10a75cc71654a..ed7bc0c581ee966573acef30df86daccfb6d3769 100644 (file)
@@ -6,7 +6,7 @@
 #define TEST_PARAMETER(Suite, Case, Type, value) \
   namespace { \
     struct Case: public yaffut::Test<Suite, Case>{ \
-       Type parameter_one_; \
+        Type parameter_one_; \
         Case (); \
     }; \
   } \
index e324922b69738c60abbc17c7ab88b46ef3b789b8..376c036ed1ff617304395f61ac86aca52fe2acf6 100644 (file)
 #define ASSERT_THROW YAFFUT_ASSERT_THROW
 #endif
 
-namespace yaffut {
+namespace yaffut
+{
 
 template <typename T>
-std::string demangle()
+std::string demangle ()
 {
   size_t sz;
   int status;
-  char* ptr = abi::__cxa_demangle(typeid(T).name(), 0, &sz, &status);
-  std::string name(ptr ? ptr : "", ptr ? strlen(ptr) : 0);
-  if(ptr){ free(ptr); }
-  std::string::size_type pos = name.rfind("::");
-  if(pos != std::string::npos)
-  {
-    name = name.substr(pos + 2);
-  }  
+  char *ptr = abi::__cxa_demangle (typeid (T).name (), 0, &sz, &status);
+  std::string name (ptr ? ptr : "", ptr ? strlen (ptr) : 0);
+  if (ptr) { free (ptr); }
+  std::string::size_type pos = name.rfind ("::");
+  if (pos != std::string::npos)
+    {
+      name = name.substr (pos + 2);
+    }
   return name;
 }
 
 struct ITest
 {
-  virtual ~ITest(){}
+  virtual ~ITest () {}
 };
 
 class Factory
 {
 public:
-  typedef ITest(*Create_t) ();
+  typedef ITest *(*Create_t) ();
 private:
   typedef std::map<std::string, Create_t> Tests_t;
   Tests_t m_Tests;
   size_t m_fail;
   size_t m_pass;
 private:
-  Factory(){}
-  ~Factory(){}
-  static bool EqualsSuiteName (std::string const &name, std::string consts)
+  Factory () {}
+  ~Factory () {}
+  static bool EqualsSuiteName (std::string const &name, std::string const &s)
   {
     return name.find (':') >= name.length () - 2
-      && s.substr (0, name.length ()) == name;
+           && s.substr (0, name.length ()) == name;
   }
 public:
-  static Factory& Instance()
+  static Factory &Instance ()
   {
     static Factory instance;
     return instance;
   }
-  void Register(const std::string& name, Create_t create)
+  void Register (const std::string &name, Create_t create)
   {
     m_Tests[name] = create;
   }
   size_t Fail () { return m_fail; }
-  void List(const std::string& name)
+  void List (const std::string &name)
   {
-    for(Tests_t::const_iterator it = m_Tests.begin(); it != m_Tests.end(); ++it)
-    {
-      if(name.empty () || it->first == name
-        || EqualsSuiteName (name, it->first))
-       std::cout << it->first << std::endl;
-    }
+    for (Tests_t::const_iterator it = m_Tests.begin (); it != m_Tests.end (); ++it)
+      {
+        if (name.empty () || it->first == name
+            || EqualsSuiteName (name, it->first))
+          std::cout << it->first << std::endl;
+      }
   }
-  void Run(const std::string& name)
+  void Run (const std::string &name)
   {
-    for(Tests_t::const_iterator it = m_Tests.begin(); it != m_Tests.end(); ++it)
-    {
-      if("All" == name || it->first == name
-        || EqualsSuiteName (name, it->first))
+    for (Tests_t::const_iterator it = m_Tests.begin (); it != m_Tests.end (); ++it)
       {
-        try
-        {
-          std::cout << std::endl << it->first << ' ' << std::flush;
+        if ("All" == name || it->first == name
+            || EqualsSuiteName (name, it->first))
           {
-            std::auto_ptr<ITest> test(it->second());
+            try
+              {
+                std::cout << std::endl << it->first << ' ' << std::flush;
+                {
+                  std::auto_ptr<ITest> test (it->second ());
+                }
+                std::cout << "[OK]" << std::flush;
+                ++m_pass;
+              }
+            catch (const std::exception &e)
+              {
+                std::cout << "[FAIL]\n  " << e.what () << std::flush;
+                ++m_fail;
+              }
+            catch (...)
+              {
+                std::cout << "[FAIL]\n  unknown exception" << std::flush;
+                ++m_fail;
+              }
           }
-          std::cout << "[OK]" << std::flush;
-          ++m_pass;
-        }
-        catch(const std::exception& e)
-        {
-          std::cout << "[FAIL]\n  " << e.what() << std::flush;
-          ++m_fail;
-        }
-        catch(...)
-        {
-          std::cout << "[FAIL]\n  unknown exception" << std::flush;
-          ++m_fail;
-        }
       }
-    }
   }
   void Report ()
   {
-    const size_t size = m_Tests.size();
+    const size_t size = m_Tests.size ();
     std::cout << std::endl;
     std::cout << "[TOTAL](" << m_pass + m_fail << '/' << size << ")" << std::endl;
     std::cout << "[OK](" << m_pass << '/' << size << ")" << std::endl;
     if (m_fail)
       std::cout << "[FAIL](" << m_fail << '/' << size << ")" << std::endl;
   }
-  int Main (int argc, const charargv[])
+  int Main (int argc, const char *argv[])
   {
-    if(argc > 1
-       && (std::string(argv[1]) == "-h" || std::string(argv[1]) == "--help"))
-    {
-      std::cout << "Yaffut - Yet Another Framework For Unit Testing.\n\n"
-       "Usage: yaffut [OPTION] [Suite:|Suite::Test]...\n\n"
-       "Options:\n"
-       "  -h, --help  show this help\n"
-       "  -l, --list  list test cases" << std::endl;
-      return 0;
-    }
-    if(argc > 1
-       && (std::string(argv[1]) == "-l" || std::string(argv[1]) == "--list"))
-    {
-      Factory::Instance().List(argc > 2 ? argv[2] : "");
-      return 0;
-    }
+    if (argc > 1
+        && (std::string (argv[1]) == "-h" || std::string (argv[1]) == "--help"))
+      {
+        std::cout << "Yaffut - Yet Another Framework For Unit Testing.\n\n"
+                  "Usage: yaffut [OPTION] [Suite:|Suite::Test]...\n\n"
+                  "Options:\n"
+                  "  -h, --help  show this help\n"
+                  "  -l, --list  list test cases" << std::endl;
+        return 0;
+      }
+    if (argc > 1
+        && (std::string (argv[1]) == "-l" || std::string (argv[1]) == "--list"))
+      {
+        Factory::Instance ().List (argc > 2 ? argv[2] : "");
+        return 0;
+      }
 
-    const charall[] = {"All"};
-    const char** test = all;
+    const char *all[] = {"All"};
+    const char **test = all;
     int num = 1;
-    if(1 < argc)
-    {
-      test = argv;
-      num = argc;
-    }
-    
-    for(int i = 0; i < num; ++i)
-    {
-      try
+    if (1 < argc)
       {
-       Factory::Instance().Run(test[i]);
+        test = argv;
+        num = argc;
       }
-      catch(const std::exception& e)
+
+    for (int i = 0; i < num; ++i)
       {
-       std::clog << e.what() << std::endl;
+        try
+          {
+            Factory::Instance ().Run (test[i]);
+          }
+        catch (const std::exception &e)
+          {
+            std::clog << e.what () << std::endl;
+          }
       }
-    }
 
-    Factory::Instance().Report ();
-    return Factory::Instance().Fail ();
+    Factory::Instance ().Report ();
+    return Factory::Instance ().Fail ();
   }
 };
 
@@ -207,37 +208,37 @@ class failure: public std::exception
   std::string failure_;
 public:
   template <typename Expected, typename Actual>
-  failure(const Expected& e, Actual& a, const char* at = "", const char* expr = "")
+  failure (const Expected &e, Actual &a, const char *at = "", const char *expr = "")
   {
     std::ostringstream os;
     os << at << expr << "\nexpected: "
        << "(" << demangle<Expected>() << ") " << e
        << " != actual: " << "(" << demangle<Actual>() << ") " << a;
-    failure_ = os.str();
+    failure_ = os.str ();
   }
-  failure(const char* at = "", const char* expr = "")
+  failure (const char *at = "", const char *expr = "")
   {
     std::ostringstream os;
     os << at << expr;
-    failure_ = os.str();
+    failure_ = os.str ();
   }
-  virtual ~failure() throw() {}
-  virtual const char* what() const throw() { return failure_.c_str(); }
+  virtual ~failure () throw () {}
+  virtual const char *what () const throw () { return failure_.c_str (); }
 };
 
 template <typename Suite, typename Case>
 struct Registrator
 {
-  Registrator()
+  Registrator ()
   {
-    Factory::Instance().Register(TestName(), Create);
+    Factory::Instance ().Register (TestName (), Create);
   }
-  const std::string& TestName()
+  const std::string &TestName ()
   {
-    static const std::string name(demangle<Suite>() + "::" + demangle<Case>());
+    static const std::string name (demangle<Suite>() + "::" + demangle<Case>());
     return name;
   }
-  static ITest* Create()
+  static ITest *Create ()
   {
     return new Case;
   }
@@ -246,133 +247,129 @@ struct Registrator
 template <typename Case>
 struct Registrator<Case, void>
 {
-  Registrator()
+  Registrator ()
   {
-    Factory::Instance().Register(TestName(), Create);
+    Factory::Instance ().Register (TestName (), Create);
   }
-  const std::string& TestName()
+  const std::string &TestName ()
   {
     static const std::string name ("::" + demangle<Case>());
     return name;
   }
-  static ITest* Create()
+  static ITest *Create ()
   {
     return new Case;
   }
 };
 
-
 template <typename Suite, typename Case = void>
 struct Test: public ITest, public virtual Suite
 {
   static Registrator<Suite, Case> s_Registrator;
-  Test(): Suite()
+  Test (): Suite ()
   {
     Registrator<Suite, Case>* r = &s_Registrator;
     r = 0;
   }
   template <typename E, typename T>
-  void assert_throw(void(T::*mf)(), const char* at)
+  void assert_throw (void (T::*mf) (), const char *at)
   {
     try
-    {
-      (dynamic_cast<T*> (this)->*mf)();
-      throw yaffut::failure (at, "statement failed to throw");
-    }
-    catch(const E&){}
+      {
+        (dynamic_cast<T *> (this)->*mf) ();
+        throw yaffut::failure (at, "statement failed to throw");
+      }
+    catch (const E &) {}
   }
 };
 
 template <typename Suite, typename Case>
 Registrator<Suite, Case> Test<Suite, Case>::s_Registrator;
 
-
 template <typename Case>
 struct Test<Case, void>: public ITest
 {
   static Registrator<Case, void> s_Registrator;
-  Test()
+  Test ()
   {
     Registrator<Case, void>* r = &s_Registrator;
     r = 0;
   }
   template <typename E, typename T>
-  void assert_throw(void(T::*mf)(), const char* at)
+  void assert_throw (void (T::*mf) (), const char *at)
   {
     try
-    {
-      (dynamic_cast<T*> (this)->*mf)();
-      throw yaffut::failure (at, "statement failed to throw");
-    }
-    catch(const E&){}
+      {
+        (dynamic_cast<T *> (this)->*mf) ();
+        throw yaffut::failure (at, "statement failed to throw");
+      }
+    catch (const E &) {}
   }
 };
 
 template <typename Case>
 Registrator<Case, void> Test<Case, void>::s_Registrator;
 
-
-
 template <typename Expected, typename Actual>
-void equal(const Expected& e, const Actual& a, const char* at = "", const char* expr = "")
+void equal (const Expected &e, const Actual &a, const char *at = "", const char *expr = "")
 {
-  if(e != a)
-  {
-    throw failure(e, a, at, expr);
-  }
+  if (e != a)
+    {
+      throw failure (e, a, at, expr);
+    }
 }
-inline void equal(double e, double a, const char* at = "", const char* expr = "")
+inline void equal (double e, double a, const char *at = "", const char *expr = "")
 {
-  double max = std::abs(std::max(e, a));
+  double max = std::abs (std::max (e, a));
   max = max < 1.0 ? 1.0 : max;
-  if(std::abs(e - a) > std::numeric_limits<double>::epsilon() * max)
-  {
-    throw failure(e, a, at, expr);
-  }
+  if (std::abs (e - a) > std::numeric_limits<double>::epsilon () * max)
+    {
+      throw failure (e, a, at, expr);
+    }
 }
-inline void check(bool b, const char* at = "", const char* expr = "")
-{ 
-  if(!b)
-  {
-    throw failure(at, expr);
-  }
+inline void check (bool b, const char *at = "", const char *expr = "")
+{
+  if (!b)
+    {
+      throw failure (at, expr);
+    }
 }
 
 template <typename Expected, typename Actual>
-void unequal(const Expected& e, const Actual& a, const char* at = "", const char* expr = "")
+void unequal (const Expected &e, const Actual &a, const char *at = "", const char *expr = "")
 {
-  if(e == a)
-  {
-    throw failure(e, a, at, expr);
-  }
+  if (e == a)
+    {
+      throw failure (e, a, at, expr);
+    }
 }
-inline void unequal(double e, double a, const char* at = "", const char* expr = "")
+inline void unequal (double e, double a, const char *at = "", const char *expr = "")
 {
-  double max = std::abs(std::max(e, a));
+  double max = std::abs (std::max (e, a));
   max = max < 1.0 ? 1.0 : max;
-  if(std::abs(e - a) <= std::numeric_limits<double>::epsilon() * max)
-  {
-    throw failure(e, a, at, expr);
-  }
+  if (std::abs (e - a) <= std::numeric_limits<double>::epsilon () * max)
+    {
+      throw failure (e, a, at, expr);
+    }
 }
 
 template <typename T>
-void fail(const T& expr, const char* at = "")
+void fail (const T &expr, const char *at = "")
 {
   std::ostringstream os;
   os << expr;
-  throw failure(at, os.str().c_str());
+  throw failure (at, os.str ().c_str ());
 }
 
 template <typename E>
-void assert_throw(void(*pf)(), const char* at = "")
+void assert_throw (void (*pf) (), const char *at = "")
 {
   try
-  {
-    (*pf)();
-    throw failure (at, " statement failed to throw");
-  }
-  catch(const E&){}
+    {
+      (*pf) ();
+      throw failure (at, " statement failed to throw");
+    }
+  catch (const E &) {}
 }
 
 }
@@ -390,10 +387,10 @@ void assert_throw(void(*pf)(), const char* at = "")
 
 #include <iostream>
 
-int main(int argc, const char* argv[])
+int main (int argc, const char *argv[])
 {
-  std::cout << "pid(" << getpid() << ")" << std::endl;
-  return yaffut::Factory::Instance().Main (argc, argv);
+  std::cout << "pid(" << getpid () << ")" << std::endl;
+  return yaffut::Factory::Instance ().Main (argc, argv);
 };
 
 #endif /* YAFFUT_MAIN */
index 17a9d49007d853be5d9c3266541ed248b3f723ca..06f9de257c35e0559cf9034fcacfa07df76176eb 100644 (file)
@@ -58,5 +58,5 @@ string
 _f (char const *format, string s, string s2, string s3)
 {
   return String_convert::form_string (gettext (format), s.c_str (), s2.c_str (),
-                                     s3.c_str ());
+                                      s3.c_str ());
 }
index 24b05c84196175c571415928e665d165b027a667..193be7f7f1605fda8e22d5b6c1cba5a23f5e8ba9 100644 (file)
@@ -51,26 +51,26 @@ Interval_set::remove_interval (Interval rm)
       s.intersect (allowed_regions_[i]);
 
       if (!s.is_empty ())
-       {
-         Interval before = allowed_regions_[i];
-         Interval after = allowed_regions_[i];
+        {
+          Interval before = allowed_regions_[i];
+          Interval after = allowed_regions_[i];
 
-         before[RIGHT] = s[LEFT];
-         after[LEFT] = s[RIGHT];
+          before[RIGHT] = s[LEFT];
+          after[LEFT] = s[RIGHT];
 
-         if (!before.is_empty () && before.length () > 0.0)
-           {
-             allowed_regions_.insert (allowed_regions_.begin () + i, before);
-             i++;
-           }
-         allowed_regions_.erase (allowed_regions_.begin () + i);
-         if (!after.is_empty () && after.length () > 0.0)
-           {
-             allowed_regions_.insert (allowed_regions_.begin () + i, after);
-             i++;
-           }
-       }
+          if (!before.is_empty () && before.length () > 0.0)
+            {
+              allowed_regions_.insert (allowed_regions_.begin () + i, before);
+              i++;
+            }
+          allowed_regions_.erase (allowed_regions_.begin () + i);
+          if (!after.is_empty () && after.length () > 0.0)
+            {
+              allowed_regions_.insert (allowed_regions_.begin () + i, after);
+              i++;
+            }
+        }
       else
-       i++;
+        i++;
     }
 }
index fee28d8e15d313f1f7e9e5ea88f85d54316b8a97..f2a1bb1ea936b9a62c4c3218eb2342f0c12f8f3e 100644 (file)
@@ -60,7 +60,7 @@ strnupr (char *start, int n)
 
 unsigned char *
 _memmem (unsigned char const *haystack, int haystack_len,
-        unsigned char const *needle, int needle_len)
+         unsigned char const *needle, int needle_len)
 {
   unsigned char const *end_haystack = haystack + haystack_len - needle_len + 1;
   unsigned char const *end_needle = needle + needle_len;
@@ -72,12 +72,12 @@ _memmem (unsigned char const *haystack, int haystack_len,
       unsigned char const *subneedle = needle;
       unsigned char const *subhaystack = haystack;
       while (subneedle < end_needle)
-       if (*subneedle++ != *subhaystack++)
-         goto next;
+        if (*subneedle++ != *subhaystack++)
+          goto next;
 
       /* Completed the needle.  Gotcha.  */
       return (unsigned char *) haystack;
-    next:
+next:
       haystack++;
     }
   return 0;
@@ -85,7 +85,7 @@ _memmem (unsigned char const *haystack, int haystack_len,
 
 void *
 memmem (void const *haystack, int haystack_len,
-       void const *needle, int needle_len)
+        void const *needle, int needle_len)
 {
   unsigned char const *haystack_byte_c = (unsigned char const *)haystack;
   unsigned char const *needle_byte_c = (unsigned char const *)needle;
@@ -101,7 +101,7 @@ memrchr (unsigned char const *p, int n, char c)
   while (q > p)
     {
       if (*--q == c)
-       return (unsigned char *)q;
+        return (unsigned char *)q;
     }
   return 0;
 }
@@ -133,17 +133,17 @@ memrev (unsigned char *byte, int length)
 double
 my_round (double x)
 {
-  return floor (x -0.5)+ 1.0;
+  return floor (x - 0.5) + 1.0;
 }
 
 /* namespace std { */
-  
+
 #ifndef isinf
 #if !HAVE_ISINF
 int
 isinf (double x)
 {
-  return x && (x == x/ 2);
+  return x && (x == x / 2);
 }
 #endif
 #endif
index a560a926de96104971934897fe3ce8e5c2c16d82..c72eb53947a6b9c549368cf77d575b9bfb0d0e1e 100644 (file)
@@ -31,7 +31,8 @@ const int Memory_out_stream::block_size_ = 1024;
 
 lily_cookie_io_functions_t
 Memory_out_stream::functions_
-= {
+=
+{
   Memory_out_stream::reader,
   Memory_out_stream::writer,
   Memory_out_stream::seeker,
@@ -87,8 +88,8 @@ Memory_out_stream::get_string () const
 
 ssize_t
 Memory_out_stream::writer (void *cookie,
-                          char const *buffer,
-                          size_t size)
+                           char const *buffer,
+                           size_t size)
 {
   Memory_out_stream *stream = (Memory_out_stream *) cookie;
 
@@ -104,7 +105,7 @@ Memory_out_stream::writer (void *cookie,
 
   if (change)
     stream->buffer_ = (char *) realloc (stream->buffer_,
-                                       stream->buffer_blocks_ * block_size_);
+                                        stream->buffer_blocks_ * block_size_);
 
   memcpy (stream->buffer_ + stream->size_, buffer, size);
   stream->size_ = newsize;
@@ -114,8 +115,8 @@ Memory_out_stream::writer (void *cookie,
 
 ssize_t
 Memory_out_stream::reader (void * /* cookie */,
-                          char * /* buffer */,
-                          size_t /* size */)
+                           char * /* buffer */,
+                           size_t /* size */)
 {
   assert (false);
   return 0;
@@ -123,8 +124,8 @@ Memory_out_stream::reader (void * /* cookie */,
 
 int
 Memory_out_stream::seeker (void *,
-                          off64_t *,
-                          int)
+                           off64_t *,
+                           int)
 {
   assert (false);
   return 0;
index 41b42d8b9715dfe24697794fe23d8d1683b0d6a0..bb97b9407e4eebbd62dd963f3b635a4049ec9325 100644 (file)
@@ -25,7 +25,7 @@ Offset::to_string () const
 {
   string s;
   s = string (" (") + ::to_string (coordinate_a_[X_AXIS]) + ", "
-    + ::to_string (coordinate_a_[Y_AXIS]) + ")";
+      + ::to_string (coordinate_a_[Y_AXIS]) + ")";
   return s;
 }
 #endif
@@ -91,23 +91,23 @@ Real
 Offset::length () const
 {
   return sqrt (sqr (coordinate_a_[X_AXIS])
-                   + sqr (coordinate_a_[Y_AXIS]));
+               + sqr (coordinate_a_[Y_AXIS]));
 }
 
 bool
 Offset::is_sane () const
 {
   return !isnan (coordinate_a_[X_AXIS])
-    && !isnan (coordinate_a_ [Y_AXIS])
-    && !isinf (coordinate_a_[X_AXIS]) 
-    && !isinf (coordinate_a_[Y_AXIS]);
+         && !isnan (coordinate_a_ [Y_AXIS])
+         && !isinf (coordinate_a_[X_AXIS])
+         && !isinf (coordinate_a_[Y_AXIS]);
 }
 
 Offset
 Offset::direction () const
 {
   Offset d = *this;
-  d /= length (); 
+  d /= length ();
   return d;
 }
 
index 1530baee83e6c7ca00052394e600f9bbf3d04aad..2cd0eaf2e07912f566c837413091b56f02c7114f 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <cmath>
 
-
 using namespace std;
 
 /*
@@ -55,8 +54,8 @@ Polynomial::multiply (const Polynomial &p1, const Polynomial &p2)
     {
       dest.coefs_.push_back (0);
       for (int j = 0; j <= i; j++)
-       if (i - j <= p2.degree () && j <= p1.degree ())
-         dest.coefs_.back () += p1.coefs_[j] * p2.coefs_[i - j];
+        if (i - j <= p2.degree () && j <= p1.degree ())
+          dest.coefs_.back () += p1.coefs_[j] * p2.coefs_[i - j];
     }
 
   return dest;
@@ -82,16 +81,16 @@ Polynomial::power (int exponent, const Polynomial &src)
   while (e > 0)
     {
       if (e % 2)
-       {
-         dest = multiply (dest, base);
-         e--;
-       }
+        {
+          dest = multiply (dest, base);
+          e--;
+        }
       else
 
-       {
-         base = multiply (base, base);
-         e /= 2;
-       }
+        {
+          base = multiply (base, base);
+          e /= 2;
+        }
     }
   return dest;
 }
@@ -105,8 +104,8 @@ Polynomial::clean ()
     We only do relative comparisons. Absolute comparisons break down in
     degenerate cases.  */
   while (degree () > 0
-        && (fabs (coefs_.back ()) < FUDGE * fabs (back (coefs_, 1))
-            || !coefs_.back ()))
+         && (fabs (coefs_.back ()) < FUDGE * fabs (back (coefs_, 1))
+             || !coefs_.back ()))
     coefs_.pop_back ();
 }
 
@@ -153,25 +152,25 @@ Polynomial::set_mod (const Polynomial &u, const Polynomial &v)
   if (v.lc () < 0.0)
     {
       for (int k = u.degree () - v.degree () - 1; k >= 0; k -= 2)
-       coefs_[k] = -coefs_[k];
+        coefs_[k] = -coefs_[k];
 
       for (int k = u.degree () - v.degree (); k >= 0; k--)
-       for (int j = v.degree () + k - 1; j >= k; j--)
-         coefs_[j] = -coefs_[j] - coefs_[v.degree () + k] * v.coefs_[j - k];
+        for (int j = v.degree () + k - 1; j >= k; j--)
+          coefs_[j] = -coefs_[j] - coefs_[v.degree () + k] * v.coefs_[j - k];
     }
   else
 
     {
       for (int k = u.degree () - v.degree (); k >= 0; k--)
-       for (int j = v.degree () + k - 1; j >= k; j--)
-         coefs_[j] -= coefs_[v.degree () + k] * v.coefs_[j - k];
+        for (int j = v.degree () + k - 1; j >= k; j--)
+          coefs_[j] -= coefs_[v.degree () + k] * v.coefs_[j - k];
     }
 
   int k = v.degree () - 1;
   while (k >= 0 && coefs_[k] == 0.0)
     k--;
 
-  coefs_.resize (1+ ((k < 0) ? 0 : k));
+  coefs_.resize (1 + ((k < 0) ? 0 : k));
   return degree ();
 }
 
@@ -231,9 +230,9 @@ Polynomial::solve_cubic ()const
    * substitute x = y - A/3 to eliminate quadric term: x^3 +px + q = 0
    */
 
-  Real sq_A = A *A;
+  Real sq_A = A * A;
   Real p = 1.0 / 3 * (-1.0 / 3 * sq_A + B);
-  Real q = 1.0 / 2 * (2.0 / 27 * A *sq_A - 1.0 / 3 * A *B + C);
+  Real q = 1.0 / 2 * (2.0 / 27 * A * sq_A - 1.0 / 3 * A * B + C);
 
   /* use Cardano's formula */
 
@@ -242,21 +241,23 @@ Polynomial::solve_cubic ()const
 
   if (iszero (D))
     {
-      if (iszero (q)) {        /* one triple solution */
-       sol.push_back (0);
-       sol.push_back (0);
-       sol.push_back (0);
-      }
-      else {           /* one single and one double solution */
-       Real u = cubic_root (-q);
-
-       sol.push_back (2 * u);
-       sol.push_back (-u);
-      }
+      if (iszero (q))   /* one triple solution */
+        {
+          sol.push_back (0);
+          sol.push_back (0);
+          sol.push_back (0);
+        }
+      else              /* one single and one double solution */
+        {
+          Real u = cubic_root (-q);
+
+          sol.push_back (2 * u);
+          sol.push_back (-u);
+        }
     }
   else if (D < 0)
     {
-    /* Casus irreducibilis: three real solutions */
+      /* Casus irreducibilis: three real solutions */
       Real phi = 1.0 / 3 * acos (-q / sqrt (-cb));
       Real t = 2 * sqrt (-p);
 
@@ -304,7 +305,7 @@ Polynomial::lc ()
 int
 Polynomial::degree ()const
 {
-  return coefs_.size () -1;
+  return coefs_.size () - 1;
 }
 /*
   all roots of quadratic eqn.
index 7fe157c5429cf28b61799688cee71977d82e0197..2d57eebef09a73bf3caaeb307e1159b68d321f58 100644 (file)
@@ -42,7 +42,6 @@ Rational::to_double () const
   return 0.0;
 }
 
-
 #ifdef STREAM_SUPPORT
 ostream &
 operator << (ostream &o, Rational r)
@@ -61,7 +60,7 @@ Rational::abs () const
 Rational
 Rational::trunc_rat () const
 {
-  if (is_infinity())
+  if (is_infinity ())
     return *this;
   return Rational ((num_ - (num_ % den_)) * sign_, den_);
 }
@@ -101,7 +100,6 @@ Rational::Rational (int n)
   den_ = 1;
 }
 
-
 void
 Rational::set_infinite (int s)
 {
@@ -133,7 +131,6 @@ Rational::mod_rat (Rational div) const
   return r;
 }
 
-
 /*
   copy & paste from scm_gcd (GUILE).
  */
@@ -151,36 +148,35 @@ gcd (I64 u, I64 v)
       I64 t;
       /* Determine a common factor 2^k */
       while (!(1 & (u | v)))
-       {
-         k <<= 1;
-         u >>= 1;
-         v >>= 1;
-       }
+        {
+          k <<= 1;
+          u >>= 1;
+          v >>= 1;
+        }
       /* Now, any factor 2^n can be eliminated */
       if (u & 1)
-       t = -v;
+        t = -v;
       else
-       {
-         t = u;
-       b3:
-         t = t >> 1;
-       }
+        {
+          t = u;
+b3:
+          t = t >> 1;
+        }
       if (!(1 & t))
-       goto b3;
+        goto b3;
       if (t > 0)
-       u = t;
+        u = t;
       else
-       v = -t;
+        v = -t;
       t = u - v;
       if (t != 0)
-       goto b3;
+        goto b3;
       result = u * k;
     }
 
   return result;
 }
 
-
 void
 Rational::normalize ()
 {
@@ -276,20 +272,20 @@ Rational::Rational (double x)
       const int FACT = 1 << 20;
 
       /*
-       Thanks to Afie for this too simple  idea.
+        Thanks to Afie for this too simple  idea.
 
-       do not blindly substitute by libg++ code, since that uses
-       arbitrary-size integers.  The rationals would overflow too
-       easily.
+        do not blindly substitute by libg++ code, since that uses
+        arbitrary-size integers.  The rationals would overflow too
+        easily.
       */
 
       num_ = (U64) (mantissa * FACT);
       den_ = (U64) FACT;
       normalize ();
       if (expt < 0)
-       den_ <<= -expt;
+        den_ <<= -expt;
       else
-       num_ <<= expt;
+        num_ <<= expt;
       normalize ();
     }
   else
@@ -323,7 +319,7 @@ Rational::operator *= (Rational r)
   den_ *= r.den_;
 
   normalize ();
- exit_func:
+exit_func:
   return *this;
 }
 
@@ -365,7 +361,7 @@ Rational::to_string () const
 int
 Rational::to_int () const
 {
-  return (int)(num () / den ());
+  return (int) (num () / den ());
 }
 
 int
index 18ee4a832e4cad28bbfb0f562aec4a6bc165a667..4243f675cbcf4e252c556fbafdcee16e026cfff0 100644 (file)
@@ -93,7 +93,7 @@ replace_all (string *str, string const &find, string const &replace)
   ssize len = find.length ();
   ssize replen = replace.length ();
   for (ssize i = str->find (find); i != NPOS; i = str->find (find, i + replen))
-    *str = str->replace (i, len, replace);
+    * str = str->replace (i, len, replace);
   return *str;
 }
 
@@ -112,7 +112,7 @@ string_copy (string s)
   char *dest = new char[len + 1];
   copy (s.begin (), s.end (), dest);
   dest[len] = 0;
-  
+
   return dest;
 }
 
@@ -134,7 +134,7 @@ string_split (string str, char c)
     {
       string s = str.substr (0, i);
       a.push_back (s);
-      i ++;
+      i++;
       str = str.substr (i);
       i = str.find (c);
     }
@@ -147,10 +147,10 @@ string
 string_join (vector<string> const &strs, string infix)
 {
   string result;
-  for (vsize i = 0; i < strs.size (); i ++)
+  for (vsize i = 0; i < strs.size (); i++)
     {
       if (i)
-       result += infix;
+        result += infix;
       result += strs[i];
     }
 
index c372520c16f3acb26d53b8f2bbd983ca1f943379..d46426e8c6fc0271ea9d6e5e36d8eaee39ac79b8 100644 (file)
@@ -37,7 +37,7 @@ string
 String_convert::bin2hex (Byte bin_char)
 {
   string str;
-  str += to_string ((char) nibble2hex_byte ((Byte)(bin_char >> 4)));
+  str += to_string ((char) nibble2hex_byte ((Byte) (bin_char >> 4)));
   str += to_string ((char) nibble2hex_byte (bin_char++));
   return str;
 }
@@ -46,10 +46,10 @@ string
 String_convert::bin2hex (string bin_string)
 {
   string str;
-  Byte const *byte = (Byte const*)bin_string.data ();
+  Byte const *byte = (Byte const *)bin_string.data ();
   for (ssize i = 0; i < bin_string.length (); i++)
     {
-      str += to_string ((char)nibble2hex_byte ((Byte)(*byte >> 4)));
+      str += to_string ((char)nibble2hex_byte ((Byte) (*byte >> 4)));
       str += to_string ((char)nibble2hex_byte (*byte++));
     }
   return str;
@@ -86,7 +86,7 @@ String_convert::dec2int (string dec_string)
     assert (false);
 
   assert (form_string ("%ld", l) == dec_string);
-  
+
   return (int)l;
 }
 
@@ -95,7 +95,7 @@ String_convert::i64_string (I64 i64, char const *fmt)
 {
   char buffer[STRING_BUFFER_LEN];
   snprintf (buffer, STRING_BUFFER_LEN,
-           (fmt ? fmt : "%Ld"), i64); // assume radix 10
+            (fmt ? fmt : "%Ld"), i64); // assume radix 10
   return string (buffer);
 }
 // breendet imp from string
@@ -104,11 +104,11 @@ String_convert::dec2double (string dec_string)
 {
   if (!dec_string.length ())
     return 0;
-  
+
   double d = 0.0;
   if (!sscanf (dec_string.c_str (), "%lf", &d))
     assert (false);
-  
+
   return d;
 }
 
@@ -119,14 +119,14 @@ String_convert::hex2bin (string hex_string, string &bin_string_r)
     hex_string = "0" + hex_string;
 
   bin_string_r = "";
-  Byte const *byte = (Byte const*) hex_string.data ();
+  Byte const *byte = (Byte const *) hex_string.data ();
   ssize i = 0;
   while (i < hex_string.length ())
     {
       int high_i = hex2nibble (*byte++);
       int low_i = hex2nibble (*byte++);
       if (high_i < 0 || low_i < 0)
-       return 1; // invalid char
+        return 1; // invalid char
       bin_string_r += to_string ((char) (high_i << 4 | low_i), 1);
       i += 2;
     }
@@ -140,7 +140,7 @@ String_convert::hex2bin (string hex_string)
 
   if (hex2bin (hex_string, str))
     assert (false);
-  
+
   return str;
 }
 
@@ -186,7 +186,7 @@ String_convert::unsigned2hex (unsigned u, ssize length, char fill_char)
       u /= 16;
     }
 #else
-  str += int_string (u, "%x"); // hmm. %lx vs. %x -> portability?
+  str += int_string (u, "%x");  // hmm. %lx vs. %x -> portability?
 #endif
 
   str = to_string (fill_char, length - str.length ()) + str;
@@ -206,9 +206,9 @@ Byte
 String_convert::nibble2hex_byte (Byte byte)
 {
   if ((byte & 0x0f) <= 9)
-    return (Byte)((byte & 0x0f) + '0');
+    return (Byte) ((byte & 0x0f) + '0');
   else
-    return (Byte)((byte & 0x0f) - 10 + 'a');
+    return (Byte) ((byte & 0x0f) - 10 + 'a');
 }
 /**
    Convert an integer to a string
@@ -221,7 +221,7 @@ String_convert::int_string (int i, char const *fmt)
 {
   char buffer[STRING_BUFFER_LEN];
   snprintf (buffer, STRING_BUFFER_LEN,
-           (fmt ? fmt : "%d"), i); // assume radix 10
+            (fmt ? fmt : "%d"), i); // assume radix 10
   return string (buffer);
 }
 
@@ -271,7 +271,7 @@ String_convert::char_string (char c, int n)
   char *ch = new char[ n ];
   memset (ch, c, n);
   string s (ch, n);
-  
+
   delete[] ch;
   return s;
 }
@@ -327,7 +327,6 @@ String_convert::precision_string (double x, int n)
   return (sign (x) > 0 ? str : "-" + str);
 }
 
-
 string
 String_convert::long_string (long l)
 {
@@ -347,7 +346,7 @@ String_convert::unsigned_string (unsigned u)
 string
 String_convert::pad_to (string s, int n)
 {
-  return s + string (max (int(n - s.length ()), 0), ' ');
+  return s + string (max (int (n - s.length ()), 0), ' ');
 }
 
 string
@@ -365,5 +364,5 @@ String_convert::to_lower (string s)
 string
 String_convert::reverse (string s)
 {
-  return (char*) memrev ((unsigned char *)s.data (), s.length ());
+  return (char *) memrev ((unsigned char *)s.data (), s.length ());
 }
index 9bd06f121cf7201a1a7feea1874f5d0308ba2f5f..adbaa52913e611fd386ac15d9e5b378830d6853a 100644 (file)
@@ -8,7 +8,7 @@ string slashify (string file_name);
 
 struct CaseB: public yaffut::Test<File_name, CaseB>
 {
-  CaseB(): File_name("123"){}
+  CaseB (): File_name ("123") {}
 };
 
 TEST_STRING (File_name, Mingw_slashify, "foe.ly")
index 1c1a71fa3a058f3e91a388cedc749010c6b39a14..8fce64abe12041f321c402940421a7ee5a9bf08a 100644 (file)
@@ -70,7 +70,7 @@ FUNC (vector_slice)
   EQUAL (vector<int> (v.begin (), v.begin ()).size (), vsize (0));
   EQUAL (vector<int> (v.begin (), v.end ()).size (), v.size ());
   EQUAL (vector<int> (v.begin () + 1, v.begin () + 2).size (),
-                    vsize (1));
+         vsize (1));
 #endif
 }
 
@@ -99,13 +99,13 @@ FUNC (vector_insert)
   v.insert (1, 0);
 #else
   v.insert (v.begin (), 1);
-#endif  
+#endif
   EQUAL (v[0], 1);
 #if VECTOR_INSERT
   v.insert (2, v.size ());
 #else
   v.insert (v.end (), 2);
-#endif  
+#endif
   EQUAL (v.back (), 2);
   vector<int> u;
   u.insert (u.begin (), v.begin (), v.end ());
@@ -121,8 +121,8 @@ FUNC (parray_concat)
 #if !STD_VECTOR
   Link_array<int> u, v;
 #else
-  vector<int*> u, v;
-#endif  
+  vector<int *> u, v;
+#endif
   int a[5] = { 0, 1, 2, 3, 4 };
   u.push_back (&a[0]);
   u.push_back (&a[1]);
index 509aea072893c4a982fa30625c5ba81c6ee48efe..5ed243fb084d9812694446c6d00af2f3babdabe9 100644 (file)
 
 using namespace std;
 
-
 FUNC (string_split_join)
 {
   string orig = "a/bbbb/cc//d";
   vector<string> splits = string_split (orig, '/');
   string loop = string_join (splits, "/");
-  EQUAL(orig, loop);
-  EQUAL(splits.size (), size_t (5));
+  EQUAL (orig, loop);
+  EQUAL (splits.size (), size_t (5));
 }
index 4f1dc3e93ab27c62c55dcde7dc83aba4bcfdccf1..798eb88901f933d4f6b420084aa0d676899d3308 100644 (file)
@@ -5,18 +5,4 @@
 
 \version "2.15.3"
 
-\layout { ragged-right = ##t }
-
-music = {
-  \clef bass r2 r4 r8 f,
-  r2 r4 g,8 r
-  r4 f, 8 r8 r2
-}
-
-beams = {
-  \repeat "unfold" 24 { s8[ s ] s[ s]}
-}
-
-\new Staff {
-  \context Voice << { \beams } { \music}>>
-}
+\new Voice << { c'4 c'8 c' } { s8[ s] s[ s] } >>
index c5436e82cafad95c09d82e7282c429add29d7c13..dc3fa468b5c10de78b3391929d478e847ae9f8e2 100644 (file)
@@ -1,6 +1,11 @@
-\version "2.15.0"
+\version "2.15.7"
 \header {
-  texidoc = "Lilypond does footnotes."
+  texidoc = "This is an example of automatic footnote numbering
+where the number is reset on each page.  It uses the symbol-footnotes
+numbering function, which assigns the symbols *, †, ‡, § and ¶ to
+successive footnotes, doubling up on the symbol after five footnotes
+have been reached.
+"
 }
 
 \paper {
index 46d0448a8a2cb4843ead77448daef0fd36675be6..3c0b410956082d0ec5d38d124c942d6e14c37123 100644 (file)
@@ -1,6 +1,10 @@
-\version "2.15.0"
+\version "2.15.7"
 \header {
-  texidoc = "Lilypond does footnotes."
+  texidoc = "This is an example of automatic footnote numbering
+where the number is not reset on each page.  It uses the default
+numbering function, which assigns numbers starting at 1 to successive
+footnotes.
+"
 }
 
 \paper {
index b1ecf25294bb301fd52d9a91e884a952b3922f22..17fe46d16a10ea24ab05c969cf29aa3bc38ea2e1 100644 (file)
@@ -29,8 +29,8 @@ they go past the first note. "
   } \addlyrics {
     bla16 -- bla -- bla -- bla --
     bla -- bla -- bla -- bla8 --
-    bla16 -- bla -- bla 
+    bla16 -- bla -- bla
   }
 >>
 
-  
+
diff --git a/input/regression/nested-property-revert.ly b/input/regression/nested-property-revert.ly
deleted file mode 100644 (file)
index 38779dd..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-\version "2.14.0"
-
-\header {
-  texidoc = "
-If a nested property revert follows an override in the same grob for
-a different property, the nested property's default setting should not
-be evicted from the property alist.
-"
-}
-
-\relative c' {
-  c1\startTrillSpan
-  c1\stopTrillSpan
-  \override TrillSpanner #'color =  #red
-  \revert TrillSpanner #'(bound-details left text)
-  c1\startTrillSpan
-  c1\stopTrillSpan
-}
index 9bd02ee82821b44ce2205cafa7fc6b1a578fc958..bc013f516f34d3d834ab28ce2ee5eb8b19232d6e 100644 (file)
@@ -87,14 +87,14 @@ protected:
 public:
   SCM last_keysig_;
 
-  vector<Grob*> left_objects_;
-  vector<Grob*> right_objects_;
+  vector<Grob *> left_objects_;
+  vector<Grob *> right_objects_;
 
   Grob *accidental_placement_;
 
   vector<Accidental_entry> accidentals_;
-  vector<Spanner*> ties_;
-  vector<Grob*> note_columns_;
+  vector<Spanner *> ties_;
+  vector<Grob *> note_columns_;
 };
 
 /*
@@ -102,7 +102,6 @@ public:
   in grobs should always store ly_deep_copy ()s of those.
 */
 
-
 Accidental_engraver::Accidental_engraver ()
 {
   accidental_placement_ = 0;
@@ -120,8 +119,8 @@ Accidental_engraver::update_local_key_signature (SCM new_sig)
 {
   last_keysig_ = new_sig;
   set_context_property_on_children (context (),
-                                   ly_symbol2scm ("localKeySignature"),
-                                   new_sig);
+                                    ly_symbol2scm ("localKeySignature"),
+                                    new_sig);
 
   Context *trans = context ()->get_parent_context ();
 
@@ -163,14 +162,14 @@ struct Accidental_result
   int score () const
   {
     return need_acc ? 1 : 0
-      + need_restore ? 1 : 0;
+           + need_restore ? 1 : 0;
   }
 };
 
 static
 Accidental_result
 check_pitch_against_rules (Pitch const &pitch, Context *origin,
-                          SCM rules, int bar_number, SCM measurepos)
+                           SCM rules, int bar_number, SCM measurepos)
 {
   Accidental_result result;
   SCM pitch_scm = pitch.smobbed_copy ();
@@ -178,37 +177,37 @@ check_pitch_against_rules (Pitch const &pitch, Context *origin,
 
   if (scm_is_pair (rules) && !scm_is_symbol (scm_car (rules)))
     warning (_f ("accidental typesetting list must begin with context-name: %s",
-                ly_scm2string (scm_car (rules)).c_str ()));
+                 ly_scm2string (scm_car (rules)).c_str ()));
 
   for (; scm_is_pair (rules) && origin; rules = scm_cdr (rules))
     {
       SCM rule = scm_car (rules);
       if (ly_is_procedure (rule))
-       {
-         SCM rule_result_scm = scm_call_4 (rule, origin->self_scm (),
-                                           pitch_scm, barnum_scm, measurepos);
-         Accidental_result rule_result (rule_result_scm);
+        {
+          SCM rule_result_scm = scm_call_4 (rule, origin->self_scm (),
+                                            pitch_scm, barnum_scm, measurepos);
+          Accidental_result rule_result (rule_result_scm);
 
-         result.need_acc |= rule_result.need_acc;
-         result.need_restore |= rule_result.need_restore;
-       }
+          result.need_acc |= rule_result.need_acc;
+          result.need_restore |= rule_result.need_restore;
+        }
 
       /*
-       If symbol then it is a context name.  Scan parent contexts to
-       find it.
+        If symbol then it is a context name.  Scan parent contexts to
+        find it.
       */
       else if (scm_is_symbol (rule))
-       {
-         Context *dad = origin;
-         while (dad && !dad->is_alias (rule))
-           dad = dad->get_parent_context ();
-
-         if (dad)
-           origin = dad;
-       }
+        {
+          Context *dad = origin;
+          while (dad && !dad->is_alias (rule))
+            dad = dad->get_parent_context ();
+
+          if (dad)
+            origin = dad;
+        }
       else
-       warning (_f ("procedure or context-name expected for accidental rule, found %s",
-                    print_scm_val (rule).c_str ()));
+        warning (_f ("procedure or context-name expected for accidental rule, found %s",
+                     print_scm_val (rule).c_str ()));
     }
 
   return result;
@@ -222,59 +221,59 @@ Accidental_engraver::process_acknowledged ()
       SCM accidental_rules = get_property ("autoAccidentals");
       SCM cautionary_rules = get_property ("autoCautionaries");
       SCM measure_position = get_property ("measurePosition");
-      int barnum = measure_number (context());
+      int barnum = measure_number (context ());
 
       for (vsize i = 0; i < accidentals_.size (); i++)
-       {
-         if (accidentals_[i].done_)
-           continue;
-         accidentals_[i].done_ = true;
-
-         Stream_event *note = accidentals_[i].melodic_;
-         Context *origin = accidentals_[i].origin_;
-
-         Pitch *pitch = unsmob_pitch (note->get_property ("pitch"));
-         if (!pitch)
-           continue;
-
-         Accidental_result acc = check_pitch_against_rules (*pitch, origin, accidental_rules,
-                                                            barnum, measure_position);
-         Accidental_result caut = check_pitch_against_rules (*pitch, origin, cautionary_rules,
-                                                             barnum, measure_position);
-
-         bool cautionary = to_boolean (note->get_property ("cautionary"));
-         if (caut.score () > acc.score ())
-           {
-             acc.need_acc |= caut.need_acc;
-             acc.need_restore |= caut.need_restore;
-
-             cautionary = true;
-           }
-
-         bool forced = to_boolean (note->get_property ("force-accidental"));
-         if (!acc.need_acc && forced)
-           acc.need_acc = true;
-
-         /*
-           Cannot look for ties: it's not guaranteed that they reach
-           us before the notes.
-         */
-         if (!note->in_event_class ("trill-span-event"))
-           {
-             if (acc.need_acc)
-               create_accidental (&accidentals_[i], acc.need_restore, cautionary);
-
-             if (forced || cautionary)
-               accidentals_[i].accidental_->set_property ("forced", SCM_BOOL_T);
-           }
-       }
+        {
+          if (accidentals_[i].done_)
+            continue;
+          accidentals_[i].done_ = true;
+
+          Stream_event *note = accidentals_[i].melodic_;
+          Context *origin = accidentals_[i].origin_;
+
+          Pitch *pitch = unsmob_pitch (note->get_property ("pitch"));
+          if (!pitch)
+            continue;
+
+          Accidental_result acc = check_pitch_against_rules (*pitch, origin, accidental_rules,
+                                                             barnum, measure_position);
+          Accidental_result caut = check_pitch_against_rules (*pitch, origin, cautionary_rules,
+                                                              barnum, measure_position);
+
+          bool cautionary = to_boolean (note->get_property ("cautionary"));
+          if (caut.score () > acc.score ())
+            {
+              acc.need_acc |= caut.need_acc;
+              acc.need_restore |= caut.need_restore;
+
+              cautionary = true;
+            }
+
+          bool forced = to_boolean (note->get_property ("force-accidental"));
+          if (!acc.need_acc && forced)
+            acc.need_acc = true;
+
+          /*
+            Cannot look for ties: it's not guaranteed that they reach
+            us before the notes.
+          */
+          if (!note->in_event_class ("trill-span-event"))
+            {
+              if (acc.need_acc)
+                create_accidental (&accidentals_[i], acc.need_restore, cautionary);
+
+              if (forced || cautionary)
+                accidentals_[i].accidental_->set_property ("forced", SCM_BOOL_T);
+            }
+        }
     }
 }
 
 void
 Accidental_engraver::create_accidental (Accidental_entry *entry,
-                                       bool restore_natural,
-                                       bool cautionary)
+                                        bool restore_natural,
+                                        bool cautionary)
 {
   Stream_event *note = entry->melodic_;
   Grob *support = entry->head_;
@@ -288,7 +287,7 @@ Accidental_engraver::create_accidental (Accidental_entry *entry,
   if (restore_natural)
     {
       if (to_boolean (get_property ("extraNatural")))
-       a->set_property ("restore-first", SCM_BOOL_T);
+        a->set_property ("restore-first", SCM_BOOL_T);
     }
 
   entry->accidental_ = a;
@@ -296,9 +295,9 @@ Accidental_engraver::create_accidental (Accidental_entry *entry,
 
 Grob *
 Accidental_engraver::make_standard_accidental (Stream_event * /* note */,
-                                              Grob *note_head,
-                                              Engraver *trans,
-                                              bool cautionary)
+                                               Grob *note_head,
+                                               Engraver *trans,
+                                               bool cautionary)
 {
   /*
     We construct the accidentals at the originating Voice
@@ -318,7 +317,7 @@ Accidental_engraver::make_standard_accidental (Stream_event * /* note */,
   for (vsize i = 0; i < left_objects_.size (); i++)
     {
       if (left_objects_[i]->get_property ("side-axis") == scm_from_int (X_AXIS))
-       Side_position_interface::add_support (left_objects_[i], a);
+        Side_position_interface::add_support (left_objects_[i], a);
     }
 
   for (vsize i = 0; i < right_objects_.size (); i++)
@@ -328,7 +327,7 @@ Accidental_engraver::make_standard_accidental (Stream_event * /* note */,
 
   if (!accidental_placement_)
     accidental_placement_ = make_item ("AccidentalPlacement",
-                                      a->self_scm ());
+                                       a->self_scm ());
   Accidental_placement::add_accidental (accidental_placement_, a);
 
   note_head->set_object ("accidental-grob", a->self_scm ());
@@ -338,8 +337,8 @@ Accidental_engraver::make_standard_accidental (Stream_event * /* note */,
 
 Grob *
 Accidental_engraver::make_suggested_accidental (Stream_event * /* note */,
-                                               Grob *note_head,
-                                               Engraver *trans)
+                                                Grob *note_head,
+                                                Engraver *trans)
 {
   Grob *a = trans->make_item ("AccidentalSuggestion", note_head->self_scm ());
 
@@ -364,16 +363,16 @@ Accidental_engraver::stop_translation_timestep ()
     {
       Grob *r = Tie::head (ties_[j], RIGHT);
       for (vsize i = accidentals_.size (); i--;)
-       if (accidentals_[i].head_ == r)
-         {
-           if (Grob *g = accidentals_[i].accidental_)
-             {
-               g->set_object ("tie", ties_[j]->self_scm ());
-               accidentals_[i].tied_ = true;
-             }
-           ties_.erase (ties_.begin () + j);
-           break;
-         }
+        if (accidentals_[i].head_ == r)
+          {
+            if (Grob *g = accidentals_[i].accidental_)
+              {
+                g->set_object ("tie", ties_[j]->self_scm ());
+                accidentals_[i].tied_ = true;
+              }
+            ties_.erase (ties_.begin () + j);
+            break;
+          }
     }
 
   for (vsize i = accidentals_.size (); i--;)
@@ -385,7 +384,7 @@ Accidental_engraver::stop_translation_timestep ()
 
       Pitch *pitch = unsmob_pitch (note->get_property ("pitch"));
       if (!pitch)
-       continue;
+        continue;
 
       int n = pitch->get_notename ();
       int o = pitch->get_octave ();
@@ -393,42 +392,42 @@ Accidental_engraver::stop_translation_timestep ()
       SCM key = scm_cons (scm_from_int (o), scm_from_int (n));
 
       Moment end_mp = measure_position (context (),
-                                       unsmob_duration (note->get_property ("duration")));
+                                        unsmob_duration (note->get_property ("duration")));
       SCM position = scm_cons (scm_from_int (barnum), end_mp.smobbed_copy ());
 
       SCM localsig = SCM_EOL;
       while (origin
-            && origin->where_defined (ly_symbol2scm ("localKeySignature"), &localsig))
-       {
-         bool change = false;
-         if (accidentals_[i].tied_
-             && !(to_boolean (accidentals_[i].accidental_->get_property ("forced"))))
-           {
-             /*
-               Remember an alteration that is different both from
-               that of the tied note and of the key signature.
-             */
-             localsig = ly_assoc_prepend_x (localsig, key,scm_cons (ly_symbol2scm ("tied"),
-                                                                    position));
-             change = true;
-           }
-         else
-           {
-             /*
-               not really correct if there is more than one
-               note head with the same notename.
-             */
-             localsig = ly_assoc_prepend_x (localsig, key,
-                                            scm_cons (ly_rational2scm (a),
-                                                      position));
-             change = true;
-           }
-
-         if (change)
-           origin->set_property ("localKeySignature", localsig);
-
-         origin = origin->get_parent_context ();
-       }
+             && origin->where_defined (ly_symbol2scm ("localKeySignature"), &localsig))
+        {
+          bool change = false;
+          if (accidentals_[i].tied_
+              && !(to_boolean (accidentals_[i].accidental_->get_property ("forced"))))
+            {
+              /*
+                Remember an alteration that is different both from
+                that of the tied note and of the key signature.
+              */
+              localsig = ly_assoc_prepend_x (localsig, key, scm_cons (ly_symbol2scm ("tied"),
+                                                                      position));
+              change = true;
+            }
+          else
+            {
+              /*
+                not really correct if there is more than one
+                note head with the same notename.
+              */
+              localsig = ly_assoc_prepend_x (localsig, key,
+                                             scm_cons (ly_rational2scm (a),
+                                                       position));
+              change = true;
+            }
+
+          if (change)
+            origin->set_property ("localKeySignature", localsig);
+
+          origin = origin->get_parent_context ();
+        }
     }
 
   if (accidental_placement_)
@@ -448,22 +447,22 @@ Accidental_engraver::acknowledge_rhythmic_head (Grob_info info)
   Stream_event *note = info.event_cause ();
   if (note
       && (note->in_event_class ("note-event")
-         || note->in_event_class ("trill-span-event")))
+          || note->in_event_class ("trill-span-event")))
     {
       /*
-       string harmonics usually don't have accidentals.
+        string harmonics usually don't have accidentals.
       */
       if (info.grob ()->get_property ("style") != ly_symbol2scm ("harmonic")
-         || to_boolean (get_property ("harmonicAccidentals")))
-       {
-         Accidental_entry entry;
-         entry.head_ = info.grob ();
-         entry.origin_engraver_ = dynamic_cast<Engraver *> (info.origin_translator ());
-         entry.origin_ = entry.origin_engraver_->context ();
-         entry.melodic_ = note;
-
-         accidentals_.push_back (entry);
-       }
+          || to_boolean (get_property ("harmonicAccidentals")))
+        {
+          Accidental_entry entry;
+          entry.head_ = info.grob ();
+          entry.origin_engraver_ = dynamic_cast<Engraver *> (info.origin_translator ());
+          entry.origin_ = entry.origin_engraver_->context ();
+          entry.melodic_ = note;
+
+          accidentals_.push_back (entry);
+        }
     }
 }
 
@@ -506,28 +505,28 @@ ADD_ACKNOWLEDGER (Accidental_engraver, tie);
 ADD_ACKNOWLEDGER (Accidental_engraver, note_column);
 
 ADD_TRANSLATOR (Accidental_engraver,
-               /* doc */
-               "Make accidentals."
-               "  Catch note heads, ties and notices key-change events."
-               "  This engraver usually lives at Staff level, but"
-               " reads the settings for Accidental at @code{Voice} level,"
-               " so you can @code{\\override} them at @code{Voice}.",
-
-               /* create */
-               "Accidental "
-               "AccidentalCautionary "
-               "AccidentalPlacement "
-               "AccidentalSuggestion ",
-
-               /* read */
-               "autoAccidentals "
-               "autoCautionaries "
-               "internalBarNumber "
-               "extraNatural "
-               "harmonicAccidentals "
-               "keySignature "
-               "localKeySignature ",
-
-               /* write */
-               "localKeySignature "
-               );
+                /* doc */
+                "Make accidentals."
+                "  Catch note heads, ties and notices key-change events."
+                "  This engraver usually lives at Staff level, but"
+                " reads the settings for Accidental at @code{Voice} level,"
+                " so you can @code{\\override} them at @code{Voice}.",
+
+                /* create */
+                "Accidental "
+                "AccidentalCautionary "
+                "AccidentalPlacement "
+                "AccidentalSuggestion ",
+
+                /* read */
+                "autoAccidentals "
+                "autoCautionaries "
+                "internalBarNumber "
+                "extraNatural "
+                "harmonicAccidentals "
+                "keySignature "
+                "localKeySignature ",
+
+                /* write */
+                "localKeySignature "
+               );
index 4a535c785783d937e3112d8221fef5dbbe2381a2..e4cf13c10abfd70c368d9c26bd15bee022b154e4 100644 (file)
@@ -76,20 +76,20 @@ Accidental_placement::add_accidental (Grob *me, Grob *a)
 */
 void
 Accidental_placement::split_accidentals (Grob *accs,
-                                        vector<Grob *> *break_reminder,
-                                        vector<Grob *> *real_acc)
+                                         vector<Grob *> *break_reminder,
+                                         vector<Grob *> *real_acc)
 {
   for (SCM acs = accs->get_object ("accidental-grobs"); scm_is_pair (acs);
        acs = scm_cdr (acs))
     for (SCM s = scm_cdar (acs); scm_is_pair (s); s = scm_cdr (s))
       {
-       Grob *a = unsmob_grob (scm_car (s));
+        Grob *a = unsmob_grob (scm_car (s));
 
-       if (unsmob_grob (a->get_object ("tie"))
-           && !to_boolean (a->get_property ("forced")))
-         break_reminder->push_back (a);
-       else
-         real_acc->push_back (a);
+        if (unsmob_grob (a->get_object ("tie"))
+            && !to_boolean (a->get_property ("forced")))
+          break_reminder->push_back (a);
+        else
+          real_acc->push_back (a);
       }
 }
 
@@ -108,7 +108,7 @@ Accidental_placement::get_relevant_accidentals (vector<Grob *> const &elts, Grob
       ret.insert (ret.end (), ra.begin (), ra.end ());
 
       if (right)
-       ret.insert (ret.end (), br.begin (), br.end ());
+        ret.insert (ret.end (), br.begin (), br.end ());
     }
   return ret;
 }
@@ -128,7 +128,7 @@ Real ape_priority (Accidental_placement_entry const *a)
 }
 
 bool ape_less (Accidental_placement_entry *const &a,
-              Accidental_placement_entry *const &b)
+               Accidental_placement_entry *const &b)
 {
   return ape_priority (a) < ape_priority (b);
 }
@@ -190,12 +190,12 @@ stagger_apes (vector<Accidental_placement_entry *> *apes)
     {
       Accidental_placement_entry *a = 0;
       if (parity)
-       {
-         a = asc.back ();
-         asc.pop_back ();
-       }
+        {
+          a = asc.back ();
+          asc.pop_back ();
+        }
       else
-       a = asc[i++];
+        a = asc[i++];
 
       apes->push_back (a);
       parity = !parity;
@@ -213,7 +213,7 @@ build_apes (SCM accs)
       Accidental_placement_entry *ape = new Accidental_placement_entry;
 
       for (SCM t = scm_cdar (s); scm_is_pair (t); t = scm_cdr (t))
-       ape->grobs_.push_back (unsmob_grob (scm_car (t)));
+        ape->grobs_.push_back (unsmob_grob (scm_car (t)));
 
       apes.push_back (ape);
     }
@@ -223,7 +223,7 @@ build_apes (SCM accs)
 
 static void
 set_ape_skylines (Accidental_placement_entry *ape,
-                 Grob **common, Real padding)
+                  Grob **common, Real padding)
 {
   vector<Grob *> accs (ape->grobs_);
   vector_sort (accs, &acc_less);
@@ -243,29 +243,29 @@ set_ape_skylines (Accidental_placement_entry *ape,
       Pitch *p = accidental_pitch (a);
 
       if (!p)
-       continue;
+        continue;
 
       if (i == accs.size () - 1 || p->get_octave () != last_octave)
-       {
-         last_offset = 0;
-         offset = a->extent (a, X_AXIS)[LEFT] - padding;
-       }
+        {
+          last_offset = 0;
+          offset = a->extent (a, X_AXIS)[LEFT] - padding;
+        }
       else if (p->get_alteration () == last_alteration)
-       a->translate_axis (last_offset, X_AXIS);
+        a->translate_axis (last_offset, X_AXIS);
       else /* Our alteration is different from the last one */
-       {
-         Real this_offset = offset - a->extent (a, X_AXIS)[RIGHT];
-         a->translate_axis (this_offset, X_AXIS);
+        {
+          Real this_offset = offset - a->extent (a, X_AXIS)[RIGHT];
+          a->translate_axis (this_offset, X_AXIS);
 
-         last_offset = this_offset;
-         offset -= a->extent (a, X_AXIS).length () + padding;
-       }
+          last_offset = this_offset;
+          offset -= a->extent (a, X_AXIS).length () + padding;
+        }
 
       vector<Box> boxes = Accidental_interface::accurate_boxes (a, common);
       ape->extents_.insert (ape->extents_.end (), boxes.begin (), boxes.end ());
 
       for (vsize j = boxes.size (); j--;)
-       ape->vertical_extent_.unite (boxes[j][Y_AXIS]);
+        ape->vertical_extent_.unite (boxes[j][Y_AXIS]);
 
       last_octave = p->get_octave ();
       last_alteration = p->get_alteration ();
@@ -284,16 +284,16 @@ extract_heads_and_stems (vector<Accidental_placement_entry *> const &apes)
     {
       Accidental_placement_entry *ape = apes[i];
       for (vsize j = ape->grobs_.size (); j--;)
-       {
-         Grob *acc = ape->grobs_[j];
-         Grob *head = acc->get_parent (Y_AXIS);
-         Grob *col = head->get_parent (X_AXIS);
-
-         if (Note_column::has_interface (col))
-           note_cols.push_back (col);
-         else
-           ret.push_back (head);
-       }
+        {
+          Grob *acc = ape->grobs_[j];
+          Grob *head = acc->get_parent (Y_AXIS);
+          Grob *col = head->get_parent (X_AXIS);
+
+          if (Note_column::has_interface (col))
+            note_cols.push_back (col);
+          else
+            ret.push_back (head);
+        }
     }
 
   /*
@@ -304,10 +304,10 @@ extract_heads_and_stems (vector<Accidental_placement_entry *> const &apes)
     {
       Grob *c = note_cols[i]->get_parent (X_AXIS);
       if (Note_collision_interface::has_interface (c))
-       {
-         extract_grob_set (c, "elements", columns);
-         concat (note_cols, columns);
-       }
+        {
+          extract_grob_set (c, "elements", columns);
+          concat (note_cols, columns);
+        }
     }
 
   /* Now that we have all of the columns, grab all of the note-heads */
@@ -332,10 +332,10 @@ common_refpoint_of_accidentals (vector<Accidental_placement_entry *> const &apes
   for (vsize i = apes.size (); i--;)
     for (vsize j = apes[i]->grobs_.size (); j--;)
       {
-       if (!ret)
-         ret = apes[i]->grobs_[j];
-       else
-         ret = ret->common_refpoint (apes[i]->grobs_[j], a);
+        if (!ret)
+          ret = apes[i]->grobs_[j];
+        else
+          ret = ret->common_refpoint (apes[i]->grobs_[j], a);
       }
 
   return ret;
@@ -343,12 +343,12 @@ common_refpoint_of_accidentals (vector<Accidental_placement_entry *> const &apes
 
 static Skyline
 build_heads_skyline (vector<Grob *> const &heads_and_stems,
-                    Grob **common)
+                     Grob **common)
 {
   vector<Box> head_extents;
   for (vsize i = heads_and_stems.size (); i--;)
     head_extents.push_back (Box (heads_and_stems[i]->extent (common[X_AXIS], X_AXIS),
-                                heads_and_stems[i]->pure_height (common[Y_AXIS], 0, INT_MAX)));
+                                 heads_and_stems[i]->pure_height (common[Y_AXIS], 0, INT_MAX)));
 
   return Skyline (head_extents, 0, Y_AXIS, LEFT);
 }
@@ -359,8 +359,8 @@ build_heads_skyline (vector<Grob *> const &heads_and_stems,
 */
 static Interval
 position_apes (Grob *me,
-              vector<Accidental_placement_entry *> const &apes,
-              Skyline const &heads_skyline)
+               vector<Accidental_placement_entry *> const &apes,
+               Skyline const &heads_skyline)
 {
   Real padding = robust_scm2double (me->get_property ("padding"), 0.2);
   Skyline left_skyline = heads_skyline;
@@ -377,9 +377,9 @@ position_apes (Grob *me,
 
       Real offset = -ape->right_skyline_.distance (left_skyline);
       if (isinf (offset))
-       offset = last_offset;
+        offset = last_offset;
       else
-       offset -= padding;
+        offset -= padding;
 
       Skyline new_left_skyline = ape->left_skyline_;
       new_left_skyline.raise (offset);
@@ -388,10 +388,10 @@ position_apes (Grob *me,
 
       /* Shift all of the accidentals in this ape */
       for (vsize j = ape->grobs_.size (); j--;)
-       ape->grobs_[j]->translate_axis (offset, X_AXIS);
+        ape->grobs_[j]->translate_axis (offset, X_AXIS);
 
       for (vsize j = ape->extents_.size (); j--;)
-       width.unite (offset + ape->extents_[j][X_AXIS]);
+        width.unite (offset + ape->extents_[j][X_AXIS]);
 
       last_offset = offset;
     }
@@ -436,7 +436,6 @@ position_apes (Grob *me,
   *  |_|   |
   *    |   |
   *
-
 */
 
 MAKE_SCHEME_CALLBACK (Accidental_placement, calc_positioning_done, 1);
@@ -480,13 +479,13 @@ Accidental_placement::calc_positioning_done (SCM smob)
 }
 
 ADD_INTERFACE (Accidental_placement,
-              "Resolve accidental collisions.",
-
-              /* properties */
-              "accidental-grobs "
-              "direction "
-              "padding "
-              "positioning-done "
-              "right-padding "
-              "script-priority "
-              );
+               "Resolve accidental collisions.",
+
+               /* properties */
+               "accidental-grobs "
+               "direction "
+               "padding "
+               "positioning-done "
+               "right-padding "
+               "script-priority "
+              );
index bee99c641d1f966cbe5c62531634d9e594c1decd..bdab5d59f71d0054cce3b8321a3a518f5c3b0cd2 100644 (file)
@@ -29,8 +29,8 @@
 Stencil
 parenthesize (Grob *me, Stencil m)
 {
-  Font_metric * font
-    = Font_interface::get_default_font (me); 
+  Font_metric *font
+    = Font_interface::get_default_font (me);
   Stencil open
     = font->find_by_name ("accidentals.leftparen");
   Stencil close
@@ -72,18 +72,18 @@ MAKE_SCHEME_CALLBACK (Accidental_interface, pure_height, 3);
 SCM
 Accidental_interface::pure_height (SCM smob, SCM start_scm, SCM)
 {
-  Item *me = dynamic_cast<Item*> (unsmob_grob (smob));
+  Item *me = dynamic_cast<Item *> (unsmob_grob (smob));
   int start = scm_to_int (start_scm);
   int rank = me->get_column ()->get_rank ();
 
   if (to_boolean (me->get_property ("forced"))
       || !unsmob_grob (me->get_object ("tie"))
       || (rank == start + 1 && /* we are at the start of a line */
-         !to_boolean (me->get_property ("hide-tied-accidental-after-break"))))
+          !to_boolean (me->get_property ("hide-tied-accidental-after-break"))))
     {
       Stencil *s = unsmob_stencil (get_stencil (me));
       if (s)
-       return ly_interval2scm (s->extent (Y_AXIS));
+        return ly_interval2scm (s->extent (Y_AXIS));
     }
 
   return ly_interval2scm (Interval ());
@@ -108,51 +108,51 @@ Accidental_interface::accurate_boxes (Grob *me, Grob **common)
       SCM alist = me->get_property ("glyph-name-alist");
       SCM alt = me->get_property ("alteration");
       string glyph_name = robust_scm2string (ly_assoc_get (alt, alist, SCM_BOOL_F),
-                                            "");
-      
+                                             "");
+
       if (glyph_name == "accidentals.flat"
-         || glyph_name == "accidentals.mirroredflat")
-       {
-         Box stem = b;
-         Box bulb = b;
-
-         /*
-           we could make the stem thinner, but that places the flats
-           really close.
-         */
-         Direction bulb_dir =
-           glyph_name == "accidentals.mirroredflat" ? LEFT : RIGHT;
-         stem[X_AXIS][bulb_dir] = stem[X_AXIS].center ();
-
-         /*
-           To prevent vertical alignment for 6ths
-         */
-         stem[Y_AXIS] *= 1.1;
-         bulb[Y_AXIS][UP] *= .35;
-
-         boxes.push_back (bulb);
-         boxes.push_back (stem);
-       }
-      else if (glyph_name ==  "accidentals.natural")
-       {
-         Box lstem = b;
-         Box rstem = b;
-         Box belly = b;
-
-         lstem[Y_AXIS] *= 1.1;
-         rstem[Y_AXIS] *= 1.1;
-
-         belly[Y_AXIS] *= 0.75;
-         lstem[X_AXIS][RIGHT] *= .33;
-         rstem[X_AXIS][LEFT] = rstem[X_AXIS].linear_combination (1.0 / 3.0);
-         lstem[Y_AXIS][DOWN] = belly[Y_AXIS][DOWN];
-         rstem[Y_AXIS][UP] = belly[Y_AXIS][UP];
-         boxes.push_back (belly);
-         boxes.push_back (lstem);
-         boxes.push_back (rstem);
-       }
+          || glyph_name == "accidentals.mirroredflat")
+        {
+          Box stem = b;
+          Box bulb = b;
+
+          /*
+            we could make the stem thinner, but that places the flats
+            really close.
+          */
+          Direction bulb_dir
+            = glyph_name == "accidentals.mirroredflat" ? LEFT : RIGHT;
+          stem[X_AXIS][bulb_dir] = stem[X_AXIS].center ();
+
+          /*
+            To prevent vertical alignment for 6ths
+          */
+          stem[Y_AXIS] *= 1.1;
+          bulb[Y_AXIS][UP] *= .35;
+
+          boxes.push_back (bulb);
+          boxes.push_back (stem);
+        }
+      else if (glyph_name == "accidentals.natural")
+        {
+          Box lstem = b;
+          Box rstem = b;
+          Box belly = b;
+
+          lstem[Y_AXIS] *= 1.1;
+          rstem[Y_AXIS] *= 1.1;
+
+          belly[Y_AXIS] *= 0.75;
+          lstem[X_AXIS][RIGHT] *= .33;
+          rstem[X_AXIS][LEFT] = rstem[X_AXIS].linear_combination (1.0 / 3.0);
+          lstem[Y_AXIS][DOWN] = belly[Y_AXIS][DOWN];
+          rstem[Y_AXIS][UP] = belly[Y_AXIS][UP];
+          boxes.push_back (belly);
+          boxes.push_back (lstem);
+          boxes.push_back (rstem);
+        }
       /*
-       TODO: add support for, double flat.
+        TODO: add support for, double flat.
       */
     }
 
@@ -160,7 +160,7 @@ Accidental_interface::accurate_boxes (Grob *me, Grob **common)
     boxes.push_back (b);
 
   Offset o (me->relative_coordinate (common[X_AXIS], X_AXIS),
-           me->relative_coordinate (common[Y_AXIS], Y_AXIS));
+            me->relative_coordinate (common[Y_AXIS], Y_AXIS));
 
   for (vsize i = boxes.size (); i--;)
     boxes[i].translate (o);
@@ -175,9 +175,9 @@ Accidental_interface::print (SCM smob)
   Grob *me = unsmob_grob (smob);
   Grob *tie = unsmob_grob (me->get_object ("tie"));
 
-  if (tie &&
-      (to_boolean (me->get_property ("hide-tied-accidental-after-break"))
-       || (!tie->original () && !to_boolean (me->get_property ("forced")))))
+  if (tie
+      && (to_boolean (me->get_property ("hide-tied-accidental-after-break"))
+          || (!tie->original () && !to_boolean (me->get_property ("forced")))))
     {
       me->suicide ();
       return SCM_EOL;
@@ -194,46 +194,45 @@ Accidental_interface::get_stencil (Grob *me)
   SCM alist = me->get_property ("glyph-name-alist");
   SCM alt = me->get_property ("alteration");
   SCM glyph_name = ly_assoc_get (alt, alist, SCM_BOOL_F);
-  
+
   if (!scm_is_string (glyph_name))
     {
       me->warning (_f ("Could not find glyph-name for alteration %s",
-                      ly_scm_write_string (alt).c_str ()));
+                       ly_scm_write_string (alt).c_str ()));
       return SCM_EOL;
     }
-  
+
   Stencil mol (fm->find_by_name (ly_scm2string (glyph_name)));
   if (to_boolean (me->get_property ("restore-first")))
     {
       /*
-       this isn't correct for ancient accidentals, but they don't
-       use double flats/sharps anyway.
-       */
+        this isn't correct for ancient accidentals, but they don't
+        use double flats/sharps anyway.
+        */
       Stencil acc (fm->find_by_name ("accidentals.natural"));
 
       if (acc.is_empty ())
-       me->warning (_ ("natural alteration glyph not found"));
+        me->warning (_ ("natural alteration glyph not found"));
       else
-       mol.add_at_edge (X_AXIS, LEFT, acc, 0.1);
+        mol.add_at_edge (X_AXIS, LEFT, acc, 0.1);
     }
-  
+
   if (to_boolean (me->get_property ("parenthesized")))
     mol = parenthesize (me, mol);
 
   return mol.smobbed_copy ();
 }
 
-  
 ADD_INTERFACE (Accidental_interface,
-              "A single accidental.",
-              
-              /* properties */
-              "alteration "
-              "avoid-slur "
-              "forced "
-              "glyph-name-alist "
-              "hide-tied-accidental-after-break "
-              "parenthesized "
-              "restore-first "
-              "tie "
-              );
+               "A single accidental.",
+
+               /* properties */
+               "alteration "
+               "avoid-slur "
+               "forced "
+               "glyph-name-alist "
+               "hide-tied-accidental-after-break "
+               "parenthesized "
+               "restore-first "
+               "tie "
+              );
index cf957449ec784ecff5f384376c48b930e35fd7cb..44c30e6013027c78a74ef90c3b7f1a66960a91ba 100644 (file)
@@ -32,7 +32,6 @@
 #include "system.hh"
 #include "warn.hh"
 
-
 MAKE_SCHEME_CALLBACK (Align_interface, align_to_minimum_distances, 1);
 SCM
 Align_interface::align_to_minimum_distances (SCM smob)
@@ -70,99 +69,99 @@ Align_interface::align_to_ideal_distances (SCM smob)
 // code. Split them into 2 functions, perhaps?
 static void
 get_skylines (Grob *me,
-             vector<Grob*> *const elements,
-             Axis a,
-             bool pure, int start, int end,
-             vector<Skyline_pair> *const ret)
+              vector<Grob *> *const elements,
+              Axis a,
+              bool pure, int start, int end,
+              vector<Skyline_pair> *const ret)
 {
   Grob *other_common = common_refpoint_of_array (*elements, me, other_axis (a));
-  
+
   for (vsize i = elements->size (); i--;)
     {
       Grob *g = (*elements)[i];
       Skyline_pair skylines;
 
       if (!pure)
-       {
-         Skyline_pair *skys = Skyline_pair::unsmob (g->get_property (a == Y_AXIS
-                                                                     ? "vertical-skylines"
-                                                                     : "horizontal-skylines"));
-         if (skys)
-           skylines = *skys;
-
-         /* This skyline was calculated relative to the grob g. In order to compare it to
-            skylines belonging to other grobs, we need to shift it so that it is relative
-            to the common reference. */
-         Real offset = g->relative_coordinate (other_common, other_axis (a));
-         skylines.shift (offset);
-       }
+        {
+          Skyline_pair *skys = Skyline_pair::unsmob (g->get_property (a == Y_AXIS
+                                                                      ? "vertical-skylines"
+                                                                      : "horizontal-skylines"));
+          if (skys)
+            skylines = *skys;
+
+          /* This skyline was calculated relative to the grob g. In order to compare it to
+             skylines belonging to other grobs, we need to shift it so that it is relative
+             to the common reference. */
+          Real offset = g->relative_coordinate (other_common, other_axis (a));
+          skylines.shift (offset);
+        }
       else
-       {
-         assert (a == Y_AXIS);
-         Interval extent = g->pure_height (g, start, end);
-
-         // This is a hack to get better accuracy on the pure-height of VerticalAlignment.
-         // It's quite common for a treble clef to be the highest element of one system
-         // and for a low note (or lyrics) to be the lowest note on another. The two will
-         // never collide, but the pure-height stuff only works with bounding boxes, so it
-         // doesn't know that. The result is a significant over-estimation of the pure-height,
-         // especially on systems with many staves. To correct for this, we build a skyline
-         // in two parts: the part we did above contains most of the grobs (note-heads, etc.)
-         // while the bit we're about to do only contains the breakable grobs at the beginning
-         // of the system. This way, the tall treble clefs are only compared with the treble
-         // clefs of the other staff and they will be ignored if the staff above is, for example,
-         // lyrics.
-         if (Axis_group_interface::has_interface (g)
-             && !Hara_kiri_group_spanner::request_suicide (g, start, end))
-           {
-             extent = Axis_group_interface::rest_of_line_pure_height (g, start, end);
-             Interval begin_of_line_extent = Axis_group_interface::begin_of_line_pure_height (g, start);
-             if (!begin_of_line_extent.is_empty ())
-               {
-                 Box b;
-                 b[a] = begin_of_line_extent;
-                 b[other_axis (a)] = Interval (-infinity_f, -1);
-                 skylines.insert (b, 0, other_axis (a));
-               }
-           }
-
-         if (!extent.is_empty ())
-           {
-             Box b;
-             b[a] = extent;
-             b[other_axis (a)] = Interval (0, infinity_f);
-             skylines.insert (b, 0, other_axis (a));
-           }
-       }
+        {
+          assert (a == Y_AXIS);
+          Interval extent = g->pure_height (g, start, end);
+
+          // This is a hack to get better accuracy on the pure-height of VerticalAlignment.
+          // It's quite common for a treble clef to be the highest element of one system
+          // and for a low note (or lyrics) to be the lowest note on another. The two will
+          // never collide, but the pure-height stuff only works with bounding boxes, so it
+          // doesn't know that. The result is a significant over-estimation of the pure-height,
+          // especially on systems with many staves. To correct for this, we build a skyline
+          // in two parts: the part we did above contains most of the grobs (note-heads, etc.)
+          // while the bit we're about to do only contains the breakable grobs at the beginning
+          // of the system. This way, the tall treble clefs are only compared with the treble
+          // clefs of the other staff and they will be ignored if the staff above is, for example,
+          // lyrics.
+          if (Axis_group_interface::has_interface (g)
+              && !Hara_kiri_group_spanner::request_suicide (g, start, end))
+            {
+              extent = Axis_group_interface::rest_of_line_pure_height (g, start, end);
+              Interval begin_of_line_extent = Axis_group_interface::begin_of_line_pure_height (g, start);
+              if (!begin_of_line_extent.is_empty ())
+                {
+                  Box b;
+                  b[a] = begin_of_line_extent;
+                  b[other_axis (a)] = Interval (-infinity_f, -1);
+                  skylines.insert (b, 0, other_axis (a));
+                }
+            }
+
+          if (!extent.is_empty ())
+            {
+              Box b;
+              b[a] = extent;
+              b[other_axis (a)] = Interval (0, infinity_f);
+              skylines.insert (b, 0, other_axis (a));
+            }
+        }
 
       if (skylines.is_empty ())
-       elements->erase (elements->begin () + i);
+        elements->erase (elements->begin () + i);
       else
-       ret->push_back (skylines);
+        ret->push_back (skylines);
     }
   reverse (*ret);
 }
 
 vector<Real>
 Align_interface::get_minimum_translations (Grob *me,
-                                          vector<Grob*> const &all_grobs,
-                                          Axis a)
+                                           vector<Grob *> const &all_grobs,
+                                           Axis a)
 {
   return internal_get_minimum_translations (me, all_grobs, a, true, false, 0, 0);
 }
 
 vector<Real>
 Align_interface::get_pure_minimum_translations (Grob *me,
-                                               vector<Grob*> const &all_grobs,
-                                               Axis a, int start, int end)
+                                                vector<Grob *> const &all_grobs,
+                                                Axis a, int start, int end)
 {
   return internal_get_minimum_translations (me, all_grobs, a, true, true, start, end);
 }
 
 vector<Real>
 Align_interface::get_minimum_translations_without_min_dist (Grob *me,
-                                                           vector<Grob*> const &all_grobs,
-                                                           Axis a)
+                                                            vector<Grob *> const &all_grobs,
+                                                            Axis a)
 {
   return internal_get_minimum_translations (me, all_grobs, a, false, false, 0, 0);
 }
@@ -178,24 +177,24 @@ Align_interface::get_minimum_translations_without_min_dist (Grob *me,
 //   else centered dynamics will break when there is a fixed alignment).
 vector<Real>
 Align_interface::internal_get_minimum_translations (Grob *me,
-                                                   vector<Grob*> const &all_grobs,
-                                                   Axis a,
-                                                   bool include_fixed_spacing,
-                                                   bool pure, int start, int end)
+                                                    vector<Grob *> const &all_grobs,
+                                                    Axis a,
+                                                    bool include_fixed_spacing,
+                                                    bool pure, int start, int end)
 {
-  if (!pure && a == Y_AXIS && dynamic_cast<Spanner*> (me) && !me->get_system ())
+  if (!pure && a == Y_AXIS && dynamic_cast<Spanner *> (me) && !me->get_system ())
     me->programming_error ("vertical alignment called before line-breaking");
 
   // If include_fixed_spacing is true, we look at things like system-system-spacing
   // and alignment-distances, which only make sense for the toplevel VerticalAlignment.
   // If we aren't toplevel, we're working on something like BassFigureAlignment
   // and so we definitely don't want to include alignment-distances!
-  if (!dynamic_cast<System*> (me->get_parent (Y_AXIS)))
+  if (!dynamic_cast<System *> (me->get_parent (Y_AXIS)))
     include_fixed_spacing = false;
-  
+
   Direction stacking_dir = robust_scm2dir (me->get_property ("stacking-dir"),
-                                          DOWN);
-  vector<Grob*> elems (all_grobs); // writable copy
+                                           DOWN);
+  vector<Grob *> elems (all_grobs); // writable copy
   vector<Skyline_pair> skylines;
 
   get_skylines (me, &elems, a, pure, start, end, &skylines);
@@ -214,44 +213,44 @@ Align_interface::internal_get_minimum_translations (Grob *me,
       Real padding = default_padding;
 
       if (j == 0)
-       dy = skylines[j][-stacking_dir].max_height () + padding;
+        dy = skylines[j][-stacking_dir].max_height () + padding;
       else
-       {
-         SCM spec = Page_layout_problem::get_spacing_spec (elems[j-1], elems[j], pure, start, end);
-         Page_layout_problem::read_spacing_spec (spec, &padding, ly_symbol2scm ("padding"));
-
-         dy = down_skyline.distance (skylines[j][-stacking_dir]) + padding;
-
-         Real min_distance = 0;
-         if (Page_layout_problem::read_spacing_spec (spec, &min_distance, ly_symbol2scm ("minimum-distance")))
-           dy = max (dy, min_distance);
-
-         if (include_fixed_spacing && Page_layout_problem::is_spaceable (elems[j]) && last_spaceable_element)
-           {
-             // Spaceable staves may have
-             // constraints coming from the previous spaceable staff
-             // as well as from the previous staff.
-             spec = Page_layout_problem::get_spacing_spec (last_spaceable_element, elems[j], pure, start, end);
-             Real spaceable_padding = 0;
-             Page_layout_problem::read_spacing_spec (spec,
-                                                     &spaceable_padding,
-                                                     ly_symbol2scm ("padding"));
-             dy = max(dy, (last_spaceable_skyline.distance (skylines[j][-stacking_dir])
-                           + stacking_dir*(last_spaceable_element_pos - where) + spaceable_padding));
-
-             Real spaceable_min_distance = 0;
-             if (Page_layout_problem::read_spacing_spec (spec,
-                                                         &spaceable_min_distance,
-                                                         ly_symbol2scm ("minimum-distance")))
-               dy = max (dy, spaceable_min_distance + stacking_dir*(last_spaceable_element_pos - where));
-
-             dy = max (dy, Page_layout_problem::get_fixed_spacing (last_spaceable_element, elems[j], spaceable_count,
-                                                                   pure, start, end));
-           }
-       }
+        {
+          SCM spec = Page_layout_problem::get_spacing_spec (elems[j - 1], elems[j], pure, start, end);
+          Page_layout_problem::read_spacing_spec (spec, &padding, ly_symbol2scm ("padding"));
+
+          dy = down_skyline.distance (skylines[j][-stacking_dir]) + padding;
+
+          Real min_distance = 0;
+          if (Page_layout_problem::read_spacing_spec (spec, &min_distance, ly_symbol2scm ("minimum-distance")))
+            dy = max (dy, min_distance);
+
+          if (include_fixed_spacing && Page_layout_problem::is_spaceable (elems[j]) && last_spaceable_element)
+            {
+              // Spaceable staves may have
+              // constraints coming from the previous spaceable staff
+              // as well as from the previous staff.
+              spec = Page_layout_problem::get_spacing_spec (last_spaceable_element, elems[j], pure, start, end);
+              Real spaceable_padding = 0;
+              Page_layout_problem::read_spacing_spec (spec,
+                                                      &spaceable_padding,
+                                                      ly_symbol2scm ("padding"));
+              dy = max (dy, (last_spaceable_skyline.distance (skylines[j][-stacking_dir])
+                             + stacking_dir * (last_spaceable_element_pos - where) + spaceable_padding));
+
+              Real spaceable_min_distance = 0;
+              if (Page_layout_problem::read_spacing_spec (spec,
+                                                          &spaceable_min_distance,
+                                                          ly_symbol2scm ("minimum-distance")))
+                dy = max (dy, spaceable_min_distance + stacking_dir * (last_spaceable_element_pos - where));
+
+              dy = max (dy, Page_layout_problem::get_fixed_spacing (last_spaceable_element, elems[j], spaceable_count,
+                                                                    pure, start, end));
+            }
+        }
 
       if (isinf (dy)) /* if the skyline is empty, maybe max_height is infinity_f */
-       dy = 0.0;
+        dy = 0.0;
 
       dy = max (0.0, dy);
       down_skyline.raise (-stacking_dir * dy);
@@ -260,12 +259,12 @@ Align_interface::internal_get_minimum_translations (Grob *me,
       translates.push_back (where);
 
       if (Page_layout_problem::is_spaceable (elems[j]))
-       {
-         spaceable_count++;
-         last_spaceable_element = elems[j];
-         last_spaceable_element_pos = where;
-         last_spaceable_skyline = down_skyline;
-       }
+        {
+          spaceable_count++;
+          last_spaceable_element = elems[j];
+          last_spaceable_element_pos = where;
+          last_spaceable_skyline = down_skyline;
+        }
     }
 
   // So far, we've computed the translates for all the non-empty elements.
@@ -275,12 +274,12 @@ Align_interface::internal_get_minimum_translations (Grob *me,
   if (!translates.empty ())
     {
       Real w = translates[0];
-      for  (vsize i = 0, j = 0; j < all_grobs.size (); j++)
-       {
-         if (i < elems.size () && all_grobs[j] == elems[i])
-           w = translates[i++];
-         all_translates.push_back (w);
-       }
+      for (vsize i = 0, j = 0; j < all_grobs.size (); j++)
+        {
+          if (i < elems.size () && all_grobs[j] == elems[i])
+            w = translates[i++];
+          all_translates.push_back (w);
+        }
     }
   return all_translates;
 }
@@ -318,8 +317,8 @@ Align_interface::get_pure_child_y_translation (Grob *me, Grob *ch, int start, in
   if (translates.size ())
     {
       for (vsize i = 0; i < all_grobs.size (); i++)
-       if (all_grobs[i] == ch)
-         return translates[i];
+        if (all_grobs[i] == ch)
+          return translates[i];
     }
   else
     return 0;
@@ -340,7 +339,7 @@ Align_interface::add_element (Grob *me, Grob *element)
   Axis a = Align_interface::axis (me);
   SCM sym = axis_offset_symbol (a);
   SCM proc = axis_parent_positioning (a);
-    
+
   element->set_property (sym, proc);
   Axis_group_interface::add_element (me, element);
 }
@@ -361,17 +360,17 @@ Align_interface::set_ordered (Grob *me)
 }
 
 ADD_INTERFACE (Align_interface,
-              "Order grobs from top to bottom, left to right, right to left"
-              " or bottom to top.  For vertical alignments of staves, the"
-              " @code{break-system-details} of the left"
-              " @rinternals{NonMusicalPaperColumn} may be set to tune"
-              " vertical spacing.",
-              
-              /* properties */
-              "align-dir "
-              "axes "
-              "elements "
-              "padding "
-              "positioning-done "
-              "stacking-dir "
-              );
+               "Order grobs from top to bottom, left to right, right to left"
+               " or bottom to top.  For vertical alignments of staves, the"
+               " @code{break-system-details} of the left"
+               " @rinternals{NonMusicalPaperColumn} may be set to tune"
+               " vertical spacing.",
+
+               /* properties */
+               "align-dir "
+               "axes "
+               "elements "
+               "padding "
+               "positioning-done "
+               "stacking-dir "
+              );
index 0dd78123ea0c3e1325c2ea78a97d5c0d4447dc20..87c59c19babeba1524ca3bb56f3091b2d76245a7 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2007--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
-  
+
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -22,8 +22,8 @@
 #include "main.hh"
 
 LY_DEFINE (ly_reset_all_fonts, "ly:reset-all-fonts", 0, 0, 0,
-          (),
-          "Forget all about previously loaded fonts.")
+           (),
+           "Forget all about previously loaded fonts.")
 {
   delete all_fonts_global;
   all_fonts_global = new All_font_metrics (global_path.to_string ());
@@ -31,23 +31,22 @@ LY_DEFINE (ly_reset_all_fonts, "ly:reset-all-fonts", 0, 0, 0,
   return SCM_UNSPECIFIED;
 }
 
-
 LY_DEFINE (ly_system_font_load, "ly:system-font-load", 1, 0, 0,
-          (SCM name),
-          "Load the OpenType system font @file{@var{name}.otf}."
-          "  Fonts loaded with this command must contain three"
-          " additional SFNT font tables called @code{LILC},"
-          " @code{LILF}, and @code{LILY}, needed for typesetting"
-          " musical elements.  Currently, only the Emmentaler and"
-          " the Emmentaler-Brace fonts fulfill these requirements.\n"
-          "\n"
-          "Note that only @code{ly:font-get-glyph} and derived"
-          " code (like @code{\\lookup}) can access glyphs from"
-          " the system fonts; text strings are handled exclusively"
-          " via the Pango interface.")
+           (SCM name),
+           "Load the OpenType system font @file{@var{name}.otf}."
+           "  Fonts loaded with this command must contain three"
+           " additional SFNT font tables called @code{LILC},"
+           " @code{LILF}, and @code{LILY}, needed for typesetting"
+           " musical elements.  Currently, only the Emmentaler and"
+           " the Emmentaler-Brace fonts fulfill these requirements.\n"
+           "\n"
+           "Note that only @code{ly:font-get-glyph} and derived"
+           " code (like @code{\\lookup}) can access glyphs from"
+           " the system fonts; text strings are handled exclusively"
+           " via the Pango interface.")
 {
   LY_ASSERT_TYPE (scm_is_string, name, 1);
-  
+
   string name_str = ly_scm2string (name);
   Font_metric *fm = all_fonts_global->find_font (name_str);
 
index 23119125aa593db391b513ea0bb0cc827e7532d6..d42811c0a7c096adfa1d9609fe8f9f77efa81e6a 100644 (file)
 #include "scm-hash.hh"
 #include "warn.hh"
 
-
 Index_to_charcode_map const *
 All_font_metrics::get_index_to_charcode_map (string filename,
-                                            int face_index,
-                                            FT_Face face)
+                                             int face_index,
+                                             FT_Face face)
 {
   string key = filename + String_convert::int_string (face_index);
   if (filename_charcode_maps_map_.find (key)
@@ -41,7 +40,6 @@ All_font_metrics::get_index_to_charcode_map (string filename,
   return &filename_charcode_maps_map_[key];
 }
 
-
 All_font_metrics::All_font_metrics (string path)
 {
   otf_dict_ = new Scheme_hash_table;
@@ -53,7 +51,7 @@ All_font_metrics::All_font_metrics (string path)
 
   pango_dpi_ = PANGO_RESOLUTION;
   pango_ft2_font_map_set_resolution (pango_ft2_fontmap_,
-                                    pango_dpi_, pango_dpi_);
+                                     pango_dpi_, pango_dpi_);
 
   pango_dict_ = new Scheme_hash_table;
 #endif
@@ -79,8 +77,8 @@ All_font_metrics::All_font_metrics (All_font_metrics const &)
 
 Pango_font *
 All_font_metrics::find_pango_font (PangoFontDescription const *description,
-                                  Real output_scale
-                                  )
+                                   Real output_scale
+                                  )
 {
   gchar *pango_fn = pango_font_description_to_filename (description);
   SCM key = ly_symbol2scm (pango_fn);
@@ -89,22 +87,22 @@ All_font_metrics::find_pango_font (PangoFontDescription const *description,
   if (!pango_dict_->try_retrieve (key, &val))
     {
       if (be_verbose_global)
-       progress_indication ("\n[" + string (pango_fn));
+        progress_indication ("\n[" + string (pango_fn));
 
       Pango_font *pf = new Pango_font (pango_ft2_fontmap_,
-                                      description,
-                                      output_scale
-                                      );
-      
+                                       description,
+                                       output_scale
+                                      );
+
       val = pf->self_scm ();
       pango_dict_->set (key, val);
       pf->unprotect ();
 
       if (be_verbose_global)
-       progress_indication ("]");
+        progress_indication ("]");
 
       pf->description_ = scm_cons (SCM_BOOL_F,
-                                  scm_from_double (1.0));
+                                   scm_from_double (1.0));
     }
   g_free (pango_fn);
   return dynamic_cast<Pango_font *> (unsmob_metrics (val));
@@ -112,7 +110,6 @@ All_font_metrics::find_pango_font (PangoFontDescription const *description,
 
 #endif
 
-
 Open_type_font *
 All_font_metrics::find_otf (string name)
 {
@@ -123,22 +120,22 @@ All_font_metrics::find_otf (string name)
       string file_name;
 
       if (file_name.empty ())
-       file_name = search_path_.find (name + ".otf");
+        file_name = search_path_.find (name + ".otf");
       if (file_name.empty ())
-       return 0;
+        return 0;
 
       if (be_verbose_global)
-       progress_indication ("\n[" + file_name);
+        progress_indication ("\n[" + file_name);
 
       val = Open_type_font::make_otf (file_name);
 
       if (be_verbose_global)
-       progress_indication ("]");
+        progress_indication ("]");
 
       unsmob_metrics (val)->file_name_ = file_name;
       SCM name_string = ly_string2scm (name);
       unsmob_metrics (val)->description_ = scm_cons (name_string,
-                                                    scm_from_double (1.0));
+                                                     scm_from_double (1.0));
       otf_dict_->set (sname, val);
       unsmob_metrics (val)->unprotect ();
     }
index 221c1e8881ee950c70da5af60b29f202236d30ef..ae692d380a141412ee08c5331f0c6236fe84ba01 100644 (file)
@@ -78,7 +78,7 @@ Ambitus_engraver::create_ambitus ()
       accidentals_[d] = make_item ("AmbitusAccidental", SCM_EOL);
       accidentals_[d]->set_parent (heads_[d], Y_AXIS);
       heads_[d]->set_object ("accidental-grob",
-                            accidentals_[d]->self_scm ());
+                             accidentals_[d]->self_scm ());
       Axis_group_interface::add_element (group_, heads_[d]);
       Axis_group_interface::add_element (group_, accidentals_[d]);
     }
@@ -136,17 +136,17 @@ Ambitus_engraver::acknowledge_note_head (Grob_info info)
     {
       SCM p = nr->get_property ("pitch");
       /*
-       If the engraver is added to a percussion context,
-       filter out unpitched note heads.
+        If the engraver is added to a percussion context,
+        filter out unpitched note heads.
       */
       if (!unsmob_pitch (p))
-       return;
+        return;
       Pitch pitch = *unsmob_pitch (p);
       Drul_array<bool> expands = pitch_interval_.add_point (pitch);
       if (expands[UP])
-       causes_[UP] = nr;
+        causes_[UP] = nr;
       if (expands[DOWN])
-       causes_[DOWN] = nr;
+        causes_[DOWN] = nr;
     }
 }
 
@@ -155,50 +155,50 @@ Ambitus_engraver::finalize ()
 {
   if (ambitus_ && !pitch_interval_.is_empty ())
     {
-      Grob *accidental_placement =
-       make_item ("AccidentalPlacement", accidentals_[DOWN]->self_scm ());
+      Grob *accidental_placement
+        = make_item ("AccidentalPlacement", accidentals_[DOWN]->self_scm ());
 
       Direction d = DOWN;
       do
-       {
-         Pitch p = pitch_interval_[d];
-         heads_[d]->set_property ("cause", causes_[d]->self_scm());
-         heads_[d]->set_property ("staff-position",
-                                  scm_from_int (start_c0_ + p.steps ()));
-
-         SCM handle = scm_assoc (scm_cons (scm_from_int (p.get_octave ()),
-                                           scm_from_int (p.get_notename ())),
-                                 start_key_sig_);
-
-         if (handle == SCM_BOOL_F)
-           handle = scm_assoc (scm_from_int (p.get_notename ()),
-                               start_key_sig_);
-
-         Rational sig_alter = (handle != SCM_BOOL_F)
-           ? robust_scm2rational (scm_cdr (handle), Rational (0))
-           : Rational (0);
-
-         const Pitch other = pitch_interval_[-d];
-
-         if (sig_alter == p.get_alteration ()
-             && !((p.steps () == other.steps ())
-                  && (p.get_alteration () != other.get_alteration ())))
-           {
-             accidentals_[d]->suicide ();
-             heads_[d]->set_object ("accidental-grob", SCM_EOL);
-           }
-         else
-           accidentals_[d]->
-             set_property ("alteration",
-                           ly_rational2scm (p.get_alteration ()));
-         Separation_item::add_conditional_item (heads_[d],
-                                                accidental_placement);
-         Accidental_placement::add_accidental (accidental_placement,
-                                               accidentals_[d]);
-         Pointer_group_interface::add_grob (ambitus_,
-                                            ly_symbol2scm ("note-heads"),
-                                            heads_[d]);
-       }
+        {
+          Pitch p = pitch_interval_[d];
+          heads_[d]->set_property ("cause", causes_[d]->self_scm ());
+          heads_[d]->set_property ("staff-position",
+                                   scm_from_int (start_c0_ + p.steps ()));
+
+          SCM handle = scm_assoc (scm_cons (scm_from_int (p.get_octave ()),
+                                            scm_from_int (p.get_notename ())),
+                                  start_key_sig_);
+
+          if (handle == SCM_BOOL_F)
+            handle = scm_assoc (scm_from_int (p.get_notename ()),
+                                start_key_sig_);
+
+          Rational sig_alter = (handle != SCM_BOOL_F)
+                               ? robust_scm2rational (scm_cdr (handle), Rational (0))
+                               : Rational (0);
+
+          const Pitch other = pitch_interval_[-d];
+
+          if (sig_alter == p.get_alteration ()
+              && !((p.steps () == other.steps ())
+                   && (p.get_alteration () != other.get_alteration ())))
+            {
+              accidentals_[d]->suicide ();
+              heads_[d]->set_object ("accidental-grob", SCM_EOL);
+            }
+          else
+            accidentals_[d]->
+            set_property ("alteration",
+                          ly_rational2scm (p.get_alteration ()));
+          Separation_item::add_conditional_item (heads_[d],
+                                                 accidental_placement);
+          Accidental_placement::add_accidental (accidental_placement,
+                                                accidentals_[d]);
+          Pointer_group_interface::add_grob (ambitus_,
+                                             ly_symbol2scm ("note-heads"),
+                                             heads_[d]);
+        }
       while (flip (&d) != DOWN);
 
       Axis_group_interface::add_element (group_, accidental_placement);
@@ -207,10 +207,10 @@ Ambitus_engraver::finalize ()
     {
       Direction d = DOWN;
       do
-       {
-         accidentals_[d]->suicide ();
-         heads_[d]->suicide ();
-       }
+        {
+          accidentals_[d]->suicide ();
+          heads_[d]->suicide ();
+        }
       while (flip (&d) != DOWN);
 
       ambitus_->suicide ();
@@ -219,20 +219,20 @@ Ambitus_engraver::finalize ()
 
 ADD_ACKNOWLEDGER (Ambitus_engraver, note_head);
 ADD_TRANSLATOR (Ambitus_engraver,
-               /* doc */
-               "Create an ambitus.",
-
-               /* create */
-               "AccidentalPlacement "
-               "Ambitus "
-               "AmbitusAccidental "
-               "AmbitusLine "
-               "AmbitusNoteHead ",
-
-               /* read */
-               "keySignature "
-               "middleCPosition ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Create an ambitus.",
+
+                /* create */
+                "AccidentalPlacement "
+                "Ambitus "
+                "AmbitusAccidental "
+                "AmbitusLine "
+                "AmbitusNoteHead ",
+
+                /* read */
+                "keySignature "
+                "middleCPosition ",
+
+                /* write */
+                ""
+               );
index 62be51d90b326c65e085d694bdd881075fe0f4f2..38be529e732570d0a0a37dd42fe352b5e8a72936 100644 (file)
@@ -64,11 +64,11 @@ Arpeggio_engraver::acknowledge_stem (Grob_info info)
   if (arpeggio_)
     {
       if (!arpeggio_->get_parent (Y_AXIS))
-       arpeggio_->set_parent (info.grob (), Y_AXIS);
+        arpeggio_->set_parent (info.grob (), Y_AXIS);
 
       Pointer_group_interface::add_grob (arpeggio_,
-                                        ly_symbol2scm ("stems"),
-                                        info.grob ());
+                                         ly_symbol2scm ("stems"),
+                                         info.grob ());
     }
 }
 void
@@ -103,15 +103,15 @@ ADD_ACKNOWLEDGER (Arpeggio_engraver, stem);
 ADD_ACKNOWLEDGER (Arpeggio_engraver, rhythmic_head);
 
 ADD_TRANSLATOR (Arpeggio_engraver,
-               /* doc */
-               "Generate an Arpeggio symbol.",
+                /* doc */
+                "Generate an Arpeggio symbol.",
 
-               /* create */
-               "Arpeggio",
+                /* create */
+                "Arpeggio",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index b609f846d7a350fd6a541dec4bb2540285d4bcea..9b85808a263a93831916d766dce1c09a21dc003d 100644 (file)
@@ -49,7 +49,7 @@ Arpeggio::get_common_y (Grob *me)
     {
       Grob *stem = stems[i];
       common = common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem),
-                                       Y_AXIS);
+                                        Y_AXIS);
     }
 
   return common;
@@ -94,27 +94,27 @@ Arpeggio::print (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   Interval heads = robust_scm2interval (me->get_property ("positions"),
-                                       Interval ())
-    * Staff_symbol_referencer::staff_space (me);
+                                        Interval ())
+                   * Staff_symbol_referencer::staff_space (me);
 
   if (heads.is_empty () || heads.length () < 0.5)
     {
       if (to_boolean (me->get_property ("transparent")))
-       {
-         /*
-           This is part of a cross-staff/-voice span-arpeggio,
-           so we need to ensure `heads' is large enough to encompass
-           a single trill-element since the span-arpeggio depends on
-           its children to prevent collisions.
-         */
-         heads.unite (get_squiggle (me).extent (Y_AXIS));
-       }
+        {
+          /*
+            This is part of a cross-staff/-voice span-arpeggio,
+            so we need to ensure `heads' is large enough to encompass
+            a single trill-element since the span-arpeggio depends on
+            its children to prevent collisions.
+          */
+          heads.unite (get_squiggle (me).extent (Y_AXIS));
+        }
       else
-       {
-         me->warning ("no heads for arpeggio found?");
-         me->suicide ();
-         return SCM_EOL;
-       }
+        {
+          me->warning ("no heads for arpeggio found?");
+          me->suicide ();
+          return SCM_EOL;
+        }
     }
 
   SCM ad = me->get_property ("arpeggio-direction");
@@ -162,8 +162,8 @@ Arpeggio::brew_chord_bracket (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   Interval heads = robust_scm2interval (me->get_property ("positions"),
-                                       Interval ())
-    * Staff_symbol_referencer::staff_space (me);
+                                        Interval ())
+                   * Staff_symbol_referencer::staff_space (me);
 
   Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
   Real sp = 1.5 * Staff_symbol_referencer::staff_space (me);
@@ -182,8 +182,8 @@ Arpeggio::brew_chord_slur (SCM smob)
   Grob *me = unsmob_grob (smob);
   SCM dash_definition = me->get_property ("dash-definition");
   Interval heads = robust_scm2interval (me->get_property ("positions"),
-                                       Interval ())
-    * Staff_symbol_referencer::staff_space (me);
+                                        Interval ())
+                   * Staff_symbol_referencer::staff_space (me);
 
   Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
   Real dy = heads.length ();
@@ -222,13 +222,13 @@ Arpeggio::pure_height (SCM smob, SCM, SCM)
 }
 
 ADD_INTERFACE (Arpeggio,
-              "Functions and settings for drawing an arpeggio symbol.",
-
-              /* properties */
-              "arpeggio-direction "
-              "positions "
-              "script-priority " // TODO: make around-note-interface
-              "stems "
-              "dash-definition " // TODO: make apply to non-slur arpeggios
-              );
+               "Functions and settings for drawing an arpeggio symbol.",
+
+               /* properties */
+               "arpeggio-direction "
+               "positions "
+               "script-priority " // TODO: make around-note-interface
+               "stems "
+               "dash-definition " // TODO: make apply to non-slur arpeggios
+              );
 
index 93018656a5e5c1cf38ec9c24fbefe54af08d400f..a015df60632305b5e7b48c789ad6f9c335a2d0d6 100644 (file)
@@ -35,8 +35,8 @@
 
 SCM
 articulation_list (vector<Stream_event *> note_events,
-                  vector<Stream_event *> articulation_events,
-                  char const *articulation_name)
+                   vector<Stream_event *> articulation_events,
+                   char const *articulation_name)
 {
   vector<Stream_event *> string_events;
   SCM articulations = SCM_EOL;
@@ -50,35 +50,35 @@ articulation_list (vector<Stream_event *> note_events,
       Stream_event *articulation_event = 0;
 
       /*
-       For notes inside a chord construct, string indications are
-       stored as articulations on the note, so we check through
-       the notes
+        For notes inside a chord construct, string indications are
+        stored as articulations on the note, so we check through
+        the notes
       */
       for (SCM s = event->get_property ("articulations");
-          !articulation_event && scm_is_pair (s); s = scm_cdr (s))
-       {
-         Stream_event *art = unsmob_stream_event (scm_car (s));
+           !articulation_event && scm_is_pair (s); s = scm_cdr (s))
+        {
+          Stream_event *art = unsmob_stream_event (scm_car (s));
 
-         if (art->in_event_class (articulation_name))
-           articulation_event = art;
-       }
+          if (art->in_event_class (articulation_name))
+            articulation_event = art;
+        }
 
       /*
-       For string indications listed outside a chord construct,
-       a string_number_event is generated, so if there was no string
-       in the articulations, we check for string events outside
-       the chord construct
+        For string indications listed outside a chord construct,
+        a string_number_event is generated, so if there was no string
+        in the articulations, we check for string events outside
+        the chord construct
       */
       if (!articulation_event && j < articulation_events.size ())
-       {
-         articulation_event = articulation_events[j];
-         if (j + 1 < articulation_events.size ())
-           j++;
-       }
+        {
+          articulation_event = articulation_events[j];
+          if (j + 1 < articulation_events.size ())
+            j++;
+        }
       articulations = scm_cons ((articulation_event
-                                ? articulation_event->self_scm ()
-                                : SCM_EOL),
-                               articulations);
+                                 ? articulation_event->self_scm ()
+                                 : SCM_EOL),
+                                articulations);
     }
 
   return (scm_reverse (articulations));
index 105eb1dda858035047d4f09960295dd997aa73b0..0b471a097ab3ed31aacccd44339d192f55b46a7e 100644 (file)
@@ -51,4 +51,3 @@ Audio_column::offset_when (Moment m)
   when_ += m;
 }
 
-
index e7db515aab07a76c0ddaf177973e7ea9ca0d0781..944df8e3d90b2f129e07ca972110c5241f71efc5 100644 (file)
@@ -36,11 +36,11 @@ Audio_element_info::Audio_element_info ()
   origin_trans_ = 0;
 }
 
-vector<Context*>
+vector<Context *>
 Audio_element_info::origin_contexts (Translator *end) const
 {
   Context *t = origin_trans_->context ();
-  vector<Context*> r;
+  vector<Context *> r;
   do
     {
       r.push_back (t);
index cd3f7c8d18335cd1dcc5fa549fbd4fa80add96eb..954cdc7da10755b0d9e33f38503f4005804d5239 100644 (file)
@@ -16,7 +16,7 @@
   You should have received a copy of the GNU General Public License
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
-#include <cassert> 
+#include <cassert>
 
 #include "audio-element.hh"
 
index 76a3923848b5d853cca02f41c6417f24b368b0a4..1cbf7765b70f338ff82a5b9ed004ddf47c8eebbd 100644 (file)
@@ -39,18 +39,18 @@ Audio_item::get_column () const
 }
 
 Audio_item::Audio_item ()
-  : audio_column_ (0)
-  , channel_ (0)
+  : audio_column_ (0),
+    channel_ (0)
 {
 }
 
 Audio_note::Audio_note (Pitch p, Moment m, bool tie_event, Pitch transposing)
-  : pitch_ (p)
-  , length_mom_ (m)
-  , transposing_ (transposing)
-  , dynamic_ (0)
-  , tied_ (0)
-  , tie_event_ (tie_event)
+  : pitch_ (p),
+    length_mom_ (m),
+    transposing_ (transposing),
+    dynamic_ (0),
+    tied_ (0),
+    tie_event_ (tie_event)
 {
 }
 
@@ -74,8 +74,8 @@ Audio_key::Audio_key (int acc, bool major)
 }
 
 Audio_dynamic::Audio_dynamic ()
-  : volume_ (-1)
-  , silent_ (false)
+  : volume_ (-1),
+    silent_ (false)
 {
 }
 
@@ -94,8 +94,8 @@ Audio_span_dynamic::add_absolute (Audio_dynamic *d)
 Moment
 remap_grace_duration (Moment m)
 {
-  return Moment (m.main_part_ + Rational (9,40) * m.grace_part_,
-                Rational (0));
+  return Moment (m.main_part_ + Rational (9, 40) * m.grace_part_,
+                 Rational (0));
 }
 
 Real
@@ -114,13 +114,13 @@ void
 Audio_span_dynamic::render ()
 {
   if (dynamics_.size () <= 1)
-    return ;
+    return;
 
   assert (dynamics_[0]->volume_ >= 0);
 
-  while  (dynamics_.back ()->volume_ > 0
-         && dynamics_.size () > 1
-         && sign (dynamics_.back ()->volume_ - dynamics_[0]->volume_) != grow_dir_)
+  while (dynamics_.back ()->volume_ > 0
+         && dynamics_.size () > 1
+         && sign (dynamics_.back ()->volume_ - dynamics_[0]->volume_) != grow_dir_)
     {
       dynamics_.erase (dynamics_.end () - 1);
     }
@@ -128,7 +128,7 @@ Audio_span_dynamic::render ()
   if (dynamics_.size () <= 1)
     {
       programming_error ("Impossible or ambiguous (de)crescendo in MIDI.");
-      return ;
+      return;
     }
 
   Real delta_v = grow_dir_ * 0.1;
@@ -143,21 +143,19 @@ Audio_span_dynamic::render ()
 
   Real total_t = moment_to_real (dynamics_.back ()->get_column ()->when () - start);
 
-  for (vsize i = 1; i < dynamics_.size (); i ++)
+  for (vsize i = 1; i < dynamics_.size (); i++)
     {
       Moment dt_moment = dynamics_[i]->get_column ()->when ()
-       - start;
+                         - start;
 
-      Real dt =  moment_to_real (dt_moment);
+      Real dt = moment_to_real (dt_moment);
 
-      Real v = start_v + delta_v *  (dt / total_t);
+      Real v = start_v + delta_v * (dt / total_t);
 
       dynamics_[i]->volume_ = v;
     }
 }
 
-
-
 Audio_tempo::Audio_tempo (int per_minute_4)
 {
   per_minute_4_ = per_minute_4;
index ddab7e04bc11d2fa9e6b0c7a5a1a740631c1eecd..0398c894adfe06fbc55cfe342138bbdcd2e48480 100644 (file)
@@ -44,7 +44,7 @@ Audio_staff::output (Midi_stream &midi_stream, int track, bool port)
     i.process ();
 
   i.finalize ();
-  
+
   midi_stream.write (midi_track);
 }
 
index 0d5fa60ed2444cb8d5e9061fc3613c32613f4794..8d8a4b6c56674348d472b9e786788917e290ad40 100644 (file)
@@ -88,11 +88,9 @@ private:
 
   Beaming_pattern *finished_grouping_;
 
-
   Beaming_options beaming_options_;
   Beaming_options finished_beaming_options_;
 
-
   void check_bar_property ();
 };
 
@@ -127,7 +125,7 @@ Auto_beam_engraver::process_music ()
   if (stems_)
     {
       if (extend_mom_ < now)
-       end_beam ();
+        end_beam ();
     }
 
   if (scm_is_string (get_property ("whichBar")))
@@ -139,9 +137,9 @@ Auto_beam_engraver::process_music ()
   if (forbid_)
     {
       if (stems_)
-       end_beam ();
+        end_beam ();
       else
-       junk_beam ();
+        junk_beam ();
     }
 }
 
@@ -168,11 +166,11 @@ bool
 Auto_beam_engraver::test_moment (Direction dir, Moment test_mom, Moment dur)
 {
   return scm_call_4 (get_property ("autoBeamCheck"),
-                    context ()->self_scm (),
-                    scm_from_int (dir),
+                     context ()->self_scm (),
+                     scm_from_int (dir),
                      test_mom.smobbed_copy (),
-                    dur.smobbed_copy ())
-    != SCM_BOOL_F;
+                     dur.smobbed_copy ())
+         != SCM_BOOL_F;
 }
 
 void
@@ -184,7 +182,7 @@ Auto_beam_engraver::consider_begin (Moment test_mom, Moment dur)
     {
       bool b = test_moment (START, test_mom, dur);
       if (b)
-       begin_beam ();
+        begin_beam ();
     }
 }
 
@@ -194,10 +192,10 @@ Auto_beam_engraver::consider_end (Moment test_mom, Moment dur)
   if (stems_)
     {
       /* Allow already started autobeam to end:
-        don't check for autoBeaming */
+         don't check for autoBeaming */
       bool b = test_moment (STOP, test_mom, dur);
       if (b)
-       end_beam ();
+        end_beam ();
     }
 }
 
@@ -272,14 +270,14 @@ Auto_beam_engraver::end_beam ()
       finished_beam_ = create_beam ();
 
       if (finished_beam_)
-       {
-         Grob_info i = make_grob_info (finished_beam_, SCM_EOL);
-         i.rerouting_daddy_context_ = beam_start_context_;
-
-         announce_end_grob (i);
-         finished_grouping_ = grouping_;
-         finished_beaming_options_ = beaming_options_;
-       }
+        {
+          Grob_info i = make_grob_info (finished_beam_, SCM_EOL);
+          i.rerouting_daddy_context_ = beam_start_context_;
+
+          announce_end_grob (i);
+          finished_grouping_ = grouping_;
+          finished_beaming_options_ = beaming_options_;
+        }
       delete stems_;
       stems_ = 0;
       grouping_ = 0;
@@ -295,7 +293,7 @@ Auto_beam_engraver::typeset_beam ()
   if (finished_beam_)
     {
       if (!finished_beam_->get_bound (RIGHT))
-       finished_beam_->set_bound (RIGHT, finished_beam_->get_bound (LEFT));
+        finished_beam_->set_bound (RIGHT, finished_beam_->get_bound (LEFT));
 
       finished_grouping_->beamify (finished_beaming_options_);
       Beam::set_beaming (finished_beam_, finished_grouping_);
@@ -324,7 +322,6 @@ Auto_beam_engraver::finalize ()
     junk_beam ();
 }
 
-
 void
 Auto_beam_engraver::acknowledge_beam (Grob_info /* info */)
 {
@@ -375,14 +372,14 @@ Auto_beam_engraver::acknowledge_stem (Grob_info info)
   if (!Stem::head_count (stem))
     {
       if (stems_)
-       end_beam ();
+        end_beam ();
       return;
     }
 
   if (Stem::get_beam (stem))
     {
       if (stems_)
-       junk_beam ();
+        junk_beam ();
       return;
     }
 
@@ -391,7 +388,7 @@ Auto_beam_engraver::acknowledge_stem (Grob_info info)
   if (durlog <= 2)
     {
       if (stems_)
-       end_beam ();
+        end_beam ();
       return;
     }
 
@@ -408,9 +405,9 @@ Auto_beam_engraver::acknowledge_stem (Grob_info info)
 
   if (dur < shortest_mom_)
     {
-    /* new shortest moment, so store it and set recheck_needed */
-    shortest_mom_ = dur;
-    recheck_needed = true;
+      /* new shortest moment, so store it and set recheck_needed */
+      shortest_mom_ = dur;
+      recheck_needed = true;
     }
 
   /* end should be based on shortest_mom_, begin should be
@@ -422,8 +419,8 @@ Auto_beam_engraver::acknowledge_stem (Grob_info info)
     return;
 
   grouping_->add_stem (now - beam_start_moment_ + beam_start_location_,
-                      durlog - 2,
-                      Stem::is_invisible (stem));
+                       durlog - 2,
+                       Stem::is_invisible (stem));
   stems_->push_back (stem);
   last_add_mom_ = now;
   extend_mom_ = max (extend_mom_, now) + get_event_length (ev, now);
@@ -447,7 +444,6 @@ Auto_beam_engraver::recheck_beam ()
 
   bool found_end;
 
-
   for (vsize i = 0; i < stems_->size () - 1;)
     {
       found_end = test_moment (STOP,
@@ -506,7 +502,7 @@ Auto_beam_engraver::remove_end_stems (vsize split_index)
 void
 Auto_beam_engraver::process_acknowledged ()
 {
-  Moment now = now_mom();
+  Moment now = now_mom ();
   if (extend_mom_ > now)
     return;
 
@@ -518,13 +514,13 @@ Auto_beam_engraver::process_acknowledged ()
   else if (process_acknowledged_count_ > 1)
     {
       if (stems_)
-       {
-         if ((extend_mom_ < now)
-             || ((extend_mom_ == now) && (last_add_mom_ != now)))
-           end_beam ();
-         else if (!stems_->size ())
-           junk_beam ();
-       }
+        {
+          if ((extend_mom_ < now)
+              || ((extend_mom_ == now) && (last_add_mom_ != now)))
+            end_beam ();
+          else if (!stems_->size ())
+            junk_beam ();
+        }
     }
 
   process_acknowledged_count_++;
@@ -557,4 +553,4 @@ ADD_TRANSLATOR (Auto_beam_engraver,
 
                 /* write */
                 ""
-                );
+               );
index 76e43dbccdf4918175df9a7ef73b27f8bff736fb..6063c57c1faf1a27bb65185ce7f62db9c19a30b7 100644 (file)
@@ -47,7 +47,7 @@ private:
 
 void
 Auto_change_iterator::change_to (Music_iterator *it, SCM to_type_sym,
-                                string to_id)
+                                 string to_id)
 {
   Context *current = it->get_outlet ();
   Context *last = 0;
@@ -77,22 +77,22 @@ Auto_change_iterator::change_to (Music_iterator *it, SCM to_type_sym,
   if (current)
     {
       if (last)
-       {
-         Context *dest
-           = it->get_outlet ()->find_create_context (to_type_sym, to_id, SCM_EOL);
-         
-         send_stream_event (last, "ChangeParent", get_music ()->origin (),
-                              ly_symbol2scm ("context"), dest->self_scm ());
-       }
+        {
+          Context *dest
+            = it->get_outlet ()->find_create_context (to_type_sym, to_id, SCM_EOL);
+
+          send_stream_event (last, "ChangeParent", get_music ()->origin (),
+                             ly_symbol2scm ("context"), dest->self_scm ());
+        }
       else
-       {
-         /*
-           We could change the current translator's id, but that would make
-           errors hard to catch
-
-         */
-         ;
-       }
+        {
+          /*
+            We could change the current translator's id, but that would make
+            errors hard to catch
+
+          */
+          ;
+        }
     }
 }
 
@@ -110,19 +110,19 @@ Auto_change_iterator::process (Moment m)
     {
       splitm = unsmob_moment (scm_caar (split_list_));
       if ((*splitm + start_moment_) > now)
-       break;
+        break;
 
       SCM tag = scm_cdar (split_list_);
       Direction d = to_dir (tag);
 
       if (d && d != where_dir_)
-       {
-         where_dir_ = d;
-         string to_id = (d >= 0) ? "up" : "down";
-         change_to (child_iter_,
-                    ly_symbol2scm ("Staff"),
-                    to_id);
-       }
+        {
+          where_dir_ = d;
+          string to_id = (d >= 0) ? "up" : "down";
+          change_to (child_iter_,
+                     ly_symbol2scm ("Staff"),
+                     to_id);
+        }
     }
 }
 
@@ -140,17 +140,17 @@ Auto_change_iterator::construct_children ()
 
   SCM props = get_outlet ()->get_property ("trebleStaffProperties");
   Context *up = get_outlet ()->find_create_context (ly_symbol2scm ("Staff"),
-                                                   "up", props);
+                                                    "up", props);
 
   props = get_outlet ()->get_property ("bassStaffProperties");
   Context *down = get_outlet ()->find_create_context (ly_symbol2scm ("Staff"),
-                                                     "down", props);
+                                                      "down", props);
 
   up_.set_context (up);
   down_.set_context (down);
 
   Context *voice = up->find_create_context (ly_symbol2scm ("Voice"),
-                                           "", SCM_EOL);
+                                            "", SCM_EOL);
   set_context (voice);
   Music_wrapper_iterator::construct_children ();
 }
index 60d16767b0880afa354abf92aa387f181b28d274..cde30afebc5aae2e62fc8c7e3655cdebece579fd 100644 (file)
@@ -87,19 +87,19 @@ Axis_group_engraver::process_acknowledged ()
   for (vsize i = 0; i < elts_.size (); i++)
     {
       if (!unsmob_grob (elts_[i]->get_object ("axis-group-parent-Y")))
-       {
-         if (staffline_->get_parent (Y_AXIS)
-             && staffline_->get_parent (Y_AXIS) == elts_[i])
-           {
-             staffline_->warning (_ ("Axis_group_engraver: vertical group already has a parent"));
-             staffline_->warning (_ ("are there two Axis_group_engravers?"));
-             staffline_->warning (_ ("removing this vertical group"));
-             staffline_->suicide ();
-             staffline_ = 0;
-             break;
-           }
-         add_element (elts_[i]);
-       }
+        {
+          if (staffline_->get_parent (Y_AXIS)
+              && staffline_->get_parent (Y_AXIS) == elts_[i])
+            {
+              staffline_->warning (_ ("Axis_group_engraver: vertical group already has a parent"));
+              staffline_->warning (_ ("are there two Axis_group_engravers?"));
+              staffline_->warning (_ ("removing this vertical group"));
+              staffline_->suicide ();
+              staffline_ = 0;
+              break;
+            }
+          add_element (elts_[i]);
+        }
     }
   elts_.clear ();
 }
@@ -113,16 +113,16 @@ Axis_group_engraver::add_element (Grob *e)
 ADD_ACKNOWLEDGER (Axis_group_engraver, grob);
 
 ADD_TRANSLATOR (Axis_group_engraver,
-               /* doc */
-               "Group all objects created in this context in a"
-               " @code{VerticalAxisGroup} spanner.",
+                /* doc */
+                "Group all objects created in this context in a"
+                " @code{VerticalAxisGroup} spanner.",
 
-               /* create */
-               "VerticalAxisGroup ",
+                /* create */
+                "VerticalAxisGroup ",
 
-               /* read */
-               "currentCommandColumn ",
+                /* read */
+                "currentCommandColumn ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 744bff13aacd0040c714cae2272a38581b563452..fac97c2dee5e33a2e6558be709796d8908432845 100644 (file)
@@ -23,9 +23,9 @@
 #include "grob-array.hh"
 
 LY_DEFINE (ly_relative_group_extent, "ly:relative-group-extent",
-          3, 0, 0, (SCM elements, SCM common, SCM axis),
-          "Determine the extent of @var{elements} relative to @var{common} in the"
-          " @var{axis} direction.")
+           3, 0, 0, (SCM elements, SCM common, SCM axis),
+           "Determine the extent of @var{elements} relative to @var{common} in the"
+           " @var{axis} direction.")
 {
   Grob_array *ga = unsmob_grob_array (elements);
 
@@ -33,23 +33,23 @@ LY_DEFINE (ly_relative_group_extent, "ly:relative-group-extent",
   LY_ASSERT_SMOB (Grob, common, 2);
   LY_ASSERT_TYPE (is_axis, axis, 3);
 
-  vector<Grob*> elts;
+  vector<Grob *> elts;
   if (!ga)
     {
       for (SCM s = elements; scm_is_pair (s); s = scm_cdr (s))
-       elts.push_back (unsmob_grob (scm_car (s)));
+        elts.push_back (unsmob_grob (scm_car (s)));
     }
 
   Interval ext = Axis_group_interface::relative_group_extent (ga ? ga->array () : elts,
-                                                             unsmob_grob (common),
-                                                             (Axis) scm_to_int (axis));
+                                                              unsmob_grob (common),
+                                                              (Axis) scm_to_int (axis));
   return ly_interval2scm (ext);
 }
 
 LY_DEFINE (ly_axis_group_interface__add_element, "ly:axis-group-interface::add-element",
-          2, 0, 0, (SCM grob, SCM grob_element),
-          "Set @var{grob} the parent of @var{grob-element} on all axes of"
-          " @var{grob}.")
+           2, 0, 0, (SCM grob, SCM grob_element),
+           "Set @var{grob} the parent of @var{grob-element} on all axes of"
+           " @var{grob}.")
 {
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_SMOB (Grob, grob_element, 2);
index e0bd31663f89d1134018b224976ffc237adfb7d8..143534edabe2874b4c73d2e314ed3fa5756dbea9 100644 (file)
@@ -50,12 +50,12 @@ Axis_group_interface::add_element (Grob *me, Grob *e)
       Axis a = (Axis) scm_to_int (scm_car (ax));
 
       if (!e->get_parent (a))
-       e->set_parent (me, a);
+        e->set_parent (me, a);
 
       e->set_object ((a == X_AXIS)
-                    ? ly_symbol2scm ("axis-group-parent-X")
-                    : ly_symbol2scm ("axis-group-parent-Y"),
-                    me->self_scm ());
+                     ? ly_symbol2scm ("axis-group-parent-X")
+                     : ly_symbol2scm ("axis-group-parent-Y"),
+                     me->self_scm ());
     }
 
   /* must be ordered, because Align_interface also uses
@@ -72,19 +72,19 @@ Axis_group_interface::has_axis (Grob *me, Axis a)
 }
 
 Interval
-Axis_group_interface::relative_group_extent (vector<Grob*> const &elts,
-                                            Grob *common, Axis a)
+Axis_group_interface::relative_group_extent (vector<Grob *> const &elts,
+                                             Grob *common, Axis a)
 {
   Interval r;
   for (vsize i = 0; i < elts.size (); i++)
     {
       Grob *se = elts[i];
       if (!to_boolean (se->get_property ("cross-staff")))
-       {
-         Interval dims = se->extent (common, a);
-         if (!dims.is_empty ())
-           r.unite (dims);
-       }
+        {
+          Interval dims = se->extent (common, a);
+          if (!dims.is_empty ())
+            r.unite (dims);
+        }
     }
   return r;
 }
@@ -101,10 +101,10 @@ Axis_group_interface::sum_partial_pure_heights (Grob *me, int start, int end)
 Interval
 Axis_group_interface::part_of_line_pure_height (Grob *me, bool begin, int start, int end)
 {
-  Spanner *sp = dynamic_cast<Spanner*> (me);
+  Spanner *sp = dynamic_cast<Spanner *> (me);
   SCM cache_symbol = begin
-    ? ly_symbol2scm ("begin-of-line-pure-height")
-    : ly_symbol2scm ("rest-of-line-pure-height");
+                     ? ly_symbol2scm ("begin-of-line-pure-height")
+                     : ly_symbol2scm ("rest-of-line-pure-height");
   SCM cached = sp->get_cached_pure_property (cache_symbol, start, end);
   if (scm_is_pair (cached))
     return robust_scm2interval (cached, Interval (0, 0));
@@ -117,13 +117,13 @@ Axis_group_interface::part_of_line_pure_height (Grob *me, bool begin, int start,
   else
     {
       SCM these_pure_heights = begin
-       ? scm_car (adjacent_pure_heights)
-       : scm_cdr (adjacent_pure_heights);
+                               ? scm_car (adjacent_pure_heights)
+                               : scm_cdr (adjacent_pure_heights);
 
       if (scm_is_vector (these_pure_heights))
-       ret = combine_pure_heights (me, these_pure_heights, start, end);
+        ret = combine_pure_heights (me, these_pure_heights, start, end);
       else
-       ret = Interval (0, 0);
+        ret = Interval (0, 0);
     }
 
   sp->cache_pure_property (cache_symbol, start, end, ly_interval2scm (ret));
@@ -147,17 +147,17 @@ Axis_group_interface::combine_pure_heights (Grob *me, SCM measure_extents, int s
 {
   Paper_score *ps = get_root_system (me)->paper_score ();
   vector<vsize> breaks = ps->get_break_indices ();
-  vector<Grob*> cols = ps->get_columns ();
+  vector<Grob *> cols = ps->get_columns ();
 
   Interval ext;
   for (vsize i = 0; i + 1 < breaks.size (); i++)
     {
       int r = Paper_column::get_rank (cols[breaks[i]]);
       if (r >= end)
-       break;
+        break;
 
       if (r >= start)
-       ext.unite (ly_scm2interval (scm_c_vector_ref (measure_extents, i)));
+        ext.unite (ly_scm2interval (scm_c_vector_ref (measure_extents, i)));
     }
 
   return ext;
@@ -193,7 +193,7 @@ Axis_group_interface::adjacent_pure_heights (SCM smob)
       Grob *g = elts[i];
 
       if (to_boolean (g->get_property ("cross-staff")))
-       continue;
+        continue;
 
       bool outside_staff = scm_is_number (g->get_property ("outside-staff-priority"));
       Real padding = robust_scm2double (g->get_property ("outside-staff-padding"), 0.5);
@@ -205,10 +205,10 @@ Axis_group_interface::adjacent_pure_heights (SCM smob)
       // but only the fact that outside-staff grobs may need to be raised above
       // the staff.
       if (outside_staff && begin_line_staff_heights.empty ())
-       {
-         begin_line_staff_heights = begin_line_heights;
-         mid_line_staff_heights = mid_line_heights;
-       }
+        {
+          begin_line_staff_heights = begin_line_heights;
+          mid_line_staff_heights = mid_line_heights;
+        }
 
       // TODO: consider a pure version of get_grob_direction?
       Direction d = to_dir (g->get_property_data ("direction"));
@@ -217,42 +217,40 @@ Axis_group_interface::adjacent_pure_heights (SCM smob)
       Interval_t<int> rank_span = g->spanned_rank_interval ();
       vsize first_break = lower_bound (ranks, (vsize)rank_span[LEFT], less<vsize> ());
       if (first_break > 0 && ranks[first_break] >= (vsize)rank_span[LEFT])
-       first_break--;
-
-      for (vsize j = first_break; j+1 < ranks.size () && (int)ranks[j] <= rank_span[RIGHT]; ++j)
-       {
-         int start = ranks[j];
-         int end = ranks[j+1];
-
-         // Take grobs that are visible with respect to a slightly longer line.
-         // Otherwise, we will never include grobs at breakpoints which aren't
-         // end-of-line-visible.
-         int visibility_end = j + 2 < ranks.size () ? ranks[j+2] : end;
-
-         if (g->pure_is_visible (start, visibility_end))
-           {
-             Interval dims = g->pure_height (common, start, end);
-             if (!dims.is_empty ())
-               {
-                 if (rank_span[LEFT] <= start)
-                   {
-                     if (outside_staff)
-                       begin_line_heights[j].unite (
-                           begin_line_staff_heights[j].union_disjoint (dims, padding, d));
-                     else
-                       begin_line_heights[j].unite (dims);
-                   }
+        first_break--;
+
+      for (vsize j = first_break; j + 1 < ranks.size () && (int)ranks[j] <= rank_span[RIGHT]; ++j)
+        {
+          int start = ranks[j];
+          int end = ranks[j + 1];
+
+          // Take grobs that are visible with respect to a slightly longer line.
+          // Otherwise, we will never include grobs at breakpoints which aren't
+          // end-of-line-visible.
+          int visibility_end = j + 2 < ranks.size () ? ranks[j + 2] : end;
+
+          if (g->pure_is_visible (start, visibility_end))
+            {
+              Interval dims = g->pure_height (common, start, end);
+              if (!dims.is_empty ())
+                {
+                  if (rank_span[LEFT] <= start)
+                    {
+                      if (outside_staff)
+                        begin_line_heights[j].unite (begin_line_staff_heights[j].union_disjoint (dims, padding, d));
+                      else
+                        begin_line_heights[j].unite (dims);
+                    }
                   if (rank_span[RIGHT] > start)
-                   {
-                     if (outside_staff)
-                       mid_line_heights[j].unite (
-                            mid_line_staff_heights[j].union_disjoint (dims, padding, d));
-                     else
-                       mid_line_heights[j].unite (dims);
-                   }
-               }
-           }
-       }
+                    {
+                      if (outside_staff)
+                        mid_line_heights[j].unite (mid_line_staff_heights[j].union_disjoint (dims, padding, d));
+                      else
+                        mid_line_heights[j].unite (dims);
+                    }
+                }
+            }
+        }
     }
 
   // Convert begin_line_heights and min_line_heights to SCM.
@@ -291,13 +289,13 @@ Axis_group_interface::relative_pure_height (Grob *me, int start, int end)
       Grob *g = elts[i];
       Interval_t<int> rank_span = g->spanned_rank_interval ();
       if (rank_span[LEFT] <= end && rank_span[RIGHT] >= start
-         && g->pure_is_visible (start, end)
-         && !to_boolean (g->get_property ("cross-staff")))
-       {
-         Interval dims = g->pure_height (common, start, end);
-         if (!dims.is_empty ())
-           r.unite (dims);
-       }
+          && g->pure_is_visible (start, end)
+          && !to_boolean (g->get_property ("cross-staff")))
+        {
+          Interval dims = g->pure_height (common, start, end);
+          if (!dims.is_empty ())
+            r.unite (dims);
+        }
     }
   return r;
 }
@@ -328,13 +326,13 @@ Axis_group_interface::pure_height (SCM smob, SCM start_scm, SCM end_scm)
 
   /* Maybe we are in the second pass of a two-pass spacing run. In that
      case, the Y-extent of a system is already given to us */
-  System *system = dynamic_cast<System*> (me);
+  System *system = dynamic_cast<System *> (me);
   if (system)
     {
       SCM line_break_details = system->column (start)->get_property ("line-break-system-details");
       SCM system_y_extent = scm_assq (ly_symbol2scm ("system-Y-extent"), line_break_details);
       if (scm_is_pair (system_y_extent))
-       return scm_cdr (system_y_extent);
+        return scm_cdr (system_y_extent);
     }
 
   return ly_interval2scm (pure_group_height (me, start, end));
@@ -374,13 +372,13 @@ Axis_group_interface::combine_skylines (SCM smob)
     {
       SCM skyline_scm = elements[i]->get_property ("vertical-skylines");
       if (Skyline_pair::unsmob (skyline_scm))
-       {
-         Real offset = elements[i]->relative_coordinate (y_common, Y_AXIS);
-         Skyline_pair other = *Skyline_pair::unsmob (skyline_scm);
-         other.raise (offset);
-         other.shift (elements[i]->relative_coordinate (x_common, X_AXIS));
-         ret.merge (other);
-       }
+        {
+          Real offset = elements[i]->relative_coordinate (y_common, Y_AXIS);
+          Skyline_pair other = *Skyline_pair::unsmob (skyline_scm);
+          other.raise (offset);
+          other.shift (elements[i]->relative_coordinate (x_common, X_AXIS));
+          ret.merge (other);
+        }
     }
   return ret.smobbed_copy ();
 }
@@ -408,7 +406,7 @@ Interval
 Axis_group_interface::staff_extent (Grob *me, Grob *refp, Axis ext_a, Grob *staff, Axis parent_a)
 {
   extract_grob_set (me, "elements", elts);
-  vector<Grob*> new_elts;
+  vector<Grob *> new_elts;
 
   for (vsize i = 0; i < elts.size (); i++)
     if (elts[i]->common_refpoint (staff, parent_a) == staff)
@@ -417,7 +415,6 @@ Axis_group_interface::staff_extent (Grob *me, Grob *refp, Axis ext_a, Grob *staf
   return relative_group_extent (new_elts, refp, ext_a);
 }
 
-
 MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_pure_relevant_grobs, 1);
 SCM
 Axis_group_interface::calc_pure_relevant_grobs (SCM smob)
@@ -426,25 +423,25 @@ Axis_group_interface::calc_pure_relevant_grobs (SCM smob)
 
   extract_grob_set (me, "elements", elts);
 
-  vector<Grob*> relevant_grobs;
+  vector<Grob *> relevant_grobs;
   SCM pure_relevant_p = ly_lily_module_constant ("pure-relevant?");
 
   for (vsize i = 0; i < elts.size (); i++)
     {
       if (to_boolean (scm_apply_1 (pure_relevant_p, elts[i]->self_scm (), SCM_EOL)))
-       relevant_grobs.push_back (elts[i]);
-
-      if (Item *it = dynamic_cast<Item*> (elts[i]))
-       {
-         Direction d = LEFT;
-         do
-           {
-             Item *piece = it->find_prebroken_piece (d);
-             if (piece && to_boolean (scm_apply_1 (pure_relevant_p, piece->self_scm (), SCM_EOL)))
-               relevant_grobs.push_back (piece);
-           }
-         while (flip (&d) != LEFT);
-       }
+        relevant_grobs.push_back (elts[i]);
+
+      if (Item *it = dynamic_cast<Item *> (elts[i]))
+        {
+          Direction d = LEFT;
+          do
+            {
+              Item *piece = it->find_prebroken_piece (d);
+              if (piece && to_boolean (scm_apply_1 (pure_relevant_p, piece->self_scm (), SCM_EOL)))
+                relevant_grobs.push_back (piece);
+            }
+          while (flip (&d) != LEFT);
+        }
     }
 
   vector_sort (relevant_grobs, pure_staff_priority_less);
@@ -485,7 +482,6 @@ Axis_group_interface::calc_common (Grob *me, Axis axis)
   return common->self_scm ();
 }
 
-
 MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_x_common, 1);
 SCM
 Axis_group_interface::calc_x_common (SCM grob)
@@ -517,7 +513,7 @@ Axis_group_interface::pure_group_height (Grob *me, int start, int end)
 }
 
 void
-Axis_group_interface::get_children (Grob *me, vector<Grob*> *found)
+Axis_group_interface::get_children (Grob *me, vector<Grob *> *found)
 {
   found->push_back (me);
 
@@ -533,7 +529,7 @@ Axis_group_interface::get_children (Grob *me, vector<Grob*> *found)
 }
 
 static bool
-staff_priority_less (Grob * const &g1, Grob * const &g2)
+staff_priority_less (Grob *const &g1, Grob *const &g2)
 {
   Real priority_1 = robust_scm2double (g1->get_property ("outside-staff-priority"), -infinity_f);
   Real priority_2 = robust_scm2double (g2->get_property ("outside-staff-priority"), -infinity_f);
@@ -557,7 +553,7 @@ staff_priority_less (Grob * const &g1, Grob * const &g2)
 }
 
 static bool
-pure_staff_priority_less (Grob * const &g1, Grob * const &g2)
+pure_staff_priority_less (Grob *const &g1, Grob *const &g2)
 {
   Real priority_1 = robust_scm2double (g1->get_property ("outside-staff-priority"), -infinity_f);
   Real priority_2 = robust_scm2double (g2->get_property ("outside-staff-priority"), -infinity_f);
@@ -579,13 +575,13 @@ add_boxes (Grob *me, Grob *x_common, Grob *y_common, vector<Box> *const boxes, S
   else if (Grob_array *elements = unsmob_grob_array (me->get_object ("elements")))
     {
       for (vsize i = 0; i < elements->size (); i++)
-       add_boxes (elements->grob (i), x_common, y_common, boxes, skylines);
+        add_boxes (elements->grob (i), x_common, y_common, boxes, skylines);
     }
   else if (!scm_is_number (me->get_property ("outside-staff-priority"))
-          && !to_boolean (me->get_property ("cross-staff")))
+           && !to_boolean (me->get_property ("cross-staff")))
     {
       boxes->push_back (Box (me->extent (x_common, X_AXIS),
-                            me->extent (y_common, Y_AXIS)));
+                             me->extent (y_common, Y_AXIS)));
     }
 }
 
@@ -610,9 +606,9 @@ add_boxes (Grob *me, Grob *x_common, Grob *y_common, vector<Box> *const boxes, S
 */
 static void
 add_grobs_of_one_priority (Skyline_pair *const skylines,
-                          vector<Grob*> elements,
-                          Grob *x_common,
-                          Grob *y_common)
+                           vector<Grob *> elements,
+                           Grob *x_common,
+                           Grob *y_common)
 {
   vector<Box> boxes;
   Drul_array<Real> last_affected_position;
@@ -624,45 +620,45 @@ add_grobs_of_one_priority (Skyline_pair *const skylines,
       last_affected_position[DOWN] = -infinity_f;
       /* do one pass */
       for (vsize i = elements.size (); i--;)
-       {
-         Direction dir = get_grob_direction (elements[i]);
-         if (dir == CENTER)
-           {
-             warning (_ ("an outside-staff object should have a direction, defaulting to up"));
-             dir = UP;
-           }
-
-         Box b (elements[i]->extent (x_common, X_AXIS),
-                elements[i]->extent (y_common, Y_AXIS));
-         SCM horizon_padding_scm = elements[i]->get_property ("outside-staff-horizontal-padding");
-         Real horizon_padding = robust_scm2double (horizon_padding_scm, 0.0);
-
-         if (b[X_AXIS][LEFT] - 2*horizon_padding < last_affected_position[dir])
-           continue;
-
-         if (!b[X_AXIS].is_empty () && !b[Y_AXIS].is_empty ())
-           {
-             boxes.clear ();
-             boxes.push_back (b);
-             Skyline other = Skyline (boxes, horizon_padding, X_AXIS, -dir);
-             Real padding = robust_scm2double (elements[i]->get_property ("outside-staff-padding"), 0.5);
-             Real dist = (*skylines)[dir].distance (other) + padding;
-
-             if (dist > 0)
-               {
-                 b.translate (Offset (0, dir*dist));
-                 elements[i]->translate_axis (dir*dist, Y_AXIS);
-               }
-             skylines->insert (b, 0, X_AXIS);
-             elements[i]->set_property ("outside-staff-priority", SCM_BOOL_F);
-             last_affected_position[dir] = b[X_AXIS][RIGHT];
-           }
-
-         /*
-           Ugh: quadratic. --hwn
-          */
-         elements.erase (elements.begin () + i);
-       }
+        {
+          Direction dir = get_grob_direction (elements[i]);
+          if (dir == CENTER)
+            {
+              warning (_ ("an outside-staff object should have a direction, defaulting to up"));
+              dir = UP;
+            }
+
+          Box b (elements[i]->extent (x_common, X_AXIS),
+                 elements[i]->extent (y_common, Y_AXIS));
+          SCM horizon_padding_scm = elements[i]->get_property ("outside-staff-horizontal-padding");
+          Real horizon_padding = robust_scm2double (horizon_padding_scm, 0.0);
+
+          if (b[X_AXIS][LEFT] - 2 * horizon_padding < last_affected_position[dir])
+            continue;
+
+          if (!b[X_AXIS].is_empty () && !b[Y_AXIS].is_empty ())
+            {
+              boxes.clear ();
+              boxes.push_back (b);
+              Skyline other = Skyline (boxes, horizon_padding, X_AXIS, -dir);
+              Real padding = robust_scm2double (elements[i]->get_property ("outside-staff-padding"), 0.5);
+              Real dist = (*skylines)[dir].distance (other) + padding;
+
+              if (dist > 0)
+                {
+                  b.translate (Offset (0, dir * dist));
+                  elements[i]->translate_axis (dir * dist, Y_AXIS);
+                }
+              skylines->insert (b, 0, X_AXIS);
+              elements[i]->set_property ("outside-staff-priority", SCM_BOOL_F);
+              last_affected_position[dir] = b[X_AXIS][RIGHT];
+            }
+
+          /*
+            Ugh: quadratic. --hwn
+           */
+          elements.erase (elements.begin () + i);
+        }
     }
 }
 
@@ -685,7 +681,7 @@ Axis_group_interface::has_outside_staff_parent (Grob *me)
 // that there is no room for the cross-staff grob. It also means, of course, that
 // we don't get the benefits of skyline placement for cross-staff grobs.
 Skyline_pair
-Axis_group_interface::skyline_spacing (Grob *me, vector<Grob*> elements)
+Axis_group_interface::skyline_spacing (Grob *me, vector<Grob *> elements)
 {
   /* For grobs with an outside-staff-priority, the sorting function might
      call extent and cause suicide. This breaks the contract that is required
@@ -707,7 +703,7 @@ Axis_group_interface::skyline_spacing (Grob *me, vector<Grob*> elements)
 
   Skyline_pair skylines;
   for (i = 0; i < elements.size ()
-        && !scm_is_number (elements[i]->get_property ("outside-staff-priority")); i++)
+       && !scm_is_number (elements[i]->get_property ("outside-staff-priority")); i++)
     if (!(to_boolean (elements[i]->get_property ("cross-staff")) || has_outside_staff_parent (elements[i])))
       add_boxes (elements[i], x_common, y_common, &boxes, &skylines);
 
@@ -717,18 +713,18 @@ Axis_group_interface::skyline_spacing (Grob *me, vector<Grob*> elements)
   for (; i < elements.size (); i++)
     {
       if (to_boolean (elements[i]->get_property ("cross-staff")))
-       continue;
+        continue;
 
       SCM priority = elements[i]->get_property ("outside-staff-priority");
-      vector<Grob*> current_elts;
+      vector<Grob *> current_elts;
       current_elts.push_back (elements[i]);
       while (i + 1 < elements.size ()
-            && scm_eq_p (elements[i+1]->get_property ("outside-staff-priority"), priority))
-       {
-         if (!to_boolean (elements[i+1]->get_property ("cross-staff")))
-           current_elts.push_back (elements[i+1]);
-         ++i;
-       }
+             && scm_eq_p (elements[i + 1]->get_property ("outside-staff-priority"), priority))
+        {
+          if (!to_boolean (elements[i + 1]->get_property ("cross-staff")))
+            current_elts.push_back (elements[i + 1]);
+          ++i;
+        }
 
       add_grobs_of_one_priority (&skylines, current_elts, x_common, y_common);
     }
@@ -748,9 +744,9 @@ Axis_group_interface::print (SCM smob)
   if (Skyline_pair *s = Skyline_pair::unsmob (me->get_property ("vertical-skylines")))
     {
       ret.add_stencil (Lookup::points_to_line_stencil (0.1, (*s)[UP].to_points (X_AXIS))
-                      .in_color (255, 0, 255));
+                       .in_color (255, 0, 255));
       ret.add_stencil (Lookup::points_to_line_stencil (0.1, (*s)[DOWN].to_points (X_AXIS))
-                      .in_color (0, 255, 255));
+                       .in_color (0, 255, 255));
     }
   return ret.smobbed_copy ();
 }
@@ -760,9 +756,9 @@ SCM
 Axis_group_interface::calc_pure_staff_staff_spacing (SCM smob, SCM start, SCM end)
 {
   return calc_maybe_pure_staff_staff_spacing (unsmob_grob (smob),
-                                             true,
-                                             scm_to_int (start),
-                                             scm_to_int (end));
+                                              true,
+                                              scm_to_int (start),
+                                              scm_to_int (end));
 }
 
 MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_staff_staff_spacing, 1)
@@ -770,9 +766,9 @@ SCM
 Axis_group_interface::calc_staff_staff_spacing (SCM smob)
 {
   return calc_maybe_pure_staff_staff_spacing (unsmob_grob (smob),
-                                             false,
-                                             0,
-                                             INT_MAX);
+                                              false,
+                                              0,
+                                              INT_MAX);
 }
 
 SCM
@@ -784,9 +780,9 @@ Axis_group_interface::calc_maybe_pure_staff_staff_spacing (Grob *me, bool pure,
     {
       bool within_group = Staff_grouper_interface::maybe_pure_within_group (grouper, me, pure, start, end);
       if (within_group)
-       return grouper->get_maybe_pure_property ("staff-staff-spacing", pure, start, end);
+        return grouper->get_maybe_pure_property ("staff-staff-spacing", pure, start, end);
       else
-       return grouper->get_maybe_pure_property ("staffgroup-staff-spacing", pure, start, end);
+        return grouper->get_maybe_pure_property ("staffgroup-staff-spacing", pure, start, end);
     }
   return me->get_maybe_pure_property ("default-staff-staff-spacing", pure, start, end);
 }
@@ -804,30 +800,30 @@ Axis_group_interface::minimum_distance (Grob *g1, Grob *g2, Axis a)
 }
 
 ADD_INTERFACE (Axis_group_interface,
-              "An object that groups other layout objects.",
-
-              // TODO: some of these properties are specific to
-              // VerticalAxisGroup. We should split off a
-              // vertical-axis-group-interface.
-              /* properties */
-              "adjacent-pure-heights "
-              "axes "
-              "default-staff-staff-spacing "
-              "elements "
-              "max-stretch "
-              "no-alignment "
-              "nonstaff-nonstaff-spacing "
-              "nonstaff-relatedstaff-spacing "
-              "nonstaff-unrelatedstaff-spacing "
-              "pure-relevant-grobs "
-              "pure-relevant-items "
-              "pure-relevant-spanners "
-              "pure-Y-common "
-              "staff-affinity "
-              "staff-grouper "
-              "staff-staff-spacing "
-              "system-Y-offset "
-              "vertical-skylines "
-              "X-common "
-              "Y-common "
-              );
+               "An object that groups other layout objects.",
+
+               // TODO: some of these properties are specific to
+               // VerticalAxisGroup. We should split off a
+               // vertical-axis-group-interface.
+               /* properties */
+               "adjacent-pure-heights "
+               "axes "
+               "default-staff-staff-spacing "
+               "elements "
+               "max-stretch "
+               "no-alignment "
+               "nonstaff-nonstaff-spacing "
+               "nonstaff-relatedstaff-spacing "
+               "nonstaff-unrelatedstaff-spacing "
+               "pure-relevant-grobs "
+               "pure-relevant-items "
+               "pure-relevant-spanners "
+               "pure-Y-common "
+               "staff-affinity "
+               "staff-grouper "
+               "staff-staff-spacing "
+               "system-Y-offset "
+               "vertical-skylines "
+               "X-common "
+               "Y-common "
+              );
index 95e807339fe6de4a80a13b709c11a3b78bdc297c..566c7052835ce6da2a09bfe465ad948d05a93c3b 100644 (file)
@@ -33,8 +33,8 @@ class Balloon_engraver : public Engraver
   vector<Stream_event *> events_;
 
   void stop_translation_timestep ();
-  
-  void balloonify (Grob *, Stream_event *); 
+
+  void balloonify (Grob *, Stream_event *);
 };
 
 IMPLEMENT_TRANSLATOR_LISTENER (Balloon_engraver, annotate_output);
@@ -57,7 +57,7 @@ Balloon_engraver::Balloon_engraver ()
 void
 Balloon_engraver::balloonify (Grob *g, Stream_event *event)
 {
-  Grob * b = make_item ("BalloonTextItem", event->self_scm ());
+  Grob *b = make_item ("BalloonTextItem", event->self_scm ());
   b->set_property ("text", event->get_property ("text"));
   b->set_parent (g, Y_AXIS);
   b->set_parent (g, X_AXIS);
@@ -67,38 +67,36 @@ void
 Balloon_engraver::acknowledge_grob (Grob_info info)
 {
   Stream_event *cause = info.event_cause ();
-  
+
   SCM arts = cause ? cause->get_property ("articulations") : SCM_EOL;
   for (SCM s = arts; scm_is_pair (s); s = scm_cdr (s))
     {
       Stream_event *e = unsmob_stream_event (scm_car (s));
       if (e->in_event_class ("annotate-output-event"))
-       {
-         balloonify (info.grob (), e);
-       }
+        {
+          balloonify (info.grob (), e);
+        }
     }
 
   for (vsize i = 0; i < events_.size (); i++)
     {
       if (info.grob ()->name () == ly_symbol2string (events_[i]->get_property ("symbol")))
-       balloonify (info.grob (), events_[i]);
+        balloonify (info.grob (), events_[i]);
     }
 }
 
-
-  
 ADD_ACKNOWLEDGER (Balloon_engraver, grob);
-  
+
 ADD_TRANSLATOR (Balloon_engraver,
-              /* doc */
-              "Create balloon texts.",
+                /* doc */
+                "Create balloon texts.",
 
-              /* create */
-              "BalloonTextItem ",
+                /* create */
+                "BalloonTextItem ",
 
-              /*read*/
-              "",
+                /*read*/
+                "",
 
-              /*write*/
-              ""
-              );
+                /*write*/
+                ""
+               );
index b9872b2cd5835ae45501c8c496a45cb0bc16f1ae..3d3f15c3ca192ea5d9a8ec8bda2b1c8a2ec8ec51 100644 (file)
@@ -51,7 +51,7 @@ Balloon_interface::print (SCM smob)
   Grob *p = me->get_parent (X_AXIS);
 
   Offset off (me->relative_coordinate (p, X_AXIS),
-             me->relative_coordinate (p, Y_AXIS));
+              me->relative_coordinate (p, Y_AXIS));
 
   return internal_balloon_print (me, p, off);
 }
@@ -65,24 +65,23 @@ Balloon_interface::print_spanner (SCM smob)
 
   if (orig)
     {
-      Direction spanner_placement =  robust_scm2dir (me->get_property ("spanner-placement"), LEFT);
+      Direction spanner_placement = robust_scm2dir (me->get_property ("spanner-placement"), LEFT);
 
       Spanner *wanted = (spanner_placement != RIGHT)
-                         ? orig->broken_intos_[0]
-                         : orig->broken_intos_.back ();
+                        ? orig->broken_intos_[0]
+                        : orig->broken_intos_.back ();
 
       if (me != wanted)
         return SCM_EOL;
     }
 
-
   Spanner *p = dynamic_cast<Spanner *> (me->get_parent (Y_AXIS));
 
   if (!p)
     return SCM_EOL;
 
   Offset off (me->relative_coordinate (me->get_bound (LEFT), X_AXIS),
-             me->relative_coordinate (p, Y_AXIS));
+              me->relative_coordinate (p, Y_AXIS));
   return internal_balloon_print (me, p, off);
 }
 
@@ -90,7 +89,7 @@ SCM
 Balloon_interface::internal_balloon_print (Grob *me, Grob *p, Offset off)
 {
   Box b (p->extent (p, X_AXIS),
-        p->extent (p, Y_AXIS));
+         p->extent (p, Y_AXIS));
   Real padding = robust_scm2double (me->get_property ("padding"), .1);
   b.widen (padding, padding);
 
@@ -104,7 +103,7 @@ Balloon_interface::internal_balloon_print (Grob *me, Grob *p, Offset off)
   SCM stencil = Text_interface::interpret_markup (me->layout ()->self_scm (),
                                                   chain, bt);
   Stencil *text_stil = unsmob_stencil (stencil);
-  
+
   Offset z1;
 
   for (int i = X_AXIS; i < NO_AXES; i++)
@@ -127,14 +126,14 @@ Balloon_interface::internal_balloon_print (Grob *me, Grob *p, Offset off)
 }
 
 ADD_INTERFACE (Balloon_interface,
-              "A collection of routines to put text balloons around an"
-              " object.",
-
-              /* properties */
-              "annotation-balloon "
-              "annotation-line "
-              "padding "
-              "spanner-placement "
-              "text "
-              );
+               "A collection of routines to put text balloons around an"
+               " object.",
+
+               /* properties */
+               "annotation-balloon "
+               "annotation-line "
+               "padding "
+               "spanner-placement "
+               "text "
+              );
 
index 09f06b1fc2435e900095d06ce738462f55e7ec45..a4d8f4c44b9f0c520899582590ba9b3b8b4e026d 100644 (file)
@@ -51,38 +51,38 @@ Bar_check_iterator::process (Moment m)
 
       SCM check = tr->get_property ("ignoreBarChecks");
       if (to_boolean (check))
-       return;
+        return;
 
       SCM mp = tr->get_property ("measurePosition");
       SCM sync = tr->get_property ("barCheckSynchronize");
 
       Moment *where = unsmob_moment (mp);
       if (!where)
-       return;
+        return;
 
       if (where->main_part_)
-       {
-         bool warn = true;
-         if (to_boolean (sync))
-           {
-             SCM mp;
-             tr = tr->where_defined (ly_symbol2scm ("measurePosition"), &mp);
-             Moment zero;
-             tr->set_property ("measurePosition", zero.smobbed_copy ());
-           }
-         else
-           {
-             SCM lf = tr->get_property ("barCheckLastFail");
-             if (unsmob_moment (lf)
-                 && *unsmob_moment (lf) == *where)
-               warn = false;
-             else
-               tr->set_property ("barCheckLastFail", mp);
-           }
+        {
+          bool warn = true;
+          if (to_boolean (sync))
+            {
+              SCM mp;
+              tr = tr->where_defined (ly_symbol2scm ("measurePosition"), &mp);
+              Moment zero;
+              tr->set_property ("measurePosition", zero.smobbed_copy ());
+            }
+          else
+            {
+              SCM lf = tr->get_property ("barCheckLastFail");
+              if (unsmob_moment (lf)
+                  && *unsmob_moment (lf) == *where)
+                warn = false;
+              else
+                tr->set_property ("barCheckLastFail", mp);
+            }
 
-         if (warn)
-           get_music ()->origin ()->warning (_f ("barcheck failed at: %s",
-                                                 where->to_string ()));
-       }
+          if (warn)
+            get_music ()->origin ()->warning (_f ("barcheck failed at: %s",
+                                                  where->to_string ()));
+        }
     }
 }
index badd058e5446d3e99aeed0a45c48909e1e4d3b91..8a75d25619a2d0f017b6f7a21f0e2e030cccc801 100644 (file)
@@ -46,7 +46,7 @@ private:
   void create_bar ();
 
   Item *bar_;
-  vector<Spanner*> spanners_;
+  vector<Spanner *> spanners_;
 };
 
 Bar_engraver::Bar_engraver ()
@@ -62,7 +62,7 @@ Bar_engraver::create_bar ()
       bar_ = make_item ("BarLine", SCM_EOL);
       SCM gl = get_property ("whichBar");
       if (scm_equal_p (gl, bar_->get_property ("glyph")) != SCM_BOOL_T)
-       bar_->set_property ("glyph", gl);
+        bar_->set_property ("glyph", gl);
     }
 }
 
@@ -107,23 +107,23 @@ Bar_engraver::acknowledge_end_spanner (Grob_info gi)
   Grob *g = gi.grob ();
 
   if (to_boolean (g->get_property ("to-barline")))
-    spanners_.push_back (dynamic_cast<Spanner*> (g));
+    spanners_.push_back (dynamic_cast<Spanner *> (g));
 }
 
 ADD_END_ACKNOWLEDGER (Bar_engraver, spanner);
 
 ADD_TRANSLATOR (Bar_engraver,
-               /* doc */
-               "Create barlines.  This engraver is controlled through the"
-               " @code{whichBar} property.  If it has no bar line to create,"
-               " it will forbid a linebreak at this point.",
+                /* doc */
+                "Create barlines.  This engraver is controlled through the"
+                " @code{whichBar} property.  If it has no bar line to create,"
+                " it will forbid a linebreak at this point.",
 
-               /* create */
-               "BarLine ",
+                /* create */
+                "BarLine ",
 
-               /* read */
-               "whichBar ",
+                /* read */
+                "whichBar ",
 
-               /* write */
-               "forbidBreak "
-               );
+                /* write */
+                "forbidBreak "
+               );
index a2d6588726bb823c03075ca65dc35b663ecffaa3..a56c5f6408bfb684d054958bcf01db4ada238a7b 100644 (file)
@@ -68,18 +68,18 @@ Bar_line::print (SCM smob)
       string str = ly_scm2string (s);
       Interval ex = ly_scm2interval (extent);
       if (ex.length () > 0)
-       {
-         Stencil result = compound_barline (me, str, ex, false);
+        {
+          Stencil result = compound_barline (me, str, ex, false);
 
-         return result.smobbed_copy ();
-       }
+          return result.smobbed_copy ();
+        }
     }
   return SCM_EOL;
 }
 
 Stencil
 Bar_line::compound_barline (Grob *me, string str, Interval const &extent,
-                           bool rounded)
+                            bool rounded)
 {
   Real kern = robust_scm2double (me->get_property ("kern"), 1);
   Real thinkern = robust_scm2double (me->get_property ("thin-kern"), 1);
@@ -184,10 +184,10 @@ Bar_line::compound_barline (Grob *me, string str, Interval const &extent,
   else if (str == "||")
     {
       /*
-       should align to other side? this never appears
-       on the system-start?
-       m.add_at_edge (X_AXIS, RIGHT, thin, 0);
-       m.add_at_edge (X_AXIS, RIGHT, thin, thinkern);
+        should align to other side? this never appears
+        on the system-start?
+        m.add_at_edge (X_AXIS, RIGHT, thin, 0);
+        m.add_at_edge (X_AXIS, RIGHT, thin, thinkern);
       */
       m.add_at_edge (X_AXIS, LEFT, thin, thinkern);
       m.add_at_edge (X_AXIS, RIGHT, thin, thinkern);
@@ -201,72 +201,72 @@ Bar_line::compound_barline (Grob *me, string str, Interval const &extent,
       segno.add_stencil (Font_interface::get_default_font (me)->find_by_name ("scripts.varsegno"));
 
       if (str == "S")
-       m.add_stencil (segno);
+        m.add_stencil (segno);
       else if (str == "S|:" || str == ".S|:")
-       {
-         m.add_at_edge (X_AXIS, RIGHT, thick, 0);
-         m.add_at_edge (X_AXIS, RIGHT, thin, kern);
-         m.add_at_edge (X_AXIS, RIGHT, colon, kern);
-         m.add_at_edge (X_AXIS, LEFT, segno, thinkern);
-       }
+        {
+          m.add_at_edge (X_AXIS, RIGHT, thick, 0);
+          m.add_at_edge (X_AXIS, RIGHT, thin, kern);
+          m.add_at_edge (X_AXIS, RIGHT, colon, kern);
+          m.add_at_edge (X_AXIS, LEFT, segno, thinkern);
+        }
       else if (str == ":|S" || str == ":|S.")
-       {
-         m.add_at_edge (X_AXIS, LEFT, thick, 0);
-         m.add_at_edge (X_AXIS, LEFT, thin, kern);
-         m.add_at_edge (X_AXIS, LEFT, colon, kern);
-         m.add_at_edge (X_AXIS, RIGHT, segno, thinkern);
-       }
+        {
+          m.add_at_edge (X_AXIS, LEFT, thick, 0);
+          m.add_at_edge (X_AXIS, LEFT, thin, kern);
+          m.add_at_edge (X_AXIS, LEFT, colon, kern);
+          m.add_at_edge (X_AXIS, RIGHT, segno, thinkern);
+        }
       else if (str == ":|S|:" || str == ":|S.|:")
-       {
-         m.add_at_edge (X_AXIS, LEFT, thick, 0);
-         m.add_at_edge (X_AXIS, LEFT, thin, kern);
-         m.add_at_edge (X_AXIS, LEFT, colon, kern);
-         m.add_at_edge (X_AXIS, RIGHT, segno, thinkern);
-         m.add_at_edge (X_AXIS, RIGHT, thick, thinkern);
-         m.add_at_edge (X_AXIS, RIGHT, thin, kern);
-         m.add_at_edge (X_AXIS, RIGHT, colon, kern);
-       }
+        {
+          m.add_at_edge (X_AXIS, LEFT, thick, 0);
+          m.add_at_edge (X_AXIS, LEFT, thin, kern);
+          m.add_at_edge (X_AXIS, LEFT, colon, kern);
+          m.add_at_edge (X_AXIS, RIGHT, segno, thinkern);
+          m.add_at_edge (X_AXIS, RIGHT, thick, thinkern);
+          m.add_at_edge (X_AXIS, RIGHT, thin, kern);
+          m.add_at_edge (X_AXIS, RIGHT, colon, kern);
+        }
       else if (str == "|._.|") // :|S|: or :|S.|: without segno and colon
-       {
-         // get the width of the segno sign
-         Real segno_width = segno.extent (X_AXIS).length ();
-         m.add_at_edge (X_AXIS, LEFT, thick, 0);
-         m.add_at_edge (X_AXIS, LEFT, thin, kern);
-         m.add_at_edge (X_AXIS, RIGHT, thick, segno_width + 2 * thinkern);
-         m.add_at_edge (X_AXIS, RIGHT, thin, kern);
-       }
+        {
+          // get the width of the segno sign
+          Real segno_width = segno.extent (X_AXIS).length ();
+          m.add_at_edge (X_AXIS, LEFT, thick, 0);
+          m.add_at_edge (X_AXIS, LEFT, thin, kern);
+          m.add_at_edge (X_AXIS, RIGHT, thick, segno_width + 2 * thinkern);
+          m.add_at_edge (X_AXIS, RIGHT, thin, kern);
+        }
       // end varsegno block
     }
   else if (str == ":")
     {
       if (Grob *staff = Staff_symbol_referencer::get_staff_symbol (me))
-       {
-         Interval staff_extent = staff->extent (staff, Y_AXIS);
-
-         /*
-           assume staff lines are disposed equally at unit space;
-           put a dot into each space within extent (may extend staff_extent).
-
-           staff_extent is an interval of two integers or two half-integers;
-           in the former case dots are to be placed at half-integers,
-           in the latter at integers.
-
-           these integers are not exact due to staff line thickness.
-         */
-         int const pos = int (rint (staff_extent.at (UP) * 2));
-         Real const correction = pos & 1 ? 0.0 : 0.5;
-
-         for (int i = int (rint (extent.at (DOWN) + (0.5 - correction))),
-                e = int (rint (extent.at (UP) + (0.5 - correction)));
-              i < e;
-              ++i)
-           {
-             Stencil d (dot);
-
-             d.translate_axis (i + correction, Y_AXIS);
-             m.add_stencil (d);
-           }
-       }
+        {
+          Interval staff_extent = staff->extent (staff, Y_AXIS);
+
+          /*
+            assume staff lines are disposed equally at unit space;
+            put a dot into each space within extent (may extend staff_extent).
+
+            staff_extent is an interval of two integers or two half-integers;
+            in the former case dots are to be placed at half-integers,
+            in the latter at integers.
+
+            these integers are not exact due to staff line thickness.
+          */
+          int const pos = int (rint (staff_extent.at (UP) * 2));
+          Real const correction = pos & 1 ? 0.0 : 0.5;
+
+          for (int i = int (rint (extent.at (DOWN) + (0.5 - correction))),
+               e = int (rint (extent.at (UP) + (0.5 - correction)));
+               i < e;
+               ++i)
+            {
+              Stencil d (dot);
+
+              d.translate_axis (i + correction, Y_AXIS);
+              m.add_stencil (d);
+            }
+        }
     }
   else if (str == "dashed")
     m = dashed_bar_line (me, extent, hair);
@@ -278,14 +278,14 @@ Bar_line::compound_barline (Grob *me, string str, Interval const &extent,
 
 Stencil
 Bar_line::simple_barline (Grob *me,
-                         Real w,
-                         Interval const &extent,
-                         bool rounded)
+                          Real w,
+                          Interval const &extent,
+                          bool rounded)
 {
   Real blot
     = rounded
-    ? me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"))
-    : 0.0;
+      ? me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"))
+      : 0.0;
 
   return Lookup::round_filled_box (Box (Interval (0, w), extent), blot);
 }
@@ -298,11 +298,11 @@ Bar_line::tick_bar_line (Grob *me, Real h, bool rounded)
 
   Real blot
     = rounded
-    ? me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"))
-    : 0.0;
+      ? me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"))
+      : 0.0;
 
   return Lookup::round_filled_box (Box (Interval (0, line_thick),
-                                       Interval (h - th, h + th)), blot);
+                                        Interval (h - th, h + th)), blot);
 }
 
 Stencil
@@ -330,40 +330,40 @@ Bar_line::dashed_bar_line (Grob *me, Interval const &extent, Real thick)
   if (fabs (h / ss - dashes) < 0.1)
     {
       Real blot
-       = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
+        = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
 
       Real const half_dash = dash_size / 2;
       Stencil bar;
 
       for (int i = 0; i <= dashes; ++i)
-       {
-         Real top_y = extent.at (DOWN)
-           + (i == dashes ? h : (i + half_dash) * ss);
-         Real bot_y = extent.at (DOWN) + (i ? (i - half_dash) * ss : 0.0);
-
-         bar.add_stencil (Lookup::round_filled_box (Box (Interval (0, thick),
-                                                         Interval (bot_y, top_y)),
-                                                    blot));
-       }
+        {
+          Real top_y = extent.at (DOWN)
+                       + (i == dashes ? h : (i + half_dash) * ss);
+          Real bot_y = extent.at (DOWN) + (i ? (i - half_dash) * ss : 0.0);
+
+          bar.add_stencil (Lookup::round_filled_box (Box (Interval (0, thick),
+                                                          Interval (bot_y, top_y)),
+                                                     blot));
+        }
       return bar;
     }
   else
     {
       /*
-       We have to scale the dashing so it starts and ends with half a
-       dash exactly.
+        We have to scale the dashing so it starts and ends with half a
+        dash exactly.
       */
       Real total_dash_size = h / dashes;
       Real factor = (dash_size - thick) / ss;
 
       SCM at = scm_list_n (ly_symbol2scm ("dashed-line"),
-                          scm_from_double (thick),
-                          scm_from_double (factor * total_dash_size),
-                          scm_from_double ((1 - factor) * total_dash_size),
-                          scm_from_double (0),
-                          scm_from_double (h),
-                          scm_from_double (factor * total_dash_size * 0.5),
-                          SCM_UNDEFINED);
+                           scm_from_double (thick),
+                           scm_from_double (factor * total_dash_size),
+                           scm_from_double ((1 - factor) * total_dash_size),
+                           scm_from_double (0),
+                           scm_from_double (h),
+                           scm_from_double (factor * total_dash_size * 0.5),
+                           SCM_UNDEFINED);
 
       Box box;
       box.add_point (Offset (0, 0));
@@ -405,56 +405,56 @@ Bar_line::calc_anchor (SCM smob)
 }
 
 ADD_INTERFACE (Bar_line,
-              "Bar line.\n"
-              "\n"
-              "Print a special bar symbol.  It replaces the regular bar"
-              " symbol with a special symbol.  The argument @var{bartype}"
-              " is a string which specifies the kind of bar line to print."
-              "  Options are @code{|}, @code{:|}, @code{|:}, @code{:|:}, @code{:|.|:},"
-              " @code{:|.:}, @code{.}, @code{||}, @code{|.}, @code{.|}, @code{.|.},"
-              " @code{|.|}, @code{:}, @code{dashed}, @code{'} and @code{S}.\n"
-              "\n"
-              "These produce, respectively, a normal bar line, a right repeat, a left repeat,"
-              " a thick double repeat, a thin-thick-thin double repeat,"
-              " a thin-thick double repeat, a thick bar, a double bar, a start bar,"
-              " an end bar, a thick double bar, a thin-thick-thin bar,"
-              " a dotted bar, a dashed bar, a tick as bar line and a segno bar.\n"
-              "\n"
-              "In addition, there is an option"
-              " @code{||:} which is equivalent to @code{|:} except at line"
-              " breaks, where it produces a double bar (@code{||}) at the"
-              " end of the line and a repeat sign (@code{|:}) at the"
-              " beginning of the new line.\n"
-              "\n"
-              "For segno, @code{S} produces a segno sign except at line breaks,"
-              " where it produces a double bar (@code{||}) at the"
-              " end of the line and a segno sign at the beginning of the new line."
-              " @code{|S} is equivalent to @code{S} but produces a simple bar line"
-              " (@code{|}) instead of a double bar line (@code{||}) at line breaks."
-              " @code{S|} produces the segno sign at line breaks and starts the following"
-              " line without special bar lines.\n"
-              "\n"
-              "@code{S|:} and @code{:|S} are used for repeat/segno combinations that are"
-              " separated at line breaks.  Alternatively, @code{.S|:} and @code{:|S.}"
-              " may be used which combine repeat signs and segno at the same line in"
-              " case of a line break.  @code{:|S|:} is a combination of a left repeat"
-              " (@code{:|}), a segno (@code{S}) and a right repeat @code{|:} which"
-              " splits before the segno at line breaks; @code{:|S.|:} splits after"
-              " the segno sign.\n"
-              "\n"
-              "If @var{bartype} is set to @code{empty} then nothing is"
-              " printed, but a line break is allowed at that spot.\n"
-              "\n"
-              "@code{gap} is used for the gaps in dashed bar lines.",
-
-              /* properties */
-              "allow-span-bar "
-              "gap "
-              "kern "
-              "thin-kern "
-              "hair-thickness "
-              "thick-thickness "
-              "glyph "
-              "glyph-name "
-              "bar-extent "
-              );
+               "Bar line.\n"
+               "\n"
+               "Print a special bar symbol.  It replaces the regular bar"
+               " symbol with a special symbol.  The argument @var{bartype}"
+               " is a string which specifies the kind of bar line to print."
+               "  Options are @code{|}, @code{:|}, @code{|:}, @code{:|:}, @code{:|.|:},"
+               " @code{:|.:}, @code{.}, @code{||}, @code{|.}, @code{.|}, @code{.|.},"
+               " @code{|.|}, @code{:}, @code{dashed}, @code{'} and @code{S}.\n"
+               "\n"
+               "These produce, respectively, a normal bar line, a right repeat, a left repeat,"
+               " a thick double repeat, a thin-thick-thin double repeat,"
+               " a thin-thick double repeat, a thick bar, a double bar, a start bar,"
+               " an end bar, a thick double bar, a thin-thick-thin bar,"
+               " a dotted bar, a dashed bar, a tick as bar line and a segno bar.\n"
+               "\n"
+               "In addition, there is an option"
+               " @code{||:} which is equivalent to @code{|:} except at line"
+               " breaks, where it produces a double bar (@code{||}) at the"
+               " end of the line and a repeat sign (@code{|:}) at the"
+               " beginning of the new line.\n"
+               "\n"
+               "For segno, @code{S} produces a segno sign except at line breaks,"
+               " where it produces a double bar (@code{||}) at the"
+               " end of the line and a segno sign at the beginning of the new line."
+               " @code{|S} is equivalent to @code{S} but produces a simple bar line"
+               " (@code{|}) instead of a double bar line (@code{||}) at line breaks."
+               " @code{S|} produces the segno sign at line breaks and starts the following"
+               " line without special bar lines.\n"
+               "\n"
+               "@code{S|:} and @code{:|S} are used for repeat/segno combinations that are"
+               " separated at line breaks.  Alternatively, @code{.S|:} and @code{:|S.}"
+               " may be used which combine repeat signs and segno at the same line in"
+               " case of a line break.  @code{:|S|:} is a combination of a left repeat"
+               " (@code{:|}), a segno (@code{S}) and a right repeat @code{|:} which"
+               " splits before the segno at line breaks; @code{:|S.|:} splits after"
+               " the segno sign.\n"
+               "\n"
+               "If @var{bartype} is set to @code{empty} then nothing is"
+               " printed, but a line break is allowed at that spot.\n"
+               "\n"
+               "@code{gap} is used for the gaps in dashed bar lines.",
+
+               /* properties */
+               "allow-span-bar "
+               "gap "
+               "kern "
+               "thin-kern "
+               "hair-thickness "
+               "thick-thickness "
+               "glyph "
+               "glyph-name "
+               "bar-extent "
+              );
index 82bc09f0ed02160e009868013bb31fcb9299f517..269ed126207960893f042c5b0038175eaf1173b0 100644 (file)
@@ -52,18 +52,18 @@ Bar_number_engraver::process_music ()
     {
       Moment mp (robust_scm2moment (get_property ("measurePosition"), Moment (0)));
       if (mp.main_part_ == Rational (0))
-       {
-         SCM bn = get_property ("currentBarNumber");
-         SCM proc = get_property ("barNumberVisibility");
-         if (scm_is_number (bn) && ly_is_procedure (proc)
-             && to_boolean (scm_call_1 (proc, bn)))
-           {
-             create_items ();
-             // guh.
-             text_->set_property
-               ("text", scm_number_to_string (bn, scm_from_int (10)));
-           }
-       }
+        {
+          SCM bn = get_property ("currentBarNumber");
+          SCM proc = get_property ("barNumberVisibility");
+          if (scm_is_number (bn) && ly_is_procedure (proc)
+              && to_boolean (scm_call_1 (proc, bn)))
+            {
+              create_items ();
+              // guh.
+              text_->set_property
+              ("text", scm_number_to_string (bn, scm_from_int (10)));
+            }
+        }
     }
 }
 
@@ -89,7 +89,7 @@ Bar_number_engraver::stop_translation_timestep ()
   if (text_)
     {
       text_->set_object ("side-support-elements",
-                        grob_list_to_grob_array (get_property ("stavesFound")));
+                         grob_list_to_grob_array (get_property ("stavesFound")));
       text_ = 0;
     }
 }
@@ -103,27 +103,26 @@ Bar_number_engraver::create_items ()
   text_ = make_item ("BarNumber", SCM_EOL);
 }
 
-
 ADD_ACKNOWLEDGER (Bar_number_engraver, break_alignment);
 
 ADD_TRANSLATOR (Bar_number_engraver,
-               /* doc */
-               "A bar number is created whenever @code{measurePosition} is"
-               " zero and when there is a bar line (i.e., when"
-               " @code{whichBar} is set).  It is put on top of all staves,"
-               " and appears only at the left side of the staff.  The staves"
-               " are taken from @code{stavesFound}, which is maintained by"
-               " @ref{Staff_collecting_engraver}.",
-
-               /* create */
-               "BarNumber ",
-
-               /* read */
-               "currentBarNumber "
-               "whichBar "
-               "stavesFound "
-               "barNumberVisibility ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "A bar number is created whenever @code{measurePosition} is"
+                " zero and when there is a bar line (i.e., when"
+                " @code{whichBar} is set).  It is put on top of all staves,"
+                " and appears only at the left side of the staff.  The staves"
+                " are taken from @code{stavesFound}, which is maintained by"
+                " @ref{Staff_collecting_engraver}.",
+
+                /* create */
+                "BarNumber ",
+
+                /* read */
+                "currentBarNumber "
+                "whichBar "
+                "stavesFound "
+                "barNumberVisibility ",
+
+                /* write */
+                ""
+               );
index cdb4be6270dad054ee13c8a8d55d88e52ef12285..fa829325593d7cd3beb45037bc22267c6ea5ae7c 100644 (file)
@@ -177,15 +177,15 @@ ADD_ACKNOWLEDGER (Beam_collision_engraver, time_signature);
 ADD_ACKNOWLEDGER (Beam_collision_engraver, beam);
 
 ADD_TRANSLATOR (Beam_collision_engraver,
-               /* doc */
-               "Help beams avoid colliding with notes and clefs in other voices.",
+                /* doc */
+                "Help beams avoid colliding with notes and clefs in other voices.",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 7ca626b60907f75aceeac1a81542adb7b0d1c372..501b753d2108a1f858f75663865e7f03fcb67ba5 100644 (file)
@@ -69,16 +69,16 @@ is_concave_single_notes (vector<int> const &positions, Direction beam_dir)
     {
       int inner_dy = positions[i] - positions[i - 1];
       if (sign (inner_dy) != sign (dy)
-         && (beam_dir * positions[i] >= closest
-             || beam_dir * positions[i - 1] >= closest))
-       concave = true;
+          && (beam_dir * positions[i] >= closest
+              || beam_dir * positions[i - 1] >= closest))
+        concave = true;
     }
 
   bool all_closer = true;
   for (vsize i = 1; all_closer && i + 1 < positions.size (); i++)
     {
       all_closer = all_closer
-       && (beam_dir * positions[i] > closest);
+                   && (beam_dir * positions[i] > closest);
     }
 
   concave = concave || all_closer;
@@ -109,14 +109,13 @@ calc_positions_concaveness (vector<int> const &positions, Direction beam_dir)
   return concaveness;
 }
 
-
 MAKE_SCHEME_CALLBACK (Beam, calc_concaveness, 1);
 SCM
 Beam::calc_concaveness (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
 
-  vector<Grob*> stems
+  vector<Grob *> stems
     = extract_grob_array (me, "stems");
 
   if (is_knee (me))
@@ -126,12 +125,12 @@ Beam::calc_concaveness (SCM smob)
   for (vsize i = stems.size (); i--;)
     {
       if (Stem::is_normal_stem (stems[i]))
-       {
-         if (Direction dir = get_grob_direction (stems[i]))
-           beam_dir = dir;
-       }
+        {
+          if (Direction dir = get_grob_direction (stems[i]))
+            beam_dir = dir;
+        }
       else
-       stems.erase (stems.begin () + i);
+        stems.erase (stems.begin () + i);
     }
 
   if (stems.size () <= 2)
@@ -142,11 +141,11 @@ Beam::calc_concaveness (SCM smob)
   for (vsize i = 0; i < stems.size (); i++)
     {
       /*
-       For chords, we take the note head that is closest to the beam.
+        For chords, we take the note head that is closest to the beam.
 
-       Hmmm.. wait, for the beams in the last measure of morgenlied,
-       this doesn't look so good. Let's try the heads farthest from
-       the beam.
+        Hmmm.. wait, for the beams in the last measure of morgenlied,
+        this doesn't look so good. Let's try the heads farthest from
+        the beam.
       */
       Interval posns = Stem::head_positions (stems[i]);
 
@@ -163,11 +162,9 @@ Beam::calc_concaveness (SCM smob)
   else
     {
       concaveness = (calc_positions_concaveness (far_positions, beam_dir)
-                    + calc_positions_concaveness (close_positions, beam_dir)) / 2;
+                     + calc_positions_concaveness (close_positions, beam_dir)) / 2;
     }
 
   return scm_from_double (concaveness);
 }
 
-
-
index 04e571f68a953d0197908dc3a75386cd6e7eecc7..654a7f57d17293c0caf5144a4c5344f0eec3b772 100644 (file)
@@ -123,7 +123,7 @@ Beam_engraver::listen_beam (Stream_event *ev)
 
       Direction updown = to_dir (ev->get_property ("direction"));
       if (updown)
-       forced_direction_ = updown;
+        forced_direction_ = updown;
     }
   else if (d == STOP && valid_end_point ())
     ASSIGN_EVENT_ONCE (stop_ev_, ev);
@@ -143,17 +143,17 @@ Beam_engraver::process_music ()
   if (start_ev_)
     {
       if (beam_)
-       {
-         start_ev_->origin ()->warning (_ ("already have a beam"));
-         return;
-       }
+        {
+          start_ev_->origin ()->warning (_ ("already have a beam"));
+          return;
+        }
 
       set_melisma (true);
       prev_start_ev_ = start_ev_;
       beam_ = make_spanner ("Beam", start_ev_->self_scm ());
 
       Moment mp (robust_scm2moment (get_property ("measurePosition"),
-                                   Moment (0)));
+                                    Moment (0)));
 
       beam_start_location_ = mp;
       beam_start_mom_ = now_mom ();
@@ -177,13 +177,13 @@ Beam_engraver::typeset_beam ()
   if (finished_beam_)
     {
       if (!finished_beam_->get_bound (RIGHT))
-       finished_beam_->set_bound (RIGHT, finished_beam_->get_bound (LEFT));
+        finished_beam_->set_bound (RIGHT, finished_beam_->get_bound (LEFT));
       if (forced_direction_)
-       {
-         Grob *stem = finished_beam_->get_bound (RIGHT);
-         set_grob_direction (stem, forced_direction_);
-         forced_direction_ = CENTER;
-       }
+        {
+          Grob *stem = finished_beam_->get_bound (RIGHT);
+          set_grob_direction (stem, forced_direction_);
+          forced_direction_ = CENTER;
+        }
       finished_beam_info_->beamify (finished_beaming_options_);
 
       Beam::set_beaming (finished_beam_, finished_beam_info_);
@@ -230,8 +230,8 @@ Beam_engraver::finalize ()
       prev_start_ev_->origin ()->warning (_ ("unterminated beam"));
 
       /*
-       we don't typeset it, (we used to, but it was commented
-       out. Reason unknown) */
+        we don't typeset it, (we used to, but it was commented
+        out. Reason unknown) */
       beam_->suicide ();
       delete beam_info_;
     }
@@ -243,7 +243,7 @@ Beam_engraver::acknowledge_rest (Grob_info info)
   if (beam_
       && !scm_is_number (info.grob ()->get_property_data ("staff-position")))
     chain_offset_callback (info.grob (),
-                          Beam::rest_collision_callback_proc, Y_AXIS);
+                           Beam::rest_collision_callback_proc, Y_AXIS);
 }
 
 void
@@ -274,9 +274,9 @@ Beam_engraver::acknowledge_stem (Grob_info info)
       ev->origin ()->warning (_ ("stem does not fit in beam"));
       prev_start_ev_->origin ()->warning (_ ("beam was started here"));
       /*
-       don't return, since
+        don't return, since
 
-       [r4 c8] can just as well be modern notation.
+        [r4 c8] can just as well be modern notation.
       */
     }
 
@@ -286,8 +286,8 @@ Beam_engraver::acknowledge_stem (Grob_info info)
   stem->set_property ("duration-log", scm_from_int (durlog));
   Moment stem_location = now - beam_start_mom_ + beam_start_location_;
   beam_info_->add_stem (stem_location,
-                       max (durlog- 2, 0),
-                       Stem::is_invisible (stem));
+                        max (durlog - 2, 0),
+                        Stem::is_invisible (stem));
   Beam::add_stem (beam_, stem);
 }
 
@@ -295,22 +295,22 @@ ADD_ACKNOWLEDGER (Beam_engraver, stem);
 ADD_ACKNOWLEDGER (Beam_engraver, rest);
 
 ADD_TRANSLATOR (Beam_engraver,
-               /* doc */
-               "Handle @code{Beam} events by engraving beams.  If omitted,"
-               " then notes are printed with flags instead of beams.",
+                /* doc */
+                "Handle @code{Beam} events by engraving beams.  If omitted,"
+                " then notes are printed with flags instead of beams.",
 
-               /* create */
-               "Beam ",
+                /* create */
+                "Beam ",
 
-               /* read */
+                /* read */
                 "baseMoment "
-               "beamMelismaBusy "
-               "beatStructure "
-               "subdivideBeams ",
+                "beamMelismaBusy "
+                "beatStructure "
+                "subdivideBeams ",
 
-               /* write */
-               "forbidBreak"
-               );
+                /* write */
+                "forbidBreak"
+               );
 
 class Grace_beam_engraver : public Beam_engraver
 {
@@ -357,26 +357,25 @@ Grace_beam_engraver::listen_beam (Stream_event *ev)
     stop_ev_ = ev;
 }
 
-
 ADD_ACKNOWLEDGER (Grace_beam_engraver, stem);
 ADD_ACKNOWLEDGER (Grace_beam_engraver, rest);
 
 ADD_TRANSLATOR (Grace_beam_engraver,
-               /* doc */
-               "Handle @code{Beam} events by engraving beams.  If omitted,"
-               " then notes are printed with flags instead of beams.  Only"
-               " engraves beams when we are at grace points in time.",
+                /* doc */
+                "Handle @code{Beam} events by engraving beams.  If omitted,"
+                " then notes are printed with flags instead of beams.  Only"
+                " engraves beams when we are at grace points in time.",
 
-               /* create */
-               "Beam ",
+                /* create */
+                "Beam ",
 
-               /* read */
+                /* read */
                 "baseMoment "
-               "beamMelismaBusy "
-               "beatStructure "
-               "subdivideBeams ",
+                "beamMelismaBusy "
+                "beatStructure "
+                "subdivideBeams ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
 
index d14879bf93b1c01366c8d9aec7b8194918680a76..cbd9d206e9185537fa8ed16d1d232191c102ae03 100644 (file)
@@ -104,5 +104,5 @@ ADD_TRANSLATOR (Beam_performer,
 
                 /* write */
                 ""
-                );
+               );
 
index c5cafd5cfa9acb63e93723eaa7aa76347b06cc8a..8b0c9f2abc1facdfa332f4507102df9c0a31316c 100644 (file)
@@ -21,7 +21,7 @@
 #include "beam-scoring-problem.hh"
 
 #include <algorithm>
-#include <queue>  
+#include <queue>
 #include <set>
 using namespace std;
 
@@ -103,15 +103,15 @@ void Beam_configuration::add (Real demerit, const string &reason)
   demerits += demerit;
 
 #if DEBUG_BEAM_SCORING
-  if (demerit) 
+  if (demerit)
     score_card_ += to_string (" %s %.2f", reason.c_str (), demerit);
 #endif
 }
-  
-Beam_configurationBeam_configuration::new_config (Interval start,
+
+Beam_configuration *Beam_configuration::new_config (Interval start,
                                                     Interval offset)
 {
-  Beam_configurationqs = new Beam_configuration;
+  Beam_configuration *qs = new Beam_configuration;
   qs->y = Interval (int (start[LEFT]) + offset[LEFT],
                     int (start[RIGHT]) + offset[RIGHT]);
 
@@ -120,13 +120,14 @@ Beam_configuration* Beam_configuration::new_config (Interval start,
   Real start_score = abs (offset[RIGHT]) + abs (offset[LEFT]);
   qs->demerits = start_score / 1000.0;
   qs->next_scorer_todo = ORIGINAL_DISTANCE + 1;
-  
+
   return qs;
 }
 
 Real
-Beam_scoring_problem::y_at (Real x, Beam_configuration const* p) const {
-  return p->y[LEFT] + (x - x_span[LEFT]) * p->y.delta() / x_span.delta();
+Beam_scoring_problem::y_at (Real x, Beam_configuration const *p) const
+{
+  return p->y[LEFT] + (x - x_span[LEFT]) * p->y.delta () / x_span.delta ();
 }
 
 /****************************************************************/
@@ -144,48 +145,51 @@ Beam_scoring_problem::y_at (Real x, Beam_configuration const* p) const {
 // priority queue on the beams to score.
 static int score_count = 0;
 LY_DEFINE (ly_beam_score_count, "ly:beam-score-count", 0, 0, 0,
-          (),
-          "count number of beam scores.") {
+           (),
+           "count number of beam scores.")
+{
   return scm_from_int (score_count);
 }
 
 void Beam_scoring_problem::add_collision (Real x, Interval y,
                                           Real score_factor)
 {
-  if (edge_dirs[LEFT] == edge_dirs[RIGHT]) {
-    Direction d = edge_dirs[LEFT];
+  if (edge_dirs[LEFT] == edge_dirs[RIGHT])
+    {
+      Direction d = edge_dirs[LEFT];
 
-    Real quant_range_y = quant_range[LEFT][-d] +
-      (x - x_span[LEFT]) * (quant_range[RIGHT][-d] - quant_range[LEFT][-d]) / x_span.delta();
+      Real quant_range_y = quant_range[LEFT][-d]
+                           + (x - x_span[LEFT]) * (quant_range[RIGHT][-d] - quant_range[LEFT][-d]) / x_span.delta ();
 
-    if (d*(quant_range_y - minmax(d, y[UP], y[DOWN])) > 0) {
-      return;
+      if (d * (quant_range_y - minmax (d, y[UP], y[DOWN])) > 0)
+        {
+          return;
+        }
     }
-  }
 
   Beam_collision c;
   c.beam_y_.set_empty ();
 
   for (vsize j = 0; j < segments_.size (); j++)
     {
-      if (segments_[j].horizontal_.contains(x))
+      if (segments_[j].horizontal_.contains (x))
         c.beam_y_.add_point (segments_[j].vertical_count_ * beam_translation);
       if (segments_[j].horizontal_[LEFT] > x)
         break;
     }
   c.beam_y_.widen (0.5 * beam_thickness);
-  
+
   c.x_ = x;
 
-  y *= 1/staff_space;
+  y *= 1 / staff_space;
   c.y_ = y;
   c.base_penalty_ = score_factor;
   collisions_.push_back (c);
 }
 
-void Beam_scoring_problem::init_collisions (vector<Grob*> grobs)
+void Beam_scoring_problem::init_collisions (vector<Grob *> grobs)
 {
-  Grobcommon_x = NULL;
+  Grob *common_x = NULL;
   segments_ = Beam::get_beam_segments (beam, &common_x);
   vector_sort (segments_, beam_segment_less);
   if (common[X_AXIS] != common_x)
@@ -194,46 +198,47 @@ void Beam_scoring_problem::init_collisions (vector<Grob*> grobs)
       return;
     }
 
-  set<Grob*> stems;
-  for (vsize i = 0; i < grobs.size (); i++) {
-    Box b;
-    for (Axis a = X_AXIS; a < NO_AXES; incr (a))
-      b[a] = grobs[i]->extent(common[a], a);
+  set<Grob *> stems;
+  for (vsize i = 0; i < grobs.size (); i++)
+    {
+      Box b;
+      for (Axis a = X_AXIS; a < NO_AXES; incr (a))
+        b[a] = grobs[i]->extent (common[a], a);
 
-    Real width = b[X_AXIS].length ();
-    Real width_factor = sqrt (width / staff_space);
+      Real width = b[X_AXIS].length ();
+      Real width_factor = sqrt (width / staff_space);
 
-    Direction d = LEFT;
-    do
-      add_collision (b[X_AXIS][d], b[Y_AXIS], width_factor);
-    while (flip (&d) != LEFT);
+      Direction d = LEFT;
+      do
+        add_collision (b[X_AXIS][d], b[Y_AXIS], width_factor);
+      while (flip (&d) != LEFT);
 
-    Grob* stem = unsmob_grob (grobs[i]->get_object ("stem"));
-    if (stem && Stem::has_interface (stem) && Stem::is_normal_stem (stem))
-      {
-        stems.insert (stem);
-      }
-  }
-  
-  for (set<Grob*>::const_iterator it(stems.begin ()); it != stems.end (); it++)
+      Grob *stem = unsmob_grob (grobs[i]->get_object ("stem"));
+      if (stem && Stem::has_interface (stem) && Stem::is_normal_stem (stem))
+        {
+          stems.insert (stem);
+        }
+    }
+
+  for (set<Grob *>::const_iterator it (stems.begin ()); it != stems.end (); it++)
     {
       Grob *s = *it;
-      Real x = s->extent (common[X_AXIS], X_AXIS).center();
+      Real x = s->extent (common[X_AXIS], X_AXIS).center ();
 
       Direction stem_dir = get_grob_direction (*it);
       Interval y;
       y.set_full ();
       y[-stem_dir] = Stem::chord_start_y (*it) + (*it)->relative_coordinate (common[Y_AXIS], Y_AXIS)
-        - beam->relative_coordinate (common[Y_AXIS], Y_AXIS);
+                     - beam->relative_coordinate (common[Y_AXIS], Y_AXIS);
 
       Real factor = parameters.STEM_COLLISION_FACTOR;
       if (!unsmob_grob (s->get_object ("beam"))
           && !Stem::flag (s).is_empty ())
-        factor = 1.0; 
+        factor = 1.0;
       add_collision (x, y, factor);
     }
 }
-  
+
 void Beam_scoring_problem::init_stems ()
 {
   extract_grob_set (beam, "covered-grobs", collisions);
@@ -243,49 +248,49 @@ void Beam_scoring_problem::init_stems ()
       common[a] = common_refpoint_of_array (stems, beam, Axis (a));
       common[a] = common_refpoint_of_array (collisions, common[a], Axis (a));
     }
-  
-  Drul_array<Grob *> edge_stems(Beam::first_normal_stem (beam),
-                                Beam::last_normal_stem (beam));
+
+  Drul_array<Grob *> edge_stems (Beam::first_normal_stem (beam),
+                                 Beam::last_normal_stem (beam));
   Direction d = LEFT;
   do
     x_span[d] = edge_stems[d] ? edge_stems[d]->relative_coordinate (common[X_AXIS], X_AXIS) : 0.0;
   while (flip (&d) != LEFT);
-  
+
   Drul_array<bool> dirs_found (0, 0);
   for (vsize i = 0; i < stems.size (); i++)
     {
       Grob *s = stems[i];
       if (!Stem::is_normal_stem (s))
         continue;
-      
+
       Stem_info si (Stem::get_stem_info (s));
       si.scale (1 / staff_space);
       stem_infos.push_back (si);
       dirs_found[si.dir_] = true;
 
       bool f = to_boolean (s->get_property ("french-beaming"))
-        && s != edge_stems[LEFT] && s != edge_stems[RIGHT];
+               && s != edge_stems[LEFT] && s != edge_stems[RIGHT];
 
-      Real y = Beam::calc_stem_y (beam, s, common, x_span[LEFT], x_span[RIGHT], CENTER, 
+      Real y = Beam::calc_stem_y (beam, s, common, x_span[LEFT], x_span[RIGHT], CENTER,
                                   Interval (0, 0), f);
       base_lengths.push_back (y / staff_space);
       stem_xpositions.push_back (s->relative_coordinate (common[X_AXIS], X_AXIS));
     }
-  
+
   edge_dirs = Drul_array<Direction> (CENTER, CENTER);
   if (stem_infos.size ())
     {
       edge_dirs = Drul_array<Direction> (stem_infos[0].dir_,
-                                         stem_infos.back().dir_);
+                                         stem_infos.back ().dir_);
     }
 
   is_xstaff = Align_interface::has_interface (common[Y_AXIS]);
   is_knee = dirs_found[LEFT] && dirs_found[RIGHT];
-  
+
   staff_radius = Staff_symbol_referencer::staff_radius (beam);
-  edge_beam_counts =  Drul_array<int>
-    (Stem::beam_multiplicity (stems[0]).length () + 1,
-     Stem::beam_multiplicity (stems.back ()).length () + 1);
+  edge_beam_counts = Drul_array<int>
+                     (Stem::beam_multiplicity (stems[0]).length () + 1,
+                      Stem::beam_multiplicity (stems.back ()).length () + 1);
 
   // TODO - why are we dividing by staff_space?
   beam_translation = Beam::get_beam_translation (beam) / staff_space;
@@ -296,14 +301,14 @@ void Beam_scoring_problem::init_stems ()
       quant_range[d].set_full ();
       if (!edge_stems[d])
         continue;
-      
+
       Real stem_offset = edge_stems[d]->relative_coordinate (common[Y_AXIS], Y_AXIS)
-        - beam->relative_coordinate (common[Y_AXIS], Y_AXIS);
-      Interval heads = Stem::head_positions(edge_stems[d]) * 0.5 * staff_space;
+                         - beam->relative_coordinate (common[Y_AXIS], Y_AXIS);
+      Interval heads = Stem::head_positions (edge_stems[d]) * 0.5 * staff_space;
 
       Direction ed = edge_dirs[d];
-      heads.widen(0.5 * staff_space
-                  + (edge_beam_counts[d] - 1) * beam_translation + beam_thickness * .5);
+      heads.widen (0.5 * staff_space
+                   + (edge_beam_counts[d] - 1) * beam_translation + beam_thickness * .5);
       quant_range[d][-ed] = heads[ed] + stem_offset;
     }
   while (flip (&d) != LEFT);
@@ -315,7 +320,7 @@ Beam_scoring_problem::Beam_scoring_problem (Grob *me, Drul_array<Real> ys)
 {
   beam = me;
   unquanted_y = ys;
-    
+
   /*
     Calculations are relative to a unit-scaled staff, i.e. the quants are
     divided by the current staff_space.
@@ -332,7 +337,7 @@ Beam_scoring_problem::Beam_scoring_problem (Grob *me, Drul_array<Real> ys)
 }
 
 void
-Beam_scoring_problem::generate_quants (vector<Beam_configuration*> *scores) const
+Beam_scoring_problem::generate_quants (vector<Beam_configuration *> *scores) const
 {
   int region_size = (int) parameters.REGION_SIZE;
 
@@ -341,7 +346,7 @@ Beam_scoring_problem::generate_quants (vector<Beam_configuration*> *scores) cons
     region_size += 2;
   if (collisions_.size ())
     region_size += 2;
-  
+
   Real straddle = 0.0;
   Real sit = (beam_thickness - line_thickness) / 2;
   Real inter = 0.5;
@@ -362,11 +367,11 @@ Beam_scoring_problem::generate_quants (vector<Beam_configuration*> *scores) cons
   for (vsize i = 0; i < unshifted_quants.size (); i++)
     for (vsize j = 0; j < unshifted_quants.size (); j++)
       {
-        Beam_configuration *c =
-          Beam_configuration::new_config (unquanted_y,
-                                          Interval (unshifted_quants[i],
-                                                    unshifted_quants[j]));
-        
+        Beam_configuration *c
+          Beam_configuration::new_config (unquanted_y,
+                                            Interval (unshifted_quants[i],
+                                                      unshifted_quants[j]));
+
         Direction d = LEFT;
         do
           {
@@ -378,57 +383,56 @@ Beam_scoring_problem::generate_quants (vector<Beam_configuration*> *scores) cons
               }
           }
         while (flip (&d) != LEFT);
-        if (c)   
+        if (c)
           scores->push_back (c);
       }
-    
-}
 
+}
 
-void Beam_scoring_problem::one_scorer (Beam_configurationconfig) const
+void Beam_scoring_problem::one_scorer (Beam_configuration *config) const
 {
-  score_count ++;
-  switch (config->next_scorer_todo) {
-  case SLOPE_IDEAL:
-    score_slope_ideal (config);
-    break;
-  case SLOPE_DIRECTION:
-    score_slope_direction (config);
-    break;
-  case SLOPE_MUSICAL:
-    score_slope_musical (config);
-    break;
-  case FORBIDDEN:
-    score_forbidden_quants (config);
-    break;
-  case STEM_LENGTHS:
-    score_stem_lengths (config);
-    break;
-  case COLLISIONS:
-    score_collisions (config);
-    break;
-  case HORIZONTAL_INTER:
-    score_horizontal_inter_quants (config);
-    break;
-    
-  case NUM_SCORERS:
-  case ORIGINAL_DISTANCE:
-  default:
-    assert (false);
-  }
+  score_count++;
+  switch (config->next_scorer_todo)
+    {
+    case SLOPE_IDEAL:
+      score_slope_ideal (config);
+      break;
+    case SLOPE_DIRECTION:
+      score_slope_direction (config);
+      break;
+    case SLOPE_MUSICAL:
+      score_slope_musical (config);
+      break;
+    case FORBIDDEN:
+      score_forbidden_quants (config);
+      break;
+    case STEM_LENGTHS:
+      score_stem_lengths (config);
+      break;
+    case COLLISIONS:
+      score_collisions (config);
+      break;
+    case HORIZONTAL_INTER:
+      score_horizontal_inter_quants (config);
+      break;
+
+    case NUM_SCORERS:
+    case ORIGINAL_DISTANCE:
+    default:
+      assert (false);
+    }
   config->next_scorer_todo++;
-}                                  
-
+}
 
 Beam_configuration *
-Beam_scoring_problem::force_score (SCM inspect_quants, const vector<Beam_configuration*> &configs) const
+Beam_scoring_problem::force_score (SCM inspect_quants, const vector<Beam_configuration *> &configs) const
 {
   Drul_array<Real> ins = ly_scm2interval (inspect_quants);
   Real mindist = 1e6;
-  Beam_configuration *best = NULL; 
+  Beam_configuration *best = NULL;
   for (vsize i = 0; i < configs.size (); i++)
     {
-      Real d = fabs (configs[i]->y[LEFT]- ins[LEFT]) + fabs (configs[i]->y[RIGHT] - ins[RIGHT]);
+      Real d = fabs (configs[i]->y[LEFT] - ins[LEFT]) + fabs (configs[i]->y[RIGHT] - ins[RIGHT]);
       if (d < mindist)
         {
           best = configs[i];
@@ -440,13 +444,14 @@ Beam_scoring_problem::force_score (SCM inspect_quants, const vector<Beam_configu
 
   while (!best->done ())
     one_scorer (best);
-      
+
   return best;
 }
 
 Drul_array<Real>
-Beam_scoring_problem::solve () const {
-  vector<Beam_configuration*> configs;
+Beam_scoring_problem::solve () const
+{
+  vector<Beam_configuration *> configs;
   generate_quants (&configs);
 
   if (configs.empty ())
@@ -455,22 +460,22 @@ Beam_scoring_problem::solve () const {
       return unquanted_y;
     }
 
-  Beam_configuration *best = NULL;  
+  Beam_configuration *best = NULL;
 
-  bool debug =
-    to_boolean (beam->layout ()->lookup_variable (ly_symbol2scm ("debug-beam-scoring")));
+  bool debug
+    to_boolean (beam->layout ()->lookup_variable (ly_symbol2scm ("debug-beam-scoring")));
   SCM inspect_quants = beam->get_property ("inspect-quants");
-  if (scm_is_pair (inspect_quants)) 
+  if (scm_is_pair (inspect_quants))
     {
       debug = true;
       best = force_score (inspect_quants, configs);
     }
   else
     {
-      std::priority_queue<Beam_configuration*, std::vector<Beam_configuration*>,
-                          Beam_configuration_less> queue;
-      for (vsize i = 0; i < configs.size(); i++)
-        queue.push(configs[i]);
+      std::priority_queue < Beam_configuration *, std::vector<Beam_configuration *>,
+          Beam_configuration_less > queue;
+      for (vsize i = 0; i < configs.size (); i++)
+        queue.push (configs[i]);
 
       /*
         TODO
@@ -488,15 +493,16 @@ Beam_scoring_problem::solve () const {
 
         that would allow us to do away with region_size altogether.
       */
-      while (true) {
-        best = queue.top ();
-        if (best->done ())
-          break;
-
-        queue.pop ();
-        one_scorer (best);
-        queue.push (best);
-      }
+      while (true)
+        {
+          best = queue.top ();
+          if (best->done ())
+            break;
+
+          queue.pop ();
+          one_scorer (best);
+          queue.push (best);
+        }
     }
 
   Interval final_positions = best->y;
@@ -512,7 +518,7 @@ Beam_scoring_problem::solve () const {
             completed++;
         }
 
-      string card = best->score_card_ + to_string (" c%d/%d", completed, configs.size());
+      string card = best->score_card_ + to_string (" c%d/%d", completed, configs.size ());
       beam->set_property ("annotation", ly_string2scm (card));
     }
 #endif
@@ -522,7 +528,7 @@ Beam_scoring_problem::solve () const {
 }
 
 void
-Beam_scoring_problem::score_stem_lengths (Beam_configurationconfig) const
+Beam_scoring_problem::score_stem_lengths (Beam_configuration *config) const
 {
   Real limit_penalty = parameters.STEM_LENGTH_LIMIT_PENALTY;
   Drul_array<Real> score (0, 0);
@@ -533,8 +539,8 @@ Beam_scoring_problem::score_stem_lengths (Beam_configuration* config) const
       Real x = stem_xpositions[i];
       Real dx = x_span.delta ();
       Real beam_y = dx
-        ? config->y[RIGHT] * (x - x_span[LEFT]) / dx + config->y[LEFT] * (x_span[RIGHT] - x) / dx
-        : (config->y[RIGHT] + config->y[LEFT]) / 2;
+                    ? config->y[RIGHT] * (x - x_span[LEFT]) / dx + config->y[LEFT] * (x_span[RIGHT] - x) / dx
+                    : (config->y[RIGHT] + config->y[LEFT]) / 2;
       Real current_y = beam_y + base_lengths[i];
       Real length_pen = parameters.STEM_LENGTH_DEMERIT_FACTOR;
 
@@ -550,7 +556,7 @@ Beam_scoring_problem::score_stem_lengths (Beam_configuration* config) const
          convex. Otherwise a symmetric knee beam (up/down/up/down)
          does not have an optimum in the middle. */
       if (is_knee)
-       ideal_score = pow (ideal_score, 1.1);
+        ideal_score = pow (ideal_score, 1.1);
 
       score[d] += length_pen * ideal_score;
       count[d]++;
@@ -569,7 +575,7 @@ void
 Beam_scoring_problem::score_slope_direction (Beam_configuration *config) const
 {
   Real dy = config->y.delta ();
-  Real damped_dy = unquanted_y.delta();
+  Real damped_dy = unquanted_y.delta ();
   Real dem = 0.0;
   /*
     DAMPING_DIRECTION_PENALTY is a very harsh measure, while for
@@ -581,26 +587,26 @@ Beam_scoring_problem::score_slope_direction (Beam_configuration *config) const
   if (sign (damped_dy) != sign (dy))
     {
       if (!dy)
-       {
-         if (fabs (damped_dy / x_span.delta ()) > parameters.ROUND_TO_ZERO_SLOPE)
-           dem += parameters.DAMPING_DIRECTION_PENALTY;
-         else
-           dem += parameters.HINT_DIRECTION_PENALTY;
-       }
+        {
+          if (fabs (damped_dy / x_span.delta ()) > parameters.ROUND_TO_ZERO_SLOPE)
+            dem += parameters.DAMPING_DIRECTION_PENALTY;
+          else
+            dem += parameters.HINT_DIRECTION_PENALTY;
+        }
       else
-       dem += parameters.DAMPING_DIRECTION_PENALTY;
+        dem += parameters.DAMPING_DIRECTION_PENALTY;
     }
 
   config->add (dem, "Sd");
 }
 
-// Score for going against the direction of the musical pattern 
+// Score for going against the direction of the musical pattern
 void
 Beam_scoring_problem::score_slope_musical (Beam_configuration *config) const
 {
   Real dy = config->y.delta ();
   Real dem = parameters.MUSICAL_DIRECTION_FACTOR
-    * max (0.0, (fabs (dy) - fabs (musical_dy)));
+             * max (0.0, (fabs (dy) - fabs (musical_dy)));
   config->add (dem, "Sm");
 }
 
@@ -609,9 +615,9 @@ void
 Beam_scoring_problem::score_slope_ideal (Beam_configuration *config) const
 {
   Real dy = config->y.delta ();
-  Real damped_dy = unquanted_y.delta();
+  Real damped_dy = unquanted_y.delta ();
   Real dem = 0.0;
-  
+
   Real slope_penalty = parameters.IDEAL_SLOPE_FACTOR;
 
   /* Xstaff beams tend to use extreme slopes to get short stems. We
@@ -621,7 +627,7 @@ Beam_scoring_problem::score_slope_ideal (Beam_configuration *config) const
 
   /* Huh, why would a too steep beam be better than a too flat one ? */
   dem += shrink_extra_weight (fabs (damped_dy) - fabs (dy), 1.5)
-    * slope_penalty;
+         * slope_penalty;
 
   config->add (dem, "Si");
 }
@@ -657,48 +663,48 @@ Beam_scoring_problem::score_forbidden_quants (Beam_configuration *config) const
 {
   Real dy = config->y.delta ();
 
-  Real extra_demerit = parameters.SECONDARY_BEAM_DEMERIT /
-    max (edge_beam_counts[LEFT], edge_beam_counts[RIGHT]);
+  Real extra_demerit = parameters.SECONDARY_BEAM_DEMERIT
+                       / max (edge_beam_counts[LEFT], edge_beam_counts[RIGHT]);
 
   Direction d = LEFT;
   Real dem = 0.0;
   Real eps = parameters.BEAM_EPS;
-  
+
   do
     {
       for (int j = 1; j <= edge_beam_counts[d]; j++)
-       {
-         Direction stem_dir = edge_dirs[d];
-
-         /*
-           The 2.2 factor is to provide a little leniency for
-           borderline cases. If we do 2.0, then the upper outer line
-           will be in the gap of the (2, sit) quant, leading to a
-           false demerit.
-         */
-         Real gap1 = config->y[d] - stem_dir * ((j - 1) * beam_translation + beam_thickness / 2 - line_thickness / 2.2);
-         Real gap2 = config->y[d] - stem_dir * (j * beam_translation - beam_thickness / 2 + line_thickness / 2.2);
-
-         Interval gap;
-         gap.add_point (gap1);
-         gap.add_point (gap2);
-
-         for (Real k = -staff_radius;
-              k <= staff_radius + eps; k += 1.0)
-           if (gap.contains (k))
-             {
-               Real dist = min (fabs (gap[UP] - k), fabs (gap[DOWN] - k));
-
-               /*
-                 this parameter is tuned to grace-stem-length.ly
-               */
-               Real fixed_demerit = 0.4;
-
-               dem += extra_demerit
-                 * (fixed_demerit
-                    + (1 - fixed_demerit) * (dist / gap.length ()) * 2);
-             }
-       }
+        {
+          Direction stem_dir = edge_dirs[d];
+
+          /*
+            The 2.2 factor is to provide a little leniency for
+            borderline cases. If we do 2.0, then the upper outer line
+            will be in the gap of the (2, sit) quant, leading to a
+            false demerit.
+          */
+          Real gap1 = config->y[d] - stem_dir * ((j - 1) * beam_translation + beam_thickness / 2 - line_thickness / 2.2);
+          Real gap2 = config->y[d] - stem_dir * (j * beam_translation - beam_thickness / 2 + line_thickness / 2.2);
+
+          Interval gap;
+          gap.add_point (gap1);
+          gap.add_point (gap2);
+
+          for (Real k = -staff_radius;
+               k <= staff_radius + eps; k += 1.0)
+            if (gap.contains (k))
+              {
+                Real dist = min (fabs (gap[UP] - k), fabs (gap[DOWN] - k));
+
+                /*
+                  this parameter is tuned to grace-stem-length.ly
+                */
+                Real fixed_demerit = 0.4;
+
+                dem += extra_demerit
+                       * (fixed_demerit
+                          + (1 - fixed_demerit) * (dist / gap.length ()) * 2);
+              }
+        }
     }
   while ((flip (&d)) != LEFT);
 
@@ -711,33 +717,33 @@ Beam_scoring_problem::score_forbidden_quants (Beam_configuration *config) const
 
       Direction d = LEFT;
       do
-       {
-         if (edge_beam_counts[d] >= 2
-             && fabs (config->y[d] - edge_dirs[d] * beam_translation) < staff_radius + inter)
-           {
+        {
+          if (edge_beam_counts[d] >= 2
+              && fabs (config->y[d] - edge_dirs[d] * beam_translation) < staff_radius + inter)
+            {
               // TODO up/down symmetry.
-             if (edge_dirs[d] == UP && dy <= eps
-                 && fabs (my_modf (config->y[d]) - sit) < eps)
-               dem += extra_demerit;
-
-             if (edge_dirs[d] == DOWN && dy >= eps
-                 && fabs (my_modf (config->y[d]) - hang) < eps)
-               dem += extra_demerit;
-           }
-
-         if (edge_beam_counts[d] >= 3
-             && fabs (config->y[d] - 2 * edge_dirs[d] * beam_translation) < staff_radius + inter)
-           {
+              if (edge_dirs[d] == UP && dy <= eps
+                  && fabs (my_modf (config->y[d]) - sit) < eps)
+                dem += extra_demerit;
+
+              if (edge_dirs[d] == DOWN && dy >= eps
+                  && fabs (my_modf (config->y[d]) - hang) < eps)
+                dem += extra_demerit;
+            }
+
+          if (edge_beam_counts[d] >= 3
+              && fabs (config->y[d] - 2 * edge_dirs[d] * beam_translation) < staff_radius + inter)
+            {
               // TODO up/down symmetry.
-             if (edge_dirs[d] == UP && dy <= eps
-                 && fabs (my_modf (config->y[d]) - straddle) < eps)
-               dem += extra_demerit;
-
-             if (edge_dirs[d] == DOWN && dy >= eps
-                 && fabs (my_modf (config->y[d]) - straddle) < eps)
-               dem += extra_demerit;
-           }
-       }
+              if (edge_dirs[d] == UP && dy <= eps
+                  && fabs (my_modf (config->y[d]) - straddle) < eps)
+                dem += extra_demerit;
+
+              if (edge_dirs[d] == DOWN && dy >= eps
+                  && fabs (my_modf (config->y[d]) - straddle) < eps)
+                dem += extra_demerit;
+            }
+        }
       while (flip (&d) != LEFT);
     }
 
@@ -746,7 +752,7 @@ Beam_scoring_problem::score_forbidden_quants (Beam_configuration *config) const
 
 void
 Beam_scoring_problem::score_collisions (Beam_configuration *config) const
-{  
+{
   Real demerits = 0.0;
   for (vsize i = 0; i < collisions_.size (); i++)
     {
@@ -763,13 +769,13 @@ Beam_scoring_problem::score_collisions (Beam_configuration *config) const
         dist = min (beam_y.distance (collision_y[DOWN]),
                     beam_y.distance (collision_y[UP]));
 
-      Real scale_free = 
-        max (parameters.COLLISION_PADDING - dist, 0.0)/
-        parameters.COLLISION_PADDING;
-      demerits +=
-        collisions_[i].base_penalty_ *
-        pow (scale_free, 3) * parameters.COLLISION_PENALTY;
+      Real scale_free
+        = max (parameters.COLLISION_PADDING - dist, 0.0) /
+          parameters.COLLISION_PADDING;
+      demerits
+      += collisions_[i].base_penalty_ *
+         pow (scale_free, 3) * parameters.COLLISION_PENALTY;
     }
 
   config->add (demerits, "C");
-} 
+}
index 1bb0a209a859666c271dfed1c955d556723ecfa0..2d973246cf0ebf75a6c5147b09e7e32d261b6f25 100644 (file)
 
 #include <map>
 
-
 Beam_stem_segment::Beam_stem_segment ()
 {
-  max_connect_ = 1000;         // infinity
+  max_connect_ = 1000;          // infinity
   stem_ = 0;
   width_ = 0.0;
   stem_x_ = 0.0;
@@ -78,7 +77,7 @@ Beam_stem_segment::Beam_stem_segment ()
 }
 
 bool
-beam_segment_less (Beam_segment const& a, Beam_segment const& b)
+beam_segment_less (Beam_segment const &a, Beam_segment const &b)
 {
   return a.horizontal_[LEFT] < b.horizontal_[LEFT];
 }
@@ -94,7 +93,7 @@ Beam::add_stem (Grob *me, Grob *s)
   if (Stem::get_beam (s))
     {
       programming_error ("Stem already has beam");
-      return ;
+      return;
     }
 
   Pointer_group_interface::add_grob (me, ly_symbol2scm ("stems"), s);
@@ -106,7 +105,7 @@ Real
 Beam::get_beam_thickness (Grob *me)
 {
   return robust_scm2double (me->get_property ("beam-thickness"), 0)
-    * Staff_symbol_referencer::staff_space (me);
+         * Staff_symbol_referencer::staff_space (me);
 }
 
 /* Return the translation between 2 adjoining beams. */
@@ -120,8 +119,8 @@ Beam::get_beam_translation (Grob *me)
   Real fract = robust_scm2double (me->get_property ("length-fraction"), 1.0);
 
   Real beam_translation = beam_count < 4
-    ? (2 * staff_space + line - beam_thickness) / 2.0
-    : (3 * staff_space + line - beam_thickness) / 3.0;
+                          ? (2 * staff_space + line - beam_thickness) / 2.0
+                          : (3 * staff_space + line - beam_thickness) / 3.0;
 
   return fract * beam_translation;
 }
@@ -150,7 +149,7 @@ Beam::calc_normal_stems (SCM smob)
   extract_grob_set (me, "stems", stems);
   SCM val = Grob_array::make_array ();
   Grob_array *ga = unsmob_grob_array (val);
-  for (vsize i = 0; i < stems.size ();  i++)
+  for (vsize i = 0; i < stems.size (); i++)
     if (Stem::is_normal_stem (stems[i]))
       ga->add (stems[i]);
 
@@ -177,33 +176,33 @@ Beam::calc_direction (SCM smob)
     {
       extract_grob_set (me, "stems", stems);
       if (stems.size () == 0)
-       {
-         me->warning (_ ("removing beam with no stems"));
-         me->suicide ();
+        {
+          me->warning (_ ("removing beam with no stems"));
+          me->suicide ();
 
-         return SCM_UNSPECIFIED;
-       }
+          return SCM_UNSPECIFIED;
+        }
       else
-       {
-         Grob *stem = first_normal_stem (me);
-
-         /*
-           This happens for chord tremolos.
-         */
-         if (!stem)
-           stem = stems[0];
-
-         if (is_direction (stem->get_property_data ("direction")))
-           dir = to_dir (stem->get_property_data ("direction"));
-         else
-           dir = to_dir (stem->get_property ("default-direction"));
-       }
+        {
+          Grob *stem = first_normal_stem (me);
+
+          /*
+            This happens for chord tremolos.
+          */
+          if (!stem)
+            stem = stems[0];
+
+          if (is_direction (stem->get_property_data ("direction")))
+            dir = to_dir (stem->get_property_data ("direction"));
+          else
+            dir = to_dir (stem->get_property ("default-direction"));
+        }
     }
 
   if (count >= 1)
     {
       if (!dir)
-       dir = get_default_dir (me);
+        dir = get_default_dir (me);
 
       consider_auto_knees (me);
     }
@@ -216,8 +215,6 @@ Beam::calc_direction (SCM smob)
   return scm_from_int (dir);
 }
 
-
-
 /* We want a maximal number of shared beams, but if there is choice, we
  * take the one that is closest to the end of the stem. This is for
  * situations like
@@ -232,8 +229,8 @@ Beam::calc_direction (SCM smob)
  */
 int
 position_with_maximal_common_beams (SCM left_beaming, SCM right_beaming,
-                                   Direction left_dir,
-                                   Direction right_dir)
+                                    Direction left_dir,
+                                    Direction right_dir)
 {
   Slice lslice = int_list_to_slice (scm_cdr (left_beaming));
 
@@ -244,17 +241,17 @@ position_with_maximal_common_beams (SCM left_beaming, SCM right_beaming,
     {
       int count = 0;
       for (SCM s = scm_car (right_beaming); scm_is_pair (s); s = scm_cdr (s))
-       {
-         int k = -right_dir * scm_to_int (scm_car (s)) + i;
-         if (scm_c_memq (scm_from_int (k), left_beaming) != SCM_BOOL_F)
-           count++;
-       }
+        {
+          int k = -right_dir * scm_to_int (scm_car (s)) + i;
+          if (scm_c_memq (scm_from_int (k), left_beaming) != SCM_BOOL_F)
+            count++;
+        }
 
       if (count >= best_count)
-       {
-         best_count = count;
-         best_start = i;
-       }
+        {
+          best_count = count;
+          best_start = i;
+        }
     }
 
   return best_start;
@@ -280,51 +277,51 @@ Beam::calc_beaming (SCM smob)
 
       Direction this_dir = get_grob_direction (this_stem);
       if (scm_is_pair (last_beaming) && scm_is_pair (this_beaming))
-       {
-         int start_point = position_with_maximal_common_beams
-           (last_beaming, this_beaming,
-            last_dir ? last_dir : this_dir,
-            this_dir);
-
-         Direction d = LEFT;
-         Slice new_slice;
-         do
-           {
-             new_slice.set_empty ();
-             SCM s = index_get_cell (this_beaming, d);
-             for (; scm_is_pair (s); s = scm_cdr (s))
-               {
-                 int new_beam_pos
-                   = start_point - this_dir * scm_to_int (scm_car (s));
-
-                 new_slice.add_point (new_beam_pos);
-                 scm_set_car_x (s, scm_from_int (new_beam_pos));
-               }
-           }
-         while (flip (&d) != LEFT);
-
-         if (!new_slice.is_empty ())
-           last_int = new_slice;
-       }
+        {
+          int start_point = position_with_maximal_common_beams
+                            (last_beaming, this_beaming,
+                             last_dir ? last_dir : this_dir,
+                             this_dir);
+
+          Direction d = LEFT;
+          Slice new_slice;
+          do
+            {
+              new_slice.set_empty ();
+              SCM s = index_get_cell (this_beaming, d);
+              for (; scm_is_pair (s); s = scm_cdr (s))
+                {
+                  int new_beam_pos
+                    = start_point - this_dir * scm_to_int (scm_car (s));
+
+                  new_slice.add_point (new_beam_pos);
+                  scm_set_car_x (s, scm_from_int (new_beam_pos));
+                }
+            }
+          while (flip (&d) != LEFT);
+
+          if (!new_slice.is_empty ())
+            last_int = new_slice;
+        }
       else
-       {
-         /*
-           FIXME: what's this for?
-          */
-         SCM s = scm_cdr (this_beaming);
-         for (; scm_is_pair (s); s = scm_cdr (s))
-           {
-             int np = -this_dir * scm_to_int (scm_car (s));
-             scm_set_car_x (s, scm_from_int (np));
-             last_int.add_point (np);
-           }
-       }
+        {
+          /*
+            FIXME: what's this for?
+           */
+          SCM s = scm_cdr (this_beaming);
+          for (; scm_is_pair (s); s = scm_cdr (s))
+            {
+              int np = -this_dir * scm_to_int (scm_car (s));
+              scm_set_car_x (s, scm_from_int (np));
+              last_int.add_point (np);
+            }
+        }
 
       if (scm_ilength (scm_cdr (this_beaming)) > 0)
-       {
-         last_beaming = this_beaming;
-         last_dir = this_dir;
-       }
+        {
+          last_beaming = this_beaming;
+          last_dir = this_dir;
+        }
     }
 
   return SCM_EOL;
@@ -332,12 +329,12 @@ Beam::calc_beaming (SCM smob)
 
 bool
 operator <(Beam_stem_segment const &a,
-          Beam_stem_segment const &b)
+           Beam_stem_segment const &b)
 {
   return a.rank_ < b.rank_;
 }
 
-typedef map<int, vector<Beam_stem_segment> >  Position_stem_segments_map;
+typedef map<int, vector<Beam_stem_segment> > Position_stem_segments_map;
 
 // TODO - should store result in a property?
 vector<Beam_segment>
@@ -347,7 +344,7 @@ Beam::get_beam_segments (Grob *me_grob, Grob **common)
      Stem #'beaming is correct */
   (void) me_grob->get_property ("beaming");
 
-  Spanner *me = dynamic_cast<Spanner*> (me_grob);
+  Spanner *me = dynamic_cast<Spanner *> (me_grob);
 
   extract_grob_set (me, "stems", stems);
   Grob *commonx = common_refpoint_of_array (stems, me, X_AXIS);
@@ -378,50 +375,50 @@ Beam::get_beam_segments (Grob *me_grob, Grob **common)
       SCM beaming = stem->get_property ("beaming");
       Direction d = LEFT;
       do
-       {
-         // Find the maximum and minimum beam ranks.
-         // Given that RANKS is never reset to empty, the interval will always be
-         // smallest for the left beamlet of the first stem, and then it might grow.
-         // Do we really want this? (It only affects the tremolo gaps) --jneem
-         for (SCM s = index_get_cell (beaming, d);
-              scm_is_pair (s); s = scm_cdr (s))
-           {
-             if (!scm_is_integer (scm_car (s)))
-               continue;
-
-             int beam_rank = scm_to_int (scm_car (s));
-             ranks.add_point (beam_rank);
-           }
-
-         for (SCM s = index_get_cell (beaming, d);
-              scm_is_pair (s); s = scm_cdr (s))
-           {
-             if (!scm_is_integer (scm_car (s)))
-               continue;
-
-             int beam_rank = scm_to_int (scm_car (s));
-             Beam_stem_segment seg;
-             seg.stem_ = stem;
-             seg.stem_x_ = stem_x;
-             seg.rank_ = 2 * i + (d+1)/2;
-             seg.width_ = stem_width;
-             seg.stem_index_ = i;
-             seg.dir_ = d;
-             seg.max_connect_ = robust_scm2int (stem->get_property ("max-beam-connect"), 1000);
-
-             Direction stem_dir = get_grob_direction (stem);
-
-             seg.gapped_
-               = (stem_dir * beam_rank < (stem_dir * ranks[-stem_dir] + gap_count));
-             stem_segments[beam_rank].push_back (seg);
-           }
-       }
+        {
+          // Find the maximum and minimum beam ranks.
+          // Given that RANKS is never reset to empty, the interval will always be
+          // smallest for the left beamlet of the first stem, and then it might grow.
+          // Do we really want this? (It only affects the tremolo gaps) --jneem
+          for (SCM s = index_get_cell (beaming, d);
+               scm_is_pair (s); s = scm_cdr (s))
+            {
+              if (!scm_is_integer (scm_car (s)))
+                continue;
+
+              int beam_rank = scm_to_int (scm_car (s));
+              ranks.add_point (beam_rank);
+            }
+
+          for (SCM s = index_get_cell (beaming, d);
+               scm_is_pair (s); s = scm_cdr (s))
+            {
+              if (!scm_is_integer (scm_car (s)))
+                continue;
+
+              int beam_rank = scm_to_int (scm_car (s));
+              Beam_stem_segment seg;
+              seg.stem_ = stem;
+              seg.stem_x_ = stem_x;
+              seg.rank_ = 2 * i + (d + 1) / 2;
+              seg.width_ = stem_width;
+              seg.stem_index_ = i;
+              seg.dir_ = d;
+              seg.max_connect_ = robust_scm2int (stem->get_property ("max-beam-connect"), 1000);
+
+              Direction stem_dir = get_grob_direction (stem);
+
+              seg.gapped_
+                = (stem_dir * beam_rank < (stem_dir * ranks[-stem_dir] + gap_count));
+              stem_segments[beam_rank].push_back (seg);
+            }
+        }
       while (flip (&d) != LEFT);
     }
 
   Drul_array<Real> break_overshoot
     = robust_scm2drul (me->get_property ("break-overshoot"),
-                      Drul_array<Real> (-0.5, 0.0));
+                       Drul_array<Real> (-0.5, 0.0));
 
   vector<Beam_segment> segments;
   for (Position_stem_segments_map::const_iterator i (stem_segments.begin ());
@@ -435,113 +432,113 @@ Beam::get_beam_segments (Grob *me_grob, Grob **common)
       // Iterate over all of the segments of the current beam rank,
       // merging the adjacent Beam_stem_segments into one Beam_segment
       // when appropriate.
-      int vertical_count =  (*i).first;
+      int vertical_count = (*i).first;
       for (vsize j = 0; j < segs.size (); j++)
-       {
-         // Keeping track of the different directions here is a little tricky.
-         // segs[j].dir_ is the direction of the beam segment relative to the stem
-         // (ie. segs[j].dir_ == LEFT if the beam segment sticks out to the left of
-         // its stem) whereas event_dir refers to the edge of the beam segment that
-         // we are currently looking at (ie. if segs[j].dir_ == event_dir then we
-         // are looking at that edge of the beam segment that is furthest from its
-         // stem).
-         Direction event_dir = LEFT;
-         Beam_stem_segment const& seg = segs[j];
-         do
-           {
-             Beam_stem_segment const& neighbor_seg = segs[j + event_dir];
-             // TODO: make names clearer? --jneem
-             // on_line_bound: whether the current segment is on the boundary of the WHOLE beam
-             // on_beam_bound: whether the current segment is on the boundary of just that part
-             //   of the beam with the current beam_rank
-             bool on_line_bound = (seg.dir_ == LEFT) ? seg.stem_index_ == 0
-               : seg.stem_index_ == stems.size() - 1;
-             bool on_beam_bound = (event_dir == LEFT) ? j == 0 :
-               j == segs.size () - 1;
-             bool inside_stem = (event_dir == LEFT)
-               ? seg.stem_index_ > 0
-               : seg.stem_index_ + 1 < stems.size () ;
-
-             bool event = on_beam_bound
-               || abs (seg.rank_ - neighbor_seg.rank_) > 1
-               || (abs (vertical_count) >= seg.max_connect_
-                   || abs (vertical_count) >= neighbor_seg.max_connect_);
-
-             if (!event)
-               // Then this edge of the current segment is irrelevent because it will
-               // be connected with the next segment in the event_dir direction.
-               continue;
-
-             current.vertical_count_ = vertical_count;
-             current.horizontal_[event_dir] = seg.stem_x_;
-             if (seg.dir_ == event_dir)
-               // then we are examining the edge of a beam segment that is furthest
-               // from its stem.
-               {
-                 if (on_line_bound
-                     && me->get_bound (event_dir)->break_status_dir ())
-                   {
-                     current.horizontal_[event_dir]
-                       = (robust_relative_extent (me->get_bound (event_dir),
-                                                  commonx, X_AXIS)[RIGHT]
-                          + event_dir * break_overshoot[event_dir]);
-                   }
-                 else
-                   {
-                     Grob *stem = stems[seg.stem_index_];
-                     Drul_array<Real> beamlet_length =
-                       robust_scm2interval (stem->get_property ("beamlet-default-length"), Interval (1.1, 1.1));
-                     Drul_array<Real> max_proportion =
-                       robust_scm2interval (stem->get_property ("beamlet-max-length-proportion"), Interval (0.75, 0.75));
-                     Real length = beamlet_length[seg.dir_];
-
-                     if (inside_stem)
-                       {
-                         Grob *neighbor_stem = stems[seg.stem_index_ + event_dir];
-                         Real neighbor_stem_x = neighbor_stem->relative_coordinate (commonx, X_AXIS);
-
-                         length = min (length,
-                                       fabs (neighbor_stem_x - seg.stem_x_) * max_proportion[seg.dir_]);
-                       }
-                     current.horizontal_[event_dir] += event_dir * length;
-                   }
-               }
-             else
-               // we are examining the edge of a beam segment that is closest
-               // (ie. touching, unless there is a gap) its stem.
-               {
-                 current.horizontal_[event_dir] += event_dir * seg.width_/2;
-                 if (seg.gapped_)
-                   {
-                     current.horizontal_[event_dir] -= event_dir * gap_length;
-
-                     if (Stem::is_invisible (seg.stem_))
-                       {
-                         /*
-                           Need to do this in case of whole notes. We don't want the
-                           heads to collide with the beams.
-                          */
-                         extract_grob_set (seg.stem_, "note-heads", heads);
-
-                         for (vsize k = 0; k < heads.size (); k ++)
-                           current.horizontal_[event_dir]
-                             = event_dir * min  (event_dir * current.horizontal_[event_dir],
-                                                 - gap_length/2
-                                                 + event_dir
-                                                   * heads[k]->extent (commonx,
-                                                                       X_AXIS)[-event_dir]);
-                       }
-                   }
-               }
-
-             if (event_dir == RIGHT)
-               {
-                 segments.push_back (current);
-                 current = Beam_segment ();
-               }
-           }
-         while (flip (&event_dir) != LEFT);
-       }
+        {
+          // Keeping track of the different directions here is a little tricky.
+          // segs[j].dir_ is the direction of the beam segment relative to the stem
+          // (ie. segs[j].dir_ == LEFT if the beam segment sticks out to the left of
+          // its stem) whereas event_dir refers to the edge of the beam segment that
+          // we are currently looking at (ie. if segs[j].dir_ == event_dir then we
+          // are looking at that edge of the beam segment that is furthest from its
+          // stem).
+          Direction event_dir = LEFT;
+          Beam_stem_segment const &seg = segs[j];
+          do
+            {
+              Beam_stem_segment const &neighbor_seg = segs[j + event_dir];
+              // TODO: make names clearer? --jneem
+              // on_line_bound: whether the current segment is on the boundary of the WHOLE beam
+              // on_beam_bound: whether the current segment is on the boundary of just that part
+              //   of the beam with the current beam_rank
+              bool on_line_bound = (seg.dir_ == LEFT) ? seg.stem_index_ == 0
+                                   : seg.stem_index_ == stems.size () - 1;
+              bool on_beam_bound = (event_dir == LEFT) ? j == 0
+                                   : j == segs.size () - 1;
+              bool inside_stem = (event_dir == LEFT)
+                                 ? seg.stem_index_ > 0
+                                 : seg.stem_index_ + 1 < stems.size ();
+
+              bool event = on_beam_bound
+                           || abs (seg.rank_ - neighbor_seg.rank_) > 1
+                           || (abs (vertical_count) >= seg.max_connect_
+                               || abs (vertical_count) >= neighbor_seg.max_connect_);
+
+              if (!event)
+                // Then this edge of the current segment is irrelevent because it will
+                // be connected with the next segment in the event_dir direction.
+                continue;
+
+              current.vertical_count_ = vertical_count;
+              current.horizontal_[event_dir] = seg.stem_x_;
+              if (seg.dir_ == event_dir)
+                // then we are examining the edge of a beam segment that is furthest
+                // from its stem.
+                {
+                  if (on_line_bound
+                      && me->get_bound (event_dir)->break_status_dir ())
+                    {
+                      current.horizontal_[event_dir]
+                        = (robust_relative_extent (me->get_bound (event_dir),
+                                                   commonx, X_AXIS)[RIGHT]
+                           + event_dir * break_overshoot[event_dir]);
+                    }
+                  else
+                    {
+                      Grob *stem = stems[seg.stem_index_];
+                      Drul_array<Real> beamlet_length
+                        = robust_scm2interval (stem->get_property ("beamlet-default-length"), Interval (1.1, 1.1));
+                      Drul_array<Real> max_proportion
+                        = robust_scm2interval (stem->get_property ("beamlet-max-length-proportion"), Interval (0.75, 0.75));
+                      Real length = beamlet_length[seg.dir_];
+
+                      if (inside_stem)
+                        {
+                          Grob *neighbor_stem = stems[seg.stem_index_ + event_dir];
+                          Real neighbor_stem_x = neighbor_stem->relative_coordinate (commonx, X_AXIS);
+
+                          length = min (length,
+                                        fabs (neighbor_stem_x - seg.stem_x_) * max_proportion[seg.dir_]);
+                        }
+                      current.horizontal_[event_dir] += event_dir * length;
+                    }
+                }
+              else
+                // we are examining the edge of a beam segment that is closest
+                // (ie. touching, unless there is a gap) its stem.
+                {
+                  current.horizontal_[event_dir] += event_dir * seg.width_ / 2;
+                  if (seg.gapped_)
+                    {
+                      current.horizontal_[event_dir] -= event_dir * gap_length;
+
+                      if (Stem::is_invisible (seg.stem_))
+                        {
+                          /*
+                            Need to do this in case of whole notes. We don't want the
+                            heads to collide with the beams.
+                           */
+                          extract_grob_set (seg.stem_, "note-heads", heads);
+
+                          for (vsize k = 0; k < heads.size (); k++)
+                            current.horizontal_[event_dir]
+                              = event_dir * min (event_dir * current.horizontal_[event_dir],
+                                                 - gap_length / 2
+                                                 + event_dir
+                                                 * heads[k]->extent (commonx,
+                                                                     X_AXIS)[-event_dir]);
+                        }
+                    }
+                }
+
+              if (event_dir == RIGHT)
+                {
+                  segments.push_back (current);
+                  current = Beam_segment ();
+                }
+            }
+          while (flip (&event_dir) != LEFT);
+        }
 
     }
 
@@ -586,7 +583,7 @@ Beam::print (SCM grob)
   scale_drul (&pos, Staff_symbol_referencer::staff_space (me));
 
   Real dy = pos[RIGHT] - pos[LEFT];
-  Real slope = (dy && span.length ()) ? dy / span.length ()  : 0;
+  Real slope = (dy && span.length ()) ? dy / span.length () : 0;
 
   Real beam_thickness = get_beam_thickness (me);
   Real beam_dy = get_beam_translation (me);
@@ -601,7 +598,7 @@ Beam::print (SCM grob)
                  ? segments[0].vertical_count_
                  : segments.back ().vertical_count_);
 
-  for (vsize i = 0; i < segments.size (); i ++)
+  for (vsize i = 0; i < segments.size (); i++)
     {
       Real local_slope = slope;
       /*
@@ -610,8 +607,8 @@ Beam::print (SCM grob)
       */
       if (feather_dir)
         local_slope += (feather_dir * segments[i].vertical_count_
-                                    * beam_dy
-                                    * placements.length ()
+                        * beam_dy
+                        * placements.length ()
                         / span.length ());
 
       Stencil b = Lookup::beam (local_slope, segments[i].horizontal_.length (), beam_thickness, blot);
@@ -668,15 +665,15 @@ Beam::print (SCM grob)
       extract_grob_set (me, "stems", stems);
 
       /*
-       This code prints the demerits for each beam. Perhaps this
-       should be switchable for those who want to twiddle with the
-       parameters.
+        This code prints the demerits for each beam. Perhaps this
+        should be switchable for those who want to twiddle with the
+        parameters.
       */
       string str;
       SCM properties = Font_interface::text_font_alist_chain (me);
 
-      properties = scm_cons(scm_acons (ly_symbol2scm ("font-size"), scm_from_int (-5), SCM_EOL),
-                            properties);
+      properties = scm_cons (scm_acons (ly_symbol2scm ("font-size"), scm_from_int (-5), SCM_EOL),
+                             properties);
 
       Direction stem_dir = stems.size () ? to_dir (stems[0]->get_property ("direction")) : UP;
 
@@ -684,10 +681,10 @@ Beam::print (SCM grob)
                                        (me->layout ()->self_scm (), properties, annotation));
 
       if (!score.is_empty ())
-       {
-         score.translate_axis (me->relative_coordinate(commonx, X_AXIS), X_AXIS);
-         the_beam.add_at_edge (Y_AXIS, stem_dir, score, 1.0);
-       }
+        {
+          score.translate_axis (me->relative_coordinate (commonx, X_AXIS), X_AXIS);
+          the_beam.add_at_edge (Y_AXIS, stem_dir, score, 1.0);
+        }
     }
 #endif
 
@@ -706,10 +703,10 @@ Beam::get_default_dir (Grob *me)
       Interval positions = Stem::head_positions (*s);
       Direction d = DOWN;
       do
-       {
-         if (sign (positions[d]) == d)
-           extremes[d] = d * max (d * positions[d], d * extremes[d]);
-       }
+        {
+          if (sign (positions[d]) == d)
+            extremes[d] = d * max (d * positions[d], d * extremes[d]);
+        }
       while (flip (&d) != DOWN);
     }
 
@@ -723,30 +720,29 @@ Beam::get_default_dir (Grob *me)
       Direction stem_dir = CENTER;
       SCM stem_dir_scm = s->get_property_data ("direction");
       if (is_direction (stem_dir_scm))
-       {
-         stem_dir = to_dir (stem_dir_scm);
-         force_dir = true;
-       }
+        {
+          stem_dir = to_dir (stem_dir_scm);
+          force_dir = true;
+        }
       else
-       stem_dir = to_dir (s->get_property ("default-direction"));
+        stem_dir = to_dir (s->get_property ("default-direction"));
 
       if (!stem_dir)
-       stem_dir = to_dir (s->get_property ("neutral-direction"));
+        stem_dir = to_dir (s->get_property ("neutral-direction"));
 
       if (stem_dir)
-       {
-         count[stem_dir] ++;
-         total[stem_dir] += max (int (- stem_dir * Stem::head_positions (s) [-stem_dir]), 0);
-       }
+        {
+          count[stem_dir]++;
+          total[stem_dir] += max (int (- stem_dir * Stem::head_positions (s) [-stem_dir]), 0);
+        }
     }
 
-
   if (!force_dir)
     {
       if (abs (extremes[UP]) > -extremes[DOWN])
-       return DOWN;
+        return DOWN;
       else if (extremes[UP] < -extremes[DOWN])
-       return UP;
+        return UP;
     }
 
   Direction dir = CENTER;
@@ -754,10 +750,10 @@ Beam::get_default_dir (Grob *me)
   if ((d = (Direction) sign (count[UP] - count[DOWN])))
     dir = d;
   else if (count[UP]
-          && count[DOWN]
-          && (d = (Direction)  sign (total[UP] / count[UP] - total[DOWN]/count[DOWN])))
+           && count[DOWN]
+           && (d = (Direction) sign (total[UP] / count[UP] - total[DOWN] / count[DOWN])))
     dir = d;
-  else if ((d = (Direction)  sign (total[UP] - total[DOWN])))
+  else if ((d = (Direction) sign (total[UP] - total[DOWN])))
     dir = d;
   else
     dir = to_dir (me->get_property ("neutral-direction"));
@@ -779,7 +775,7 @@ Beam::set_stem_directions (Grob *me, Direction d)
 
       SCM forcedir = s->get_property_data ("direction");
       if (!to_dir (forcedir))
-       set_grob_direction (s, d);
+        set_grob_direction (s, d);
     }
 }
 
@@ -818,24 +814,24 @@ Beam::consider_auto_knees (Grob *me)
 
       Interval head_extents = Stem::head_positions (stem);
       if (!head_extents.is_empty ())
-       {
-         head_extents[LEFT] += -1;
-         head_extents[RIGHT] += 1;
-         head_extents *= staff_space * 0.5;
-
-         /*
-           We could subtract beam Y position, but this routine only
-           sets stem directions, a constant shift does not have an
-           influence.
-         */
-         head_extents += stem->pure_relative_y_coordinate (common, 0, INT_MAX);
-
-         if (to_dir (stem->get_property_data ("direction")))
-           {
-             Direction stemdir = to_dir (stem->get_property ("direction"));
-             head_extents[-stemdir] = -stemdir * infinity_f;
-           }
-       }
+        {
+          head_extents[LEFT] += -1;
+          head_extents[RIGHT] += 1;
+          head_extents *= staff_space * 0.5;
+
+          /*
+            We could subtract beam Y position, but this routine only
+            sets stem directions, a constant shift does not have an
+            influence.
+          */
+          head_extents += stem->pure_relative_y_coordinate (common, 0, INT_MAX);
+
+          if (to_dir (stem->get_property_data ("direction")))
+            {
+              Direction stemdir = to_dir (stem->get_property ("direction"));
+              head_extents[-stemdir] = -stemdir * infinity_f;
+            }
+        }
       head_extents_array.push_back (head_extents);
 
       gaps.remove_interval (head_extents);
@@ -844,46 +840,46 @@ Beam::consider_auto_knees (Grob *me)
   Interval max_gap;
   Real max_gap_len = 0.0;
 
-  for (vsize i = gaps.allowed_regions_.size () -1; i != VPOS ;i--)
+  for (vsize i = gaps.allowed_regions_.size () - 1; i != VPOS; i--)
     {
       Interval gap = gaps.allowed_regions_[i];
 
       /*
-       the outer gaps are not knees.
+        the outer gaps are not knees.
       */
       if (isinf (gap[LEFT]) || isinf (gap[RIGHT]))
-       continue;
+        continue;
 
       if (gap.length () >= max_gap_len)
-       {
-         max_gap_len = gap.length ();
-         max_gap = gap;
-       }
+        {
+          max_gap_len = gap.length ();
+          max_gap = gap;
+        }
     }
 
   Real beam_translation = get_beam_translation (me);
   Real beam_thickness = Beam::get_beam_thickness (me);
   int beam_count = Beam::get_beam_count (me);
   Real height_of_beams = beam_thickness / 2
-    + (beam_count - 1) * beam_translation;
+                         + (beam_count - 1) * beam_translation;
   Real threshold = scm_to_double (scm) + height_of_beams;
 
   if (max_gap_len > threshold)
     {
       int j = 0;
       for (vsize i = 0; i < stems.size (); i++)
-       {
-         Grob *stem = stems[i];
-         Interval head_extents = head_extents_array[j++];
+        {
+          Grob *stem = stems[i];
+          Interval head_extents = head_extents_array[j++];
 
-         Direction d = (head_extents.center () < max_gap.center ())
-           ? UP : DOWN;
+          Direction d = (head_extents.center () < max_gap.center ())
+                        ? UP : DOWN;
 
-         stem->set_property ("direction", scm_from_int (d));
+          stem->set_property ("direction", scm_from_int (d));
 
-         head_extents.intersect (max_gap);
-         assert (head_extents.is_empty () || head_extents.length () < 1e-6);
-       }
+          head_extents.intersect (max_gap);
+          assert (head_extents.is_empty () || head_extents.length () < 1e-6);
+        }
     }
 }
 
@@ -897,16 +893,14 @@ This is done in beam because the shorten has to be uniform over the
 entire beam.
 */
 
-
-
 void
 set_minimum_dy (Grob *me, Real *dy)
 {
   if (*dy)
     {
       /*
-       If dy is smaller than the smallest quant, we
-       get absurd direction-sign penalties.
+        If dy is smaller than the smallest quant, we
+        get absurd direction-sign penalties.
       */
 
       Real ss = Staff_symbol_referencer::staff_space (me);
@@ -917,12 +911,10 @@ set_minimum_dy (Grob *me, Real *dy)
       Real hang = 1.0 - (beam_thickness - slt) / 2;
 
       *dy = sign (*dy) * max (fabs (*dy),
-                             min (min (sit, inter), hang));
+                              min (min (sit, inter), hang));
     }
 }
 
-
-
 MAKE_SCHEME_CALLBACK (Beam, calc_stem_shorten, 1)
 SCM
 Beam::calc_stem_shorten (SCM smob)
@@ -936,7 +928,7 @@ Beam::calc_stem_shorten (SCM smob)
     return scm_from_int (0);
 
   Real forced_fraction = 1.0 * forced_stem_count (me)
-    / normal_stem_count (me);
+                         / normal_stem_count (me);
 
   int beam_count = get_beam_count (me);
 
@@ -947,19 +939,17 @@ Beam::calc_stem_shorten (SCM smob)
   Real staff_space = Staff_symbol_referencer::staff_space (me);
 
   SCM shorten_elt
-    = robust_list_ref (beam_count -1, shorten_list);
+    = robust_list_ref (beam_count - 1, shorten_list);
   Real shorten = scm_to_double (shorten_elt) * staff_space;
 
   shorten *= forced_fraction;
 
-
   if (shorten)
     return scm_from_double (shorten);
 
   return scm_from_double (0.0);
 }
 
-
 Interval
 Beam::no_visible_stem_positions (Grob *me, Interval default_value)
 {
@@ -969,7 +959,7 @@ Beam::no_visible_stem_positions (Grob *me, Interval default_value)
 
   Interval head_positions;
   Slice multiplicity;
-  for (vsize i = 0; i < stems.size(); i++)
+  for (vsize i = 0; i < stems.size (); i++)
     {
       head_positions.unite (Stem::head_positions (stems[i]));
       multiplicity.unite (Stem::beam_multiplicity (stems[i]));
@@ -981,14 +971,13 @@ Beam::no_visible_stem_positions (Grob *me, Interval default_value)
     programming_error ("The beam should have a direction by now.");
 
   Real y = head_positions.linear_combination (dir)
-    * 0.5 * Staff_symbol_referencer::staff_space (me)
-    + dir * get_beam_translation (me) * (multiplicity.length () + 1);
+           * 0.5 * Staff_symbol_referencer::staff_space (me)
+           + dir * get_beam_translation (me) * (multiplicity.length () + 1);
 
   y /= Staff_symbol_referencer::staff_space (me);
-  return Interval (y,y);
+  return Interval (y, y);
 }
 
-
 /*
   Compute a first approximation to the beam slope.
 */
@@ -999,7 +988,7 @@ Beam::calc_least_squares_positions (SCM smob, SCM /* posns */)
   Grob *me = unsmob_grob (smob);
 
   int count = normal_stem_count (me);
-  Interval pos (0,0);
+  Interval pos (0, 0);
   if (count < 1)
     return ly_interval2scm (no_visible_stem_positions (me, pos));
 
@@ -1014,9 +1003,9 @@ Beam::calc_least_squares_positions (SCM smob, SCM /* posns */)
   Grob *lvs = last_normal_stem (me);
 
   Interval ideal (Stem::get_stem_info (fvs).ideal_y_
-                 + fvs->relative_coordinate (commony, Y_AXIS) - my_y,
-                 Stem::get_stem_info (lvs).ideal_y_
-                 + lvs->relative_coordinate (commony, Y_AXIS) - my_y);
+                  + fvs->relative_coordinate (commony, Y_AXIS) - my_y,
+                  Stem::get_stem_info (lvs).ideal_y_
+                  + lvs->relative_coordinate (commony, Y_AXIS) - my_y);
 
   Real x0 = first_normal_stem (me)->relative_coordinate (commonx, X_AXIS);
   for (vsize i = 0; i < stems.size (); i++)
@@ -1035,29 +1024,29 @@ Beam::calc_least_squares_positions (SCM smob, SCM /* posns */)
   if (!ideal.delta ())
     {
       Interval chord (Stem::chord_start_y (stems[0]),
-                     Stem::chord_start_y (stems.back ()));
+                      Stem::chord_start_y (stems.back ()));
 
       /* Simple beams (2 stems) on middle line should be allowed to be
-        slightly sloped.
+         slightly sloped.
 
-        However, if both stems reach middle line,
-        ideal[LEFT] == ideal[RIGHT] and ideal.delta () == 0.
+         However, if both stems reach middle line,
+         ideal[LEFT] == ideal[RIGHT] and ideal.delta () == 0.
 
-        For that case, we apply artificial slope */
+         For that case, we apply artificial slope */
       if (!ideal[LEFT] && chord.delta () && count == 2)
-       {
-         /* FIXME. -> UP */
-         Direction d = (Direction) (sign (chord.delta ()) * UP);
-         pos[d] = get_beam_thickness (me) / 2;
-         pos[-d] = -pos[d];
-       }
+        {
+          /* FIXME. -> UP */
+          Direction d = (Direction) (sign (chord.delta ()) * UP);
+          pos[d] = get_beam_thickness (me) / 2;
+          pos[-d] = -pos[d];
+        }
       else
-       pos = ideal;
+        pos = ideal;
 
       /*
-       For broken beams this doesn't work well. In this case, the
-       slope esp. of the first part of a broken beam should predict
-       where the second part goes.
+        For broken beams this doesn't work well. In this case, the
+        slope esp. of the first part of a broken beam should predict
+        where the second part goes.
       */
       ldy = pos[RIGHT] - pos[LEFT];
     }
@@ -1065,13 +1054,13 @@ Beam::calc_least_squares_positions (SCM smob, SCM /* posns */)
     {
       vector<Offset> ideals;
       for (vsize i = 0; i < stems.size (); i++)
-       {
-         Grob *s = stems[i];
-         ideals.push_back (Offset (x_posns[i],
-                              Stem::get_stem_info (s).ideal_y_
-                              + s->relative_coordinate (commony, Y_AXIS)
-                              - my_y));
-       }
+        {
+          Grob *s = stems[i];
+          ideals.push_back (Offset (x_posns[i],
+                                    Stem::get_stem_info (s).ideal_y_
+                                    + s->relative_coordinate (commony, Y_AXIS)
+                                    - my_y));
+        }
 
       minimise_least_squares (&slope, &y, ideals);
 
@@ -1088,11 +1077,10 @@ Beam::calc_least_squares_positions (SCM smob, SCM /* posns */)
   */
   scale_drul (&pos, 1 / Staff_symbol_referencer::staff_space (me));
 
-  me->set_property ("least-squares-dy",  scm_from_double (ldy));
+  me->set_property ("least-squares-dy", scm_from_double (ldy));
   return ly_interval2scm (pos);
 }
 
-
 // Assuming V is not empty, pick a 'reasonable' point inside V.
 static Real
 point_in_interval (Interval v, Real dist)
@@ -1126,10 +1114,11 @@ Beam::shift_region_to_valid (SCM grob, SCM posns)
   extract_grob_set (me, "covered-grobs", covered);
 
   Grob *common[NO_AXES] = { me, me };
-  for (Axis a = X_AXIS; a < NO_AXES; incr (a)) {
-    common[a] = common_refpoint_of_array (stems, me, a);
-    common[a] = common_refpoint_of_array (covered, common[a], a);
-  }
+  for (Axis a = X_AXIS; a < NO_AXES; incr (a))
+    {
+      common[a] = common_refpoint_of_array (stems, me, a);
+      common[a] = common_refpoint_of_array (covered, common[a], a);
+    }
   Grob *fvs = first_normal_stem (me);
 
   if (!fvs)
@@ -1166,20 +1155,20 @@ Beam::shift_region_to_valid (SCM grob, SCM posns)
     {
       Grob *s = stems[i];
       if (Stem::is_invisible (s))
-       continue;
+        continue;
 
       Direction d = get_grob_direction (s);
       Real left_y
-       = Stem::get_stem_info (s).shortest_y_
-       - slope * x_posns [i];
+        = Stem::get_stem_info (s).shortest_y_
+          - slope * x_posns [i];
 
       /*
-       left_y is now relative to the stem S. We want relative to
-       ourselves, so translate:
+        left_y is now relative to the stem S. We want relative to
+        ourselves, so translate:
       */
       left_y
-       += + s->relative_coordinate (common[Y_AXIS], Y_AXIS)
-       - me->relative_coordinate (common[Y_AXIS], Y_AXIS);
+      += + s->relative_coordinate (common[Y_AXIS], Y_AXIS)
+         - me->relative_coordinate (common[Y_AXIS], Y_AXIS);
 
       Interval flp;
       flp.set_full ();
@@ -1188,7 +1177,7 @@ Beam::shift_region_to_valid (SCM grob, SCM posns)
       feasible_left_point.intersect (flp);
     }
 
-  vector<Grob*> filtered;
+  vector<Grob *> filtered;
   /*
     We only update these for objects that are too large for quanting
     to find a workaround.  Typically, these are notes with
@@ -1204,9 +1193,9 @@ Beam::shift_region_to_valid (SCM grob, SCM posns)
   // A list of intervals into which beams may not fall
   vector<Interval> forbidden_intervals;
 
-  for (vsize i = 0; i < covered.size(); i++)
+  for (vsize i = 0; i < covered.size (); i++)
     {
-      if (!covered[i]->is_live())
+      if (!covered[i]->is_live ())
         continue;
 
       if (Beam::has_interface (covered[i]) && is_cross_staff (covered[i]))
@@ -1240,13 +1229,13 @@ Beam::shift_region_to_valid (SCM grob, SCM posns)
                 would resolve the problem, eg.
 
                  x    x
-                |    | 
+                |    |
                 =====
 
                 =====
-                |   |  
+                |   |
                 x   x
-                
+
                 Such beams would need a coordinating grob to resolve
                 the collision, since both will likely want to occupy
                 the centerline.
@@ -1289,9 +1278,9 @@ Beam::shift_region_to_valid (SCM grob, SCM posns)
       while (flip (&d) != LEFT);
     }
 
-  Grob_array *arr =
-    Pointer_group_interface::get_grob_array (me,
-                                             ly_symbol2scm ("covered-grobs"));
+  Grob_array *arr
+    Pointer_group_interface::get_grob_array (me,
+                                               ly_symbol2scm ("covered-grobs"));
   arr->set_array (filtered);
 
   vector_sort (forbidden_intervals, Interval::left_less);
@@ -1337,7 +1326,7 @@ Beam::shift_region_to_valid (SCM grob, SCM posns)
   do
     {
       if (!feasible_left_point.contains (feasible_beam_placements[d]))
-        feasible_beam_placements[d] = d*infinity_f;
+        feasible_beam_placements[d] = d * infinity_f;
     }
   while (flip (&d) != DOWN);
 
@@ -1402,7 +1391,7 @@ Beam::slope_damping (SCM smob, SCM posns)
       Grob *commonx = fvs->common_refpoint (lvs, X_AXIS);
 
       Real dx = last_normal_stem (me)->relative_coordinate (commonx, X_AXIS)
-       - first_normal_stem (me)->relative_coordinate (commonx, X_AXIS);
+                - first_normal_stem (me)->relative_coordinate (commonx, X_AXIS);
 
       Real slope = dy && dx ? dy / dx : 0;
 
@@ -1421,13 +1410,12 @@ Beam::slope_damping (SCM smob, SCM posns)
   return ly_interval2scm (pos);
 }
 
-
 MAKE_SCHEME_CALLBACK (Beam, quanting, 2);
 SCM
 Beam::quanting (SCM smob, SCM posns)
 {
   Grob *me = unsmob_grob (smob);
-  Drul_array<Real> ys(0, 0);
+  Drul_array<Real> ys (0, 0);
   ys = robust_scm2drul (posns, ys);
   Beam_scoring_problem problem (me, ys);
 
@@ -1435,7 +1423,6 @@ Beam::quanting (SCM smob, SCM posns)
   return ly_interval2scm (ys);
 }
 
-
 /*
   Report slice containing the numbers that are both in (car BEAMING)
   and (cdr BEAMING)
@@ -1449,7 +1436,7 @@ where_are_the_whole_beams (SCM beaming)
     {
       if (scm_c_memq (scm_car (s), scm_cdr (beaming)) != SCM_BOOL_F)
 
-       l.add_point (scm_to_int (scm_car (s)));
+        l.add_point (scm_to_int (scm_car (s)));
     }
 
   return l;
@@ -1459,27 +1446,27 @@ where_are_the_whole_beams (SCM beaming)
    in POS for stem S.  This Y position is relative to S. */
 Real
 Beam::calc_stem_y (Grob *me, Grob *stem, Grob **common,
-                  Real xl, Real xr, Direction feather_dir,
-                  Drul_array<Real> pos, bool french)
+                   Real xl, Real xr, Direction feather_dir,
+                   Drul_array<Real> pos, bool french)
 {
   Real beam_translation = get_beam_translation (me);
   Direction stem_dir = get_grob_direction (stem);
 
   Real dx = xr - xl;
-  Real relx = dx ? (stem->relative_coordinate (common[X_AXIS], X_AXIS) - xl)/dx : 0;
-  Real xdir = 2*relx-1;
+  Real relx = dx ? (stem->relative_coordinate (common[X_AXIS], X_AXIS) - xl) / dx : 0;
+  Real xdir = 2 * relx - 1;
 
-  Real stem_y = linear_combination(pos, xdir);
+  Real stem_y = linear_combination (pos, xdir);
 
   SCM beaming = stem->get_property ("beaming");
 
   Slice beam_slice (french
-                   ? where_are_the_whole_beams (beaming)
-                   : Stem::beam_multiplicity (stem));
+                    ? where_are_the_whole_beams (beaming)
+                    : Stem::beam_multiplicity (stem));
   if (beam_slice.is_empty ())
-    beam_slice = Slice (0,0);
-  Interval beam_multiplicity(beam_slice[LEFT],
-                            beam_slice[RIGHT]);
+    beam_slice = Slice (0, 0);
+  Interval beam_multiplicity (beam_slice[LEFT],
+                              beam_slice[RIGHT]);
 
   /*
     feather dir = 1 , relx 0->1 : factor 0 -> 1
@@ -1493,9 +1480,9 @@ Beam::calc_stem_y (Grob *me, Grob *stem, Grob **common,
     feather_factor = 1 - relx;
 
   stem_y += feather_factor * beam_translation
-    * beam_multiplicity[Direction(((french) ? DOWN : UP)*stem_dir)];
+            * beam_multiplicity[Direction (((french) ? DOWN : UP) * stem_dir)];
   Real id = me->relative_coordinate (common[Y_AXIS], Y_AXIS)
-    - stem->relative_coordinate (common[Y_AXIS], Y_AXIS);
+            - stem->relative_coordinate (common[Y_AXIS], Y_AXIS);
 
   return stem_y + id;
 }
@@ -1549,20 +1536,20 @@ Beam::set_stem_lengths (SCM smob)
 
       bool french = to_boolean (s->get_property ("french-beaming"));
       Real stem_y = calc_stem_y (me, s, common,
-                                xl, xr, feather_dir,
-                                pos, french && s != lvs && s!= fvs);
+                                 xl, xr, feather_dir,
+                                 pos, french && s != lvs && s != fvs);
 
       /*
-       Make the stems go up to the end of the beam. This doesn't matter
-       for normal beams, but for tremolo beams it looks silly otherwise.
+        Make the stems go up to the end of the beam. This doesn't matter
+        for normal beams, but for tremolo beams it looks silly otherwise.
       */
       if (gap
-         && !Stem::is_invisible (s))
-       stem_y += thick * 0.5 * get_grob_direction (s);
+          && !Stem::is_invisible (s))
+        stem_y += thick * 0.5 * get_grob_direction (s);
 
       /*
-       Do set_stemend for invisible stems too, so tuplet brackets
-       have a reference point for sloping
+        Do set_stemend for invisible stems too, so tuplet brackets
+        have a reference point for sloping
        */
       Stem::set_stemend (s, 2 * stem_y / staff_space);
     }
@@ -1579,30 +1566,30 @@ Beam::set_beaming (Grob *me, Beaming_pattern const *beaming)
   for (vsize i = 0; i < stems.size (); i++)
     {
       /*
-       Don't overwrite user settings.
+        Don't overwrite user settings.
       */
       do
-       {
-         Grob *stem = stems[i];
-         SCM beaming_prop = stem->get_property ("beaming");
-         if (beaming_prop == SCM_EOL
-             || index_get_cell (beaming_prop, d) == SCM_EOL)
-           {
-             int count = beaming->beamlet_count (i, d);
-             if (i > 0
-                 && i + 1 < stems.size ()
-                 && Stem::is_invisible (stem))
-               count = min (count, beaming->beamlet_count (i,-d));
-
-             if ( ((i == 0 && d == LEFT)
-                   || (i == stems.size ()-1 && d == RIGHT))
-                  && stems.size () > 1
-                  && to_boolean (me->get_property ("clip-edges")))
-               count = 0;
-
-             Stem::set_beaming (stem, count, d);
-           }
-       }
+        {
+          Grob *stem = stems[i];
+          SCM beaming_prop = stem->get_property ("beaming");
+          if (beaming_prop == SCM_EOL
+              || index_get_cell (beaming_prop, d) == SCM_EOL)
+            {
+              int count = beaming->beamlet_count (i, d);
+              if (i > 0
+                  && i + 1 < stems.size ()
+                  && Stem::is_invisible (stem))
+                count = min (count, beaming->beamlet_count (i, -d));
+
+              if ( ((i == 0 && d == LEFT)
+                    || (i == stems.size () - 1 && d == RIGHT))
+                   && stems.size () > 1
+                   && to_boolean (me->get_property ("clip-edges")))
+                count = 0;
+
+              Stem::set_beaming (stem, count, d);
+            }
+        }
       while (flip (&d) != LEFT);
     }
 }
@@ -1618,13 +1605,13 @@ Beam::forced_stem_count (Grob *me)
       Grob *s = stems[i];
 
       /* I can imagine counting those boundaries as a half forced stem,
-        but let's count them full for now. */
+         but let's count them full for now. */
       Direction defdir = to_dir (s->get_property ("default-direction"));
 
       if (abs (Stem::chord_start_y (s)) > 0.1
-         && defdir
-         && get_grob_direction (s) != defdir)
-       f++;
+          && defdir
+          && get_grob_direction (s) != defdir)
+        f++;
     }
   return f;
 }
@@ -1681,7 +1668,7 @@ Beam::rest_collision_callback (SCM smob, SCM prev_offset)
     return scm_from_double (0.0);
 
   Drul_array<Real> pos (robust_scm2drul (beam->get_property ("positions"),
-                                        Drul_array<Real> (0,0)));
+                                         Drul_array<Real> (0, 0)));
 
   Real staff_space = Staff_symbol_referencer::staff_space (rest);
 
@@ -1689,8 +1676,8 @@ Beam::rest_collision_callback (SCM smob, SCM prev_offset)
 
   Real dy = pos[RIGHT] - pos[LEFT];
 
-  Drul_array<Grob*> visible_stems (first_normal_stem (beam),
-                                  last_normal_stem (beam));
+  Drul_array<Grob *> visible_stems (first_normal_stem (beam),
+                                    last_normal_stem (beam));
   extract_grob_set (beam, "stems", stems);
 
   Grob *common = common_refpoint_of_array (stems, beam, X_AXIS);
@@ -1701,7 +1688,7 @@ Beam::rest_collision_callback (SCM smob, SCM prev_offset)
 
   Direction d = get_grob_direction (stem);
   Real stem_y = pos[LEFT]
-    + (stem->relative_coordinate (common, X_AXIS) - x0) * slope;
+                + (stem->relative_coordinate (common, X_AXIS) - x0) * slope;
 
   Real beam_translation = get_beam_translation (beam);
   Real beam_thickness = Beam::get_beam_thickness (beam);
@@ -1713,7 +1700,7 @@ Beam::rest_collision_callback (SCM smob, SCM prev_offset)
     = Stem::beam_multiplicity (stem).length () + 1;
 
   Real height_of_my_beams = beam_thickness / 2
-    + (beam_count - 1) * beam_translation;
+                            + (beam_count - 1) * beam_translation;
   Real beam_y = stem_y - d * height_of_my_beams;
 
   Grob *common_y = rest->common_refpoint (beam, Y_AXIS);
@@ -1724,7 +1711,7 @@ Beam::rest_collision_callback (SCM smob, SCM prev_offset)
   Real rest_dim = rest_extent[d];
   Real minimum_distance
     = staff_space * (robust_scm2double (stem->get_property ("stemlet-length"), 0.0)
-                    + robust_scm2double (rest->get_property ("minimum-distance"), 0.0));
+                     + robust_scm2double (rest->get_property ("minimum-distance"), 0.0));
 
   Real shift = d * min (d * (beam_y - d * minimum_distance - rest_dim), 0.0);
 
@@ -1758,10 +1745,10 @@ Beam::is_knee (Grob *me)
     {
       Direction dir = get_grob_direction (stems[i]);
       if (d && d != dir)
-       {
-         knee = true;
-         break;
-       }
+        {
+          knee = true;
+          break;
+        }
       d = dir;
     }
 
@@ -1797,22 +1784,22 @@ Beam::get_direction_beam_count (Grob *me, Direction d)
   for (vsize i = stems.size (); i--;)
     {
       /*
-       Should we take invisible stems into account?
+        Should we take invisible stems into account?
       */
       if (get_grob_direction (stems[i]) == d)
-       bc = max (bc, (Stem::beam_multiplicity (stems[i]).length () + 1));
+        bc = max (bc, (Stem::beam_multiplicity (stems[i]).length () + 1));
     }
 
   return bc;
 }
 
 ADD_INTERFACE (Beam,
-              "A beam.\n"
-              "\n"
-              "The @code{beam-thickness} property is the weight of beams,"
-              " measured in staffspace.  The @code{direction} property is"
-              " not user-serviceable.  Use the @code{direction} property"
-              " of @code{Stem} instead.\n"
+               "A beam.\n"
+               "\n"
+               "The @code{beam-thickness} property is the weight of beams,"
+               " measured in staffspace.  The @code{direction} property is"
+               " not user-serviceable.  Use the @code{direction} property"
+               " of @code{Stem} instead.\n"
                "\n"
                "The following properties may be set in the @code{details}"
                " list.\n"
@@ -1848,32 +1835,32 @@ ADD_INTERFACE (Beam,
                " calculating direction penalties.\n"
                "@end table\n",
 
-              /* properties */
-              "annotation "
-              "auto-knee-gap "
-              "beamed-stem-shorten "
-              "beaming "
-              "beam-thickness "
-              "break-overshoot "
-              "clip-edges "
-              "concaveness "
-              "collision-interfaces "
-              "collision-voice-only "
-              "covered-grobs "
-              "damping "
-              "details "
-              "direction "
-              "gap "
-              "gap-count "
-              "grow-direction "
-              "inspect-quants "
-              "knee "
-              "length-fraction "
-              "least-squares-dy "
-              "neutral-direction "
-              "normal-stems "
-              "positions "
-              "quantized-positions "
-              "shorten "
-              "stems "
-              );
+               /* properties */
+               "annotation "
+               "auto-knee-gap "
+               "beamed-stem-shorten "
+               "beaming "
+               "beam-thickness "
+               "break-overshoot "
+               "clip-edges "
+               "concaveness "
+               "collision-interfaces "
+               "collision-voice-only "
+               "covered-grobs "
+               "damping "
+               "details "
+               "direction "
+               "gap "
+               "gap-count "
+               "grow-direction "
+               "inspect-quants "
+               "knee "
+               "length-fraction "
+               "least-squares-dy "
+               "neutral-direction "
+               "normal-stems "
+               "positions "
+               "quantized-positions "
+               "shorten "
+               "stems "
+              );
index b823d2ecdaafb7e1c84d8a1c291601c993fb80cd..a0fa25e7f7a782b2aeba4fa045492ec6c89cfb9a 100644 (file)
@@ -82,17 +82,17 @@ Beaming_pattern::flag_direction (Beaming_options const &options, vsize i) const
     return CENTER;
 
   int count = infos_[i].count (LEFT); // Both directions should still be the same
-  int left_count = infos_[i-1].count (RIGHT);
-  int right_count = infos_[i+1].count (LEFT);
+  int left_count = infos_[i - 1].count (RIGHT);
+  int right_count = infos_[i + 1].count (LEFT);
 
   // If we are told to subdivide beams and we are next to a beat, point the
   // beamlet away from the beat.
   if (options.subdivide_beams_)
     {
       if (infos_[i].rhythmic_importance_ < 0)
-       return RIGHT;
-      else if (infos_[i+1].rhythmic_importance_ < 0)
-       return LEFT;
+        return RIGHT;
+      else if (infos_[i + 1].rhythmic_importance_ < 0)
+        return LEFT;
     }
 
   if (count <= left_count && count <= right_count)
@@ -106,13 +106,13 @@ Beaming_pattern::flag_direction (Beaming_options const &options, vsize i) const
     return LEFT;
 
   // If all else fails, point the beamlet away from the important moment.
-  return (infos_[i].rhythmic_importance_ <= infos_[i+1].rhythmic_importance_) ? RIGHT : LEFT;
+  return (infos_[i].rhythmic_importance_ <= infos_[i + 1].rhythmic_importance_) ? RIGHT : LEFT;
 }
 
 void
 Beaming_pattern::de_grace ()
 {
-  for (vsize i = 0; i < infos_.size (); i ++)
+  for (vsize i = 0; i < infos_.size (); i++)
     {
       infos_[i].de_grace ();
     }
@@ -139,15 +139,15 @@ Beaming_pattern::beamify (Beaming_options const &options)
     {
       Direction non_flag_dir = other_dir (flag_direction (options, i));
       if (non_flag_dir)
-       {
-         int importance = (non_flag_dir == LEFT)
-           ? infos_[i].rhythmic_importance_ : infos_[i+1].rhythmic_importance_;
-         int count = (importance < 0 && options.subdivide_beams_)
-           ? 1 : min (infos_[i].count (non_flag_dir),
-                      infos_[i+non_flag_dir].count (-non_flag_dir));
-
-         infos_[i].beam_count_drul_[non_flag_dir] = count;
-       }
+        {
+          int importance = (non_flag_dir == LEFT)
+                           ? infos_[i].rhythmic_importance_ : infos_[i + 1].rhythmic_importance_;
+          int count = (importance < 0 && options.subdivide_beams_)
+                      ? 1 : min (infos_[i].count (non_flag_dir),
+                                 infos_[i + non_flag_dir].count (-non_flag_dir));
+
+          infos_[i].beam_count_drul_[non_flag_dir] = count;
+        }
     }
 }
 
@@ -164,44 +164,43 @@ Beaming_pattern::find_rhythmic_importance (Beaming_options const &options)
       // If a beat grouping is not specified, default to 2 beats per group.
       int count = 2;
       if (scm_is_pair (grouping))
-       {
-         count = scm_to_int (scm_car (grouping));
-         grouping = scm_cdr (grouping);
-       }
+        {
+          count = scm_to_int (scm_car (grouping));
+          grouping = scm_cdr (grouping);
+        }
 
       // Mark the start of this beat group
       if (infos_[i].start_moment_ == measure_pos)
-       infos_[i].rhythmic_importance_ = -2;
+        infos_[i].rhythmic_importance_ = -2;
 
       // Mark the start of each unit up to the end of this beat group.
       for (int unit = 1; unit <= count; unit++)
-       {
-         Moment next_measure_pos = measure_pos + options.base_moment_;
-
-         while (i < infos_.size () && infos_[i].start_moment_ < next_measure_pos)
-           {
-             Moment dt = infos_[i].start_moment_ - measure_pos;
-
-             // The rhythmic importance of a stem between beats depends on its fraction
-             // of a beat: those stems with a lower denominator are deemed more
-             // important.
-             // FIXME: This is not the right way to do things for tuplets. For example,
-             // in an 8th-note triplet with a quarter-note beat, 1/3 of a beat should be
-             // more important than 1/2.
-             if (infos_[i].rhythmic_importance_ >= 0)
-               infos_[i].rhythmic_importance_ = (int) (dt / options.base_moment_).den ();
-
-             i++;
-           }
-
-         measure_pos = next_measure_pos;
-         if (i < infos_.size () && infos_[i].start_moment_ == measure_pos)
-           infos_[i].rhythmic_importance_ = -1;
-       }
+        {
+          Moment next_measure_pos = measure_pos + options.base_moment_;
+
+          while (i < infos_.size () && infos_[i].start_moment_ < next_measure_pos)
+            {
+              Moment dt = infos_[i].start_moment_ - measure_pos;
+
+              // The rhythmic importance of a stem between beats depends on its fraction
+              // of a beat: those stems with a lower denominator are deemed more
+              // important.
+              // FIXME: This is not the right way to do things for tuplets. For example,
+              // in an 8th-note triplet with a quarter-note beat, 1/3 of a beat should be
+              // more important than 1/2.
+              if (infos_[i].rhythmic_importance_ >= 0)
+                infos_[i].rhythmic_importance_ = (int) (dt / options.base_moment_).den ();
+
+              i++;
+            }
+
+          measure_pos = next_measure_pos;
+          if (i < infos_.size () && infos_[i].start_moment_ == measure_pos)
+            infos_[i].rhythmic_importance_ = -1;
+        }
     }
 }
 
-
 /*
   Invisible stems should be treated as though they have the same number of
   beams as their least-beamed neighbour. Here we go through the stems and
@@ -213,21 +212,20 @@ Beaming_pattern::unbeam_invisible_stems ()
   for (vsize i = 1; i < infos_.size (); i++)
     if (infos_[i].invisible_)
       {
-       int b = min (infos_[i].count (LEFT), infos_[i-1].count (LEFT));
-       infos_[i].beam_count_drul_[LEFT] = b;
-       infos_[i].beam_count_drul_[RIGHT] = b;
+        int b = min (infos_[i].count (LEFT), infos_[i - 1].count (LEFT));
+        infos_[i].beam_count_drul_[LEFT] = b;
+        infos_[i].beam_count_drul_[RIGHT] = b;
       }
 
   for (vsize i = infos_.size (); i--;)
     if (infos_[i].invisible_)
       {
-       int b = min (infos_[i].count (LEFT), infos_[i+1].count (LEFT));
-       infos_[i].beam_count_drul_[LEFT] = b;
-       infos_[i].beam_count_drul_[RIGHT] = b;
+        int b = min (infos_[i].count (LEFT), infos_[i + 1].count (LEFT));
+        infos_[i].beam_count_drul_[LEFT] = b;
+        infos_[i].beam_count_drul_[RIGHT] = b;
       }
 }
 
-
 void
 Beaming_pattern::add_stem (Moment m, int b, bool invisible)
 {
@@ -254,10 +252,10 @@ Moment
 Beaming_pattern::end_moment (int i) const
 {
   Duration *dur = new Duration (2 + max (beamlet_count (i, LEFT),
-                                        beamlet_count (i, RIGHT)),
-                               0);
+                                         beamlet_count (i, RIGHT)),
+                                0);
 
-  return infos_.at (i).start_moment_ + dur->get_length();
+  return infos_.at (i).start_moment_ + dur->get_length ();
 }
 
 bool
@@ -273,18 +271,18 @@ Beaming_pattern::invisibility (int i) const
 Beaming_pattern *
 Beaming_pattern::split_pattern (int i)
 {
-  Beaming_pattern* new_pattern=0;
+  Beaming_pattern *new_pattern = 0;
   int count;
 
   new_pattern = new Beaming_pattern ();
-  for (vsize j=i+1; j<infos_.size (); j++)
+  for (vsize j = i + 1; j < infos_.size (); j++)
     {
-      count = max(beamlet_count (j, LEFT), beamlet_count(j, RIGHT));
+      count = max (beamlet_count (j, LEFT), beamlet_count (j, RIGHT));
       new_pattern->add_stem (start_moment (j),
                              count,
                              invisibility (j));
     }
-  for (vsize j=i+1; j<infos_.size (); )
+  for (vsize j = i + 1; j < infos_.size ();)
     infos_.pop_back ();
   return (new_pattern);
 }
index cd2d47a9d7751aaf9f484b84a34bd081e5f63d35..1d8eced4f61bc9c1c67cfcd1968123daa01e91db 100644 (file)
@@ -38,7 +38,7 @@ protected:
   void stop_translation_timestep ();
   void start_translation_timestep ();
   void stop_fall ();
-  
+
 private:
   Moment stop_moment_;
   Stream_event *fall_event_;
@@ -60,11 +60,10 @@ void
 Bend_engraver::stop_fall ()
 {
   bool bar = scm_is_string (get_property ("whichBar"));
-  
-  
+
   fall_->set_bound (RIGHT, unsmob_grob (bar
-                                       ? get_property ("currentCommandColumn")
-                                       : get_property ("currentMusicalColumn")));
+                                        ? get_property ("currentCommandColumn")
+                                        : get_property ("currentMusicalColumn")));
   last_fall_ = fall_;
   fall_ = 0;
   note_head_ = 0;
@@ -74,10 +73,10 @@ Bend_engraver::stop_fall ()
 void
 Bend_engraver::stop_translation_timestep ()
 {
-  if (fall_ && !fall_->get_bound (LEFT)) 
+  if (fall_ && !fall_->get_bound (LEFT))
     {
       fall_->set_bound (LEFT, note_head_);
-      fall_->set_parent (note_head_,  Y_AXIS);
+      fall_->set_parent (note_head_, Y_AXIS);
     }
 }
 
@@ -97,7 +96,7 @@ Bend_engraver::acknowledge_note_head (Grob_info info)
 {
   if (!fall_event_)
     return;
-  
+
   if (note_head_ && fall_)
     {
       stop_fall ();
@@ -105,7 +104,7 @@ Bend_engraver::acknowledge_note_head (Grob_info info)
 
   note_head_ = info.grob ();
   stop_moment_ = now_mom () + get_event_length (info.event_cause (),
-                                               now_mom ());
+                                                now_mom ());
 }
 
 Bend_engraver::Bend_engraver ()
@@ -130,22 +129,22 @@ Bend_engraver::process_music ()
     {
       fall_ = make_spanner ("BendAfter", fall_event_->self_scm ());
       fall_->set_property ("delta-position",
-                          scm_from_double (robust_scm2double (fall_event_->get_property ("delta-step"), 0)));
+                           scm_from_double (robust_scm2double (fall_event_->get_property ("delta-step"), 0)));
     }
 }
 
 ADD_ACKNOWLEDGER (Bend_engraver, note_head);
 
 ADD_TRANSLATOR (Bend_engraver,
-               /* doc */
-               "Create fall spanners.",
+                /* doc */
+                "Create fall spanners.",
 
-               /* create */
-               "BendAfter ",
+                /* create */
+                "BendAfter ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 587d3d65db0cedc3ac6f57927ff14199e1373118..6103770b84d9c611a89a1c1386236027c1234f55 100644 (file)
@@ -23,7 +23,7 @@
 static Real
 F0_1 (Real x)
 {
-  return 2 / M_PI *atan (M_PI *x / 2);
+  return 2 / M_PI * atan (M_PI * x / 2);
 }
 
 Real
@@ -101,7 +101,7 @@ slur_height (Real width, Real h_inf, Real r_0)
 
 void
 get_slur_indent_height (Real *indent, Real *height,
-                       Real width, Real h_inf, Real r_0)
+                        Real width, Real h_inf, Real r_0)
 {
   Real max_fraction = 1.0 / 3.1;
   *height = slur_height (width, h_inf, r_0);
@@ -117,7 +117,7 @@ slur_shape (Real width, Real h_inf, Real r_0)
   Real height;
 
   get_slur_indent_height (&indent, &height,
-                         width, h_inf, r_0);
+                          width, h_inf, r_0);
 
   Bezier curve;
   curve.control_[0] = Offset (0, 0);
index e15b04827abd3ba39aa09fe2b1ee4eaea35524b9..f230d1057d49b0ddb608f87af9d65b9eedbadc70 100644 (file)
@@ -21,7 +21,8 @@
 #include "warn.hh"
 #include "libc-extension.hh"
 
-Real binomial_coefficient_3[] = {
+Real binomial_coefficient_3[] =
+{
   1, 3, 3, 1
 };
 
@@ -62,7 +63,7 @@ translate (vector<Offset> *array, Offset o)
 Real
 Bezier::get_other_coordinate (Axis a, Real x) const
 {
-  Axis other = Axis ((a +1) % NO_AXES);
+  Axis other = Axis ((a + 1) % NO_AXES);
   vector<Real> ts = solve_point (a, x);
 
   if (ts.size () == 0)
@@ -93,7 +94,7 @@ Bezier::curve_coordinate (Real t, Axis a) const
   for (int j = 0; j < 4; j++)
     {
       r += control_[j][a] * binomial_coefficient_3[j]
-       * tj * one_min_tj[3 - j];
+           * tj * one_min_tj[3 - j];
 
       tj *= t;
     }
@@ -114,7 +115,7 @@ Bezier::curve_point (Real t) const
   for (int j = 0; j < 4; j++)
     {
       o += control_[j] * binomial_coefficient_3[j]
-       * tj * one_min_tj[3 - j];
+           * tj * one_min_tj[3 - j];
 
       tj *= t;
     }
@@ -130,15 +131,16 @@ Bezier::curve_point (Real t) const
 /*
   Cache binom (3, j) t^j (1-t)^{3-j}
 */
-struct Polynomial_cache {
+struct Polynomial_cache
+{
   Polynomial terms_[4];
   Polynomial_cache ()
   {
     for (int j = 0; j <= 3; j++)
       terms_[j]
-       = binomial_coefficient_3[j]
-       * Polynomial::power (j, Polynomial (0, 1))
-       * Polynomial::power (3 - j, Polynomial (1, -1));
+        = binomial_coefficient_3[j]
+          * Polynomial::power (j, Polynomial (0, 1))
+          * Polynomial::power (3 - j, Polynomial (1, -1));
   }
 };
 
@@ -206,7 +208,7 @@ Bezier::solve_point (Axis ax, Real coordinate) const
 Interval
 Bezier::extent (Axis a) const
 {
-  int o = (a + 1)%NO_AXES;
+  int o = (a + 1) % NO_AXES;
   Offset d;
   d[Axis (o)] = 1.0;
   Interval iv;
@@ -228,10 +230,9 @@ Bezier::control_point_extent (Axis a) const
   for (int i = CONTROL_COUNT; i--;)
     ext.add_point (control_[i][a]);
 
-  return ext;      
+  return ext;
 }
 
-
 /**
    Flip around axis A
 */
@@ -265,7 +266,7 @@ Bezier::assert_sanity () const
 {
   for (int i = 0; i < CONTROL_COUNT; i++)
     assert (!isnan (control_[i].length ())
-           && !isinf (control_[i].length ()));
+            && !isinf (control_[i].length ()));
 }
 
 void
@@ -277,7 +278,6 @@ Bezier::reverse ()
   *this = b2;
 }
 
-
 /*
   Subdivide a bezier at T into LEFT_PART and RIGHT_PART
   using deCasteljau's algorithm.
@@ -287,15 +287,15 @@ Bezier::subdivide (Real t, Bezier *left_part, Bezier *right_part) const
 {
   Offset p[CONTROL_COUNT][CONTROL_COUNT];
 
-  for (int i = 0; i < CONTROL_COUNT ; i++)
+  for (int i = 0; i < CONTROL_COUNT; i++)
     p[i][CONTROL_COUNT - 1 ] = control_[i];
-  for (int j = CONTROL_COUNT - 2; j >= 0 ; j--)
-  for (int i = 0; i < CONTROL_COUNT -1; i++)
-    p[i][j] = p[i][j+1] + t * (p[i+1][j+1] - p[i][j+1]);
+  for (int j = CONTROL_COUNT - 2; j >= 0; j--)
+    for (int i = 0; i < CONTROL_COUNT - 1; i++)
+      p[i][j] = p[i][j + 1] + t * (p[i + 1][j + 1] - p[i][j + 1]);
   for (int i = 0; i < CONTROL_COUNT; i++)
     {
-      left_part->control_[i]=p[0][CONTROL_COUNT - 1 - i];
-      right_part->control_[i]=p[i][i];
+      left_part->control_[i] = p[0][CONTROL_COUNT - 1 - i];
+      right_part->control_[i] = p[i][i];
     }
 }
 
@@ -308,20 +308,20 @@ Bezier::extract (Real t_min, Real t_max) const
 {
   if ((t_min < 0) || (t_max) > 1)
     programming_error
-      ("bezier extract arguments outside of limits: curve may have bad shape");
+    ("bezier extract arguments outside of limits: curve may have bad shape");
   if (t_min >= t_max)
-    programming_error 
-      ("lower bezier extract value not less than upper value: curve may have bad shape");
+    programming_error
+    ("lower bezier extract value not less than upper value: curve may have bad shape");
   Bezier bez1, bez2, bez3, bez4;
   if (t_min == 0.0)
     bez2 = *this;
   else
-      subdivide (t_min, &bez1, &bez2);
+    subdivide (t_min, &bez1, &bez2);
   if (t_max == 1.0)
-      return bez2;
+    return bez2;
   else
-   {
-     bez2.subdivide ((t_max-t_min)/(1-t_min), &bez3, &bez4);
-     return bez3;
-  }
+    {
+      bez2.subdivide ((t_max - t_min) / (1 - t_min), &bez3, &bez4);
+      return bez3;
+    }
 }
index 339e2c282930e6c2c892c7c54f776844af354f35..0fe4322c35f418a53c4c13b564eb85098df072ce 100644 (file)
@@ -25,9 +25,9 @@
 #include "ly-module.hh"
 
 LY_DEFINE (ly_make_book, "ly:make-book",
-          2, 0, 1, (SCM paper, SCM header, SCM scores),
-          "Make a @code{\\book} of @var{paper} and @var{header}"
-          " (which may be @code{#f} as well) containing @code{\\scores}.")
+           2, 0, 1, (SCM paper, SCM header, SCM scores),
+           "Make a @code{\\book} of @var{paper} and @var{header}"
+           " (which may be @code{#f} as well) containing @code{\\scores}.")
 {
   Output_def *odef = unsmob_output_def (paper);
   LY_ASSERT_SMOB (Output_def, paper, 1);
@@ -46,8 +46,8 @@ LY_DEFINE (ly_make_book, "ly:make-book",
 }
 
 LY_DEFINE (ly_make_book_part, "ly:make-book-part",
-          1, 0, 0, (SCM scores),
-          "Make a @code{\\bookpart} containing @code{\\scores}.")
+           1, 0, 0, (SCM scores),
+           "Make a @code{\\bookpart} containing @code{\\scores}.")
 {
   Book *book = new Book;
   book->scores_ = scm_append (scm_list_2 (scores, book->scores_));
@@ -58,13 +58,13 @@ LY_DEFINE (ly_make_book_part, "ly:make-book-part",
 }
 
 LY_DEFINE (ly_book_process, "ly:book-process",
-          4, 0, 0, (SCM book_smob,
-                    SCM default_paper,
-                    SCM default_layout,
-                    SCM output),
-          "Print book.  @var{output} is passed to the backend unchanged."
-          "  For example, it may be a string (for file based outputs)"
-          " or a socket (for network based output).")
+           4, 0, 0, (SCM book_smob,
+                     SCM default_paper,
+                     SCM default_layout,
+                     SCM output),
+           "Print book.  @var{output} is passed to the backend unchanged."
+           "  For example, it may be a string (for file based outputs)"
+           " or a socket (for network based output).")
 {
   Book *book = unsmob_book (book_smob);
 
@@ -73,7 +73,7 @@ LY_DEFINE (ly_book_process, "ly:book-process",
   LY_ASSERT_SMOB (Output_def, default_layout, 3);
 
   Paper_book *pb = book->process (unsmob_output_def (default_paper),
-                                 unsmob_output_def (default_layout));
+                                  unsmob_output_def (default_layout));
   if (pb)
     {
       pb->output (output);
@@ -83,24 +83,23 @@ LY_DEFINE (ly_book_process, "ly:book-process",
   return SCM_UNSPECIFIED;
 }
 
-
 LY_DEFINE (ly_book_process_to_systems, "ly:book-process-to-systems",
-          4, 0, 0, (SCM book_smob,
-                    SCM default_paper,
-                    SCM default_layout,
-                    SCM output),
-          "Print book.  @var{output} is passed to the backend unchanged."
-          "  For example, it may be a string (for file based outputs)"
-          " or a socket (for network based output).")
+           4, 0, 0, (SCM book_smob,
+                     SCM default_paper,
+                     SCM default_layout,
+                     SCM output),
+           "Print book.  @var{output} is passed to the backend unchanged."
+           "  For example, it may be a string (for file based outputs)"
+           " or a socket (for network based output).")
 {
   LY_ASSERT_SMOB (Book, book_smob, 1);
   LY_ASSERT_SMOB (Output_def, default_paper, 2);
   LY_ASSERT_SMOB (Output_def, default_layout, 3);
 
-  Book *book = unsmob_book (book_smob); 
+  Book *book = unsmob_book (book_smob);
 
   Paper_book *pb = book->process (unsmob_output_def (default_paper),
-                                 unsmob_output_def (default_layout));
+                                  unsmob_output_def (default_layout));
   if (pb)
     {
       pb->classic_output (output);
@@ -111,28 +110,28 @@ LY_DEFINE (ly_book_process_to_systems, "ly:book-process-to-systems",
 }
 
 LY_DEFINE (ly_book_add_score_x, "ly:book-add-score!",
-          2, 0, 0, (SCM book_smob, SCM score),
-          "Add @var{score} to @var{book-smob} score list.")
+           2, 0, 0, (SCM book_smob, SCM score),
+           "Add @var{score} to @var{book-smob} score list.")
 {
   LY_ASSERT_SMOB (Book, book_smob, 1);
-  Book *book = unsmob_book (book_smob); 
+  Book *book = unsmob_book (book_smob);
   book->add_score (score);
   return SCM_UNSPECIFIED;
 }
 
 LY_DEFINE (ly_book_add_bookpart_x, "ly:book-add-bookpart!",
-          2, 0, 0, (SCM book_smob, SCM book_part),
-          "Add @var{book-part} to @var{book-smob} book part list.")
+           2, 0, 0, (SCM book_smob, SCM book_part),
+           "Add @var{book-part} to @var{book-smob} book part list.")
 {
   LY_ASSERT_SMOB (Book, book_smob, 1);
-  Book *book = unsmob_book (book_smob); 
+  Book *book = unsmob_book (book_smob);
   book->add_bookpart (book_part);
   return SCM_UNSPECIFIED;
 }
 
 LY_DEFINE (ly_book_book_parts, "ly:book-book-parts",
-          1, 0, 0, (SCM book),
-          "Return book parts in @var{book}.")
+           1, 0, 0, (SCM book),
+           "Return book parts in @var{book}.")
 {
   LY_ASSERT_SMOB (Book, book, 1);
   Book *b = unsmob_book (book);
@@ -140,8 +139,8 @@ LY_DEFINE (ly_book_book_parts, "ly:book-book-parts",
 }
 
 LY_DEFINE (ly_book_paper, "ly:book-paper",
-          1, 0, 0, (SCM book),
-          "Return paper in @var{book}.")
+           1, 0, 0, (SCM book),
+           "Return paper in @var{book}.")
 {
   LY_ASSERT_SMOB (Book, book, 1);
   Book *b = unsmob_book (book);
@@ -149,8 +148,8 @@ LY_DEFINE (ly_book_paper, "ly:book-paper",
 }
 
 LY_DEFINE (ly_book_header, "ly:book-header",
-          1, 0, 0, (SCM book),
-          "Return header in @var{book}.")
+           1, 0, 0, (SCM book),
+           "Return header in @var{book}.")
 {
   LY_ASSERT_SMOB (Book, book, 1);
   Book *b = unsmob_book (book);
@@ -158,8 +157,8 @@ LY_DEFINE (ly_book_header, "ly:book-header",
 }
 
 LY_DEFINE (ly_book_scores, "ly:book-scores",
-          1, 0, 0, (SCM book),
-          "Return scores in @var{book}.")
+           1, 0, 0, (SCM book),
+           "Return scores in @var{book}.")
 {
   LY_ASSERT_SMOB (Book, book, 1);
   Book *b = unsmob_book (book);
index e1fdef644dfdca3fe25af5705be47d3050b7420b..5ec33e7b9ac07f2b1ab706cc3bd86d1c8312685c 100644 (file)
@@ -73,14 +73,14 @@ Book::Book (Book const &s)
       SCM entry = scm_car (p);
 
       if (Score *newscore = unsmob_score (entry))
-       *t = scm_cons (newscore->clone ()->unprotect (), SCM_EOL);
+        * t = scm_cons (newscore->clone ()->unprotect (), SCM_EOL);
       else if (Page_marker *marker = unsmob_page_marker (entry))
-       *t = scm_cons (marker->clone ()->unprotect (), SCM_EOL);
+        * t = scm_cons (marker->clone ()->unprotect (), SCM_EOL);
       else
-       {
-         /* This entry is a markup list */
-         *t = scm_cons (entry, SCM_EOL);
-       }
+        {
+          /* This entry is a markup list */
+          *t = scm_cons (entry, SCM_EOL);
+        }
       t = SCM_CDRLOC (*t);
     }
 
@@ -123,7 +123,7 @@ Book::mark_smob (SCM s)
 }
 
 int
-Book::print_smob (SCM, SCM p, scm_print_state*)
+Book::print_smob (SCM, SCM p, scm_print_state *)
 {
   scm_puts ("#<Book>", p);
   return 1;
@@ -190,19 +190,19 @@ Book::error_found ()
   for (SCM s = scores_; scm_is_pair (s); s = scm_cdr (s))
     if (Score *score = unsmob_score (scm_car (s)))
       if (score->error_found_)
-       return true;
+        return true;
 
   for (SCM part = bookparts_; scm_is_pair (part); part = scm_cdr (part))
     if (Book *bookpart = unsmob_book (scm_car (part)))
       if (bookpart->error_found ())
-       return true;
+        return true;
 
   return false;
 }
 
 Paper_book *
 Book::process (Output_def *default_paper,
-              Output_def *default_layout)
+               Output_def *default_layout)
 {
   return process (default_paper, default_layout, 0);
 }
@@ -217,10 +217,10 @@ Book::process_bookparts (Paper_book *output_paper_book, Output_def *paper, Outpu
         {
           Paper_book *paper_book_part = book->process (paper, layout, output_paper_book);
           if (paper_book_part)
-           {
-             output_paper_book->add_bookpart (paper_book_part->self_scm ());
-             paper_book_part->unprotect ();
-           }
+            {
+              output_paper_book->add_bookpart (paper_book_part->self_scm ());
+              paper_book_part->unprotect ();
+            }
         }
     }
   /* In a Paper_book, bookparts are stored in straight order */
@@ -233,26 +233,26 @@ Book::process_score (SCM s, Paper_book *output_paper_book, Output_def *layout)
   if (Score *score = unsmob_score (scm_car (s)))
     {
       SCM outputs = score
-       ->book_rendering (output_paper_book->paper_, layout);
+                    ->book_rendering (output_paper_book->paper_, layout);
 
       while (scm_is_pair (outputs))
-       {
-         Music_output *output = unsmob_music_output (scm_car (outputs));
-
-         if (Performance *perf = dynamic_cast<Performance *> (output))
-           output_paper_book->add_performance (perf->self_scm ());
-         else if (Paper_score *pscore = dynamic_cast<Paper_score *> (output))
-           {
-             if (ly_is_module (score->get_header ()))
-               output_paper_book->add_score (score->get_header ());
-             output_paper_book->add_score (pscore->self_scm ());
-           }
-
-         outputs = scm_cdr (outputs);
-       }
+        {
+          Music_output *output = unsmob_music_output (scm_car (outputs));
+
+          if (Performance *perf = dynamic_cast<Performance *> (output))
+            output_paper_book->add_performance (perf->self_scm ());
+          else if (Paper_score *pscore = dynamic_cast<Paper_score *> (output))
+            {
+              if (ly_is_module (score->get_header ()))
+                output_paper_book->add_score (score->get_header ());
+              output_paper_book->add_score (pscore->self_scm ());
+            }
+
+          outputs = scm_cdr (outputs);
+        }
     }
   else if (Text_interface::is_markup_list (scm_car (s))
-          || unsmob_page_marker (scm_car (s)))
+           || unsmob_page_marker (scm_car (s)))
     output_paper_book->add_score (scm_car (s));
   else
     assert (0);
@@ -263,8 +263,8 @@ Book::process_score (SCM s, Paper_book *output_paper_book, Output_def *layout)
  */
 Paper_book *
 Book::process (Output_def *default_paper,
-              Output_def *default_layout,
-              Paper_book *parent_part)
+               Output_def *default_layout,
+               Paper_book *parent_part)
 {
   Output_def *paper = paper_ ? paper_ : default_paper;
 
index 6b6088bf19f9fae2ecd7b6319a28e8d7e8a943b0..648c7f7da216d0dc3c05d719e054373f38ac48a0 100644 (file)
@@ -80,7 +80,7 @@ Offset
 Box::center () const
 {
   return Offset (interval_a_[X_AXIS].center (),
-                interval_a_[Y_AXIS].center ());
+                 interval_a_[Y_AXIS].center ());
 }
 
 void
@@ -105,7 +105,7 @@ Box::mark_smob (SCM /* x */)
 }
 
 int
-Box::print_smob (SCM /* x */, SCM p, scm_print_state*)
+Box::print_smob (SCM /* x */, SCM p, scm_print_state *)
 {
   scm_puts ("#<Box>", p);
   return 1;
index 76d6e891f6aa45979e398bb82fbccca2836c4d0a..3004b53393ee5584a772329d6d74583bf1cb377f 100644 (file)
@@ -91,20 +91,20 @@ Break_align_engraver::acknowledge_break_aligned (Grob_info inf)
   if (Item *item = dynamic_cast<Item *> (inf.grob ()))
     {
       /*
-       Removed check for item->empty (X_AXIS). --hwn 20/1/04
+        Removed check for item->empty (X_AXIS). --hwn 20/1/04
       */
       if (item->get_parent (X_AXIS))
-       return;
+        return;
 
       if (!Item::is_non_musical (item))
-       return;
+        return;
 
       SCM align_name = item->get_property ("break-align-symbol");
       if (!scm_is_symbol (align_name))
-       return;
+        return;
 
       if (!align_)
-       create_alignment (inf);
+        create_alignment (inf);
 
       add_to_group (align_name, item);
     }
@@ -127,7 +127,7 @@ Break_align_engraver::create_alignment (Grob_info inf)
   */
   left_edge_ = random_source->make_item ("LeftEdge", SCM_EOL);
   add_to_group (left_edge_->get_property ("break-align-symbol"),
-               left_edge_);
+                left_edge_);
 }
 
 void
@@ -158,20 +158,20 @@ Break_align_engraver::add_to_group (SCM align_name, Item *item)
 ADD_ACKNOWLEDGER (Break_align_engraver, break_aligned);
 ADD_ACKNOWLEDGER (Break_align_engraver, break_alignable);
 ADD_TRANSLATOR (Break_align_engraver,
-               /* doc */
-               "Align grobs with corresponding @code{break-align-symbols}"
-               " into groups, and order the groups according to"
-               " @code{breakAlignOrder}.  The left edge of the alignment gets"
-               " a separate group, with a symbol @code{left-edge}.",
-
-               /* create */
-               "BreakAlignment "
-               "BreakAlignGroup "
-               "LeftEdge ",
-
-               /* read */
-               "",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Align grobs with corresponding @code{break-align-symbols}"
+                " into groups, and order the groups according to"
+                " @code{breakAlignOrder}.  The left edge of the alignment gets"
+                " a separate group, with a symbol @code{left-edge}.",
+
+                /* create */
+                "BreakAlignment "
+                "BreakAlignGroup "
+                "LeftEdge ",
+
+                /* read */
+                "",
+
+                /* write */
+                ""
+               );
index 18f0ae84047b9af36eb4b2d3f0611dbb18a37f9e..a471a7ba9fab543184b0108fe5e05abd23b0a03c 100644 (file)
@@ -17,7 +17,6 @@
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include "break-align-interface.hh"
 
 #include "align-interface.hh"
@@ -31,8 +30,6 @@
 #include "side-position-interface.hh"
 #include "warn.hh"
 
-
-
 /*
   This is tricky: we cannot modify 'elements, since callers are
   iterating the same list. Reordering the list in-place, or resetting
@@ -49,43 +46,40 @@ Break_alignment_interface::break_align_order (Item *me)
     return SCM_BOOL_F;
 
   SCM order = scm_vector_ref (order_vec,
-                             scm_from_int (me->break_status_dir () + 1));
-
+                              scm_from_int (me->break_status_dir () + 1));
 
   return order;
 }
 
-  
-vector<Grob*>
+vector<Grob *>
 Break_alignment_interface::ordered_elements (Grob *grob)
 {
   Item *me = dynamic_cast<Item *> (grob);
   extract_grob_set (me, "elements", elts);
 
-
   SCM order = break_align_order (me);
 
   if (order == SCM_BOOL_F)
     return elts;
-  
-  vector<Grob*> writable_elts (elts);
-   /*
-    Copy in order specified in BREAK-ALIGN-ORDER.
+
+  vector<Grob *> writable_elts (elts);
+  /*
+   Copy in order specified in BREAK-ALIGN-ORDER.
   */
-  vector<Grob*> new_elts;
+  vector<Grob *> new_elts;
   for (; scm_is_pair (order); order = scm_cdr (order))
     {
       SCM sym = scm_car (order);
 
       for (vsize i = writable_elts.size (); i--;)
-       {
-         Grob *g = writable_elts[i];
-         if (g && sym == g->get_property ("break-align-symbol"))
-           {
-             new_elts.push_back (g);
-             writable_elts.erase (writable_elts.begin () + i);
-           }
-       }
+        {
+          Grob *g = writable_elts[i];
+          if (g && sym == g->get_property ("break-align-symbol"))
+            {
+              new_elts.push_back (g);
+              writable_elts.erase (writable_elts.begin () + i);
+            }
+        }
     }
 
   return new_elts;
@@ -101,13 +95,12 @@ MAKE_SCHEME_CALLBACK (Break_alignment_interface, calc_positioning_done, 1)
 SCM
 Break_alignment_interface::calc_positioning_done (SCM smob)
 {
-  Grob *grob = unsmob_grob (smob);  
+  Grob *grob = unsmob_grob (smob);
   Item *me = dynamic_cast<Item *> (grob);
 
-
   me->set_property ("positioning-done", SCM_BOOL_T);
 
-  vector<Grob*> elems = ordered_elements (me);
+  vector<Grob *> elems = ordered_elements (me);
   vector<Interval> extents;
 
   int last_nonempty = -1;
@@ -116,7 +109,7 @@ Break_alignment_interface::calc_positioning_done (SCM smob)
       Interval y = elems[i]->extent (elems[i], X_AXIS);
       extents.push_back (y);
       if (!y.is_empty ())
-       last_nonempty = i;
+        last_nonempty = i;
     }
 
   vsize idx = 0;
@@ -125,7 +118,7 @@ Break_alignment_interface::calc_positioning_done (SCM smob)
 
   vector<Real> offsets;
   offsets.resize (elems.size ());
-  for (vsize i = 0; i < offsets.size ();i++)
+  for (vsize i = 0; i < offsets.size (); i++)
     offsets[i] = 0.0;
 
   Real extra_right_space = 0.0;
@@ -134,106 +127,106 @@ Break_alignment_interface::calc_positioning_done (SCM smob)
     {
       vsize next_idx = idx + 1;
       while (next_idx < elems.size ()
-            && extents[next_idx].is_empty ())
-       next_idx++;
+             && extents[next_idx].is_empty ())
+        next_idx++;
 
       Grob *l = elems[idx];
       Grob *r = 0;
 
       if (next_idx < elems.size ())
-       r = elems[next_idx];
+        r = elems[next_idx];
 
       SCM alist = SCM_EOL;
 
       /*
-       Find the first grob with a space-alist entry.
+        Find the first grob with a space-alist entry.
       */
       extract_grob_set (l, "elements", elts);
 
       for (vsize i = elts.size (); i--;)
-       {
-         Grob *elt = elts[i];
-
-         if (edge_idx == VPOS
-             && (elt->get_property ("break-align-symbol")
-                 == ly_symbol2scm ("left-edge")))
-           edge_idx = idx;
-
-         SCM l = elt->get_property ("space-alist");
-         if (scm_is_pair (l))
-           {
-             alist = l;
-             break;
-           }
-       }
+        {
+          Grob *elt = elts[i];
+
+          if (edge_idx == VPOS
+              && (elt->get_property ("break-align-symbol")
+                  == ly_symbol2scm ("left-edge")))
+            edge_idx = idx;
+
+          SCM l = elt->get_property ("space-alist");
+          if (scm_is_pair (l))
+            {
+              alist = l;
+              break;
+            }
+        }
 
       SCM rsym = r ? SCM_EOL : ly_symbol2scm ("right-edge");
 
       /*
-       We used to use #'cause to find out the symbol and the spacing
-       table, but that gets icky when that grob is suicided for some
-       reason.
+        We used to use #'cause to find out the symbol and the spacing
+        table, but that gets icky when that grob is suicided for some
+        reason.
       */
       if (r)
-       {
-         extract_grob_set (r, "elements", elts);
-         for (vsize i = elts.size ();
-              !scm_is_symbol (rsym) && i--;)
-           {
-             Grob *elt = elts[i];
-             rsym = elt->get_property ("break-align-symbol");
-           }
-       }
+        {
+          extract_grob_set (r, "elements", elts);
+          for (vsize i = elts.size ();
+               !scm_is_symbol (rsym) && i--;)
+            {
+              Grob *elt = elts[i];
+              rsym = elt->get_property ("break-align-symbol");
+            }
+        }
 
       if (rsym == ly_symbol2scm ("left-edge"))
-       edge_idx = next_idx;
+        edge_idx = next_idx;
 
       SCM entry = SCM_EOL;
       if (scm_is_symbol (rsym))
-       entry = scm_assq (rsym, alist);
+        entry = scm_assq (rsym, alist);
 
       bool entry_found = scm_is_pair (entry);
       if (!entry_found)
-       {
-         string sym_string;
-         if (scm_is_symbol (rsym))
-           sym_string = ly_symbol2string (rsym);
+        {
+          string sym_string;
+          if (scm_is_symbol (rsym))
+            sym_string = ly_symbol2string (rsym);
 
-         string orig_string;
-         if (unsmob_grob (l->get_property ("cause")))
-           orig_string = unsmob_grob (l->get_property ("cause"))->name ();
+          string orig_string;
+          if (unsmob_grob (l->get_property ("cause")))
+            orig_string = unsmob_grob (l->get_property ("cause"))->name ();
 
-         programming_error (_f ("No spacing entry from %s to `%s'",
-                                orig_string.c_str (),
-                                sym_string.c_str ()));
-       }
+          programming_error (_f ("No spacing entry from %s to `%s'",
+                                 orig_string.c_str (),
+                                 sym_string.c_str ()));
+        }
 
       Real distance = 1.0;
       SCM type = ly_symbol2scm ("extra-space");
 
       if (entry_found)
-       {
-         entry = scm_cdr (entry);
+        {
+          entry = scm_cdr (entry);
 
-         distance = scm_to_double (scm_cdr (entry));
-         type = scm_car (entry);
-       }
+          distance = scm_to_double (scm_cdr (entry));
+          type = scm_car (entry);
+        }
 
       if (r)
-       {
-         if (type == ly_symbol2scm ("extra-space"))
-           offsets[next_idx] = extents[idx][RIGHT] + distance
-             - extents[next_idx][LEFT];
-         /* should probably junk minimum-space */
-         else if (type == ly_symbol2scm ("minimum-space"))
-           offsets[next_idx] = max (extents[idx][RIGHT], distance);
-       }
+        {
+          if (type == ly_symbol2scm ("extra-space"))
+            offsets[next_idx] = extents[idx][RIGHT] + distance
+                                - extents[next_idx][LEFT];
+          /* should probably junk minimum-space */
+          else if (type == ly_symbol2scm ("minimum-space"))
+            offsets[next_idx] = max (extents[idx][RIGHT], distance);
+        }
       else
-       {
-         extra_right_space = distance;
-         if (idx + 1 < offsets.size ())
-           offsets[idx+1] = extents[idx][RIGHT] + distance;
-       }
+        {
+          extra_right_space = distance;
+          if (idx + 1 < offsets.size ())
+            offsets[idx + 1] = extents[idx][RIGHT] + distance;
+        }
 
       idx = next_idx;
     }
@@ -246,7 +239,7 @@ Break_alignment_interface::calc_positioning_done (SCM smob)
     {
       here += offsets[i];
       if (i == edge_idx)
-       alignment_off = -here;
+        alignment_off = -here;
       total_extent.unite (extents[i] + here);
     }
 
@@ -268,40 +261,38 @@ Break_alignment_interface::calc_positioning_done (SCM smob)
   return SCM_BOOL_T;
 }
 
-
-
 MAKE_SCHEME_CALLBACK (Break_alignable_interface, self_align_callback, 1)
 SCM
 Break_alignable_interface::self_align_callback (SCM grob)
 {
   Grob *me = unsmob_grob (grob);
-  Item *alignment = dynamic_cast<Item*> (me->get_parent (X_AXIS));
+  Item *alignment = dynamic_cast<Item *> (me->get_parent (X_AXIS));
   if (!Break_alignment_interface::has_interface (alignment))
     return scm_from_int (0);
 
   SCM symbol_list = me->get_property ("break-align-symbols");
-  vector<Grob*> elements = Break_alignment_interface::ordered_elements (alignment);
+  vector<Grob *> elements = Break_alignment_interface::ordered_elements (alignment);
   if (elements.size () == 0)
     return scm_from_int (0);
-  
+
   int break_aligned_grob = -1;
   for (; scm_is_pair (symbol_list); symbol_list = scm_cdr (symbol_list))
     {
       SCM sym = scm_car (symbol_list);
       for (vsize i = 0; i < elements.size (); i++)
-       {
-         if (elements[i]->get_property ("break-align-symbol") == sym)
-           {
-             if (Item::break_visible (elements[i])
-                 && !elements[i]->extent (elements[i], X_AXIS).is_empty ())
-               {
-                 break_aligned_grob = i;
-                 goto found_break_aligned_grob; /* ugh. need to break out of 2 loops */
-               }
-             else if (break_aligned_grob == -1)
-               break_aligned_grob = i;
-           }
-       }
+        {
+          if (elements[i]->get_property ("break-align-symbol") == sym)
+            {
+              if (Item::break_visible (elements[i])
+                  && !elements[i]->extent (elements[i], X_AXIS).is_empty ())
+                {
+                  break_aligned_grob = i;
+                  goto found_break_aligned_grob; /* ugh. need to break out of 2 loops */
+                }
+              else if (break_aligned_grob == -1)
+                break_aligned_grob = i;
+            }
+        }
     }
 
 found_break_aligned_grob:
@@ -313,8 +304,8 @@ found_break_aligned_grob:
   Real anchor = robust_scm2double (alignment_parent->get_property ("break-align-anchor"), 0);
 
   return scm_from_double (alignment_parent->relative_coordinate (common, X_AXIS)
-                         - me->relative_coordinate (common, X_AXIS)
-                         + anchor);
+                          - me->relative_coordinate (common, X_AXIS)
+                          + anchor);
 }
 
 MAKE_SCHEME_CALLBACK (Break_aligned_interface, calc_average_anchor, 1)
@@ -331,10 +322,10 @@ Break_aligned_interface::calc_average_anchor (SCM grob)
     {
       SCM anchor = elts[i]->get_property ("break-align-anchor");
       if (scm_is_number (anchor))
-       {
-         count++;
-         avg += scm_to_double (anchor);
-       }
+        {
+          count++;
+          avg += scm_to_double (anchor);
+        }
     }
 
   return scm_from_double (count > 0 ? avg / count : 0);
@@ -366,63 +357,63 @@ Break_aligned_interface::calc_break_visibility (SCM smob)
     {
       bool visible = false;
       for (vsize i = 0; i < elts.size (); i++)
-       {
-         SCM vis = elts[i]->get_property ("break-visibility");
-         if (scm_is_vector (vis) && to_boolean (scm_c_vector_ref (vis, dir)))
-           visible = true;
-       }
+        {
+          SCM vis = elts[i]->get_property ("break-visibility");
+          if (scm_is_vector (vis) && to_boolean (scm_c_vector_ref (vis, dir)))
+            visible = true;
+        }
       scm_c_vector_set_x (ret, dir, scm_from_bool (visible));
     }
   return ret;
 }
 
 ADD_INTERFACE (Break_alignable_interface,
-              "Object that is aligned on a break alignment.",
+               "Object that is aligned on a break alignment.",
 
-              /* properties */
-              "break-align-symbols "
-              "non-break-align-symbols "
-              );
+               /* properties */
+               "break-align-symbols "
+               "non-break-align-symbols "
+              );
 
 ADD_INTERFACE (Break_aligned_interface,
-              "Items that are aligned in prefatory matter.\n"
-              "\n"
-              "The spacing of these items is controlled by the"
-              " @code{space-alist} property.  It contains a list"
-              " @code{break-align-symbol}s with a specification of the"
-              " associated space.  The space specification can be\n"
-              "\n"
-              "@table @code\n"
-              "@item (minimum-space . @var{spc}))\n"
-              "Pad space until the distance is @var{spc}.\n"
-              "@item (fixed-space . @var{spc})\n"
-              "Set a fixed space.\n"
-              "@item (semi-fixed-space . @var{spc})\n"
-              "Set a space.  Half of it is fixed and half is stretchable."
-              " (does not work at start of line. fixme)\n"
-              "@item (extra-space . @var{spc})\n"
-              "Add @var{spc} amount of space.\n"
-              "@end table\n"
-              "\n"
-              "Special keys for the alist are @code{first-note} and"
-              " @code{next-note}, signifying the first note on a line, and"
-              " the next note halfway a line.\n"
-              "\n"
-              "Rules for this spacing are much more complicated than this."
-              "  See [Wanske] page 126--134, [Ross] page 143--147.",
-
-              /* properties */ 
-              "break-align-anchor "
-              "break-align-anchor-alignment "
-              "break-align-symbol "
-              "space-alist "
-              );
+               "Items that are aligned in prefatory matter.\n"
+               "\n"
+               "The spacing of these items is controlled by the"
+               " @code{space-alist} property.  It contains a list"
+               " @code{break-align-symbol}s with a specification of the"
+               " associated space.  The space specification can be\n"
+               "\n"
+               "@table @code\n"
+               "@item (minimum-space . @var{spc}))\n"
+               "Pad space until the distance is @var{spc}.\n"
+               "@item (fixed-space . @var{spc})\n"
+               "Set a fixed space.\n"
+               "@item (semi-fixed-space . @var{spc})\n"
+               "Set a space.  Half of it is fixed and half is stretchable."
+               " (does not work at start of line. fixme)\n"
+               "@item (extra-space . @var{spc})\n"
+               "Add @var{spc} amount of space.\n"
+               "@end table\n"
+               "\n"
+               "Special keys for the alist are @code{first-note} and"
+               " @code{next-note}, signifying the first note on a line, and"
+               " the next note halfway a line.\n"
+               "\n"
+               "Rules for this spacing are much more complicated than this."
+               "  See [Wanske] page 126--134, [Ross] page 143--147.",
+
+               /* properties */
+               "break-align-anchor "
+               "break-align-anchor-alignment "
+               "break-align-symbol "
+               "space-alist "
+              );
 
 ADD_INTERFACE (Break_alignment_interface,
-              "The object that performs break alignment.  See"
-              " @ref{break-aligned-interface}.",
+               "The object that performs break alignment.  See"
+               " @ref{break-aligned-interface}.",
 
-              /* properties */
-              "positioning-done "
-              "break-align-orders "
-              );
+               /* properties */
+               "positioning-done "
+               "break-align-orders "
+              );
index 2cd29707d611a1d60c704d0c9615eaa7a73af35c..74314b39c03f71961b00fecddb41759ad6386667 100644 (file)
@@ -43,39 +43,39 @@ substitute_grob (Grob *sc)
       Item *i = dynamic_cast<Item *> (sc);
       Direction d = to_dir (break_criterion);
       if (i && i->break_status_dir () != d)
-       {
-         Item *br = i->find_prebroken_piece (d);
-         return br;
-       }
+        {
+          Item *br = i->find_prebroken_piece (d);
+          return br;
+        }
     }
   else
     {
       System *line
-       = dynamic_cast<System *> (unsmob_grob (break_criterion));
+        = dynamic_cast<System *> (unsmob_grob (break_criterion));
       if (sc->get_system () != line)
-       sc = sc->find_broken_piece (line);
+        sc = sc->find_broken_piece (line);
 
       /* now: !sc || (sc && sc->get_system () == line) */
       if (!sc)
-       return 0;
+        return 0;
 
       /* now: sc && sc->get_system () == line */
       if (!line)
-       return sc;
+        return sc;
 
       /*
-       We don't return SCM_UNDEFINED for
-       suicided grobs, for two reasons
+        We don't return SCM_UNDEFINED for
+        suicided grobs, for two reasons
 
-       - it doesn't work (strange disappearing objects)
+        - it doesn't work (strange disappearing objects)
 
-       - it forces us to mark the parents of a grob, leading to
-       a huge recursion in the GC routine.
+        - it forces us to mark the parents of a grob, leading to
+        a huge recursion in the GC routine.
       */
 
       if (sc->common_refpoint (line, X_AXIS)
-         && sc->common_refpoint (line, Y_AXIS))
-       return sc;
+          && sc->common_refpoint (line, Y_AXIS))
+        return sc;
       return 0;
     }
 
@@ -99,7 +99,7 @@ substitute_grob (Grob *sc)
 SCM
 do_break_substitution (SCM src)
 {
- again:
+again:
 
   if (unsmob_grob (src))
     {
@@ -111,33 +111,33 @@ do_break_substitution (SCM src)
       int len = scm_c_vector_length (src);
       SCM nv = scm_c_make_vector (len, SCM_UNDEFINED);
       for (int i = 0; i < len; i++)
-       {
-         SCM si = scm_from_int (i);
-         scm_vector_set_x (nv, si,
-                           do_break_substitution (scm_vector_ref (src, si)));
-       }
+        {
+          SCM si = scm_from_int (i);
+          scm_vector_set_x (nv, si,
+                            do_break_substitution (scm_vector_ref (src, si)));
+        }
     }
   else if (scm_is_pair (src))
     {
       /*
-       UGH! breaks on circular lists.
+        UGH! breaks on circular lists.
       */
       SCM newcar = do_break_substitution (scm_car (src));
       SCM oldcdr = scm_cdr (src);
 
       if (newcar == SCM_UNDEFINED
-         && (scm_is_pair (oldcdr) || oldcdr == SCM_EOL))
-       {
-         /*
-           This is tail-recursion, ie.
+          && (scm_is_pair (oldcdr) || oldcdr == SCM_EOL))
+        {
+          /*
+            This is tail-recursion, ie.
 
-           return do_break_substution (cdr);
+            return do_break_substution (cdr);
 
-           We don't want to rely on the compiler to do this.  Without
-           tail-recursion, this easily crashes with a stack overflow.  */
-         src = oldcdr;
-         goto again;
-       }
+            We don't want to rely on the compiler to do this.  Without
+            tail-recursion, this easily crashes with a stack overflow.  */
+          src = oldcdr;
+          goto again;
+        }
 
       return scm_cons (newcar, do_break_substitution (oldcdr));
     }
@@ -150,14 +150,14 @@ do_break_substitution (SCM src)
 /*
   Perform substitution on GROB_LIST using a constant amount of stack.
 */
-vector<Grob*> temporary_substition_array;
+vector<Grob *> temporary_substition_array;
 void
 substitute_grob_array (Grob_array *grob_arr, Grob_array *new_arr)
 {
-  vector<Grob*> &old_grobs (grob_arr->array_reference ());
-  vector<Grob*> *new_grobs (new_arr == grob_arr
-                              ? & temporary_substition_array
-                              : &new_arr->array_reference ());
+  vector<Grob *> &old_grobs (grob_arr->array_reference ());
+  vector<Grob *> *new_grobs (new_arr == grob_arr
+                             ? & temporary_substition_array
+                             : &new_arr->array_reference ());
 
   new_grobs->resize (old_grobs.size ());
   Grob **array = (Grob **) new_grobs->data ();
@@ -167,7 +167,7 @@ substitute_grob_array (Grob_array *grob_arr, Grob_array *new_arr)
       Grob *orig = old_grobs[i];
       Grob *new_grob = substitute_grob (orig);
       if (new_grob)
-       *ptr++ = new_grob;
+        *ptr++ = new_grob;
     }
 
   new_grobs->resize (ptr - array);
@@ -235,8 +235,8 @@ spanner_system_range (Spanner *sp)
   else
     {
       if (sp->broken_intos_.size ())
-       rv = Slice (sp->broken_intos_[0]->get_system ()->get_rank (),
-                   sp->broken_intos_.back ()->get_system ()->get_rank ());
+        rv = Slice (sp->broken_intos_[0]->get_system ()->get_rank (),
+                    sp->broken_intos_.back ()->get_system ()->get_rank ());
     }
   return rv;
 }
@@ -253,7 +253,7 @@ item_system_range (Item *it)
     {
       Item *bi = it->find_prebroken_piece (d);
       if (bi && bi->get_system ())
-       sr.add_point (bi->get_system ()->get_rank ());
+        sr.add_point (bi->get_system ()->get_rank ());
     }
   while (flip (&d) != LEFT);
 
@@ -287,16 +287,16 @@ struct Substitution_entry
     */
     if (sr.is_empty ())
       {
-       /*
-         overflow if we don't treat this specially.
-       */
-       left_ = 1;
-       right_ = -1;
+        /*
+          overflow if we don't treat this specially.
+        */
+        left_ = 1;
+        right_ = -1;
       }
     else
       {
-       left_ = (short) sr[LEFT];
-       right_ = (short) sr[RIGHT];
+        left_ = (short) sr[LEFT];
+        right_ = (short) sr[RIGHT];
       }
   }
   Substitution_entry ()
@@ -310,20 +310,20 @@ struct Substitution_entry
   item_compare (void const *a, void const *b)
   {
     return ((Substitution_entry *)a)->left_
-      - ((Substitution_entry *)b)->left_;
+           - ((Substitution_entry *)b)->left_;
   }
 
   static int
   spanner_compare (void const *a, void const *b)
   {
     return ((Substitution_entry *)a)->length ()
-      - ((Substitution_entry *)b)->length ();
+           - ((Substitution_entry *)b)->length ();
   }
 };
 
 bool
 Spanner::fast_substitute_grob_array (SCM sym,
-                                    Grob_array *grob_array)
+                                     Grob_array *grob_array)
 {
   int len = grob_array->size ();
 
@@ -361,15 +361,15 @@ Spanner::fast_substitute_grob_array (SCM sym,
 
       int idx = 0;
       if (dynamic_cast<Spanner *> (g))
-       idx = --spanner_index;
+        idx = --spanner_index;
       else if (dynamic_cast<Item *> (g))
-       idx = item_index++;
+        idx = item_index++;
 
       vec[idx].set (g, sr);
     }
 
   qsort (vec, item_index,
-        sizeof (Substitution_entry), &Substitution_entry::item_compare);
+         sizeof (Substitution_entry), &Substitution_entry::item_compare);
 
   vector<Slice> item_indices;
   vector<Slice> spanner_indices;
@@ -380,14 +380,15 @@ Spanner::fast_substitute_grob_array (SCM sym,
     }
 
   vector<Slice> *arrs[]
-    = {
+  =
+  {
     &item_indices, &spanner_indices
   };
 
-  for (int i = 0; i < item_index;i++)
+  for (int i = 0; i < item_index; i++)
     {
       for (int j = vec[i].left_; j <= vec[i].right_; j++)
-       item_indices[j - system_range[LEFT]].add_point (i);
+        item_indices[j - system_range[LEFT]].add_point (i);
     }
 
   /*
@@ -401,7 +402,7 @@ Spanner::fast_substitute_grob_array (SCM sym,
   assert (item_index <= spanner_index);
 
   assert ((broken_intos_.size () == (vsize)system_range.length () + 1)
-         || (broken_intos_.empty () && system_range.length () == 0));
+          || (broken_intos_.empty () && system_range.length () == 0));
   for (vsize i = 0; i < broken_intos_.size (); i++)
     {
       Grob *sc = broken_intos_[i];
@@ -410,28 +411,28 @@ Spanner::fast_substitute_grob_array (SCM sym,
 
       SCM newval = sc->internal_get_object (sym);
       if (!unsmob_grob_array (newval))
-       {
-         newval = Grob_array::make_array ();
-         sc->set_object (sym, newval);
-       }
+        {
+          newval = Grob_array::make_array ();
+          sc->set_object (sym, newval);
+        }
 
       Grob_array *new_array = unsmob_grob_array (newval);
-      for (int k = 0; k < 2;k++)
-       for (int j = (*arrs[k])[i][LEFT]; j <= (*arrs[k])[i][RIGHT]; j++)
-         {
-           Grob *substituted = substitute_grob (vec[j].grob_);
-           if (substituted)
-             new_array->add (substituted);
-         }
+      for (int k = 0; k < 2; k++)
+        for (int j = (*arrs[k])[i][LEFT]; j <= (*arrs[k])[i][RIGHT]; j++)
+          {
+            Grob *substituted = substitute_grob (vec[j].grob_);
+            if (substituted)
+              new_array->add (substituted);
+          }
 
 #ifdef PARANOIA
       printf ("%d (%d), sp %d (%d)\n",
-             item_indices [i].length (), item_index,
-             spanner_indices[i].length (), len -spanner_index);
+              item_indices [i].length (), item_index,
+              spanner_indices[i].length (), len - spanner_index);
 
       {
-       SCM l1 = substitute_grob_list (grob_list);
-       assert (scm_ilength (l1) == scm_ilength (newval));
+        SCM l1 = substitute_grob_list (grob_list);
+        assert (scm_ilength (l1) == scm_ilength (newval));
       }
 #endif
     }
@@ -463,37 +464,37 @@ substitute_object_alist (SCM alist, SCM dest)
       SCM val = scm_cdar (s);
 
       if (Grob_array *orig = unsmob_grob_array (val))
-       {
-         SCM handle = scm_assq (sym, dest);
-         SCM newval
-           = (scm_is_pair (handle))
-           ? scm_cdr (handle)
-           : Grob_array::make_array ();
-
-         Grob_array *new_arr = unsmob_grob_array (newval);
-
-         substitute_grob_array (orig, new_arr);
-         val = newval;
-       }
+        {
+          SCM handle = scm_assq (sym, dest);
+          SCM newval
+            = (scm_is_pair (handle))
+              ? scm_cdr (handle)
+              : Grob_array::make_array ();
+
+          Grob_array *new_arr = unsmob_grob_array (newval);
+
+          substitute_grob_array (orig, new_arr);
+          val = newval;
+        }
       else
-       val = do_break_substitution (val);
+        val = do_break_substitution (val);
 
       if (val != SCM_UNDEFINED)
-       {
-         /*
-           for ly:grob? properties, SCM_UNDEFINED could leak out
-           through ly:grob-property
-         */
-         *tail = scm_cons (scm_cons (sym, val), SCM_EOL);
-         tail = SCM_CDRLOC (*tail);
-       }
+        {
+          /*
+            for ly:grob? properties, SCM_UNDEFINED could leak out
+            through ly:grob-property
+          */
+          *tail = scm_cons (scm_cons (sym, val), SCM_EOL);
+          tail = SCM_CDRLOC (*tail);
+        }
     }
   return l;
 }
 
 void
 Spanner::substitute_one_mutable_property (SCM sym,
-                                         SCM val)
+                                          SCM val)
 {
   Spanner *s = this;
 
@@ -505,25 +506,25 @@ Spanner::substitute_one_mutable_property (SCM sym,
   if (!fast_done)
     for (vsize i = 0; i < s->broken_intos_.size (); i++)
       {
-       Grob *sc = s->broken_intos_[i];
-       System *l = sc->get_system ();
-       set_break_subsititution (l ? l->self_scm () : SCM_UNDEFINED);
-
-       if (grob_array)
-         {
-           SCM newval = sc->internal_get_object (sym);
-           if (!unsmob_grob_array (newval))
-             {
-               newval = Grob_array::make_array ();
-               sc->set_object (sym, newval);
-             }
-           substitute_grob_array (grob_array, unsmob_grob_array (newval));
-         }
-       else
-         {
-           SCM newval = do_break_substitution (val);
-           sc->set_object (sym, newval);
-         }
+        Grob *sc = s->broken_intos_[i];
+        System *l = sc->get_system ();
+        set_break_subsititution (l ? l->self_scm () : SCM_UNDEFINED);
+
+        if (grob_array)
+          {
+            SCM newval = sc->internal_get_object (sym);
+            if (!unsmob_grob_array (newval))
+              {
+                newval = Grob_array::make_array ();
+                sc->set_object (sym, newval);
+              }
+            substitute_grob_array (grob_array, unsmob_grob_array (newval));
+          }
+        else
+          {
+            SCM newval = do_break_substitution (val);
+            sc->set_object (sym, newval);
+          }
       }
 }
 
index 4e583881c0dd0dccfc941cee563d33606ffa5724..3a74b88d5b0b215ef8e4c2d9b55902104a00816c 100644 (file)
@@ -75,15 +75,15 @@ Breathing_sign_engraver::stop_translation_timestep ()
 }
 
 ADD_TRANSLATOR (Breathing_sign_engraver,
-               /* doc */
-               "Create a breathing sign.",
+                /* doc */
+                "Create a breathing sign.",
 
-               /* create */
-               "BreathingSign ",
+                /* create */
+                "BreathingSign ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index a59bd650703fe2aafc2ea40e58b2e85492c78a6b..85da75c961e1612e779b40d109506091c3b3739c 100644 (file)
@@ -185,8 +185,8 @@ Breathing_sign::offset_callback (SCM smob)
 }
 
 ADD_INTERFACE (Breathing_sign,
-              "A breathing sign.",
+               "A breathing sign.",
 
-              /* properties */
-              "direction "
-              );
+               /* properties */
+               "direction "
+              );
index 04647c111c0aed8f783cf2519daf93be6aed7e1b..4a07d498b53360ae2bfe2db0c592e2bc89d615b8 100644 (file)
@@ -32,14 +32,14 @@ Change_iterator::error (string reason)
   string to_id = ly_scm2string (get_music ()->get_property ("change-to-id"));
 
   string warn1 = _f ("cannot change `%s' to `%s'", to_type, to_id)
-    + ": " + reason;
+                 + ": " + reason;
 
   /*
     GUHG!
   */
-  string warn2= "Change_iterator::process (): "
-    + get_outlet ()->context_name () + " = `"
-    + get_outlet ()->id_string () + "': ";
+  string warn2 = "Change_iterator::process (): "
+                 + get_outlet ()->context_name () + " = `"
+                 + get_outlet ()->id_string () + "': ";
   warning (warn2);
   get_music ()->origin ()->warning (warn1);
 }
@@ -75,31 +75,31 @@ Change_iterator::process (Moment m)
   if (current)
     if (last)
       {
-       Context *dest = 0;
-       Context *where = get_outlet ();
-       while (!dest && where)
-         {
-           dest = find_context_below (where, to_type, to_id);
-           where = where->get_parent_context ();
-         }
-
-       if (dest)
-         {
-           send_stream_event (last, "ChangeParent", get_music ()->origin (),
-                              ly_symbol2scm ("context"), dest->self_scm ());
-         }
-       else
-         /* FIXME: constant error message.  */
-         get_music ()->origin ()->warning (_ ("cannot find context to switch to"));
+        Context *dest = 0;
+        Context *where = get_outlet ();
+        while (!dest && where)
+          {
+            dest = find_context_below (where, to_type, to_id);
+            where = where->get_parent_context ();
+          }
+
+        if (dest)
+          {
+            send_stream_event (last, "ChangeParent", get_music ()->origin (),
+                               ly_symbol2scm ("context"), dest->self_scm ());
+          }
+        else
+          /* FIXME: constant error message.  */
+          get_music ()->origin ()->warning (_ ("cannot find context to switch to"));
       }
     else
       {
-       /* We could change the current translator's id, but that would make
-          errors hard to catch.
+        /* We could change the current translator's id, but that would make
+           errors hard to catch.
 
-          last->translator_id_string () = get_change
-          ()->change_to_id_string (); */
-       error (_f ("not changing to same context type: %s", ly_symbol2string (to_type).c_str ()));
+           last->translator_id_string () = get_change
+           ()->change_to_id_string (); */
+        error (_f ("not changing to same context type: %s", ly_symbol2string (to_type).c_str ()));
       }
   else
     /* FIXME: uncomprehensable message */
index d0ced5a395f836e99fe57970185e26793b52612f..e2281400d01007ac9f14173a51dad0f9c9515b4b 100644 (file)
@@ -44,8 +44,8 @@ protected:
   DECLARE_TRANSLATOR_LISTENER (rest);
 private:
   Item *chord_name_;
-  vector<Stream_event*> notes_;
+  vector<Stream_event *> notes_;
+
   SCM last_chord_;
   Stream_event *rest_event_;
 };
@@ -70,7 +70,7 @@ Chord_name_engraver::Chord_name_engraver ()
 
 void
 Chord_name_engraver::process_music ()
-{ 
+{
   SCM markup;
   SCM bass = SCM_EOL;
   SCM inversion = SCM_EOL;
@@ -84,60 +84,60 @@ Chord_name_engraver::process_music ()
       markup = no_chord_markup;
     }
   else
-    {  
+    {
       if (!notes_.size ())
         return;
 
       Stream_event *inversion_event = 0;
       for (vsize i = 0; i < notes_.size (); i++)
-      {
-        Stream_event *n = notes_[i];
-        SCM p = n->get_property ("pitch");
-        if (!unsmob_pitch (p))
-          continue;
-
-        if (n->get_property ("inversion") == SCM_BOOL_T)
         {
-          inversion_event = n;
-          inversion = p;
+          Stream_event *n = notes_[i];
+          SCM p = n->get_property ("pitch");
+          if (!unsmob_pitch (p))
+            continue;
+
+          if (n->get_property ("inversion") == SCM_BOOL_T)
+            {
+              inversion_event = n;
+              inversion = p;
+            }
+          else if (n->get_property ("bass") == SCM_BOOL_T)
+            bass = p;
+          else
+            pitches = scm_cons (p, pitches);
         }
-        else if (n->get_property ("bass") == SCM_BOOL_T)
-          bass = p;
-        else
-          pitches = scm_cons (p, pitches);
-      }
 
       if (inversion_event)
-      {
-        SCM oct = inversion_event->get_property ("octavation");
-        if (scm_is_number (oct))
         {
-          Pitch *p = unsmob_pitch (inversion_event->get_property ("pitch"));
-          int octavation = scm_to_int (oct);
-          Pitch orig = p->transposed (Pitch (-octavation, 0, 0));
-
-          pitches = scm_cons (orig.smobbed_copy (), pitches);
+          SCM oct = inversion_event->get_property ("octavation");
+          if (scm_is_number (oct))
+            {
+              Pitch *p = unsmob_pitch (inversion_event->get_property ("pitch"));
+              int octavation = scm_to_int (oct);
+              Pitch orig = p->transposed (Pitch (-octavation, 0, 0));
+
+              pitches = scm_cons (orig.smobbed_copy (), pitches);
+            }
+          else
+            programming_error ("inversion does not have original pitch");
         }
-        else
-          programming_error ("inversion does not have original pitch");
-      }
 
       pitches = scm_sort_list (pitches, Pitch::less_p_proc);
 
       SCM name_proc = get_property ("chordNameFunction");
       markup = scm_call_4 (name_proc, pitches, bass, inversion,
-          context ()->self_scm ());
+                           context ()->self_scm ());
     }
   /*
     Ugh.
   */
   SCM chord_as_scm = scm_cons (pitches, scm_cons (bass, inversion));
 
-  chord_name_ = make_item ("ChordName", 
-      rest_event_ ? rest_event_->self_scm () : notes_[0]->self_scm ());
+  chord_name_ = make_item ("ChordName",
+                           rest_event_ ? rest_event_->self_scm () : notes_[0]->self_scm ());
   chord_name_->set_property ("text", markup);
 
-  SCM chord_changes = get_property("chordChanges");
+  SCM chord_changes = get_property ("chordChanges");
   if (to_boolean (chord_changes) && scm_is_pair (last_chord_)
       && ly_is_equal (chord_as_scm, last_chord_))
     chord_name_->set_property ("begin-of-line-visible", SCM_BOOL_T);
@@ -156,9 +156,9 @@ IMPLEMENT_TRANSLATOR_LISTENER (Chord_name_engraver, rest);
 void
 Chord_name_engraver::listen_rest (Stream_event *ev)
 {
-  ASSIGN_EVENT_ONCE(rest_event_, ev);
+  ASSIGN_EVENT_ONCE (rest_event_, ev);
 }
-  
+
 void
 Chord_name_engraver::stop_translation_timestep ()
 {
@@ -172,22 +172,22 @@ Chord_name_engraver::stop_translation_timestep ()
   which properties are read depend on the chord naming function active.
 */
 ADD_TRANSLATOR (Chord_name_engraver,
-               /* doc */
-               "Catch note and rest events and generate the appropriate chordname.",
-
-               /* create */
-               "ChordName ",
-
-               /* read */
-               "chordChanges "
-               "chordNameExceptions "
-               "chordNameFunction "
-               "chordNoteNamer "
-               "chordRootNamer "
-               "chordNameExceptions "
-               "majorSevenSymbol "
+                /* doc */
+                "Catch note and rest events and generate the appropriate chordname.",
+
+                /* create */
+                "ChordName ",
+
+                /* read */
+                "chordChanges "
+                "chordNameExceptions "
+                "chordNameFunction "
+                "chordNoteNamer "
+                "chordRootNamer "
+                "chordNameExceptions "
+                "majorSevenSymbol "
                 "noChordSymbol ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index ad0d91d3dbc9b85140d380b7eb98b2a64e54c1ec..35428983c5399e63298a96c18330c953536c29a4 100644 (file)
@@ -37,15 +37,15 @@ Chord_name::after_line_breaking (SCM smob)
   if (to_boolean (s))
     {
       if (me->get_column ()->get_rank ()
-         - me->get_system ()->spanned_rank_interval ()[LEFT] > 1)
-       me->suicide ();
+          - me->get_system ()->spanned_rank_interval ()[LEFT] > 1)
+        me->suicide ();
     }
   return SCM_UNSPECIFIED;
 }
 
 ADD_INTERFACE (Chord_name,
-              "A chord label (name or fretboard).",
+               "A chord label (name or fretboard).",
 
-              /* properties */        
-              "begin-of-line-visible "
-              );
+               /* properties */
+               "begin-of-line-visible "
+              );
index 1cd9147839709e0b87a4b53306300565eff21271..97e85087f114f94f3f9d780fe1e0e78f47337756 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2000--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
-                Erik Sandberg <mandolaerik@gmail.com>
+                 Erik Sandberg <mandolaerik@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
@@ -142,17 +142,16 @@ Chord_tremolo_engraver::acknowledge_stem (Grob_info info)
       if (Stem::duration_log (s) != 1)
         beam_->set_property ("gap-count", scm_from_int (gap_count));
 
-
       if (info.ultimate_event_cause ()->in_event_class ("rhythmic-event"))
-       Beam::add_stem (beam_, s);
+        Beam::add_stem (beam_, s);
       else
-       {
-         string s = _ ("stem must have Rhythmic structure");
-         if (info.event_cause ())
-           info.event_cause ()->origin ()->warning (s);
-         else
-           ::warning (s);
-       }
+        {
+          string s = _ ("stem must have Rhythmic structure");
+          if (info.event_cause ())
+            info.event_cause ()->origin ()->warning (s);
+          else
+            ::warning (s);
+        }
       // Store current grob, so we can possibly end the spanner here (and
       // reset the beam direction to RIGHT)
       previous_stem_ = s;
@@ -161,15 +160,15 @@ Chord_tremolo_engraver::acknowledge_stem (Grob_info info)
 
 ADD_ACKNOWLEDGER (Chord_tremolo_engraver, stem);
 ADD_TRANSLATOR (Chord_tremolo_engraver,
-               /* doc */
-               "Generate beams for tremolo repeats.",
+                /* doc */
+                "Generate beams for tremolo repeats.",
 
-               /* create */
-               "Beam ",
+                /* create */
+                "Beam ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index c4454544b6e391c2786d5ace257d4964b43ad07e..1658e55782a9fdfe01eb0c69b8ea919604148a34 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2000--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
-                Erik Sandberg <mandolaerik@gmail.com>
+                 Erik Sandberg <mandolaerik@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
index 5ddfea627e0869149ecc4e1c7d65522d437e1a2f..b41ce6d3d6f7766493d7d145b97037c892bf74bc 100644 (file)
@@ -106,30 +106,30 @@ Clef_engraver::create_clef ()
       SCM cpos = get_property ("clefPosition");
 
       if (scm_is_number (cpos))
-       clef_->set_property ("staff-position", cpos);
+        clef_->set_property ("staff-position", cpos);
 
       SCM oct = get_property ("clefOctavation");
       if (scm_is_number (oct) && scm_to_int (oct))
-       {
-         Item *g = make_item ("OctavateEight", SCM_EOL);
-
-         int abs_oct = scm_to_int (oct);
-         int dir = sign (abs_oct);
-         abs_oct = abs (abs_oct) + 1;
-
-         SCM txt = scm_number_to_string (scm_from_int (abs_oct),
-                                         scm_from_int (10));
-
-         g->set_property ("text",
-                          scm_list_n (ly_lily_module_constant ("vcenter-markup"),
-                                      txt, SCM_UNDEFINED));
-         Side_position_interface::add_support (g, clef_);
-
-         g->set_parent (clef_, Y_AXIS);
-         g->set_parent (clef_, X_AXIS);
-         g->set_property ("direction", scm_from_int (dir));
-         octavate_ = g;
-       }
+        {
+          Item *g = make_item ("OctavateEight", SCM_EOL);
+
+          int abs_oct = scm_to_int (oct);
+          int dir = sign (abs_oct);
+          abs_oct = abs (abs_oct) + 1;
+
+          SCM txt = scm_number_to_string (scm_from_int (abs_oct),
+                                          scm_from_int (10));
+
+          g->set_property ("text",
+                           scm_list_n (ly_lily_module_constant ("vcenter-markup"),
+                                       txt, SCM_UNDEFINED));
+          Side_position_interface::add_support (g, clef_);
+
+          g->set_parent (clef_, Y_AXIS);
+          g->set_parent (clef_, X_AXIS);
+          g->set_property ("direction", scm_from_int (dir));
+          octavate_ = g;
+        }
     }
 }
 void
@@ -140,12 +140,11 @@ Clef_engraver::process_music ()
 
 static void apply_on_children (Context *context, SCM fun)
 {
-  scm_call_1(fun, context->self_scm());
+  scm_call_1 (fun, context->self_scm ());
   for (SCM s = context->children_contexts ();
-       scm_is_pair(s); s = scm_cdr (s))
-    apply_on_children(unsmob_context (scm_car(s)), fun);
+       scm_is_pair (s); s = scm_cdr (s))
+    apply_on_children (unsmob_context (scm_car (s)), fun);
 }
-  
 
 void
 Clef_engraver::inspect_clef_properties ()
@@ -161,15 +160,15 @@ Clef_engraver::inspect_clef_properties ()
       || scm_equal_p (octavation, prev_octavation_) == SCM_BOOL_F
       || to_boolean (force_clef))
     {
-      apply_on_children(context (),
-                       ly_lily_module_constant ("invalidate-alterations"));
-      
+      apply_on_children (context (),
+                         ly_lily_module_constant ("invalidate-alterations"));
+
       set_glyph ();
       if (prev_cpos_ != SCM_BOOL_F || to_boolean (get_property ("firstClef")))
-       create_clef ();
+        create_clef ();
 
       if (clef_)
-       clef_->set_property ("non-default", SCM_BOOL_T);
+        clef_->set_property ("non-default", SCM_BOOL_T);
 
       prev_cpos_ = clefpos;
       prev_glyph_ = glyph;
@@ -191,10 +190,10 @@ Clef_engraver::stop_translation_timestep ()
     {
       SCM vis = 0;
       if (to_boolean (clef_->get_property ("non-default")))
-       vis = get_property ("explicitClefVisibility");
+        vis = get_property ("explicitClefVisibility");
 
       if (vis)
-       clef_->set_property ("break-visibility", vis);
+        clef_->set_property ("break-visibility", vis);
 
       clef_ = 0;
 
@@ -204,20 +203,20 @@ Clef_engraver::stop_translation_timestep ()
 
 ADD_ACKNOWLEDGER (Clef_engraver, bar_line);
 ADD_TRANSLATOR (Clef_engraver,
-               /* doc */
-               "Determine and set reference point for pitches.",
-
-               /* create */
-               "Clef "
-               "OctavateEight ",
-
-               /* read */
-               "clefGlyph "
-               "clefOctavation "
-               "clefPosition "
-               "explicitClefVisibility "
-               "forceClef ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Determine and set reference point for pitches.",
+
+                /* create */
+                "Clef "
+                "OctavateEight ",
+
+                /* read */
+                "clefGlyph "
+                "clefOctavation "
+                "clefPosition "
+                "explicitClefVisibility "
+                "forceClef ",
+
+                /* write */
+                ""
+               );
index c6ad530e41478b8c46dd114dcf82ff446d6d5ddf..ff993f9bb0958c3e235e5f1a2de536273cc70d1b 100644 (file)
@@ -36,11 +36,11 @@ Clef::calc_glyph_name (SCM smob)
       string str = ly_scm2string (glyph);
 
       if (to_boolean (s->get_property ("non-default"))
-         && s->break_status_dir () != RIGHT
-         && !to_boolean (s->get_property ("full-size-change")))
-       {
-         str += "_change";
-       }
+          && s->break_status_dir () != RIGHT
+          && !to_boolean (s->get_property ("full-size-change")))
+        {
+          str += "_change";
+        }
 
       return ly_string2scm (str);
     }
@@ -67,12 +67,12 @@ Clef::print (SCM smob)
 }
 
 ADD_INTERFACE (Clef,
-              "A clef sign.",
-
-              /* properties */
-              "full-size-change "
-              "glyph "
-              "glyph-name "
-              "non-default "
-              );
+               "A clef sign.",
+
+               /* properties */
+               "full-size-change "
+               "glyph "
+               "glyph-name "
+               "non-default "
+              );
 
index 7ef6b634772a9841b1e2ae887b573abe84f6e7b5..bbf71cc175a3844e920bb971a060709b68efce12 100644 (file)
@@ -40,7 +40,7 @@ protected:
   virtual void process_music ();
   virtual void finalize ();
 private:
-  vector<Stream_event*> cluster_notes_;
+  vector<Stream_event *> cluster_notes_;
   Item *beacon_;
 
   void typeset_grobs ();
@@ -70,12 +70,12 @@ Cluster_spanner_engraver::typeset_grobs ()
   if (finished_spanner_)
     {
       if (!finished_spanner_->get_bound (RIGHT))
-       {
-         finished_spanner_->set_bound (RIGHT,
-                                       finished_spanner_->get_bound (LEFT));
-                                       
-       }
-      
+        {
+          finished_spanner_->set_bound (RIGHT,
+                                        finished_spanner_->get_bound (LEFT));
+
+        }
+
       finished_spanner_ = 0;
     }
   beacon_ = 0;
@@ -100,19 +100,19 @@ Cluster_spanner_engraver::process_music ()
       int pmin = INT_MAX;
 
       for (vsize i = 0; i < cluster_notes_.size (); i++)
-       {
-         Pitch *pit = unsmob_pitch (cluster_notes_[i]->get_property ("pitch"));
+        {
+          Pitch *pit = unsmob_pitch (cluster_notes_[i]->get_property ("pitch"));
 
-         int p = (pit ? pit->steps () : 0) + c0;
+          int p = (pit ? pit->steps () : 0) + c0;
 
-         pmax = max (pmax, p);
-         pmin = min (pmin, p);
-       }
+          pmax = max (pmax, p);
+          pmin = min (pmin, p);
+        }
 
       beacon_ = make_item ("ClusterSpannerBeacon", cluster_notes_[0]->self_scm ());
       beacon_->set_property ("positions",
-                            scm_cons (scm_from_int (pmin),
-                                      scm_from_int (pmax)));
+                             scm_cons (scm_from_int (pmin),
+                                       scm_from_int (pmax)));
     }
 
   if (beacon_ && !spanner_)
@@ -144,17 +144,17 @@ Cluster_spanner_engraver::acknowledge_note_column (Grob_info info)
 
 ADD_ACKNOWLEDGER (Cluster_spanner_engraver, note_column);
 ADD_TRANSLATOR (Cluster_spanner_engraver,
-               /* doc */
-               "Engrave a cluster using @code{Spanner} notation.",
+                /* doc */
+                "Engrave a cluster using @code{Spanner} notation.",
 
-               /* create */
-               "ClusterSpanner "
-               "ClusterSpannerBeacon ",
+                /* create */
+                "ClusterSpanner "
+                "ClusterSpannerBeacon ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
 
index 9922839099334f512cb39a677962c0e0beb51d61..a9c9c5654b44d3dcb6022630124ce3efabf48d5b 100644 (file)
@@ -62,57 +62,57 @@ brew_cluster_piece (Grob *me, vector<Offset> bottom_points, vector<Offset> top_p
   if (shape == "leftsided-stairs")
     {
       for (int i = 0; i < size - 1; i++)
-       {
-         Box box;
-         box.add_point (bottom_points[i] - hvpadding);
-         box.add_point (Offset (top_points[i + 1][X_AXIS],
-                                top_points[i][Y_AXIS]) + hvpadding);
-         out.add_stencil (Lookup::round_filled_box (box, blotdiameter));
-       }
+        {
+          Box box;
+          box.add_point (bottom_points[i] - hvpadding);
+          box.add_point (Offset (top_points[i + 1][X_AXIS],
+                                 top_points[i][Y_AXIS]) + hvpadding);
+          out.add_stencil (Lookup::round_filled_box (box, blotdiameter));
+        }
     }
   else if (shape == "rightsided-stairs")
     {
       for (int i = 0; i < size - 1; i++)
-       {
-         Box box;
-         box.add_point (Offset (bottom_points[i][X_AXIS],
-                                bottom_points[i + 1][Y_AXIS]) - hvpadding);
-         box.add_point (top_points[i + 1] + hvpadding);
-         out.add_stencil (Lookup::round_filled_box (box, blotdiameter));
-       }
+        {
+          Box box;
+          box.add_point (Offset (bottom_points[i][X_AXIS],
+                                 bottom_points[i + 1][Y_AXIS]) - hvpadding);
+          box.add_point (top_points[i + 1] + hvpadding);
+          out.add_stencil (Lookup::round_filled_box (box, blotdiameter));
+        }
     }
   else if (shape == "centered-stairs")
     {
       Real left_xmid = bottom_points[0][X_AXIS];
       for (int i = 0; i < size - 1; i++)
-       {
-         Real right_xmid
-           = 0.5 * (bottom_points[i][X_AXIS] + bottom_points[i + 1][X_AXIS]);
-         Box box;
-         box.add_point (Offset (left_xmid, bottom_points[i][Y_AXIS])
-                        - hvpadding);
-         box.add_point (Offset (right_xmid, top_points[i][Y_AXIS])
-                        + hvpadding);
-         out.add_stencil (Lookup::round_filled_box (box, blotdiameter));
-         left_xmid = right_xmid;
-       }
+        {
+          Real right_xmid
+            = 0.5 * (bottom_points[i][X_AXIS] + bottom_points[i + 1][X_AXIS]);
+          Box box;
+          box.add_point (Offset (left_xmid, bottom_points[i][Y_AXIS])
+                         - hvpadding);
+          box.add_point (Offset (right_xmid, top_points[i][Y_AXIS])
+                         + hvpadding);
+          out.add_stencil (Lookup::round_filled_box (box, blotdiameter));
+          left_xmid = right_xmid;
+        }
       Real right_xmid = bottom_points[size - 1][X_AXIS];
       Box box;
       box.add_point (Offset (left_xmid, bottom_points[size - 1][Y_AXIS])
-                    - hvpadding);
+                     - hvpadding);
       box.add_point (Offset (right_xmid, top_points[size - 1][Y_AXIS])
-                    + hvpadding);
+                     + hvpadding);
       out.add_stencil (Lookup::round_filled_box (box, blotdiameter));
     }
   else if (shape == "ramp")
     {
       points.push_back (bottom_points[0] - vpadding + hpadding);
       for (int i = 1; i < size - 1; i++)
-       points.push_back (bottom_points[i] - vpadding);
+        points.push_back (bottom_points[i] - vpadding);
       points.push_back (bottom_points[size - 1] - vpadding - hpadding);
       points.push_back (top_points[size - 1] + vpadding - hpadding);
       for (int i = size - 2; i > 0; i--)
-       points.push_back (top_points[i] + vpadding);
+        points.push_back (top_points[i] + vpadding);
       points.push_back (top_points[0] + vpadding + hpadding);
       out.add_stencil (Lookup::round_filled_polygon (points, blotdiameter));
     }
@@ -151,7 +151,7 @@ Cluster::print (SCM smob)
 
   Grob *commonx = left_bound->common_refpoint (right_bound, X_AXIS);
 
-  vector<Grob*> const &cols = extract_grob_array (me, "columns");
+  vector<Grob *> const &cols = extract_grob_array (me, "columns");
   if (cols.empty ())
     {
       me->warning (_ ("junking empty cluster"));
@@ -190,16 +190,16 @@ Cluster::print (SCM smob)
     {
       extract_grob_set (next, "columns", next_cols);
       if (next_cols.size () > 0)
-       {
-         Grob *next_commony = common_refpoint_of_array (next_cols, next, Y_AXIS);
-         Grob *col = next_cols[0];
+        {
+          Grob *next_commony = common_refpoint_of_array (next_cols, next, Y_AXIS);
+          Grob *col = next_cols[0];
 
-         Interval v = col->extent (next_commony, Y_AXIS);
-         Real x = right_bound->relative_coordinate (commonx, X_AXIS) - left_coord;
+          Interval v = col->extent (next_commony, Y_AXIS);
+          Real x = right_bound->relative_coordinate (commonx, X_AXIS) - left_coord;
 
-         bottom_points.push_back (Offset (x, v[DOWN]));
-         top_points.push_back (Offset (x, v[UP]));
-       }
+          bottom_points.push_back (Offset (x, v[DOWN]));
+          top_points.push_back (Offset (x, v[UP]));
+        }
     }
 
   Stencil out = brew_cluster_piece (me, bottom_points, top_points);
@@ -208,21 +208,21 @@ Cluster::print (SCM smob)
 }
 
 ADD_INTERFACE (Cluster,
-              "A graphically drawn musical cluster.\n"
-              "\n"
-              "@code{padding} adds to the vertical extent of the shape (top"
-              " and bottom).\n"
-              "\n"
-              "The property @code{style} controls the shape of cluster"
-              " segments.  Valid values include @code{leftsided-stairs},"
-              " @code{rightsided-stairs}, @code{centered-stairs}, and"
-              " @code{ramp}.\n",
-
-              /* properties */
-              "style "
-              "padding "
-              "columns "
-              );
+               "A graphically drawn musical cluster.\n"
+               "\n"
+               "@code{padding} adds to the vertical extent of the shape (top"
+               " and bottom).\n"
+               "\n"
+               "The property @code{style} controls the shape of cluster"
+               " segments.  Valid values include @code{leftsided-stairs},"
+               " @code{rightsided-stairs}, @code{centered-stairs}, and"
+               " @code{ramp}.\n",
+
+               /* properties */
+               "style "
+               "padding "
+               "columns "
+              );
 
 struct Cluster_beacon
 {
@@ -237,15 +237,15 @@ Cluster_beacon::height (SCM g)
 {
   Grob *me = unsmob_grob (g);
   Interval v = robust_scm2interval (me->get_property ("positions"),
-                                   Interval (0, 0));
+                                    Interval (0, 0));
   return ly_interval2scm (Staff_symbol_referencer::staff_space (me) * 0.5 * v);
 }
 
 ADD_INTERFACE (Cluster_beacon,
-              "A place holder for the cluster spanner to determine the"
-              " vertical extents of a cluster spanner at this"
-              " X@tie{}position.",
+               "A place holder for the cluster spanner to determine the"
+               " vertical extents of a cluster spanner at this"
+               " X@tie{}position.",
 
-              /* properties */
-              "positions "
-              );
+               /* properties */
+               "positions "
+              );
index eb8fcaabb14e0e4a91db69a2f2e2993202613989..3250304c2d2a29fab0ee909240a5e1df95e707c9 100644 (file)
@@ -83,7 +83,6 @@
  * example, Ligature_bracket_engraver does not share any of this code.
  */
 
-
 /*
  * TODO: move this function to class Item?
  */
@@ -98,21 +97,21 @@ Coherent_ligature_engraver::move_related_items_to_column
     {
       Item *sibling = elements[i];
       if (!sibling)
-       // should not occur, but who knows... -jr
-       continue;
+        // should not occur, but who knows... -jr
+        continue;
 
       if (Staff_symbol_referencer::get_staff_symbol (sibling) != staff_symbol)
-       // sibling is from a staff different than that of the item of
-       // interest
-       continue;
+        // sibling is from a staff different than that of the item of
+        // interest
+        continue;
 
 #if 0 /* experimental code to collapse spacing after ligature */
       Grob *sibling_parent = sibling->get_parent (X_AXIS);
       sibling_parent->warning (_f ("Coherent_ligature_engraver: "
-                                  "setting `spacing-increment="
-                                  "0.01': ptr=%ul", parent));
+                                   "setting `spacing-increment="
+                                   "0.01': ptr=%ul", parent));
       sibling_parent->set_property ("forced-spacing",
-                                   scm_from_double (0.01));
+                                    scm_from_double (0.01));
 #endif
 
       sibling->set_parent (target_column, X_AXIS);
@@ -148,13 +147,13 @@ compute_delta_pitches (vector<Grob_info> primitives)
       primitive = dynamic_cast<Item *> (primitives[i].grob ());
       Stream_event *cause = primitives[i].event_cause ();
       int pitch
-       = unsmob_pitch (cause->get_property ("pitch"))->steps ();
+        = unsmob_pitch (cause->get_property ("pitch"))->steps ();
       if (prev_primitive)
-       {
-         delta_pitch = pitch - prev_pitch;
-         prev_primitive->set_property ("delta-position",
-                                       scm_from_int (delta_pitch));
-       }
+        {
+          delta_pitch = pitch - prev_pitch;
+          prev_primitive->set_property ("delta-position",
+                                        scm_from_int (delta_pitch));
+        }
       prev_pitch = pitch;
       prev_primitive = primitive;
     }
@@ -163,7 +162,7 @@ compute_delta_pitches (vector<Grob_info> primitives)
 
 void
 Coherent_ligature_engraver::typeset_ligature (Spanner *ligature,
-                                             vector<Grob_info> primitives)
+                                              vector<Grob_info> primitives)
 {
   // compute some commonly needed context info stored as grob
   // properties
index a92a2a71715adbb366e92b86741fd44f83ad220f..816451aa3edd9bb3afc2046aa5d5d4e85a9131ab 100644 (file)
@@ -26,7 +26,7 @@
 class Collision_engraver : public Engraver
 {
   Item *col_;
-  vector<Grob*> note_columns_;
+  vector<Grob *> note_columns_;
 
 protected:
   DECLARE_ACKNOWLEDGER (note_column);
@@ -55,11 +55,11 @@ Collision_engraver::acknowledge_note_column (Grob_info i)
     {
       /*should check Y axis? */
       if (Note_column::has_rests (i.grob ()) || i.grob ()->get_parent (X_AXIS))
-       return;
+        return;
 
       if (to_boolean (i.grob ()->get_property ("ignore-collision")))
-       return;
-      
+        return;
+
       note_columns_.push_back (i.grob ());
     }
 }
@@ -81,16 +81,16 @@ Collision_engraver::Collision_engraver ()
 ADD_ACKNOWLEDGER (Collision_engraver, note_column);
 
 ADD_TRANSLATOR (Collision_engraver,
-               /* doc */
-               "Collect @code{NoteColumns}, and as soon as there are two or"
-               " more, put them in a @code{NoteCollision} object.",
+                /* doc */
+                "Collect @code{NoteColumns}, and as soon as there are two or"
+                " more, put them in a @code{NoteCollision} object.",
 
-               /* create */
-               "NoteCollision ",
+                /* create */
+                "NoteCollision ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index a2c606f472897c58c6c17d221aa806902114a9dc..ab25e271c03771f6a9e26af72c39eb4bd9f55d77 100644 (file)
@@ -153,13 +153,13 @@ Completion_heads_engraver::process_music ()
   if (left_to_do_)
     {
       /*
-       note that note_dur may be strictly less than left_to_do_
-       (say, if left_to_do_ == 5/8)
+        note that note_dur may be strictly less than left_to_do_
+        (say, if left_to_do_ == 5/8)
       */
       if (factor_.denominator () == 1 && factor_ > Rational (1, 1))
-       note_dur = Duration (left_to_do_, false);
+        note_dur = Duration (left_to_do_, false);
       else
-       note_dur = Duration (left_to_do_ / factor_, false).compressed (factor_);
+        note_dur = Duration (left_to_do_ / factor_, false).compressed (factor_);
     }
   else
     {
@@ -172,9 +172,9 @@ Completion_heads_engraver::process_music ()
   if (nb.main_part_ && nb < note_dur.get_length ())
     {
       if (factor_.denominator () == 1 && factor_ > Rational (1, 1))
-       note_dur = Duration (nb.main_part_, false);
+        note_dur = Duration (nb.main_part_, false);
       else
-       note_dur = Duration (nb.main_part_ / factor_, false).compressed (factor_);
+        note_dur = Duration (nb.main_part_ / factor_, false).compressed (factor_);
     }
 
   do_nothing_until_ = now.main_part_ + note_dur.get_length ();
@@ -185,7 +185,7 @@ Completion_heads_engraver::process_music ()
       Stream_event *event = note_events_[i];
 
       if (need_clone)
-       event = event->clone ();
+        event = event->clone ();
 
       SCM pits = note_events_[i]->get_property ("pitch");
       event->set_property ("pitch", pits);
@@ -194,24 +194,24 @@ Completion_heads_engraver::process_music ()
       event->set_property ("duration-log", scm_from_int (note_dur.duration_log ()));
 
       /*
-       The Completion_heads_engraver splits an event into a group of consecutive events.
-       For each event in the group, the property "autosplit-end" denotes whether the current event
-       was truncated during splitting. Based on "autosplit-end", the Tie_engraver decides whether a
-       tie event should be processed.
+        The Completion_heads_engraver splits an event into a group of consecutive events.
+        For each event in the group, the property "autosplit-end" denotes whether the current event
+        was truncated during splitting. Based on "autosplit-end", the Tie_engraver decides whether a
+        tie event should be processed.
       */
       event->set_property ("autosplit-end",
-                          ly_bool2scm (left_to_do_ - note_dur.get_length () > Rational (0)));
+                           ly_bool2scm (left_to_do_ - note_dur.get_length () > Rational (0)));
 
       Item *note = make_note_head (event);
       if (need_clone)
-       event->unprotect ();
+        event->unprotect ();
       notes_.push_back (note);
     }
 
   if (prev_notes_.size () == notes_.size ())
     {
       for (vsize i = 0; i < notes_.size (); i++)
-       make_tie (prev_notes_[i], notes_[i]);
+        make_tie (prev_notes_[i], notes_[i]);
     }
 
   if (ties_.size () && !tie_column_)
@@ -264,7 +264,7 @@ Completion_heads_engraver::start_translation_timestep ()
       prev_notes_.clear ();
     }
   context ()->set_property ("completionBusy",
-                           ly_bool2scm (note_events_.size ()));
+                            ly_bool2scm (note_events_.size ()));
 }
 
 Completion_heads_engraver::Completion_heads_engraver ()
@@ -273,22 +273,22 @@ Completion_heads_engraver::Completion_heads_engraver ()
 }
 
 ADD_TRANSLATOR (Completion_heads_engraver,
-               /* doc */
-               "This engraver replaces @code{Note_heads_engraver}.  It plays"
-               " some trickery to break long notes and automatically tie them"
-               " into the next measure.",
-
-               /* create */
-               "NoteHead "
-               "Tie "
-               "TieColumn ",
-
-               /* read */
-               "measureLength "
-               "measurePosition "
-               "middleCPosition "
-               "timing ",
-
-               /* write */
-               "completionBusy "
-               );
+                /* doc */
+                "This engraver replaces @code{Note_heads_engraver}.  It plays"
+                " some trickery to break long notes and automatically tie them"
+                " into the next measure.",
+
+                /* create */
+                "NoteHead "
+                "Tie "
+                "TieColumn ",
+
+                /* read */
+                "measureLength "
+                "measurePosition "
+                "middleCPosition "
+                "timing ",
+
+                /* write */
+                "completionBusy "
+               );
index 3d8d7211ff97393e5978370bb126c43dd3449a0e..b6e2d5fc4ade248fdeb6dc893959510f0dd5d6b0 100644 (file)
@@ -56,9 +56,9 @@ using namespace std;
 
 class Completion_rest_engraver : public Engraver
 {
-  vector<Item*> rests_;
-  vector<Item*> prev_rests_;
-  vector<Stream_event*> rest_events_;
+  vector<Item *> rests_;
+  vector<Item *> prev_rests_;
+  vector<Stream_event *> rest_events_;
   Moment rest_end_mom_;
   bool is_first_;
   Rational left_to_do_;
@@ -66,7 +66,7 @@ class Completion_rest_engraver : public Engraver
   Rational factor_;
 
   Moment next_barline_moment ();
-  Item *make_rest (Stream_event*);
+  Item *make_rest (Stream_event *);
 
 public:
   TRANSLATOR_DECLARATIONS (Completion_rest_engraver);
@@ -90,7 +90,7 @@ void
 Completion_rest_engraver::listen_rest (Stream_event *ev)
 {
   rest_events_.push_back (ev);
-  
+
   is_first_ = true;
   Moment now = now_mom ();
   Moment musiclen = get_event_length (ev, now);
@@ -115,7 +115,7 @@ Completion_rest_engraver::next_barline_moment ()
   return (*l - *e);
 }
 
-Item*
+Item *
 Completion_rest_engraver::make_rest (Stream_event *ev)
 {
   Item *rest = make_item ("Rest", ev->self_scm ());
@@ -124,7 +124,7 @@ Completion_rest_engraver::make_rest (Stream_event *ev)
       int pos = p->steps ();
       SCM c0 = get_property ("middleCPosition");
       if (scm_is_number (c0))
-       pos += scm_to_int (c0);
+        pos += scm_to_int (c0);
       rest->set_property ("staff-position", scm_from_int (pos));
     }
 
@@ -149,13 +149,13 @@ Completion_rest_engraver::process_music ()
   if (left_to_do_)
     {
       /*
-       rest that rest_dur may be strictly less than left_to_do_
-       (say, if left_to_do_ == 5/8)
+        rest that rest_dur may be strictly less than left_to_do_
+        (say, if left_to_do_ == 5/8)
       */
       if (factor_.denominator () == 1 && factor_ > Rational (1, 1))
-       rest_dur = Duration (left_to_do_, false);
+        rest_dur = Duration (left_to_do_, false);
       else
-       rest_dur = Duration (left_to_do_ / factor_, false).compressed (factor_);
+        rest_dur = Duration (left_to_do_ / factor_, false).compressed (factor_);
       appearance = Duration (left_to_do_, false);
     }
   else
@@ -169,9 +169,9 @@ Completion_rest_engraver::process_music ()
   if (nb.main_part_ && nb < rest_dur.get_length ())
     {
       if (factor_.denominator () == 1 && factor_ > Rational (1, 1))
-       rest_dur = Duration (nb.main_part_, false);
+        rest_dur = Duration (nb.main_part_, false);
       else
-       rest_dur = Duration (nb.main_part_ / factor_, false).compressed (factor_);
+        rest_dur = Duration (nb.main_part_ / factor_, false).compressed (factor_);
     }
 
   do_nothing_until_ = now.main_part_ + rest_dur.get_length ();
@@ -182,7 +182,7 @@ Completion_rest_engraver::process_music ()
       Stream_event *event = rest_events_[i];
 
       if (need_clone)
-       event = event->clone ();
+        event = event->clone ();
 
       SCM pits = rest_events_[i]->get_property ("pitch");
       event->set_property ("pitch", pits);
@@ -192,13 +192,13 @@ Completion_rest_engraver::process_music ()
 
       Item *rest = make_rest (event);
       if (need_clone)
-       event->unprotect ();
+        event->unprotect ();
       rests_.push_back (rest);
     }
-  
+
   left_to_do_ -= rest_dur.get_length ();
   if (left_to_do_)
-    get_global_context ()->add_moment_to_process (now.main_part_ + rest_dur.get_length());
+    get_global_context ()->add_moment_to_process (now.main_part_ + rest_dur.get_length ());
   /*
     don't do complicated arithmetic with grace rests.
   */
@@ -224,7 +224,7 @@ Completion_rest_engraver::start_translation_timestep ()
       prev_rests_.clear ();
     }
   context ()->set_property ("restCompletionBusy",
-                           ly_bool2scm (rest_events_.size ()));
+                            ly_bool2scm (rest_events_.size ()));
 }
 
 Completion_rest_engraver::Completion_rest_engraver ()
@@ -232,18 +232,18 @@ Completion_rest_engraver::Completion_rest_engraver ()
 }
 
 ADD_TRANSLATOR (Completion_rest_engraver,
-               /* doc */
-               "This engraver replaces @code{Rest_engraver}.  It plays"
-               " some trickery to break long rests into the next measure."
-               ,
-               /* create */
-               "Rest "
-               ,
-               /* read */
-               "middleCPosition "
-               "measurePosition "
-               "measureLength "
-               ,
-               /* write */
-               "restCompletionBusy "
-               );
+                /* doc */
+                "This engraver replaces @code{Rest_engraver}.  It plays"
+                " some trickery to break long rests into the next measure.",
+
+                /* create */
+                "Rest ",
+
+                /* read */
+                "middleCPosition "
+                "measurePosition "
+                "measureLength ",
+
+                /* write */
+                "restCompletionBusy "
+               );
index 233011587f5f2bb0e56cc599e00a66544b51b65e..bff8e79df9dfee4e8e459da2fbe8876ea6f9d267 100644 (file)
@@ -87,22 +87,22 @@ Constrained_breaking::calc_subproblem (vsize start, vsize sys, vsize brk)
   vsize start_col = starting_breakpoints_[start];
   Matrix<Constrained_break_node> &st = state_[start];
   vsize max_index = brk - start_col;
-  for (vsize j=max_index; j-- > sys;)
+  for (vsize j = max_index; j-- > sys;)
     {
       if (0 == sys && j > 0)
         continue; /* the first line cannot have its first break after the beginning */
 
       Line_details const &cur = lines_.at (brk, j + start_col);
       if (isinf (cur.force_))
-       break;
+        break;
 
       Real prev_f = 0;
       Real prev_dem = 0;
 
       if (sys > 0)
         {
-          prev_f = st.at (j, sys-1).details_.force_;
-          prev_dem = st.at (j, sys-1).demerits_;
+          prev_f = st.at (j, sys - 1).details_.force_;
+          prev_dem = st.at (j, sys - 1).demerits_;
         }
       if (isinf (prev_dem))
         continue;
@@ -120,15 +120,14 @@ Constrained_breaking::calc_subproblem (vsize start, vsize sys, vsize brk)
   return found_something;
 }
 
-
 Column_x_positions
 Constrained_breaking::space_line (vsize i, vsize j)
 {
   bool ragged_right = to_boolean (pscore_->layout ()->c_variable ("ragged-right"));
   bool ragged_last = to_boolean (pscore_->layout ()->c_variable ("ragged-last"));
 
-  vector<Grob*> line (all_.begin () + breaks_[i],
-                     all_.begin () + breaks_[j] + 1);
+  vector<Grob *> line (all_.begin () + breaks_[i],
+                       all_.begin () + breaks_[j] + 1);
   Interval line_dims = line_dimensions_int (pscore_->layout (), i);
   bool last = j == breaks_.size () - 1;
   bool ragged = ragged_right || (last && ragged_last);
@@ -175,7 +174,7 @@ Constrained_breaking::solve (vsize start, vsize end, vsize sys_count)
   vector<Column_x_positions> ret;
 
   /* find the first solution that satisfies constraints */
-  for (vsize sys = sys_count-1; sys != VPOS; sys--)
+  for (vsize sys = sys_count - 1; sys != VPOS; sys--)
     {
       for (vsize brk = end_brk; brk != VPOS; brk--)
         {
@@ -183,8 +182,8 @@ Constrained_breaking::solve (vsize start, vsize end, vsize sys_count)
             {
               if (brk != end_brk)
                 {
-                 brk = st.at (brk, sys).prev_;
-                 sys--;
+                  brk = st.at (brk, sys).prev_;
+                  sys--;
                   warning (_ ("cannot find line breaking that satisfies constraints"));
                   ret.push_back (space_line (brk, end_brk));
                 }
@@ -192,7 +191,7 @@ Constrained_breaking::solve (vsize start, vsize end, vsize sys_count)
               /* build up the good part of the solution */
               for (vsize cur_sys = sys; cur_sys != VPOS; cur_sys--)
                 {
-                 vsize prev_brk = st.at (brk, cur_sys).prev_;
+                  vsize prev_brk = st.at (brk, cur_sys).prev_;
                   assert (brk != VPOS);
                   ret.push_back (space_line (prev_brk + start_brk, brk + start_brk));
                   brk = prev_brk;
@@ -219,27 +218,27 @@ Constrained_breaking::best_solution (vsize start, vsize end)
   for (vsize i = min_systems; i <= max_systems; i++)
     {
       vsize brk = prepare_solution (start, end, i);
-      Real dem = state_[start].at (brk, i-1).demerits_;
+      Real dem = state_[start].at (brk, i - 1).demerits_;
 
       if (dem < best_demerits)
-       {
-         best_demerits = dem;
-         best_so_far = solve (start, end, i);
-       }
+        {
+          best_demerits = dem;
+          best_so_far = solve (start, end, i);
+        }
       else
-       {
-         vector<Column_x_positions> cur = solve (start, end, i);
-         bool too_many_lines = true;
-         
-         for (vsize j = 0; j < cur.size (); j++)
-           if (cur[j].force_ < 0)
-             {
-               too_many_lines = false;
-               break;
-             }
-         if (too_many_lines)
-           return best_so_far;
-       }
+        {
+          vector<Column_x_positions> cur = solve (start, end, i);
+          bool too_many_lines = true;
+
+          for (vsize j = 0; j < cur.size (); j++)
+            if (cur[j].force_ < 0)
+              {
+                too_many_lines = false;
+                break;
+              }
+          if (too_many_lines)
+            return best_so_far;
+        }
     }
   if (best_so_far.size ())
     return best_so_far;
@@ -255,32 +254,32 @@ Constrained_breaking::line_details (vsize start, vsize end, vsize sys_count)
 
   /* This loop structure is C&Ped from solve(). */
   /* find the first solution that satisfies constraints */
-  for (vsize sys = sys_count-1; sys != VPOS; sys--)
+  for (vsize sys = sys_count - 1; sys != VPOS; sys--)
     {
       for (vsize brk = end_brk; brk != VPOS; brk--)
         {
           if (!isinf (st.at (brk, sys).details_.force_))
             {
               if (brk != end_brk)
-               {
-                 /*
-                   During initialize(), we only fill out a
-                   Line_details for lines that are valid (ie. not too
-                   long), otherwise line breaking becomes O(n^3).
-                   In case sys_count is such that no valid solution
-                   is found, we need to fill in the Line_details.
-                 */
-                 Line_details details;
-                 brk = st.at (brk, sys).prev_;
-                 sys--;
-                 fill_line_details (&details, brk, end_brk);
-                 ret.push_back (details);
-               }
+                {
+                  /*
+                    During initialize(), we only fill out a
+                    Line_details for lines that are valid (ie. not too
+                    long), otherwise line breaking becomes O(n^3).
+                    In case sys_count is such that no valid solution
+                    is found, we need to fill in the Line_details.
+                  */
+                  Line_details details;
+                  brk = st.at (brk, sys).prev_;
+                  sys--;
+                  fill_line_details (&details, brk, end_brk);
+                  ret.push_back (details);
+                }
 
               /* build up the good part of the solution */
               for (vsize cur_sys = sys; cur_sys != VPOS; cur_sys--)
                 {
-                 vsize prev_brk = st.at (brk, cur_sys).prev_;
+                  vsize prev_brk = st.at (brk, cur_sys).prev_;
                   assert (brk != VPOS);
                   ret.push_back (st.at (brk, cur_sys).details_);
                   brk = prev_brk;
@@ -365,7 +364,7 @@ min_permission (SCM perm1, SCM perm2)
   if (perm1 == ly_symbol2scm ("force"))
     return perm2;
   if (perm1 == ly_symbol2scm ("allow")
-     && perm2 != ly_symbol2scm ("force"))
+      && perm2 != ly_symbol2scm ("force"))
     return perm2;
   return SCM_EOL;
 }
@@ -396,40 +395,40 @@ Constrained_breaking::initialize ()
   SCM page_breaking_spacing_spec = l->c_variable ("page-breaking-system-system-spacing");
 
   Page_layout_problem::read_spacing_spec (spacing_spec,
-                                         &system_system_space_,
-                                         ly_symbol2scm ("basic-distance"));
+                                          &system_system_space_,
+                                          ly_symbol2scm ("basic-distance"));
   Page_layout_problem::read_spacing_spec (page_breaking_spacing_spec,
-                                         &system_system_space_,
-                                         ly_symbol2scm ("basic-distance"));
+                                          &system_system_space_,
+                                          ly_symbol2scm ("basic-distance"));
   Page_layout_problem::read_spacing_spec (title_spec,
-                                         &system_markup_space_,
-                                         ly_symbol2scm ("basic-distance"));
+                                          &system_markup_space_,
+                                          ly_symbol2scm ("basic-distance"));
 
   Page_layout_problem::read_spacing_spec (spacing_spec,
-                                         &system_system_padding_,
-                                         ly_symbol2scm ("padding"));
+                                          &system_system_padding_,
+                                          ly_symbol2scm ("padding"));
   Page_layout_problem::read_spacing_spec (between_scores_spec,
-                                         &score_system_padding_,
-                                         ly_symbol2scm ("padding"));
+                                          &score_system_padding_,
+                                          ly_symbol2scm ("padding"));
   Page_layout_problem::read_spacing_spec (page_breaking_spacing_spec,
-                                         &system_system_padding_,
-                                         ly_symbol2scm ("padding"));
+                                          &system_system_padding_,
+                                          ly_symbol2scm ("padding"));
   Page_layout_problem::read_spacing_spec (title_spec,
-                                         &score_markup_padding_,
-                                         ly_symbol2scm ("padding"));
+                                          &score_markup_padding_,
+                                          ly_symbol2scm ("padding"));
 
   Page_layout_problem::read_spacing_spec (between_scores_spec,
-                                         &score_system_min_distance_,
-                                         ly_symbol2scm ("minimum-distance"));
+                                          &score_system_min_distance_,
+                                          ly_symbol2scm ("minimum-distance"));
   Page_layout_problem::read_spacing_spec (spacing_spec,
-                                         &system_system_min_distance_,
-                                         ly_symbol2scm ("minimum-distance"));
+                                          &system_system_min_distance_,
+                                          ly_symbol2scm ("minimum-distance"));
   Page_layout_problem::read_spacing_spec (page_breaking_spacing_spec,
-                                         &system_system_min_distance_,
-                                         ly_symbol2scm ("minimum-distance"));
+                                          &system_system_min_distance_,
+                                          ly_symbol2scm ("minimum-distance"));
   Page_layout_problem::read_spacing_spec (title_spec,
-                                         &score_markup_min_distance_,
-                                         ly_symbol2scm ("minimum-distance"));
+                                          &score_markup_min_distance_,
+                                          ly_symbol2scm ("minimum-distance"));
 
   Interval first_line = line_dimensions_int (pscore_->layout (), 0);
   Interval other_lines = line_dimensions_int (pscore_->layout (), 1);
@@ -438,25 +437,25 @@ Constrained_breaking::initialize ()
   all_ = pscore_->root_system ()->used_columns ();
   lines_.resize (breaks_.size (), breaks_.size (), Line_details ());
   vector<Real> forces = get_line_forces (all_,
-                                        other_lines.length (),
-                                        other_lines.length () - first_line.length (),
-                                        ragged_right_);
+                                         other_lines.length (),
+                                         other_lines.length () - first_line.length (),
+                                         ragged_right_);
   for (vsize i = 0; i + 1 < breaks_.size (); i++)
     {
       for (vsize j = i + 1; j < breaks_.size (); j++)
-       {
-         bool last = j == breaks_.size () - 1;
-         bool ragged = ragged_right_ || (last && ragged_last_);
-         Line_details &line = lines_.at (j, i);
-
-         line.force_ = forces[i*breaks_.size () + j];
-         if (ragged && last && !isinf (line.force_))
-           line.force_ = (line.force_ < 0 && j > i + 1) ? infinity_f : 0;
-         if (isinf (line.force_))
-           break;
-
-         fill_line_details (&line, i, j);
-       }
+        {
+          bool last = j == breaks_.size () - 1;
+          bool ragged = ragged_right_ || (last && ragged_last_);
+          Line_details &line = lines_.at (j, i);
+
+          line.force_ = forces[i * breaks_.size () + j];
+          if (ragged && last && !isinf (line.force_))
+            line.force_ = (line.force_ < 0 && j > i + 1) ? infinity_f : 0;
+          if (isinf (line.force_))
+            break;
+
+          fill_line_details (&line, i, j);
+        }
     }
 
   /* work out all the starting indices */
@@ -464,7 +463,7 @@ Constrained_breaking::initialize ()
     {
       vsize j;
       for (j = 0; j + 1 < breaks_.size () && breaks_[j] < start_[i]; j++)
-       ;
+        ;
       starting_breakpoints_.push_back (j);
       start_[i] = breaks_[j];
     }
@@ -497,18 +496,18 @@ Constrained_breaking::fill_line_details (Line_details *const out, vsize start, v
   /* turn permission should always be stricter than page permission
      and page permission should always be stricter than line permission */
   out->page_permission_ = min_permission (out->break_permission_,
-                                         out->page_permission_);
+                                          out->page_permission_);
   out->turn_permission_ = min_permission (out->page_permission_,
-                                         out->turn_permission_);
+                                          out->turn_permission_);
 
   begin_of_line_extent = (begin_of_line_extent.is_empty ()
-                         || isnan (begin_of_line_extent[LEFT])
-                         || isnan (begin_of_line_extent[RIGHT]))
-    ? Interval (0, 0) : begin_of_line_extent;
+                          || isnan (begin_of_line_extent[LEFT])
+                          || isnan (begin_of_line_extent[RIGHT]))
+                         ? Interval (0, 0) : begin_of_line_extent;
   rest_of_line_extent = (rest_of_line_extent.is_empty ()
-                        || isnan (rest_of_line_extent[LEFT])
-                        || isnan (rest_of_line_extent[RIGHT]))
-    ? Interval (0, 0) : rest_of_line_extent;
+                         || isnan (rest_of_line_extent[LEFT])
+                         || isnan (rest_of_line_extent[RIGHT]))
+                        ? Interval (0, 0) : rest_of_line_extent;
   out->shape_ = Line_shape (begin_of_line_extent, rest_of_line_extent);
   out->padding_ = last ? score_system_padding_ : system_system_padding_;
   out->title_padding_ = score_markup_padding_;
@@ -573,8 +572,8 @@ Line_details::Line_details (Prob *pb, Output_def *paper)
   title_ = to_boolean (pb->get_property ("is-title"));
   compressed_lines_count_ = 1;
   compressed_nontitle_lines_count_ = title_ ? 0 : 1;
-  SCM last_scm  = pb->get_property ("last-markup-line");
-  last_markup_line_  = to_boolean (last_scm);
+  SCM last_scm = pb->get_property ("last-markup-line");
+  last_markup_line_ = to_boolean (last_scm);
   SCM first_scm = pb->get_property ("first-markup-line");
   first_markup_line_ = to_boolean (first_scm);
   tight_spacing_ = to_boolean (pb->get_property ("tight-spacing"));
@@ -585,9 +584,9 @@ Real
 Line_details::full_height () const
 {
   Interval ret;
-  ret.unite(shape_.begin_);
-  ret.unite(shape_.rest_);
-  return ret.length();
+  ret.unite (shape_.begin_);
+  ret.unite (shape_.rest_);
+  return ret.length ();
 }
 
 Real
@@ -617,7 +616,7 @@ Line_shape::Line_shape (Interval begin, Interval rest)
 Line_shape
 Line_shape::piggyback (Line_shape mount, Real padding) const
 {
-  Real elevation = max (begin_[UP]-mount.begin_[DOWN], rest_[UP]-mount.rest_[DOWN]);
+  Real elevation = max (begin_[UP] - mount.begin_[DOWN], rest_[UP] - mount.rest_[DOWN]);
   Interval begin = Interval (begin_[DOWN], elevation + mount.begin_[UP] + padding);
   Interval rest = Interval (rest_[DOWN], elevation + mount.rest_[UP] + padding);
   return Line_shape (begin, rest);
index 26e79f56abfb42f77d92ce29abeb8a88bb71d337..5dd1684a8375a50c494812e8b123084d5b98e787 100644 (file)
@@ -85,7 +85,7 @@ IMPLEMENT_SMOBS (Context_def);
 IMPLEMENT_DEFAULT_EQUAL_P (Context_def);
 
 int
-Context_def::print_smob (SCM smob, SCM port, scm_print_state*)
+Context_def::print_smob (SCM smob, SCM port, scm_print_state *)
 {
   Context_def *me = (Context_def *) SCM_CELL_WORD_1 (smob);
 
@@ -134,17 +134,17 @@ Context_def::add_context_mod (SCM mod)
   if (ly_symbol2scm ("default-child") == tag)
     default_child_ = sym;
   else if (ly_symbol2scm ("consists") == tag
-          || ly_symbol2scm ("remove") == tag)
+           || ly_symbol2scm ("remove") == tag)
     {
       translator_mods_ = scm_cons (scm_list_2 (tag, sym), translator_mods_);
     }
   else if (ly_symbol2scm ("accepts") == tag
-          || ly_symbol2scm ("denies") == tag)
+           || ly_symbol2scm ("denies") == tag)
     accept_mods_ = scm_cons (scm_list_2 (tag, sym), accept_mods_);
   else if (ly_symbol2scm ("pop") == tag
-          || ly_symbol2scm ("push") == tag
-          || ly_symbol2scm ("assign") == tag
-          || ly_symbol2scm ("unset") == tag)
+           || ly_symbol2scm ("push") == tag
+           || ly_symbol2scm ("assign") == tag
+           || ly_symbol2scm ("unset") == tag)
     property_ops_ = scm_cons (mod, property_ops_);
   else if (ly_symbol2scm ("alias") == tag)
     context_aliases_ = scm_cons (sym, context_aliases_);
@@ -166,16 +166,16 @@ Context_def::get_accepted (SCM user_mod) const
       SCM tag = scm_caar (s);
       SCM sym = scm_cadar (s);
       if (tag == ly_symbol2scm ("accepts"))
-       acc = scm_cons (sym, acc);
+        acc = scm_cons (sym, acc);
       else if (tag == ly_symbol2scm ("denies"))
-       acc = scm_delete_x (sym, acc);
+        acc = scm_delete_x (sym, acc);
     }
 
   SCM def = get_default_child (user_mod);
   if (scm_is_symbol (def))
     {
       if (scm_memq (def, acc))
-       acc = scm_delete_x (def, acc);
+        acc = scm_delete_x (def, acc);
       acc = scm_cons (def, acc);
     }
 
@@ -190,10 +190,10 @@ Context_def::get_default_child (SCM user_mod) const
     {
       SCM entry = scm_car (s);
       if (scm_car (entry) == ly_symbol2scm ("default-child"))
-       {
-         name = scm_cadr (entry);
-         break;
-       }
+        {
+          name = scm_cadr (entry);
+          break;
+        }
     }
 
   return name;
@@ -213,8 +213,8 @@ Context_def::get_default_child (SCM user_mod) const
 */
 vector<Context_def *>
 Context_def::path_to_acceptable_context (SCM type_sym,
-                                        Output_def *odef,
-                                        SCM additional_accepts) const
+                                         Output_def *odef,
+                                         SCM additional_accepts) const
 {
   set<const Context_def *> seen;
   return internal_path_to_acceptable_context (type_sym, odef, additional_accepts, &seen);
@@ -224,32 +224,32 @@ Context_def::path_to_acceptable_context (SCM type_sym,
 The SEEN parameter is a set which keeps track of visited contexts, allowing
 contexts of the same type to be nested.
 */
-vector<Context_def*>
+vector<Context_def *>
 Context_def::internal_path_to_acceptable_context (SCM type_sym,
-                                                 Output_def *odef,
-                                                 SCM additional_accepts,
-                                                 set<const Context_def *> *seen) const
+                                                  Output_def *odef,
+                                                  SCM additional_accepts,
+                                                  set<const Context_def *> *seen) const
 {
   assert (scm_is_symbol (type_sym));
 
   SCM accepted = get_accepted (additional_accepts);
 
-  vector<Context_def*> accepteds;
+  vector<Context_def *> accepteds;
   for (SCM s = accepted; scm_is_pair (s); s = scm_cdr (s))
     if (Context_def *t = unsmob_context_def (find_context_def (odef,
-                                                              scm_car (s))))
+                                                               scm_car (s))))
       accepteds.push_back (t);
 
-  vector<Context_def*> best_result;
+  vector<Context_def *> best_result;
   for (vsize i = 0; i < accepteds.size (); i++)
     {
       /* do not check aliases, because \context Staff should not
-        create RhythmicStaff. */
+         create RhythmicStaff. */
       if (ly_is_equal (accepteds[i]->get_context_name (), type_sym))
-       {
-         best_result.push_back (accepteds[i]);
-         return best_result;
-       }
+        {
+          best_result.push_back (accepteds[i]);
+          return best_result;
+        }
     }
 
   seen->insert (this);
@@ -259,16 +259,16 @@ Context_def::internal_path_to_acceptable_context (SCM type_sym,
       Context_def *g = accepteds[i];
 
       if (!seen->count (g))
-       {
-         vector<Context_def*> result
-           = g->internal_path_to_acceptable_context (type_sym, odef, SCM_EOL, seen);
-         if (result.size () && result.size () < best_depth)
-           {
-             best_depth = result.size ();
-             result.insert (result.begin (), g);
-             best_result = result;
-           }
-       }
+        {
+          vector<Context_def *> result
+            = g->internal_path_to_acceptable_context (type_sym, odef, SCM_EOL, seen);
+          if (result.size () && result.size () < best_depth)
+            {
+              best_depth = result.size ();
+              result.insert (result.begin (), g);
+              best_result = result;
+            }
+        }
     }
   seen->erase (this);
 
@@ -288,13 +288,13 @@ Context_def::get_translator_names (SCM user_mod) const
       SCM arg = scm_cadar (s);
 
       if (scm_is_string (arg))
-       arg = scm_string_to_symbol (arg);
+        arg = scm_string_to_symbol (arg);
 
       if (ly_symbol2scm ("consists") == tag)
-       l1 = scm_cons (arg, l1);
+        l1 = scm_cons (arg, l1);
       else if (ly_symbol2scm ("remove") == tag
-              && get_translator (arg))
-       l1 = scm_delete_x (arg, l1);
+               && get_translator (arg))
+        l1 = scm_delete_x (arg, l1);
     }
 
   return l1;
@@ -332,19 +332,19 @@ Context_def::to_alist () const
   SCM ell = SCM_EOL;
 
   ell = scm_cons (scm_cons (ly_symbol2scm ("consists"),
-                           get_translator_names (SCM_EOL)), ell);
+                            get_translator_names (SCM_EOL)), ell);
   ell = scm_cons (scm_cons (ly_symbol2scm ("description"), description_), ell);
   ell = scm_cons (scm_cons (ly_symbol2scm ("aliases"), context_aliases_), ell);
   ell = scm_cons (scm_cons (ly_symbol2scm ("accepts"), get_accepted (SCM_EOL)),
-                 ell);
+                  ell);
   ell = scm_cons (scm_cons (ly_symbol2scm ("property-ops"), property_ops_),
-                 ell);
+                  ell);
   ell = scm_cons (scm_cons (ly_symbol2scm ("context-name"), context_name_),
-                 ell);
+                  ell);
 
   if (scm_is_symbol (translator_group_type_))
     ell = scm_cons (scm_cons (ly_symbol2scm ("group-type"),
-                             translator_group_type_), ell);
+                              translator_group_type_), ell);
   return ell;
 }
 
index bf1432be6d099200ed692d126d85ec220ba78420..b993a7de8f33e6e728b713ae49dbf974828513df 100644 (file)
 #include "context-mod.hh"
 
 LY_DEFINE (ly_get_context_mods,
-          "ly:get-context-mods",
-          1, 0, 0, (SCM contextmod),
-          "Returns the list of context modifications stored in"
-          " @var{contextmod}.")
+           "ly:get-context-mods",
+           1, 0, 0, (SCM contextmod),
+           "Returns the list of context modifications stored in"
+           " @var{contextmod}.")
 {
   Context_mod *tr = unsmob_context_mod (contextmod);
   LY_ASSERT_SMOB (Context_mod, contextmod, 1);
@@ -33,10 +33,10 @@ LY_DEFINE (ly_get_context_mods,
 }
 
 LY_DEFINE (ly_add_context_mod,
-          "ly:add-context-mod",
-          2, 0, 0, (SCM contextmods, SCM modification),
-          "Adds the given context @var{modification} to the list"
-          " @var{contextmods} of context modifications.")
+           "ly:add-context-mod",
+           2, 0, 0, (SCM contextmods, SCM modification),
+           "Adds the given context @var{modification} to the list"
+           " @var{contextmods} of context modifications.")
 {
   Context_mod *ctxmod = unsmob_context_mod (contextmods);
   LY_ASSERT_SMOB (Context_mod, contextmods, 1);
index a028930c2ba79d23381992a985f9a421ff39b4b7..5fccf6c4d2985f5e865a33fb96f1f5a3d9300192 100644 (file)
@@ -32,9 +32,10 @@ Context_mod::Context_mod (Context_mod const &s)
 #include "ly-smobs.icc"
 IMPLEMENT_SIMPLE_SMOBS (Context_mod);
 IMPLEMENT_DEFAULT_EQUAL_P (Context_mod);
+IMPLEMENT_TYPE_P (Context_mod, "ly:context-mod?");
 
 int
-Context_mod::print_smob (SCM smob, SCM port, scm_print_state*)
+Context_mod::print_smob (SCM smob, SCM port, scm_print_state *)
 {
   Context_mod *me = (Context_mod *) SCM_CELL_WORD_1 (smob);
 
index 4d1de2403460d631be0eeb4ef752ede71f3c2feb..7ee4b904d9a7edaf34aa4f0247cd704208ddf097 100644 (file)
 */
 void
 general_pushpop_property (Context *context,
-                         SCM context_property,
-                         SCM grob_property_path,
-                         SCM new_value)
+                          SCM context_property,
+                          SCM grob_property_path,
+                          SCM new_value)
 {
   if (!scm_is_symbol (context_property)
       || !scm_is_symbol (scm_car (grob_property_path)))
     {
       warning (_ ("need symbol arguments for \\override and \\revert"));
       if (do_internal_type_checking_global)
-       assert (false);
+        assert (false);
     }
 
   sloppy_general_pushpop_property (context, context_property,
-                                  grob_property_path, new_value);
+                                   grob_property_path, new_value);
 }
 
-
 /*
   Grob descriptions (ie. alists with layout properties) are
   represented as a (ALIST . BASED-ON) pair, where BASED-ON is the
@@ -58,18 +57,17 @@ general_pushpop_property (Context *context,
   Push or pop (depending on value of VAL) a single entry from a
   translator property list by name of PROP.  GROB_PROPERTY_PATH
   indicates nested alists, eg. '(beamed-stem-lengths details)
-
 */
 void
 execute_override_property (Context *context,
-                          SCM context_property,
-                          SCM grob_property_path,
-                          SCM new_value)
+                           SCM context_property,
+                           SCM grob_property_path,
+                           SCM new_value)
 {
   SCM current_context_val = SCM_EOL;
 
   Context *where = context->where_defined (context_property,
-                                          &current_context_val);
+                                           &current_context_val);
 
   /*
     Don't mess with MIDI.
@@ -103,9 +101,9 @@ execute_override_property (Context *context,
   if (scm_is_pair (scm_cdr (grob_property_path)))
     {
       new_value = nested_property_alist (ly_assoc_get (symbol, target_alist,
-                                                      SCM_EOL),
-                                        scm_cdr (grob_property_path),
-                                        new_value);
+                                                       SCM_EOL),
+                                         scm_cdr (grob_property_path),
+                                         new_value);
     }
 
   /* it's tempting to replace the head of the list if it's the same
@@ -118,7 +116,7 @@ execute_override_property (Context *context,
   if (!ly_is_procedure (new_value)
       && !is_simple_closure (new_value))
     ok = type_check_assignment (symbol, new_value,
-                               ly_symbol2scm ("backend-type?"));
+                                ly_symbol2scm ("backend-type?"));
 
   /*
     tack onto alist.  We can use set_car, since
@@ -136,17 +134,17 @@ execute_override_property (Context *context,
  */
 void
 sloppy_general_pushpop_property (Context *context,
-                                SCM context_property,
-                                SCM grob_property_path,
-                                SCM new_value)
+                                 SCM context_property,
+                                 SCM grob_property_path,
+                                 SCM new_value)
 {
   if (new_value == SCM_UNDEFINED)
     execute_revert_property (context, context_property,
-                            grob_property_path);
+                             grob_property_path);
   else
     execute_override_property (context, context_property,
-                              grob_property_path,
-                              new_value);
+                               grob_property_path,
+                               new_value);
 }
 
 /*
@@ -154,8 +152,8 @@ sloppy_general_pushpop_property (Context *context,
 */
 void
 execute_revert_property (Context *context,
-                        SCM context_property,
-                        SCM grob_property_path)
+                         SCM context_property,
+                         SCM grob_property_path)
 {
   SCM current_context_val = SCM_EOL;
   if (context->where_defined (context_property, &current_context_val)
@@ -165,38 +163,38 @@ execute_revert_property (Context *context,
       SCM daddy = scm_cdr (current_context_val);
 
       if (!scm_is_pair (grob_property_path)
-         || !scm_is_symbol (scm_car (grob_property_path)))
-       {
-         programming_error ("Grob property path should be list of symbols.");
-         return;
-       }
+          || !scm_is_symbol (scm_car (grob_property_path)))
+        {
+          programming_error ("Grob property path should be list of symbols.");
+          return;
+        }
 
       SCM symbol = scm_car (grob_property_path);
       if (scm_is_pair (scm_cdr (grob_property_path)))
-       {
-         SCM current_sub_alist = ly_assoc_get (symbol, current_alist, SCM_EOL);
-         SCM new_val
-           = nested_property_revert_alist (current_sub_alist,
-                                           scm_cdr (grob_property_path));
-
-         if (scm_is_pair (current_alist)
-             && scm_caar (current_alist) == symbol
-             && current_alist != daddy)
-           current_alist = scm_cdr (current_alist);
-
-         current_alist = scm_acons (symbol, new_val, current_alist);
-         scm_set_car_x (current_context_val, current_alist);
-       }
+        {
+          SCM current_sub_alist = ly_assoc_get (symbol, current_alist, SCM_EOL);
+          SCM new_val
+            = nested_property_revert_alist (current_sub_alist,
+                                            scm_cdr (grob_property_path));
+
+          if (scm_is_pair (current_alist)
+              && scm_caar (current_alist) == symbol
+              && current_alist != daddy)
+            current_alist = scm_cdr (current_alist);
+
+          current_alist = scm_acons (symbol, new_val, current_alist);
+          scm_set_car_x (current_context_val, current_alist);
+        }
       else
-       {
-         SCM new_alist = evict_from_alist (symbol, current_alist, daddy);
-
-         if (new_alist == daddy)
-           context->unset_property (context_property);
-         else
-           context->set_property (context_property,
-                                  scm_cons (new_alist, daddy));
-       }
+        {
+          SCM new_alist = evict_from_alist (symbol, current_alist, daddy);
+
+          if (new_alist == daddy)
+            context->unset_property (context_property);
+          else
+            context->set_property (context_property,
+                                   scm_cons (new_alist, daddy));
+        }
     }
 }
 /*
@@ -205,13 +203,13 @@ execute_revert_property (Context *context,
 */
 void
 execute_pushpop_property (Context *context,
-                         SCM context_property,
-                         SCM grob_property,
-                         SCM new_value)
+                          SCM context_property,
+                          SCM grob_property,
+                          SCM new_value)
 {
   general_pushpop_property (context, context_property,
-                           scm_list_1 (grob_property),
-                           new_value);
+                            scm_list_1 (grob_property),
+                            new_value);
 }
 
 /*
@@ -228,21 +226,21 @@ apply_property_operations (Context *tg, SCM pre_init_ops)
       entry = scm_cdr (entry);
 
       if (type == ly_symbol2scm ("push"))
-       {
-         SCM context_prop = scm_car (entry);
-         SCM val = scm_cadr (entry);
-         SCM grob_prop_path = scm_cddr (entry);
-         sloppy_general_pushpop_property (tg, context_prop, grob_prop_path, val);
-       }
+        {
+          SCM context_prop = scm_car (entry);
+          SCM val = scm_cadr (entry);
+          SCM grob_prop_path = scm_cddr (entry);
+          sloppy_general_pushpop_property (tg, context_prop, grob_prop_path, val);
+        }
       else if (type == ly_symbol2scm ("pop"))
-       {
-         SCM context_prop = scm_car (entry);
-         SCM val = SCM_UNDEFINED;
-         SCM grob_prop_path = scm_cdr (entry);
-         sloppy_general_pushpop_property (tg, context_prop, grob_prop_path, val);
-       }
+        {
+          SCM context_prop = scm_car (entry);
+          SCM val = SCM_UNDEFINED;
+          SCM grob_prop_path = scm_cdr (entry);
+          sloppy_general_pushpop_property (tg, context_prop, grob_prop_path, val);
+        }
       else if (type == ly_symbol2scm ("assign"))
-       tg->set_property (scm_car (entry), scm_cadr (entry));
+        tg->set_property (scm_car (entry), scm_cadr (entry));
     }
 }
 
@@ -262,8 +260,8 @@ updated_grob_properties (Context *tg, SCM sym)
 
   SCM daddy_props
     = (tg->get_parent_context ())
-    ? updated_grob_properties (tg->get_parent_context (), sym)
-    : SCM_EOL;
+      ? updated_grob_properties (tg->get_parent_context (), sym)
+      : SCM_EOL;
 
   if (!scm_is_pair (props))
     {
@@ -280,11 +278,11 @@ updated_grob_properties (Context *tg, SCM sym)
       SCM *tail = &copy;
       SCM p = scm_car (props);
       while (p != based_on)
-       {
-         *tail = scm_cons (scm_car (p), daddy_props);
-         tail = SCM_CDRLOC (*tail);
-         p = scm_cdr (p);
-       }
+        {
+          *tail = scm_cons (scm_car (p), daddy_props);
+          tail = SCM_CDRLOC (*tail);
+          p = scm_cdr (p);
+        }
 
       scm_set_car_x (props, copy);
       scm_set_cdr_x (props, daddy_props);
index 043bfaa924ffaba1098bcb6b499a822d22e51911..b62a83f2399a8fb36636a0c4976ffc26bb6ed20a 100644 (file)
@@ -23,9 +23,9 @@
 #include "dispatcher.hh"
 
 LY_DEFINE (ly_context_current_moment,
-          "ly:context-current-moment",
-          1, 0, 0, (SCM context),
-          "Return the current moment of @var{context}.")
+           "ly:context-current-moment",
+           1, 0, 0, (SCM context),
+           "Return the current moment of @var{context}.")
 {
   Context *tr = unsmob_context (context);
 
@@ -35,10 +35,10 @@ LY_DEFINE (ly_context_current_moment,
 }
 
 LY_DEFINE (ly_context_id, "ly:context-id",
-          1, 0, 0, (SCM context),
-          "Return the ID string of @var{context},"
-          " i.e., for @code{\\context Voice = \"one\" @dots{}}"
-          " return the string @code{one}.")
+           1, 0, 0, (SCM context),
+           "Return the ID string of @var{context},"
+           " i.e., for @code{\\context Voice = \"one\" @dots{}}"
+           " return the string @code{one}.")
 {
   Context *tr = unsmob_context (context);
 
@@ -48,10 +48,10 @@ LY_DEFINE (ly_context_id, "ly:context-id",
 }
 
 LY_DEFINE (ly_context_name, "ly:context-name",
-          1, 0, 0, (SCM context),
-          "Return the name of @var{context},"
-          " i.e., for @code{\\context Voice = \"one\" @dots{}}"
-          " return the symbol @code{Voice}.")
+           1, 0, 0, (SCM context),
+           "Return the name of @var{context},"
+           " i.e., for @code{\\context Voice = \"one\" @dots{}}"
+           " return the symbol @code{Voice}.")
 {
   LY_ASSERT_SMOB (Context, context, 1);
 
@@ -61,9 +61,9 @@ LY_DEFINE (ly_context_name, "ly:context-name",
 }
 
 LY_DEFINE (ly_context_grob_definition, "ly:context-grob-definition",
-          2, 0, 0, (SCM context, SCM name),
-          "Return the definition of @var{name} (a symbol) within"
-          " @var{context} as an alist.")
+           2, 0, 0, (SCM context, SCM name),
+           "Return the definition of @var{name} (a symbol) within"
+           " @var{context} as an alist.")
 {
   Context *tr = unsmob_context (context);
 
@@ -74,11 +74,11 @@ LY_DEFINE (ly_context_grob_definition, "ly:context-grob-definition",
 }
 
 LY_DEFINE (ly_context_pushpop_property, "ly:context-pushpop-property",
-          3, 1, 0, (SCM context, SCM grob, SCM eltprop, SCM val),
-          "Do a single @code{\\override} or @code{\\revert} operation"
-          " in @var{context}.  The grob definition @var{grob} is extended"
-          " with @var{eltprop} (if @var{val} is specified) or reverted"
-          " (if unspecified).")
+           3, 1, 0, (SCM context, SCM grob, SCM eltprop, SCM val),
+           "Do a single @code{\\override} or @code{\\revert} operation"
+           " in @var{context}.  The grob definition @var{grob} is extended"
+           " with @var{eltprop} (if @var{val} is specified) or reverted"
+           " (if unspecified).")
 {
   Context *tg = unsmob_context (context);
 
@@ -106,9 +106,9 @@ LY_DEFINE (ly_context_property, "ly:context-property",
 }
 
 LY_DEFINE (ly_context_set_property_x, "ly:context-set-property!",
-          3, 0, 0, (SCM context, SCM name, SCM val),
-          "Set value of property @var{name} in context @var{context}"
-          " to @var{val}.")
+           3, 0, 0, (SCM context, SCM name, SCM val),
+           "Set value of property @var{name} in context @var{context}"
+           " to @var{val}.")
 {
   LY_ASSERT_SMOB (Context, context, 1);
   LY_ASSERT_TYPE (ly_is_symbol, name, 2);
@@ -121,9 +121,9 @@ LY_DEFINE (ly_context_set_property_x, "ly:context-set-property!",
 }
 
 LY_DEFINE (ly_context_property_where_defined, "ly:context-property-where-defined",
-          2, 0, 0, (SCM context, SCM name),
-          "Return the context above @var{context}"
-          " where @var{name} is defined.")
+           2, 0, 0, (SCM context, SCM name),
+           "Return the context above @var{context}"
+           " where @var{name} is defined.")
 {
   LY_ASSERT_SMOB (Context, context, 1);
   LY_ASSERT_TYPE (ly_is_symbol, name, 2);
@@ -139,8 +139,8 @@ LY_DEFINE (ly_context_property_where_defined, "ly:context-property-where-defined
 }
 
 LY_DEFINE (ly_context_unset_property, "ly:context-unset-property", 2, 0, 0,
-          (SCM context, SCM name),
-          "Unset value of property @var{name} in context @var{context}.")
+           (SCM context, SCM name),
+           "Unset value of property @var{name} in context @var{context}.")
 {
   LY_ASSERT_SMOB (Context, context, 1);
   LY_ASSERT_TYPE (ly_is_symbol, name, 2);
@@ -151,8 +151,8 @@ LY_DEFINE (ly_context_unset_property, "ly:context-unset-property", 2, 0, 0,
 }
 
 LY_DEFINE (ly_context_parent, "ly:context-parent",
-          1, 0, 0, (SCM context),
-          "Return the parent of @var{context}, @code{#f} if none.")
+           1, 0, 0, (SCM context),
+           "Return the parent of @var{context}, @code{#f} if none.")
 {
   LY_ASSERT_SMOB (Context, context, 1);
   Context *tr = unsmob_context (context);
@@ -166,9 +166,9 @@ LY_DEFINE (ly_context_parent, "ly:context-parent",
 
 /* FIXME: todo: should support translator IDs, and creation? */
 LY_DEFINE (ly_context_find, "ly:context-find",
-          2, 0, 0, (SCM context, SCM name),
-          "Find a parent of @var{context} that has name or alias @var{name}."
-          "  Return @code{#f} if not found.")
+           2, 0, 0, (SCM context, SCM name),
+           "Find a parent of @var{context} that has name or alias @var{name}."
+           "  Return @code{#f} if not found.")
 {
   LY_ASSERT_SMOB (Context, context, 1);
   LY_ASSERT_TYPE (ly_is_symbol, name, 2);
@@ -177,7 +177,7 @@ LY_DEFINE (ly_context_find, "ly:context-find",
   while (tr)
     {
       if (tr->is_alias (name))
-       return tr->self_scm ();
+        return tr->self_scm ();
       tr = tr->get_parent_context ();
     }
 
@@ -185,8 +185,8 @@ LY_DEFINE (ly_context_find, "ly:context-find",
 }
 
 LY_DEFINE (ly_context_now, "ly:context-now",
-          1, 0, 0, (SCM context),
-          "Return @code{now-moment} of context @var{context}.")
+           1, 0, 0, (SCM context),
+           "Return @code{now-moment} of context @var{context}.")
 {
   LY_ASSERT_SMOB (Context, context, 1);
   Context *ctx = unsmob_context (context);
index b02d0235452b4dfc97fdb345606eb4f2ba7736c1..c1775e48d597e444838b3ade64325de35cf691cb 100644 (file)
@@ -21,7 +21,6 @@
 #include "context.hh"
 #include "music.hh"
 
-
 class Context_specced_music_iterator : public Music_wrapper_iterator
 {
 public:
index 4dbb6e5657721e436dc4f52227d24409c62a53e8..3454ab1f1735fcc257ec58a46c46d0adc21c1e3f 100644 (file)
@@ -36,7 +36,7 @@ bool
 Context::is_removable () const
 {
   return context_list_ == SCM_EOL && ! iterator_count_
-    && !dynamic_cast<Global_context const *> (daddy_context_);
+         && !dynamic_cast<Global_context const *> (daddy_context_);
 }
 
 void
@@ -48,12 +48,12 @@ Context::check_removal ()
 
       ctx->check_removal ();
       if (ctx->is_removable ())
-       {
-         recurse_over_translators (ctx, &Translator::finalize,
-                                   &Translator_group::finalize,
-                                   UP);
-         send_stream_event (ctx, "RemoveContext", 0, 0);
-       }
+        {
+          recurse_over_translators (ctx, &Translator::finalize,
+                                    &Translator_group::finalize,
+                                    UP);
+          send_stream_event (ctx, "RemoveContext", 0, 0);
+        }
     }
 }
 
@@ -72,13 +72,12 @@ void
 Context::add_context (Context *child)
 {
   context_list_ = ly_append2 (context_list_,
-                             scm_cons (child->self_scm (), SCM_EOL));
+                              scm_cons (child->self_scm (), SCM_EOL));
 
   child->daddy_context_ = this;
   this->events_below_->register_as_listener (child->events_below_);
 }
 
-
 Context::Context ()
 {
   daddy_context_ = 0;
@@ -121,18 +120,18 @@ Context::create_unique_context (SCM name, string id, SCM operations)
 
       // Iterate through the path and create all of the implicit contexts.
       for (vsize i = 0; i < path.size (); i++)
-       {
-         SCM ops = SCM_EOL;
-         string id_str = "\\new";
-         if (i == path.size () - 1)
-           {
-             ops = operations;
-             id_str = id;
-           }
-         current = current->create_context (path[i],
-                                            id_str,
-                                            ops);
-       }
+        {
+          SCM ops = SCM_EOL;
+          string id_str = "\\new";
+          if (i == path.size () - 1)
+            {
+              ops = operations;
+              id_str = id;
+            }
+          current = current->create_context (path[i],
+                                             id_str,
+                                             ops);
+        }
 
       return current;
     }
@@ -147,7 +146,7 @@ Context::create_unique_context (SCM name, string id, SCM operations)
   else
     {
       warning (_f ("cannot find or create new `%s'",
-                  ly_symbol2string (name).c_str ()));
+                   ly_symbol2string (name).c_str ()));
       ret = 0;
     }
   return ret;
@@ -172,7 +171,7 @@ Context::find_create_context (SCM n, string id, SCM operations)
       return tg;
     }
 
-  vector<Context_def*> path = path_to_acceptable_context (n);
+  vector<Context_def *> path = path_to_acceptable_context (n);
 
   if (path.size ())
     {
@@ -180,17 +179,17 @@ Context::find_create_context (SCM n, string id, SCM operations)
 
       // start at 1.  The first one (index 0) will be us.
       for (vsize i = 0; i < path.size (); i++)
-       {
-         SCM ops = (i == path.size () -1) ? operations : SCM_EOL;
+        {
+          SCM ops = (i == path.size () - 1) ? operations : SCM_EOL;
 
-         string this_id = "";
-         if (i == path.size () -1)
-           this_id = id;
+          string this_id = "";
+          if (i == path.size () - 1)
+            this_id = id;
 
-         current = current->create_context (path[i],
-                                            this_id,
-                                            ops);
-       }
+          current = current->create_context (path[i],
+                                             this_id,
+                                             ops);
+        }
 
       return current;
     }
@@ -205,7 +204,7 @@ Context::find_create_context (SCM n, string id, SCM operations)
   else
     {
       warning (_f ("cannot find or create `%s' called `%s'",
-                  ly_symbol2string (n).c_str (), id));
+                   ly_symbol2string (n).c_str (), id));
       ret = 0;
     }
   return ret;
@@ -223,16 +222,16 @@ void
 Context::set_property_from_event (SCM sev)
 {
   Stream_event *ev = unsmob_stream_event (sev);
-  
+
   SCM sym = ev->get_property ("symbol");
   if (scm_is_symbol (sym))
     {
       SCM val = ev->get_property ("value");
       bool ok = true;
       if (val != SCM_EOL)
-       ok = type_check_assignment (sym, val, ly_symbol2scm ("translation-type?"));
+        ok = type_check_assignment (sym, val, ly_symbol2scm ("translation-type?"));
       if (ok)
-       set_property (sym, val);
+        set_property (sym, val);
     }
 }
 
@@ -241,7 +240,7 @@ void
 Context::unset_property_from_event (SCM sev)
 {
   Stream_event *ev = unsmob_stream_event (sev);
-  
+
   SCM sym = ev->get_property ("symbol");
   type_check_assignment (sym, SCM_EOL, ly_symbol2scm ("translation-type?"));
   unset_property (sym);
@@ -256,13 +255,13 @@ void
 Context::create_context_from_event (SCM sev)
 {
   Stream_event *ev = unsmob_stream_event (sev);
-  
+
   string id = ly_scm2string (ev->get_property ("id"));
   SCM ops = ev->get_property ("ops");
   SCM type_scm = ev->get_property ("type");
   string type = ly_symbol2string (type_scm);
-  
-  vector<Context_def*> path = path_to_acceptable_context (type_scm);
+
+  vector<Context_def *> path = path_to_acceptable_context (type_scm);
 
   if (path.size () != 1)
     {
@@ -270,31 +269,31 @@ Context::create_context_from_event (SCM sev)
       return;
     }
   Context_def *cdef = path[0];
-  
+
   Context *new_context = cdef->instantiate (ops);
 
   new_context->id_string_ = id;
-  
+
   /* Register various listeners:
       - Make the new context hear events that universally affect contexts
       - connect events_below etc. properly */
   /* We want to be the first ones to hear our own events. Therefore, wait
      before registering events_below_ */
   new_context->event_source ()->
-    add_listener (GET_LISTENER (new_context->create_context_from_event),
-                  ly_symbol2scm ("CreateContext"));
+  add_listener (GET_LISTENER (new_context->create_context_from_event),
+                ly_symbol2scm ("CreateContext"));
   new_context->event_source ()->
-    add_listener (GET_LISTENER (new_context->remove_context),
-                  ly_symbol2scm ("RemoveContext"));
+  add_listener (GET_LISTENER (new_context->remove_context),
+                ly_symbol2scm ("RemoveContext"));
   new_context->event_source ()->
-    add_listener (GET_LISTENER (new_context->change_parent),
-                  ly_symbol2scm ("ChangeParent"));
+  add_listener (GET_LISTENER (new_context->change_parent),
+                ly_symbol2scm ("ChangeParent"));
   new_context->event_source ()->
-    add_listener (GET_LISTENER (new_context->set_property_from_event),
-                  ly_symbol2scm ("SetProperty"));
+  add_listener (GET_LISTENER (new_context->set_property_from_event),
+                ly_symbol2scm ("SetProperty"));
   new_context->event_source ()->
-    add_listener (GET_LISTENER (new_context->unset_property_from_event),
-                  ly_symbol2scm ("UnsetProperty"));
+  add_listener (GET_LISTENER (new_context->unset_property_from_event),
+                ly_symbol2scm ("UnsetProperty"));
 
   new_context->events_below_->register_as_listener (new_context->event_source_);
   this->add_context (new_context);
@@ -309,11 +308,11 @@ Context::create_context_from_event (SCM sev)
   apply_property_operations (new_context, ops);
 
   send_stream_event (this, "AnnounceNewContext", 0,
-                    ly_symbol2scm ("context"), new_context->self_scm (),
-                    ly_symbol2scm ("creator"), sev);
+                     ly_symbol2scm ("context"), new_context->self_scm (),
+                     ly_symbol2scm ("creator"), sev);
 }
 
-vector<Context_def*>
+vector<Context_def *>
 Context::path_to_acceptable_context (SCM name) const
 {
   // The 'accepts elements in definition_mods_ is a list of ('accepts string),
@@ -322,27 +321,27 @@ Context::path_to_acceptable_context (SCM name) const
   for (SCM s = scm_reverse (definition_mods_); scm_is_pair (s); s = scm_cdr (s))
     if (scm_caar (s) == ly_symbol2scm ("accepts"))
       {
-       SCM elt = scm_list_2 (scm_caar (s), scm_string_to_symbol (scm_cadar (s)));
-       accepts = scm_cons (elt, accepts);
+        SCM elt = scm_list_2 (scm_caar (s), scm_string_to_symbol (scm_cadar (s)));
+        accepts = scm_cons (elt, accepts);
       }
 
   return unsmob_context_def (definition_)->path_to_acceptable_context (name,
-                                                                      get_output_def (),
-                                                                      accepts);
-                                                                      
+         get_output_def (),
+         accepts);
+
 }
 
 Context *
 Context::create_context (Context_def *cdef,
-                        string id,
-                        SCM ops)
+                         string id,
+                         SCM ops)
 {
   infant_event_ = 0;
   /* TODO: This is fairly misplaced. We can fix this when we have taken out all
      iterator specific stuff from the Context class */
   event_source_->
-    add_listener (GET_LISTENER (acknowledge_infant),
-                  ly_symbol2scm ("AnnounceNewContext"));
+  add_listener (GET_LISTENER (acknowledge_infant),
+                ly_symbol2scm ("AnnounceNewContext"));
   /* The CreateContext creates a new context, and sends an announcement of the
      new context through another event. That event will be stored in
      infant_event_ to create a return value. */
@@ -351,8 +350,8 @@ Context::create_context (Context_def *cdef,
                      ly_symbol2scm ("type"), cdef->get_context_name (),
                      ly_symbol2scm ("id"), ly_string2scm (id));
   event_source_->
-    remove_listener (GET_LISTENER (acknowledge_infant),
-                     ly_symbol2scm ("AnnounceNewContext"));
+  remove_listener (GET_LISTENER (acknowledge_infant),
+                   ly_symbol2scm ("AnnounceNewContext"));
 
   assert (infant_event_);
   SCM infant_scm = infant_event_->get_property ("context");
@@ -375,8 +374,8 @@ SCM
 Context::default_child_context_name () const
 {
   return scm_is_pair (accepts_list_)
-    ? scm_car (accepts_list_)
-    : SCM_EOL;
+         ? scm_car (accepts_list_)
+         : SCM_EOL;
 }
 
 bool
@@ -396,10 +395,10 @@ Context::get_default_interpreter (string context_id)
       string name = ly_symbol2string (nm);
       Context_def *t = unsmob_context_def (st);
       if (!t)
-       {
-         warning (_f ("cannot find or create: `%s'", name.c_str ()));
-         t = unsmob_context_def (this->definition_);
-       }
+        {
+          warning (_f ("cannot find or create: `%s'", name.c_str ()));
+          t = unsmob_context_def (this->definition_);
+        }
 
       Context *tg = create_context (t, context_id, SCM_EOL);
       return tg->get_default_interpreter (context_id);
@@ -456,7 +455,7 @@ Context::internal_send_stream_event (SCM type, Input *origin, SCM props[])
   Stream_event *e = new Stream_event (type, origin);
   for (int i = 0; props[i]; i += 2)
     {
-      e->set_property (props[i], props[i+1]);
+      e->set_property (props[i], props[i + 1]);
     }
   event_source_->broadcast (e);
   e->unprotect ();
@@ -482,7 +481,7 @@ Context::add_alias (SCM sym)
 
 /* we don't (yet) instrument context properties */
 void
-Context::instrumented_set_property (SCM sym, SCM val, const char*, int, const char*)
+Context::instrumented_set_property (SCM sym, SCM val, const char *, int, const char *)
 {
   internal_set_property (sym, val);
 }
@@ -490,10 +489,13 @@ Context::instrumented_set_property (SCM sym, SCM val, const char*, int, const ch
 void
 Context::internal_set_property (SCM sym, SCM val)
 {
+  bool type_check_ok = type_check_assignment (sym, val, ly_symbol2scm ("translation-type?"));
+
   if (do_internal_type_checking_global)
-    assert (type_check_assignment (sym, val, ly_symbol2scm ("translation-type?")));
+    assert (type_check_ok);
 
-  properties_dict ()->set (sym, val);
+  if (type_check_ok)
+    properties_dict ()->set (sym, val);
 }
 
 /*
@@ -543,12 +545,12 @@ Context::disconnect_from_parent ()
 */
 Context *
 find_context_below (Context *where,
-                   SCM type, string id)
+                    SCM type, string id)
 {
   if (where->is_alias (type))
     {
       if (id == "" || where->id_string () == id)
-       return where;
+        return where;
     }
 
   Context *found = 0;
@@ -709,11 +711,11 @@ measure_position (Context const *context)
       m = *unsmob_moment (sm);
 
       if (m.main_part_ < Rational (0))
-       {
-         Rational length (measure_length (context));
-         while (m.main_part_ < Rational (0))
-           m.main_part_ += length;
-       }
+        {
+          Rational length (measure_length (context));
+          while (m.main_part_ < Rational (0))
+            m.main_part_ += length;
+        }
     }
 
   return m;
@@ -727,9 +729,9 @@ measure_position (Context const *context, Duration const *dur)
   Moment pos = measure_position (context);
   Rational dur_length = dur ? dur->get_length () : Rational (0);
 
-  Moment end_pos = pos.grace_part_ < Rational(0)
-    ? Moment(pos.main_part_, pos.grace_part_ + dur_length)
-    : Moment(pos.main_part_ + dur_length, 0);
+  Moment end_pos = pos.grace_part_ < Rational (0)
+                   ? Moment (pos.main_part_, pos.grace_part_ + dur_length)
+                   : Moment (pos.main_part_ + dur_length, 0);
 
   return end_pos;
 }
@@ -748,7 +750,6 @@ measure_number (Context const *context)
   return bn;
 }
 
-
 void
 set_context_property_on_children (Context *trans, SCM sym, SCM val)
 {
@@ -778,7 +779,7 @@ check_repeat_count_visibility (Context const *context, SCM count)
 {
   SCM proc = context->get_property ("repeatCountVisibility");
   return (ly_is_procedure (proc)
-         && to_boolean (scm_call_2 (proc,
-                                    count,
-                                    context->self_scm ())));
+          && to_boolean (scm_call_2 (proc,
+                                     count,
+                                     context->self_scm ())));
 }
index 611bd6b48bcbf310361a6be6a2437c26b7c15446..84f8044b4728a45b5248c43b7663cb3f9d2e3f78 100644 (file)
@@ -21,7 +21,6 @@ protected:
   virtual void acknowledge_audio_element (Audio_element_info info);
 };
 
-
 Control_track_performer::Control_track_performer ()
 {
   control_track_ = 0;
@@ -30,11 +29,11 @@ Control_track_performer::Control_track_performer ()
 void
 Control_track_performer::acknowledge_audio_element (Audio_element_info info)
 {
-  if (Audio_tempo *tempo = dynamic_cast<Audio_tempo*> (info.elem_))
+  if (Audio_tempo *tempo = dynamic_cast<Audio_tempo *> (info.elem_))
     {
       control_track_->add_audio_item (tempo);
     }
-  if (Audio_time_signature * sig = dynamic_cast<Audio_time_signature *> (info.elem_))
+  if (Audio_time_signature *sig = dynamic_cast<Audio_time_signature *> (info.elem_))
     {
       control_track_->add_audio_item (sig);
     }
@@ -47,7 +46,7 @@ Control_track_performer::add_text (Audio_text::Type text_type, string str)
   control_track_->add_audio_item (text);
 
   announce_element (Audio_element_info (text, 0));
-  
+
 }
 
 void
@@ -57,22 +56,22 @@ Control_track_performer::initialize ()
   announce_element (Audio_element_info (control_track_, 0));
 
   string id_string = String_convert::pad_to (gnu_lilypond_version_string (), 30);
-  
+
   add_text (Audio_text::TRACK_NAME, "control track");
   add_text (Audio_text::TEXT, "creator: ");
   add_text (Audio_text::TEXT, id_string);
 }
 
 ADD_TRANSLATOR (Control_track_performer,
-               /* doc */
-               "",
+                /* doc */
+                "",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index c597b368e18c93b94a0830facf6eec9edbbe8571..28e11e17df43dbb2bfa0c476375c25b8e9ce3680 100644 (file)
@@ -112,11 +112,11 @@ Cue_clef_engraver::create_octavate_eight (SCM oct)
       abs_oct = abs (abs_oct) + 1;
 
       SCM txt = scm_number_to_string (scm_from_int (abs_oct),
-                                     scm_from_int (10));
+                                      scm_from_int (10));
 
       g->set_property ("text",
-                      scm_list_n (ly_lily_module_constant ("vcenter-markup"),
-                                  txt, SCM_UNDEFINED));
+                       scm_list_n (ly_lily_module_constant ("vcenter-markup"),
+                                   txt, SCM_UNDEFINED));
       Side_position_interface::add_support (g, clef_);
 
       g->set_parent (clef_, Y_AXIS);
@@ -136,7 +136,7 @@ Cue_clef_engraver::create_clef ()
       clef_ = c;
       SCM cpos = get_property ("cueClefPosition");
       if (scm_is_number (cpos))
-       clef_->set_property ("staff-position", cpos);
+        clef_->set_property ("staff-position", cpos);
 
       create_octavate_eight (get_property ("cueClefOctavation"));
     }
@@ -150,7 +150,7 @@ Cue_clef_engraver::create_end_clef ()
       clef_ = make_item ("CueEndClef", SCM_EOL);
       SCM cpos = get_property ("clefPosition");
       if (scm_is_number (cpos))
-       clef_->set_property ("staff-position", cpos);
+        clef_->set_property ("staff-position", cpos);
 
       create_octavate_eight (get_property ("clefOctavation"));
     }
@@ -175,11 +175,11 @@ Cue_clef_engraver::inspect_clef_properties ()
     {
       set_glyph ();
       if (scm_is_string (glyph))
-       {
-         create_clef ();
-         if (clef_)
-           clef_->set_property ("non-default", SCM_BOOL_T);
-       }
+        {
+          create_clef ();
+          if (clef_)
+            clef_->set_property ("non-default", SCM_BOOL_T);
+        }
       else
         create_end_clef ();
 
@@ -197,10 +197,10 @@ Cue_clef_engraver::stop_translation_timestep ()
     {
       SCM vis = 0;
       if (to_boolean (clef_->get_property ("non-default")))
-       vis = get_property ("explicitCueClefVisibility");
+        vis = get_property ("explicitCueClefVisibility");
 
       if (vis)
-       clef_->set_property ("break-visibility", vis);
+        clef_->set_property ("break-visibility", vis);
 
       clef_ = 0;
       octavate_ = 0;
@@ -209,22 +209,22 @@ Cue_clef_engraver::stop_translation_timestep ()
 
 ADD_ACKNOWLEDGER (Cue_clef_engraver, bar_line);
 ADD_TRANSLATOR (Cue_clef_engraver,
-               /* doc */
-               "Determine and set reference point for pitches in cued voices.",
-
-               /* create */
-               "CueClef "
-               "CueEndClef "
-               "OctavateEight ",
-
-               /* read */
-               "cueClefGlyph "
-               "cueClefOctavation "
-               "cueClefPosition "
-               "explicitCueClefVisibility "
-               "middleCCuePosition "
-               "clefOctavation ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Determine and set reference point for pitches in cued voices.",
+
+                /* create */
+                "CueClef "
+                "CueEndClef "
+                "OctavateEight ",
+
+                /* read */
+                "cueClefGlyph "
+                "cueClefOctavation "
+                "cueClefPosition "
+                "explicitCueClefVisibility "
+                "middleCCuePosition "
+                "clefOctavation ",
+
+                /* write */
+                ""
+               );
index f1111e829e5bdf033ed1c3e670002bba50085782..2922a04018b8dac1097af6fba31ac05123031401 100644 (file)
@@ -49,7 +49,7 @@ public:
 private:
   Item *create_custos ();
   bool custos_permitted_;
-  vector<Grob*> custodes_;
+  vector<Grob *> custodes_;
   vector<Pitch> pitches_;
 };
 
@@ -89,12 +89,12 @@ Custos_engraver::acknowledge_note_head (Grob_info info)
     {
 
       /*
-       ideally, we'd do custos->set_parent (Y_AXIS, notehead),
-       but since the note head lives on the other system, we can't
+        ideally, we'd do custos->set_parent (Y_AXIS, notehead),
+        but since the note head lives on the other system, we can't
 
-       So we copy the position from the note head pitch.  We
-       don't look at the staff-position, since we can't be sure
-       whether Clef_engraver already applied a vertical shift.
+        So we copy the position from the note head pitch.  We
+        don't look at the staff-position, since we can't be sure
+        whether Clef_engraver already applied a vertical shift.
       */
       pitches_.push_back (*unsmob_pitch (ev->get_property ("pitch")));
     }
@@ -109,17 +109,17 @@ Custos_engraver::process_acknowledged ()
   if (custos_permitted_)
     {
       for (vsize i = pitches_.size (); i--;)
-       {
-         Item *c = create_custos ();
+        {
+          Item *c = create_custos ();
 
-         int p = pitches_[i].steps ();
-         SCM c0 = get_property ("middleCPosition");
-         if (scm_is_number (c0))
-           p += scm_to_int (c0);
+          int p = pitches_[i].steps ();
+          SCM c0 = get_property ("middleCPosition");
+          if (scm_is_number (c0))
+            p += scm_to_int (c0);
 
-         c->set_property ("staff-position",
-                          scm_from_int (p));
-       }
+          c->set_property ("staff-position",
+                           scm_from_int (p));
+        }
 
       pitches_.clear ();
     }
@@ -147,15 +147,15 @@ ADD_ACKNOWLEDGER (Custos_engraver, bar);
 ADD_ACKNOWLEDGER (Custos_engraver, note_head);
 
 ADD_TRANSLATOR (Custos_engraver,
-               /* doc */
-               "Engrave custodes.",
+                /* doc */
+                "Engrave custodes.",
 
-               /* create */
-               "Custos ",
+                /* create */
+                "Custos ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index f312e4a8abbaebebfba22bf585fbcf8eb2e6f7ce..d3fd23928da97e2a4b4cbc4776bba795594ca366 100644 (file)
@@ -93,12 +93,12 @@ Custos::print (SCM smob)
 }
 
 ADD_INTERFACE (Custos,
-              "A custos object.  @code{style} can have four valid values:"
-              " @code{mensural}, @code{vaticana}, @code{medicaea}, and"
-              " @code{hufnagel}.  @code{mensural} is the default style.",
-
-              /* properties */
-              "style "
-              "neutral-position "
-              "neutral-direction "
-              );
+               "A custos object.  @code{style} can have four valid values:"
+               " @code{mensural}, @code{vaticana}, @code{medicaea}, and"
+               " @code{hufnagel}.  @code{mensural} is the default style.",
+
+               /* properties */
+               "style "
+               "neutral-position "
+               "neutral-direction "
+              );
index 5bd1232e3007be6f4f49bf0a59df3140ad17a8b2..5c87f7d7b5169ad8e60db2589b908263db243998 100644 (file)
@@ -38,25 +38,25 @@ public:
 #include "translator.icc"
 
 ADD_TRANSLATOR (Default_bar_line_engraver,
-               /* doc */
-               "This engraver determines what kind of automatic bar lines"
-               " should be produced, and sets @code{whichBar} accordingly."
-               "  It should be at the same level as @ref{Timing_translator}.",
-               
-               /* create */
-               "",
-
-               /* read */
-               "automaticBars "
-               "barAlways "
-               "defaultBarType "
-               "measureLength "
-               "whichBar "
-               "measurePosition ",
-               
-               /* write */
-               "automaticBars "
-               );
+                /* doc */
+                "This engraver determines what kind of automatic bar lines"
+                " should be produced, and sets @code{whichBar} accordingly."
+                "  It should be at the same level as @ref{Timing_translator}.",
+
+                /* create */
+                "",
+
+                /* read */
+                "automaticBars "
+                "barAlways "
+                "defaultBarType "
+                "measureLength "
+                "whichBar "
+                "measurePosition ",
+
+                /* write */
+                "automaticBars "
+               );
 
 Default_bar_line_engraver::Default_bar_line_engraver ()
 {
@@ -76,18 +76,18 @@ Default_bar_line_engraver::start_translation_timestep ()
 
   Moment mp = measure_position (context ());
   bool start_of_measure = (last_moment_.main_part_ != now.main_part_
-                          && !mp.main_part_);
+                           && !mp.main_part_);
 
   if (!scm_is_string (which) && to_boolean (automatic_bars))
     {
       SCM always = get_property ("barAlways");
 
       if ((start_of_measure && last_moment_.main_part_ >= Moment (0))
-         || to_boolean (always))
-       {
-         /* should this work, or be junked?  See input/bugs/no-bars.ly */
-         which = get_property ("defaultBarType");
-       }
+          || to_boolean (always))
+        {
+          /* should this work, or be junked?  See input/bugs/no-bars.ly */
+          which = get_property ("defaultBarType");
+        }
     }
 
   context ()->set_property ("whichBar", which);
index 8f0022957ac25fbeb6a862f4b4a24c32f2c46d5a..524899b28b985cb728bc16b38d1bc66000b63905 100644 (file)
@@ -17,7 +17,6 @@
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include "dimension-cache.hh"
 
 #include "warn.hh"
index 3524faf49b7cf6af8be077eeaaa4281687a8796e..278610780f54b7ee3ec04d2049370a427680a268 100644 (file)
 #include "warn.hh"
 
 LY_DEFINE (ly_pt, "ly:pt",
-          1, 0, 0, (SCM num),
-          "@var{num} printer points.")
+           1, 0, 0, (SCM num),
+           "@var{num} printer points.")
 {
   LY_ASSERT_TYPE (scm_is_number, num, 1);
   return scm_from_double (point_constant
-                         * scm_to_double (num));
+                          * scm_to_double (num));
 }
 
 LY_DEFINE (ly_cm, "ly:cm",
-          1, 0, 0, (SCM num),
-          "@var{num} cm.")
+           1, 0, 0, (SCM num),
+           "@var{num} cm.")
 {
   LY_ASSERT_TYPE (scm_is_number, num, 1);
   return scm_from_double (cm_constant
-                         * scm_to_double (num));
+                          * scm_to_double (num));
 }
 
 LY_DEFINE (ly_inch, "ly:inch",
-          1, 0, 0, (SCM num),
-          "@var{num} inches.")
+           1, 0, 0, (SCM num),
+           "@var{num} inches.")
 {
   LY_ASSERT_TYPE (scm_is_number, num, 1);
   return scm_from_double (inch_constant
-                         * scm_to_double (num));
+                          * scm_to_double (num));
 }
 
 LY_DEFINE (ly_mm, "ly:mm",
-          1, 0, 0, (SCM num),
-          "@var{num} mm.")
+           1, 0, 0, (SCM num),
+           "@var{num} mm.")
 {
   LY_ASSERT_TYPE (scm_is_number, num, 1);
   return scm_from_double (mm_constant
-                         * scm_to_double (num));
+                          * scm_to_double (num));
 }
 
 LY_DEFINE (ly_bp, "ly:bp",
-          1, 0, 0, (SCM num),
-          "@var{num} bigpoints (1/72th inch).")
+           1, 0, 0, (SCM num),
+           "@var{num} bigpoints (1/72th inch).")
 {
   LY_ASSERT_TYPE (scm_is_number, num, 1);
   return scm_from_double (bigpoint_constant
-                         * scm_to_double (num));
+                          * scm_to_double (num));
 }
index bd928173d4329c921f3a35906fe5df5875d004ac..39e35eefb4f40bf400ca2efa3214e137f3aed4bc 100644 (file)
 #include "dispatcher.hh"
 
 LY_DEFINE (ly_make_dispatcher, "ly:make-dispatcher",
-          0, 0, 0, (),
-          "Return a newly created dispatcher.")
+           0, 0, 0, (),
+           "Return a newly created dispatcher.")
 {
   return (new Dispatcher ())->unprotect ();
 }
 
 LY_DEFINE (ly_connect_dispatchers, "ly:connect-dispatchers",
-          2, 0, 0, (SCM to, SCM from),
-          "Make the dispatcher @var{to} listen to events from @var{from}.")
+           2, 0, 0, (SCM to, SCM from),
+           "Make the dispatcher @var{to} listen to events from @var{from}.")
 {
   Dispatcher *t = unsmob_dispatcher (to);
   Dispatcher *f = unsmob_dispatcher (from);
-  
-  LY_ASSERT_SMOB (Dispatcher, to, 1); 
-  LY_ASSERT_SMOB (Dispatcher, from,  2); 
+
+  LY_ASSERT_SMOB (Dispatcher, to, 1);
+  LY_ASSERT_SMOB (Dispatcher, from, 2);
 
   t->register_as_listener (f);
 
@@ -42,17 +42,17 @@ LY_DEFINE (ly_connect_dispatchers, "ly:connect-dispatchers",
 }
 
 LY_DEFINE (ly_add_listener, "ly:add-listener",
-          2, 0, 1, (SCM list, SCM disp, SCM cl),
-          "Add the listener @var{list} to the dispatcher @var{disp}."
-          "  Whenever @var{disp} hears an event of class @var{cl},"
-          " it is forwarded to @var{list}.")
+           2, 0, 1, (SCM list, SCM disp, SCM cl),
+           "Add the listener @var{list} to the dispatcher @var{disp}."
+           "  Whenever @var{disp} hears an event of class @var{cl},"
+           " it is forwarded to @var{list}.")
 {
   Listener *l = unsmob_listener (list);
   Dispatcher *d = unsmob_dispatcher (disp);
 
-  LY_ASSERT_SMOB (Listener, list, 1); 
-  LY_ASSERT_SMOB (Dispatcher, disp, 2); 
-  
+  LY_ASSERT_SMOB (Listener, list, 1);
+  LY_ASSERT_SMOB (Dispatcher, disp, 2);
+
   for (int arg = SCM_ARG3; scm_is_pair (cl); cl = scm_cdr (cl), arg++)
     {
       SCM sym = scm_car (cl);
@@ -64,15 +64,15 @@ LY_DEFINE (ly_add_listener, "ly:add-listener",
 }
 
 LY_DEFINE (ly_broadcast, "ly:broadcast",
-          2, 0, 0, (SCM disp, SCM ev),
-          "Send the stream event @var{ev} to the dispatcher @var{disp}.")
+           2, 0, 0, (SCM disp, SCM ev),
+           "Send the stream event @var{ev} to the dispatcher @var{disp}.")
 {
   Dispatcher *d = unsmob_dispatcher (disp);
   Stream_event *e = unsmob_stream_event (ev);
+
   LY_ASSERT_SMOB (Dispatcher, disp, 1);
 
-  LY_ASSERT_SMOB (Stream_event, ev, 2); 
+  LY_ASSERT_SMOB (Stream_event, ev, 2);
   d->broadcast (e);
   return SCM_UNDEFINED;
 }
index 856090fdb1e1167114ed0d98b960a40e7bece2c4..a6cee709ce0649497a7b5a500aa8b8351e1200db 100644 (file)
@@ -54,7 +54,7 @@ Dispatcher::mark_smob (SCM sm)
 }
 
 int
-Dispatcher::print_smob (SCM s, SCM p, scm_print_state*)
+Dispatcher::print_smob (SCM s, SCM p, scm_print_state *)
 {
   Dispatcher *me = (Dispatcher *) SCM_CELL_WORD_1 (s);
   scm_puts ("#<Dispatcher ", p);
@@ -109,23 +109,23 @@ Dispatcher::dispatch (SCM sev)
     The first step is to collect all listener lists and to initially
     insert them in the priority queue.
   */
-  struct { int prio; SCM list; } lists[num_classes+1];
+  struct { int prio; SCM list; } lists[num_classes + 1];
   int i = 0;
   for (SCM cl = class_list; scm_is_pair (cl); cl = scm_cdr (cl))
     {
       SCM list = scm_hashq_ref (listeners_, scm_car (cl), SCM_EOL);
       if (!scm_is_pair (list))
-       num_classes--;
+        num_classes--;
       else
-       {
+        {
           // bubblesort.
           int prio = scm_to_int (scm_caar (list));
-         int j;
-         for (j = i; j > 0 && lists[j-1].prio > prio; j--)
-           lists[j] = lists[j-1];
-         lists[j].prio = prio;
-         lists[j].list = list;
-         i++;
+          int j;
+          for (j = i; j > 0 && lists[j - 1].prio > prio; j--)
+            lists[j] = lists[j - 1];
+          lists[j].prio = prio;
+          lists[j].list = list;
+          i++;
         }
     }
   lists[num_classes].prio = INT_MAX;
@@ -155,16 +155,16 @@ Dispatcher::dispatch (SCM sev)
       if (!scm_is_pair (next))
         num_classes--;
       int prio = (scm_is_pair (next)) ? scm_to_int (scm_caar (next)) : INT_MAX;
-      for (i = 0; prio > lists[i+1].prio; i++)
-        lists[i] = lists[i+1];
+      for (i = 0; prio > lists[i + 1].prio; i++)
+        lists[i] = lists[i + 1];
       lists[i].prio = prio;
       lists[i].list = next;
     }
 
-/* TODO: Uncomment.
-  if (!sent)
-    warning (_f ("Junking event: %s", ly_symbol2string (class_symbol).c_str ()));
-*/
+  /* TODO: Uncomment.
+    if (!sent)
+      warning (_f ("Junking event: %s", ly_symbol2string (class_symbol).c_str ()));
+  */
 }
 
 void
@@ -188,11 +188,11 @@ Dispatcher::internal_add_listener (Listener l, SCM ev_class, int priority)
       /* Tell all dispatchers that we listen to, that we want to hear ev_class
          events */
       for (SCM disp = dispatchers_; scm_is_pair (disp); disp = scm_cdr (disp))
-       {
-         int priority = scm_to_int (scm_cdar (disp));
-         Dispatcher *d = unsmob_dispatcher (scm_caar (disp));
-         d->internal_add_listener (GET_LISTENER (dispatch), ev_class, priority);
-       }
+        {
+          int priority = scm_to_int (scm_cdar (disp));
+          Dispatcher *d = unsmob_dispatcher (scm_caar (disp));
+          d->internal_add_listener (GET_LISTENER (dispatch), ev_class, priority);
+        }
       listen_classes_ = scm_cons (ev_class, listen_classes_);
     }
   SCM entry = scm_cons (scm_from_int (priority), l.smobbed_copy ());
@@ -219,9 +219,9 @@ Dispatcher::remove_listener (Listener l, SCM ev_class)
   while (scm_is_pair (scm_cdr (e)))
     if (*unsmob_listener (scm_cdadr (e)) == l && first)
       {
-       scm_set_cdr_x (e, scm_cddr (e));
-       first = false;
-       break;
+        scm_set_cdr_x (e, scm_cddr (e));
+        first = false;
+        break;
       }
     else
       e = scm_cdr (e);
@@ -234,10 +234,10 @@ Dispatcher::remove_listener (Listener l, SCM ev_class)
     {
       /* Unregister with all dispatchers. */
       for (SCM disp = dispatchers_; scm_is_pair (disp); disp = scm_cdr (disp))
-       {
-         Dispatcher *d = unsmob_dispatcher (scm_caar (disp));
-         d->remove_listener (GET_LISTENER (dispatch), ev_class);
-       }
+        {
+          Dispatcher *d = unsmob_dispatcher (scm_caar (disp));
+          d->remove_listener (GET_LISTENER (dispatch), ev_class);
+        }
       listen_classes_ = scm_delq_x (ev_class, listen_classes_);
     }
 }
index e83011281bdab48cd42cf8eeb147a4f05b893d66..de34eff525e5639cb836de67a8fe308fe96a649e 100644 (file)
@@ -55,25 +55,24 @@ Dot_column_engraver::acknowledge_rhythmic_head (Grob_info info)
   if (d)
     {
       if (!dotcol_)
-       dotcol_ = make_item ("DotColumn", SCM_EOL);
+        dotcol_ = make_item ("DotColumn", SCM_EOL);
 
       Dot_column::add_head (dotcol_, info.grob ());
     }
 }
 
-
 ADD_ACKNOWLEDGER (Dot_column_engraver, rhythmic_head);
 ADD_TRANSLATOR (Dot_column_engraver,
-               /* doc */
-               "Engrave dots on dotted notes shifted to the right of the"
-               " note.  If omitted, then dots appear on top of the notes.",
+                /* doc */
+                "Engrave dots on dotted notes shifted to the right of the"
+                " note.  If omitted, then dots appear on top of the notes.",
 
-               /* create */
-               "DotColumn ",
+                /* create */
+                "DotColumn ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 17d7effd7c947c6eb4178242e0bb0c465a08857a..fff2359cc0376f774e46ab531798213e0dd62e40 100644 (file)
@@ -45,7 +45,7 @@ MAKE_SCHEME_CALLBACK (Dot_column, calc_positioning_done, 1);
 SCM
 Dot_column::calc_positioning_done (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);  
+  Grob *me = unsmob_grob (smob);
 
   /*
     Trigger note collision resolution first, since that may kill off
@@ -56,10 +56,10 @@ Dot_column::calc_positioning_done (SCM smob)
 
   me->set_property ("positioning-done", SCM_BOOL_T);
 
-  vector<Grob*> dots
+  vector<Grob *> dots
     = extract_grob_array (me, "dots");
 
-  vector<Grob*> main_heads;
+  vector<Grob *> main_heads;
   Real ss = 0;
 
   Grob *commonx = me;
@@ -67,56 +67,56 @@ Dot_column::calc_positioning_done (SCM smob)
     {
       Grob *n = dots[i]->get_parent (Y_AXIS);
       commonx = n->common_refpoint (commonx, X_AXIS);
-      
-      if (Grob *stem = unsmob_grob (n->get_object("stem")))
-       {
-         commonx = stem->common_refpoint (commonx, X_AXIS);
-         
-         if (Stem::first_head (stem) == n)
-           main_heads.push_back (n);
-       }
+
+      if (Grob *stem = unsmob_grob (n->get_object ("stem")))
+        {
+          commonx = stem->common_refpoint (commonx, X_AXIS);
+
+          if (Stem::first_head (stem) == n)
+            main_heads.push_back (n);
+        }
     }
 
   vector<Box> boxes;
-  set<Grob*> stems;
+  set<Grob *> stems;
 
-  extract_grob_set(me, "side-support-elements", support);
+  extract_grob_set (me, "side-support-elements", support);
 
   Interval base_x;
   for (vsize i = 0; i < main_heads.size (); i++)
     base_x.unite (main_heads[i]->extent (commonx, X_AXIS));
+
   for (vsize i = 0; i < support.size (); i++)
     {
       Grob *s = support[i];
       if (!ss)
-       ss = Staff_symbol_referencer::staff_space (s);
+        ss = Staff_symbol_referencer::staff_space (s);
 
       /* can't inspect Y extent of rest.
-        
-        Rest collisions should wait after line breaking.
+
+         Rest collisions should wait after line breaking.
       */
       Interval y;
       if (Rest::has_interface (s))
-       {
-         base_x.unite (s->extent (commonx, X_AXIS));
-         continue;
-       }
+        {
+          base_x.unite (s->extent (commonx, X_AXIS));
+          continue;
+        }
       else if (Stem::has_interface (s))
-       {
-         Real y1 = Stem::head_positions (s)[-get_grob_direction (s)];
-         Real y2 = y1 + get_grob_direction (s) * 7;
+        {
+          Real y1 = Stem::head_positions (s)[-get_grob_direction (s)];
+          Real y2 = y1 + get_grob_direction (s) * 7;
 
-         y.add_point (y1);
-         y.add_point (y2);
-       }
+          y.add_point (y1);
+          y.add_point (y2);
+        }
       else if (Note_head::has_interface (s))
-       y = Interval (-1, 1);
+        y = Interval (-1, 1);
       else
-       {
-         programming_error ("unknown grob in dot col support");
-         continue;
-       }
+        {
+          programming_error ("unknown grob in dot col support");
+          continue;
+        }
 
       y *= 2 / ss;
       y += Staff_symbol_referencer::get_position (s);
@@ -125,35 +125,35 @@ Dot_column::calc_positioning_done (SCM smob)
       boxes.push_back (b);
 
       if (Grob *stem = unsmob_grob (s->get_object ("stem")))
-       stems.insert (stem);
+        stems.insert (stem);
     }
 
-  for (set<Grob*>::const_iterator i (stems.begin());
+  for (set<Grob *>::const_iterator i (stems.begin ());
        i != stems.end (); i++)
     {
       Grob *stem = (*i);
       Stencil flag = Stem::flag (stem);
       if (!flag.is_empty ())
-       {
-         Interval y = flag.extent (Y_AXIS)
-           * (2 / ss)
-           + Stem::stem_end_position (stem);
+        {
+          Interval y = flag.extent (Y_AXIS)
+                       * (2 / ss)
+                       + Stem::stem_end_position (stem);
 
-         Interval x = stem->relative_coordinate (commonx, X_AXIS)
-           + flag.extent (X_AXIS);
+          Interval x = stem->relative_coordinate (commonx, X_AXIS)
+                       + flag.extent (X_AXIS);
 
-         boxes.push_back (Box (x,y));
-       }
+          boxes.push_back (Box (x, y));
+        }
     }
-             
+
   vector_sort (dots, position_less);
   for (vsize i = dots.size (); i--;)
     {
       if (!dots[i]->is_live ())
-       dots.erase (dots.begin () + i);
+        dots.erase (dots.begin () + i);
       else
-       // Undo any fake translations that were done in add_head.
-       dots[i]->translate_axis (-dots[i]->relative_coordinate (me, X_AXIS), X_AXIS);
+        // Undo any fake translations that were done in add_head.
+        dots[i]->translate_axis (-dots[i]->relative_coordinate (me, X_AXIS), X_AXIS);
     }
 
   Dot_formatting_problem problem (boxes, base_x);
@@ -166,27 +166,27 @@ Dot_column::calc_positioning_done (SCM smob)
 
       Grob *note = dots[i]->get_parent (Y_AXIS);
       if (note)
-       {
-         Grob *stem = unsmob_grob (note->get_object ("stem"));
-         if (stem)
-           dp.extremal_head_ = Stem::first_head (stem) == note;
-         
-         dp.x_extent_ = note->extent (commonx, X_AXIS);
-       }
+        {
+          Grob *stem = unsmob_grob (note->get_object ("stem"));
+          if (stem)
+            dp.extremal_head_ = Stem::first_head (stem) == note;
+
+          dp.x_extent_ = note->extent (commonx, X_AXIS);
+        }
 
       int p = Staff_symbol_referencer::get_rounded_position (dp.dot_);
 
       /* icky, since this should go via a Staff_symbol_referencer
-        offset callback but adding a dot overwrites Y-offset. */
+         offset callback but adding a dot overwrites Y-offset. */
       p += (int) robust_scm2double (dp.dot_->get_property ("staff-position"), 0.0);
       dp.pos_ = p;
       if (dp.extremal_head_)
-       dp.dir_ = to_dir (dp.dot_->get_property ("direction"));
+        dp.dir_ = to_dir (dp.dot_->get_property ("direction"));
 
       cfg.remove_collision (p);
       cfg[p] = dp;
       if (Staff_symbol_referencer::on_line (dp.dot_, p))
-       cfg.remove_collision (p);
+        cfg.remove_collision (p);
     }
 
   problem.register_configuration (cfg);
@@ -195,13 +195,13 @@ Dot_column::calc_positioning_done (SCM smob)
        i != cfg.end (); i++)
     {
       /*
-       Junkme?
+        Junkme?
        */
       Staff_symbol_referencer::set_position (i->second.dot_, i->first);
     }
-  
+
   me->translate_axis (cfg.x_offset () - me->relative_coordinate (commonx, X_AXIS),
-                     X_AXIS);
+                      X_AXIS);
   return SCM_BOOL_T;
 }
 
@@ -221,20 +221,20 @@ Dot_column::add_head (Grob *me, Grob *head)
       // The translation here is undone in calc_positioning_done, where we
       // do the X-offset properly.
       if (Rest::has_interface (head))
-       d->translate_axis (head->extent (head, X_AXIS).length (), X_AXIS);
+        d->translate_axis (head->extent (head, X_AXIS).length (), X_AXIS);
       else
-       d->set_property ("X-offset", Grob::x_parent_positioning_proc);
+        d->set_property ("X-offset", Grob::x_parent_positioning_proc);
       Axis_group_interface::add_element (me, d);
     }
 }
 
 ADD_INTERFACE (Dot_column,
-              "Group dot objects so they form a column, and position"
-              " dots so they do not clash with staff lines.",
-
-              /* properties */
-              "dots "
-              "positioning-done "
-              "direction "
-              );
+               "Group dot objects so they form a column, and position"
+               " dots so they do not clash with staff lines.",
+
+               /* properties */
+               "dots "
+               "positioning-done "
+               "direction "
+              );
 
index b72bd54ef7d7c842cbf59b11948cd83a98abbe0c..fefb9834330e1418ff8966d4742b2a23b0414873 100644 (file)
@@ -22,7 +22,6 @@
 #include "dot-formatting-problem.hh"
 #include "staff-symbol-referencer.hh"
 
-
 int
 Dot_configuration::badness () const
 {
@@ -35,15 +34,15 @@ Dot_configuration::badness () const
 
       int dot_move_dir = sign (p - i->second.pos_);
       if (i->second.extremal_head_)
-       {
-         if (i->second.dir_
-             && dot_move_dir != i->second.dir_)
-           demerit += 3;
-         else if (dot_move_dir != UP)
-           demerit += 2;
-       }
+        {
+          if (i->second.dir_
+              && dot_move_dir != i->second.dir_)
+            demerit += 3;
+          else if (dot_move_dir != UP)
+            demerit += 2;
+        }
       else if (dot_move_dir != UP)
-       demerit += 1;
+        demerit += 1;
 
       t += demerit;
     }
@@ -77,55 +76,55 @@ Dot_configuration::shifted (int k, Direction d) const
   if (d > 0)
     {
       for (Dot_configuration::const_iterator i (begin ());
-          i != end (); i++)
-       {
-         int p = i->first;
-         if (p == k)
-           {
-             if (Staff_symbol_referencer::on_line (i->second.dot_, p))
-               p += d;
-             else
-               p += 2* d;
-
-             offset = 2*d;
-
-             new_cfg[p] = i->second;
-           }
-         else
-           {
-             if (new_cfg.find (p) == new_cfg.end ())
-               offset = 0;
-             new_cfg[p + offset] = i->second;
-           }
-       }
+           i != end (); i++)
+        {
+          int p = i->first;
+          if (p == k)
+            {
+              if (Staff_symbol_referencer::on_line (i->second.dot_, p))
+                p += d;
+              else
+                p += 2 * d;
+
+              offset = 2 * d;
+
+              new_cfg[p] = i->second;
+            }
+          else
+            {
+              if (new_cfg.find (p) == new_cfg.end ())
+                offset = 0;
+              new_cfg[p + offset] = i->second;
+            }
+        }
     }
   else
     {
       Dot_configuration::const_iterator i (end ());
       do
-       {
-         i--;
-
-         int p = i->first;
-         if (p == k)
-           {
-             if (Staff_symbol_referencer::on_line (i->second.dot_, p))
-               p += d;
-             else
-               p += 2* d;
-
-             offset = 2*d;
-
-             new_cfg[p] = i->second;
-           }
-         else
-           {
-             if (new_cfg.find (p) == new_cfg.end ())
-               offset = 0;
-
-             new_cfg[p + offset] = i->second;
-           }
-       }
+        {
+          i--;
+
+          int p = i->first;
+          if (p == k)
+            {
+              if (Staff_symbol_referencer::on_line (i->second.dot_, p))
+                p += d;
+              else
+                p += 2 * d;
+
+              offset = 2 * d;
+
+              new_cfg[p] = i->second;
+            }
+          else
+            {
+              if (new_cfg.find (p) == new_cfg.end ())
+                offset = 0;
+
+              new_cfg[p + offset] = i->second;
+            }
+        }
       while (i != begin ());
     }
 
index 1d83f64b31f4b9a98f1e653fa8d4d6252cc52666..0277c94ecf6a05d3717cdde676c5099805267a6f 100644 (file)
@@ -21,7 +21,7 @@
 #include "dot-configuration.hh"
 #include "skyline.hh"
 
-Dot_formatting_problem::~Dot_formatting_problem()
+Dot_formatting_problem::~Dot_formatting_problem ()
 {
   delete best_;
 }
@@ -44,7 +44,7 @@ Dot_formatting_problem::best () const
 }
 
 Dot_formatting_problem::Dot_formatting_problem (vector<Box> const &boxes,
-                                               Interval base_x)
+                                                Interval base_x)
   : head_skyline_ (boxes, 0.0, Y_AXIS, RIGHT)
 {
   best_ = 0;
index efe927e0ecdf357b33d6b6dfed95936e5852c4aa..0401051ce09f8783b3ad1b95c7f7c26a110dc1d8 100644 (file)
@@ -25,8 +25,7 @@
 
 #include "translator.icc"
 
-
-class Dots_engraver : public Engraver 
+class Dots_engraver : public Engraver
 {
   DECLARE_ACKNOWLEDGER (rhythmic_head);
   TRANSLATOR_DECLARATIONS (Dots_engraver);
@@ -46,7 +45,7 @@ Dots_engraver::acknowledge_rhythmic_head (Grob_info gi)
   Grob *note = gi.grob ();
   if (unsmob_grob (note->get_object ("dot")))
     return;
-  
+
   Duration *dur = unsmob_duration (cause->get_property ("duration"));
   if (dur && dur->dot_count ())
     {
@@ -57,19 +56,18 @@ Dots_engraver::acknowledge_rhythmic_head (Grob_info gi)
     }
 }
 
-
 ADD_ACKNOWLEDGER (Dots_engraver, rhythmic_head);
 
 ADD_TRANSLATOR (Dots_engraver,
-               "Create @ref{Dots} objects for"
-               " @ref{rhythmic-head-interface}s.",
-
-               /* create */
-               "Dots ",
-
-               /* read */
-               "",
-              
-               /* write */
-               ""
-               );
+                "Create @ref{Dots} objects for"
+                " @ref{rhythmic-head-interface}s.",
+
+                /* create */
+                "Dots ",
+
+                /* read */
+                "",
+
+                /* write */
+                ""
+               );
index 8319118752c781ec16fc01f69fa7f62a035c44a0..7993308ae0b3399c57cfde28642d5488a515d932 100644 (file)
@@ -38,46 +38,46 @@ Dots::print (SCM d)
   if (scm_is_number (c))
     {
       SCM scm_style = sc->get_property ("style");
-      string style ="";
+      string style = "";
       if (scm_is_symbol (scm_style))
-       style = ly_symbol2string (scm_style);
-      string idx =  "dots.dot" + style;
+        style = ly_symbol2string (scm_style);
+      string idx = "dots.dot" + style;
       Stencil d = Font_interface::get_default_font (sc)->find_by_name (idx);
       if (d.is_empty ())
-       {
-         sc->warning (_f ("dot `%s' not found", idx.c_str ()));
-         return SCM_EOL;
-       }
+        {
+          sc->warning (_f ("dot `%s' not found", idx.c_str ()));
+          return SCM_EOL;
+        }
       Real dw = d.extent (X_AXIS).length ();
 
       /*
-       we need to add a real blank box, to assure that
-       side-positioning doth not cancel the left-most padding.  */
+        we need to add a real blank box, to assure that
+        side-positioning doth not cancel the left-most padding.  */
 
       /*
-       TODO: this should  be handled by side-position padding.
+        TODO: this should  be handled by side-position padding.
       */
       mol = Lookup::blank (Box (Interval (0, 0),
-                               Interval (0, 0)));
+                                Interval (0, 0)));
 
       for (int i = scm_to_int (c); i--;)
-       {
-         d.translate_axis (2 * dw, X_AXIS);
-         mol.add_at_edge (X_AXIS, RIGHT, d, dw);
-       }
+        {
+          d.translate_axis (2 * dw, X_AXIS);
+          mol.add_at_edge (X_AXIS, RIGHT, d, dw);
+        }
     }
   return mol.smobbed_copy ();
 }
 
 ADD_INTERFACE (Dots,
-              "The dots to go with a notehead or rest.  @code{direction}"
-              " sets the preferred direction to move in case of staff line"
-              " collisions.  @code{style} defaults to undefined, which is"
-              " normal 19th/20th century traditional style.  Set"
-              " @code{style} to @code{vaticana} for ancient type dots.",
+               "The dots to go with a notehead or rest.  @code{direction}"
+               " sets the preferred direction to move in case of staff line"
+               " collisions.  @code{style} defaults to undefined, which is"
+               " normal 19th/20th century traditional style.  Set"
+               " @code{style} to @code{vaticana} for ancient type dots.",
 
-              /* properties */
-              "direction "
-              "dot-count "
-              "style "
-              );
+               /* properties */
+               "direction "
+               "dot-count "
+               "style "
+              );
index ad64657e97bbbf32466a607ee7673341e11ec829..5d775a17561c3ac6067717b1af105ebcaaba732a 100644 (file)
@@ -55,7 +55,7 @@ Double_percent_repeat_engraver::listen_double_percent (Stream_event *ev)
   if (!percent_event_)
     {
       Moment meas_len (robust_scm2moment (get_property ("measureLength"),
-                                         Moment (1)));
+                                          Moment (1)));
       start_mom_ = now_mom () + meas_len;
       get_global_context ()->add_moment_to_process (start_mom_);
       percent_event_ = ev;
@@ -70,44 +70,44 @@ Double_percent_repeat_engraver::process_music ()
   if (percent_event_ && now_mom ().main_part_ == start_mom_.main_part_)
     {
       Item *double_percent = make_item ("DoublePercentRepeat",
-                                       percent_event_->self_scm ());
+                                        percent_event_->self_scm ());
 
       SCM count = percent_event_->get_property ("repeat-count");
       if (count != SCM_EOL && to_boolean (get_property ("countPercentRepeats"))
-         && check_repeat_count_visibility (context (), count))
-       {
-         Item *double_percent_counter
-           = make_item ("DoublePercentRepeatCounter",
-                        percent_event_->self_scm ());
-
-         SCM text = scm_number_to_string (count, scm_from_int (10));
-         double_percent_counter->set_property ("text", text);
-
-         Side_position_interface::add_support (double_percent_counter,
-                                               double_percent);
-         double_percent_counter->set_parent (double_percent, Y_AXIS);
-         double_percent_counter->set_parent (double_percent, X_AXIS);
-       }
+          && check_repeat_count_visibility (context (), count))
+        {
+          Item *double_percent_counter
+            = make_item ("DoublePercentRepeatCounter",
+                         percent_event_->self_scm ());
+
+          SCM text = scm_number_to_string (count, scm_from_int (10));
+          double_percent_counter->set_property ("text", text);
+
+          Side_position_interface::add_support (double_percent_counter,
+                                                double_percent);
+          double_percent_counter->set_parent (double_percent, Y_AXIS);
+          double_percent_counter->set_parent (double_percent, X_AXIS);
+        }
       // forbid breaks on a % line
       context ()->get_score_context ()->set_property ("forbidBreak",
-                                                     SCM_BOOL_T);
+                                                      SCM_BOOL_T);
       percent_event_ = 0;
     }
 }
 
 ADD_TRANSLATOR (Double_percent_repeat_engraver,
-               /* doc */
-               "Make double measure repeats.",
+                /* doc */
+                "Make double measure repeats.",
 
-               /* create */
-               "DoublePercentRepeat "
-               "DoublePercentRepeatCounter ",
+                /* create */
+                "DoublePercentRepeat "
+                "DoublePercentRepeatCounter ",
 
-               /* read */
-               "countPercentRepeats "
-               "measureLength "
-               "repeatCountVisibility ",
+                /* read */
+                "countPercentRepeats "
+                "measureLength "
+                "repeatCountVisibility ",
 
-               /* write */
-               "forbidBreak "
-               );
+                /* write */
+                "forbidBreak "
+               );
index 605876ef6081448b2c21d11196c31099bff1b571..c8dbabca1cffbdf927c01b4c0c440b59edffddac 100644 (file)
@@ -67,7 +67,7 @@ Drum_notes_engraver::process_music ()
   for (vsize i = 0; i < events_.size (); i++)
     {
       if (!tab)
-       tab = get_property ("drumStyleTable");
+        tab = get_property ("drumStyleTable");
 
       Stream_event *ev = events_[i];
       Item *note = make_item ("NoteHead", ev->self_scm ());
@@ -77,30 +77,30 @@ Drum_notes_engraver::process_music ()
       SCM defn = SCM_EOL;
 
       if (scm_hash_table_p (tab) == SCM_BOOL_T)
-       defn = scm_hashq_ref (tab, drum_type, SCM_EOL);
+        defn = scm_hashq_ref (tab, drum_type, SCM_EOL);
 
       if (scm_is_pair (defn))
-       {
-         SCM pos = scm_caddr (defn);
-         SCM style = scm_car (defn);
-         SCM script = scm_cadr (defn);
-
-         if (scm_integer_p (pos) == SCM_BOOL_T)
-           note->set_property ("staff-position", pos);
-         if (scm_is_symbol (style))
-           note->set_property ("style", style);
-
-         if (scm_is_string (script))
-           {
-             Item *p = make_item ("Script", ev->self_scm ());
-             make_script_from_event (p, context (), script,
-                                     0);
-
-             p->set_parent (note, Y_AXIS);
-             Side_position_interface::add_support (p, note);
-             scripts_.push_back (p);
-           }
-       }
+        {
+          SCM pos = scm_caddr (defn);
+          SCM style = scm_car (defn);
+          SCM script = scm_cadr (defn);
+
+          if (scm_integer_p (pos) == SCM_BOOL_T)
+            note->set_property ("staff-position", pos);
+          if (scm_is_symbol (style))
+            note->set_property ("style", style);
+
+          if (scm_is_string (script))
+            {
+              Item *p = make_item ("Script", ev->self_scm ());
+              make_script_from_event (p, context (), script,
+                                      0);
+
+              p->set_parent (note, Y_AXIS);
+              Side_position_interface::add_support (p, note);
+              scripts_.push_back (p);
+            }
+        }
     }
 }
 
@@ -112,7 +112,7 @@ Drum_notes_engraver::acknowledge_stem (Grob_info inf)
       Grob *e = scripts_[i];
 
       if (to_dir (e->get_property ("side-relative-direction")))
-       e->set_object ("direction-source", inf.grob ()->self_scm ());
+        e->set_object ("direction-source", inf.grob ()->self_scm ());
 
       Side_position_interface::add_support (e, inf.grob ());
     }
@@ -126,8 +126,8 @@ Drum_notes_engraver::acknowledge_note_column (Grob_info inf)
       Grob *e = scripts_[i];
 
       if (!e->get_parent (X_AXIS)
-         && Side_position_interface::get_axis (e) == Y_AXIS)
-       e->set_parent (inf.grob (), X_AXIS);
+          && Side_position_interface::get_axis (e) == Y_AXIS)
+        e->set_parent (inf.grob (), X_AXIS);
     }
 }
 
@@ -142,16 +142,16 @@ ADD_ACKNOWLEDGER (Drum_notes_engraver, stem);
 ADD_ACKNOWLEDGER (Drum_notes_engraver, note_column);
 
 ADD_TRANSLATOR (Drum_notes_engraver,
-               /* doc */
-               "Generate drum note heads.",
+                /* doc */
+                "Generate drum note heads.",
 
-               /* create */
-               "NoteHead "
-               "Script ",
+                /* create */
+                "NoteHead "
+                "Script ",
 
-               /* read */
-               "drumStyleTable ",
+                /* read */
+                "drumStyleTable ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index b28a7cd9ec1bf6dea157c0a3fee81c74169fba0f..4feb11730b0eb1675cf51669804eb76074657a96 100644 (file)
@@ -55,11 +55,11 @@ Drum_note_performer::process_music ()
       SCM defn = SCM_EOL;
 
       if (scm_is_symbol (sym)
-         && (scm_hash_table_p (tab) == SCM_BOOL_T))
-       defn = scm_hashq_ref (tab, sym, SCM_EOL);
+          && (scm_hash_table_p (tab) == SCM_BOOL_T))
+        defn = scm_hashq_ref (tab, sym, SCM_EOL);
 
       if (Pitch *pit = unsmob_pitch (defn))
-       {
+        {
           SCM articulations = n->get_property ("articulations");
           Stream_event *tie_event = 0;
           for (SCM s = articulations;
@@ -69,18 +69,18 @@ Drum_note_performer::process_music ()
               Stream_event *ev = unsmob_stream_event (scm_car (s));
               if (!ev)
                 continue;
-         
+
               if (ev->in_event_class ("tie-event"))
                 tie_event = ev;
             }
 
-         Moment len = get_event_length (n, now_mom ());
+          Moment len = get_event_length (n, now_mom ());
 
-         Audio_note *p = new Audio_note (*pit, len,
+          Audio_note *p = new Audio_note (*pit, len,
                                           tie_event, Pitch (0, 0, 0));
-         Audio_element_info info (p, n);
-         announce_element (info);
-       }
+          Audio_element_info info (p, n);
+          announce_element (info);
+        }
     }
 
   note_evs_.clear ();
@@ -100,15 +100,15 @@ Drum_note_performer::listen_note (Stream_event *ev)
 }
 
 ADD_TRANSLATOR (Drum_note_performer,
-               /* doc */
-               "Play drum notes.",
+                /* doc */
+                "Play drum notes.",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 439362bf82752a4a79963f124f9d737544916769..0aec4a15ca0ae4c48acf7f97a15c4ef7ed4ae649 100644 (file)
@@ -35,8 +35,8 @@ Duration::less_p (SCM p1, SCM p2)
 }
 
 LY_DEFINE (ly_duration_less_p, "ly:duration<?",
-          2, 0, 0, (SCM p1, SCM p2),
-          "Is @var{p1} shorter than @var{p2}?")
+           2, 0, 0, (SCM p1, SCM p2),
+           "Is @var{p1} shorter than @var{p2}?")
 {
   LY_ASSERT_SMOB (Duration, p1, 1);
   LY_ASSERT_SMOB (Duration, p2, 2);
@@ -51,18 +51,18 @@ LY_DEFINE (ly_duration_less_p, "ly:duration<?",
 }
 
 LY_DEFINE (ly_make_duration, "ly:make-duration",
-          1, 3, 0, (SCM length, SCM dotcount, SCM num, SCM den),
-          "@var{length} is the negative logarithm (base 2) of the duration:"
-          " 1@tie{}is a half note, 2@tie{}is a quarter note, 3@tie{}is an"
-          " eighth note, etc.  The number of dots after the note is given by"
-          " the optional argument @var{dotcount}.\n"
-          "\n"
-          "The duration factor is optionally given by @var{num} and"
-          " @var{den}.\n"
-          "\n"
-          "A duration is a musical duration, i.e., a length of time"
-          " described by a power of two (whole, half, quarter, etc.) and a"
-          " number of augmentation dots.")
+           1, 3, 0, (SCM length, SCM dotcount, SCM num, SCM den),
+           "@var{length} is the negative logarithm (base 2) of the duration:"
+           " 1@tie{}is a half note, 2@tie{}is a quarter note, 3@tie{}is an"
+           " eighth note, etc.  The number of dots after the note is given by"
+           " the optional argument @var{dotcount}.\n"
+           "\n"
+           "The duration factor is optionally given by @var{num} and"
+           " @var{den}.\n"
+           "\n"
+           "A duration is a musical duration, i.e., a length of time"
+           " described by a power of two (whole, half, quarter, etc.) and a"
+           " number of augmentation dots.")
 {
   LY_ASSERT_TYPE (scm_is_integer, length, 1);
 
@@ -98,24 +98,24 @@ LY_DEFINE (ly_make_duration, "ly:make-duration",
 }
 
 LY_DEFINE (ly_duration_log, "ly:duration-log",
-          1, 0, 0, (SCM dur),
-          "Extract the duration log from @var{dur}.")
+           1, 0, 0, (SCM dur),
+           "Extract the duration log from @var{dur}.")
 {
   LY_ASSERT_SMOB (Duration, dur, 1);
   return scm_from_int (unsmob_duration (dur)->duration_log ());
 }
 
 LY_DEFINE (ly_duration_dot_count, "ly:duration-dot-count",
-          1, 0, 0, (SCM dur),
-          "Extract the dot count from @var{dur}.")
+           1, 0, 0, (SCM dur),
+           "Extract the dot count from @var{dur}.")
 {
   LY_ASSERT_SMOB (Duration, dur, 1);
   return scm_from_int (unsmob_duration (dur)->dot_count ());
 }
 
 LY_DEFINE (ly_intlog2, "ly:intlog2",
-          1, 0, 0, (SCM d),
-          "The 2-logarithm of 1/@var{d}.")
+           1, 0, 0, (SCM d),
+           "The 2-logarithm of 1/@var{d}.")
 {
   LY_ASSERT_TYPE (scm_is_number, d, 1);
   int log = intlog2 (scm_to_int (d));
@@ -123,25 +123,25 @@ LY_DEFINE (ly_intlog2, "ly:intlog2",
 }
 
 LY_DEFINE (ly_duration_length, "ly:duration-length",
-          1, 0, 0, (SCM dur),
-          "The length of the duration as a @code{moment}.")
+           1, 0, 0, (SCM dur),
+           "The length of the duration as a @code{moment}.")
 {
   LY_ASSERT_SMOB (Duration, dur, 1);
   return Moment (unsmob_duration (dur)->get_length ()).smobbed_copy ();
 }
 
 LY_DEFINE (ly_duration_2_string, "ly:duration->string",
-          1, 0, 0, (SCM dur),
-          "Convert @var{dur} to a string.")
+           1, 0, 0, (SCM dur),
+           "Convert @var{dur} to a string.")
 {
   LY_ASSERT_SMOB (Duration, dur, 1);
   return ly_string2scm (unsmob_duration (dur)->to_string ());
 }
 
 LY_DEFINE (ly_duration_factor, "ly:duration-factor",
-          1, 0, 0, (SCM dur),
-          "Extract the compression factor from @var{dur}."
-          "  Return it as a pair.")
+           1, 0, 0, (SCM dur),
+           "Extract the compression factor from @var{dur}."
+           "  Return it as a pair.")
 {
   LY_ASSERT_SMOB (Duration, dur, 1);
   Rational r = unsmob_duration (dur)->factor ();
index 194ce3a89e2e3187b302e83ea615a399595e277c..75905db6b6f7a444dfae77964a3969118ccff37c 100644 (file)
@@ -57,41 +57,41 @@ Duration::Duration (Rational r, bool scale)
   else
     {
       /* we want to find the integer k for which 2q/p > 2^k >= q/p.
-        It's simple to check that k' = \floor \log q - \floor \log p
-        satisfies the left inequality and is within a factor of 2 of
-        satistying the right one. Therefore either k = k' or k = k'+1 */
+         It's simple to check that k' = \floor \log q - \floor \log p
+         satisfies the left inequality and is within a factor of 2 of
+         satistying the right one. Therefore either k = k' or k = k'+1 */
 
       int p = (int) r.num ();
       int q = (int) r.den ();
       int k = intlog2 (q) - intlog2 (p);
-      if (shift_left(p, k) < q)
-       k++;
+      if (shift_left (p, k) < q)
+        k++;
 
-      assert (shift_left(p, k) >= q && shift_left(p, (k-1)) < q);
+      assert (shift_left (p, k) >= q && shift_left (p, (k - 1)) < q);
 
       /* If we were to write out log (p/q) in base 2, then the position of the
-        first non-zero bit (ie. k in our notation) would be the durlog
-        and the number of consecutive 1s after that bit would be the number of
-        dots */
-      p = shift_left(p, k) - q;
+         first non-zero bit (ie. k in our notation) would be the durlog
+         and the number of consecutive 1s after that bit would be the number of
+         dots */
+      p = shift_left (p, k) - q;
       dots_ = 0;
       while ((p *= 2) >= q)
-       {
-         p -= q;
-         dots_++;
-       }
+        {
+          p -= q;
+          dots_++;
+        }
 
       /* we only go up to 64th notes */
       if (k > 6)
-       {
-         durlog_ = 6;
-         dots_ = 0;
-       }
+        {
+          durlog_ = 6;
+          dots_ = 0;
+        }
       else
-       durlog_ = k;
+        durlog_ = k;
 
       if (scale || k > 6)
-       factor_ = r / get_length ();
+        factor_ = r / get_length ();
     }
 }
 
@@ -165,8 +165,8 @@ Duration::equal_p (SCM a, SCM b)
   Duration *q = (Duration *) SCM_CELL_WORD_1 (b);
 
   bool eq = p->dots_ == q->dots_
-    && p->durlog_ == q->durlog_
-    && p->factor_ == q->factor_;
+            && p->durlog_ == q->durlog_
+            && p->factor_ == q->factor_;
 
   return eq ? SCM_BOOL_T : SCM_BOOL_F;
 }
index 766b63ed545591bd1087295aa7044ff9d58ea147..92736e0316a02350fdaa2db4ce091fb335502acc 100644 (file)
@@ -73,7 +73,7 @@ Dynamic_align_engraver::create_line_spanner (Stream_event *event)
 {
   if (!line_)
     line_ = make_spanner ("DynamicLineSpanner",
-                         event ? event->self_scm () : SCM_EOL);
+                          event ? event->self_scm () : SCM_EOL);
 }
 
 void
@@ -83,10 +83,10 @@ Dynamic_align_engraver::acknowledge_end_dynamic (Grob_info info)
     ended_.push_back (info.spanner ());
 
   /* If the break flag is set, store the current spanner and let new dynamics
-   * create a new spanner 
+   * create a new spanner
    */
-  bool spanner_broken = current_dynamic_spanner_ == info.spanner () &&
-                        to_boolean (current_dynamic_spanner_->get_property ("spanner-broken"));
+  bool spanner_broken = current_dynamic_spanner_ == info.spanner ()
+                        && to_boolean (current_dynamic_spanner_->get_property ("spanner-broken"));
   if (spanner_broken && line_)
     {
       if (ended_line_)
@@ -149,7 +149,7 @@ Dynamic_align_engraver::acknowledge_dynamic (Grob_info info)
   if (cause)
     {
       if (Direction d = to_dir (cause->get_property ("direction")))
-       set_grob_direction (line_, d);
+        set_grob_direction (line_, d);
     }
 }
 
@@ -161,25 +161,25 @@ Dynamic_align_engraver::set_spanner_bounds (Spanner *line, bool end)
   Direction d = LEFT;
   do
     {
-      if ((d == LEFT && !line->get_bound (LEFT)) ||
-         (end && d == RIGHT && !line->get_bound (RIGHT)))
-       {
-         vector<Spanner *> const &spanners
-           = (d == LEFT) ? started_ : ended_;
-
-         Grob *bound = 0;
-         if (scripts_.size ())
-           bound = scripts_[0];
-         else if (spanners.size ())
-           bound = spanners[0]->get_bound (d);
-         else
-           {
-             bound = unsmob_grob (get_property ("currentMusicalColumn"));
-             programming_error ("started DynamicLineSpanner but have no left bound");
-           }
-
-         line->set_bound (d, bound);
-       }
+      if ((d == LEFT && !line->get_bound (LEFT))
+          || (end && d == RIGHT && !line->get_bound (RIGHT)))
+        {
+          vector<Spanner *> const &spanners
+            = (d == LEFT) ? started_ : ended_;
+
+          Grob *bound = 0;
+          if (scripts_.size ())
+            bound = scripts_[0];
+          else if (spanners.size ())
+            bound = spanners[0]->get_bound (d);
+          else
+            {
+              bound = unsmob_grob (get_property ("currentMusicalColumn"));
+              programming_error ("started DynamicLineSpanner but have no left bound");
+            }
+
+          line->set_bound (d, bound);
+        }
     }
   while (flip (&d) != LEFT);
 }
@@ -195,9 +195,9 @@ Dynamic_align_engraver::stop_translation_timestep ()
 
       set<Spanner *>::iterator it = running_.find (sp);
       if (it != running_.end ())
-       running_.erase (it);
+        running_.erase (it);
       else
-       started_[i]->programming_error ("lost track of this dynamic spanner");
+        started_[i]->programming_error ("lost track of this dynamic spanner");
     }
 
   bool end = line_ && running_.empty ();
@@ -206,11 +206,11 @@ Dynamic_align_engraver::stop_translation_timestep ()
   // is ended now
   set_spanner_bounds (ended_line_, true);
   set_spanner_bounds (line_, end);
-  // If the flag is set to break the spanner after the current child, don't 
+  // If the flag is set to break the spanner after the current child, don't
   // add any more support points (needed e.g. for style=none, where the
   // invisible spanner should NOT be shifted since we don't have a line).
-  bool spanner_broken = current_dynamic_spanner_ &&
-                        to_boolean (current_dynamic_spanner_->get_property ("spanner-broken"));
+  bool spanner_broken = current_dynamic_spanner_
+                        && to_boolean (current_dynamic_spanner_->get_property ("spanner-broken"));
   for (vsize i = 0; line_ && !spanner_broken && i < support_.size (); i++)
     Side_position_interface::add_support (line_, support_[i]);
 
@@ -227,15 +227,15 @@ Dynamic_align_engraver::stop_translation_timestep ()
 }
 
 ADD_TRANSLATOR (Dynamic_align_engraver,
-               /* doc */
-               "Align hairpins and dynamic texts on a horizontal line.",
+                /* doc */
+                "Align hairpins and dynamic texts on a horizontal line.",
 
-               /* create */
-               "DynamicLineSpanner ",
+                /* create */
+                "DynamicLineSpanner ",
 
-               /* read */
-               "currentMusicalColumn ",
+                /* read */
+                "currentMusicalColumn ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 14522c6376190c9ca84817d96af2a41b585d2844..0107e7f436c6a9baefd7368615666d9e970684cf 100644 (file)
@@ -70,8 +70,8 @@ class Dynamic_engraver : public Engraver
 
   Drul_array<Stream_event *> accepted_spanevents_drul_;
 
-  vector<Note_column*> pending_columns_;
-  vector<Grob*> pending_elements_;
+  vector<Note_column *> pending_columns_;
+  vector<Grob *> pending_elements_;
 
   void typeset_all ();
 
@@ -118,7 +118,7 @@ Dynamic_engraver::listen_span_dynamic (Stream_event *ev)
 
   if (d == START)
     ASSIGN_EVENT_ONCE (accepted_spanevents_drul_[START], ev);
-  
+
   /* Cancel any ongoing crescendo, either explicitly by \! or
      implicitly by a new crescendo. Also avoid warning if cresc is
      cancelled both implicitly and explicitly. */
@@ -132,12 +132,12 @@ Dynamic_engraver::process_music ()
   if (accepted_spanevents_drul_[START] || accepted_spanevents_drul_[STOP] || script_ev_)
     {
       if (!line_spanner_)
-       {
-         Stream_event *rq = accepted_spanevents_drul_[START];
-         line_spanner_ = make_spanner ("DynamicLineSpanner", rq ? rq->self_scm () : SCM_EOL);
-         if (script_ev_)
-           rq = script_ev_;
-       }
+        {
+          Stream_event *rq = accepted_spanevents_drul_[START];
+          line_spanner_ = make_spanner ("DynamicLineSpanner", rq ? rq->self_scm () : SCM_EOL);
+          if (script_ev_)
+            rq = script_ev_;
+        }
     }
 
   /*
@@ -157,140 +157,140 @@ Dynamic_engraver::process_music ()
     {
       script_ = make_item ("DynamicText", script_ev_->self_scm ());
       script_->set_property ("text",
-                            script_ev_->get_property ("text"));
+                             script_ev_->get_property ("text"));
 
       if (Direction d = to_dir (script_ev_->get_property ("direction")))
-       set_grob_direction (line_spanner_, d);
+        set_grob_direction (line_spanner_, d);
       else if (Direction d = to_dir (line_spanner_->get_property ("direction")))
-       set_grob_direction (script_, d);
+        set_grob_direction (script_, d);
 
       Axis_group_interface::add_element (line_spanner_, script_);
     }
 
   Stream_event *stop_ev = accepted_spanevents_drul_ [STOP]
-    ? accepted_spanevents_drul_[STOP] : script_ev_;
+                          ? accepted_spanevents_drul_[STOP] : script_ev_;
 
   if (accepted_spanevents_drul_[STOP] || script_ev_)
     {
       /*
-       finish side position alignment if the (de)cresc ends here, and
-       there are no new dynamics.
+        finish side position alignment if the (de)cresc ends here, and
+        there are no new dynamics.
       */
 
       if (cresc_)
-       {
-         assert (!finished_cresc_ && cresc_);
-
-         if (script_)
-           {
-             cresc_->set_bound (RIGHT, script_);
-             add_bound_item (line_spanner_, script_);
-           }
-
-         finished_cresc_ = cresc_;
-         announce_end_grob (finished_cresc_, SCM_EOL);
-         cresc_ = 0;
-         current_cresc_ev_ = 0;
-       }
+        {
+          assert (!finished_cresc_ && cresc_);
+
+          if (script_)
+            {
+              cresc_->set_bound (RIGHT, script_);
+              add_bound_item (line_spanner_, script_);
+            }
+
+          finished_cresc_ = cresc_;
+          announce_end_grob (finished_cresc_, SCM_EOL);
+          cresc_ = 0;
+          current_cresc_ev_ = 0;
+        }
       else if (accepted_spanevents_drul_[STOP])
-       {
-         accepted_spanevents_drul_[STOP]->origin ()->warning (_ ("cannot find start of (de)crescendo"));
-         stop_ev = 0;
-       }
+        {
+          accepted_spanevents_drul_[STOP]->origin ()->warning (_ ("cannot find start of (de)crescendo"));
+          stop_ev = 0;
+        }
     }
 
   if (accepted_spanevents_drul_[START])
     {
       if (current_cresc_ev_)
-       {
-         string msg = _ ("already have a decrescendo");
-         if (current_cresc_ev_->in_event_class ("crescendo-event"))
-           msg = _ ("already have a crescendo");
-
-         accepted_spanevents_drul_[START]->origin ()->warning (msg);
-         current_cresc_ev_->origin ()->warning (_ ("cresc starts here"));
-       }
+        {
+          string msg = _ ("already have a decrescendo");
+          if (current_cresc_ev_->in_event_class ("crescendo-event"))
+            msg = _ ("already have a crescendo");
+
+          accepted_spanevents_drul_[START]->origin ()->warning (msg);
+          current_cresc_ev_->origin ()->warning (_ ("cresc starts here"));
+        }
       else
-       {
-         current_cresc_ev_ = accepted_spanevents_drul_[START];
-
-         if (Direction d = to_dir (current_cresc_ev_->get_property ("direction")))
-           set_grob_direction (line_spanner_, d);
-
-         /*
-           TODO: Use symbols.
-         */
-         
-         SCM start_sym = current_cresc_ev_->get_property ("class");
-         string start_type;
-         
-         if (start_sym == ly_symbol2scm ("decrescendo-event"))
-           start_type = "decrescendo";
-         else if (start_sym == ly_symbol2scm ("crescendo-event"))
-           start_type = "crescendo";
-         else
-           {
-             programming_error ("unknown dynamic spanner type");
-             return;
-           }
-
-         /*
-           UGH. TODO: should read from original event, so appearance
-           may be altered with \tweak.
-          */
-         SCM s = get_property ((start_type + "Spanner").c_str ());
-         if (!scm_is_symbol (s) || s == ly_symbol2scm ("hairpin"))
-           {
-             cresc_ = make_spanner ("Hairpin", accepted_spanevents_drul_[START]->self_scm ());
-             if (finished_cresc_)
-               {
-                 Pointer_group_interface::add_grob (finished_cresc_,
-                                                    ly_symbol2scm ("adjacent-hairpins"),
-                                                    cresc_);
-
-                 Pointer_group_interface::add_grob (cresc_,
-                                                    ly_symbol2scm ("adjacent-hairpins"),
-                                                    finished_cresc_);
-               }
-           }
-
-         /*
-           This is a convenient (and legacy) interface to TextSpanners
-           for use in (de)crescendi.
-           Hmm.
-         */
-         else
-           {
-             cresc_ = make_spanner ("DynamicTextSpanner", accepted_spanevents_drul_[START]->self_scm ());
-             cresc_->set_property ("style", s);
-             context ()->set_property ((start_type
-                                        + "Spanner").c_str (), SCM_EOL);
-             s = get_property ((start_type + "Text").c_str ());
-             if (Text_interface::is_markup (s))
-               {
-                 cresc_->set_property ("text", s);
-                 context ()->set_property ((start_type + "Text").c_str (),
-                                           SCM_EOL);
-               }
-
-             if (script_)
-               {
-                 set_nested_property (cresc_,
-                                      scm_list_3 (ly_symbol2scm ("bound-details"),
-                                                  ly_symbol2scm ("left"),
-                                                  ly_symbol2scm ("attach-dir")
-                                                  ),
-                                      scm_from_int (RIGHT));
-               }
-           }
-
-         if (script_)
-           {
-             cresc_->set_bound (LEFT, script_);
-             add_bound_item (line_spanner_, cresc_->get_bound (LEFT));
-           }
-         Axis_group_interface::add_element (line_spanner_, cresc_);
-       }
+        {
+          current_cresc_ev_ = accepted_spanevents_drul_[START];
+
+          if (Direction d = to_dir (current_cresc_ev_->get_property ("direction")))
+            set_grob_direction (line_spanner_, d);
+
+          /*
+            TODO: Use symbols.
+          */
+
+          SCM start_sym = current_cresc_ev_->get_property ("class");
+          string start_type;
+
+          if (start_sym == ly_symbol2scm ("decrescendo-event"))
+            start_type = "decrescendo";
+          else if (start_sym == ly_symbol2scm ("crescendo-event"))
+            start_type = "crescendo";
+          else
+            {
+              programming_error ("unknown dynamic spanner type");
+              return;
+            }
+
+          /*
+            UGH. TODO: should read from original event, so appearance
+            may be altered with \tweak.
+           */
+          SCM s = get_property ((start_type + "Spanner").c_str ());
+          if (!scm_is_symbol (s) || s == ly_symbol2scm ("hairpin"))
+            {
+              cresc_ = make_spanner ("Hairpin", accepted_spanevents_drul_[START]->self_scm ());
+              if (finished_cresc_)
+                {
+                  Pointer_group_interface::add_grob (finished_cresc_,
+                                                     ly_symbol2scm ("adjacent-hairpins"),
+                                                     cresc_);
+
+                  Pointer_group_interface::add_grob (cresc_,
+                                                     ly_symbol2scm ("adjacent-hairpins"),
+                                                     finished_cresc_);
+                }
+            }
+
+          /*
+            This is a convenient (and legacy) interface to TextSpanners
+            for use in (de)crescendi.
+            Hmm.
+          */
+          else
+            {
+              cresc_ = make_spanner ("DynamicTextSpanner", accepted_spanevents_drul_[START]->self_scm ());
+              cresc_->set_property ("style", s);
+              context ()->set_property ((start_type
+                                         + "Spanner").c_str (), SCM_EOL);
+              s = get_property ((start_type + "Text").c_str ());
+              if (Text_interface::is_markup (s))
+                {
+                  cresc_->set_property ("text", s);
+                  context ()->set_property ((start_type + "Text").c_str (),
+                                            SCM_EOL);
+                }
+
+              if (script_)
+                {
+                  set_nested_property (cresc_,
+                                       scm_list_3 (ly_symbol2scm ("bound-details"),
+                                                   ly_symbol2scm ("left"),
+                                                   ly_symbol2scm ("attach-dir")
+                                                  ),
+                                       scm_from_int (RIGHT));
+                }
+            }
+
+          if (script_)
+            {
+              cresc_->set_bound (LEFT, script_);
+              add_bound_item (line_spanner_, cresc_->get_bound (LEFT));
+            }
+          Axis_group_interface::add_element (line_spanner_, cresc_);
+        }
     }
 }
 
@@ -348,18 +348,18 @@ Dynamic_engraver::typeset_all ()
   if (finished_cresc_)
     {
       if (!finished_cresc_->get_bound (RIGHT))
-       {
-                 
-         Grob *column_bound = unsmob_grob (get_property ("currentMusicalColumn"));
-         
-         finished_cresc_->set_bound (RIGHT, script_
-                                     ? script_
-                                     : column_bound);
-
-         if (finished_line_spanner_)
-           add_bound_item (finished_line_spanner_,
-                           finished_cresc_->get_bound (RIGHT));
-       }
+        {
+
+          Grob *column_bound = unsmob_grob (get_property ("currentMusicalColumn"));
+
+          finished_cresc_->set_bound (RIGHT, script_
+                                      ? script_
+                                      : column_bound);
+
+          if (finished_line_spanner_)
+            add_bound_item (finished_line_spanner_,
+                            finished_cresc_->get_bound (RIGHT));
+        }
       finished_cresc_ = 0;
     }
 
@@ -367,33 +367,33 @@ Dynamic_engraver::typeset_all ()
   if (finished_line_spanner_)
     {
       /*
-       We used to have
+        We used to have
 
-       extend-spanner-over-elements (finished_line_spanner_);
+        extend-spanner-over-elements (finished_line_spanner_);
 
-       but this is rather kludgy, since finished_line_spanner_
-       typically has a staff-symbol field set , extending it over the
-       entire staff.
+        but this is rather kludgy, since finished_line_spanner_
+        typically has a staff-symbol field set , extending it over the
+        entire staff.
 
       */
 
       Grob *l = finished_line_spanner_->get_bound (LEFT);
       Grob *r = finished_line_spanner_->get_bound (RIGHT);
       if (!r && l)
-       finished_line_spanner_->set_bound (RIGHT, l);
+        finished_line_spanner_->set_bound (RIGHT, l);
       else if (!l && r)
-       finished_line_spanner_->set_bound (LEFT, r);
+        finished_line_spanner_->set_bound (LEFT, r);
       else if (!r && !l)
-       {
-         /*
-           This is a isolated dynamic apparently, and does not even have
-           any interesting support item.
-         */
-         Grob *cc = unsmob_grob (get_property ("currentMusicalColumn"));
-         Item *ci = dynamic_cast<Item *> (cc);
-         finished_line_spanner_->set_bound (RIGHT, ci);
-         finished_line_spanner_->set_bound (LEFT, ci);
-       }
+        {
+          /*
+            This is a isolated dynamic apparently, and does not even have
+            any interesting support item.
+          */
+          Grob *cc = unsmob_grob (get_property ("currentMusicalColumn"));
+          Item *ci = dynamic_cast<Item *> (cc);
+          finished_line_spanner_->set_bound (RIGHT, ci);
+          finished_line_spanner_->set_bound (LEFT, ci);
+        }
       finished_line_spanner_ = 0;
     }
 }
@@ -416,20 +416,20 @@ Dynamic_engraver::acknowledge_note_column (Grob_info info)
     {
       extract_grob_set (info.grob (), "note-heads", heads);
       if (heads.size ())
-       {
-         Grob *head = heads[0];
-         script_->set_parent (head, X_AXIS);
-         Self_alignment_interface::set_center_parent (script_, X_AXIS);
-       }
+        {
+          Grob *head = heads[0];
+          script_->set_parent (head, X_AXIS);
+          Self_alignment_interface::set_center_parent (script_, X_AXIS);
+        }
     }
 
   if (cresc_)
     {
       if (!cresc_->get_bound (LEFT))
-       {
-         cresc_->set_bound (LEFT, info.grob ());
-         add_bound_item (line_spanner_, cresc_->get_bound (LEFT));
-       }
+        {
+          cresc_->set_bound (LEFT, info.grob ());
+          add_bound_item (line_spanner_, cresc_->get_bound (LEFT));
+        }
     }
 
   if (finished_cresc_ && !finished_cresc_->get_bound (RIGHT))
@@ -439,21 +439,21 @@ Dynamic_engraver::acknowledge_note_column (Grob_info info)
 ADD_ACKNOWLEDGER (Dynamic_engraver, note_column);
 
 ADD_TRANSLATOR (Dynamic_engraver,
-               /* doc */
-               "Create hairpins, dynamic texts, and their vertical"
-               " alignments.  The symbols are collected onto a"
-               " @code{DynamicLineSpanner} grob which takes care of vertical"
-               " positioning.",
-
-               /* create */
-               "DynamicLineSpanner "
-               "DynamicTextSpanner "
-               "DynamicText "
-               "Hairpin ",
-
-               /* read */
-               "",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Create hairpins, dynamic texts, and their vertical"
+                " alignments.  The symbols are collected onto a"
+                " @code{DynamicLineSpanner} grob which takes care of vertical"
+                " positioning.",
+
+                /* create */
+                "DynamicLineSpanner "
+                "DynamicTextSpanner "
+                "DynamicText "
+                "Hairpin ",
+
+                /* read */
+                "",
+
+                /* write */
+                ""
+               );
index d96545af9589e36371143777af6aa35d9ff616f4..3977a77c30a2166efe89f91e6cc92c8759cc5624 100644 (file)
@@ -37,8 +37,8 @@ protected:
   DECLARE_TRANSLATOR_LISTENER (absolute_dynamic);
 private:
   Stream_event *script_event_;
-  Drul_array<Stream_event*> span_events_; 
-  Drul_array<Direction> grow_dir_; 
+  Drul_array<Stream_event *> span_events_;
+  Drul_array<Direction> grow_dir_;
   Real last_volume_;
   Audio_dynamic *absolute_;
   Audio_span_dynamic *span_dynamic_;
@@ -50,8 +50,8 @@ Dynamic_performer::Dynamic_performer ()
   last_volume_ = 0.5;
   script_event_ = 0;
   absolute_ = 0;
-  span_events_[LEFT] = 
-    span_events_[RIGHT] = 0;
+  span_events_[LEFT]
+    span_events_[RIGHT] = 0;
   span_dynamic_ = 0;
   finished_span_dynamic_ = 0;
 }
@@ -68,38 +68,37 @@ Dynamic_performer::equalize_volume (Real volume)
     {
       Interval iv (0, 1);
       if (scm_is_number (min))
-       iv[MIN] = scm_to_double (min);
+        iv[MIN] = scm_to_double (min);
       if (scm_is_number (max))
-       iv[MAX] = scm_to_double (max);
+        iv[MAX] = scm_to_double (max);
       volume = iv[MIN] + iv.length () * volume;
     }
   else
     {
       /*
-       urg, code duplication:: staff_performer
+        urg, code duplication:: staff_performer
       */
       SCM s = get_property ("midiInstrument");
 
       if (!scm_is_string (s))
-       s = get_property ("instrumentName");
+        s = get_property ("instrumentName");
 
       if (!scm_is_string (s))
-       s = scm_from_locale_string ("piano");
+        s = scm_from_locale_string ("piano");
 
       SCM eq = get_property ("instrumentEqualizer");
       if (ly_is_procedure (eq))
-       s = scm_call_1 (eq, s);
+        s = scm_call_1 (eq, s);
 
       if (is_number_pair (s))
-       {
-         Interval iv = ly_scm2interval (s);
-         volume = iv[MIN] + iv.length () * volume;
-       }
+        {
+          Interval iv = ly_scm2interval (s);
+          volume = iv[MIN] + iv.length () * volume;
+        }
     }
   return volume;
 }
 
-
 void
 Dynamic_performer::process_music ()
 {
@@ -124,22 +123,22 @@ Dynamic_performer::process_music ()
       absolute_ = new Audio_dynamic ();
 
       if (script_event_)
-       {
-         SCM proc = get_property ("dynamicAbsoluteVolumeFunction");
-
-         SCM svolume = SCM_EOL;
-         if (ly_is_procedure (proc))
-           {
-             // urg
-             svolume = scm_call_1 (proc, script_event_->get_property ("text"));
-           }
-
-         Real volume = robust_scm2double (svolume, 0.5);
-
-         last_volume_
-           = absolute_->volume_ = equalize_volume (volume);
-       }
-      
+        {
+          SCM proc = get_property ("dynamicAbsoluteVolumeFunction");
+
+          SCM svolume = SCM_EOL;
+          if (ly_is_procedure (proc))
+            {
+              // urg
+              svolume = scm_call_1 (proc, script_event_->get_property ("text"));
+            }
+
+          Real volume = robust_scm2double (svolume, 0.5);
+
+          last_volume_
+            = absolute_->volume_ = equalize_volume (volume);
+        }
+
       Audio_element_info info (absolute_, script_event_);
       announce_element (info);
     }
@@ -159,7 +158,7 @@ Dynamic_performer::stop_translation_timestep ()
       finished_span_dynamic_->render ();
       finished_span_dynamic_ = 0;
     }
-  
+
   if (absolute_ && absolute_->volume_ < 0)
     {
       absolute_->volume_ = last_volume_;
@@ -168,11 +167,11 @@ Dynamic_performer::stop_translation_timestep ()
     {
       last_volume_ = absolute_->volume_;
     }
-  
+
   absolute_ = 0;
   script_event_ = 0;
-  span_events_[LEFT] = 
-    span_events_[RIGHT] = 0;
+  span_events_[LEFT]
+    span_events_[RIGHT] = 0;
 }
 
 IMPLEMENT_TRANSLATOR_LISTENER (Dynamic_performer, decrescendo);
@@ -202,19 +201,19 @@ Dynamic_performer::listen_absolute_dynamic (Stream_event *r)
 }
 
 ADD_TRANSLATOR (Dynamic_performer,
-               /* doc */
-               "",
-
-               /* create */
-               "",
-
-               /* read */
-               "dynamicAbsoluteVolumeFunction "
-               "instrumentEqualizer "
-               "midiMaximumVolume "
-               "midiMinimumVolume "
-               "midiInstrument ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "",
+
+                /* create */
+                "",
+
+                /* read */
+                "dynamicAbsoluteVolumeFunction "
+                "instrumentEqualizer "
+                "midiMaximumVolume "
+                "midiMinimumVolume "
+                "midiInstrument ",
+
+                /* write */
+                ""
+               );
index d7cd67284377ac23f607e4578296cb326441badc..2b1412d2f028b0086d7d52207ba3bc7f1b4e7855 100644 (file)
 struct Enclosing_bracket
 {
   DECLARE_GROB_INTERFACE ();
-  
+
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (width, (SCM));
 };
 
-
 ADD_INTERFACE (Enclosing_bracket,
-             "Brackets alongside bass figures.",
-             
-             /* properties */
-             "bracket-flare "
-             "edge-height "
-             "elements "
-             "padding "
-             "shorten-pair "
-             "thickness "
-             );
+               "Brackets alongside bass figures.",
 
-/* ugh: should make bracket interface. */
+               /* properties */
+               "bracket-flare "
+               "edge-height "
+               "elements "
+               "padding "
+               "shorten-pair "
+               "thickness "
+              );
 
+/* ugh: should make bracket interface. */
 
 MAKE_SCHEME_CALLBACK (Enclosing_bracket, width, 1);
 SCM
@@ -64,13 +62,12 @@ Enclosing_bracket::width (SCM grob)
       return SCM_EOL;
     }
 
-  Grob *common_x = common_refpoint_of_array (elements, me, X_AXIS); 
+  Grob *common_x = common_refpoint_of_array (elements, me, X_AXIS);
   Interval xext = Axis_group_interface::relative_group_extent (elements, common_x, X_AXIS);
 
   Stencil left_br = Horizontal_bracket::make_bracket (me, 10.0, Y_AXIS, LEFT);
   Stencil right_br = Horizontal_bracket::make_bracket (me, 10.0, Y_AXIS, LEFT);
 
-
   xext.widen (robust_scm2double (me->get_property ("padding"), 0.25));
   left_br.translate_axis (xext[LEFT], X_AXIS);
   right_br.translate_axis (xext[RIGHT], X_AXIS);
@@ -93,7 +90,7 @@ Enclosing_bracket::print (SCM grob)
       return SCM_EOL;
     }
 
-  Grob *common_x = common_refpoint_of_array (elements, me, X_AXIS); 
+  Grob *common_x = common_refpoint_of_array (elements, me, X_AXIS);
   Interval xext = Axis_group_interface::relative_group_extent (elements, common_x, X_AXIS);
   if (xext.is_empty ())
     {
@@ -102,14 +99,14 @@ Enclosing_bracket::print (SCM grob)
     }
 
   Stencil left_br = Horizontal_bracket::make_enclosing_bracket (me, me, elements,
-                                                               Y_AXIS, LEFT);
+                    Y_AXIS, LEFT);
   Stencil right_br = Horizontal_bracket::make_enclosing_bracket (me, me, elements,
-                                                                Y_AXIS, RIGHT);
+                     Y_AXIS, RIGHT);
 
   xext.widen (robust_scm2double (me->get_property ("padding"), 0.25));
   left_br.translate_axis (xext[LEFT], X_AXIS);
   right_br.translate_axis (xext[RIGHT], X_AXIS);
-  
+
   left_br.add_stencil (right_br);
   left_br.translate_axis (-me->relative_coordinate (common_x, X_AXIS), X_AXIS);
 
index a5782d23b0b8fbbcb8fa5272fb2cbdef77b389d2..d7921ce0b47ca58fe55aebe82bfa2b13e24db24f 100644 (file)
@@ -30,11 +30,11 @@ void
 Engraver_group::override (SCM sev)
 {
   Stream_event *ev = unsmob_stream_event (sev);
-  
+
   sloppy_general_pushpop_property (context (),
-                                  ev->get_property ("symbol"),
-                                  ev->get_property ("property-path"),
-                                  ev->get_property ("value"));
+                                   ev->get_property ("symbol"),
+                                   ev->get_property ("property-path"),
+                                   ev->get_property ("value"));
 }
 
 IMPLEMENT_LISTENER (Engraver_group, revert);
@@ -42,11 +42,11 @@ void
 Engraver_group::revert (SCM sev)
 {
   Stream_event *ev = unsmob_stream_event (sev);
-  
+
   sloppy_general_pushpop_property (context (),
-                                  ev->get_property ("symbol"),
-                                  ev->get_property ("property-path"),
-                                  SCM_UNDEFINED);
+                                   ev->get_property ("symbol"),
+                                   ev->get_property ("property-path"),
+                                   SCM_UNDEFINED);
 }
 
 void
@@ -79,8 +79,8 @@ Engraver_group::announce_grob (Grob_info info)
 
   Engraver_group *dad_eng
     = dad_con
-    ? dynamic_cast<Engraver_group *> (dad_con->implementation ())
-    : 0;
+      ? dynamic_cast<Engraver_group *> (dad_con->implementation ())
+      : 0;
 
   if (dad_eng)
     dad_eng->announce_grob (info);
@@ -98,35 +98,35 @@ Engraver_group::acknowledge_grobs ()
   for (vsize j = 0; j < announce_infos_.size (); j++)
     {
       Grob_info info = announce_infos_[j];
-      
+
       SCM meta = info.grob ()->internal_get_property (meta_sym);
       SCM nm = scm_assoc (name_sym, meta);
       if (scm_is_pair (nm))
-       nm = scm_cdr (nm);
+        nm = scm_cdr (nm);
       else
-       continue;
+        continue;
 
       SCM acklist = scm_hashq_ref (acknowledge_hash_table_drul_[info.start_end ()],
-                                  nm, SCM_BOOL_F);
-      
+                                   nm, SCM_BOOL_F);
+
       Engraver_dispatch_list *dispatch
-       = Engraver_dispatch_list::unsmob (acklist);
+        = Engraver_dispatch_list::unsmob (acklist);
 
       if (acklist == SCM_BOOL_F)
-       {
-         SCM ifaces
-           = scm_cdr (scm_assoc (ly_symbol2scm ("interfaces"), meta));
-         acklist = Engraver_dispatch_list::create (get_simple_trans_list (),
-                                                   ifaces, info.start_end ());
+        {
+          SCM ifaces
+            = scm_cdr (scm_assoc (ly_symbol2scm ("interfaces"), meta));
+          acklist = Engraver_dispatch_list::create (get_simple_trans_list (),
+                                                    ifaces, info.start_end ());
 
-         dispatch
-           = Engraver_dispatch_list::unsmob (acklist);
+          dispatch
+            = Engraver_dispatch_list::unsmob (acklist);
 
-         scm_hashq_set_x (acknowledge_hash_table_drul_[info.start_end ()], nm, acklist);
-       }
+          scm_hashq_set_x (acknowledge_hash_table_drul_[info.start_end ()], nm, acklist);
+        }
 
       if (dispatch)
-       dispatch->apply (info);
+        dispatch->apply (info);
     }
 }
 
@@ -143,10 +143,10 @@ Engraver_group::pending_grob_count () const
     {
       Context *c = unsmob_context (scm_car (s));
       Engraver_group *group
-       = dynamic_cast<Engraver_group *> (c->implementation ());
+        = dynamic_cast<Engraver_group *> (c->implementation ());
 
       if (group)
-       count += group->pending_grob_count ();
+        count += group->pending_grob_count ();
     }
   return count;
 }
@@ -157,38 +157,37 @@ Engraver_group::do_announces ()
   do
     {
       /*
-       DOCME: why is this inside the loop? 
+        DOCME: why is this inside the loop?
        */
       for (SCM s = context ()->children_contexts ();
-          scm_is_pair (s); s = scm_cdr (s))
-       {
-         Context *c = unsmob_context (scm_car (s));
-         Engraver_group *group
-           = dynamic_cast<Engraver_group *> (c->implementation ());
-         if (group)
-           group->do_announces ();
-       }
-
-      
+           scm_is_pair (s); s = scm_cdr (s))
+        {
+          Context *c = unsmob_context (scm_car (s));
+          Engraver_group *group
+            = dynamic_cast<Engraver_group *> (c->implementation ());
+          if (group)
+            group->do_announces ();
+        }
+
       while (1)
-       {
-         precomputed_translator_foreach (PROCESS_ACKNOWLEDGED);
-         if (announce_infos_.size () == 0)
-           break;
-
-         acknowledge_grobs ();
-         announce_infos_.clear ();
-       }
+        {
+          precomputed_translator_foreach (PROCESS_ACKNOWLEDGED);
+          if (announce_infos_.size () == 0)
+            break;
+
+          acknowledge_grobs ();
+          announce_infos_.clear ();
+        }
     }
   while (pending_grob_count () > 0);
 }
 
 Engraver_group::Engraver_group ()
 {
-  acknowledge_hash_table_drul_[LEFT] 
-    = acknowledge_hash_table_drul_[RIGHT] 
-    = SCM_EOL;
-  
+  acknowledge_hash_table_drul_[LEFT]
+    = acknowledge_hash_table_drul_[RIGHT]
+      = SCM_EOL;
+
   acknowledge_hash_table_drul_[LEFT] = scm_c_make_hash_table (61);
   acknowledge_hash_table_drul_[RIGHT] = scm_c_make_hash_table (61);
 }
@@ -196,18 +195,18 @@ Engraver_group::Engraver_group ()
 #include "translator.icc"
 
 ADD_TRANSLATOR_GROUP (Engraver_group,
-                     /* doc */
-                     "A group of engravers taken together.",
+                      /* doc */
+                      "A group of engravers taken together.",
 
-                     /* create */
-                     "",
+                      /* create */
+                      "",
 
-                     /* read */
-                     "",
+                      /* read */
+                      "",
 
-                     /* write */
-                     ""
-                     );
+                      /* write */
+                      ""
+                     );
 
 void
 Engraver_group::derived_mark () const
index fa71a1444b217df1a4b7fcf80c3a82bede4758ed..a6e98b8c79dd902f74d9885be61be6086f6b4d3d 100644 (file)
 #include "grob.hh"
 
 LY_DEFINE (ly_engraver_make_grob, "ly:engraver-make-grob",
-          3, 0, 0, (SCM engraver, SCM grob_name, SCM cause),
-          "Create a grob originating from given @var{engraver} instance,"
-          " with given @var{grob-name}, a symbol."
-          "  @var{cause} should either be another grob"
-          " or a music event.")
+           3, 0, 0, (SCM engraver, SCM grob_name, SCM cause),
+           "Create a grob originating from given @var{engraver} instance,"
+           " with given @var{grob-name}, a symbol."
+           "  @var{cause} should either be another grob"
+           " or a music event.")
 {
   LY_ASSERT_TYPE (unsmob_engraver, engraver, 1);
   LY_ASSERT_TYPE (ly_is_symbol, grob_name, 2);
   LY_ASSERT_TYPE (ly_is_grob_cause, cause, 3);
 
   Grob *g = unsmob_engraver (engraver)->
-    internal_make_grob(grob_name, cause,
-                      ly_symbol2string (grob_name).c_str (),
-                      "scheme", 0, "scheme");
+            internal_make_grob (grob_name, cause,
+                                ly_symbol2string (grob_name).c_str (),
+                                "scheme", 0, "scheme");
   return g->self_scm ();
 }
 
 LY_DEFINE (ly_engraver_announce_end_grob, "ly:engraver-announce-end-grob",
-          3, 0, 0, (SCM engraver, SCM grob, SCM cause),
-          "Announce the end of a grob (i.e., the end of a spanner)"
-          " originating from given @var{engraver} instance, with"
-          " @var{grob} being a grob.  @var{cause} should either"
-          " be another grob or a music event.")
+           3, 0, 0, (SCM engraver, SCM grob, SCM cause),
+           "Announce the end of a grob (i.e., the end of a spanner)"
+           " originating from given @var{engraver} instance, with"
+           " @var{grob} being a grob.  @var{cause} should either"
+           " be another grob or a music event.")
 {
   LY_ASSERT_TYPE (unsmob_engraver, engraver, 1);
   LY_ASSERT_SMOB (Grob, grob, 2);
   LY_ASSERT_TYPE (ly_is_grob_cause, cause, 3);
 
   unsmob_engraver (engraver)->
-    announce_end_grob (unsmob_grob (grob), cause);
+  announce_end_grob (unsmob_grob (grob), cause);
 
   return SCM_UNSPECIFIED;
 }
index 12615eb8d6cbc780fc96a8e95cdee2fab6984bc8..d8ece19ee24435b9489ca0aab4b23a95191becb8 100644 (file)
@@ -48,7 +48,7 @@ Engraver::announce_end_grob (Grob_info inf)
 }
 
 Grob_info
-Engraver::make_grob_info(Grob *e, SCM cause)
+Engraver::make_grob_info (Grob *e, SCM cause)
 {
   /* TODO: Remove Music code when it's no longer needed */
   if (Music *m = unsmob_music (cause))
@@ -72,7 +72,6 @@ Engraver::announce_grob (Grob *e, SCM cause)
   announce_grob (make_grob_info (e, cause));
 }
 
-
 /*
   CAUSE is the object (typically a grob or stream-event object) that
   was the reason for ending E.  */
@@ -82,7 +81,6 @@ Engraver::announce_end_grob (Grob *e, SCM cause)
   announce_end_grob (make_grob_info (e, cause));
 }
 
-
 Engraver::Engraver ()
 {
 }
@@ -90,12 +88,12 @@ Engraver::Engraver ()
 #ifndef NDEBUG
 static SCM creation_callback = SCM_EOL;
 LY_DEFINE (ly_set_grob_creation_callback, "ly:set-grob-creation-callback",
-          1, 0, 0, (SCM cb),
-          "Specify a procedure that will be called every time a new grob"
-          " is created.  The callback will receive as arguments the grob"
-          " that was created, the name of the C++ source file that caused"
-          " the grob to be created, and the corresponding line number in"
-          " the C++ source file.")
+           1, 0, 0, (SCM cb),
+           "Specify a procedure that will be called every time a new grob"
+           " is created.  The callback will receive as arguments the grob"
+           " that was created, the name of the C++ source file that caused"
+           " the grob to be created, and the corresponding line number in"
+           " the C++ source file.")
 {
   LY_ASSERT_TYPE (ly_is_procedure, cb, 1);
 
@@ -107,11 +105,11 @@ LY_DEFINE (ly_set_grob_creation_callback, "ly:set-grob-creation-callback",
 
 Grob *
 Engraver::internal_make_grob (SCM symbol,
-                             SCM cause,
-                             char const * /* name */,
-                             char const *file,
-                             int line,
-                             char const *fun)
+                              SCM cause,
+                              char const * /* name */,
+                              char const *file,
+                              int line,
+                              char const *fun)
 {
 #ifdef NDEBUG
   (void)file;
@@ -139,8 +137,8 @@ Engraver::internal_make_grob (SCM symbol,
 #ifndef NDEBUG
   if (ly_is_procedure (creation_callback))
     scm_apply_0 (creation_callback,
-                scm_list_n (grob->self_scm (), scm_from_locale_string (file),
-                            scm_from_int (line), scm_from_locale_string (fun), SCM_UNDEFINED));
+                 scm_list_n (grob->self_scm (), scm_from_locale_string (file),
+                             scm_from_int (line), scm_from_locale_string (fun), SCM_UNDEFINED));
 #endif
 
   return grob;
@@ -148,8 +146,8 @@ Engraver::internal_make_grob (SCM symbol,
 
 Item *
 Engraver::internal_make_item (SCM x, SCM cause,
-                             char const *name,
-                             char const *file, int line, char const *fun)
+                              char const *name,
+                              char const *file, int line, char const *fun)
 {
   Item *it = dynamic_cast<Item *> (internal_make_grob (x, cause, name, file, line, fun));
   assert (it);
@@ -158,24 +156,24 @@ Engraver::internal_make_item (SCM x, SCM cause,
 
 Paper_column *
 Engraver::internal_make_column (SCM x, char const *name,
-                               char const *file, int line, char const *fun)
+                                char const *file, int line, char const *fun)
 {
   return dynamic_cast<Paper_column *> (internal_make_grob (x, SCM_EOL, name, file, line, fun));
 }
 
 Spanner *
 Engraver::internal_make_spanner (SCM x, SCM cause, char const *name,
-                                char const *file, int line, char const *fun)
+                                 char const *file, int line, char const *fun)
 {
   Spanner *sp = dynamic_cast<Spanner *> (internal_make_grob (x, cause, name, file, line, fun));
   assert (sp);
   return sp;
 }
 
-Engraver*
+Engraver *
 unsmob_engraver (SCM eng)
 {
-  return dynamic_cast<Engraver*> (unsmob_translator (eng));
+  return dynamic_cast<Engraver *> (unsmob_translator (eng));
 }
 
 bool
@@ -187,17 +185,16 @@ ly_is_grob_cause (SCM obj)
 #include "translator.icc"
 
 ADD_TRANSLATOR (Engraver,
-               /* doc */
-               "Base class for engravers.  Does nothing, so it is not used.",
-
-               /* create */
-               "",
+                /* doc */
+                "Base class for engravers.  Does nothing, so it is not used.",
 
-               /* read */
-               "",
+                /* create */
+                "",
 
-               /* write */
-               ""
-               );
+                /* read */
+                "",
 
+                /* write */
+                ""
+               );
 
index 38d39508480ea7a586f5c99b1ae2f1d839c13212..bcb48f53fa465b8f215b0644f4e1c91e233eac91 100644 (file)
@@ -72,28 +72,28 @@ Episema_engraver::process_music ()
   if (event_drul_[START])
     {
       if (current_event_)
-       event_drul_[START]->origin ()->warning (_ ("already have an episema"));
+        event_drul_[START]->origin ()->warning (_ ("already have an episema"));
       else
-       {
-         current_event_ = event_drul_[START];
-         span_ = make_spanner ("Episema", event_drul_[START]->self_scm ());
+        {
+          current_event_ = event_drul_[START];
+          span_ = make_spanner ("Episema", event_drul_[START]->self_scm ());
 
-         event_drul_[START] = 0;
-       }
+          event_drul_[START] = 0;
+        }
     }
   if (event_drul_[STOP])
     {
       if (!span_)
-       event_drul_[STOP]
-         ->origin ()->warning (_ ("cannot find start of episema"));
+        event_drul_[STOP]
+        ->origin ()->warning (_ ("cannot find start of episema"));
       else
-       {
-         finished_ = span_;
-         announce_end_grob (finished_, SCM_EOL);
-         span_ = 0;
-         current_event_ = 0;
-         note_columns_.clear ();
-       }
+        {
+          finished_ = span_;
+          announce_end_grob (finished_, SCM_EOL);
+          span_ = 0;
+          current_event_ = 0;
+          note_columns_.clear ();
+        }
     }
 }
 
@@ -103,12 +103,12 @@ Episema_engraver::typeset_all ()
   if (finished_)
     {
       if (!finished_->get_bound (RIGHT))
-       {
-         Grob *col = (note_columns_.size ()
-                      ? note_columns_.back ()
-                      : unsmob_grob (get_property ("currentMusicalColumn")));
-         finished_->set_bound (RIGHT, col);
-       }
+        {
+          Grob *col = (note_columns_.size ()
+                       ? note_columns_.back ()
+                       : unsmob_grob (get_property ("currentMusicalColumn")));
+          finished_->set_bound (RIGHT, col);
+        }
       finished_ = 0;
     }
 }
@@ -119,8 +119,8 @@ Episema_engraver::stop_translation_timestep ()
   if (span_ && !span_->get_bound (LEFT))
     {
       Grob *col = (note_columns_.size ()
-                  ? note_columns_.front ()
-                  : unsmob_grob (get_property ("currentMusicalColumn")));
+                   ? note_columns_.front ()
+                   : unsmob_grob (get_property ("currentMusicalColumn")));
       span_->set_bound (LEFT, col);
     }
 
@@ -165,15 +165,15 @@ ADD_ACKNOWLEDGER (Episema_engraver, note_column);
 ADD_ACKNOWLEDGER (Episema_engraver, note_head);
 
 ADD_TRANSLATOR (Episema_engraver,
-               /* doc */
-               "Create an @emph{Editio Vaticana}-style episema line.",
+                /* doc */
+                "Create an @emph{Editio Vaticana}-style episema line.",
 
-               /* create */
-               "Episema ",
+                /* create */
+                "Episema ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index a22c9ace6b37c850df369298f773ba5ecbeb95aa..4cda2d62bc210ef323fb626b7801777d30d7a983 100644 (file)
@@ -44,17 +44,17 @@ Event_chord_iterator::process (Moment m)
   if (last_processed_mom_ < Moment (0))
     {
       for (SCM s = get_music ()->get_property ("elements");
-          scm_is_pair (s); s = scm_cdr (s))
-       {
-         Music *mus = unsmob_music (scm_car (s));
-         report_event (mus);
-       }
+           scm_is_pair (s); s = scm_cdr (s))
+        {
+          Music *mus = unsmob_music (scm_car (s));
+          report_event (mus);
+        }
       for (SCM s = get_music ()->get_property ("events");
-          scm_is_pair (s); s = scm_cdr (s))
-       {
-         Stream_event *ev = unsmob_stream_event (scm_car (s));
-         get_outlet ()->event_source ()->broadcast (ev);
-       }
+           scm_is_pair (s); s = scm_cdr (s))
+        {
+          Stream_event *ev = unsmob_stream_event (scm_car (s));
+          get_outlet ()->event_source ()->broadcast (ev);
+        }
     }
   Simple_music_iterator::process (m);
 }
index 49fcbcaf3f598d6a55895c1238cb46685dcacd75..a31a793ff11113116570c33ec175675671ca5340 100644 (file)
@@ -67,7 +67,6 @@ Extender_engraver::listen_extender (Stream_event *ev)
   ASSIGN_EVENT_ONCE (ev_, ev);
 }
 
-
 /*
   A CompletizeExtenderEvent is sent at the end of each lyrics block
   to ensure any pending extender can be correctly terminated if the lyrics
@@ -116,33 +115,33 @@ Extender_engraver::stop_translation_timestep ()
       Grob *h = voice ? get_current_note_head (voice, to_boolean (get_property ("includeGraceNotes"))) : 0;
 
       if (h)
-       {
-         if (extender_)
-           {
-             Pointer_group_interface::add_grob (extender_,
-                                                ly_symbol2scm ("heads"), h);
-           }
-
-         if (pending_extender_)
-           {
-             Pointer_group_interface::add_grob (pending_extender_,
-                                                ly_symbol2scm ("heads"), h);
-           }
-       }
+        {
+          if (extender_)
+            {
+              Pointer_group_interface::add_grob (extender_,
+                                                 ly_symbol2scm ("heads"), h);
+            }
+
+          if (pending_extender_)
+            {
+              Pointer_group_interface::add_grob (pending_extender_,
+                                                 ly_symbol2scm ("heads"), h);
+            }
+        }
       else
-       {
-         if (pending_extender_
-             && !get_property ("extendersOverRests"))
-           {
-             completize_extender (pending_extender_);
-             pending_extender_ = 0;
-           }
-       }
+        {
+          if (pending_extender_
+              && !get_property ("extendersOverRests"))
+            {
+              completize_extender (pending_extender_);
+              pending_extender_ = 0;
+            }
+        }
       if (extender_)
-       {
-         pending_extender_ = extender_;
-         extender_ = 0;
-       }
+        {
+          pending_extender_ = extender_;
+          extender_ = 0;
+        }
     }
 
   ev_ = 0;
@@ -155,7 +154,7 @@ completize_extender (Spanner *sp)
     {
       extract_item_set (sp, "heads", heads);
       if (heads.size ())
-       sp->set_bound (RIGHT, heads.back ());
+        sp->set_bound (RIGHT, heads.back ());
     }
 }
 
@@ -167,7 +166,7 @@ Extender_engraver::finalize ()
       completize_extender (extender_);
 
       if (!extender_->get_bound (RIGHT))
-       extender_->warning (_ ("unterminated extender"));
+        extender_->warning (_ ("unterminated extender"));
       extender_ = 0;
     }
 
@@ -176,23 +175,23 @@ Extender_engraver::finalize ()
       completize_extender (pending_extender_);
 
       if (!pending_extender_->get_bound (RIGHT))
-       pending_extender_->warning (_ ("unterminated extender"));
+        pending_extender_->warning (_ ("unterminated extender"));
       pending_extender_ = 0;
     }
 }
 
 ADD_ACKNOWLEDGER (Extender_engraver, lyric_syllable);
 ADD_TRANSLATOR (Extender_engraver,
-               /* doc */
-               "Create lyric extenders.",
+                /* doc */
+                "Create lyric extenders.",
 
-               /* create */
-               "LyricExtender ",
+                /* create */
+                "LyricExtender ",
 
-               /* read */
-               "extendersOverRests "
-               "includeGraceNotes ",
+                /* read */
+                "extendersOverRests "
+                "includeGraceNotes ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 7fd868c559293bf550ca2c8224118f6799645db7..0278c9f3d33a2938df1be35a83f2d10a8c22d11d 100644 (file)
 #include "pointer-group-interface.hh"
 #include "axis-group-interface.hh"
 
-
 #include "horizontal-bracket.hh"
 
 struct Figured_bass_continuation
 {
   DECLARE_GROB_INTERFACE ();
-  
+
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (center_on_figures, (SCM));
@@ -42,7 +41,7 @@ MAKE_SCHEME_CALLBACK (Figured_bass_continuation, center_on_figures, 1);
 SCM
 Figured_bass_continuation::center_on_figures (SCM grob)
 {
-  Spanner *me = dynamic_cast<Spanner*> (unsmob_grob (grob));
+  Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (grob));
   extract_grob_set (me, "figures", figures);
   if (figures.empty ())
     return scm_from_double (0.0);
@@ -58,45 +57,45 @@ MAKE_SCHEME_CALLBACK (Figured_bass_continuation, print, 1);
 SCM
 Figured_bass_continuation::print (SCM grob)
 {
-  Spanner *me = dynamic_cast<Spanner*> (unsmob_grob (grob));
+  Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (grob));
+
+  Real thick
+    = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"))
+      * robust_scm2double (me->get_property ("thickness"), 1);
 
-  Real thick =
-    me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"))
-    * robust_scm2double (me->get_property ("thickness"), 1);
-  
   Interval spanned;
   Direction d = LEFT;
   Grob *common = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT),
-                                                       X_AXIS);
+                                                        X_AXIS);
   do
     {
       Item *bound = me->get_bound (d);
-      Direction extdir =
-       (d == LEFT && to_boolean (bound->get_property ("implicit")))
-       ? LEFT : RIGHT;
+      Direction extdir
+        = (d == LEFT && to_boolean (bound->get_property ("implicit")))
+          ? LEFT : RIGHT;
 
-      spanned[d] 
-       = robust_relative_extent (bound, common, X_AXIS)[extdir]
-       - me->relative_coordinate (common, X_AXIS);
+      spanned[d]
+        = robust_relative_extent (bound, common, X_AXIS)[extdir]
+          - me->relative_coordinate (common, X_AXIS);
     }
-  while (flip (&d) !=  LEFT);
+  while (flip (&d) != LEFT);
   spanned.widen (- robust_scm2double (me->get_property ("padding"), 0.2));
-  
+
   Stencil extender;
   if (!spanned.is_empty ())
     extender = Line_interface::make_line (thick,
-                                         Offset (spanned[LEFT], 0),
-                                         Offset (spanned[RIGHT], 0));
-  
+                                          Offset (spanned[LEFT], 0),
+                                          Offset (spanned[RIGHT], 0));
+
   return extender.smobbed_copy ();
 }
 
 ADD_INTERFACE (Figured_bass_continuation,
-             "Simple extender line between bounds.",
-             
-             /* properties */
-             "thickness "
-             "padding "
-             "figures "
-             );
-             
+               "Simple extender line between bounds.",
+
+               /* properties */
+               "thickness "
+               "padding "
+               "figures "
+              );
+
index c0b4c09b92584dcb01cb6e597954256c474b7259..18b895660fa079c07523a31a1d4ea45802f3f0b3 100644 (file)
@@ -110,7 +110,7 @@ struct Figured_bass_engraver : public Engraver
   void add_brackets ();
   void create_grobs ();
 
-  void center_continuations (vector<Spanner*> const &consecutive_lines);
+  void center_continuations (vector<Spanner *> const &consecutive_lines);
   void center_repeated_continuations ();
 protected:
   vector<Figure_group> groups_;
@@ -154,7 +154,7 @@ Figured_bass_engraver::start_translation_timestep ()
 {
   if (now_mom ().main_part_ < stop_moment_.main_part_
       || now_mom ().grace_part_ < Rational (0))
-    return ;
+    return;
 
   have_rest_ = 0;
   new_events_.clear ();
@@ -170,11 +170,11 @@ Figured_bass_engraver::stop_translation_timestep ()
   if (groups_.empty ()
       || now_mom ().main_part_ < stop_moment_.main_part_
       || now_mom ().grace_part_ < Rational (0))
-    return ;
+    return;
 
   bool found = false;
   for (vsize i = 0; !found && i < groups_.size (); i++)
-    found  = found  || groups_[i].current_event_;
+    found = found || groups_[i].current_event_;
 
   if (!found)
     clear_spanners ();
@@ -192,7 +192,7 @@ void
 Figured_bass_engraver::listen_bass_figure (Stream_event *ev)
 {
   new_event_found_ = true;
-  Moment stop  = now_mom () + get_event_length (ev, now_mom ());
+  Moment stop = now_mom () + get_event_length (ev, now_mom ());
   stop_moment_ = max (stop_moment_, stop);
 
   // Handle no-continuation here, don't even add it to the already existing
@@ -215,15 +215,15 @@ Figured_bass_engraver::listen_bass_figure (Stream_event *ev)
 }
 
 void
-Figured_bass_engraver::center_continuations (vector<Spanner*> const &consecutive_lines)
+Figured_bass_engraver::center_continuations (vector<Spanner *> const &consecutive_lines)
 {
   if (consecutive_lines.size () == 2)
     {
-      vector<Grob*> left_figs;
+      vector<Grob *> left_figs;
       for (vsize j = consecutive_lines.size (); j--;)
         left_figs.push_back (consecutive_lines[j]->get_bound (LEFT));
 
-      SCM  ga = Grob_array::make_array ();
+      SCM ga = Grob_array::make_array ();
       unsmob_grob_array (ga)->set_array (left_figs);
 
       for (vsize j = consecutive_lines.size (); j--;)
@@ -235,7 +235,7 @@ Figured_bass_engraver::center_continuations (vector<Spanner*> const &consecutive
 void
 Figured_bass_engraver::center_repeated_continuations ()
 {
-  vector<Spanner*> consecutive_lines;
+  vector<Spanner *> consecutive_lines;
   for (vsize i = 0; i <= groups_.size (); i++)
     {
       if (i < groups_.size ()
@@ -270,13 +270,13 @@ Figured_bass_engraver::clear_spanners ()
     {
       if (groups_[i].group_)
         {
-          announce_end_grob (groups_[i].group_ , SCM_EOL);
+          announce_end_grob (groups_[i].group_, SCM_EOL);
           groups_[i].group_ = 0;
         }
 
       if (groups_[i].continuation_line_)
         {
-          announce_end_grob (groups_[i].continuation_line_ , SCM_EOL);
+          announce_end_grob (groups_[i].continuation_line_, SCM_EOL);
           groups_[i].continuation_line_ = 0;
         }
     }
@@ -293,8 +293,8 @@ Figured_bass_engraver::process_music ()
 
   // If we have a rest, or we have no new or continued events, clear all spanners
   bool ignore_rest = to_boolean (get_property ("ignoreFiguredBassRest"));
-  if ((ignore_rest && have_rest_) ||
-      (!continuation_ && new_events_.empty ()))
+  if ((ignore_rest && have_rest_)
+      || (!continuation_ && new_events_.empty ()))
     {
       clear_spanners ();
       groups_.clear ();
@@ -358,9 +358,9 @@ Figured_bass_engraver::process_music ()
             {
               if (!group.continuation_line_)
                 {
-                  Spanner * line
+                  Spanner *line
                     = make_spanner ("BassFigureContinuation", SCM_EOL);
-                  Item * item = group.figure_item_;
+                  Item *item = group.figure_item_;
                   group.continuation_line_ = line;
                   line->set_bound (LEFT, item);
 
@@ -381,13 +381,13 @@ Figured_bass_engraver::process_music ()
       /*
         Ugh, repeated code.
        */
-      vector<Spanner*> consecutive;
+      vector<Spanner *> consecutive;
       if (to_boolean (get_property ("figuredBassCenterContinuations")))
         {
           for (vsize i = 0; i <= junk_continuations.size (); i++)
             {
               if (i < junk_continuations.size ()
-                  && (i == 0 || junk_continuations[i-1] == junk_continuations[i] - 1))
+                  && (i == 0 || junk_continuations[i - 1] == junk_continuations[i] - 1))
                 consecutive.push_back (groups_[junk_continuations[i]].continuation_line_);
               else
                 {
@@ -410,7 +410,7 @@ void
 Figured_bass_engraver::create_grobs ()
 {
   Grob *muscol
-    = dynamic_cast<Item*> (unsmob_grob (get_property ("currentMusicalColumn")));
+    = dynamic_cast<Item *> (unsmob_grob (get_property ("currentMusicalColumn")));
   if (!alignment_)
     {
       alignment_ = make_spanner ("BassFigureAlignment", SCM_EOL);
@@ -478,9 +478,9 @@ Figured_bass_engraver::create_grobs ()
 void
 Figured_bass_engraver::add_brackets ()
 {
-  vector<Grob*> encompass;
+  vector<Grob *> encompass;
   bool inside = false;
-  for (vsize i = 0; i < groups_.size (); i ++)
+  for (vsize i = 0; i < groups_.size (); i++)
     {
       if (!groups_[i].current_event_)
         continue;
@@ -491,11 +491,11 @@ Figured_bass_engraver::add_brackets ()
       if (inside && groups_[i].figure_item_)
         encompass.push_back (groups_[i].figure_item_);
 
-       if (to_boolean (groups_[i].current_event_->get_property ("bracket-stop")))
+      if (to_boolean (groups_[i].current_event_->get_property ("bracket-stop")))
         {
           inside = false;
 
-          Item * brack = make_item ("BassFigureBracket", groups_[i].current_event_->self_scm ());
+          Item *brack = make_item ("BassFigureBracket", groups_[i].current_event_->self_scm ());
           for (vsize j = 0; j < encompass.size (); j++)
             {
               Pointer_group_interface::add_grob (brack,
@@ -528,4 +528,4 @@ ADD_TRANSLATOR (Figured_bass_engraver,
 
                 /* write */
                 ""
-                );
+               );
index 6db165a9ba5d1456456dc823f58890e6a7986749..a564a9eec2c4dcb8bba821fcacc096a2edbb6449 100644 (file)
@@ -33,8 +33,8 @@ class Figured_bass_position_engraver : public Engraver
 
   Spanner *bass_figure_alignment_;
   Spanner *positioner_;
-  vector<Grob*> support_;
-  vector<Grob*> span_support_;
+  vector<Grob *> support_;
+  vector<Grob *> span_support_;
 protected:
   DECLARE_ACKNOWLEDGER (note_column);
   DECLARE_ACKNOWLEDGER (slur);
@@ -72,13 +72,13 @@ Figured_bass_position_engraver::stop_spanner ()
     {
       positioner_->set_bound (RIGHT, bass_figure_alignment_->get_bound (RIGHT));
     }
-  
+
   positioner_ = 0;
   bass_figure_alignment_ = 0;
 }
 
 void
-Figured_bass_position_engraver::finalize () 
+Figured_bass_position_engraver::finalize ()
 {
   stop_spanner ();
 }
@@ -92,8 +92,8 @@ Figured_bass_position_engraver::acknowledge_note_column (Grob_info info)
 void
 Figured_bass_position_engraver::acknowledge_end_slur (Grob_info info)
 {
-  vector<Grob*>::iterator i = find (span_support_.begin (), span_support_.end (),
-                                   info.grob ());
+  vector<Grob *>::iterator i = find (span_support_.begin (), span_support_.end (),
+                                     info.grob ());
 
   if (i < span_support_.end ())
     span_support_.erase (i);
@@ -117,9 +117,9 @@ Figured_bass_position_engraver::stop_translation_timestep ()
   if (positioner_)
     {
       for (vsize i = 0; i < span_support_.size (); i++)
-       Side_position_interface::add_support (positioner_, span_support_[i]);
+        Side_position_interface::add_support (positioner_, span_support_[i]);
       for (vsize i = 0; i < support_.size (); i++)
-       Side_position_interface::add_support (positioner_, support_[i]);
+        Side_position_interface::add_support (positioner_, support_[i]);
     }
 
   support_.clear ();
@@ -134,11 +134,10 @@ Figured_bass_position_engraver::acknowledge_end_bass_figure_alignment (Grob_info
 void
 Figured_bass_position_engraver::acknowledge_bass_figure_alignment (Grob_info info)
 {
-  bass_figure_alignment_ = dynamic_cast<Spanner*> (info.grob ());
+  bass_figure_alignment_ = dynamic_cast<Spanner *> (info.grob ());
   start_spanner ();
 }
 
-
 ADD_ACKNOWLEDGER (Figured_bass_position_engraver, note_column);
 ADD_ACKNOWLEDGER (Figured_bass_position_engraver, slur);
 ADD_END_ACKNOWLEDGER (Figured_bass_position_engraver, slur);
@@ -148,15 +147,15 @@ ADD_ACKNOWLEDGER (Figured_bass_position_engraver, bass_figure_alignment);
 ADD_END_ACKNOWLEDGER (Figured_bass_position_engraver, bass_figure_alignment);
 
 ADD_TRANSLATOR (Figured_bass_position_engraver,
-               /* doc */
-               "Position figured bass alignments over notes.",
-               
-               /* create */
-               "BassFigureAlignmentPositioning ",
-
-               /* read */
-               "",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Position figured bass alignments over notes.",
+
+                /* create */
+                "BassFigureAlignmentPositioning ",
+
+                /* read */
+                "",
+
+                /* write */
+                ""
+               );
index e0fd5d5fba13bd623f6506081e5e90fc3c8caa52..6074f3a1da30f45790e94544b38d6b8e50e9c912 100644 (file)
@@ -34,8 +34,8 @@ map_file_name (string s)
 }
 
 LY_DEFINE (ly_add_file_name_alist, "ly:add-file-name-alist",
-          1, 0, 0, (SCM alist),
-          "Add mappings for error messages from @var{alist}.")
+           1, 0, 0, (SCM alist),
+           "Add mappings for error messages from @var{alist}.")
 {
   for (SCM s = alist; scm_is_pair (s); s = scm_cdr (s))
     {
index 80023786984af883595e961476870c993faca68b..8537e09ab4b232921900f1e7f594927bcf53107c 100644 (file)
@@ -30,8 +30,8 @@
 
 class Fingering_engraver : public Engraver
 {
-  vector<Stream_event*> events_;
-  vector<Item*> fingerings_;
+  vector<Stream_event *> events_;
+  vector<Item *> fingerings_;
 
 public:
   TRANSLATOR_DECLARATIONS (Fingering_engraver);
@@ -60,7 +60,7 @@ Fingering_engraver::listen_stroke_finger (Stream_event * /* ev */)
 {
   /*
     FIXME: should do something.
-    
+
     This function is mainly here to shut up a warning
    */
 }
@@ -80,7 +80,7 @@ Fingering_engraver::acknowledge_rhythmic_head (Grob_info inf)
       Grob *t = fingerings_[i];
       Side_position_interface::add_support (t, inf.grob ());
       if (!t->get_parent (X_AXIS))
-       t->set_parent (inf.grob (), X_AXIS);
+        t->set_parent (inf.grob (), X_AXIS);
     }
 }
 
@@ -130,9 +130,9 @@ Fingering_engraver::make_script (Direction d, Stream_event *r, int i)
   if (!is_direction (fingering->get_property_data ("direction")))
     {
       if (d)
-       fingering->set_property ("direction", scm_from_int (d));
+        fingering->set_property ("direction", scm_from_int (d));
       else
-       fingering->set_property ("direction", scm_from_int (RIGHT));
+        fingering->set_property ("direction", scm_from_int (RIGHT));
     }
 
   fingerings_.push_back (fingering);
@@ -153,15 +153,15 @@ ADD_ACKNOWLEDGER (Fingering_engraver, rhythmic_head);
 ADD_ACKNOWLEDGER (Fingering_engraver, stem);
 
 ADD_TRANSLATOR (Fingering_engraver,
-               /* doc */
-               "Create fingering scripts.",
+                /* doc */
+                "Create fingering scripts.",
 
-               /* create */
-               "Fingering ",
+                /* create */
+                "Fingering ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index cc01f206925f3053f07f5d415c92952283b7a17a..993e52568eb1ce6a631b7364355ebfbe7fec22e8 100644 (file)
@@ -38,14 +38,14 @@ display_fontset (FcFontSet *fs)
 
       font = FcNameUnparse (fs->fonts[j]);
       if (FcPatternGetString (fs->fonts[j], FC_FILE, 0, &str) == FcResultMatch)
-       retval += String_convert::form_string ("FILE %s\n", str);
+        retval += String_convert::form_string ("FILE %s\n", str);
       if (FcPatternGetString (fs->fonts[j], FC_INDEX, 0, &str) == FcResultMatch)
-       retval += String_convert::form_string ("INDEX %s\n", str);
+        retval += String_convert::form_string ("INDEX %s\n", str);
       if (FcPatternGetString (fs->fonts[j], FC_FAMILY, 0, &str) == FcResultMatch)
-       retval += String_convert::form_string ("family %s\n ", str);
+        retval += String_convert::form_string ("family %s\n ", str);
       if (FcPatternGetString (fs->fonts[j],
-                             "designsize", 0, &str) == FcResultMatch)
-       retval += String_convert::form_string ("designsize %s\n ", str);
+                              "designsize", 0, &str) == FcResultMatch)
+        retval += String_convert::form_string ("designsize %s\n ", str);
 
       retval += String_convert::form_string ("%s\n", (const char *)font);
       free (font);
@@ -98,10 +98,9 @@ display_list (FcConfig *fcc)
   return retval;
 }
 
-
 LY_DEFINE (ly_font_config_get_font_file, "ly:font-config-get-font-file", 1, 0, 0,
-          (SCM name),
-          "Get the file for font @var{name}.")
+           (SCM name),
+           "Get the file for font @var{name}.")
 {
   LY_ASSERT_TYPE (scm_is_string, name, 1);
 
@@ -127,10 +126,10 @@ LY_DEFINE (ly_font_config_get_font_file, "ly:font-config-get-font-file", 1, 0, 0
 
   return scm_result;
 }
-       
+
 LY_DEFINE (ly_font_config_display_fonts, "ly:font-config-display-fonts", 0, 0, 0,
-          (),
-          "Dump a list of all fonts visible to FontConfig.")
+           (),
+           "Dump a list of all fonts visible to FontConfig.")
 {
   string str = display_list (NULL);
   str += display_config (NULL);
@@ -141,8 +140,8 @@ LY_DEFINE (ly_font_config_display_fonts, "ly:font-config-display-fonts", 0, 0, 0
 }
 
 LY_DEFINE (ly_font_config_add_directory, "ly:font-config-add-directory", 1, 0, 0,
-          (SCM dir),
-          "Add directory @var{dir} to FontConfig.")
+           (SCM dir),
+           "Add directory @var{dir} to FontConfig.")
 {
   LY_ASSERT_TYPE (scm_is_string, dir, 1);
 
@@ -157,8 +156,8 @@ LY_DEFINE (ly_font_config_add_directory, "ly:font-config-add-directory", 1, 0, 0
 }
 
 LY_DEFINE (ly_font_config_add_font, "ly:font-config-add-font", 1, 0, 0,
-          (SCM font),
-          "Add font @var{font} to FontConfig.")
+           (SCM font),
+           "Add font @var{font} to FontConfig.")
 {
   LY_ASSERT_TYPE (scm_is_string, font, 1);
 
index 54f04bee8ebc5e2c93988ce8f83ef0b3fcb5852a..63cb66fc3519967e5e4b238bb9f85a8758e1b5e8 100644 (file)
@@ -30,7 +30,6 @@
 #include "main.hh"
 #include "warn.hh"
 
-
 FcConfig *font_config_global = 0;
 
 void
@@ -41,22 +40,22 @@ init_fontconfig ()
 
   /* TODO: Find a way for Fontconfig to update its cache, if needed. */
   font_config_global = FcInitLoadConfig ();
-                       
+
   vector<string> dirs;
 
   /* Extra trailing slash suddenly breaks fontconfig (fc-cache 2.5.0)
      on windows.  */
   dirs.push_back (lilypond_datadir + "/fonts/otf");
-  
+
   for (vsize i = 0; i < dirs.size (); i++)
     {
       string dir = dirs[i];
       if (!FcConfigAppFontAddDir (font_config_global, (FcChar8 *)dir.c_str ()))
-       error (_f ("failed adding font directory: %s", dir.c_str ()));
+        error (_f ("failed adding font directory: %s", dir.c_str ()));
       else if (be_verbose_global)
-       message (_f ("adding font directory: %s", dir.c_str ()));
+        message (_f ("adding font directory: %s", dir.c_str ()));
     }
-  
+
   if (be_verbose_global)
     message (_ ("Building font database..."));
 
index 4085140311fc8ea866c14a63736ab41d01d19d32..09b933ea46b4081d509269221b113c3ca613bce4 100644 (file)
@@ -61,15 +61,15 @@ Font_interface::text_font_alist_chain (Grob *g)
 }
 
 ADD_INTERFACE (Font_interface,
-              "Any symbol that is typeset through fixed sets of glyphs,"
-              " (i.e., fonts).",
+               "Any symbol that is typeset through fixed sets of glyphs,"
+               " (i.e., fonts).",
 
-              /* properties */
-              "font "
-              "font-encoding "
-              "font-family "
-              "font-name "
-              "font-series "
-              "font-shape "
-              "font-size "
-              );
+               /* properties */
+               "font "
+               "font-encoding "
+               "font-family "
+               "font-name "
+               "font-series "
+               "font-shape "
+               "font-size "
+              );
index fda67e11ba9d216257b595bf6852485d53046d6c..15e4a8d57fc9d36aae7e20c5bb4b04f1c37c44cc 100644 (file)
 #include "modified-font-metric.hh"
 
 LY_DEFINE (ly_font_get_glyph, "ly:font-get-glyph",
-          2, 0, 0,
-          (SCM font, SCM name),
-          "Return a stencil from @var{font} for the glyph named @var{name}."
-          "  If the glyph is not available, return an empty stencil.\n"
-          "\n"
-          "Note that this command can only be used to access glyphs from"
-          " fonts loaded with @code{ly:system-font-load}; currently, this"
-          " means either the Emmentaler or Emmentaler-Brace "
+           2, 0, 0,
+           (SCM font, SCM name),
+           "Return a stencil from @var{font} for the glyph named @var{name}."
+           "  If the glyph is not available, return an empty stencil.\n"
+           "\n"
+           "Note that this command can only be used to access glyphs from"
+           " fonts loaded with @code{ly:system-font-load}; currently, this"
+           " means either the Emmentaler or Emmentaler-Brace "
            " fonts, corresponding"
-          " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
-          " respectively.")
+           " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
+           " respectively.")
 {
   Font_metric *fm = unsmob_metrics (font);
   LY_ASSERT_SMOB (Font_metric, font, 1);
@@ -47,15 +47,15 @@ LY_DEFINE (ly_font_get_glyph, "ly:font-get-glyph",
 }
 
 LY_DEFINE (ly_font_glyph_name_to_index, "ly:font-glyph-name-to-index",
-          2, 0, 0,
-          (SCM font, SCM name),
-          "Return the index for @var{name} in @var{font}.\n"
-          "\n"
-          "Note that this command can only be used to access glyphs from"
-          " fonts loaded with @code{ly:system-font-load}; currently, this"
-          " means either the Emmentaler or Emmentaler-Brace fonts, corresponding"
-          " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
-          " respectively.")
+           2, 0, 0,
+           (SCM font, SCM name),
+           "Return the index for @var{name} in @var{font}.\n"
+           "\n"
+           "Note that this command can only be used to access glyphs from"
+           " fonts loaded with @code{ly:system-font-load}; currently, this"
+           " means either the Emmentaler or Emmentaler-Brace fonts, corresponding"
+           " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
+           " respectively.")
 {
   Font_metric *fm = unsmob_metrics (font);
   LY_ASSERT_SMOB (Font_metric, font, 1);
@@ -65,15 +65,15 @@ LY_DEFINE (ly_font_glyph_name_to_index, "ly:font-glyph-name-to-index",
 }
 
 LY_DEFINE (ly_font_index_to_charcode, "ly:font-index-to-charcode",
-          2, 0, 0,
-          (SCM font, SCM index),
-          "Return the character code for @var{index} in @var{font}.\n"
-          "\n"
-          "Note that this command can only be used to access glyphs from"
-          " fonts loaded with @code{ly:system-font-load}; currently, this"
-          " means either the Emmentaler or Emmentaler-Brace fonts, corresponding"
-          " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
-          " respectively.")
+           2, 0, 0,
+           (SCM font, SCM index),
+           "Return the character code for @var{index} in @var{font}.\n"
+           "\n"
+           "Note that this command can only be used to access glyphs from"
+           " fonts loaded with @code{ly:system-font-load}; currently, this"
+           " means either the Emmentaler or Emmentaler-Brace fonts, corresponding"
+           " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
+           " respectively.")
 {
   Font_metric *fm = unsmob_metrics (font);
   LY_ASSERT_SMOB (Font_metric, font, 1);
@@ -83,15 +83,15 @@ LY_DEFINE (ly_font_index_to_charcode, "ly:font-index-to-charcode",
 }
 
 LY_DEFINE (ly_font_glyph_name_to_charcode, "ly:font-glyph-name-to-charcode",
-          2, 0, 0,
-          (SCM font, SCM name),
-          "Return the character code for glyph @var{name} in @var{font}.\n"
-          "\n"
-          "Note that this command can only be used to access glyphs from"
-          " fonts loaded with @code{ly:system-font-load}; currently, this"
-          " means either the Emmentaler or Emmentaler-Brace fonts, corresponding"
-          " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
-          " respectively.")
+           2, 0, 0,
+           (SCM font, SCM name),
+           "Return the character code for glyph @var{name} in @var{font}.\n"
+           "\n"
+           "Note that this command can only be used to access glyphs from"
+           " fonts loaded with @code{ly:system-font-load}; currently, this"
+           " means either the Emmentaler or Emmentaler-Brace fonts, corresponding"
+           " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
+           " respectively.")
 {
   Font_metric *fm = unsmob_metrics (font);
   LY_ASSERT_SMOB (Font_metric, font, 1);
@@ -104,10 +104,10 @@ LY_DEFINE (ly_font_glyph_name_to_charcode, "ly:font-glyph-name-to-charcode",
   TODO: when are non string retvals allowed?
  */
 LY_DEFINE (ly_font_file_name, "ly:font-file-name",
-          1, 0, 0,
-          (SCM font),
-          "Given the font metric @var{font},"
-          " return the corresponding file name.")
+           1, 0, 0,
+           (SCM font),
+           "Given the font metric @var{font},"
+           " return the corresponding file name.")
 {
   LY_ASSERT_SMOB (Font_metric, font, 1);
 
@@ -118,10 +118,10 @@ LY_DEFINE (ly_font_file_name, "ly:font-file-name",
 }
 
 LY_DEFINE (ly_font_name, "ly:font-name",
-          1, 0, 0,
-          (SCM font),
-          "Given the font metric @var{font},"
-          " return the corresponding name.")
+           1, 0, 0,
+           (SCM font),
+           "Given the font metric @var{font},"
+           " return the corresponding name.")
 {
   LY_ASSERT_SMOB (Font_metric, font, 1);
   Font_metric *fm = unsmob_metrics (font);
@@ -130,9 +130,9 @@ LY_DEFINE (ly_font_name, "ly:font-name",
 }
 
 LY_DEFINE (ly_font_magnification, "ly:font-magnification", 1, 0, 0,
-          (SCM font),
-          "Given the font metric @var{font}, return the"
-          " magnification, relative to the current output-scale.")
+           (SCM font),
+           "Given the font metric @var{font}, return the"
+           " magnification, relative to the current output-scale.")
 {
   LY_ASSERT_SMOB (Font_metric, font, 1);
 
@@ -141,9 +141,9 @@ LY_DEFINE (ly_font_magnification, "ly:font-magnification", 1, 0, 0,
 }
 
 LY_DEFINE (ly_font_design_size, "ly:font-design-size", 1, 0, 0,
-          (SCM font),
-          "Given the font metric @var{font}, return the"
-          " design size, relative to the current output-scale.")
+           (SCM font),
+           "Given the font metric @var{font}, return the"
+           " design size, relative to the current output-scale.")
 {
   LY_ASSERT_SMOB (Font_metric, font, 1);
 
index 458528dd2e4dce9a6994a6975c2f0a86ae570ebf..9e762cb367b0e51c5375aa4d822edcd3fd26f0c8 100644 (file)
@@ -48,8 +48,8 @@ Font_metric::find_by_name (string s) const
   if (idx >= 0)
     {
       expr = scm_list_3 (ly_symbol2scm ("named-glyph"),
-                        self_scm (),
-                        ly_string2scm (s));
+                         self_scm (),
+                         ly_string2scm (s));
       b = get_indexed_char_dimensions (idx);
     }
 
@@ -87,7 +87,7 @@ Font_metric::get_indexed_char_dimensions (size_t) const
 size_t
 Font_metric::name_to_index (string) const
 {
-  return (size_t)-1;
+  return (size_t) - 1;
 }
 
 Offset
@@ -161,7 +161,7 @@ Font_metric::text_stencil (Output_def *state,
                            string, bool) const
 {
   (void) state;
-  
+
   programming_error ("Cannot get a text stencil from this font");
   return Stencil (Box (), SCM_EOL);
 }
index f9f42ae25e244781ab056f108e471b23b39a7ca5..3de5a2a454bb2c79b5af365eed7d8bae87d33cdc 100644 (file)
@@ -17,7 +17,6 @@
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include "dimensions.hh"
 #include "all-font-metrics.hh"
 #include "output-def.hh"
@@ -28,7 +27,7 @@
 
 Font_metric *
 get_font_by_design_size (Output_def *layout, Real requested,
-                        SCM font_vector)
+                         SCM font_vector)
 {
   int n = scm_c_vector_length (font_vector);
   Real size = 1e6;
@@ -42,23 +41,23 @@ get_font_by_design_size (Output_def *layout, Real requested,
       SCM entry = scm_c_vector_ref (font_vector, i);
 
       if (scm_promise_p (entry) == SCM_BOOL_T)
-       {
-         Font_metric *fm = unsmob_metrics (scm_force (entry));
-         size = fm->design_size ();
-       }
+        {
+          Font_metric *fm = unsmob_metrics (scm_force (entry));
+          size = fm->design_size ();
+        }
 #if HAVE_PANGO_FT2
       else if (scm_is_pair (entry)
-              && scm_is_number (scm_car (entry))
-              && scm_is_string (scm_cdr (entry)))
-       {
-         size = scm_to_double (scm_car (entry));
-         pango_description_string
-           = scm_cdr (entry);
-       }
+               && scm_is_number (scm_car (entry))
+               && scm_is_string (scm_cdr (entry)))
+        {
+          size = scm_to_double (scm_car (entry));
+          pango_description_string
+            = scm_cdr (entry);
+        }
 #endif
 
       if (size > requested)
-       break;
+        break;
       last_size = size;
       last_pango_description_string = pango_description_string;
     }
@@ -68,11 +67,11 @@ get_font_by_design_size (Output_def *layout, Real requested,
   else if (i > 0)
     {
       if ((requested / last_size) < (size / requested))
-       {
-         i--;
-         size = last_size;
-         pango_description_string = last_pango_description_string;
-       }
+        {
+          i--;
+          size = last_size;
+          pango_description_string = last_pango_description_string;
+        }
     }
 
   Font_metric *fm = 0;
@@ -80,8 +79,8 @@ get_font_by_design_size (Output_def *layout, Real requested,
     {
 #if HAVE_PANGO_FT2
       return find_pango_font (layout,
-                             pango_description_string,
-                             requested / size);
+                              pango_description_string,
+                              requested / size);
 #else
       error ("Trying to retrieve pango font without HAVE_PANGO_FT2.");
 #endif
@@ -94,18 +93,18 @@ get_font_by_design_size (Output_def *layout, Real requested,
 
 Font_metric *
 get_font_by_mag_step (Output_def *layout, Real requested_step,
-                     SCM font_vector, Real default_size)
+                      SCM font_vector, Real default_size)
 {
   return get_font_by_design_size (layout, default_size
-                                 * pow (2.0, requested_step / 6.0),
-                                 font_vector);
+                                  * pow (2.0, requested_step / 6.0),
+                                  font_vector);
 }
 
 SCM
 properties_to_font_size_family (SCM fonts, SCM alist_chain)
 {
   return scm_call_2 (ly_lily_module_constant ("lookup-font"), fonts,
-                    alist_chain);
+                     alist_chain);
 }
 
 Font_metric *
@@ -126,14 +125,14 @@ select_encoded_font (Output_def *layout, SCM chain)
 #endif
     if (scm_instance_p (name))
       {
-       SCM base_size = scm_slot_ref (name, ly_symbol2scm ("default-size"));
-       SCM vec = scm_slot_ref (name, ly_symbol2scm ("size-vector"));
+        SCM base_size = scm_slot_ref (name, ly_symbol2scm ("default-size"));
+        SCM vec = scm_slot_ref (name, ly_symbol2scm ("size-vector"));
 
-       Real req = robust_scm2double (ly_chain_assoc_get (ly_symbol2scm ("font-size"), chain, SCM_BOOL_F),
-                                     0.0);
+        Real req = robust_scm2double (ly_chain_assoc_get (ly_symbol2scm ("font-size"), chain, SCM_BOOL_F),
+                                      0.0);
 
-       return get_font_by_mag_step (layout, req, vec,
-                                    scm_to_double (base_size));
+        return get_font_by_mag_step (layout, req, vec,
+                                     scm_to_double (base_size));
       }
 
   assert (0);
index c95e104c87dc7d95208f6fe0be0a354877c645c0..7c41f4a123046e20b20ece59d840b582ad2ff17f 100644 (file)
@@ -55,7 +55,7 @@ Font_size_engraver::acknowledge_font (Grob_info gi)
     return;
 
   Real font_size = size
-    + robust_scm2double (gi.grob ()->get_property ("font-size"), 0);
+                   + robust_scm2double (gi.grob ()->get_property ("font-size"), 0);
   gi.grob ()->set_property ("font-size", scm_from_double (font_size));
 }
 
@@ -63,15 +63,15 @@ Font_size_engraver::acknowledge_font (Grob_info gi)
 
 ADD_ACKNOWLEDGER (Font_size_engraver, font);
 ADD_TRANSLATOR (Font_size_engraver,
-               /* doc */
-               "Put @code{fontSize} into @code{font-size} grob property.",
+                /* doc */
+                "Put @code{fontSize} into @code{font-size} grob property.",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "fontSize ",
+                /* read */
+                "fontSize ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 7539bf95039e3ff33be4d8cd93086ab2bad28a50..6b62af0d47f72131fd06878a6004b1f59a8bdb41 100644 (file)
@@ -70,7 +70,7 @@ Footnote_engraver::footnotify (Grob *g, Stream_event *event)
       b->set_parent (s, X_AXIS);
       Grob *bound = unsmob_grob (get_property ("currentMusicalColumn"));
       b->set_bound (LEFT, bound);
-      annotated_spanners_.push_back (Drul_array<Spanner *> (s,b));
+      annotated_spanners_.push_back (Drul_array<Spanner *> (s, b));
     }
   else
     {
@@ -90,13 +90,13 @@ Footnote_engraver::acknowledge_grob (Grob_info info)
     {
       Stream_event *e = unsmob_stream_event (scm_car (s));
       if (e->in_event_class ("footnote-event"))
-         footnotify (info.grob (), e);
+        footnotify (info.grob (), e);
     }
 
   for (vsize i = 0; i < events_.size (); i++)
     {
       if (info.grob ()->name () == ly_symbol2string (events_[i]->get_property ("symbol")))
-       footnotify (info.grob (), events_[i]);
+        footnotify (info.grob (), events_[i]);
     }
 }
 
@@ -121,16 +121,16 @@ ADD_ACKNOWLEDGER (Footnote_engraver, grob);
 ADD_END_ACKNOWLEDGER (Footnote_engraver, grob);
 
 ADD_TRANSLATOR (Footnote_engraver,
-              /* doc */
-              "Create footnote texts.",
+                /* doc */
+                "Create footnote texts.",
 
-              /* create */
-              "FootnoteItem "
-              "FootnoteSpanner ",
+                /* create */
+                "FootnoteItem "
+                "FootnoteSpanner ",
 
-              /*read*/
-              "currentMusicalColumn ",
+                /*read*/
+                "currentMusicalColumn ",
 
-              /*write*/
-              ""
-              );
+                /*write*/
+                ""
+               );
index 81c03e15bef45389532dd6621e97289aa1bee5bf..b1d89ddf24380ade44a7adba2a249e4542d7229d 100644 (file)
@@ -59,16 +59,16 @@ Forbid_line_break_engraver::start_translation_timestep ()
 }
 
 ADD_TRANSLATOR (Forbid_line_break_engraver,
-               /* doc */
-               "Forbid line breaks when note heads are still playing at some"
-               " point.",
+                /* doc */
+                "Forbid line breaks when note heads are still playing at some"
+                " point.",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "busyGrobs ",
+                /* read */
+                "busyGrobs ",
 
-               /* write */
-               "forbidBreak "
-               );
+                /* write */
+                "forbidBreak "
+               );
index 21cec3311164d650ec4334b4a6b1aa899bb20ee1..ea4b41652ed762a768140bf40b7784cd6395d96a 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2007--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
-  
+
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
 
 #include "freetype.hh"
 
-#undef __FTERRORS_H__                                           
-#define FT_ERRORDEF(e, v, s)  { e, s },                       
-#define FT_ERROR_START_LIST     {                               
-#define FT_ERROR_END_LIST       { 0, 0 } };                     
-                                                                         
+#undef __FTERRORS_H__
+#define FT_ERRORDEF(e, v, s)  { e, s },
+#define FT_ERROR_START_LIST     {
+#define FT_ERROR_END_LIST       { 0, 0 } };
+
 const struct Freetype_error_message
-{                                                               
-  FT_Error     err_code;                                        
-  const char*  err_msg;
-} ft_errors[] =                                                 
-                                                                         
+{
+  FT_Error err_code;
+  const char *err_msg;
+} ft_errors[] =
+
 #include <freetype/fterrors.h>
 
   ;
 
-
 #include <string>
 
 string
 freetype_error_string (FT_Error code)
 {
   for (Freetype_error_message const *p = ft_errors;
-       p->err_msg; p ++)
+       p->err_msg; p++)
     {
       if (p->err_code == code)
-       return p->err_msg;
+        return p->err_msg;
     }
 
-  return "<unknown error>"; 
+  return "<unknown error>";
 }
-  
+
index cb4345ccad9870b89c5528ce17a6870e56da4a6f..0d6cd18ae360c298c8e3e72815c4cfe74bb099de 100644 (file)
@@ -96,20 +96,20 @@ Fretboard_engraver::process_music ()
     return;
 
   SCM tab_strings = articulation_list (note_events_,
-                                      tabstring_events_,
-                                      "string-number-event");
+                                       tabstring_events_,
+                                       "string-number-event");
   SCM fingers = articulation_list (note_events_,
-                                  fingering_events_,
-                                  "fingering-event");
+                                   fingering_events_,
+                                   "fingering-event");
   fret_board_ = make_item ("FretBoard", note_events_[0]->self_scm ());
   SCM fret_notes = ly_cxx_vector_to_list (note_events_);
   SCM proc = get_property ("noteToFretFunction");
   if (ly_is_procedure (proc))
     scm_call_4 (proc,
-               context ()->self_scm (),
-               fret_notes,
-               scm_list_2 (tab_strings, fingers),
-               fret_board_->self_scm ());
+                context ()->self_scm (),
+                fret_notes,
+                scm_list_2 (tab_strings, fingers),
+                fret_board_->self_scm ());
   SCM changes = get_property ("chordChanges");
   if (to_boolean (changes) && scm_is_pair (last_fret_notes_)
       && ly_is_equal (last_fret_notes_, fret_notes))
@@ -128,25 +128,25 @@ Fretboard_engraver::stop_translation_timestep ()
 }
 
 ADD_TRANSLATOR (Fretboard_engraver,
-               /* doc */
-               "Generate fret diagram from one or more events of type"
-               " @code{NoteEvent}.",
-
-               /* create */
-               "FretBoard ",
-
-               /* read */
-               "chordChanges "
-               "defaultStrings "
-               "highStringOne "
-               "maximumFretStretch "
-               "minimumFret "
-               "noteToFretFunction "
-               "predefinedDiagramTable "
-               "stringTunings "
-               "tablatureFormat ",
-
-               /* write */
-               ""
-                );
+                /* doc */
+                "Generate fret diagram from one or more events of type"
+                " @code{NoteEvent}.",
+
+                /* create */
+                "FretBoard ",
+
+                /* read */
+                "chordChanges "
+                "defaultStrings "
+                "highStringOne "
+                "maximumFretStretch "
+                "minimumFret "
+                "noteToFretFunction "
+                "predefinedDiagramTable "
+                "stringTunings "
+                "tablatureFormat ",
+
+                /* write */
+                ""
+               );
 
index 8d7c14b99900f40e42d823cc0f91c8a31becf215..480ea6b0892bdebbc80526812ce87e41cdc44c63 100644 (file)
@@ -24,7 +24,6 @@ using namespace std;
 #include "lily-guile.hh"
 #include "warn.hh"
 
-
 static SCM doc_hash_table;
 
 void
@@ -33,16 +32,15 @@ ly_check_name (string cxx, string scm_name)
   string mangle = mangle_cxx_identifier (cxx);
   if (mangle != scm_name)
     {
-      programming_error ("wrong cxx name: " + mangle + ", " + cxx +  ", " + scm_name);
+      programming_error ("wrong cxx name: " + mangle + ", " + cxx + ", " + scm_name);
     }
 }
 
-
 void
 ly_add_function_documentation (SCM func,
-                                   string fname,
-                                   string varlist,
-                                   string doc)
+                               string fname,
+                               string varlist,
+                               string doc)
 {
   if (doc == "")
     return;
@@ -51,31 +49,30 @@ ly_add_function_documentation (SCM func,
     doc_hash_table = scm_permanent_object (scm_c_make_hash_table (59));
 
   string s = string (" - ") + "LilyPond procedure: " + fname + " " + varlist
-    + "\n" + doc;
+             + "\n" + doc;
 
   scm_set_procedure_property_x (func, ly_symbol2scm ("documentation"),
-                               ly_string2scm (s));
+                                ly_string2scm (s));
   SCM entry = scm_cons (ly_string2scm (varlist), ly_string2scm (doc));
   scm_hashq_set_x (doc_hash_table, ly_symbol2scm (fname.c_str ()), entry);
 }
 
 LY_DEFINE (ly_get_all_function_documentation, "ly:get-all-function-documentation",
-          0, 0, 0, (),
-          "Get a hash table with all LilyPond Scheme extension functions.")
+           0, 0, 0, (),
+           "Get a hash table with all LilyPond Scheme extension functions.")
 {
   return doc_hash_table;
 }
 
-
 #include <map>
 
 map<void *, string> type_names;
-  
+
 void
 ly_add_type_predicate (void *ptr,
-                      string name)
+                       string name)
 {
-  type_names[ptr] = name; 
+  type_names[ptr] = name;
 }
 
 string
@@ -104,32 +101,32 @@ predicate_to_typename (void *ptr)
 void
 init_func_doc ()
 {
-  ly_add_type_predicate ((void*) &is_direction, "direction");
-  ly_add_type_predicate ((void*) &is_music_function, "Music_function");
-  ly_add_type_predicate ((void*) &ly_is_port, "port");
-  ly_add_type_predicate ((void*) &ly_cheap_is_list, "list");
-  ly_add_type_predicate ((void*) &unsmob_global_context, "Global_context");
-  ly_add_type_predicate ((void*) &unsmob_input, "Input");
-  ly_add_type_predicate ((void*) &unsmob_moment, "Moment");
-  ly_add_type_predicate ((void*) &unsmob_paper_score, "Paper_score");
-  ly_add_type_predicate ((void*) &unsmob_performance, "Performance");
-
-  ly_add_type_predicate ((void*) &is_axis, "axis");
-  ly_add_type_predicate ((void*) &is_number_pair, "number pair");
-  ly_add_type_predicate ((void*) &ly_is_list, "list");
-  ly_add_type_predicate ((void*) &ly_is_procedure, "procedure");
-  ly_add_type_predicate ((void*) &ly_is_symbol, "symbol");
-  ly_add_type_predicate ((void*) &scm_is_bool, "boolean");
-  ly_add_type_predicate ((void*) &scm_is_integer, "integer");
-  ly_add_type_predicate ((void*) &scm_is_number, "number");
-  ly_add_type_predicate ((void*) &scm_is_pair, "pair");
-  ly_add_type_predicate ((void*) &scm_is_rational, "rational");
-  ly_add_type_predicate ((void*) &scm_is_string, "string");
-  ly_add_type_predicate ((void*) &scm_is_vector, "vector");
-  ly_add_type_predicate ((void*) &unsmob_item, "Item");
-  ly_add_type_predicate ((void*) &unsmob_music, "Music");
-  ly_add_type_predicate ((void*) &unsmob_spanner, "Spanner");
-  ly_add_type_predicate ((void*) &unsmob_stream_event, "Stream_event");
+  ly_add_type_predicate ((void *) &is_direction, "direction");
+  ly_add_type_predicate ((void *) &is_music_function, "Music_function");
+  ly_add_type_predicate ((void *) &ly_is_port, "port");
+  ly_add_type_predicate ((void *) &ly_cheap_is_list, "list");
+  ly_add_type_predicate ((void *) &unsmob_global_context, "Global_context");
+  ly_add_type_predicate ((void *) &unsmob_input, "Input");
+  ly_add_type_predicate ((void *) &unsmob_moment, "Moment");
+  ly_add_type_predicate ((void *) &unsmob_paper_score, "Paper_score");
+  ly_add_type_predicate ((void *) &unsmob_performance, "Performance");
+
+  ly_add_type_predicate ((void *) &is_axis, "axis");
+  ly_add_type_predicate ((void *) &is_number_pair, "number pair");
+  ly_add_type_predicate ((void *) &ly_is_list, "list");
+  ly_add_type_predicate ((void *) &ly_is_procedure, "procedure");
+  ly_add_type_predicate ((void *) &ly_is_symbol, "symbol");
+  ly_add_type_predicate ((void *) &scm_is_bool, "boolean");
+  ly_add_type_predicate ((void *) &scm_is_integer, "integer");
+  ly_add_type_predicate ((void *) &scm_is_number, "number");
+  ly_add_type_predicate ((void *) &scm_is_pair, "pair");
+  ly_add_type_predicate ((void *) &scm_is_rational, "rational");
+  ly_add_type_predicate ((void *) &scm_is_string, "string");
+  ly_add_type_predicate ((void *) &scm_is_vector, "vector");
+  ly_add_type_predicate ((void *) &unsmob_item, "Item");
+  ly_add_type_predicate ((void *) &unsmob_music, "Music");
+  ly_add_type_predicate ((void *) &unsmob_spanner, "Spanner");
+  ly_add_type_predicate ((void *) &unsmob_stream_event, "Stream_event");
 }
 
 ADD_SCM_INIT_FUNC (func_doc, init_func_doc);
index ae31e1eb9f8433d024faf3b9d8856db64730b83b..fa838e3189c0a2bc7badd68987f7ef94e8a982da 100644 (file)
@@ -41,9 +41,9 @@ using namespace std;
 #include "warn.hh"
 
 LY_DEFINE (ly_start_environment, "ly:start-environment",
-          0, 0, 0, (),
-          "Return the environment (a list of strings) that was in"
-          " effect at program start.")
+           0, 0, 0, (),
+           "Return the environment (a list of strings) that was in"
+           " effect at program start.")
 {
   SCM l = SCM_EOL;
   SCM *tail = &l;
@@ -51,18 +51,17 @@ LY_DEFINE (ly_start_environment, "ly:start-environment",
   for (vsize i = 0; i < start_environment_global.size (); i++)
     {
       *tail = scm_cons (ly_string2scm (start_environment_global[i]),
-                       SCM_EOL);
-      tail = SCM_CDRLOC(*tail);
+                        SCM_EOL);
+      tail = SCM_CDRLOC (*tail);
     }
 
   return l;
 }
 
-
 LY_DEFINE (ly_find_file, "ly:find-file",
-          1, 0, 0, (SCM name),
-          "Return the absolute file name of @var{name},"
-          " or @code{#f} if not found.")
+           1, 0, 0, (SCM name),
+           "Return the absolute file name of @var{name},"
+           " or @code{#f} if not found.")
 {
   LY_ASSERT_TYPE (scm_is_string, name, 1);
 
@@ -79,11 +78,11 @@ LY_DEFINE (ly_find_file, "ly:find-file",
   buffering.)
 */
 LY_DEFINE (ly_gulp_file, "ly:gulp-file",
-          1, 1, 0, (SCM name, SCM size),
-          "Read @var{size} characters from the file @var{name},"
+           1, 1, 0, (SCM name, SCM size),
+           "Read @var{size} characters from the file @var{name},"
            " and return its contents in a string."
            "  If @var{size} is undefined, the entire file is read."
-          "  The file is looked up using the search path.")
+           "  The file is looked up using the search path.")
 {
   LY_ASSERT_TYPE (scm_is_string, name, 1);
   int sz = INT_MAX;
@@ -98,9 +97,9 @@ LY_DEFINE (ly_gulp_file, "ly:gulp-file",
 }
 
 LY_DEFINE (ly_error, "ly:error",
-          1, 0, 1, (SCM str, SCM rest),
-          "A Scheme callable function to issue the error @var{str}."
-          "  The error is formatted with @code{format} and @var{rest}.")
+           1, 0, 1, (SCM str, SCM rest),
+           "A Scheme callable function to issue the error @var{str}."
+           "  The error is formatted with @code{format} and @var{rest}.")
 {
   LY_ASSERT_TYPE (scm_is_string, str, 1);
   str = scm_simple_format (SCM_BOOL_F, str, rest);
@@ -109,9 +108,9 @@ LY_DEFINE (ly_error, "ly:error",
 }
 
 LY_DEFINE (ly_message, "ly:message",
-          1, 0, 1, (SCM str, SCM rest),
-          "A Scheme callable function to issue the message @var{str}."
-          "  The message is formatted with @code{format} and @var{rest}.")
+           1, 0, 1, (SCM str, SCM rest),
+           "A Scheme callable function to issue the message @var{str}."
+           "  The message is formatted with @code{format} and @var{rest}.")
 {
   LY_ASSERT_TYPE (scm_is_string, str, 1);
   str = scm_simple_format (SCM_BOOL_F, str, rest);
@@ -120,9 +119,9 @@ LY_DEFINE (ly_message, "ly:message",
 }
 
 LY_DEFINE (ly_progress, "ly:progress",
-          1, 0, 1, (SCM str, SCM rest),
-          "A Scheme callable function to print progress @var{str}."
-          "  The message is formatted with @code{format} and @var{rest}.")
+           1, 0, 1, (SCM str, SCM rest),
+           "A Scheme callable function to print progress @var{str}."
+           "  The message is formatted with @code{format} and @var{rest}.")
 {
   LY_ASSERT_TYPE (scm_is_string, str, 1);
   str = scm_simple_format (SCM_BOOL_F, str, rest);
@@ -131,10 +130,10 @@ LY_DEFINE (ly_progress, "ly:progress",
 }
 
 LY_DEFINE (ly_programming_error, "ly:programming-error",
-          1, 0, 1, (SCM str, SCM rest),
-          "A Scheme callable function to issue the internal warning"
-          "  @var{str}.  The message is formatted with @code{format}"
-          " and @var{rest}.")
+           1, 0, 1, (SCM str, SCM rest),
+           "A Scheme callable function to issue the internal warning"
+           "  @var{str}.  The message is formatted with @code{format}"
+           " and @var{rest}.")
 {
   LY_ASSERT_TYPE (scm_is_string, str, 1);
   str = scm_simple_format (SCM_BOOL_F, str, rest);
@@ -148,9 +147,9 @@ LY_DEFINE (ly_programming_error, "ly:programming-error",
 }
 
 LY_DEFINE (ly_success, "ly:success",
-          1, 0, 1, (SCM str, SCM rest),
-          "A Scheme callable function to issue a success message @var{str}."
-          "  The message is formatted with @code{format} and @var{rest}.")
+           1, 0, 1, (SCM str, SCM rest),
+           "A Scheme callable function to issue a success message @var{str}."
+           "  The message is formatted with @code{format} and @var{rest}.")
 {
   LY_ASSERT_TYPE (scm_is_string, str, 1);
   str = scm_simple_format (SCM_BOOL_F, str, rest);
@@ -159,9 +158,9 @@ LY_DEFINE (ly_success, "ly:success",
 
 }
 LY_DEFINE (ly_warning, "ly:warning",
-          1, 0, 1, (SCM str, SCM rest),
-          "A Scheme callable function to issue the warning @var{str}."
-          "  The message is formatted with @code{format} and @var{rest}.")
+           1, 0, 1, (SCM str, SCM rest),
+           "A Scheme callable function to issue the warning @var{str}."
+           "  The message is formatted with @code{format} and @var{rest}.")
 {
   LY_ASSERT_TYPE (scm_is_string, str, 1);
   str = scm_simple_format (SCM_BOOL_F, str, rest);
@@ -175,11 +174,11 @@ LY_DEFINE (ly_warning, "ly:warning",
 }
 
 LY_DEFINE (ly_dir_p, "ly:dir?",
-          1, 0, 0, (SCM s),
-          "Is @var{s} a direction?  Valid directions are @code{-1},"
-          " @code{0}, or@tie{}@code{1}, where @code{-1} represents"
-          " left or down, @code{1}@tie{}represents right or up, and @code{0}"
-          " represents a neutral direction.")
+           1, 0, 0, (SCM s),
+           "Is @var{s} a direction?  Valid directions are @code{-1},"
+           " @code{0}, or@tie{}@code{1}, where @code{-1} represents"
+           " left or down, @code{1}@tie{}represents right or up, and @code{0}"
+           " represents a neutral direction.")
 {
   if (scm_is_number (s))
     {
@@ -190,14 +189,14 @@ LY_DEFINE (ly_dir_p, "ly:dir?",
 }
 
 LY_DEFINE (ly_assoc_get, "ly:assoc-get",
-          2, 2, 0,
-          (SCM key, SCM alist, SCM default_value, SCM strict_checking),
-          "Return value if @var{key} in @var{alist}, else @var{default-value}"
-          " (or @code{#f} if not specified).  If @var{strict-checking} is set"
+           2, 2, 0,
+           (SCM key, SCM alist, SCM default_value, SCM strict_checking),
+           "Return value if @var{key} in @var{alist}, else @var{default-value}"
+           " (or @code{#f} if not specified).  If @var{strict-checking} is set"
            " to @code{#t} and @var{key} is not in @var{alist}, a programming_error"
            " is output.")
 {
-  LY_ASSERT_TYPE(ly_cheap_is_list, alist, 2);
+  LY_ASSERT_TYPE (ly_cheap_is_list, alist, 2);
 
   SCM handle = scm_assoc (key, alist);
   if (scm_is_pair (handle))
@@ -209,23 +208,23 @@ LY_DEFINE (ly_assoc_get, "ly:assoc-get",
   if (strict_checking == SCM_BOOL_T)
     {
       string key_string = ly_scm2string
-                            (scm_object_to_string (key, SCM_UNDEFINED));
+                          (scm_object_to_string (key, SCM_UNDEFINED));
       string default_value_string = ly_scm2string
-                                      (scm_object_to_string (default_value,
-                                                            SCM_UNDEFINED));
-      programming_error ("Cannot find key `" +
-                         key_string +
-                        "' in alist, setting to `" +
-                        default_value_string + "'.");
+                                    (scm_object_to_string (default_value,
+                                                           SCM_UNDEFINED));
+      programming_error ("Cannot find key `"
+                         + key_string
+                         + "' in alist, setting to `"
+                         + default_value_string + "'.");
     }
 
   return default_value;
 }
 
 LY_DEFINE (ly_string_substitute, "ly:string-substitute",
-          3, 0, 0, (SCM a, SCM b, SCM s),
-          "Replace string@tie{}@var{a} by string@tie{}@var{b} in"
-          " string@tie{}@var{s}.")
+           3, 0, 0, (SCM a, SCM b, SCM s),
+           "Replace string@tie{}@var{a} by string@tie{}@var{b} in"
+           " string@tie{}@var{s}.")
 {
   LY_ASSERT_TYPE (scm_is_string, s, 1);
   LY_ASSERT_TYPE (scm_is_string, b, 2);
@@ -233,7 +232,7 @@ LY_DEFINE (ly_string_substitute, "ly:string-substitute",
 
   string ss = ly_scm2string (s);
   replace_all (&ss, ly_scm2string (a),
-              ly_scm2string (b));
+               ly_scm2string (b));
 
   return ly_string2scm (ss);
 }
@@ -258,11 +257,11 @@ is_not_escape_character (Byte c)
 }
 
 LY_DEFINE (ly_string_percent_encode, "ly:string-percent-encode",
-          1, 0, 0, (SCM str),
-          "Encode all characters in string @var{str} with hexadecimal"
-          " percent escape sequences, with the following exceptions:"
-          " characters @code{-}, @code{.}, @code{/}, and @code{_}; and"
-          " characters in ranges @code{0-9}, @code{A-Z}, and @code{a-z}.")
+           1, 0, 0, (SCM str),
+           "Encode all characters in string @var{str} with hexadecimal"
+           " percent escape sequences, with the following exceptions:"
+           " characters @code{-}, @code{.}, @code{/}, and @code{_}; and"
+           " characters in ranges @code{0-9}, @code{A-Z}, and @code{a-z}.")
 {
   LY_ASSERT_TYPE (scm_is_string, str, 1);
 
@@ -277,12 +276,12 @@ LY_DEFINE (ly_string_percent_encode, "ly:string-percent-encode",
       Byte cur = orig_str[i];
 
       if (is_not_escape_character (cur))
-       new_str += cur;
+        new_str += cur;
       else
-       {
-         new_str += '%';
-         new_str += String_convert::bin2hex (cur);
-       }
+        {
+          new_str += '%';
+          new_str += String_convert::bin2hex (cur);
+        }
 
       i++;
     }
@@ -291,23 +290,23 @@ LY_DEFINE (ly_string_percent_encode, "ly:string-percent-encode",
 }
 
 LY_DEFINE (ly_number_2_string, "ly:number->string",
-          1, 0, 0, (SCM s),
-          "Convert @var{s} to a string without generating many decimals.")
+           1, 0, 0, (SCM s),
+           "Convert @var{s} to a string without generating many decimals.")
 {
   LY_ASSERT_TYPE (scm_is_number, s, 1);
 
-  char str[400];                       // ugh.
+  char str[400];                        // ugh.
 
   if (scm_exact_p (s) == SCM_BOOL_F)
     {
       Real r (scm_to_double (s));
-       if (isinf (r) || isnan (r))
-         {
-           programming_error (_ ("infinity or NaN encountered while converting Real number"));
-           programming_error (_ ("setting to zero"));
+      if (isinf (r) || isnan (r))
+        {
+          programming_error (_ ("infinity or NaN encountered while converting Real number"));
+          programming_error (_ ("setting to zero"));
 
-           r = 0.0;
-         }
+          r = 0.0;
+        }
 
       snprintf (str, sizeof (str), "%.4f", r);
     }
@@ -318,8 +317,8 @@ LY_DEFINE (ly_number_2_string, "ly:number->string",
 }
 
 LY_DEFINE (ly_version, "ly:version", 0, 0, 0, (),
-          "Return the current lilypond version as a list, e.g.,"
-          " @code{(1 3 127 uu1)}.")
+           "Return the current lilypond version as a list, e.g.,"
+           " @code{(1 3 127 uu1)}.")
 {
   char const *vs = "\'(" MAJOR_VERSION " " MINOR_VERSION " " PATCH_LEVEL " " MY_PATCH_LEVEL ")";
 
@@ -327,14 +326,14 @@ LY_DEFINE (ly_version, "ly:version", 0, 0, 0, (),
 }
 
 LY_DEFINE (ly_unit, "ly:unit", 0, 0, 0, (),
-          "Return the unit used for lengths as a string.")
+           "Return the unit used for lengths as a string.")
 {
   return scm_from_locale_string (INTERNAL_UNIT);
 }
 
 LY_DEFINE (ly_dimension_p, "ly:dimension?", 1, 0, 0, (SCM d),
-          "Return @var{d} as a number.  Used to distinguish length"
-          " variables from normal numbers.")
+           "Return @var{d} as a number.  Used to distinguish length"
+           " variables from normal numbers.")
 {
   return scm_number_p (d);
 }
@@ -343,24 +342,24 @@ LY_DEFINE (ly_dimension_p, "ly:dimension?", 1, 0, 0, (SCM d),
   Debugging mem leaks:
 */
 LY_DEFINE (ly_protects, "ly:protects",
-          0, 0, 0, (),
-          "Return hash of protected objects.")
+           0, 0, 0, (),
+           "Return hash of protected objects.")
 {
   return scm_protects;
 }
 
 LY_DEFINE (ly_gettext, "ly:gettext",
-          1, 0, 0, (SCM original),
-          "A Scheme wrapper function for @code{gettext}.")
+           1, 0, 0, (SCM original),
+           "A Scheme wrapper function for @code{gettext}.")
 {
   LY_ASSERT_TYPE (scm_is_string, original, 1);
   return ly_string2scm (_ (ly_scm2string (original).c_str ()));
 }
 
 LY_DEFINE (ly_output_formats, "ly:output-formats",
-          0, 0, 0, (),
-          "Formats passed to @option{--format} as a list of strings,"
-          " used for the output.")
+           0, 0, 0, (),
+           "Formats passed to @option{--format} as a list of strings,"
+           " used for the output.")
 {
   vector<string> output_formats = string_split (output_format_global, ',');
 
@@ -373,8 +372,8 @@ LY_DEFINE (ly_output_formats, "ly:output-formats",
 }
 
 LY_DEFINE (ly_wide_char_2_utf_8, "ly:wide-char->utf-8",
-          1, 0, 0, (SCM wc),
-          "Encode the Unicode codepoint @var{wc}, an integer, as UTF-8.")
+           1, 0, 0, (SCM wc),
+           "Encode the Unicode codepoint @var{wc}, an integer, as UTF-8.")
 {
   char buf[5];
 
@@ -408,48 +407,47 @@ LY_DEFINE (ly_wide_char_2_utf_8, "ly:wide-char->utf-8",
 }
 
 LY_DEFINE (ly_effective_prefix, "ly:effective-prefix",
-          0, 0, 0, (),
-          "Return effective prefix.")
+           0, 0, 0, (),
+           "Return effective prefix.")
 {
   return ly_string2scm (lilypond_datadir);
 }
 
 LY_DEFINE (ly_chain_assoc_get, "ly:chain-assoc-get",
-          2, 2, 0, (SCM key, SCM achain, SCM default_value, SCM strict_checking),
-          "Return value for @var{key} from a list of alists @var{achain}."
-          "  If no entry is found, return @var{default-value} or @code{#f} if"
-          " @var{default-value} is not specified.  With @var{strict-checking}"
+           2, 2, 0, (SCM key, SCM achain, SCM default_value, SCM strict_checking),
+           "Return value for @var{key} from a list of alists @var{achain}."
+           "  If no entry is found, return @var{default-value} or @code{#f} if"
+           " @var{default-value} is not specified.  With @var{strict-checking}"
            " set to @code{#t}, a programming_error is output in such cases.")
 {
   if (scm_is_pair (achain))
     {
       SCM handle = scm_assoc (key, scm_car (achain));
       if (scm_is_pair (handle))
-       return scm_cdr (handle);
+        return scm_cdr (handle);
       else
-       return ly_chain_assoc_get (key, scm_cdr (achain), default_value);
+        return ly_chain_assoc_get (key, scm_cdr (achain), default_value);
     }
 
   if (strict_checking == SCM_BOOL_T)
     {
       string key_string = ly_scm2string
-                            (scm_object_to_string (key, SCM_UNDEFINED));
+                          (scm_object_to_string (key, SCM_UNDEFINED));
       string default_value_string = ly_scm2string
-                                      (scm_object_to_string (default_value,
-                                                            SCM_UNDEFINED));
-      programming_error ("Cannot find key `" +
-                         key_string +
-                        "' in achain, setting to `" +
-                        default_value_string + "'.");
+                                    (scm_object_to_string (default_value,
+                                                           SCM_UNDEFINED));
+      programming_error ("Cannot find key `"
+                         + key_string
+                         + "' in achain, setting to `"
+                         + default_value_string + "'.");
     }
 
   return default_value == SCM_UNDEFINED ? SCM_BOOL_F : default_value;
 }
 
-
 LY_DEFINE (ly_stderr_redirect, "ly:stderr-redirect",
-          1, 1, 0, (SCM file_name, SCM mode),
-          "Redirect stderr to @var{file-name}, opened with @var{mode}.")
+           1, 1, 0, (SCM file_name, SCM mode),
+           "Redirect stderr to @var{file-name}, opened with @var{mode}.")
 {
   LY_ASSERT_TYPE (scm_is_string, file_name, 1);
 
@@ -466,24 +464,24 @@ LY_DEFINE (ly_stderr_redirect, "ly:stderr-redirect",
 
 static SCM
 accumulate_symbol (void * /* closure */,
-                  SCM key,
-                  SCM /* val */,
-                  SCM result)
+                   SCM key,
+                   SCM /* val */,
+                   SCM result)
 {
   return scm_cons (key, result);
 }
 
 LY_DEFINE (ly_hash_table_keys, "ly:hash-table-keys",
-         1,0,0, (SCM tab),
-         "Return a list of keys in @var{tab}.")
+           1, 0, 0, (SCM tab),
+           "Return a list of keys in @var{tab}.")
 {
   return scm_internal_hash_fold ((scm_t_hash_fold_fn) &accumulate_symbol,
-                                NULL, SCM_EOL, tab);
+                                 NULL, SCM_EOL, tab);
 }
 
 LY_DEFINE (ly_camel_case_2_lisp_identifier, "ly:camel-case->lisp-identifier",
-          1, 0, 0, (SCM name_sym),
-          "Convert @code{FooBar_Bla} to @code{foo-bar-bla} style symbol.")
+           1, 0, 0, (SCM name_sym),
+           "Convert @code{FooBar_Bla} to @code{foo-bar-bla} style symbol.")
 {
   LY_ASSERT_TYPE (ly_is_symbol, name_sym, 1);
 
@@ -498,18 +496,17 @@ LY_DEFINE (ly_camel_case_2_lisp_identifier, "ly:camel-case->lisp-identifier",
 }
 
 LY_DEFINE (ly_expand_environment, "ly:expand-environment",
-          1, 0, 0, (SCM str),
-          "Expand @code{$VAR} and @code{$@{VAR@}} in @var{str}.")
+           1, 0, 0, (SCM str),
+           "Expand @code{$VAR} and @code{$@{VAR@}} in @var{str}.")
 {
   LY_ASSERT_TYPE (scm_is_string, str, 1);
 
   return ly_string2scm (expand_environment_variables (ly_scm2string (str)));
 }
 
-
 LY_DEFINE (ly_truncate_list_x, "ly:truncate-list!",
-          2, 0, 0, (SCM lst, SCM i),
-          "Take at most the first @var{i} of list @var{lst}.")
+           2, 0, 0, (SCM lst, SCM i),
+           "Take at most the first @var{i} of list @var{lst}.")
 {
   LY_ASSERT_TYPE (scm_is_integer, i, 1);
 
@@ -521,10 +518,10 @@ LY_DEFINE (ly_truncate_list_x, "ly:truncate-list!",
       SCM s = lst;
       k--;
       for (; scm_is_pair (s) && k--; s = scm_cdr (s))
-       ;
+        ;
 
       if (scm_is_pair (s))
-       scm_set_cdr_x (s, SCM_EOL);
+        scm_set_cdr_x (s, SCM_EOL);
     }
   return lst;
 }
@@ -539,14 +536,14 @@ format_single_argument (SCM arg, int precision, bool escape = false)
       Real val = scm_to_double (arg);
 
       if (isnan (val) || isinf (val))
-       {
-         warning (_ ("Found infinity or nan in output. Substituting 0.0"));
-         return ("0.0");
-         if (strict_infinity_checking)
-           abort ();
-       }
+        {
+          warning (_ ("Found infinity or nan in output. Substituting 0.0"));
+          return ("0.0");
+          if (strict_infinity_checking)
+            abort ();
+        }
       else
-       return (String_convert::form_string ("%.*lf", precision, val));
+        return (String_convert::form_string ("%.*lf", precision, val));
     }
   else if (scm_is_string (arg))
     {
@@ -568,17 +565,16 @@ format_single_argument (SCM arg, int precision, bool escape = false)
   else
     {
       ly_progress (scm_from_locale_string ("\nUnsupported SCM value for format: ~a"),
-                  scm_list_1 (arg));
+                   scm_list_1 (arg));
     }
 
-
   return "";
 }
 
 LY_DEFINE (ly_format, "ly:format",
-          1, 0, 1, (SCM str, SCM rest),
-          "LilyPond specific format, supporting @code{~a} and @code{~[0-9]f}."
-          "  Basic support for @code{~s} is also provided.")
+           1, 0, 1, (SCM str, SCM rest),
+           "LilyPond specific format, supporting @code{~a} and @code{~[0-9]f}."
+           "  Basic support for @code{~s} is also provided.")
 {
   LY_ASSERT_TYPE (scm_is_string, str, 1);
 
@@ -590,70 +586,70 @@ LY_DEFINE (ly_format, "ly:format",
     {
       vsize tilde = format.find ('~', i);
 
-      results.push_back (format.substr (i, (tilde-i)));
+      results.push_back (format.substr (i, (tilde - i)));
 
       if (tilde == NPOS)
-       break ;
+        break;
 
-      tilde ++;
+      tilde++;
 
-      char spec = format.at (tilde ++);
+      char spec = format.at (tilde++);
       if (spec == '~')
-       results.push_back ("~");
+        results.push_back ("~");
       else
-       {
-         if (!scm_is_pair (rest))
-           {
-             programming_error (string (__FUNCTION__)
-                                + ": not enough arguments for format.");
-             return ly_string2scm ("");
-           }
-
-         SCM arg = scm_car (rest);
-         rest = scm_cdr (rest);
-
-         int precision = 8;
-
-         if (spec == '$')
-           precision = 2;
-         else if (isdigit (spec))
-           {
-             precision = spec - '0';
-             spec = format.at (tilde ++);
-           }
-
-         if (spec == 'a' || spec == 'A' || spec == 'f' || spec == '$')
-           results.push_back (format_single_argument (arg, precision));
-         else if (spec == 's' || spec == 'S')
-           results.push_back (format_single_argument (arg, precision, true));
-         else if (spec == 'l')
-           {
-             SCM s = arg;
-             for (; scm_is_pair (s); s = scm_cdr (s))
-               {
-                 results.push_back (format_single_argument (scm_car (s), precision));
-                 if (scm_cdr (s) != SCM_EOL)
-                   results.push_back (" ");
-               }
-
-             if (s != SCM_EOL)
-               results.push_back (format_single_argument (s, precision));
-
-           }
-       }
+        {
+          if (!scm_is_pair (rest))
+            {
+              programming_error (string (__FUNCTION__)
+                                 + ": not enough arguments for format.");
+              return ly_string2scm ("");
+            }
+
+          SCM arg = scm_car (rest);
+          rest = scm_cdr (rest);
+
+          int precision = 8;
+
+          if (spec == '$')
+            precision = 2;
+          else if (isdigit (spec))
+            {
+              precision = spec - '0';
+              spec = format.at (tilde++);
+            }
+
+          if (spec == 'a' || spec == 'A' || spec == 'f' || spec == '$')
+            results.push_back (format_single_argument (arg, precision));
+          else if (spec == 's' || spec == 'S')
+            results.push_back (format_single_argument (arg, precision, true));
+          else if (spec == 'l')
+            {
+              SCM s = arg;
+              for (; scm_is_pair (s); s = scm_cdr (s))
+                {
+                  results.push_back (format_single_argument (scm_car (s), precision));
+                  if (scm_cdr (s) != SCM_EOL)
+                    results.push_back (" ");
+                }
+
+              if (s != SCM_EOL)
+                results.push_back (format_single_argument (s, precision));
+
+            }
+        }
 
       i = tilde;
     }
 
   if (scm_is_pair (rest))
     programming_error (string (__FUNCTION__)
-                      + ": too many arguments");
+                       + ": too many arguments");
 
   vsize len = 0;
   for (vsize i = 0; i < results.size (); i++)
     len += results[i].size ();
 
-  char *result = (char*) scm_malloc (len + 1);
+  char *result = (char *) scm_malloc (len + 1);
   char *ptr = result;
   for (vsize i = 0; i < results.size (); i++)
     {
@@ -676,14 +672,14 @@ ly_run_command (char *argv[], char **standard_output, char **standard_error)
   if (!standard_error)
     flags |= G_SPAWN_STDERR_TO_DEV_NULL;
   if (!g_spawn_sync (0, argv, 0, GSpawnFlags (flags),
-                    0, 0, 
-                    standard_output, standard_error,
-                    &exit_status, &error))
+                     0, 0,
+                     standard_output, standard_error,
+                     &exit_status, &error))
     {
       fprintf (stderr, "failed (%d): %s: %s\n", exit_status, argv[0], error->message);
       g_error_free (error);
       if (!exit_status)
-       exit_status = -1;
+        exit_status = -1;
     }
 
   return exit_status;
@@ -699,10 +695,10 @@ ly_scm2utf8 (SCM str)
 }
 
 LY_DEFINE (ly_spawn, "ly:spawn",
-          1, 0, 1, (SCM command, SCM rest),
-          "Simple interface to g_spawn_sync"
-          " @var{str}."
-          "  The error is formatted with @code{format} and @var{rest}.")
+           1, 0, 1, (SCM command, SCM rest),
+           "Simple interface to g_spawn_sync"
+           " @var{str}."
+           "  The error is formatted with @code{format} and @var{rest}.")
 
 {
   LY_ASSERT_TYPE (scm_is_string, command, 1);
@@ -719,15 +715,15 @@ LY_DEFINE (ly_spawn, "ly:spawn",
   char *standard_output = 0;
   char *standard_error = 0;
   int exit_status = be_verbose_global
-    ? ly_run_command (argv, &standard_output, &standard_error)
-    : ly_run_command (argv, 0, 0);
+                    ? ly_run_command (argv, &standard_output, &standard_error)
+                    : ly_run_command (argv, 0, 0);
 
   if (be_verbose_global)
     {
       fprintf (stderr, "\n%s", standard_output);
       fprintf (stderr, "%s", standard_error);
     }
-  
+
   for (int i = 0; i < n; i++)
     free (argv[i]);
   delete[] argv;
index 26b869dd51f73afc6bf5cf65bd6a060000bda046..38270f446f79f0571021b11ff99683185f1e6ba6 100644 (file)
@@ -82,7 +82,7 @@ Glissando_engraver::acknowledge_note_column (Grob_info info)
     {
       extract_grob_set (g, "note-heads", note_heads);
       int glissando_index = 0;
-      for (vsize i=0; i < note_column_1.size (); i++)
+      for (vsize i = 0; i < note_column_1.size (); i++)
         {
           if (note_column_2[i] >= note_heads.size ())
             {
@@ -101,7 +101,7 @@ Glissando_engraver::acknowledge_note_column (Grob_info info)
       note_column_1.clear ();
       note_column_2.clear ();
       stop_glissandi = false;
-    }      
+    }
 
   if (start_glissandi)
     {
@@ -126,7 +126,7 @@ Glissando_engraver::acknowledge_note_column (Grob_info info)
             note_column_1.push_back (vsize (n1));
             note_column_2.push_back (vsize (n2));
           }
-      for (vsize i=0; i < note_column_1.size (); i++)
+      for (vsize i = 0; i < note_column_1.size (); i++)
         {
           lines_.push_back (make_spanner ("Glissando", event_->self_scm ()));
           lines_.back ()->set_bound (LEFT, note_heads[note_column_1[i]]);
@@ -141,7 +141,7 @@ Glissando_engraver::stop_translation_timestep ()
   if (start_glissandi)
     {
       if (stop_glissandi)
-       programming_error ("overwriting glissando");
+        programming_error ("overwriting glissando");
       stop_glissandi = true;
       start_glissandi = false;
     }
@@ -156,29 +156,29 @@ Glissando_engraver::finalize ()
       string msg = _ ("unterminated glissando");
 
       if (event_)
-       event_->origin ()->warning (msg);
+        event_->origin ()->warning (msg);
       else
-       warning (msg);
+        warning (msg);
 
-      for (vsize i=0; i < lines_.size (); i++)
+      for (vsize i = 0; i < lines_.size (); i++)
         lines_[i]->suicide ();
     }
 
-  for (vsize i=0; i < kill_me_.size (); i++)
+  for (vsize i = 0; i < kill_me_.size (); i++)
     kill_me_[i]->suicide ();
 }
 
 ADD_ACKNOWLEDGER (Glissando_engraver, note_column);
 ADD_TRANSLATOR (Glissando_engraver,
-               /* doc */
-               "Engrave glissandi.",
+                /* doc */
+                "Engrave glissandi.",
 
-               /* create */
-               "Glissando ",
+                /* create */
+                "Glissando ",
 
-               /* read */
-               "glissandoMap ",
+                /* read */
+                "glissandoMap ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 46bdae7b9097f9ec42f1703f5dcb1c98b22aea8b..2b02da2b2a59603bc73c0438e929e3f8e00d76bd 100644 (file)
 #include "warn.hh"
 
 LY_DEFINE (ly_format_output, "ly:format-output",
-          1, 0, 0, (SCM context),
-          "Given a global context in its final state,"
-          " process it and return the @code{Music_output} object"
-          " in its final state.")
+           1, 0, 0, (SCM context),
+           "Given a global context in its final state,"
+           " process it and return the @code{Music_output} object"
+           " in its final state.")
 {
   Global_context *g = dynamic_cast<Global_context *> (unsmob_context (context));
 
@@ -48,9 +48,9 @@ LY_DEFINE (ly_format_output, "ly:format-output",
 }
 
 LY_DEFINE (ly_make_global_translator, "ly:make-global-translator",
-          1, 0, 0, (SCM global),
-          "Create a translator group and connect it to the global context"
-          " @var{global}.  The translator group is returned.")
+           1, 0, 0, (SCM global),
+           "Create a translator group and connect it to the global context"
+           " @var{global}.  The translator group is returned.")
 {
   Global_context *g = dynamic_cast<Global_context *> (unsmob_context (global));
   LY_ASSERT_TYPE (unsmob_global_context, global, 1);
@@ -63,9 +63,9 @@ LY_DEFINE (ly_make_global_translator, "ly:make-global-translator",
 }
 
 LY_DEFINE (ly_make_global_context, "ly:make-global-context",
-          1, 0, 0, (SCM output_def),
-          "Set up a global interpretation context, using the output"
-          " block @var{output-def}.  The context is returned.")
+           1, 0, 0, (SCM output_def),
+           "Set up a global interpretation context, using the output"
+           " block @var{output-def}.  The context is returned.")
 {
   LY_ASSERT_SMOB (Output_def, output_def, 1);
   Output_def *odef = unsmob_output_def (output_def);
@@ -82,9 +82,9 @@ LY_DEFINE (ly_make_global_context, "ly:make-global-context",
 }
 
 LY_DEFINE (ly_interpret_music_expression, "ly:interpret-music-expression",
-          2, 0, 0, (SCM mus, SCM ctx),
-          "Interpret the music expression @var{mus} in the global context"
-          " @var{ctx}.  The context is returned in its final state.")
+           2, 0, 0, (SCM mus, SCM ctx),
+           "Interpret the music expression @var{mus} in the global context"
+           " @var{ctx}.  The context is returned in its final state.")
 {
   LY_ASSERT_SMOB (Music, mus, 1);
   LY_ASSERT_TYPE (unsmob_global_context, ctx, 2);
@@ -130,14 +130,14 @@ LY_DEFINE (ly_interpret_music_expression, "ly:interpret-music-expression",
 }
 
 LY_DEFINE (ly_run_translator, "ly:run-translator",
-          2, 1, 0, (SCM mus, SCM output_def),
-          "Process @var{mus} according to @var{output-def}.  An"
-          " interpretation context is set up, and @var{mus} is"
-          " interpreted with it.  The context is returned in its"
-          " final state.\n"
-          "\n"
-          "Optionally, this routine takes an object-key to"
-          " to uniquely identify the score block containing it.")
+           2, 1, 0, (SCM mus, SCM output_def),
+           "Process @var{mus} according to @var{output-def}.  An"
+           " interpretation context is set up, and @var{mus} is"
+           " interpreted with it.  The context is returned in its"
+           " final state.\n"
+           "\n"
+           "Optionally, this routine takes an object-key to"
+           " to uniquely identify the score block containing it.")
 {
   LY_ASSERT_SMOB (Music, mus, 1);
   LY_ASSERT_SMOB (Output_def, output_def, 2);
index 8d4164c4b26c9d822b66ec14aa2f9e773328fe25..26de82b68a15028542e67afc91f77d8de132ea29 100644 (file)
@@ -41,9 +41,9 @@ Global_context::Global_context (Output_def *o)
 
   /* We only need the most basic stuff to bootstrap the context tree */
   event_source ()->add_listener (GET_LISTENER (create_context_from_event),
-                                ly_symbol2scm ("CreateContext"));
+                                 ly_symbol2scm ("CreateContext"));
   event_source ()->add_listener (GET_LISTENER (prepare),
-                                ly_symbol2scm ("Prepare"));
+                                 ly_symbol2scm ("Prepare"));
   events_below ()->register_as_listener (event_source_);
 
   Context_def *globaldef = unsmob_context_def (definition_);
@@ -112,14 +112,14 @@ Context *
 Global_context::get_score_context () const
 {
   return (scm_is_pair (context_list_))
-    ? unsmob_context (scm_car (context_list_))
-    : 0;
+         ? unsmob_context (scm_car (context_list_))
+         : 0;
 }
 
 SCM
 Global_context::get_output ()
 {
-  Context * c = get_score_context ();
+  Context *c = get_score_context ();
   if (c)
     return c->get_property ("output");
   else
@@ -139,33 +139,32 @@ Global_context::run_iterator_on_me (Music_iterator *iter)
       Moment w;
       w.set_infinite (1);
       if (iter->ok ())
-       w = iter->pending_moment ();
+        w = iter->pending_moment ();
 
       w = sneaky_insert_extra_moment (w);
       if (w.main_part_.is_infinity () || w > final_mom)
-       break;
+        break;
 
       if (w == prev_mom_)
-       {
-         programming_error ("Moment is not increasing. Aborting interpretation.");
-         break ;
-       }
+        {
+          programming_error ("Moment is not increasing. Aborting interpretation.");
+          break;
+        }
 
-      
       if (first)
-       {
-         /*
-           Need this to get grace notes at start of a piece correct.
-         */
-         first = false;
-         set_property ("measurePosition", w.smobbed_copy ());
-       }
+        {
+          /*
+            Need this to get grace notes at start of a piece correct.
+          */
+          first = false;
+          set_property ("measurePosition", w.smobbed_copy ());
+        }
 
       send_stream_event (this, "Prepare", 0,
-                        ly_symbol2scm ("moment"), w.smobbed_copy ());
+                         ly_symbol2scm ("moment"), w.smobbed_copy ());
 
       if (iter->ok ())
-       iter->process (w);
+        iter->process (w);
 
       send_stream_event (this, "OneTimeStep", 0, 0);
       apply_finalizations ();
index 5055b86807dbb445ea91417cbbc8b6ec14c783d0..b9115dc96eaafcd0bbdf373c97da01670a06be18 100644 (file)
@@ -54,15 +54,15 @@ Grace_engraver::consider_change_grace_settings ()
   if (last_moment_.grace_part_ && !now.grace_part_)
     {
       for (SCM s = grace_settings_; scm_is_pair (s); s = scm_cdr (s))
-       {
-         SCM context = scm_caar (s);
-         SCM entry = scm_cdar (s);
-         SCM grob = scm_cadr (entry);
-         SCM sym = scm_caddr (entry);
+        {
+          SCM context = scm_caar (s);
+          SCM entry = scm_cdar (s);
+          SCM grob = scm_cadr (entry);
+          SCM sym = scm_caddr (entry);
 
-         execute_pushpop_property (unsmob_context (context),
-                                   grob, sym, SCM_UNDEFINED);
-       }
+          execute_pushpop_property (unsmob_context (context),
+                                    grob, sym, SCM_UNDEFINED);
+        }
 
       grace_settings_ = SCM_EOL;
     }
@@ -72,28 +72,28 @@ Grace_engraver::consider_change_grace_settings ()
 
       grace_settings_ = SCM_EOL;
       for (SCM s = settings; scm_is_pair (s); s = scm_cdr (s))
-       {
-         SCM entry = scm_car (s);
-         SCM context_name = scm_car (entry);
-         SCM grob = scm_cadr (entry);
-         SCM sym = scm_caddr (entry);
-         SCM val = scm_cadr (scm_cddr (entry));
-
-         Context *c = context ();
-         while (c && !c->is_alias (context_name))
-           c = c->get_parent_context ();
-
-         if (c)
-           {
-             execute_pushpop_property (c,
-                                       grob, sym, val);
-             grace_settings_
-               = scm_cons (scm_cons (c->self_scm (), entry), grace_settings_);
-           }
-         else
-             programming_error ("cannot find context from graceSettings: "
-                                + ly_symbol2string (context_name));
-       }
+        {
+          SCM entry = scm_car (s);
+          SCM context_name = scm_car (entry);
+          SCM grob = scm_cadr (entry);
+          SCM sym = scm_caddr (entry);
+          SCM val = scm_cadr (scm_cddr (entry));
+
+          Context *c = context ();
+          while (c && !c->is_alias (context_name))
+            c = c->get_parent_context ();
+
+          if (c)
+            {
+              execute_pushpop_property (c,
+                                        grob, sym, val);
+              grace_settings_
+                = scm_cons (scm_cons (c->self_scm (), entry), grace_settings_);
+            }
+          else
+            programming_error ("cannot find context from graceSettings: "
+                               + ly_symbol2string (context_name));
+        }
     }
 
   last_moment_ = now_mom ();
@@ -115,15 +115,15 @@ Grace_engraver::start_translation_timestep ()
 #include "translator.icc"
 
 ADD_TRANSLATOR (Grace_engraver,
-               /* doc */
-               "Set font size and other properties for grace notes.",
+                /* doc */
+                "Set font size and other properties for grace notes.",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "graceSettings ",
+                /* read */
+                "graceSettings ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 45c2bb7e7c79811615bbd7e2acf225e84f8c8beb..2abb182c7ef702ba26903fde930dd221cc31e8a2 100644 (file)
@@ -33,12 +33,11 @@ protected:
 
   Moment last_moment_;
   Spanner *grace_spacing_;
-  
+
   void process_music ();
   void stop_translation_timestep ();
 };
 
-
 Grace_spacing_engraver::Grace_spacing_engraver ()
 {
   grace_spacing_ = 0;
@@ -53,20 +52,19 @@ Grace_spacing_engraver::process_music ()
       grace_spacing_ = make_spanner ("GraceSpacing", SCM_EOL);
     }
 
-
   if (grace_spacing_ && (now.grace_part_ || last_moment_.grace_part_))
     {
       Grob *column = unsmob_grob (get_property ("currentMusicalColumn"));
       Pointer_group_interface::add_grob (grace_spacing_,
-                                        ly_symbol2scm ("columns"),
-                                        column);
+                                         ly_symbol2scm ("columns"),
+                                         column);
 
       column->set_object ("grace-spacing", grace_spacing_->self_scm ());
 
       if (!grace_spacing_->get_bound (LEFT))
-       grace_spacing_->set_bound (LEFT, column);
+        grace_spacing_->set_bound (LEFT, column);
       else
-       grace_spacing_->set_bound (RIGHT, column);
+        grace_spacing_->set_bound (RIGHT, column);
     }
 }
 
@@ -79,17 +77,16 @@ Grace_spacing_engraver::stop_translation_timestep ()
     grace_spacing_ = 0;
 }
 
-
 ADD_TRANSLATOR (Grace_spacing_engraver,
-               "Bookkeeping of shortest starting and playing notes in grace"
-               " note runs.",
-
-               /* create */
-               "GraceSpacing ",
-
-               /* read */
-               "currentMusicalColumn ",
-               
-               /* write */
-               ""
-               );
+                "Bookkeeping of shortest starting and playing notes in grace"
+                " note runs.",
+
+                /* create */
+                "GraceSpacing ",
+
+                /* read */
+                "currentMusicalColumn ",
+
+                /* write */
+                ""
+               );
index fccf35355f0bf61208c48be3327aae645cd2bffc..30ac2728dc088da09f45db7dafcbb67fff96f2c6 100644 (file)
@@ -54,8 +54,8 @@ Gregorian_ligature_engraver::listen_pes_or_flexa (Stream_event *ev)
 }
 
 void fix_prefix (char const *name, int mask,
-                int *current_set, int min_set, int max_set,
-                Grob *primitive)
+                 int *current_set, int min_set, int max_set,
+                 Grob *primitive)
 {
   bool current = *current_set & mask;
   bool min = min_set & mask;
@@ -102,99 +102,99 @@ void check_and_fix_all_prefixes (vector<Grob_info> primitives)
 
       /* compute head prefix set by inspecting primitive grob properties */
       int prefix_set
-       = (VIRGA *to_boolean (primitive->get_property ("virga")))
-       | (STROPHA *to_boolean (primitive->get_property ("stropha")))
-       | (INCLINATUM *to_boolean (primitive->get_property ("inclinatum")))
-       | (AUCTUM *to_boolean (primitive->get_property ("auctum")))
-       | (DESCENDENS *to_boolean (primitive->get_property ("descendens")))
-       | (ASCENDENS *to_boolean (primitive->get_property ("ascendens")))
-       | (ORISCUS *to_boolean (primitive->get_property ("oriscus")))
-       | (QUILISMA *to_boolean (primitive->get_property ("quilisma")))
-       | (DEMINUTUM *to_boolean (primitive->get_property ("deminutum")))
-       | (CAVUM *to_boolean (primitive->get_property ("cavum")))
-       | (LINEA *to_boolean (primitive->get_property ("linea")))
-       | (PES_OR_FLEXA *to_boolean (primitive->get_property ("pes-or-flexa")));
+        = (VIRGA * to_boolean (primitive->get_property ("virga")))
+          | (STROPHA * to_boolean (primitive->get_property ("stropha")))
+          | (INCLINATUM * to_boolean (primitive->get_property ("inclinatum")))
+          | (AUCTUM * to_boolean (primitive->get_property ("auctum")))
+          | (DESCENDENS * to_boolean (primitive->get_property ("descendens")))
+          | (ASCENDENS * to_boolean (primitive->get_property ("ascendens")))
+          | (ORISCUS * to_boolean (primitive->get_property ("oriscus")))
+          | (QUILISMA * to_boolean (primitive->get_property ("quilisma")))
+          | (DEMINUTUM * to_boolean (primitive->get_property ("deminutum")))
+          | (CAVUM * to_boolean (primitive->get_property ("cavum")))
+          | (LINEA * to_boolean (primitive->get_property ("linea")))
+          | (PES_OR_FLEXA * to_boolean (primitive->get_property ("pes-or-flexa")));
 
       /* check: ascendens and descendens exclude each other; same with
-        auctum and deminutum */
+         auctum and deminutum */
       if (prefix_set & DESCENDENS)
-       {
-         fix_prefix_set (&prefix_set,
-                         prefix_set & ~ASCENDENS,
-                         prefix_set & ~ASCENDENS,
-                         primitive);
-       }
+        {
+          fix_prefix_set (&prefix_set,
+                          prefix_set & ~ASCENDENS,
+                          prefix_set & ~ASCENDENS,
+                          primitive);
+        }
       if (prefix_set & AUCTUM)
-       {
-         fix_prefix_set (&prefix_set,
-                         prefix_set & ~DEMINUTUM,
-                         prefix_set & ~DEMINUTUM,
-                         primitive);
-       }
+        {
+          fix_prefix_set (&prefix_set,
+                          prefix_set & ~DEMINUTUM,
+                          prefix_set & ~DEMINUTUM,
+                          primitive);
+        }
 
       /* check: virga, quilisma and oriscus cannot be combined with any
-        other prefix, but may be part of a pes or flexa */
+         other prefix, but may be part of a pes or flexa */
       if (prefix_set & VIRGA)
-       {
-         fix_prefix_set (&prefix_set,
-                         VIRGA,
-                         VIRGA | PES_OR_FLEXA,
-                         primitive);
-       }
+        {
+          fix_prefix_set (&prefix_set,
+                          VIRGA,
+                          VIRGA | PES_OR_FLEXA,
+                          primitive);
+        }
       if (prefix_set & QUILISMA)
-       {
-         fix_prefix_set (&prefix_set,
-                         QUILISMA,
-                         QUILISMA | PES_OR_FLEXA,
-                         primitive);
-       }
+        {
+          fix_prefix_set (&prefix_set,
+                          QUILISMA,
+                          QUILISMA | PES_OR_FLEXA,
+                          primitive);
+        }
       if (prefix_set & ORISCUS)
-       {
-         fix_prefix_set (&prefix_set,
-                         ORISCUS,
-                         ORISCUS | PES_OR_FLEXA,
-                         primitive);
-       }
+        {
+          fix_prefix_set (&prefix_set,
+                          ORISCUS,
+                          ORISCUS | PES_OR_FLEXA,
+                          primitive);
+        }
 
       /* check: auctum is the only valid optional prefix for stropha */
       if (prefix_set & STROPHA)
-       {
-         fix_prefix_set (&prefix_set,
-                         STROPHA,
-                         STROPHA | AUCTUM,
-                         primitive);
-       }
+        {
+          fix_prefix_set (&prefix_set,
+                          STROPHA,
+                          STROPHA | AUCTUM,
+                          primitive);
+        }
 
       /* check: inclinatum may be prefixed with auctum or deminutum only */
       if (prefix_set & INCLINATUM)
-       {
-         fix_prefix_set (&prefix_set,
-                         INCLINATUM,
-                         INCLINATUM | AUCTUM | DEMINUTUM,
-                         primitive);
-       }
+        {
+          fix_prefix_set (&prefix_set,
+                          INCLINATUM,
+                          INCLINATUM | AUCTUM | DEMINUTUM,
+                          primitive);
+        }
       /* check: semivocalis (deminutum but not inclinatum) must occur in
-        combination with and only with pes or flexa */
+         combination with and only with pes or flexa */
       else if (prefix_set & DEMINUTUM)
-       {
-         fix_prefix_set (&prefix_set,
-                         DEMINUTUM | PES_OR_FLEXA,
-                         DEMINUTUM | PES_OR_FLEXA,
-                         primitive);
-       }
+        {
+          fix_prefix_set (&prefix_set,
+                          DEMINUTUM | PES_OR_FLEXA,
+                          DEMINUTUM | PES_OR_FLEXA,
+                          primitive);
+        }
 
       /* check: cavum and linea (either or both) may be applied only
-        upon core punctum */
+         upon core punctum */
       if (prefix_set & (CAVUM | LINEA))
-       {
-         fix_prefix_set (&prefix_set,
-                         0,
-                         CAVUM | LINEA,
-                         primitive);
-       }
+        {
+          fix_prefix_set (&prefix_set,
+                          0,
+                          CAVUM | LINEA,
+                          primitive);
+        }
 
       /* all other combinations should be valid (unless I made a
-        mistake) */
+         mistake) */
 
       primitive->set_property ("prefix-set", scm_from_int (prefix_set));
     }
@@ -219,28 +219,28 @@ provide_context_info (vector<Grob_info> primitives)
       int prefix_set = scm_to_int (primitive->get_property ("prefix-set"));
 
       if (prefix_set & PES_OR_FLEXA)
-       {
-         if (!i) // ligature may not start with 2nd head of pes or flexa
-           primitive->warning (_ ("cannot apply `\\~' on first head of ligature"));
-         else if (pitch > prev_pitch) // pes
-           {
-             prev_context_info |= PES_LOWER;
-             context_info |= PES_UPPER;
-           }
-         else if (pitch < prev_pitch) // flexa
-           {
-             prev_context_info |= FLEXA_LEFT;
-             context_info |= FLEXA_RIGHT;
-           }
-         else // (pitch == prev_pitch)
-           primitive->warning (_ ("cannot apply `\\~' on heads with identical pitch"));
-       }
+        {
+          if (!i) // ligature may not start with 2nd head of pes or flexa
+            primitive->warning (_ ("cannot apply `\\~' on first head of ligature"));
+          else if (pitch > prev_pitch) // pes
+            {
+              prev_context_info |= PES_LOWER;
+              context_info |= PES_UPPER;
+            }
+          else if (pitch < prev_pitch) // flexa
+            {
+              prev_context_info |= FLEXA_LEFT;
+              context_info |= FLEXA_RIGHT;
+            }
+          else // (pitch == prev_pitch)
+            primitive->warning (_ ("cannot apply `\\~' on heads with identical pitch"));
+        }
       if (prev_prefix_set & DEMINUTUM)
-       context_info |= AFTER_DEMINUTUM;
+        context_info |= AFTER_DEMINUTUM;
 
       if (prev_primitive)
-       prev_primitive->set_property ("context-info",
-                                     scm_from_int (prev_context_info));
+        prev_primitive->set_property ("context-info",
+                                      scm_from_int (prev_context_info));
       prev_primitive = primitive;
       prev_prefix_set = prefix_set;
       prev_context_info = context_info;
@@ -248,12 +248,12 @@ provide_context_info (vector<Grob_info> primitives)
     }
   if (prev_primitive)
     prev_primitive->set_property ("context-info",
-                                 scm_from_int (prev_context_info));
+                                  scm_from_int (prev_context_info));
 }
 
 void
 Gregorian_ligature_engraver::build_ligature (Spanner *ligature,
-                                            vector<Grob_info> primitives)
+                                             vector<Grob_info> primitives)
 {
   // apply style-independent checking and transformation
   check_and_fix_all_prefixes (primitives);
index f0606102cb6bea32d3bab9e1844613acfb543aeb..03f890e3c69706406a5263d8eb282dcc31aee000 100644 (file)
@@ -26,7 +26,7 @@ void check_prefix (string name, int mask, int prefix_set, string *str)
   if (prefix_set & mask)
     {
       if (!str->empty ())
-       *str += ", ";
+        *str += ", ";
       *str += name;
     }
 }
@@ -60,21 +60,21 @@ Gregorian_ligature::prefixes_to_str (Grob *primitive)
   read by the associated item class, such as VaticanaLigature.--jr
 */
 ADD_INTERFACE (Gregorian_ligature,
-              "A gregorian ligature.",
+               "A gregorian ligature.",
 
-              /* properties */
-              "virga "
-              "stropha "
-              "inclinatum "
-              "auctum "
-              "descendens "
-              "ascendens "
-              "oriscus "
-              "quilisma "
-              "deminutum "
-              "cavum "
-              "linea "
-              "pes-or-flexa "
-              "context-info "
-              "prefix-set "
-              );
+               /* properties */
+               "virga "
+               "stropha "
+               "inclinatum "
+               "auctum "
+               "descendens "
+               "ascendens "
+               "oriscus "
+               "quilisma "
+               "deminutum "
+               "cavum "
+               "linea "
+               "pes-or-flexa "
+               "context-info "
+               "prefix-set "
+              );
index e942cb0a0eeed456f8761e580b145e1999b488ac..2b4b57e2f914994bfe3b21272115af4e3031da3c 100644 (file)
@@ -50,11 +50,11 @@ Grid_line_interface::print (SCM smobbed_me)
 
   Real staffline = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
   Real thick = robust_scm2double (me->get_property ("thickness"), 1.0)
-    * staffline;
+               * staffline;
 
   iv += -me->relative_coordinate (refp, Y_AXIS);
   Stencil st = Lookup::filled_box (Box (Interval (0, thick),
-                                       iv));
+                                        iv));
 
   return st.smobbed_copy ();
 }
@@ -67,7 +67,7 @@ Grid_line_interface::width (SCM smob)
 
   Real staffline = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
   Real thick = robust_scm2double (me->get_property ("thickness"), 1.0)
-    * staffline;
+               * staffline;
 
   return ly_interval2scm (Interval (0, thick));
 }
@@ -79,16 +79,16 @@ Grid_line_interface::add_grid_point (Grob *me, Grob *b)
 }
 
 ADD_INTERFACE (Grid_line_interface,
-              "A line that is spanned between grid-points.",
+               "A line that is spanned between grid-points.",
 
-              /* properties */
-              "elements "
-              "thickness "
-              );
+               /* properties */
+               "elements "
+               "thickness "
+              );
 
 ADD_INTERFACE (Grid_point_interface,
-              "A spanning point for grid lines.",
+               "A spanning point for grid lines.",
 
-              /* properties */
-              ""
-              );
+               /* properties */
+               ""
+              );
index ad80c9ea7ee51134e3f54c72a559b212caec4dc3..aa4d4eb3b45ba32b451a4b079d52c2a243867d0c 100644 (file)
@@ -24,7 +24,7 @@
 class Grid_line_span_engraver : public Engraver
 {
   Item *spanline_;
-  vector<Item*> lines_;
+  vector<Item *> lines_;
 
 public:
   TRANSLATOR_DECLARATIONS (Grid_line_span_engraver);
@@ -48,10 +48,10 @@ Grid_line_span_engraver::acknowledge_grid_point (Grob_info i)
       lines_.push_back (it);
 
       if (lines_.size () >= 2 && !spanline_)
-       {
-         spanline_ = make_item ("GridLine", SCM_EOL);
-         spanline_->set_parent (lines_[0], X_AXIS);
-       }
+        {
+          spanline_ = make_item ("GridLine", SCM_EOL);
+          spanline_->set_parent (lines_[0], X_AXIS);
+        }
     }
 }
 
@@ -61,7 +61,7 @@ Grid_line_span_engraver::stop_translation_timestep ()
   if (spanline_)
     {
       for (vsize i = 0; i < lines_.size (); i++)
-       Grid_line_interface::add_grid_point (spanline_, lines_[i]);
+        Grid_line_interface::add_grid_point (spanline_, lines_[i]);
 
       spanline_ = 0;
     }
@@ -71,16 +71,16 @@ Grid_line_span_engraver::stop_translation_timestep ()
 #include "translator.icc"
 ADD_ACKNOWLEDGER (Grid_line_span_engraver, grid_point);
 ADD_TRANSLATOR (Grid_line_span_engraver,
-               /* doc */
-               "This engraver makes cross-staff lines: It catches all normal"
-               " lines and draws a single span line across them.",
+                /* doc */
+                "This engraver makes cross-staff lines: It catches all normal"
+                " lines and draws a single span line across them.",
 
-               /* create */
-               "GridLine ",
+                /* create */
+                "GridLine ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index eb6376e98e1ee9ee2909c4e8af8b62e5a74414df..c54f607cf3ee8014e56e60c85ff7d81e38e4f07d 100644 (file)
@@ -40,7 +40,7 @@ Grid_point_engraver::process_music ()
       Moment now = now_mom ();
 
       if (!now.main_part_.mod_rat (mom->main_part_))
-       make_item ("GridPoint", SCM_EOL);
+        make_item ("GridPoint", SCM_EOL);
     }
 }
 
@@ -49,16 +49,16 @@ Grid_point_engraver::Grid_point_engraver ()
 }
 
 ADD_TRANSLATOR (Grid_point_engraver,
-               /* doc */
-               "Generate grid points.",
+                /* doc */
+                "Generate grid points.",
 
-               /* create */
-               "GridPoint ",
+                /* create */
+                "GridPoint ",
 
-               /* read */
-               "gridInterval ",
+                /* read */
+                "gridInterval ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
 
index 5326626e0ecef2062dde6938070dde2f2bcbbc40..f48e3bb8b822323c4c61028291087154db8676d4 100644 (file)
 #include "grob.hh"
 
 LY_DEFINE (ly_grob_array_length, "ly:grob-array-length",
-          1, 0, 0,
-          (SCM grob_arr),
-          "Return the length of @var{grob-arr}.")
+           1, 0, 0,
+           (SCM grob_arr),
+           "Return the length of @var{grob-arr}.")
 {
   LY_ASSERT_SMOB (Grob_array, grob_arr, 1);
 
   Grob_array *me = unsmob_grob_array (grob_arr);
-  return  scm_from_int (me->size ());
+  return scm_from_int (me->size ());
 }
 
-
 LY_DEFINE (ly_grob_array_ref, "ly:grob-array-ref",
-          2, 0, 0,
-          (SCM grob_arr, SCM index),
-          "Retrieve the @var{index}th element of @var{grob-arr}.")
+           2, 0, 0,
+           (SCM grob_arr, SCM index),
+           "Retrieve the @var{index}th element of @var{grob-arr}.")
 {
   Grob_array *me = unsmob_grob_array (grob_arr);
   LY_ASSERT_SMOB (Grob_array, grob_arr, 1);
@@ -44,15 +43,15 @@ LY_DEFINE (ly_grob_array_ref, "ly:grob-array-ref",
 
   vsize i = scm_to_uint (index);
   if (i == VPOS || i >= me->size ())
-    scm_out_of_range (NULL, scm_from_unsigned_integer (i)); 
-  
+    scm_out_of_range (NULL, scm_from_unsigned_integer (i));
+
   return me->grob (i)->self_scm ();
 }
 
 LY_DEFINE (ly_grob_array_2_list, "ly:grob-array->list",
-          1, 0, 0,
-          (SCM grob_arr),
-          "Return the elements of @var{grob-arr} as a Scheme list.")
+           1, 0, 0,
+           (SCM grob_arr),
+           "Return the elements of @var{grob-arr} as a Scheme list.")
 {
   Grob_array *me = unsmob_grob_array (grob_arr);
   LY_ASSERT_SMOB (Grob_array, grob_arr, 1);
index 217ea78aa917cd2bd3baa98efa97892ff1537543..4df4c34b54bccad9842bed81ea9c977bf4dc7a25 100644 (file)
@@ -40,13 +40,13 @@ Grob_array::Grob_array ()
   ordered_ = true;
 }
 
-vector<Grob*> &
+vector<Grob *> &
 Grob_array::array_reference ()
 {
   return grobs_;
 }
 
-vector<Grob*> const &
+vector<Grob *> const &
 Grob_array::array () const
 {
   return grobs_;
@@ -66,7 +66,7 @@ Grob_array::mark_smob (SCM s)
 }
 
 int
-Grob_array::print_smob (SCM arr, SCM port, scm_print_state*)
+Grob_array::print_smob (SCM arr, SCM port, scm_print_state *)
 {
   scm_puts ("#<Grob_array", port);
 
@@ -97,8 +97,8 @@ void
 Grob_array::remove_duplicates ()
 {
   assert (!ordered_);
-  
-  vector_sort (grobs_, less<Grob*> ());
+
+  vector_sort (grobs_, less<Grob *> ());
   ::uniq (grobs_);
 }
 
@@ -109,7 +109,7 @@ Grob_array::empty () const
 }
 
 void
-Grob_array::set_array (vector<Grob*> const &src)
+Grob_array::set_array (vector<Grob *> const &src)
 {
   grobs_ = src;
 }
index 124d1437932c034f7fa5e2ba1dd5195585dac6ad..4f6c0adc81f5219836e20c2bb92754f347a20eab 100644 (file)
@@ -5,20 +5,18 @@ SCM
 axis_offset_symbol (Axis a)
 {
   return a == X_AXIS
-    ? ly_symbol2scm ("X-offset")
-    : ly_symbol2scm ("Y-offset");
+         ? ly_symbol2scm ("X-offset")
+         : ly_symbol2scm ("Y-offset");
 }
 
 SCM
 axis_parent_positioning (Axis a)
 {
   return (a == X_AXIS)
-    ? Grob::x_parent_positioning_proc
-    : Grob::y_parent_positioning_proc;
+         ? Grob::x_parent_positioning_proc
+         : Grob::y_parent_positioning_proc;
 }
 
-
-
 /*
   Replace
 
@@ -27,7 +25,6 @@ axis_parent_positioning (Axis a)
   by
 
   (+ (PROC GROB) (orig-proc GROB))
-  
 */
 void
 add_offset_callback (Grob *g, SCM proc, Axis a)
@@ -38,11 +35,11 @@ add_offset_callback (Grob *g, SCM proc, Axis a)
       && !is_simple_closure (data))
     {
       g->set_property (axis_offset_symbol (a), proc);
-      return ;
+      return;
     }
 
   if (ly_is_procedure (data))
-    data = ly_make_simple_closure (scm_list_1  (data));
+    data = ly_make_simple_closure (scm_list_1 (data));
   else if (is_simple_closure (data))
     data = simple_closure_expression (data);
 
@@ -50,12 +47,11 @@ add_offset_callback (Grob *g, SCM proc, Axis a)
 
   if (ly_is_procedure (proc))
     proc = ly_make_simple_closure (scm_list_1 (proc));
-  
+
   SCM expr = scm_list_3 (plus, proc, data);
   g->set_property (axis_offset_symbol (a), ly_make_simple_closure (expr));
 }
 
-
 /*
   replace
 
@@ -63,8 +59,7 @@ add_offset_callback (Grob *g, SCM proc, Axis a)
 
   by
 
-  (PROC GROB (orig-proc GROB)) 
-
+  (PROC GROB (orig-proc GROB))
 */
 void
 chain_callback (Grob *g, SCM proc, SCM sym)
@@ -72,7 +67,7 @@ chain_callback (Grob *g, SCM proc, SCM sym)
   SCM data = g->get_property_data (sym);
 
   if (ly_is_procedure (data))
-    data = ly_make_simple_closure (scm_list_1  (data));
+    data = ly_make_simple_closure (scm_list_1 (data));
   else if (is_simple_closure (data))
     data = simple_closure_expression (data);
   else
@@ -85,10 +80,10 @@ chain_callback (Grob *g, SCM proc, SCM sym)
 
   SCM expr = scm_list_2 (proc, data);
   g->set_property (sym,
-                  
-                  // twice: one as a wrapper for grob property routines,
-                  // once for the actual delayed binding. 
-                  ly_make_simple_closure (ly_make_simple_closure (expr)));
+
+                   // twice: one as a wrapper for grob property routines,
+                   // once for the actual delayed binding.
+                   ly_make_simple_closure (ly_make_simple_closure (expr)));
 }
 
 void
index b710477a8e4073ef21a2bc0812e198fa99ba8ab9..48af87615360c93d684f863be09d7cb4aece5dc8 100644 (file)
@@ -53,11 +53,11 @@ Grob_info::event_cause () const
   return unsmob_stream_event (cause);
 }
 
-vector<Context*>
+vector<Context *>
 Grob_info::origin_contexts (Translator *end) const
 {
   Context *t = origin_trans_->context ();
-  vector<Context*> r;
+  vector<Context *> r;
   do
     {
       r.push_back (t);
index 75755994d3282bf256ea4344f59835e76040920c..3caab844fd84966ac68bf73e859a818d53d4ac93 100644 (file)
@@ -31,18 +31,18 @@ internal_add_interface (SCM a, SCM b, SCM c)
       all_ifaces = tab;
       scm_permanent_object (tab);
     }
-  
+
   SCM entry = scm_list_n (a, b, c, SCM_UNDEFINED);
 
   scm_hashq_set_x (all_ifaces, a, entry);
 }
 
 LY_DEFINE (ly_add_interface, "ly:add-interface",
-          3, 0, 0, (SCM iface, SCM desc, SCM props),
-          "Add a new grob interface.  @var{iface} is the"
-          " interface name, @var{desc} is the interface"
-          " description, and @var{props} is the list of"
-          " user-settable properties for the interface.")
+           3, 0, 0, (SCM iface, SCM desc, SCM props),
+           "Add a new grob interface.  @var{iface} is the"
+           " interface name, @var{desc} is the interface"
+           " description, and @var{props} is the list of"
+           " user-settable properties for the interface.")
 {
   LY_ASSERT_TYPE (ly_is_symbol, iface, 1);
   LY_ASSERT_TYPE (scm_is_string, desc, 2);
@@ -54,8 +54,8 @@ LY_DEFINE (ly_add_interface, "ly:add-interface",
 }
 
 LY_DEFINE (ly_all_grob_interfaces, "ly:all-grob-interfaces",
-          0, 0, 0, (),
-          "Return the hash table with all grob interface descriptions.")
+           0, 0, 0, (),
+           "Return the hash table with all grob interface descriptions.")
 {
   return all_ifaces;
 }
index 2771a8001c0bcb82321660e32d763021db72ab45..c649ded5b486e75a084aa719c6b5fac14e6785d6 100644 (file)
@@ -27,8 +27,8 @@
 #include "misc.hh"
 
 SCM add_interface (char const *cxx_name,
-                   char const *descr,
-                   char const *vars)
+                   char const *descr,
+                   char const *vars)
 {
   string suffix ("-interface");
   string lispy_name = camel_case_to_lisp_identifier (cxx_name);
@@ -51,7 +51,7 @@ check_interfaces_for_property (Grob const *me, SCM sym)
   if (sym == ly_symbol2scm ("meta"))
     {
       /*
-       otherwise we get in a nasty recursion loop.
+        otherwise we get in a nasty recursion loop.
       */
       return;
     }
@@ -64,12 +64,12 @@ check_interfaces_for_property (Grob const *me, SCM sym)
     {
       SCM iface = scm_hashq_ref (all_ifaces, scm_car (ifs), SCM_BOOL_F);
       if (iface == SCM_BOOL_F)
-       {
-         string msg = to_string (_f ("Unknown interface `%s'",
-                                     ly_symbol2string (scm_car (ifs)).c_str ()));
-         programming_error (msg);
-         continue;
-       }
+        {
+          string msg = to_string (_f ("Unknown interface `%s'",
+                                      ly_symbol2string (scm_car (ifs)).c_str ()));
+          programming_error (msg);
+          continue;
+        }
 
       found = found || (scm_c_memq (sym, scm_caddr (iface)) != SCM_BOOL_F);
     }
@@ -77,8 +77,8 @@ check_interfaces_for_property (Grob const *me, SCM sym)
   if (!found)
     {
       string str = to_string (_f ("Grob `%s' has no interface for property `%s'",
-                                 me->name ().c_str (),
-                                 ly_symbol2string (sym).c_str ()));
+                                  me->name ().c_str (),
+                                  ly_symbol2string (sym).c_str ()));
       programming_error (str);
     }
 }
index 57ba04f9c946c8a9cd0760cb794889b8aba11273..36459af47bc25a28bab9c3a01b4752ab34e24cb9 100644 (file)
@@ -29,7 +29,7 @@ struct Grob_pq_entry
 };
 
 bool
-operator< (Grob_pq_entry const &a, Grob_pq_entry const &b)
+operator < (Grob_pq_entry const &a, Grob_pq_entry const &b)
 {
   return a.end_ < b.end_;
 }
@@ -44,7 +44,7 @@ protected:
   void start_translation_timestep ();
   void stop_translation_timestep ();
   void process_acknowledged ();
-  
+
   vector<Grob_pq_entry> started_now_;
 };
 
@@ -59,12 +59,12 @@ Grob_pq_engraver::initialize ()
 }
 
 LY_DEFINE (ly_grob_pq_less_p, "ly:grob-pq<?",
-          2, 0, 0, (SCM a, SCM b),
-          "Compare two grob priority queue entries."
-          "  This is an internal function.")
+           2, 0, 0, (SCM a, SCM b),
+           "Compare two grob priority queue entries."
+           "  This is an internal function.")
 {
   if (Moment::compare (*unsmob_moment (scm_car (a)),
-                      *unsmob_moment (scm_car (b))) < 0)
+                       *unsmob_moment (scm_car (b))) < 0)
     return SCM_BOOL_T;
   else
     return SCM_BOOL_F;
@@ -82,7 +82,7 @@ Grob_pq_engraver::acknowledge_grob (Grob_info gi)
       Moment l = get_event_length (ev, n);
 
       if (!l.to_bool ())
-       return;
+        return;
 
       Moment end = n + l;
 
@@ -103,8 +103,8 @@ Grob_pq_engraver::process_acknowledged ()
   for (vsize i = 0; i < started_now_.size (); i++)
     {
       *tail = scm_acons (started_now_[i].end_.smobbed_copy (),
-                        started_now_[i].grob_->self_scm (),
-                        SCM_EOL);
+                         started_now_[i].grob_->self_scm (),
+                         SCM_EOL);
       tail = SCM_CDRLOC (*tail);
     }
 
@@ -136,8 +136,8 @@ Grob_pq_engraver::start_translation_timestep ()
   while (scm_is_pair (busy) && *unsmob_moment (scm_caar (busy)) < now)
     {
       /*
-       The grob-pq-engraver is not water tight, and stuff like
-       tupletSpannerDuration confuses it.
+        The grob-pq-engraver is not water tight, and stuff like
+        tupletSpannerDuration confuses it.
       */
       busy = scm_cdr (busy);
     }
@@ -149,16 +149,16 @@ Grob_pq_engraver::start_translation_timestep ()
 #include "translator.icc"
 ADD_ACKNOWLEDGER (Grob_pq_engraver, grob);
 ADD_TRANSLATOR (Grob_pq_engraver,
-               /* doc */
-               "Administrate when certain grobs (e.g., note heads) stop"
-               " playing.",
+                /* doc */
+                "Administrate when certain grobs (e.g., note heads) stop"
+                " playing.",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "busyGrobs ",
+                /* read */
+                "busyGrobs ",
 
-               /* write */
-               "busyGrobs "
-               );
+                /* write */
+                "busyGrobs "
+               );
index f174f7ee01f6128bd79c6c6d405c80998e862659..2a4368f9ab7ffa5b25c9f5fe01278c0e1f83abfa 100644 (file)
@@ -38,62 +38,58 @@ print_property_callback_stack ()
 static SCM modification_callback = SCM_EOL;
 static SCM cache_callback = SCM_EOL;
 
-
 /*
-
 FIXME: this should use ly:set-option interface instead.
-
 */
 
 LY_DEFINE (ly_set_grob_modification_callback, "ly:set-grob-modification-callback",
-          1, 0, 0, (SCM cb),
-          "Specify a procedure that will be called every time LilyPond"
-          " modifies a grob property.  The callback will receive as"
-          " arguments the grob that is being modified, the name of the"
-          " C++ file in which the modification was requested, the line"
-          " number in the C++ file in which the modification was requested,"
-          " the name of the function in which the modification was"
-          " requested, the property to be changed, and the new value for"
-          " the property.")
+           1, 0, 0, (SCM cb),
+           "Specify a procedure that will be called every time LilyPond"
+           " modifies a grob property.  The callback will receive as"
+           " arguments the grob that is being modified, the name of the"
+           " C++ file in which the modification was requested, the line"
+           " number in the C++ file in which the modification was requested,"
+           " the name of the function in which the modification was"
+           " requested, the property to be changed, and the new value for"
+           " the property.")
 {
-  modification_callback =  (ly_is_procedure (cb)) ? cb : SCM_BOOL_F;
+  modification_callback = (ly_is_procedure (cb)) ? cb : SCM_BOOL_F;
   return SCM_UNSPECIFIED;
 }
 
 LY_DEFINE (ly_set_property_cache_callback, "ly:set-property-cache-callback",
-          1, 0, 0, (SCM cb),
-          "Specify a procedure that will be called whenever lilypond"
-          " calculates a callback function and caches the result.  The"
-          " callback will receive as arguments the grob whose property it"
-          " is, the name of the property, the name of the callback that"
-          " calculated the property, and the new (cached) value of the"
-          " property.")
+           1, 0, 0, (SCM cb),
+           "Specify a procedure that will be called whenever lilypond"
+           " calculates a callback function and caches the result.  The"
+           " callback will receive as arguments the grob whose property it"
+           " is, the name of the property, the name of the callback that"
+           " calculated the property, and the new (cached) value of the"
+           " property.")
 {
-  cache_callback =  (ly_is_procedure (cb)) ? cb : SCM_BOOL_F;
+  cache_callback = (ly_is_procedure (cb)) ? cb : SCM_BOOL_F;
   return SCM_UNSPECIFIED;
 }
 
-
 void
 Grob::instrumented_set_property (SCM sym, SCM v,
-                                char const *file,
-                                int line,
-                                char const *fun)
+                                 char const *file,
+                                 int line,
+                                 char const *fun)
 {
 #ifndef NDEBUG
   if (ly_is_procedure (modification_callback))
     scm_apply_0 (modification_callback,
-                scm_list_n (self_scm (),
-                            scm_from_locale_string (file),
-                            scm_from_int (line),
-                            scm_from_locale_string (fun),
-                            sym, v, SCM_UNDEFINED));
+                 scm_list_n (self_scm (),
+                             scm_from_locale_string (file),
+                             scm_from_int (line),
+                             scm_from_locale_string (fun),
+                             sym, v, SCM_UNDEFINED));
 #else
   (void) file;
   (void) line;
   (void) fun;
 #endif
-  
+
   internal_set_property (sym, v);
 }
 
@@ -101,9 +97,9 @@ SCM
 Grob::get_property_alist_chain (SCM def) const
 {
   return scm_list_n (mutable_property_alist_,
-                    immutable_property_alist_,
-                    def,
-                    SCM_UNDEFINED);
+                     immutable_property_alist_,
+                     def,
+                     SCM_UNDEFINED);
 }
 
 extern void check_interfaces_for_property (Grob const *me, SCM sym);
@@ -112,7 +108,7 @@ void
 Grob::internal_set_property (SCM sym, SCM v)
 {
   internal_set_value_on_alist (&mutable_property_alist_,
-                              sym, v);
+                               sym, v);
 
 }
 
@@ -126,9 +122,9 @@ Grob::internal_set_value_on_alist (SCM *alist, SCM sym, SCM v)
   if (do_internal_type_checking_global)
     {
       if (!ly_is_procedure (v)
-         && !is_simple_closure (v)
-         && v != ly_symbol2scm ("calculation-in-progress"))
-       type_check_assignment (sym, v, ly_symbol2scm ("backend-type?"));
+          && !is_simple_closure (v)
+          && v != ly_symbol2scm ("calculation-in-progress"))
+        type_check_assignment (sym, v, ly_symbol2scm ("backend-type?"));
 
       check_interfaces_for_property (this, sym);
     }
@@ -143,7 +139,7 @@ Grob::internal_get_property_data (SCM sym) const
   if (profile_property_accesses)
     note_property_access (&grob_property_lookup_table, sym);
 #endif
-  
+
   SCM handle = scm_sloppy_assq (sym, mutable_property_alist_);
   if (handle != SCM_BOOL_F)
     return scm_cdr (handle);
@@ -154,11 +150,11 @@ Grob::internal_get_property_data (SCM sym) const
     {
       SCM val = scm_cdr (handle);
       if (!ly_is_procedure (val) && !is_simple_closure (val))
-       type_check_assignment (sym, val, ly_symbol2scm ("backend-type?"));
+        type_check_assignment (sym, val, ly_symbol2scm ("backend-type?"));
 
       check_interfaces_for_property (this, sym);
     }
-  
+
   return (handle == SCM_BOOL_F) ? SCM_EOL : scm_cdr (handle);
 }
 
@@ -171,23 +167,23 @@ Grob::internal_get_property (SCM sym) const
   if (val == ly_symbol2scm ("calculation-in-progress"))
     {
       programming_error (_f ("cyclic dependency: calculation-in-progress encountered for #'%s (%s)",
-                            ly_symbol2string (sym).c_str (),
-                            name ().c_str ()));
+                             ly_symbol2string (sym).c_str (),
+                             name ().c_str ()));
       if (debug_property_callbacks)
-       {
-         message ("backtrace: ");
-         print_property_callback_stack ();
-       }
+        {
+          message ("backtrace: ");
+          print_property_callback_stack ();
+        }
     }
 #endif
-  
+
   if (ly_is_procedure (val)
       || is_simple_closure (val))
     {
-      Grob *me = ((Grob*)this);
+      Grob *me = ((Grob *)this);
       val = me->try_callback_on_alist (&me->mutable_property_alist_, sym, val);
     }
-  
+
   return val;
 }
 
@@ -200,8 +196,8 @@ Grob::internal_get_pure_property (SCM sym, int start, int end) const
     return call_pure_function (val, scm_list_1 (self_scm ()), start, end);
   if (is_simple_closure (val))
     return evaluate_with_simple_closure (self_scm (),
-                                        simple_closure_expression (val),
-                                        true, start, end);
+                                         simple_closure_expression (val),
+                                         true, start, end);
   return val;
 }
 
@@ -213,7 +209,7 @@ Grob::internal_get_maybe_pure_property (SCM sym, bool pure, int start, int end)
 
 SCM
 Grob::try_callback_on_alist (SCM *alist, SCM sym, SCM proc)
-{      
+{
   SCM marker = ly_symbol2scm ("calculation-in-progress");
   /*
     need to put a value in SYM to ensure that we don't get a
@@ -232,15 +228,15 @@ Grob::try_callback_on_alist (SCM *alist, SCM sym, SCM proc)
   else if (is_simple_closure (proc))
     {
       value = evaluate_with_simple_closure (self_scm (),
-                                           simple_closure_expression (proc),
-                                           false, 0, 0);
+                                            simple_closure_expression (proc),
+                                            false, 0, 0);
     }
-  
+
 #ifndef NDEBUG
   if (debug_property_callbacks)
     grob_property_callback_stack = scm_cdr (grob_property_callback_stack);
 #endif
-         
+
   /*
     If the function returns SCM_UNSPECIFIED, we assume the
     property has been set with an explicit set_property ()
@@ -251,22 +247,22 @@ Grob::try_callback_on_alist (SCM *alist, SCM sym, SCM proc)
       value = get_property_data (sym);
       assert (value == SCM_EOL || value == marker);
       if (value == marker)
-       *alist = scm_assq_remove_x (*alist, marker);
+        *alist = scm_assq_remove_x (*alist, marker);
     }
   else
     {
 #ifndef NDEBUG
       if (ly_is_procedure (cache_callback))
-       scm_apply_0 (cache_callback,
-                    scm_list_n (self_scm (),
-                                sym,
-                                proc,
-                                value,
-                                SCM_UNDEFINED));
+        scm_apply_0 (cache_callback,
+                     scm_list_n (self_scm (),
+                                 sym,
+                                 proc,
+                                 value,
+                                 SCM_UNDEFINED));
 #endif
       internal_set_value_on_alist (alist, sym, value);
     }
-  
+
   return value;
 }
 
@@ -293,17 +289,17 @@ Grob::internal_get_object (SCM sym) const
     note_property_access (&grob_property_lookup_table, sym);
 
   SCM s = scm_sloppy_assq (sym, object_alist_);
-  
+
   if (s != SCM_BOOL_F)
     {
       SCM val = scm_cdr (s);
       if (ly_is_procedure (val)
-         || is_simple_closure (val))
-       {
-         Grob *me = ((Grob*)this);
-         val = me->try_callback_on_alist (&me->object_alist_, sym, val);
-       }
-      
+          || is_simple_closure (val))
+        {
+          Grob *me = ((Grob *)this);
+          val = me->try_callback_on_alist (&me->object_alist_, sym, val);
+        }
+
       return val;
     }
 
@@ -328,6 +324,6 @@ call_pure_function (SCM unpure, SCM args, int start, int end)
   SCM scm_call_pure_function = ly_lily_module_constant ("call-pure-function");
 
   return scm_apply_0 (scm_call_pure_function,
-                     scm_list_4 (unpure, args, scm_from_int (start), scm_from_int (end)));
+                      scm_list_4 (unpure, args, scm_from_int (start), scm_from_int (end)));
 }
 
index f10ee2106fe762f73569e03794d1ba26358b8d8d..1709cb7e926c215d59100acb695897fe1d8454ea 100644 (file)
 #include "paper-score.hh"
 #include "simple-closure.hh"
 #include "system.hh"
-#include "warn.hh"             // error ()
+#include "warn.hh"              // error ()
 
 LY_DEFINE (ly_grob_property_data, "ly:grob-property-data",
-          2, 0, 0, (SCM grob, SCM sym),
-          "Return the value for property @var{sym} of @var{grob},"
-          " but do not process callbacks.")
+           2, 0, 0, (SCM grob, SCM sym),
+           "Return the value for property @var{sym} of @var{grob},"
+           " but do not process callbacks.")
 {
   Grob *sc = unsmob_grob (grob);
 
@@ -41,11 +41,11 @@ LY_DEFINE (ly_grob_property_data, "ly:grob-property-data",
 }
 
 LY_DEFINE (ly_grob_set_property_x, "ly:grob-set-property!",
-          3, 0, 0, (SCM grob, SCM sym, SCM val),
-          "Set @var{sym} in grob @var{grob} to value @var{val}.")
+           3, 0, 0, (SCM grob, SCM sym, SCM val),
+           "Set @var{sym} in grob @var{grob} to value @var{val}.")
 {
   Grob *sc = unsmob_grob (grob);
+
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
 
@@ -59,8 +59,8 @@ LY_DEFINE (ly_grob_set_property_x, "ly:grob-set-property!",
 }
 
 LY_DEFINE (ly_grob_set_nested_property_x, "ly:grob-set-nested-property!",
-          3, 0, 0, (SCM grob, SCM symlist, SCM val),
-          "Set nested property @var{symlist} in grob @var{grob} to value @var{val}.")
+           3, 0, 0, (SCM grob, SCM symlist, SCM val),
+           "Set nested property @var{symlist} in grob @var{grob} to value @var{val}.")
 {
   Grob *sc = unsmob_grob (grob);
 
@@ -78,12 +78,11 @@ LY_DEFINE (ly_grob_set_nested_property_x, "ly:grob-set-nested-property!",
   return SCM_UNSPECIFIED;
 }
 
-
 LY_DEFINE (ly_grob_property, "ly:grob-property",
-          2, 1, 0, (SCM grob, SCM sym, SCM val),
-          "Return the value for property @var{sym} of @var{grob}."
-          "  If no value is found, return @var{val} or @code{'()}"
-          " if @var{val} is not specified.")
+           2, 1, 0, (SCM grob, SCM sym, SCM val),
+           "Return the value for property @var{sym} of @var{grob}."
+           "  If no value is found, return @var{val} or @code{'()}"
+           " if @var{val} is not specified.")
 {
   Grob *sc = unsmob_grob (grob);
 
@@ -95,43 +94,41 @@ LY_DEFINE (ly_grob_property, "ly:grob-property",
   SCM retval = sc->internal_get_property (sym);
   if (retval == SCM_EOL)
     retval = val;
-  
+
   return retval;
 }
 
-
 LY_DEFINE (ly_grob_interfaces, "ly:grob-interfaces",
-          1, 0, 0, (SCM grob),
-          "Return the interfaces list of grob @var{grob}.")
+           1, 0, 0, (SCM grob),
+           "Return the interfaces list of grob @var{grob}.")
 {
   Grob *sc = unsmob_grob (grob);
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
 
   return sc->interfaces ();
 }
 
 LY_DEFINE (ly_grob_object, "ly:grob-object",
-          2, 0, 0, (SCM grob, SCM sym),
-          "Return the value of a pointer in grob @var{grob} of property"
-          " @var{sym}.  It returns @code{'()} (end-of-list) if @var{sym}"
-          " is undefined in @var{grob}.")
+           2, 0, 0, (SCM grob, SCM sym),
+           "Return the value of a pointer in grob @var{grob} of property"
+           " @var{sym}.  It returns @code{'()} (end-of-list) if @var{sym}"
+           " is undefined in @var{grob}.")
 {
   Grob *sc = unsmob_grob (grob);
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
 
   return sc->internal_get_object (sym);
 }
 
-
 LY_DEFINE (ly_grob_set_object_x, "ly:grob-set-object!",
-          3, 0, 0, (SCM grob, SCM sym, SCM val),
-          "Set @var{sym} in grob @var{grob} to value @var{val}.")
+           3, 0, 0, (SCM grob, SCM sym, SCM val),
+           "Set @var{sym} in grob @var{grob} to value @var{val}.")
 {
   Grob *sc = unsmob_grob (grob);
+
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
 
@@ -142,52 +139,50 @@ LY_DEFINE (ly_grob_set_object_x, "ly:grob-set-object!",
 /* TODO: make difference between scaled and unscalead variable in
    calling (i.e different funcs.) */
 LY_DEFINE (ly_grob_layout, "ly:grob-layout",
-          1, 0, 0, (SCM grob),
-          "Get @code{\\layout} definition from grob @var{grob}.")
+           1, 0, 0, (SCM grob),
+           "Get @code{\\layout} definition from grob @var{grob}.")
 {
   Grob *sc = unsmob_grob (grob);
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
 
   return sc->layout ()->self_scm ();
 }
 
 LY_DEFINE (ly_grob_alist_chain, "ly:grob-alist-chain",
-          1, 1, 0, (SCM grob, SCM global),
-          "Get an alist chain for grob @var{grob}, with @var{global} as"
-          " the global default.  If unspecified, @code{font-defaults}"
-          " from the layout block is taken.")
+           1, 1, 0, (SCM grob, SCM global),
+           "Get an alist chain for grob @var{grob}, with @var{global} as"
+           " the global default.  If unspecified, @code{font-defaults}"
+           " from the layout block is taken.")
 {
   Grob *sc = unsmob_grob (grob);
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
 
   if (global == SCM_UNDEFINED)
     {
       global = sc->layout ()->lookup_variable (ly_symbol2scm ("font-defaults"));
       if (global == SCM_UNDEFINED)
-       global = SCM_EOL;
+        global = SCM_EOL;
     }
 
   return sc->get_property_alist_chain (global);
 }
 
 LY_DEFINE (ly_grob_extent, "ly:grob-extent",
-          3, 0, 0, (SCM grob, SCM refp, SCM axis),
-          "Get the extent in @var{axis} direction of @var{grob} relative to"
-          " the grob @var{refp}.")
+           3, 0, 0, (SCM grob, SCM refp, SCM axis),
+           "Get the extent in @var{axis} direction of @var{grob} relative to"
+           " the grob @var{refp}.")
 {
   Grob *sc = unsmob_grob (grob);
   Grob *ref = unsmob_grob (refp);
-  
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_SMOB (Grob, refp, 2);
   LY_ASSERT_TYPE (is_axis, axis, 3);
 
   Axis a = Axis (scm_to_int (axis));
 
-    
   if (ref->common_refpoint (sc, a) != ref)
     {
       // ugh. should use other error message
@@ -197,20 +192,19 @@ LY_DEFINE (ly_grob_extent, "ly:grob-extent",
 }
 
 LY_DEFINE (ly_grob_robust_relative_extent, "ly:grob-robust-relative-extent",
-          3, 0, 0, (SCM grob, SCM refp, SCM axis),
-          "Get the extent in @var{axis} direction of @var{grob} relative to"
-          " the grob @var{refp}, or @code{(0,0)} if empty.")
+           3, 0, 0, (SCM grob, SCM refp, SCM axis),
+           "Get the extent in @var{axis} direction of @var{grob} relative to"
+           " the grob @var{refp}, or @code{(0,0)} if empty.")
 {
   Grob *sc = unsmob_grob (grob);
   Grob *ref = unsmob_grob (refp);
-  
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_SMOB (Grob, refp, 2);
   LY_ASSERT_TYPE (is_axis, axis, 3);
 
   Axis a = Axis (scm_to_int (axis));
-    
+
   if (ref->common_refpoint (sc, a) != ref)
     {
       // ugh. should use other error message
@@ -221,21 +215,19 @@ LY_DEFINE (ly_grob_robust_relative_extent, "ly:grob-robust-relative-extent",
 }
 
 LY_DEFINE (ly_grob_relative_coordinate, "ly:grob-relative-coordinate",
-          3, 0, 0, (SCM grob, SCM refp, SCM axis),
-          "Get the coordinate in @var{axis} direction of @var{grob} relative"
-          " to the grob @var{refp}.")
+           3, 0, 0, (SCM grob, SCM refp, SCM axis),
+           "Get the coordinate in @var{axis} direction of @var{grob} relative"
+           " to the grob @var{refp}.")
 {
   Grob *sc = unsmob_grob (grob);
   Grob *ref = unsmob_grob (refp);
-  
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_SMOB (Grob, refp, 2);
   LY_ASSERT_TYPE (is_axis, axis, 3);
 
   Axis a = Axis (scm_to_int (axis));
 
-    
   if (ref->common_refpoint (sc, a) != ref)
     {
       // ugh. should use other error message
@@ -245,14 +237,13 @@ LY_DEFINE (ly_grob_relative_coordinate, "ly:grob-relative-coordinate",
   return scm_from_double (sc->relative_coordinate (ref, a));
 }
 
-
 LY_DEFINE (ly_grob_parent, "ly:grob-parent",
-          2, 0, 0, (SCM grob, SCM axis),
-          "Get the parent of @var{grob}.  @var{axis} is 0 for the X-axis,"
-          " 1@tie{}for the Y-axis.")
+           2, 0, 0, (SCM grob, SCM axis),
+           "Get the parent of @var{grob}.  @var{axis} is 0 for the X-axis,"
+           " 1@tie{}for the Y-axis.")
 {
   Grob *sc = unsmob_grob (grob);
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (is_axis, axis, 2);
 
@@ -261,8 +252,8 @@ LY_DEFINE (ly_grob_parent, "ly:grob-parent",
 }
 
 LY_DEFINE (ly_grob_set_parent_x, "ly:grob-set-parent!",
-          3, 0, 0, (SCM grob, SCM axis, SCM parent_grob),
-          "Set @var{parent-grob} the parent of grob @var{grob} in axis @var{axis}.")
+           3, 0, 0, (SCM grob, SCM axis, SCM parent_grob),
+           "Set @var{parent-grob} the parent of grob @var{grob} in axis @var{axis}.")
 {
   Grob *gr = unsmob_grob (grob);
   Grob *parent = unsmob_grob (parent_grob);
@@ -277,11 +268,11 @@ LY_DEFINE (ly_grob_set_parent_x, "ly:grob-set-parent!",
 }
 
 LY_DEFINE (ly_grob_properties, "ly:grob-properties",
-          1, 0, 0, (SCM grob),
-          "Get the mutable properties of @var{grob}.")
+           1, 0, 0, (SCM grob),
+           "Get the mutable properties of @var{grob}.")
 {
   Grob *g = unsmob_grob (grob);
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
 
   /* FIXME: uhg? copy/read only? */
@@ -289,11 +280,11 @@ LY_DEFINE (ly_grob_properties, "ly:grob-properties",
 }
 
 LY_DEFINE (ly_grob_basic_properties, "ly:grob-basic-properties",
-          1, 0, 0, (SCM grob),
-          "Get the immutable properties of @var{grob}.")
+           1, 0, 0, (SCM grob),
+           "Get the immutable properties of @var{grob}.")
 {
   Grob *g = unsmob_grob (grob);
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
 
   /* FIXME: uhg? copy/read only? */
@@ -301,11 +292,11 @@ LY_DEFINE (ly_grob_basic_properties, "ly:grob-basic-properties",
 }
 
 LY_DEFINE (ly_grob_system, "ly:grob-system",
-          1, 0, 0, (SCM grob),
-          "Return the system grob of @var{grob}.")
+           1, 0, 0, (SCM grob),
+           "Return the system grob of @var{grob}.")
 {
   Grob *me = unsmob_grob (grob);
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
 
   if (System *g = me->get_system ())
@@ -315,22 +306,21 @@ LY_DEFINE (ly_grob_system, "ly:grob-system",
 }
 
 LY_DEFINE (ly_grob_original, "ly:grob-original",
-          1, 0, 0, (SCM grob),
-          "Return the unbroken original grob of @var{grob}.")
+           1, 0, 0, (SCM grob),
+           "Return the unbroken original grob of @var{grob}.")
 {
   Grob *me = unsmob_grob (grob);
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
   return me->original () ? me->original ()->self_scm () : me->self_scm ();
 }
 
-
 LY_DEFINE (ly_grob_suicide_x, "ly:grob-suicide!",
-          1, 0, 0, (SCM grob),
-          "Kill @var{grob}.")
+           1, 0, 0, (SCM grob),
+           "Kill @var{grob}.")
 {
   Grob *me = unsmob_grob (grob);
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
 
   me->suicide ();
@@ -338,12 +328,12 @@ LY_DEFINE (ly_grob_suicide_x, "ly:grob-suicide!",
 }
 
 LY_DEFINE (ly_grob_translate_axis_x, "ly:grob-translate-axis!",
-          3, 0, 0, (SCM grob, SCM d, SCM a),
-          "Translate @var{grob} on axis@tie{}@var{a} over"
-          " distance@tie{}@var{d}.")
+           3, 0, 0, (SCM grob, SCM d, SCM a),
+           "Translate @var{grob} on axis@tie{}@var{a} over"
+           " distance@tie{}@var{d}.")
 {
   Grob *me = unsmob_grob (grob);
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (scm_is_number, d, 2);
   LY_ASSERT_TYPE (is_axis, a, 3);
@@ -353,30 +343,29 @@ LY_DEFINE (ly_grob_translate_axis_x, "ly:grob-translate-axis!",
 }
 
 LY_DEFINE (ly_grob_default_font, "ly:grob-default-font",
-          1, 0, 0, (SCM grob),
-          "Return the default font for grob @var{grob}.")
+           1, 0, 0, (SCM grob),
+           "Return the default font for grob @var{grob}.")
 {
   Grob *gr = unsmob_grob (grob);
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
 
   return Font_interface::get_default_font (gr)->self_scm ();
 }
 
-
 /*
   TODO: consider swapping order, so we can do
 
   (grob-common-refpoint a b c d e)
  */
 LY_DEFINE (ly_grob_common_refpoint, "ly:grob-common-refpoint",
-          3, 0, 0,  (SCM grob, SCM other, SCM axis),
-          "Find the common refpoint of @var{grob} and @var{other}"
-          " for @var{axis}.")
+           3, 0, 0, (SCM grob, SCM other, SCM axis),
+           "Find the common refpoint of @var{grob} and @var{other}"
+           " for @var{axis}.")
 {
-  
+
   Grob *gr = unsmob_grob (grob);
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_SMOB (Grob, other, 2);
 
@@ -384,17 +373,17 @@ LY_DEFINE (ly_grob_common_refpoint, "ly:grob-common-refpoint",
 
   LY_ASSERT_TYPE (is_axis, axis, 3);
 
-  Grob *refp = gr->common_refpoint (o,  Axis (scm_to_int (axis)));
+  Grob *refp = gr->common_refpoint (o, Axis (scm_to_int (axis)));
   return refp ? refp->self_scm () : SCM_BOOL_F;
 }
 
 LY_DEFINE (ly_grob_common_refpoint_of_array, "ly:grob-common-refpoint-of-array",
-          3, 0, 0,  (SCM grob, SCM others, SCM axis),
-          "Find the common refpoint of @var{grob} and @var{others}"
-          " (a grob-array) for @var{axis}.")
+           3, 0, 0, (SCM grob, SCM others, SCM axis),
+           "Find the common refpoint of @var{grob} and @var{others}"
+           " (a grob-array) for @var{axis}.")
 {
   Grob *gr = unsmob_grob (grob);
-   
+
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_SMOB (Grob_array, others, 2);
 
@@ -406,11 +395,11 @@ LY_DEFINE (ly_grob_common_refpoint_of_array, "ly:grob-common-refpoint-of-array",
 }
 
 LY_DEFINE (ly_grob_chain_callback, "ly:grob-chain-callback",
-          3, 0, 0, (SCM grob, SCM proc, SCM sym),
-          "Find the callback that is stored as property"
-          " @var{sym} of grob @var{grob} and chain @var{proc}"
-          " to the head of this, meaning that it is called"
-          " using @var{grob} and the previous callback's result.")
+           3, 0, 0, (SCM grob, SCM proc, SCM sym),
+           "Find the callback that is stored as property"
+           " @var{sym} of grob @var{grob} and chain @var{proc}"
+           " to the head of this, meaning that it is called"
+           " using @var{grob} and the previous callback's result.")
 {
   Grob *gr = unsmob_grob (grob);
 
index edebcbe95eac0b5fc04a52a169e4fbf453ea2941..4772e621594b8111a940195bc941c2694cf7d269 100644 (file)
@@ -32,7 +32,7 @@ SCM
 Grob::mark_smob (SCM ses)
 {
   ASSERT_LIVE_IS_ALLOWED ();
-  
+
   Grob *s = (Grob *) SCM_CELL_WORD_1 (ses);
   scm_gc_mark (s->immutable_property_alist_);
 
index c613effccc65fd6be001aad742e41a1ed29b15a4..993b18a31b5648e1c47a4039c386b11e4cf3fa1b 100644 (file)
@@ -45,9 +45,9 @@ Grob::clone () const
   return new Grob (*this);
 }
 
-Grob::Grob (SCM basicprops)        
+Grob::Grob (SCM basicprops)
 {
-  
+
   /* FIXME: default should be no callback.  */
   self_scm_ = SCM_EOL;
   layout_ = 0;
@@ -56,7 +56,7 @@ Grob::Grob (SCM basicprops)
   immutable_property_alist_ = basicprops;
   mutable_property_alist_ = SCM_EOL;
   object_alist_ = SCM_EOL;
-  
+
   /* We do smobify_self () as the first step.  Since the object lives
      on the heap, none of its SCM variables are protected from
      GC. After smobify_self (), they are.  */
@@ -69,12 +69,12 @@ Grob::Grob (SCM basicprops)
 
       SCM object_cbs = scm_assq (ly_symbol2scm ("object-callbacks"), meta);
       if (scm_is_pair (object_cbs))
-       {
-         for (SCM s = scm_cdr (object_cbs); scm_is_pair (s); s = scm_cdr (s))
-           set_object (scm_caar (s), scm_cdar (s)); 
-       }
+        {
+          for (SCM s = scm_cdr (object_cbs); scm_is_pair (s); s = scm_cdr (s))
+            set_object (scm_caar (s), scm_cdar (s));
+        }
     }
-  
+
   if (get_property_data ("X-extent") == SCM_EOL)
     set_property ("X-extent", Grob::stencil_width_proc);
   if (get_property_data ("Y-extent") == SCM_EOL)
@@ -126,36 +126,36 @@ Grob::get_print_stencil () const
       bool transparent = to_boolean (get_property ("transparent"));
 
       if (transparent)
-       retval = Stencil (m->extent_box (), SCM_EOL);
+        retval = Stencil (m->extent_box (), SCM_EOL);
       else
-       {
-         SCM expr = m->expr ();
-         expr = scm_list_3 (ly_symbol2scm ("grob-cause"),
-                            self_scm (), expr);
+        {
+          SCM expr = m->expr ();
+          expr = scm_list_3 (ly_symbol2scm ("grob-cause"),
+                             self_scm (), expr);
 
-         retval = Stencil (m->extent_box (), expr);
-       }
+          retval = Stencil (m->extent_box (), expr);
+        }
 
       SCM rot = get_property ("rotation");
       if (scm_is_pair (rot))
-       {
-         Real angle = scm_to_double (scm_car (rot));
-         Real x = scm_to_double (scm_cadr (rot));
-         Real y = scm_to_double (scm_caddr (rot));
+        {
+          Real angle = scm_to_double (scm_car (rot));
+          Real x = scm_to_double (scm_cadr (rot));
+          Real y = scm_to_double (scm_caddr (rot));
 
-         retval.rotate_degrees (angle, Offset (x, y));
-       }
+          retval.rotate_degrees (angle, Offset (x, y));
+        }
 
       /* color support... see interpret_stencil_expression () for more... */
       SCM color = get_property ("color");
       if (scm_is_pair (color))
-       {
-         SCM expr = scm_list_3 (ly_symbol2scm ("color"),
-                                color,
-                                retval.expr ());
+        {
+          SCM expr = scm_list_3 (ly_symbol2scm ("color"),
+                                 color,
+                                 retval.expr ());
 
-         retval = Stencil (retval.extent_box (), expr);
-       }
+          retval = Stencil (retval.extent_box (), expr);
+        }
 
       /* process whiteout */
       /* a grob has to be visible, otherwise the whiteout property has no effect */
@@ -165,7 +165,7 @@ Grob::get_print_stencil () const
           /* to add a round-filled-box stencil to the stencil list */
           retval
             = *unsmob_stencil (scm_call_1 (ly_lily_module_constant ("stencil-whiteout"),
-                                           retval.smobbed_copy()));
+                                           retval.smobbed_copy ()));
         }
     }
 
@@ -196,7 +196,7 @@ Grob::get_system () const
    one system in the whole score and we can find it just by following
    parent pointers. */
 System *
-Grob::get_system(Grob *me)
+Grob::get_system (Grob *me)
 {
   Grob *p = me->get_parent (X_AXIS);
   return p ? get_system (p) : dynamic_cast<System *>(me);
@@ -215,7 +215,7 @@ Grob::handle_broken_dependencies ()
        properties, and a special function fixes FOO  */
     {
       for (SCM s = object_alist_; scm_is_pair (s); s = scm_cdr (s))
-       sp->substitute_one_mutable_property (scm_caar (s), scm_cdar (s));
+        sp->substitute_one_mutable_property (scm_caar (s), scm_cdar (s));
     }
   System *system = get_system ();
 
@@ -264,7 +264,7 @@ Grob::handle_prebroken_dependencies ()
     {
       Item *it = dynamic_cast<Item *> (this);
       substitute_object_links (scm_from_int (it->break_status_dir ()),
-                              original ()->object_alist_);
+                               original ()->object_alist_);
     }
 }
 
@@ -284,13 +284,13 @@ Grob::translate_axis (Real y, Axis a)
   if (isinf (y) || isnan (y))
     {
       programming_error (_ ("Infinity or NaN encountered"));
-      return ;
+      return;
     }
-  
+
   if (!dim_cache_[a].offset_)
     dim_cache_[a].offset_ = new Real (y);
   else
-    *dim_cache_[a].offset_ += y;  
+    *dim_cache_[a].offset_ += y;
 }
 
 /* Find the offset relative to D.  If D equals THIS, then it is 0.
@@ -309,7 +309,7 @@ Grob::relative_coordinate (Grob const *refp, Axis a) const
   Real off = get_offset (a);
   if (refp == dim_cache_[a].parent_)
     return off;
-  
+
   off += dim_cache_[a].parent_->relative_coordinate (refp, a);
 
   return off;
@@ -326,7 +326,7 @@ Grob::pure_relative_y_coordinate (Grob const *refp, int start, int end)
   if (dim_cache_[Y_AXIS].offset_)
     {
       if (to_boolean (get_property ("pure-Y-offset-in-progress")))
-       programming_error ("cyclic chain in pure-Y-offset callbacks");
+        programming_error ("cyclic chain in pure-Y-offset callbacks");
 
       off = *dim_cache_[Y_AXIS].offset_;
     }
@@ -337,9 +337,9 @@ Grob::pure_relative_y_coordinate (Grob const *refp, int start, int end)
       dim_cache_[Y_AXIS].offset_ = new Real (0.0);
       set_property ("pure-Y-offset-in-progress", SCM_BOOL_T);
       off = robust_scm2double (call_pure_function (proc,
-                                                  scm_list_1 (self_scm ()),
-                                                  start, end),
-                              0.0);
+                                                   scm_list_1 (self_scm ()),
+                                                   start, end),
+                               0.0);
       del_property ("pure-Y-offset-in-progress");
       delete dim_cache_[Y_AXIS].offset_;
       dim_cache_[Y_AXIS].offset_ = 0;
@@ -354,7 +354,7 @@ Grob::pure_relative_y_coordinate (Grob const *refp, int start, int end)
     {
       Real trans = 0;
       if (Align_interface::has_interface (p) && !dim_cache_[Y_AXIS].offset_)
-       trans = Align_interface::get_pure_child_y_translation (p, this, start, end);
+        trans = Align_interface::get_pure_child_y_translation (p, this, start, end);
 
       return off + trans + p->pure_relative_y_coordinate (refp, start, end);
     }
@@ -394,7 +394,7 @@ Grob::maybe_pure_coordinate (Grob const *refp, Axis a, bool pure, int start, int
   if (pure && a != Y_AXIS)
     programming_error ("tried to get pure X-offset");
   return (pure && a == Y_AXIS) ? pure_relative_y_coordinate (refp, start, end)
-    : relative_coordinate (refp, a);
+         : relative_coordinate (refp, a);
 }
 
 /****************************************************************
@@ -407,18 +407,17 @@ Grob::flush_extent_cache (Axis axis)
   if (dim_cache_[axis].extent_)
     {
       /*
-       Ugh, this is not accurate; will flush property, causing
-       callback to be called if.
+        Ugh, this is not accurate; will flush property, causing
+        callback to be called if.
        */
       del_property ((axis == X_AXIS) ? ly_symbol2scm ("X-extent") : ly_symbol2scm ("Y-extent"));
       delete dim_cache_[axis].extent_;
       dim_cache_[axis].extent_ = 0;
       if (get_parent (axis))
-       get_parent (axis)->flush_extent_cache (axis);
+        get_parent (axis)->flush_extent_cache (axis);
     }
 }
 
-
 Interval
 Grob::extent (Grob *refp, Axis a) const
 {
@@ -431,30 +430,30 @@ Grob::extent (Grob *refp, Axis a) const
   else
     {
       /*
-       Order is significant: ?-extent may trigger suicide.
+        Order is significant: ?-extent may trigger suicide.
        */
-      SCM ext_sym =
-       (a == X_AXIS)
-       ? ly_symbol2scm ("X-extent")
-       : ly_symbol2scm ("Y-extent");
-       
+      SCM ext_sym
+        = (a == X_AXIS)
+          ? ly_symbol2scm ("X-extent")
+          : ly_symbol2scm ("Y-extent");
+
       SCM ext = internal_get_property (ext_sym);
       if (is_number_pair (ext))
-       real_ext.unite (ly_scm2interval (ext));
+        real_ext.unite (ly_scm2interval (ext));
 
-      SCM min_ext_sym =
-       (a == X_AXIS)
-       ? ly_symbol2scm ("minimum-X-extent")
-       : ly_symbol2scm ("minimum-Y-extent");
+      SCM min_ext_sym
+        = (a == X_AXIS)
+          ? ly_symbol2scm ("minimum-X-extent")
+          : ly_symbol2scm ("minimum-Y-extent");
       SCM min_ext = internal_get_property (min_ext_sym);
       if (is_number_pair (min_ext))
-       real_ext.unite (ly_scm2interval (min_ext));
+        real_ext.unite (ly_scm2interval (min_ext));
 
-      ((Grob*)this)->dim_cache_[a].extent_ = new Interval (real_ext);  
+      ((Grob *)this)->dim_cache_[a].extent_ = new Interval (real_ext);
     }
-  
+
   real_ext.translate (offset);
-  
+
   return real_ext;
 }
 
@@ -519,7 +518,7 @@ Grob::common_refpoint (Grob const *s, Axis a) const
   for (Grob const *c = this; c; c = c->dim_cache_[a].parent_)
     for (Grob const *d = s; d; d = d->dim_cache_[a].parent_)
       if (d == c)
-       return (Grob *) d;
+        return (Grob *) d;
 
   return 0;
 }
@@ -536,7 +535,6 @@ Grob::get_parent (Axis a) const
   return dim_cache_[a].parent_;
 }
 
-
 void
 Grob::fixup_refpoint ()
 {
@@ -546,32 +544,31 @@ Grob::fixup_refpoint ()
       Grob *parent = get_parent (ax);
 
       if (!parent)
-       continue;
+        continue;
 
       if (parent->get_system () != get_system () && get_system ())
-       {
-         Grob *newparent = parent->find_broken_piece (get_system ());
-         set_parent (newparent, ax);
-       }
+        {
+          Grob *newparent = parent->find_broken_piece (get_system ());
+          set_parent (newparent, ax);
+        }
 
       if (Item *i = dynamic_cast<Item *> (this))
-       {
-         Item *parenti = dynamic_cast<Item *> (parent);
-
-         if (parenti && i)
-           {
-             Direction my_dir = i->break_status_dir ();
-             if (my_dir != parenti->break_status_dir ())
-               {
-                 Item *newparent = parenti->find_prebroken_piece (my_dir);
-                 set_parent (newparent, ax);
-               }
-           }
-       }
+        {
+          Item *parenti = dynamic_cast<Item *> (parent);
+
+          if (parenti && i)
+            {
+              Direction my_dir = i->break_status_dir ();
+              if (my_dir != parenti->break_status_dir ())
+                {
+                  Item *newparent = parenti->find_prebroken_piece (my_dir);
+                  set_parent (newparent, ax);
+                }
+            }
+        }
     }
 }
 
-
 /****************************************************************
   MESSAGES
 ****************************************************************/
@@ -594,7 +591,6 @@ Grob::warning (string s) const
     ::warning (s);
 }
 
-
 string
 Grob::name () const
 {
@@ -625,77 +621,76 @@ Grob::programming_error (string s) const
     ::message (s);
 }
 
-
 ADD_INTERFACE (Grob,
-              "A grob represents a piece of music notation.\n"
-              "\n"
-              "All grobs have an X and Y@tie{}position on the page.  These"
-              " X and Y@tie{}positions are stored in a relative format, thus"
-              " they can easily be combined by stacking them, hanging one"
-              " grob to the side of another, or coupling them into grouping"
-              " objects.\n"
-              "\n"
-              "Each grob has a reference point (a.k.a.@: parent): The"
-              " position of a grob is stored relative to that reference"
-              " point.  For example, the X@tie{}reference point of a staccato"
-              " dot usually is the note head that it applies to.  When the"
-              " note head is moved, the staccato dot moves along"
-              " automatically.\n"
-              "\n"
-              "A grob is often associated with a symbol, but some grobs do"
-              " not print any symbols.  They take care of grouping objects."
-              " For example, there is a separate grob that stacks staves"
-              " vertically.  The @ref{NoteCollision} object is also an"
-              " abstract grob: It only moves around chords, but doesn't print"
-              " anything.\n"
-              "\n"
-              "Grobs have properties (Scheme variables) that can be read and"
-              " set.  Two types of them exist: immutable and mutable."
-              "  Immutable variables define the default style and behavior."
-              "  They are shared between many objects.  They can be changed"
-              " using @code{\\override} and @code{\\revert}.  Mutable"
-              " properties are variables that are specific to one grob."
-              "  Typically, lists of other objects, or results from"
-              " computations are stored in mutable properties.  In"
-              " particular, every call to @code{ly:grob-set-property!}"
-              " (or its C++ equivalent) sets a mutable property.\n"
-              "\n"
-              "The properties @code{after-line-breaking} and"
-              " @code{before-line-breaking} are dummies that are not"
-              " user-serviceable.",
-
-              /* properties */
-              "X-extent "
-              "X-offset "
-              "Y-extent "
-              "Y-offset "
-              "after-line-breaking "
-              "avoid-slur "
-              "axis-group-parent-X "
-              "axis-group-parent-Y "
-              "before-line-breaking "
-              "cause "
-              "color "
-              "cross-staff "
-              "extra-X-extent "
-              "extra-Y-extent "
-              "extra-offset "
-              "interfaces "
-              "layer "
-              "meta "
-              "minimum-X-extent "
-              "minimum-Y-extent "
-              "outside-staff-horizontal-padding "
-              "outside-staff-padding "
-              "outside-staff-priority "
-              "pure-Y-offset-in-progress "
-              "rotation "
-              "springs-and-rods "
-              "staff-symbol "
-              "stencil "
-              "transparent "
-              "whiteout "
-              );
+               "A grob represents a piece of music notation.\n"
+               "\n"
+               "All grobs have an X and Y@tie{}position on the page.  These"
+               " X and Y@tie{}positions are stored in a relative format, thus"
+               " they can easily be combined by stacking them, hanging one"
+               " grob to the side of another, or coupling them into grouping"
+               " objects.\n"
+               "\n"
+               "Each grob has a reference point (a.k.a.@: parent): The"
+               " position of a grob is stored relative to that reference"
+               " point.  For example, the X@tie{}reference point of a staccato"
+               " dot usually is the note head that it applies to.  When the"
+               " note head is moved, the staccato dot moves along"
+               " automatically.\n"
+               "\n"
+               "A grob is often associated with a symbol, but some grobs do"
+               " not print any symbols.  They take care of grouping objects."
+               " For example, there is a separate grob that stacks staves"
+               " vertically.  The @ref{NoteCollision} object is also an"
+               " abstract grob: It only moves around chords, but doesn't print"
+               " anything.\n"
+               "\n"
+               "Grobs have properties (Scheme variables) that can be read and"
+               " set.  Two types of them exist: immutable and mutable."
+               "  Immutable variables define the default style and behavior."
+               "  They are shared between many objects.  They can be changed"
+               " using @code{\\override} and @code{\\revert}.  Mutable"
+               " properties are variables that are specific to one grob."
+               "  Typically, lists of other objects, or results from"
+               " computations are stored in mutable properties.  In"
+               " particular, every call to @code{ly:grob-set-property!}"
+               " (or its C++ equivalent) sets a mutable property.\n"
+               "\n"
+               "The properties @code{after-line-breaking} and"
+               " @code{before-line-breaking} are dummies that are not"
+               " user-serviceable.",
+
+               /* properties */
+               "X-extent "
+               "X-offset "
+               "Y-extent "
+               "Y-offset "
+               "after-line-breaking "
+               "avoid-slur "
+               "axis-group-parent-X "
+               "axis-group-parent-Y "
+               "before-line-breaking "
+               "cause "
+               "color "
+               "cross-staff "
+               "extra-X-extent "
+               "extra-Y-extent "
+               "extra-offset "
+               "interfaces "
+               "layer "
+               "meta "
+               "minimum-X-extent "
+               "minimum-Y-extent "
+               "outside-staff-horizontal-padding "
+               "outside-staff-padding "
+               "outside-staff-priority "
+               "pure-Y-offset-in-progress "
+               "rotation "
+               "springs-and-rods "
+               "staff-symbol "
+               "stencil "
+               "transparent "
+               "whiteout "
+              );
 
 /****************************************************************
   CALLBACKS
@@ -711,7 +706,6 @@ grob_stencil_extent (Grob *me, Axis a)
   return ly_interval2scm (e);
 }
 
-
 MAKE_SCHEME_CALLBACK (Grob, stencil_height, 1);
 SCM
 Grob::stencil_height (SCM smob)
@@ -732,13 +726,12 @@ Grob::y_parent_positioning (SCM smob)
   return scm_from_double (0.0);
 }
 
-
 MAKE_SCHEME_CALLBACK (Grob, x_parent_positioning, 1);
 SCM
 Grob::x_parent_positioning (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
-  
+
   Grob *par = me->get_parent (X_AXIS);
   if (par)
     (void) par->get_property ("positioning-done");
@@ -754,24 +747,23 @@ Grob::stencil_width (SCM smob)
   return grob_stencil_extent (me, X_AXIS);
 }
 
-
 Grob *
 common_refpoint_of_list (SCM elist, Grob *common, Axis a)
 {
   for (; scm_is_pair (elist); elist = scm_cdr (elist))
     if (Grob *s = unsmob_grob (scm_car (elist)))
       {
-       if (common)
-         common = common->common_refpoint (s, a);
-       else
-         common = s;
+        if (common)
+          common = common->common_refpoint (s, a);
+        else
+          common = s;
       }
 
   return common;
 }
 
 Grob *
-common_refpoint_of_array (vector<Grob*> const &arr, Grob *common, Axis a)
+common_refpoint_of_array (vector<Grob *> const &arr, Grob *common, Axis a)
 {
   for (vsize i = 0; i < arr.size (); i++)
     if (common)
index 5f1bb6e27fb6487f8e2d71606d4a1561dce9ba41..df2f192538a648ca283ee96eef85ff6fee9cc279 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2006--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
-  
+
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include  "lily-guile.hh"
-#include  "main.hh"
-#include  "warn.hh"
+#include "lily-guile.hh"
+#include "main.hh"
+#include "warn.hh"
 
 /*
   INIT
 */
 
-
 typedef void (*Void_fptr) ();
 vector<Void_fptr> *scm_init_funcs_;
 
@@ -48,7 +47,7 @@ ly_init_ly_module (void *)
     {
       progress_indication ("[");
       scm_display (scm_c_eval_string ("(%search-load-path \"lily.scm\")"),
-                  scm_current_error_port ());
+                   scm_current_error_port ());
       progress_indication ("]\n");
     }
 
index 399b5d995e8876f37aec2622a947435bcdc35507..3962b5e14d1e394ab3a140127b961defa11381ae 100644 (file)
@@ -37,10 +37,10 @@ Hairpin::pure_height (SCM smob, SCM, SCM)
 {
   Grob *me = unsmob_grob (smob);
   Real height = robust_scm2double (me->get_property ("height"), 0.0)
-    * Staff_symbol_referencer::staff_space (me);
+                * Staff_symbol_referencer::staff_space (me);
 
   Real thickness = robust_scm2double (me->get_property ("thickness"), 1)
-    * Staff_symbol_referencer::line_thickness (me);
+                   * Staff_symbol_referencer::line_thickness (me);
 
   height += thickness / 2;
   return ly_interval2scm (Interval (-height, height));
@@ -80,7 +80,7 @@ Hairpin::print (SCM smob)
       Spanner *next = me->broken_neighbor (RIGHT);
       Stencil *s = next->get_stencil ();
       if (!s || s->is_empty ())
-       broken[RIGHT] = false;
+        broken[RIGHT] = false;
     }
 
   Grob *common = bounds[LEFT]->common_refpoint (bounds[RIGHT], X_AXIS);
@@ -91,7 +91,7 @@ Hairpin::print (SCM smob)
   */
   bool circled_tip = ly_scm2bool (me->get_property ("circled-tip"));
   Real height = robust_scm2double (me->get_property ("height"), 0.2)
-    * Staff_symbol_referencer::staff_space (me);
+                * Staff_symbol_referencer::staff_space (me);
   /*
     FIXME: 0.525 is still just a guess...
   */
@@ -99,84 +99,84 @@ Hairpin::print (SCM smob)
   Real thick = 1.0;
   if (circled_tip)
     thick = robust_scm2double (me->get_property ("thickness"), 1.0)
-      * Staff_symbol_referencer::line_thickness (me);
+            * Staff_symbol_referencer::line_thickness (me);
 
   do
     {
       Item *b = bounds[d];
       x_points[d] = b->relative_coordinate (common, X_AXIS);
       if (broken [d])
-       {
-         if (d == LEFT)
-           x_points[d] = b->extent (common, X_AXIS)[RIGHT];
-       }
+        {
+          if (d == LEFT)
+            x_points[d] = b->extent (common, X_AXIS)[RIGHT];
+        }
       else
-       {
-         if (Text_interface::has_interface (b))
-           {
-             Interval e = b->extent (common, X_AXIS);
-             if (!e.is_empty ())
-               x_points[d] = e[-d] - d * padding;
-           }
-         else
-           {
-             bool neighbor_found = false;
-             Spanner *adjacent;
-             extract_grob_set (me, "adjacent-spanners", neighbors);
-             for (vsize i = 0; i < neighbors.size (); i++)
-               {
-                 /*
-                   FIXME: this will fuck up in case of polyphonic
-                   notes in other voices. Need to look at note-columns
-                   in the current staff/voice.
-                 */
-                 adjacent = dynamic_cast<Spanner *> (neighbors[i]);
-                 if (adjacent
-                     && (adjacent->get_bound (-d)->get_column ()
-                         == b->get_column ()))
-                   {
-                     neighbor_found = true;
-                     break;
-                   }
-               }
+        {
+          if (Text_interface::has_interface (b))
+            {
+              Interval e = b->extent (common, X_AXIS);
+              if (!e.is_empty ())
+                x_points[d] = e[-d] - d * padding;
+            }
+          else
+            {
+              bool neighbor_found = false;
+              Spanner *adjacent;
+              extract_grob_set (me, "adjacent-spanners", neighbors);
+              for (vsize i = 0; i < neighbors.size (); i++)
+                {
+                  /*
+                    FIXME: this will fuck up in case of polyphonic
+                    notes in other voices. Need to look at note-columns
+                    in the current staff/voice.
+                  */
+                  adjacent = dynamic_cast<Spanner *> (neighbors[i]);
+                  if (adjacent
+                      && (adjacent->get_bound (-d)->get_column ()
+                          == b->get_column ()))
+                    {
+                      neighbor_found = true;
+                      break;
+                    }
+                }
 
-             Interval e = robust_relative_extent (b, common, X_AXIS);
-             if (neighbor_found)
-               {
-                 if (Hairpin::has_interface (adjacent))
-                   {
-                     /*
-                       Handle back-to-back hairpins with a circle in the middle
-                     */
-                     if (circled_tip && (grow_dir != d))
-                       x_points[d] = e.center () + d * (rad - thick / 2.0);
-                     /*
-                       If we're hung on a paper column, that means we're not
-                       adjacent to a text-dynamic, and we may move closer. We
-                       make the padding a little smaller, here.
-                     */
-                     else
-                       x_points[d] = e.center () - d * padding / 3;
-                   }
-                 // Our neighbor is a dynamic text spanner, so add the
-                 // same amount of padding as for text dynamics
-                 else
-                   x_points[d] = e[-d] - d * padding;
-               }
-             else
-               {
-                 if (Note_column::has_interface (b)
-                     && Note_column::has_rests (b))
-                   x_points[d] = e[-d];
-                 else
-                   x_points[d] = e[d];
+              Interval e = robust_relative_extent (b, common, X_AXIS);
+              if (neighbor_found)
+                {
+                  if (Hairpin::has_interface (adjacent))
+                    {
+                      /*
+                        Handle back-to-back hairpins with a circle in the middle
+                      */
+                      if (circled_tip && (grow_dir != d))
+                        x_points[d] = e.center () + d * (rad - thick / 2.0);
+                      /*
+                        If we're hung on a paper column, that means we're not
+                        adjacent to a text-dynamic, and we may move closer. We
+                        make the padding a little smaller, here.
+                      */
+                      else
+                        x_points[d] = e.center () - d * padding / 3;
+                    }
+                  // Our neighbor is a dynamic text spanner, so add the
+                  // same amount of padding as for text dynamics
+                  else
+                    x_points[d] = e[-d] - d * padding;
+                }
+              else
+                {
+                  if (Note_column::has_interface (b)
+                      && Note_column::has_rests (b))
+                    x_points[d] = e[-d];
+                  else
+                    x_points[d] = e[d];
 
-                 Item *bound = me->get_bound (d);
-                 if (bound->is_non_musical (bound))
-                   x_points[d] -= d * padding;
-               }
-           }
-       }
+                  Item *bound = me->get_bound (d);
+                  if (bound->is_non_musical (bound))
+                    x_points[d] -= d * padding;
+                }
+            }
+        }
     }
   while (flip (&d) != LEFT);
 
@@ -184,7 +184,7 @@ Hairpin::print (SCM smob)
   if (width < 0)
     {
       me->warning (_ ((grow_dir < 0) ? "decrescendo too small"
-                     : "crescendo too small"));
+                      : "crescendo too small"));
       width = 0;
     }
 
@@ -216,14 +216,14 @@ Hairpin::print (SCM smob)
   if (circled_tip && !broken[tip_dir])
     {
       if (grow_dir > 0)
-       x = rad * 2.0;
+        x = rad * 2.0;
       else if (grow_dir < 0)
-       width -= rad *2.0;
+        width -= rad * 2.0;
     }
   mol = Line_interface::line (me, Offset (x, starth), Offset (width, endh));
   mol.add_stencil (Line_interface::line (me,
-                                        Offset (x, -starth),
-                                        Offset (width, -endh)));
+                                         Offset (x, -starth),
+                                         Offset (width, -endh)));
 
   /*
     Support al/del niente notation by putting a circle at the
@@ -235,31 +235,31 @@ Hairpin::print (SCM smob)
 
       /* Hmmm, perhaps we should have a Lookup::circle () method? */
       Stencil circle (extent,
-                     scm_list_4 (ly_symbol2scm ("circle"),
-                                 scm_from_double (rad),
-                                 scm_from_double (thick),
-                                 SCM_BOOL_F));
+                      scm_list_4 (ly_symbol2scm ("circle"),
+                                  scm_from_double (rad),
+                                  scm_from_double (thick),
+                                  SCM_BOOL_F));
 
       /*
-       don't add another circle if the hairpin is broken
+        don't add another circle if the hairpin is broken
       */
       if (!broken[tip_dir])
-       mol.add_at_edge (X_AXIS, tip_dir, Stencil (circle), 0);
+        mol.add_at_edge (X_AXIS, tip_dir, Stencil (circle), 0);
     }
 
   mol.translate_axis (x_points[LEFT]
-                     - bounds[LEFT]->relative_coordinate (common, X_AXIS),
-                     X_AXIS);
+                      - bounds[LEFT]->relative_coordinate (common, X_AXIS),
+                      X_AXIS);
   return mol.smobbed_copy ();
 }
 
 ADD_INTERFACE (Hairpin,
-              "A hairpin crescendo or decrescendo.",
+               "A hairpin crescendo or decrescendo.",
 
-              /* properties */
-              "adjacent-spanners "
-              "circled-tip "
-              "bound-padding "
-              "grow-direction "
-              "height "
-              );
+               /* properties */
+               "adjacent-spanners "
+               "circled-tip "
+               "bound-padding "
+               "grow-direction "
+               "height "
+              );
index b8cd0cb9da3a052992ed555e72eaa95a2305cbcd..fcf4b8671679e218d3dd760992fb55710c42243a 100644 (file)
@@ -25,7 +25,7 @@
 #include "translator.icc"
 
 /*
-  TODO: fold together with axis_group_engraver? 
+  TODO: fold together with axis_group_engraver?
  */
 
 class Hara_kiri_engraver : public Axis_group_engraver
@@ -41,7 +41,6 @@ public:
   TRANSLATOR_DECLARATIONS (Hara_kiri_engraver);
 };
 
-
 Hara_kiri_engraver::Hara_kiri_engraver ()
 {
   interesting_ = SCM_EOL;
@@ -80,28 +79,27 @@ Hara_kiri_engraver::acknowledge_grob (Grob_info i)
   if (staffline_)
     {
       for (SCM s = interesting_; scm_is_pair (s); s = scm_cdr (s))
-       {
-         if (i.grob ()->internal_has_interface (scm_car (s)))
-           Hara_kiri_group_spanner::add_interesting_item (staffline_, i.grob ());
-       }
+        {
+          if (i.grob ()->internal_has_interface (scm_car (s)))
+            Hara_kiri_group_spanner::add_interesting_item (staffline_, i.grob ());
+        }
     }
 }
 
-
 ADD_ACKNOWLEDGER (Hara_kiri_engraver, grob);
 ADD_TRANSLATOR (Hara_kiri_engraver,
-               /* doc */
-               "Like @code{Axis_group_engraver}, but make a hara-kiri"
-               " spanner, and add interesting items (i.e., note heads, lyric"
-               " syllables, and normal rests).",
+                /* doc */
+                "Like @code{Axis_group_engraver}, but make a hara-kiri"
+                " spanner, and add interesting items (i.e., note heads, lyric"
+                " syllables, and normal rests).",
 
-               /* create */
-               "VerticalAxisGroup ",
+                /* create */
+                "VerticalAxisGroup ",
 
-               /* read */
-               "keepAliveInterfaces ",
+                /* read */
+                "keepAliveInterfaces ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
 
index c32735aa8eb44f5b21a982722b0a0f251beb1065..751870ba051f30fe3294958f0c20a54c080223d9 100644 (file)
@@ -70,7 +70,7 @@ bool find_in_range (SCM vector, int low, int hi, int min, int max)
   if (val >= min && val <= max)
     return true;
   else if (val < min)
-    return find_in_range (vector, mid+1, hi, min, max);
+    return find_in_range (vector, mid + 1, hi, min, max);
   return find_in_range (vector, low, mid, min, max);
 }
 
@@ -103,7 +103,7 @@ Hara_kiri_group_spanner::request_suicide_alone (Grob *me, int start, int end)
     {
       int len = scm_c_vector_length (important);
       if (find_in_range (important, 0, len, start, end))
-       return false;
+        return false;
     }
   else /* build the important-columns-cache */
     {
@@ -111,17 +111,17 @@ Hara_kiri_group_spanner::request_suicide_alone (Grob *me, int start, int end)
       vector<int> ranks;
 
       for (vsize i = 0; i < worth.size (); i++)
-       {
-         Interval_t<int> iv = worth[i]->spanned_rank_interval ();
-         for (int j = iv[LEFT]; j <= iv[RIGHT]; j++)
-           ranks.push_back (j);
-       }
+        {
+          Interval_t<int> iv = worth[i]->spanned_rank_interval ();
+          for (int j = iv[LEFT]; j <= iv[RIGHT]; j++)
+            ranks.push_back (j);
+        }
       vector_sort (ranks, less<int> ());
       uniq (ranks);
 
       SCM scm_vec = scm_c_make_vector (ranks.size (), SCM_EOL);
       for (vsize i = 0; i < ranks.size (); i++)
-       scm_vector_set_x (scm_vec, scm_from_int (i), scm_from_int (ranks[i]));
+        scm_vector_set_x (scm_vec, scm_from_int (i), scm_from_int (ranks[i]));
       me->set_property ("important-column-ranks", scm_vec);
 
       return request_suicide (me, start, end);
@@ -133,13 +133,13 @@ Hara_kiri_group_spanner::request_suicide_alone (Grob *me, int start, int end)
 void
 Hara_kiri_group_spanner::consider_suicide (Grob *me)
 {
-  Spanner *sp = dynamic_cast<Spanner*> (me);
+  Spanner *sp = dynamic_cast<Spanner *> (me);
   int left = sp->get_bound (LEFT)->get_column ()->get_rank ();
   int right = sp->get_bound (RIGHT)->get_column ()->get_rank ();
   if (!request_suicide (me, left, right))
     return;
 
-  vector<Grob*> childs;
+  vector<Grob *> childs;
   Axis_group_interface::get_children (me, &childs);
   for (vsize i = 0; i < childs.size (); i++)
     childs[i]->suicide ();
@@ -179,16 +179,15 @@ Hara_kiri_group_spanner::add_interesting_item (Grob *me, Grob *n)
 }
 
 ADD_INTERFACE (Hara_kiri_group_spanner,
-              "A group spanner that keeps track of interesting items.  If it"
-              " doesn't contain any after line breaking, it removes itself"
-              " and all its children.",
-
-              /* properties */
-              "items-worth-living "
-              "important-column-ranks "
-              "keep-alive-with "
-              "remove-empty "
-              "remove-first "
-              );
-
+               "A group spanner that keeps track of interesting items.  If it"
+               " doesn't contain any after line breaking, it removes itself"
+               " and all its children.",
+
+               /* properties */
+               "items-worth-living "
+               "important-column-ranks "
+               "keep-alive-with "
+               "remove-empty "
+               "remove-first "
+              );
 
index 9d5c00503dca8ce6758e623076678a957bee8606..78bba9cf15bc7829122fdf6bafcdd6949ad3ab0a 100644 (file)
@@ -59,7 +59,7 @@ Horizontal_bracket_engraver::listen_note_grouping (Stream_event *ev)
     {
       pop_count_++;
       if (pop_count_ > bracket_stack_.size ())
-       ev->origin ()->warning (_ ("do not have that many brackets"));
+        ev->origin ()->warning (_ ("do not have that many brackets"));
     }
   else
     {
@@ -78,9 +78,9 @@ Horizontal_bracket_engraver::acknowledge_note_column (Grob_info gi)
     {
       Side_position_interface::add_support (bracket_stack_[i], gi.grob ());
       Pointer_group_interface::add_grob (bracket_stack_[i],
-                                        ly_symbol2scm ("columns"), gi.grob ());
+                                         ly_symbol2scm ("columns"), gi.grob ());
       add_bound_item (bracket_stack_[i],
-                     gi.grob ());
+                      gi.grob ());
     }
 }
 
@@ -92,8 +92,8 @@ Horizontal_bracket_engraver::process_music ()
       Spanner *sp = make_spanner ("HorizontalBracket", events_[k]->self_scm ());
 
       for (vsize i = 0; i < bracket_stack_.size (); i++)
-       /* sp is the smallest, it should be added to the bigger brackets.  */
-       Side_position_interface::add_support (bracket_stack_[i], sp);
+        /* sp is the smallest, it should be added to the bigger brackets.  */
+        Side_position_interface::add_support (bracket_stack_[i], sp);
       bracket_stack_.push_back (sp);
     }
 }
@@ -111,16 +111,16 @@ Horizontal_bracket_engraver::stop_translation_timestep ()
 
 ADD_ACKNOWLEDGER (Horizontal_bracket_engraver, note_column);
 ADD_TRANSLATOR (Horizontal_bracket_engraver,
-               /* doc */
-               "Create horizontal brackets over notes for musical analysis"
-               " purposes.",
+                /* doc */
+                "Create horizontal brackets over notes for musical analysis"
+                " purposes.",
 
-               /* create */
-               "HorizontalBracket ",
+                /* create */
+                "HorizontalBracket ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index f7a0337a3b8e468eb70b6e87cf2610afa0c1aa69..2ad243a1d9cf606fee07cfa9b5d739b859653aa9 100644 (file)
@@ -17,7 +17,7 @@
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include "horizontal-bracket.hh"       
+#include "horizontal-bracket.hh"
 
 #include "lookup.hh"
 #include "side-position-interface.hh"
 #include "spanner.hh"
 #include "item.hh"
 
-
 Stencil
 Horizontal_bracket::make_bracket (Grob *me,
-                                 Real length,
-                                 Axis a, Direction dir)                                 
+                                  Real length,
+                                  Axis a, Direction dir)
 {
   Drul_array<Real> edge_height = robust_scm2interval (me->get_property ("edge-height"),
-                                                     Interval (1.0, 1.0));
+                                                      Interval (1.0, 1.0));
   Drul_array<Real> flare = robust_scm2interval (me->get_property ("bracket-flare"),
-                                               Interval (0, 0));
+                                                Interval (0, 0));
   Drul_array<Real> shorten = robust_scm2interval (me->get_property ("shorten-pair"),
-                                                 Interval (0, 0));
+                                                  Interval (0, 0));
 
-  
   // Make sure that it points in the correct direction:
   scale_drul (&edge_height, Real (-dir));
+
   Interval empty;
   Offset start;
   start[a] = length;
 
-  Drul_array<bool> connect_to_other =
-    robust_scm2booldrul (me->get_property ("connect-to-neighbor"),
-                        Drul_array<bool> (false, false));
+  Drul_array<bool> connect_to_other
+    robust_scm2booldrul (me->get_property ("connect-to-neighbor"),
+                           Drul_array<bool> (false, false));
 
   Direction d = LEFT;
   do
     {
       if (connect_to_other[d])
-       {
-         edge_height[d] = 0.0;
-         flare[d] = 0.0;
-         shorten[d] = 0.0;
-       }
+        {
+          edge_height[d] = 0.0;
+          flare[d] = 0.0;
+          shorten[d] = 0.0;
+        }
     }
   while (flip (&d) != LEFT);
-             
+
   /*
-    ugh, Tuplet_bracket should use Horizontal_bracket, not the other way around. 
+    ugh, Tuplet_bracket should use Horizontal_bracket, not the other way around.
   */
-  return Tuplet_bracket::make_bracket (me, other_axis (a), start, 
-                                      edge_height, empty, flare, shorten);
+  return Tuplet_bracket::make_bracket (me, other_axis (a), start,
+                                       edge_height, empty, flare, shorten);
 }
 
-
 Stencil
 Horizontal_bracket::make_enclosing_bracket (Grob *me, Grob *refpoint,
-                                           vector<Grob*> grobs,
-                                           Axis a, Direction dir)
+                                            vector<Grob *> grobs,
+                                            Axis a, Direction dir)
 {
   Grob *common = common_refpoint_of_array (grobs, refpoint, a);
   Interval ext = Axis_group_interface::relative_group_extent (grobs, common, a);
@@ -109,7 +106,7 @@ Horizontal_bracket::print (SCM smob)
   Spanner *me = unsmob_spanner (smob);
   extract_grob_set (me, "columns", gs);
 
-  vector<Grob*> enclosed = gs;
+  vector<Grob *> enclosed = gs;
   if (!gs.size ())
     {
       me->suicide ();
@@ -121,22 +118,22 @@ Horizontal_bracket::print (SCM smob)
     {
       Item *b = me->get_bound (d);
       if (b->break_status_dir ())
-       enclosed.push_back (b);
+        enclosed.push_back (b);
     }
   while (flip (&d) != LEFT);
-  
+
   Stencil b = make_enclosing_bracket (me, me, enclosed, X_AXIS, get_grob_direction (me));
   return b.smobbed_copy ();
 }
 
 ADD_INTERFACE (Horizontal_bracket,
-              "A horizontal bracket encompassing notes.",
-
-              /* properties */           
-              "bracket-flare "
-              "columns "
-              "edge-height "
-              "shorten-pair "
-              "connect-to-neighbor "
-              );
+               "A horizontal bracket encompassing notes.",
+
+               /* properties */
+               "bracket-flare "
+               "columns "
+               "edge-height "
+               "shorten-pair "
+               "connect-to-neighbor "
+              );
 
index 55696e93159309020de7d28f640fabbafee2ff3d..6a55ec64cd873a3571ca3ed91de58256326cb721 100644 (file)
@@ -88,7 +88,7 @@ completize_hyphen (Spanner *sp)
     {
       extract_item_set (sp, "heads", heads);
       if (heads.size ())
-       sp->set_bound (RIGHT, heads.back ());
+        sp->set_bound (RIGHT, heads.back ());
     }
 }
 
@@ -100,10 +100,10 @@ Hyphen_engraver::finalize ()
       completize_hyphen (hyphen_);
 
       if (!hyphen_->get_bound (RIGHT))
-       {
-         hyphen_->warning (_ ("removing unterminated hyphen"));
-         hyphen_->suicide ();
-       }
+        {
+          hyphen_->warning (_ ("removing unterminated hyphen"));
+          hyphen_->suicide ();
+        }
 
       hyphen_ = 0;
     }
@@ -113,11 +113,11 @@ Hyphen_engraver::finalize ()
       completize_hyphen (finished_hyphen_);
 
       if (!finished_hyphen_->get_bound (RIGHT))
-       {
-         if (finished_ev_)
-           finished_hyphen_->warning (_ ("unterminated hyphen; removing"));
-         finished_hyphen_->suicide ();
-       }
+        {
+          if (finished_ev_)
+            finished_hyphen_->warning (_ ("unterminated hyphen; removing"));
+          finished_hyphen_->suicide ();
+        }
       finished_hyphen_ = 0;
     }
 }
@@ -158,16 +158,16 @@ Hyphen_engraver::stop_translation_timestep ()
 ADD_ACKNOWLEDGER (Hyphen_engraver, lyric_syllable);
 
 ADD_TRANSLATOR (Hyphen_engraver,
-               /* doc */
-               "Create lyric hyphens and distance constraints between words.",
+                /* doc */
+                "Create lyric hyphens and distance constraints between words.",
 
-               /* create */
-               "LyricHyphen "
-               "LyricSpace ",
+                /* create */
+                "LyricHyphen "
+                "LyricSpace ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index d0e9f6e4733007874064e0aba539363733062cca..a9b198f6bc4cb4e83e08868b983a8ef3b8410179 100644 (file)
@@ -37,9 +37,9 @@ print_box (SCM b, SCM port, scm_print_state *)
 /* This defines the primitve `make-box', which returns a new smob of
    type `box', initialized to `#f'.  */
 LY_DEFINE (ly_export, "ly:export",
-          1, 0, 0, (SCM arg),
-          "Export a Scheme object to the parser"
-          " so it is treated as an identifier.")
+           1, 0, 0, (SCM arg),
+           "Export a Scheme object to the parser"
+           " so it is treated as an identifier.")
 {
   SCM_RETURN_NEWSMOB (package_tag, arg);
 }
index 4c6766c7fd0369752b33bc9a8f7b1bc463ced7c4..6fb6e2054cb70a3cef64205fd5197c245531b68f 100644 (file)
@@ -37,14 +37,14 @@ using namespace std;
 #endif
 
 #ifndef YY_START
-#define YY_START                               \
+#define YY_START                                \
   ((yy_start - 1) / 2)
 #define YYSTATE YY_START
 #endif
 
 /* Flex >= 2.5.29 has include stack; but we don't use that yet.  */
 #if !HAVE_FLEXLEXER_YY_CURRENT_BUFFER
-#define yy_current_buffer                                              \
+#define yy_current_buffer                                               \
   (yy_buffer_stack != 0 ? yy_buffer_stack[yy_buffer_stack_top] : 0)
 #endif
 
@@ -71,7 +71,7 @@ Includable_lexer::new_input (string name, Sources *sources)
       string msg = _f ("cannot find file: `%s'", name);
       msg += "\n";
       msg += _f ("(search path: `%s')",
-                (current_dir.length () ? (current_dir + PATHSEP) : "") + sources->path_->to_string ().c_str ());
+                 (current_dir.length () ? (current_dir + PATHSEP) : "") + sources->path_->to_string ().c_str ());
       LexerError (msg.c_str ());
       return;
     }
@@ -85,7 +85,7 @@ Includable_lexer::new_input (string name, Sources *sources)
     {
       string spaces = "";
       for (size_t i = 0; i < state_stack_.size (); i++)
-       spaces += " ";
+        spaces += " ";
       progress_indication (string ("\n") + spaces + string ("[") + file->name_string ());
     }
 
@@ -113,7 +113,7 @@ Includable_lexer::new_input (string name, string data, Sources *sources)
     {
       string spaces = "";
       for (size_t i = 0; i < state_stack_.size (); i++)
-       spaces += " ";
+        spaces += " ";
       progress_indication (string ("\n") + spaces + string ("[") + name);
     }
   include_stack_.push_back (file);
index c3e6f5166729bd49295992bc6a74dfabe366400f..5b1dc796dd1ac2ec26b7b1829d3710cc39dbf0c5 100644 (file)
@@ -33,8 +33,8 @@ public:
   DECLARE_SCHEME_CALLBACK (height, (SCM));
   DECLARE_SCHEME_CALLBACK (width, (SCM));
   DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM));
-  
-  DECLARE_GROB_INTERFACE();
+
+  DECLARE_GROB_INTERFACE ();
   static string get_fontcharname (string style, int alteration);
   static vector<Box> accurate_boxes (Grob *me, Grob **common);
   static SCM get_stencil (Grob *me);
index 6f9696ef5e669fdfb94d46458b9e1f36f21ffe94..6a92ce478306049d15c9a45a00f7374864249acb 100644 (file)
@@ -29,13 +29,13 @@ public:
   DECLARE_SCHEME_CALLBACK (alignment_callback, (SCM element));
   static void add_accidental (Grob *, Grob *);
 
-  static vector<Grob*> get_relevant_accidentals (vector<Grob*> const &elts, Grob *left);
+  static vector<Grob *> get_relevant_accidentals (vector<Grob *> const &elts, Grob *left);
   static void split_accidentals (Grob *accs,
-                                vector<Grob*> *break_reminder,
-                                vector<Grob*> *real_acc);
+                                 vector<Grob *> *break_reminder,
+                                 vector<Grob *> *real_acc);
 
-  DECLARE_SCHEME_CALLBACK(calc_positioning_done, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM));
+  DECLARE_GROB_INTERFACE ();
 };
 #endif /* ACCIDENTAL_PLACEMENT_HH */
 
index 0cc63b2ad1bd72b1abd94eeb92dde5b8cafe7823..b7ef1d5f01e7ba6353fd128d29188842e1f3b705 100644 (file)
@@ -29,26 +29,26 @@ class Align_interface
 public:
   DECLARE_SCHEME_CALLBACK (align_to_minimum_distances, (SCM));
   DECLARE_SCHEME_CALLBACK (align_to_ideal_distances, (SCM));
-  static void align_elements_to_minimum_distances(Grob *, Axis a);
-  static void align_elements_to_ideal_distances(Grob *);
-  static vector<Real> get_minimum_translations (Grob *, vector<Grob*> const&, Axis a);
-  static vector<Real> get_minimum_translations_without_min_dist (Grob *, vector<Grob*> const&, Axis a);
-  static vector<Real> get_pure_minimum_translations (Grob *, vector<Grob*> const&,
-                                                    Axis a, int start, int end);
+  static void align_elements_to_minimum_distances (Grob *, Axis a);
+  static void align_elements_to_ideal_distances (Grob *);
+  static vector<Real> get_minimum_translations (Grob *, vector<Grob *> const &, Axis a);
+  static vector<Real> get_minimum_translations_without_min_dist (Grob *, vector<Grob *> const &, Axis a);
+  static vector<Real> get_pure_minimum_translations (Grob *, vector<Grob *> const &,
+                                                     Axis a, int start, int end);
   static void set_ordered (Grob *);
   static Axis axis (Grob *);
   static void add_element (Grob *, Grob *);
   static int get_count (Grob *, Grob *);
 
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 
   static Real get_pure_child_y_translation (Grob *, Grob *child, int start, int end);
 
 protected:
-  static vector<Real> internal_get_minimum_translations (Grob *, vector<Grob*> const&,
-                                                        Axis a,
-                                                        bool include_fixed_spacing,
-                                                        bool pure, int start, int end);
+  static vector<Real> internal_get_minimum_translations (Grob *, vector<Grob *> const &,
+                                                         Axis a,
+                                                         bool include_fixed_spacing,
+                                                         bool pure, int start, int end);
 };
 
 #endif /* ALIGN_INTERFACE_HH */
index d170e818a759f14b9b20a8e79e8b53341c3b8a27..cf0d24d6dee0488a2b895585144397286dbdd18d 100644 (file)
@@ -29,7 +29,6 @@
 #include <pango/pangoft2.h>
 #endif
 
-
 /*
    Interface to all fonts (both system fonts and fonts loaded
    via Pango).
@@ -46,19 +45,19 @@ class All_font_metrics
 #endif
 
   map<string, Index_to_charcode_map > filename_charcode_maps_map_;
-  
+
   All_font_metrics (All_font_metrics const &);
 public:
 
   Index_to_charcode_map const *get_index_to_charcode_map (string filename,
-                                                         int face_index,
-                                                         FT_Face face);
+                                                          int face_index,
+                                                          FT_Face face);
 
   All_font_metrics (string search_path);
   ~All_font_metrics ();
 
   Pango_font *find_pango_font (PangoFontDescription const *description,
-                              Real scale);
+                               Real scale);
 
   Font_metric *find_font (string name);
   Open_type_font *find_otf (string name);
index 094afe687b329c765ab2288a2e010b09be33cefc..f9096432c4c5b43c0a3d47c4c4935a5c7c76401a 100644 (file)
@@ -23,7 +23,6 @@
 #include "lily-proto.hh"
 #include "grob-interface.hh"
 
-
 class Arpeggio
 {
 public:
@@ -34,7 +33,7 @@ public:
   DECLARE_SCHEME_CALLBACK (brew_chord_slur, (SCM));
   DECLARE_SCHEME_CALLBACK (width, (SCM));
   DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* ARPEGGIO_HH */
index f30c3bfac7f010952e3d27e1d359e16256a77728..00a68e587ba5ce8c34373ac57222059039b0d180 100644 (file)
@@ -24,8 +24,8 @@
 #include "stream-event.hh"
 
 SCM articulation_list (vector<Stream_event *> notes,
-                      vector<Stream_event *> articulations,
-                      char const *articulation_name);
+                       vector<Stream_event *> articulations,
+                       char const *articulation_name);
 
 #endif /* ARTICULATIONS_HH */
 
index 4f51d8c00c5a4dd14059e6fdd58f955ea32b15e6..8a979f58cd37a15e0185dc8d7d815021fc138724 100644 (file)
@@ -37,9 +37,9 @@ public:
   void add_audio_item (Audio_item *i);
   Moment when () const;
 
-  vector<Audio_item*> audio_items_;
+  vector<Audio_item *> audio_items_;
   Moment when_;
-  int ticks () const ;
+  int ticks () const;
 protected:
   void offset_when (Moment m);
   friend class Score_performer;
index 9f58f4ea0d7fc5b4223bef29e0b76b5646e04463..9ffca6a00812aa77702c6b585a01794e3fca908a 100644 (file)
@@ -33,7 +33,7 @@ public:
   Stream_event *event_;
   Translator *origin_trans_;
 
-  vector<Context*> origin_contexts (Translator *) const;
+  vector<Context *> origin_contexts (Translator *) const;
 
   Audio_element_info (Audio_element *, Stream_event *);
   Audio_element_info ();
index fac2068773a4e40eb76a8b23ebbb5740881b8681..876de1f6a3034cf0e153a3d67592264e53833621 100644 (file)
@@ -28,7 +28,7 @@ public:
   Audio_element ();
   virtual ~Audio_element ();
 
-  DECLARE_CLASSNAME(Audio_element);
+  DECLARE_CLASSNAME (Audio_element);
   virtual char const *name () const;
 };
 
index da0abbce385a5ab090e1c73a666140898b447626..dc4bb6efbd3c1073426567205c4401cb9d540718 100644 (file)
@@ -34,7 +34,7 @@ public:
   Audio_column *get_column () const;
 
   virtual void render ();
-  
+
 private:
   Audio_item (Audio_item const &);
   Audio_item &operator = (Audio_item const &);
@@ -53,15 +53,13 @@ class Audio_span_dynamic : public Audio_element
 {
 public:
   Direction grow_dir_;
-  vector<Audio_dynamic*> dynamics_;
-
+  vector<Audio_dynamic *> dynamics_;
 
   virtual void render ();
-  void add_absolute (Audio_dynamic*);
+  void add_absolute (Audio_dynamic *);
   Audio_span_dynamic ();
 };
 
-
 class Audio_key : public Audio_item
 {
 public:
@@ -90,8 +88,8 @@ public:
   Pitch pitch_;
   Moment length_mom_;
   Pitch transposing_;
-  Audio_dynamicdynamic_;
-  
+  Audio_dynamic *dynamic_;
+
   Audio_note *tied_;
   bool tie_event_;
 };
@@ -107,10 +105,10 @@ class Audio_text : public Audio_item
 {
 public:
   enum Type
-    {
-      TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC,
-      MARKER, CUE_POINT
-    };
+  {
+    TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC,
+    MARKER, CUE_POINT
+  };
 
   Audio_text (Audio_text::Type type, string text_string);
 
index 665593edd67e090d91de486b0dd93bc1014a621f..fe570c3ad1eb8855595212547ea52031960c4317 100644 (file)
@@ -30,10 +30,10 @@ struct Audio_staff : public Audio_element
   void output (Midi_stream &midi_stream_r, int track, bool port);
 
   Audio_staff ();
-  
+
   bool percussion_;
   bool merge_unisons_;
-  vector<Audio_item*> audio_items_;
+  vector<Audio_item *> audio_items_;
 };
 
 #endif // AUDIO_STAFF_HH
index 2f63de076c22c5d33fbda5c775821246a1e1da01..b9719efefdabe76582b46e1b457160cb10e6bf70 100644 (file)
@@ -30,7 +30,7 @@ class Axis_group_engraver : public Engraver
 {
 protected:
   Spanner *staffline_;
-  vector<Grob*> elts_;
+  vector<Grob *> elts_;
   void process_music ();
   virtual void finalize ();
   DECLARE_ACKNOWLEDGER (grob);
@@ -38,7 +38,7 @@ protected:
   virtual Spanner *get_spanner ();
   virtual void add_element (Grob *);
   virtual bool must_be_last () const;
-  
+
 public:
   TRANSLATOR_DECLARATIONS (Axis_group_engraver);
 };
index 1537f1d35861f89d79318289612b9f814e57bee6..6eb52c4df2b909c99a8ba4eed2483bd8ca23dfe3 100644 (file)
@@ -44,8 +44,8 @@ struct Axis_group_interface
   DECLARE_SCHEME_CALLBACK (calc_pure_relevant_items, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_pure_relevant_spanners, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_pure_y_common, (SCM));
-  static Interval relative_group_extent (vector<Grob*> const &list,
-                                        Grob *common, Axis);
+  static Interval relative_group_extent (vector<Grob *> const &list,
+                                         Grob *common, Axis);
   static Interval relative_pure_height (Grob *me, int start, int end);
   static Interval combine_pure_heights (Grob *me, SCM, int, int);
   static Interval sum_partial_pure_heights (Grob *me, int, int);
@@ -54,16 +54,16 @@ struct Axis_group_interface
   static Interval part_of_line_pure_height (Grob *me, bool begin, int, int);
 
   static bool has_outside_staff_parent (Grob *me);
-  static Skyline_pair skyline_spacing (Grob *me, vector<Grob*> elements);
+  static Skyline_pair skyline_spacing (Grob *me, vector<Grob *> elements);
   static void add_element (Grob *me, Grob *);
   static void set_axes (Grob *, Axis, Axis);
   static bool has_axis (Grob *, Axis);
-  static void get_children (Grob *, vector<Grob*> *);
+  static void get_children (Grob *, vector<Grob *> *);
   static Interval staff_extent (Grob *me, Grob *ref, Axis, Grob *staff, Axis);
   static SCM calc_common (Grob *, Axis);
-  static Real minimum_distance (Grob*, Grob*, Axis);
-  static SCM calc_maybe_pure_staff_staff_spacing (Grob*, bool, int, int);
-  DECLARE_GROB_INTERFACE();
+  static Real minimum_distance (Grob *, Grob *, Axis);
+  static SCM calc_maybe_pure_staff_staff_spacing (Grob *, bool, int, int);
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* AXIS_GROUP_INTERFACE_HH */
index 442fe27770759131ac37c392b769dde4607537d3..fce15c3e8ac75d82341f99e5f932b73815899c4d 100644 (file)
 class Bar_line
 {
 public:
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 
   static Stencil dashed_bar_line (Grob *me, Interval const &extent, Real thick);
   static Stencil tick_bar_line (Grob *me, Real h, bool rounded);
   static Stencil compound_barline (Grob *, string, Interval const &extent,
-                                  bool rounded);
+                                   bool rounded);
   static Stencil simple_barline (Grob *, Real wid, Interval const &extent,
-                                bool rounded);
+                                 bool rounded);
   static Interval bar_y_extent (Grob *, Grob *);
   static bool non_empty_barline (Grob *me);
 
index 08664049e8b331393e0933e5b53f5dc74f1fb5be..1ba4fcb7cc5a76fb1bdfbb0a9015b9a3c3f0a65d 100644 (file)
 
 #include "beam.hh"
 #include "interval.hh"
-#include "lily-guile.hh" 
-#include "lily-proto.hh" 
+#include "lily-guile.hh"
+#include "lily-proto.hh"
 #include "main.hh"  //  DEBUG_BEAM_SCORING
-#include "std-vector.hh" 
-#include "stem-info.hh" 
+#include "std-vector.hh"
+#include "stem-info.hh"
 
-enum Scorers {
+enum Scorers
+{
   // Should be ordered by increasing expensiveness.
   ORIGINAL_DISTANCE,
   SLOPE_IDEAL,
@@ -55,22 +56,21 @@ struct Beam_configuration
   Beam_configuration ();
   bool done () const;
   void add (Real demerit, const string &reason);
-  static Beam_configuration* new_config(Interval start,
-                                        Interval offset);
+  static Beam_configuration *new_config (Interval start,
+                                         Interval offset);
 };
 
 // Comparator for a queue of Beam_configuration*.
 class Beam_configuration_less
 {
 public:
-  bool operator() (Beam_configuration* const& l, Beam_configuration* const& r)
+  bool operator () (Beam_configuration *const &l, Beam_configuration *const &r)
   {
     // Invert
     return l->demerits > r->demerits;
   }
 };
 
-
 struct Beam_quant_parameters
 {
   Real SECONDARY_BEAM_DEMERIT;
@@ -93,11 +93,12 @@ struct Beam_quant_parameters
   Real COLLISION_PADDING;
   Real HORIZONTAL_INTER_QUANT_PENALTY;
   Real STEM_COLLISION_FACTOR;
-  
+
   void fill (Grob *him);
 };
 
-struct Beam_collision {
+struct Beam_collision
+{
   Real x_;
   Interval y_;
   Real base_penalty_;
@@ -105,33 +106,32 @@ struct Beam_collision {
   // Need to add beam_config->y to get actual offsets.
   Interval beam_y_;
 };
-  
 
 /*
   Parameters for a single beam.  Precomputed to save time in
   scoring individual configurations.
 
   TODO - use trailing _ on data members.
+
   */
 class Beam_scoring_problem
 {
 public:
   Beam_scoring_problem (Grob *me, Drul_array<Real> ys);
-  Drul_array<Real> solve() const;
+  Drul_array<Real> solve () const;
 
 private:
   Grob *beam;
 
   Interval unquanted_y;
-  
+
   Real staff_space;
   Real beam_thickness;
   Real line_thickness;
   Real musical_dy;
 
   Interval x_span;
-  
+
   vector<Stem_info> stem_infos;
 
   /*
@@ -144,7 +144,7 @@ private:
   */
   vector<Real> base_lengths;
   vector<Real> stem_xpositions;
-  
+
   Grob *common[2];
   bool is_xstaff;
   bool is_knee;
@@ -163,15 +163,15 @@ private:
   Real beam_translation;
   vector<Beam_collision> collisions_;
   vector<Beam_segment> segments_;
-  
+
   void init_stems ();
-  void init_collisions (vector<Grob*> grobs);
+  void init_collisions (vector<Grob *> grobs);
   void add_collision (Real x, Interval y, Real factor);
-  
-  void one_scorer (Beam_configurationconfig) const;
+
+  void one_scorer (Beam_configuration *config) const;
   Beam_configuration *force_score (SCM inspect_quants,
-                                   const vector<Beam_configuration*> &configs) const;
-  Real y_at (Real x, Beam_configuration constc) const;
+                                   const vector<Beam_configuration *> &configs) const;
+  Real y_at (Real x, Beam_configuration const *c) const;
 
   // Scoring functions:
   void score_forbidden_quants (Beam_configuration *config) const;
@@ -179,8 +179,8 @@ private:
   void score_slope_ideal (Beam_configuration *config) const;
   void score_slope_direction (Beam_configuration *config) const;
   void score_slope_musical (Beam_configuration *config) const;
-  void score_stem_lengths (Beam_configurationconfig) const;
-  void generate_quants(vector<Beam_configuration*>* scores) const;
+  void score_stem_lengths (Beam_configuration *config) const;
+  void generate_quants (vector<Beam_configuration *>* scores) const;
   void score_collisions (Beam_configuration *config) const;
 };
 
index f541a216be2966b4732eedc1ed7ceb838fb4458e..d89c35d6b2c98241dc884374f8b6fc222943e838 100644 (file)
 struct Beam_segment
 {
   int vertical_count_;
-  Interval horizontal_; 
+  Interval horizontal_;
   Beam_segment ();
 };
 
-bool beam_segment_less (Beam_segment const& a, Beam_segment const& b);
+bool beam_segment_less (Beam_segment const &a, Beam_segment const &b);
 
-struct Beam_stem_segment 
+struct Beam_stem_segment
 {
   Beam_stem_segment ();
 
@@ -49,7 +49,6 @@ struct Beam_stem_segment
   int max_connect_;
 };
 
-
 bool operator <(Beam_stem_segment const &a, Beam_stem_segment const &b);
 
 class Beam
@@ -58,7 +57,7 @@ public:
   static int normal_stem_count (Grob *);
   static Grob *first_normal_stem (Grob *);
   static Grob *last_normal_stem (Grob *);
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static void add_stem (Grob *, Grob *);
   static bool is_cross_staff (Grob *);
   static bool is_knee (Grob *);
@@ -68,9 +67,9 @@ public:
   static Real get_beam_translation (Grob *me);
   static Real get_beam_thickness (Grob *me);
   static void connect_beams (Grob *me);
-  static vector<Beam_segment> get_beam_segments (Grob *me_grob, Grob **common); 
+  static vector<Beam_segment> get_beam_segments (Grob *me_grob, Grob **common);
   static Interval no_visible_stem_positions (Grob *me, Interval default_value);
-  
+
   DECLARE_SCHEME_CALLBACK (rest_collision_callback, (SCM element, SCM prev_off));
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_beaming, (SCM));
@@ -78,7 +77,7 @@ public:
   DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_positions, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_least_squares_positions, (SCM, SCM));
-  DECLARE_SCHEME_CALLBACK (calc_normal_stems, (SCM));  
+  DECLARE_SCHEME_CALLBACK (calc_normal_stems, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_concaveness, (SCM));
   DECLARE_SCHEME_CALLBACK (set_stem_lengths, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
@@ -87,22 +86,21 @@ public:
   DECLARE_SCHEME_CALLBACK (shift_region_to_valid, (SCM, SCM));
   DECLARE_SCHEME_CALLBACK (slope_damping, (SCM, SCM));
   DECLARE_SCHEME_CALLBACK (quanting, (SCM, SCM));
-  
+
   static int get_direction_beam_count (Grob *me, Direction d);
 
 private:
   friend class Beam_scoring_problem;
-  
+
   static Direction get_default_dir (Grob *);
   static void set_stem_directions (Grob *, Direction);
   static void consider_auto_knees (Grob *);
   static void set_stem_shorten (Grob *);
   static int forced_stem_count (Grob *);
   static Real calc_stem_y (Grob *, Grob *s, Grob **c,
-                          Real, Real, Direction,
-                          Drul_array<Real> pos, bool french);
+                           Real, Real, Direction,
+                           Drul_array<Real> pos, bool french);
 };
 
-
 #endif /* BEAM_HH */
 
index 6eed0606b30f462576684afae4e85df2a77349e4..58ec08443b6ed112476457b5cf9257f029aee128 100644 (file)
@@ -32,7 +32,7 @@ struct Beaming_options
   Moment measure_length_;
 
   Beaming_options ();
-  void from_context (Context*);
+  void from_context (Context *);
 };
 
 struct Beam_rhythmic_element
@@ -59,19 +59,19 @@ class Beaming_pattern
 public:
   Beaming_pattern ();
 
-  void beamify (Beaming_options const&);
+  void beamify (Beaming_options const &);
   void de_grace ();
   void add_stem (Moment d, int beams, bool invisible);
   int beamlet_count (int idx, Direction d) const;
   bool invisibility (int idx) const;
   Moment start_moment (int idx) const;
   Moment end_moment (int idx) const;
-  Beaming_pattern* split_pattern(int idx);
+  Beaming_pattern *split_pattern (int idx);
 
 private:
   vector<Beam_rhythmic_element> infos_;
-  Direction flag_direction (Beaming_options const&, vsize) const;
-  void find_rhythmic_importance (Beaming_options const&);
+  Direction flag_direction (Beaming_options const &, vsize) const;
+  void find_rhythmic_importance (Beaming_options const &);
   void unbeam_invisible_stems ();
 };
 
index bd66558a19a179d4eae5aa28958c4b062541d3f2..a144e4a7553447babe424fcd25b087ac1a553815 100644 (file)
@@ -43,7 +43,7 @@ public:
   vector<Real> solve_derivative (Offset) const;
   Interval extent (Axis) const;
   Interval control_point_extent (Axis) const;
-  
+
   Polynomial polynomial (Axis)const;
   Offset curve_point (Real t) const;
   Real curve_coordinate (Real t, Axis) const;
@@ -63,7 +63,7 @@ void rotate (vector<Offset> *array, Real phi);
 void translate (vector<Offset> *array, Offset o);
 
 Bezier slur_shape (Real width, Real height_limit,
-                  Real height_proportion);
+                   Real height_proportion);
 Real slur_height (Real width, Real height_limit, Real height_proportion);
 void get_slur_indent_height (Real *indent, Real *height, Real width, Real h_inf, Real r_0);
 
index fa74cd5654184df1ec7bf9a531b45c0d651c46dd..7431b22dfbb3e0c2920ab962188771b1fffb2d5b 100644 (file)
@@ -44,10 +44,10 @@ public:
   void add_score (SCM);
   void add_bookpart (SCM);
   Paper_book *process (Output_def *def_paper,
-                      Output_def *def_layout);
+                       Output_def *def_layout);
   Paper_book *process (Output_def *default_paper,
-                      Output_def *default_layout,
-                      Paper_book *parent_part);
+                       Output_def *default_layout,
+                       Paper_book *parent_part);
   void set_keys ();
 
 protected:
@@ -55,11 +55,11 @@ protected:
   void add_scores_to_bookpart ();
   bool error_found ();
   void process_score (SCM score,
-                     Paper_book *output_paper_book,
-                     Output_def *layout);
+                      Paper_book *output_paper_book,
+                      Output_def *layout);
   void process_bookparts (Paper_book *output_paper_book,
-                         Output_def *paper,
-                         Output_def *layout);
+                          Output_def *paper,
+                          Output_def *layout);
 };
 
 DECLARE_UNSMOB (Book, book);
index baa4ce0b7645791bd993f0a3b204d3f0a9c8f8e1..f08dea2ca294f92a0783a8931dc8d3554e731f42 100644 (file)
@@ -15,9 +15,9 @@ class Box
   DECLARE_SIMPLE_SMOBS (Box);
 public:
   Interval &x () {return interval_a_[X_AXIS]; }
-  Interval &y (){ return interval_a_[Y_AXIS]; }
-  Interval x () const{ return interval_a_[X_AXIS]; }
-  Interval y () const{return interval_a_[Y_AXIS]; }
+  Interval &y () { return interval_a_[Y_AXIS]; }
+  Interval x () const { return interval_a_[X_AXIS]; }
+  Interval y () const {return interval_a_[Y_AXIS]; }
   Interval operator [] (Axis a) const;
   Interval &operator [] (Axis a);
 
index c3c594ba967bc84475074dd264ad01a663abe8a4..e841d4b2527826243ab19ed22db83e8a82de6f0c 100644 (file)
@@ -26,8 +26,8 @@
 class Break_alignment_interface
 {
 public:
-  static vector<Grob*> ordered_elements (Grob *me);
-  DECLARE_GROB_INTERFACE();
+  static vector<Grob *> ordered_elements (Grob *me);
+  DECLARE_GROB_INTERFACE ();
   static void add_element (Grob *me, Grob *add);
   static SCM break_align_order (Item *me);
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM element));
@@ -39,13 +39,13 @@ struct Break_aligned_interface
   DECLARE_SCHEME_CALLBACK (calc_average_anchor, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_extent_aligned_anchor, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_break_visibility, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 struct Break_alignable_interface
 {
   DECLARE_SCHEME_CALLBACK (self_align_callback, (SCM element));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif // BREAK_ALIGN_INTERFACE_HH
index 948dd09d75b50512bd8d4640110ec32d01a39aef..f473dbcaacc76b353fdb94b3eb257332f3311224 100644 (file)
@@ -29,7 +29,7 @@ public:
   DECLARE_SCHEME_CALLBACK (finalis, (SCM));
   DECLARE_SCHEME_CALLBACK (offset_callback, (SCM element));
 
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif // BREATHING_SIGN_HH
index 99a3dde190a471d86b14e8465ff25eed6e9a8950..f6cf400bc14eba3c9a5c5f961f0d39843a01debf 100644 (file)
@@ -28,7 +28,7 @@ public:
   /* constructor is public */
   virtual void process (Moment);
   DECLARE_SCHEME_CALLBACK (constructor, ());
-  DECLARE_CLASSNAME(Change_iterator);
+  DECLARE_CLASSNAME (Change_iterator);
 
 private:
   void error (string);
index 91e659336150d758ef32e269afa8156cd3fa103e..9addbc4a1edd551bf8f56753f9105f1603655d06 100644 (file)
@@ -27,7 +27,7 @@ class Chord_name
 {
 public:
   DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif // CHORD_NAME_HH
index 9ab96ec5d48b1f1483ebd86b65b81c518f54f4e5..476c97285859c4e4d726cf8ce73999193d380623 100644 (file)
@@ -27,7 +27,7 @@ class Chord_tremolo_iterator : public Sequential_iterator
 public:
   DECLARE_SCHEME_CALLBACK (constructor, ());
   /* construction */
-  DECLARE_CLASSNAME(Chord_tremolo_iterator);
+  DECLARE_CLASSNAME (Chord_tremolo_iterator);
   Chord_tremolo_iterator ();
 protected:
   virtual SCM get_music_list () const;
index 50cd925f700cbaa1ff08f934f0ba681e2468bdd1..9d26780b7b94fdd343d9df0da44820c232476004 100644 (file)
@@ -27,7 +27,7 @@ struct Clef
 {
   DECLARE_SCHEME_CALLBACK (calc_glyph_name, (SCM));
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* CLEF_HH */
index 2c7bc1dac8264aba92f48693e16d4c413e9fd1ff..cb24182395a64f094de086d183ac212dc1825264 100644 (file)
@@ -28,7 +28,7 @@ class Cluster
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif // CLUSTER_HH
index c109a69ce99afbc0fab2364501c0e179b86c498b..cecbef47a590000d829163c9ac5cfd08ef87c8b7 100644 (file)
@@ -29,9 +29,9 @@ public:
 
 protected:
   virtual void build_ligature (Spanner *ligature,
-                              vector<Grob_info> primitives) = 0;
+                               vector<Grob_info> primitives) = 0;
   virtual void typeset_ligature (Spanner *ligature,
-                                vector<Grob_info> primitives);
+                                 vector<Grob_info> primitives);
   virtual void move_related_items_to_column (Item *, Paper_column *, Real);
 private:
   void collect_accidentals (Spanner *, vector<Grob_info>);
index 3b6410b646dff7a184b8eae2cf6fb1000078f21c..a3de552c2c17d435a1dc499dda32e75049cb1ed6 100644 (file)
@@ -25,8 +25,8 @@
 
 struct Column_x_positions
 {
-  vector<Grob*> cols_;
-  vector<Grob*> loose_cols_;
+  vector<Grob *> cols_;
+  vector<Grob *> loose_cols_;
 
   vector<Real> config_;
   Real force_;
index d0e631d901447f3f26cfd6cb5d5fb49dbba291b4..1887d872732396190d15f1b92aa9c055d0f693d0 100644 (file)
@@ -40,7 +40,8 @@ struct Line_shape
   Line_shape piggyback (Line_shape mount, Real padding) const;
 };
 
-struct Line_details {
+struct Line_details
+{
   Grob *last_column_;
   Real force_;
   Line_shape shape_;
@@ -48,14 +49,14 @@ struct Line_details {
                                    page, where each stencil represents
                                    a different footnote. */
   Interval refpoint_extent_; /* The refpoints of the first and last
-                               spaceable staff in this line.  min-distance
-                               should be measured from the bottom
-                               refpoint_extent of one line to the
-                               top refpoint_extent of the next. */
+                                spaceable staff in this line.  min-distance
+                                should be measured from the bottom
+                                refpoint_extent of one line to the
+                                top refpoint_extent of the next. */
   Real tallness_; /* Y-extent, adjusted according to begin/rest-of-line*/
 
   Real padding_;  /* compulsory space after this system (if we're not
-                    last on a page) */
+                     last on a page) */
   Real title_padding_;
   Real min_distance_;
   Real title_min_distance_;
@@ -187,7 +188,7 @@ private:
   vector<vsize> start_;         /* the columns at which we might be asked to start breaking */
   vector<vsize> starting_breakpoints_; /* the corresponding index in breaks_ */
 
-  vector<Grob*> all_;
+  vector<Grob *> all_;
   vector<vsize> breaks_;
 
   void initialize ();
index 6024c68e06ae30f58d2afba6db1f4c14f78f54d5..21ab4a7c207755a6192266110cf4ab6d4f9ea451 100644 (file)
@@ -27,7 +27,6 @@
 #include "virtual-methods.hh"
 #include <set>
 
-
 /*
   The definition of a interpretation context as given in the
   input. The lists are stored in order of definition.
@@ -58,15 +57,15 @@ public:
   SCM get_translator_group_type () const { return translator_group_type_; }
   void set_acceptor (SCM accepts, bool add);
 
-  VIRTUAL_COPY_CONSTRUCTOR(Context_def, Context_def);
+  VIRTUAL_COPY_CONSTRUCTOR (Context_def, Context_def);
 
-  vector<Context_def*> path_to_acceptable_context (SCM type_string,
-                                                  Output_def *,
-                                                  SCM) const;
-  vector<Context_def*> internal_path_to_acceptable_context (SCM type_string,
-                                                           Output_def *,
-                                                           SCM,
-                                                           set<const Context_def *> *seen) const;
+  vector<Context_def *> path_to_acceptable_context (SCM type_string,
+                                                    Output_def *,
+                                                    SCM) const;
+  vector<Context_def *> internal_path_to_acceptable_context (SCM type_string,
+                                                             Output_def *,
+                                                             SCM,
+                                                             set<const Context_def *> *seen) const;
   Context *instantiate (SCM extra_ops);
 
   SCM to_alist () const;
index c9980eb46c86d476d71b84df485e860f1f26f59a..aa5850afc883a6cb50f85ae91b98def5c6b1ad38 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "lily-proto.hh"
 
-
 class Context_handle
 {
 public:
index 3bcb9872634afea74fe0dbba4af589480060a1e3..36c8885bbcf5cb5dc267e18565f676b5eed66674 100644 (file)
@@ -30,7 +30,6 @@
 #include "smobs.hh"
 #include "virtual-methods.hh"
 
-
 /*
   Modifications for an interpretation context as given in the
   input.
index 4121f84c7836de7ac9aab17cb91286c9f62bafc7..9cf21cbce46a9f67f2f6069f54f3c35deedb8885 100644 (file)
@@ -34,13 +34,13 @@ class Context
   Context (Context const &src);
 
   DECLARE_SMOBS (Context);
-  DECLARE_CLASSNAME(Context);
+  DECLARE_CLASSNAME (Context);
   void terminate ();
 
 private:
   friend class Context_handle;
   int iterator_count_;
-  
+
   /* Used internally by create_context */
   Stream_event *infant_event_;
 
@@ -50,14 +50,14 @@ protected:
   SCM definition_;
   /* Additions to the Context_def, given by \with */
   SCM definition_mods_;
-  
+
   SCM properties_scm_;
   SCM context_list_;
   SCM accepts_list_;
   SCM aliases_;
   Translator_group *implementation_;
   string id_string_;
-  
+
   /* Events reported in the context is sent to this dispatcher. */
   Dispatcher *event_source_;
 
@@ -74,7 +74,7 @@ protected:
 
   DECLARE_LISTENER (set_property_from_event);
   DECLARE_LISTENER (unset_property_from_event);
-  
+
 public:
   string id_string () const { return id_string_; }
   SCM children_contexts () const { return context_list_; }
@@ -97,7 +97,7 @@ public:
   Context *where_defined (SCM name_sym, SCM *value) const;
   void unset_property (SCM var_sym);
 
-  void instrumented_set_property (SCM, SCM, const char*, int, const char*);
+  void instrumented_set_property (SCM, SCM, const char *, int, const char *);
   void internal_set_property (SCM var_sym, SCM value);
 
   Context *create_context (Context_def *, string, SCM);
@@ -123,10 +123,10 @@ public:
   bool is_removable () const;
 
   Context *find_create_context (SCM context_name,
-                               string id, SCM ops);
+                                string id, SCM ops);
   Context *create_unique_context (SCM context_name, string context_id,
-                                 SCM ops);
-  vector<Context_def*> path_to_acceptable_context (SCM alias) const;
+                                  SCM ops);
+  vector<Context_def *> path_to_acceptable_context (SCM alias) const;
 };
 
 /*
@@ -135,14 +135,14 @@ public:
 
 void apply_property_operations (Context *tg, SCM pre_init_ops);
 void execute_revert_property (Context *context,
-                             SCM context_property,
-                             SCM grob_property_path);
+                              SCM context_property,
+                              SCM grob_property_path);
 void execute_pushpop_property (Context *trg, SCM prop, SCM eltprop, SCM val);
 void sloppy_general_pushpop_property (Context *context,
-                                      SCM context_property, SCM grob_property_path, SCM val);
+                                      SCM context_property, SCM grob_property_path, SCM val);
 SCM updated_grob_properties (Context *tg, SCM sym);
 Context *find_context_below (Context *where,
-                            SCM type_sym, string id);
+                             SCM type_sym, string id);
 bool melisma_busy (Context *);
 
 Context *get_voice_to_lyrics (Context *lyrics);
@@ -160,10 +160,10 @@ bool check_repeat_count_visibility (Context const *context, SCM count);
 void set_context_property_on_children (Context *trans, SCM sym, SCM val);
 
 /* Shorthand for creating and broadcasting stream events. */
-#define send_stream_event(ctx, type, origin, ...)                              \
-{                                                                      \
-  SCM props[] = { __VA_ARGS__, 0 };                                    \
-  ctx->internal_send_stream_event (ly_symbol2scm (type), origin, props);       \
+#define send_stream_event(ctx, type, origin, ...)                               \
+{                                                                       \
+  SCM props[] = { __VA_ARGS__, 0 };                                     \
+  ctx->internal_send_stream_event (ly_symbol2scm (type), origin, props);        \
 }
 
 SCM nested_property_alist (SCM alist, SCM prop_path, SCM value);
index 9638a516570ae955ef5e8cdb121786ecb16cbe99..907d71183cbc78822920918d5285df3cd1abb948 100644 (file)
@@ -26,7 +26,7 @@
 struct Custos
 {
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 
 private:
   static void add_streepjes (Grob *me, int pos, int interspaces, Stencil *custos_);
index 84ea317d5368ce6afb4a02759ac5229c5712989d..320d1fdca2fdcd13b2c37619f8010e932df02379 100644 (file)
@@ -32,9 +32,9 @@ class Dimension_cache
   Grob *parent_;
   void init ();
   void clear ();
-  
+
   friend class Grob;
-  
+
   Dimension_cache (Dimension_cache const &);
   ~Dimension_cache ();
   Dimension_cache ();
index 5337c85d6eaa5f3bdd303d83afea60bf6d078eaf..f047703f80c905be91b7906365c0bf6994cd077c 100644 (file)
@@ -23,7 +23,6 @@
 #include "lily-proto.hh"
 #include "grob-interface.hh"
 
-
 class Grob;
 
 /**
@@ -35,7 +34,7 @@ public:
   static int compare (Grob *const &, Grob *const &);
   static void add_head (Grob *dotcol, Grob *rh);
 
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (side_position, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM));
 };
index b6b39dd41d3870268c2e85ac72d54a2ac6bb67bd..82fea8b5ba1072c37a5d40ab3cfd64de89f12f43 100644 (file)
@@ -34,7 +34,7 @@ struct Dot_position
   Box dot_extents_;
   bool extremal_head_;
   Interval x_extent_;
-  
+
   Dot_position ()
   {
     dot_ = 0;
@@ -47,7 +47,7 @@ struct Dot_position
 struct Dot_configuration : public map<int, Dot_position>
 {
   Dot_formatting_problem const *problem_;
-  
+
   Dot_configuration (Dot_formatting_problem const &);
   Real x_offset () const;
   int badness () const;
index da248545bb035137629a7611a5df0567f8b5ceaf..fcb6d19a223d69b567d531c5a30126b669c5a38f 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef DOT_FORMATTING_PROBLEM_HH
 #define DOT_FORMATTING_PROBLEM_HH
 
-
 #include "skyline.hh"
 #include "std-vector.hh"
 
@@ -16,7 +15,7 @@ struct Dot_formatting_problem
   void register_configuration (Dot_configuration const &);
   Dot_configuration *best () const;
   Dot_formatting_problem (vector<Box> const &boxes, Interval base_x);
-  ~Dot_formatting_problem();
+  ~Dot_formatting_problem ();
 };
 
 #endif
index 366e4f13e29707cad90372aaa3baaa570c58382f..2fbec514dd69134b93f0d08c8051d5fb1a3048af 100644 (file)
@@ -27,7 +27,7 @@ class Dots
 {
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif // DOTS_HH
index 9bb3aba0c319f0f99fee7c7ce263c201ccca21fd..190e9c3f32054f37422f8655cc36d611b03b7eb9 100644 (file)
@@ -50,4 +50,3 @@ void engraver_each (SCM list, Engraver_method method);
 
 #endif /* ENGRAVERGROUP_HH */
 
-
index 162724b808cb4980f9a6ae0ba87b64d8f3e47090..56c0f500267f3f391c77b4dba39ed47aa789fb51 100644 (file)
@@ -30,7 +30,7 @@
 class Engraver : public Translator
 {
   Grob *internal_make_grob (SCM sym, SCM cause, char const *name,
-                           char const *f, int l, char const *fun);
+                            char const *f, int l, char const *fun);
   friend SCM ly_engraver_make_grob (SCM, SCM, SCM);
   friend class Engraver_group;
 protected:
@@ -55,11 +55,11 @@ public:
   Grob_info make_grob_info (Grob *, SCM cause);
 
   Item *internal_make_item (SCM sym, SCM cause, char const *name,
-                           char const *f, int l, char const *fun);
+                            char const *f, int l, char const *fun);
   Spanner *internal_make_spanner (SCM sym, SCM cause, char const *name,
-                                 char const *f, int l, char const *fun);
+                                  char const *f, int l, char const *fun);
   Paper_column *internal_make_column (SCM sym, char const *name,
-                                     char const *f, int l, char const *fun);
+                                      char const *f, int l, char const *fun);
 
   /**
      override other ctor
@@ -71,7 +71,7 @@ public:
 #define make_spanner(x, cause) internal_make_spanner (ly_symbol2scm (x), cause, x, __FILE__, __LINE__, __FUNCTION__)
 #define make_paper_column(x) internal_make_column (ly_symbol2scm (x), x, __FILE__, __LINE__, __FUNCTION__)
 
-Engraverunsmob_engraver (SCM eng);
+Engraver *unsmob_engraver (SCM eng);
 bool ly_is_grob_cause (SCM obj);
 
 #endif // ENGRAVER_HH
index 7c902f863d438d5569bad21d004174196c0d2438..c35e23d9f1b63f78e1173f11629537f9d148c72e 100644 (file)
@@ -30,7 +30,7 @@ class Event_chord_iterator : public Simple_music_iterator
   /**
      Find a bottom notation context to deliver events to.
   */
-  DECLARE_CLASSNAME(Event_chord_iterator);
+  DECLARE_CLASSNAME (Event_chord_iterator);
 
 public:
   DECLARE_SCHEME_CALLBACK (constructor, ());
index adabf9d704f03007ba44673ea76bbfc171974721..e88f4aa75a48c65248c0133aeacb3ace65f0b46f 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2006--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
-          Erik Sandberg <mandolaerik@gmail.com>
+           Erik Sandberg <mandolaerik@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
@@ -25,7 +25,7 @@
 
 class Event_iterator : public Simple_music_iterator
 {
-  DECLARE_CLASSNAME(Event_iterator);
+  DECLARE_CLASSNAME (Event_iterator);
 
 public:
   DECLARE_SCHEME_CALLBACK (constructor, ());
index 5e9fb5ecee953c3e8e59bcf8bbdfe92f281ab879..e37aa6b743c708e70a0a4ef2d86d4674f97a1201 100644 (file)
@@ -28,7 +28,7 @@ struct Font_interface
   static SCM text_font_alist_chain (Grob *);
   static SCM music_font_alist_chain (Grob *);
   static Font_metric *get_default_font (Grob *);
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* FONT_INTERFACE_HH */
index 8c287da18b50026137fc9932a808bc47ff191d98..4d9ddbbe996a27cf067325c00841828cac465811 100644 (file)
@@ -32,7 +32,7 @@ typedef std::map<FT_UInt, FT_ULong> Index_to_charcode_map;
 
 class Font_metric
 {
-  DECLARE_CLASSNAME(Font_metric);
+  DECLARE_CLASSNAME (Font_metric);
 
 public:
   SCM description_;
index c814b61c07dec07cb67f921cb730978f24251690..c5013129a9983864e221a17933230c853b89af87 100644 (file)
@@ -28,7 +28,7 @@ class Global_context : public virtual Context
   PQueue<Moment> extra_mom_pq_;
   Output_def *output_def_;
 
-  DECLARE_CLASSNAME(Global_context);
+  DECLARE_CLASSNAME (Global_context);
 
   friend class Output_def;
 public:
index 4e4b3b3da2ab55534636b14782ffd1e8258a93d2..7a7fe101af0e4a4997debba9e212388f4a34fcfb 100644 (file)
 #ifndef GLOBAL_CTOR_HH
 #define GLOBAL_CTOR_HH
 
-#define ADD_GLOBAL_CTOR_WITHNAME(y, x)         \
-  class Global_ctor_ ## y                      \
-  {                                            \
-  public:                                      \
-    Global_ctor_ ## y ()                       \
-      {                                                \
-       add_constructor (x);                    \
-      }                                                \
-  }                                            \
+#define ADD_GLOBAL_CTOR_WITHNAME(y, x)          \
+  class Global_ctor_ ## y                       \
+  {                                             \
+  public:                                       \
+    Global_ctor_ ## y ()                        \
+      {                                         \
+        add_constructor (x);                    \
+      }                                         \
+  }                                             \
     _ ## y ## _ctor_init;
 
 #define ADD_GLOBAL_CTOR(x) ADD_GLOBAL_CTOR_WITHNAME (x, x);
index 2efb1754e32ba13c18b0edd194cb948ca97a18a7..e1b7d2b7e4d5df56f4280db75ef8bacc506999b3 100644 (file)
@@ -27,7 +27,7 @@ class Grace_iterator : public Music_wrapper_iterator
 public:
   virtual void process (Moment);
   DECLARE_SCHEME_CALLBACK (constructor, ());
-  DECLARE_CLASSNAME(Grace_iterator);
+  DECLARE_CLASSNAME (Grace_iterator);
   Moment pending_moment () const;
 };
 
index 790de04a8c221be14253b13134e5afba144684cc..36dc551fcd95a658e5ad17da5aaab25bcd7fe43b 100644 (file)
@@ -35,7 +35,7 @@ protected:
   virtual void listen_pes_or_flexa (Stream_event *ev);
   virtual void build_ligature (Spanner *ligature, vector<Grob_info> primitives);
   virtual void transform_heads (Spanner *ligature,
-                               vector<Grob_info> primitives) = 0;
+                                vector<Grob_info> primitives) = 0;
   void stop_translation_timestep ();
 };
 
index cfe81bcf942c0e4031dcafe161f10ce296488e86..b8a24507a8b84f73d9b23560eeb9b2226dcc5856 100644 (file)
@@ -24,11 +24,10 @@ class Grob;
 #include "std-string.hh"
 #include "grob-interface.hh"
 
-
 class Gregorian_ligature
 {
 public:
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static string prefixes_to_str (Grob *);
 };
 
index 9adfea1480744b82a5975ed73399ca25ccc24a3a..5aac0c00b6f08d4247b8f87a701b4c1fa090bed2 100644 (file)
 #include "lily-proto.hh"
 #include "grob-interface.hh"
 
-
 class Grid_line_interface
 {
 public:
   static void add_grid_point (Grob *me, Grob *b);
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (width, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 class Grid_point_interface
 {
 public:
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* GRID_LINE_INTERFACE_HH */
index f33bc82f71f098e996ac340f723090240db3ef81..1ef883110c9757a63452b1e1a12a9ce9b37c6fb5 100644 (file)
@@ -26,7 +26,7 @@
 
 class Grob_array
 {
-  vector<Grob*> grobs_;
+  vector<Grob *> grobs_;
   bool ordered_;
 
   DECLARE_SIMPLE_SMOBS (Grob_array);
@@ -43,15 +43,15 @@ public:
   void remove_duplicates ();
   void clear ();
   void add (Grob *x) { grobs_.push_back (x); }
-  void set_array (vector<Grob*> const &src);
-  vector<Grob*> &array_reference ();
-  vector<Grob*> const &array () const;
+  void set_array (vector<Grob *> const &src);
+  vector<Grob *> &array_reference ();
+  vector<Grob *> const &array () const;
   static SCM make_array ();
 };
 
 DECLARE_UNSMOB (Grob_array, grob_array);
 
-vector<Grob*> const &ly_scm2link_array (SCM x);
+vector<Grob *> const &ly_scm2link_array (SCM x);
 SCM grob_list_to_grob_array (SCM lst);
 SCM grob_array_to_list (Grob_array *array);
 
index 56a49170a4bd1d52cfe2bcecbc1140730b87ef0a..fa0e11559f7d52619b125fbf91918efd4178ef41 100644 (file)
@@ -33,7 +33,6 @@ class Grob_info
   Grob *grob_;
   Direction start_end_;
 
-  
   friend class Engraver;
 public:
   Direction start_end () const { return start_end_; }
@@ -43,7 +42,7 @@ public:
   Context *context () const;
   Stream_event *event_cause () const;
   Stream_event *ultimate_event_cause () const;
-  vector<Context*> origin_contexts (Translator *) const;
+  vector<Context *> origin_contexts (Translator *) const;
   Grob_info (Translator *, Grob *);
   Grob_info ();
 
index 2c476bbb94b1574c807c478f713611958c833e2b..210226094503bf70fa2386e73540ff9d56496f61 100644 (file)
 #include "lily-guile.hh"
 
 #define DECLARE_GROB_INTERFACE() \
-  static SCM interface_symbol_;           \
+  static SCM interface_symbol_;    \
   static bool has_interface (Grob*)
 
-#define ADD_INTERFACE(cl, b, c)                                \
+#define ADD_INTERFACE(cl, b, c)                         \
   SCM cl::interface_symbol_; \
-  bool cl::has_interface (Grob *me)                            \
-  {                                                            \
-    return me->internal_has_interface (interface_symbol_);     \
-  }                                                            \
-  void cl ## _init_ifaces ()                                   \
-  {                                                            \
-    cl::interface_symbol_ = add_interface (#cl, b, c);         \
-  }                                                            \
+  bool cl::has_interface (Grob *me)                             \
+  {                                                             \
+    return me->internal_has_interface (interface_symbol_);      \
+  }                                                             \
+  void cl ## _init_ifaces ()                                    \
+  {                                                             \
+    cl::interface_symbol_ = add_interface (#cl, b, c);          \
+  }                                                             \
   ADD_SCM_INIT_FUNC (cl ## ifaces, cl ## _init_ifaces);
 
 SCM add_interface (char const *cxx_name,
-                   char const *descr,
-                   char const *vars);
+                   char const *descr,
+                   char const *vars);
 
 SCM ly_add_interface (SCM, SCM, SCM);
 void internal_add_interface (SCM, SCM, SCM);
index eda94b6d5888b1778897658c683c7c20c5c57944..5ca85402e0468d8cb21aee93488e206f835d2f03 100644 (file)
@@ -29,8 +29,8 @@ class Grob
 {
 private:
   DECLARE_SMOBS (Grob);
-  DECLARE_CLASSNAME(Grob);
-  
+  DECLARE_CLASSNAME (Grob);
+
   void init ();
 
 protected:
@@ -43,13 +43,13 @@ protected:
   SCM immutable_property_alist_;
   SCM mutable_property_alist_;
   SCM object_alist_;
-  
+
   /*
     If this is a property, it accounts for 25% of the property
     lookups.
   */
   SCM interfaces_;
-  
+
   void substitute_object_links (SCM, SCM);
   Real get_offset (Axis a) const;
   SCM try_callback (SCM, SCM);
@@ -57,7 +57,7 @@ protected:
   void internal_set_value_on_alist (SCM *alist, SCM sym, SCM val);
 
 public:
-  
+
   /* friends */
   friend class Spanner;
   friend class System;
@@ -75,7 +75,7 @@ public:
   Grob *original () const { return original_; }
   SCM interfaces () const { return interfaces_; }
 
-  /* life & death */ 
+  /* life & death */
   Grob (SCM basic_props);
   Grob (Grob const &);
   virtual Grob *clone () const;
@@ -97,14 +97,13 @@ public:
   SCM internal_get_object (SCM symbol) const;
   void internal_set_object (SCM sym, SCM val);
   void internal_del_property (SCM symbol);
-  void instrumented_set_property (SCM, SCM, char const*, int, char const*);
+  void instrumented_set_property (SCM, SCM, char const *, int, char const *);
   void internal_set_property (SCM sym, SCM val);
 
-  /* messages */  
+  /* messages */
   void warning (string) const;
   void programming_error (string) const;
 
-
   /* class hierarchy */
   virtual System *get_system () const;
   static System *get_system (Grob *);
@@ -121,7 +120,7 @@ public:
 
   /* interfaces */
   bool internal_has_interface (SCM intf);
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 
   /* offsets */
   void translate_axis (Real, Axis);
@@ -154,10 +153,10 @@ Item *unsmob_item (SCM);
 
 /* refpoints */
 Grob *common_refpoint_of_list (SCM elt_list, Grob *, Axis a);
-Grob *common_refpoint_of_array (vector<Grob*> const &, Grob *, Axis a);
+Grob *common_refpoint_of_array (vector<Grob *> const &, Grob *, Axis a);
 System *get_root_system (Grob *me);
 
-/* extents */ 
+/* extents */
 Interval robust_relative_extent (Grob *, Grob *, Axis);
 
 /* offset/extent callbacks. */
index 9e636f6e8cc7a0a1c22a00a25b45f30d84091511..c6cfb7dcd4bf9975a4a08bdb45b40b01119607be 100644 (file)
@@ -28,7 +28,7 @@ struct Hairpin
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif // HAIRPIN_HH
index 294415577be00388689ec9d828fc6651b93c9aea..67aa1878384323105fedc8e522fb99b30ef4cc61 100644 (file)
@@ -32,7 +32,7 @@ public:
   DECLARE_SCHEME_CALLBACK (pure_height, (SCM smob, SCM start, SCM end));
   DECLARE_SCHEME_CALLBACK (force_hara_kiri_in_y_parent_callback, (SCM));
   DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static bool request_suicide (Grob *me, int start, int end);
   static bool request_suicide_alone (Grob *me, int start, int end);
   static void consider_suicide (Grob *me);
index 3d140ae839c5d07a5c82a074080695c5a2372129..f7081d50df948dda0d4f2d619a901b75965194ed 100644 (file)
@@ -29,9 +29,9 @@ struct Horizontal_bracket
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   static Stencil make_bracket (Grob *, Real, Axis, Direction);
   static Stencil make_enclosing_bracket (Grob *me, Grob *refpoint,
-                                        vector<Grob*> grobs,
-                                        Axis a, Direction dir);
-  DECLARE_GROB_INTERFACE();
+                                         vector<Grob *> grobs,
+                                         Axis a, Direction dir);
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* HORIZONTAL_BRACKET_HH */
index a7ca04ca24cffff02a12349047444a6dccc447c9..3c0fe8b9fa75c437aa7b0c7e62ac2dbbcabb6482 100644 (file)
@@ -40,7 +40,7 @@ class Includable_lexer : public yyFlexLexer
 
 protected:
   bool close_input ();
-  vector<Source_file*> include_stack_;
+  vector<Source_file *> include_stack_;
   vector<int> char_count_stack_;
   vector<string> pending_string_includes_;
 
@@ -55,10 +55,10 @@ public:
 
   Source_file *get_source_file () const;
   virtual void new_input (string s, Sources *);
-  
+
   void new_input (string name, string data, Sources *);
   void add_string_include (string data);
-  
+
   char const *here_str0 () const;
 };
 
index b8dc7384ca6d92a1b219dc94382aeb6caad44387..af9dcff3e6b56280ba1c300a4dc80914c4ceb8c1 100644 (file)
@@ -62,7 +62,6 @@ public:
   Input ();
 };
 
-
 #include "smobs.hh"
 
 SCM make_input (Input spot);
index d3478245dd8a0c5fcb62519ac969096218c4ed5c..3fa1fcddc2324502317e95e313915af755e8b2a7 100644 (file)
@@ -31,7 +31,7 @@ class Item : public Grob
 {
   Drul_array<Item *> broken_to_drul_;
 
-  DECLARE_CLASSNAME(Item);
+  DECLARE_CLASSNAME (Item);
 public:
   Item (SCM);
   Item (Item const &);
@@ -39,7 +39,7 @@ public:
   virtual Grob *clone () const;
 
   static bool is_non_musical (Grob *);
-  static bool break_visible(Grob *);
+  static bool break_visible (Grob *);
   bool is_broken () const;
   virtual bool pure_is_visible (int start, int end) const;
 
@@ -52,7 +52,7 @@ public:
   virtual void handle_prebroken_dependencies ();
   virtual Interval_t<int> spanned_rank_interval () const;
   virtual Interval pure_height (Grob *ref, int start, int end);
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 protected:
   virtual void discretionary_processing ();
   void copy_breakable_items ();
index 4a2da856c214c1423085320183bae19ce97bf07a..c777196a9d5efcc589891979802cfda17818c8bf 100644 (file)
@@ -36,7 +36,7 @@ protected:
   void process_music ();
   virtual Spanner *create_ligature_spanner () = 0;
   virtual void typeset_ligature (Spanner *ligature,
-                                vector<Grob_info> primitives) = 0;
+                                 vector<Grob_info> primitives) = 0;
   virtual Spanner *current_ligature ();
   SCM brew_ligature_primitive_proc;
 
index ba2c9552481bd744557cc1ac1f2f98db13795061..94849fb4f7021209313119406898266e83d62071 100644 (file)
@@ -51,7 +51,8 @@ inline SCM
 scm_or_str2symbol (char const *c) { return scm_from_locale_symbol (c); }
 
 inline SCM
-scm_or_str2symbol (SCM s) {
+scm_or_str2symbol (SCM s)
+{
   assert (scm_is_symbol (s));
   return s;
 }
@@ -61,19 +62,19 @@ scm_or_str2symbol (SCM s) {
    variable per ly_symbol2scm() use, and one boolean evaluation for
    every call.
  */
-#define ly_symbol2scm(x)                                               \
-  ({                                                                   \
-    static SCM cached;                                                 \
-    /* We store this one locally, since G++ -O2 fucks up else */       \
-    SCM value = cached;                                                        \
-    if (__builtin_constant_p ((x)))                                    \
-      {                                                                        \
-       if (!cached)                                                    \
-         value = cached = scm_gc_protect_object (scm_or_str2symbol (x)); \
-      }                                                                        \
-    else                                                               \
-      value = scm_or_str2symbol (x);                                   \
-    value;                                                             \
+#define ly_symbol2scm(x)                                                \
+  ({                                                                    \
+    static SCM cached;                                                  \
+    /* We store this one locally, since G++ -O2 fucks up else */        \
+    SCM value = cached;                                                 \
+    if (__builtin_constant_p ((x)))                                     \
+      {                                                                 \
+        if (!cached)                                                    \
+          value = cached = scm_gc_protect_object (scm_or_str2symbol (x)); \
+      }                                                                 \
+    else                                                                \
+      value = scm_or_str2symbol (x);                                    \
+    value;                                                              \
   })
 #else
 inline SCM ly_symbol2scm (char const *x) { return scm_from_locale_symbol ((x)); }
@@ -86,45 +87,45 @@ inline SCM ly_symbol2scm (char const *x) { return scm_from_locale_symbol ((x));
   exports list of the module.
 */
 
-#define ly_lily_module_constant(x)                                     \
-  ({                                                                   \
-    static SCM cached;                                                 \
-    /* We store this one locally, since G++ -O2 fucks up else */       \
-    SCM value = cached;                                                        \
-    if (__builtin_constant_p ((x)))                                    \
-      {                                                                        \
-       if (!cached)                                                    \
-         value = cached = scm_eval (scm_from_locale_symbol (x),                \
-                                   global_lily_module);                \
-      }                                                                        \
-    else                                                               \
-      value = scm_eval (scm_from_locale_symbol (x), global_lily_module);       \
-    value;                                                             \
+#define ly_lily_module_constant(x)                                      \
+  ({                                                                    \
+    static SCM cached;                                                  \
+    /* We store this one locally, since G++ -O2 fucks up else */        \
+    SCM value = cached;                                                 \
+    if (__builtin_constant_p ((x)))                                     \
+      {                                                                 \
+        if (!cached)                                                    \
+          value = cached = scm_eval (scm_from_locale_symbol (x),                \
+                                    global_lily_module);                \
+      }                                                                 \
+    else                                                                \
+      value = scm_eval (scm_from_locale_symbol (x), global_lily_module);        \
+    value;                                                              \
   })
 
 /*
   Adds the NAME as a Scheme function, and a variable to store the SCM
   version of the function in the static variable NAME_proc
 */
-#define DECLARE_SCHEME_CALLBACK(NAME, ARGS)    \
-  static SCM NAME ARGS;                                \
+#define DECLARE_SCHEME_CALLBACK(NAME, ARGS)     \
+  static SCM NAME ARGS;                         \
   static SCM NAME ## _proc
 #define ADD_TYPE_PREDICATE(func, type_name) \
   void \
-  func ## _type_adder ()                       \
+  func ## _type_adder ()                        \
   {\
-    ly_add_type_predicate ((Type_predicate_ptr)func, type_name);       \
+    ly_add_type_predicate ((Type_predicate_ptr)func, type_name);        \
   }\
   ADD_SCM_INIT_FUNC(func ## _type_adder_ctor, \
-                   func ## _type_adder);
+                    func ## _type_adder);
 #define ADD_TYPE_PREDICATE(func, type_name) \
   void \
-  func ## _type_adder ()                       \
+  func ## _type_adder ()                        \
   {\
-    ly_add_type_predicate ((Type_predicate_ptr)func, type_name);       \
+    ly_add_type_predicate ((Type_predicate_ptr)func, type_name);        \
   }\
   ADD_SCM_INIT_FUNC(func ## _type_adder_ctor, \
-                   func ## _type_adder);
+                    func ## _type_adder);
 
 string mangle_cxx_identifier (string);
 
@@ -135,72 +136,72 @@ string predicate_to_typename (void *ptr);
   Make TYPE::FUNC available as a Scheme function.
 */
 #define MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE, FUNC, ARGCOUNT, OPTIONAL_COUNT, DOC) \
-  SCM TYPE ::FUNC ## _proc;                                            \
-  void                                                                 \
-  TYPE ## _ ## FUNC ## _init_functions ()                              \
-  {                                                                    \
+  SCM TYPE ::FUNC ## _proc;                                             \
+  void                                                                  \
+  TYPE ## _ ## FUNC ## _init_functions ()                               \
+  {                                                                     \
     string cxx = string (#TYPE) + "::" + string (#FUNC); \
     string id = mangle_cxx_identifier (cxx); \
-    TYPE ::FUNC ## _proc = scm_c_define_gsubr (id.c_str(),                     \
-                                              (ARGCOUNT-OPTIONAL_COUNT), OPTIONAL_COUNT, 0,    \
-                                              (scm_t_subr) TYPE::FUNC); \
+    TYPE ::FUNC ## _proc = scm_c_define_gsubr (id.c_str(),                      \
+                                               (ARGCOUNT-OPTIONAL_COUNT), OPTIONAL_COUNT, 0,    \
+                                               (scm_t_subr) TYPE::FUNC); \
     ly_add_function_documentation (TYPE :: FUNC ## _proc, id.c_str(), "", \
-                                  DOC);                                \
-    scm_c_export (id.c_str (), NULL);                                  \
-  }                                                                    \
-                                                                       \
-  ADD_SCM_INIT_FUNC (TYPE ## _ ## FUNC ## _callback,                   \
-                    TYPE ## _ ## FUNC ## _init_functions);
-
-#define MAKE_DOCUMENTED_SCHEME_CALLBACK(TYPE, FUNC, ARGCOUNT, DOC)             \
+                                   DOC);                                \
+    scm_c_export (id.c_str (), NULL);                                   \
+  }                                                                     \
+                                                                        \
+  ADD_SCM_INIT_FUNC (TYPE ## _ ## FUNC ## _callback,                    \
+                     TYPE ## _ ## FUNC ## _init_functions);
+
+#define MAKE_DOCUMENTED_SCHEME_CALLBACK(TYPE, FUNC, ARGCOUNT, DOC)              \
   MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE, FUNC, ARGCOUNT, 0, DOC);
 
-#define MAKE_SCHEME_CALLBACK(TYPE, FUNC, ARGCOUNT)                     \
+#define MAKE_SCHEME_CALLBACK(TYPE, FUNC, ARGCOUNT)                      \
   MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE,FUNC,ARGCOUNT, 0, "");
 
 void ly_add_function_documentation (SCM proc, string fname, string varlist, string doc);
 void ly_check_name (string cxx, string fname);
 
-#define ADD_SCM_INIT_FUNC(name, func)          \
-  class name ## _scm_initter                   \
-  {                                            \
-  public:                                      \
-    name ## _scm_initter ()                    \
-    {                                          \
-      add_scm_init_func (func);                        \
-    }                                          \
-  }                                            \
+#define ADD_SCM_INIT_FUNC(name, func)           \
+  class name ## _scm_initter                    \
+  {                                             \
+  public:                                       \
+    name ## _scm_initter ()                     \
+    {                                           \
+      add_scm_init_func (func);                 \
+    }                                           \
+  }                                             \
     _ ## name ## _scm_initter;
 
 /* end define */
 
 #define LY_DEFINE_WITHOUT_DECL(INITPREFIX, FNAME, PRIMNAME, REQ, OPT, VAR, \
-                              ARGLIST, DOCSTRING)                      \
-  SCM FNAME ## _proc;                                                  \
-  void                                                                 \
-  INITPREFIX ## init ()                                                        \
-  {                                                                    \
-    FNAME ## _proc = scm_c_define_gsubr (PRIMNAME, REQ, OPT, VAR,      \
-                                        (scm_t_subr) FNAME); \
+                               ARGLIST, DOCSTRING)                      \
+  SCM FNAME ## _proc;                                                   \
+  void                                                                  \
+  INITPREFIX ## init ()                                                 \
+  {                                                                     \
+    FNAME ## _proc = scm_c_define_gsubr (PRIMNAME, REQ, OPT, VAR,       \
+                                         (scm_t_subr) FNAME); \
     ly_check_name (#FNAME, PRIMNAME);\
-    ly_add_function_documentation (FNAME ## _proc, PRIMNAME, #ARGLIST, \
-                                  DOCSTRING);                          \
-    scm_c_export (PRIMNAME, NULL);                                     \
-  }                                                                    \
+    ly_add_function_documentation (FNAME ## _proc, PRIMNAME, #ARGLIST,  \
+                                   DOCSTRING);                          \
+    scm_c_export (PRIMNAME, NULL);                                      \
+  }                                                                     \
   ADD_SCM_INIT_FUNC (INITPREFIX ## init_unique_prefix, INITPREFIX ## init); \
-  SCM                                                                  \
+  SCM                                                                   \
   FNAME ARGLIST
 
-#define LY_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING)  \
-  SCM FNAME ARGLIST;                                                   \
+#define LY_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING)   \
+  SCM FNAME ARGLIST;                                                    \
   LY_DEFINE_WITHOUT_DECL (FNAME, FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, \
-                         DOCSTRING)
+                          DOCSTRING)
 
 #define LY_DEFINE_MEMBER_FUNCTION(CLASS, FNAME, PRIMNAME, REQ, OPT, VAR, \
-                                 ARGLIST, DOCSTRING)                   \
-  SCM FNAME ARGLIST;                                                   \
+                                  ARGLIST, DOCSTRING)                   \
+  SCM FNAME ARGLIST;                                                    \
   LY_DEFINE_WITHOUT_DECL (CLASS ## FNAME, CLASS::FNAME, PRIMNAME, REQ, OPT, \
-                         VAR, ARGLIST, DOCSTRING)
+                          VAR, ARGLIST, DOCSTRING)
 
 #define get_property(x) internal_get_property (ly_symbol2scm (x))
 #define get_pure_property(x,y,z) \
@@ -222,20 +223,16 @@ void ly_check_name (string cxx, string fname);
 #define set_property(x, y) internal_set_property (ly_symbol2scm (x), y)
 #endif
 
-
-
-#define LY_ASSERT_TYPE(pred, var, number)                                      \
-  {                                                                    \
+#define LY_ASSERT_TYPE(pred, var, number)                                       \
+  {                                                                     \
     if (!pred (var)) \
-      {                                                                        \
-       scm_wrong_type_arg_msg(mangle_cxx_identifier (__FUNCTION__).c_str(), \
-                              number, var, \
-                              predicate_to_typename ((void*) &pred).c_str()); \
-      }                                                                        \
+      {                                                                 \
+        scm_wrong_type_arg_msg(mangle_cxx_identifier (__FUNCTION__).c_str(), \
+                               number, var, \
+                               predicate_to_typename ((void*) &pred).c_str()); \
+      }                                                                 \
   }
 
 #define LY_ASSERT_SMOB(klass, var, number) LY_ASSERT_TYPE(klass::unsmob, var, number)
 
-
-
 #endif /* LILY_GUILE_MACROS_HH */
index 3fefd5dc3c35bf0d34d3886757f2a13282bb10c6..5b766251030b901a1c515b6ac41135be9ebf583d 100644 (file)
@@ -31,7 +31,7 @@
   Hack for various MacOS incarnations.
  */
 #ifndef GUILE_ELLIPSIS
-#define GUILE_ELLIPSIS 
+#define GUILE_ELLIPSIS
 #endif
 
 #include "guile-compatibility.hh"
@@ -78,7 +78,6 @@ Offset robust_scm2offset (SCM, Offset);
 string robust_scm2string (SCM, string);
 Rational robust_scm2rational (SCM, Rational);
 
-  
 SCM ly_quote_scm (SCM s);
 bool type_check_assignment (SCM val, SCM sym, SCM type_symbol);
 string print_scm_val (SCM val);
@@ -93,8 +92,8 @@ SCM ly_hash2alist (SCM tab);
 SCM ly_hash_table_keys (SCM tab);
 
 SCM ly_assoc_prepend_x (SCM alist, SCM key, SCM val);
-inline bool ly_is_fraction (SCM x) { return SCM_FRACTIONP(x) || scm_is_integer (x); }
-    
+inline bool ly_is_fraction (SCM x) { return SCM_FRACTIONP (x) || scm_is_integer (x); }
+
 inline bool ly_is_list (SCM x) { return SCM_NFALSEP (scm_list_p (x)); }
 inline bool ly_cheap_is_list (SCM x) { return scm_is_pair (x) || x == SCM_EOL; }
 inline bool ly_is_procedure (SCM x) { return SCM_NFALSEP (scm_procedure_p (x)); }
@@ -166,7 +165,7 @@ SCM ly_output_formats ();
 /*
   snarfing.
 */
-void add_scm_init_func (void (*) ());
+void add_scm_init_func (void ( *) ());
 
 extern "C" {
   typedef SCM (*Scheme_function_unknown) (GUILE_ELLIPSIS);
@@ -184,7 +183,6 @@ typedef SCM (*Scheme_function_2) (GUILE_ELLIPSIS);
 typedef SCM (*Scheme_function_3) (GUILE_ELLIPSIS);
 #endif
 
-
 /*
   Inline these for performance reasons.
  */
@@ -199,22 +197,19 @@ inline SCM ly_car (SCM x) { return SCM_CAR (x); }
 inline SCM ly_cdr (SCM x) { return SCM_CDR (x); }
 inline bool ly_is_pair (SCM x) { return SCM_I_CONSP (x); }
 
-
-
-#include  "std-vector.hh"
+#include "std-vector.hh"
 
 template<class T>
 SCM
-ly_cxx_vector_to_list  (vector<T> const &src)
+ly_cxx_vector_to_list (vector<T> const &src)
 {
   SCM l = SCM_EOL;
-  for (vsize i = src.size (); i --; )
+  for (vsize i = src.size (); i--;)
     l = scm_cons (src[i]->self_scm (), l);
 
   return l;
 }
 
-
 SCM ly_offsets2scm (vector<Offset> os);
 vector<Offset> ly_scm2offsets (SCM s);
 
index 4f5f92d4e11a97f6520cd7b0e8361a03f24e3ee2..72391a087748cdd676739a8ed2b3646547f077c7 100644 (file)
@@ -66,7 +66,7 @@ public:
   void *lexval_;
   Input *lexloc_;
   bool is_main_input_;
-  
+
   Sources *sources_;
 
   /* Scheme hash tables with (oct name acc)  values, and symbol keys.  */
@@ -81,7 +81,7 @@ public:
   Lily_lexer (Sources *, Lily_parser *);
   Lily_lexer (Lily_lexer const &, Lily_parser *);
   int yylex ();
-  
+
   void add_lexed_char (int);
 
   void prepare_for_next_token ();
index fe589404607d74a129befe444dad9b512d4dba85..0387e2efd71cfdec019c5c844072e7c0d2ba1ecd 100644 (file)
@@ -39,8 +39,8 @@ class Lily_parser
 
   char const *here_str0 () const;
   Simultaneous_music *get_chord (Pitch tonic,
-                                vector<Pitch> *adds, vector<Pitch> *subs,
-                                Pitch *inversion, Pitch *bass, Duration d);
+                                 vector<Pitch> *adds, vector<Pitch> *subs,
+                                 Pitch *inversion, Pitch *bass, Duration d);
   void set_chord_tremolo (int type);
   void set_last_duration (Duration const *);
   void set_last_pitch (Pitch const *);
@@ -70,7 +70,7 @@ public:
   void parser_error (Input const &, string);
   void set_yydebug (bool);
 
-  SCM make_scope () const; 
+  SCM make_scope () const;
 };
 
 DECLARE_UNSMOB (Lily_parser, lily_parser);
index 5cde918e3f9401bb5bda86cddb152410ab828545..86b76c5c58a805b1595b7420c02f9b59fdfd94e1 100644 (file)
@@ -199,7 +199,7 @@ class Transposed_music;
 class yyFlexLexer;
 
 typedef void (*Engraver_void_function_engraver_grob_info) (Engraver *,
-                                                          Grob_info);
+                                                           Grob_info);
 typedef void (*Translator_void_method_ptr) (Translator *);
 
 #endif /* LILY_PROTO_HH */
index 188806213222e80bc1532a5bfb202e84936c133d..f375c12335f6fd84bf74cdd5f6e2acfe94ab6f06 100644 (file)
 struct Line_interface
 {
   static Stencil line (Grob *me, Offset from, Offset to);
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static Stencil make_zigzag_line (Grob *me,
-                                  Offset from,
-                                  Offset to);
+                                   Offset from,
+                                   Offset to);
   static Stencil make_trill_line (Grob *me,
-                                Offset from,
-                                Offset to);
+                                  Offset from,
+                                  Offset to);
   static Stencil make_dashed_line (Real th, Offset from, Offset to, Real, Real);
   static Stencil make_line (Real th, Offset from, Offset to);
   static Stencil make_arrow (Offset beg, Offset end, Real thick,
-                            Real length, Real width);
+                             Real length, Real width);
   static Stencil arrows (Grob *me, Offset from, Offset to,
-                        bool from_arrow,
-                        bool to_arrow);
+                         bool from_arrow,
+                         bool to_arrow);
 };
 
 #endif /* LINE_INTERFACE_HH */
index ed7aced9c9ca2a0e12fc27dff07f1ba54e515021..0bc937f2b3b7559e212dd14950aad9d7baf7b121 100644 (file)
@@ -27,7 +27,7 @@
   register a method as an event handler in a dispatcher, then you
   must:
 
-  - declare the method using the DECLARE_LISTENER macro. 
+  - declare the method using the DECLARE_LISTENER macro.
   class Foo
   {
     DECLARE_LISTENER (method);
@@ -53,7 +53,7 @@
   Stream_distributor *d = (...);
   Listener l = GET_LISTENER (foo->method);
   d->register_listener (l, "EventClass");
-  
+
   Whenever d hears a stream-event ev of class "EventClass",
   the implemented procedure is called.
 
 
 #include "smobs.hh"
 
-typedef struct {
+typedef struct
+{
   void (*listen_callback) (void *, SCM);
   void (*mark_callback) (void *);
 } Listener_function_table;
 
-class Listener {
+class Listener
+{
   void *target_;
   Listener_function_table *type_;
 public:
@@ -85,34 +87,34 @@ public:
 };
 DECLARE_UNSMOB (Listener, listener);
 
-#define IMPLEMENT_LISTENER(cl, method)                 \
-void                                                   \
-cl :: method ## _callback (void *self, SCM ev)         \
-{                                                      \
-  cl *s = (cl *)self;                                  \
-  s->method (ev);                                      \
-}                                                      \
-void                                                   \
-cl :: method ## _mark (void *self)                     \
-{                                                      \
-  cl *s = (cl *)self;                                  \
-  scm_gc_mark (s->self_scm ());                                \
-}                                                      \
-Listener                                               \
-cl :: method ## _listener () const                     \
-{                                                      \
-  static Listener_function_table callbacks;            \
-  callbacks.listen_callback = &cl::method ## _callback;        \
-  callbacks.mark_callback = &cl::method ## _mark;      \
-  return Listener (this, &callbacks);                  \
+#define IMPLEMENT_LISTENER(cl, method)                  \
+void                                                    \
+cl :: method ## _callback (void *self, SCM ev)          \
+{                                                       \
+  cl *s = (cl *)self;                                   \
+  s->method (ev);                                       \
+}                                                       \
+void                                                    \
+cl :: method ## _mark (void *self)                      \
+{                                                       \
+  cl *s = (cl *)self;                                   \
+  scm_gc_mark (s->self_scm ());                         \
+}                                                       \
+Listener                                                \
+cl :: method ## _listener () const                      \
+{                                                       \
+  static Listener_function_table callbacks;             \
+  callbacks.listen_callback = &cl::method ## _callback; \
+  callbacks.mark_callback = &cl::method ## _mark;       \
+  return Listener (this, &callbacks);                   \
 }
 
 #define GET_LISTENER(proc) proc ## _listener ()
 
-#define DECLARE_LISTENER(name)                         \
-  inline void name (SCM);                              \
-  static void name ## _callback (void *self, SCM ev);  \
-  static void name ## _mark (void *self);              \
+#define DECLARE_LISTENER(name)                          \
+  inline void name (SCM);                               \
+  static void name ## _callback (void *self, SCM ev);   \
+  static void name ## _mark (void *self);               \
   Listener name ## _listener () const
 
 #endif /* LISTENER_HH */
index d7157cf3c781f7ae4c4b12e7568b212671b00bd1..cb1f461dfa98aed9bc581ad054e28bf5ba63757d 100644 (file)
@@ -31,7 +31,7 @@ struct Lookup
   static Stencil rotated_box (Real slope, Real width, Real thick, Real blot);
   static Stencil round_filled_polygon (vector<Offset> const &points, Real blotdiameter);
   static Stencil frame (Box b, Real thick, Real blot);
-  static Stencil slur (Bezier controls, Real cthick, Real thick, 
+  static Stencil slur (Bezier controls, Real cthick, Real thick,
                        SCM dash_definition);
   static Stencil bezier_sandwich (Bezier top_curve, Bezier bottom_curve,
                                   Real thickness);
index f4483ed2d9704487630aec23c78ed32fd67226da..50a31d9269f8fa045c29958564c12cb026218719 100644 (file)
@@ -39,6 +39,5 @@ typedef SCM (*scm_t_hash_fold_fn) (GUILE_ELLIPSIS);
 typedef SCM (*scm_t_hash_handle_fn) (GUILE_ELLIPSIS);
 #endif
 
-
 #endif /* LY_MODULE_HH */
 
index 1cb9e325905319ab220100ef1bf6605f54928843..695fc465ec3e22a3ab3c3f531c2a087d9ee2e16f 100644 (file)
 #include "lily-guile-macros.hh"
 #include "smobs.hh"
 
-#define IMPLEMENT_TYPE_P(CL, FUNCNAME)                                 \
-  SCM CL ## _type_p_proc;                                              \
-  void init_type_ ## CL ()                                             \
-  {                                                                    \
-    SCM subr = scm_c_define_gsubr (FUNCNAME, 1, 0, 0,                  \
-                                  (scm_t_subr) CL::smob_p); \
-    CL ## _type_p_proc = subr;                                         \
-    ly_add_function_documentation (subr, FUNCNAME, "(SCM x)",          \
-                                  "Is @var{x} a @code{" #CL "} object?"); \
-    scm_c_export (FUNCNAME, NULL);                                     \
-  }                                                                    \
+#define IMPLEMENT_TYPE_P(CL, FUNCNAME)                                  \
+  SCM CL ## _type_p_proc;                                               \
+  void init_type_ ## CL ()                                              \
+  {                                                                     \
+    SCM subr = scm_c_define_gsubr (FUNCNAME, 1, 0, 0,                   \
+                                   (scm_t_subr) CL::smob_p); \
+    CL ## _type_p_proc = subr;                                          \
+    ly_add_function_documentation (subr, FUNCNAME, "(SCM x)",           \
+                                   "Is @var{x} a @code{" #CL "} object?"); \
+    scm_c_export (FUNCNAME, NULL);                                      \
+  }                                                                     \
   ADD_SCM_INIT_FUNC (init_type_ ## CL, init_type_ ## CL)
 
-#define IMPLEMENT_BASE_SMOBS(CL)                                       \
+#define IMPLEMENT_BASE_SMOBS(CL)                                        \
   void \
-  CL ## _type_adder ()                 \
+  CL ## _type_adder ()                  \
   {\
-    ly_add_type_predicate ((void*) &CL::unsmob, #CL);  \
+    ly_add_type_predicate ((void*) &CL::unsmob, #CL);   \
   }\
   ADD_SCM_INIT_FUNC(CL ## _type_adder_ctor, \
-                   CL ## _type_adder);\
-  const char *CL::smob_name_ = #CL;                                    \
-  scm_t_bits CL::smob_tag_;                                            \
-  SCM                                                                  \
-  CL::smob_p (SCM s)                                                   \
-  {                                                                    \
-    if (SCM_NIMP (s) && SCM_CELL_TYPE (s) == smob_tag_)                        \
-      return SCM_BOOL_T;                                               \
-    else                                                               \
-      return SCM_BOOL_F;                                               \
-                                                                       \
-  }                                                                    \
-                                                                       \
-  void                                                                 \
-  CL::init_smobs ()                                                    \
-  {                                                                    \
-    smob_tag_ = scm_make_smob_type (#CL, 0);                           \
-    scm_set_smob_mark (smob_tag_, CL::mark_smob);                      \
-    scm_set_smob_free (smob_tag_, CL::free_smob);                      \
-    scm_set_smob_print (smob_tag_, CL::print_smob);                    \
-    scm_set_smob_equalp (smob_tag_, CL::equal_p);                      \
-  }                                                                    \
-                                                                       \
-  size_t                                                               \
-  CL::free_smob (SCM ses)                                              \
-  {                                                                    \
-    CL *s = (CL *) SCM_CELL_WORD_1 (ses);                              \
-    delete s;                                                          \
+                    CL ## _type_adder);\
+  const char *CL::smob_name_ = #CL;                                     \
+  scm_t_bits CL::smob_tag_;                                             \
+  SCM                                                                   \
+  CL::smob_p (SCM s)                                                    \
+  {                                                                     \
+    if (SCM_NIMP (s) && SCM_CELL_TYPE (s) == smob_tag_)                 \
+      return SCM_BOOL_T;                                                \
+    else                                                                \
+      return SCM_BOOL_F;                                                \
+                                                                        \
+  }                                                                     \
+                                                                        \
+  void                                                                  \
+  CL::init_smobs ()                                                     \
+  {                                                                     \
+    smob_tag_ = scm_make_smob_type (#CL, 0);                            \
+    scm_set_smob_mark (smob_tag_, CL::mark_smob);                       \
+    scm_set_smob_free (smob_tag_, CL::free_smob);                       \
+    scm_set_smob_print (smob_tag_, CL::print_smob);                     \
+    scm_set_smob_equalp (smob_tag_, CL::equal_p);                       \
+  }                                                                     \
+                                                                        \
+  size_t                                                                \
+  CL::free_smob (SCM ses)                                               \
+  {                                                                     \
+    CL *s = (CL *) SCM_CELL_WORD_1 (ses);                               \
+    delete s;                                                           \
     /*    scm_gc_unregister_collectable_memory (s, sizeof (CL), #CL " smob"); */ \
-    return SMOB_FREE_RETURN_VAL (CL);                                  \
-  }                                                                    \
-                                                                       \
+    return SMOB_FREE_RETURN_VAL (CL);                                   \
+  }                                                                     \
+                                                                        \
   ADD_SCM_INIT_FUNC (CL, CL::init_smobs)
 
-#define IMPLEMENT_SIMPLE_SMOBS(CL)                                     \
-  IMPLEMENT_BASE_SMOBS (CL);                                           \
-  SCM CL::smobbed_copy () const                                                \
-  {                                                                    \
-    CL *ptr = new CL (*this);                                          \
-    SCM s;                                                             \
-    s = scm_cons (SCM_PACK (CL::smob_tag_), SCM_PACK (ptr));           \
+#define IMPLEMENT_SIMPLE_SMOBS(CL)                                      \
+  IMPLEMENT_BASE_SMOBS (CL);                                            \
+  SCM CL::smobbed_copy () const                                         \
+  {                                                                     \
+    CL *ptr = new CL (*this);                                           \
+    SCM s;                                                              \
+    s = scm_cons (SCM_PACK (CL::smob_tag_), SCM_PACK (ptr));            \
     scm_gc_register_collectable_memory ((CL *)this, sizeof (CL), #CL " smob"); \
-                                                                       \
-    return s;                                                          \
+                                                                        \
+    return s;                                                           \
   }
 
-#define IMPLEMENT_SMOBS(CL)                                            \
-  IMPLEMENT_BASE_SMOBS (CL)                                            \
-    void                                                               \
-  CL::smobify_self ()                                                  \
-  {                                                                    \
-    protection_cons_ = SCM_EOL;                                                \
-    self_scm_ = unprotected_smobify_self ();                           \
-    protect ();                                                                \
-  }                                                                    \
-  void                                                                 \
-  CL::protect ()                                                       \
-  {                                                                    \
-    protect_smob (self_scm_, &protection_cons_);                       \
-  }                                                                    \
-  SCM                                                                  \
-  CL::unprotect ()                                                     \
-  {                                                                    \
-    unprotect_smob (self_scm_, &protection_cons_);                     \
-    return self_scm_;                                                  \
-  }                                                                    \
-  SCM                                                                  \
-  CL::unprotected_smobify_self ()                                      \
-  {                                                                    \
-    /*                                                                 \
-      This is local. We don't assign to self_scm_ directly, to assure  \
-      that S isn't GC-ed from under us.                                        \
-                                                                       \
+#define IMPLEMENT_SMOBS(CL)                                             \
+  IMPLEMENT_BASE_SMOBS (CL)                                             \
+    void                                                                \
+  CL::smobify_self ()                                                   \
+  {                                                                     \
+    protection_cons_ = SCM_EOL;                                         \
+    self_scm_ = unprotected_smobify_self ();                            \
+    protect ();                                                         \
+  }                                                                     \
+  void                                                                  \
+  CL::protect ()                                                        \
+  {                                                                     \
+    protect_smob (self_scm_, &protection_cons_);                        \
+  }                                                                     \
+  SCM                                                                   \
+  CL::unprotect ()                                                      \
+  {                                                                     \
+    unprotect_smob (self_scm_, &protection_cons_);                      \
+    return self_scm_;                                                   \
+  }                                                                     \
+  SCM                                                                   \
+  CL::unprotected_smobify_self ()                                       \
+  {                                                                     \
+    /*                                                                  \
+      This is local. We don't assign to self_scm_ directly, to assure   \
+      that S isn't GC-ed from under us.                                 \
+                                                                        \
       We don't use smobbed_self () to ensure that mark_smob () doesn't  \
       have to deal half-initialized objects: scm_done_malloc ( ) might  \
       trigger GC.the warning in smobs.hh is just to be doubleplus       \
       goodly sure                                                       \
-    */                                                                 \
-    SCM s;                                                             \
-    SCM_NEWSMOB (s, CL::smob_tag_, this);                              \
-    self_scm_ = s;                                                     \
+    */                                                                  \
+    SCM s;                                                              \
+    SCM_NEWSMOB (s, CL::smob_tag_, this);                               \
+    self_scm_ = s;                                                      \
     scm_gc_register_collectable_memory (this, sizeof (CL), #CL " smob"); \
-    return s;                                                          \
+    return s;                                                           \
   }
 
-#define IMPLEMENT_DEFAULT_EQUAL_P(CL)          \
-  SCM                                          \
-  CL::equal_p (SCM a, SCM b)                   \
-  {                                            \
-    return a == b ? SCM_BOOL_T : SCM_BOOL_F;   \
+#define IMPLEMENT_DEFAULT_EQUAL_P(CL)           \
+  SCM                                           \
+  CL::equal_p (SCM a, SCM b)                    \
+  {                                             \
+    return a == b ? SCM_BOOL_T : SCM_BOOL_F;    \
   }
 
 #endif /* LY_SMOBS_ICC */
index 94709ae72ce5183203aeac7caa949e6d05c041bf..f3bfd6483f9c4c308885a3280427c65190457656 100644 (file)
@@ -27,7 +27,7 @@
 class Lyric_extender
 {
 public:
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (print, (SCM));
 };
 
index 4617832282cde2c24a367c49e3319d7de7d768e2..6b4799b4316772b4f0bb2490d5559ca650efe697 100644 (file)
@@ -27,7 +27,7 @@ struct Lyric_hyphen
 {
 public:
   DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (print, (SCM));
 };
 
index 7fa0905c83dc559bf0dc5c49950b263d58617d99..8644a3ee17738f0bc488a2516a019bacb6d41b9a 100644 (file)
@@ -62,7 +62,6 @@ extern int exit_status_global;
 extern File_path global_path;
 extern const char *LILYPOND_DATADIR;
 
-
 /*
   Debugging options: switch on
 
index 0748770e6f6224a40e1ff527c98a0c1f2db640d7..4b66c9480381dc73f72f301696faea52032f218b 100644 (file)
 #include "grob-interface.hh"
 #include "lily-proto.hh"
 
-
 class Measure_grouping
 {
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
 
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* MEASURE_GROUPING_SPANNER_HH */
index bcfab163e52b6c3f623d3c313c8467884f74accd..3dbf141bf87de3e636ff404a00df12643d11356b 100644 (file)
@@ -26,9 +26,9 @@
 class Melody_spanner
 {
 public:
-  DECLARE_GROB_INTERFACE();
-  static void add_stem (Grob*, Grob*);
-  DECLARE_SCHEME_CALLBACK(calc_neutral_stem_direction, (SCM));
+  DECLARE_GROB_INTERFACE ();
+  static void add_stem (Grob *, Grob *);
+  DECLARE_SCHEME_CALLBACK (calc_neutral_stem_direction, (SCM));
 };
 
 #endif /* MELODY_SPANNER_HH */
index cb676e591602c6c13d175b138945f8b2a615586d..350ea66958e27097afe0b6445e696ef5d926b7de 100644 (file)
@@ -24,7 +24,6 @@
 #include "lily-proto.hh"
 #include "grob-interface.hh"
 
-
 /*
  * These are all possible mensural ligature primitives.
  */
@@ -46,7 +45,7 @@ struct Mensural_ligature
 {
   DECLARE_SCHEME_CALLBACK (brew_ligature_primitive, (SCM));
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* MENSURAL_LIGATURE_HH */
index c567e904f1797a814b4699b8f7a06d5247070c75..77ea97a78d90ce4d8c630647349b1b55d1b65286 100644 (file)
@@ -24,7 +24,6 @@
 #include "virtual-methods.hh"
 #include "std-vector.hh"
 
-
 /**
    timed MIDI event
 */
@@ -38,9 +37,6 @@ public:
   string to_string () const;
 };
 
-
-
-
 /**
    variable sized MIDI data
 */
@@ -73,7 +69,7 @@ public:
   int port_;
   DECLARE_CLASSNAME (Midi_track);
 
-  vector<Midi_event*> events_;
+  vector<Midi_event *> events_;
 
   Midi_track (int number, bool port);
   ~Midi_track ();
index cc59ed0abe1c165511408dfe82d4bde628ffb940..1930e654376b2c21719cb486e028ddb2cb8313f8 100644 (file)
@@ -24,7 +24,7 @@
 #include "std-vector.hh"
 
 string int2midi_varint_string (int i);
-  
+
 /**
    Any piece of midi information.
 
@@ -40,7 +40,6 @@ public:
 
   static Midi_item *get_midi (Audio_item *a);
 
-
   virtual string to_string () const = 0;
 };
 
@@ -61,7 +60,6 @@ public:
   Real seconds_;
 };
 
-
 /**
    Change instrument event
 */
@@ -111,7 +109,6 @@ public:
 
   Audio_note *audio_;
 
-  
   static int const c0_pitch_ = 60;
   Byte dynamic_byte_;
 };
@@ -132,10 +129,10 @@ class Midi_text : public Midi_item
 {
 public:
   enum Type
-    {
-      TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC,
-      MARKER, CUE_POINT
-    };
+  {
+    TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC,
+    MARKER, CUE_POINT
+  };
   DECLARE_CLASSNAME (Midi_text);
 
   Midi_text (Audio_text *);
index 3d99b34021659bacee447eed8af898d7c30d265e..40fde21f95b5371ada81b325092818ddba0fba1c 100644 (file)
@@ -43,7 +43,7 @@ public:
   ~Midi_walker ();
 
   void process ();
-  void operator ++ (int);
+  void operator ++(int);
   bool ok () const;
   void finalize ();
 
@@ -51,16 +51,16 @@ private:
   void do_start_note (Midi_note *note);
   void do_stop_notes (int);
   void output_event (int, Midi_item *l);
-  Midi_item *get_midi (Audio_item*); 
+  Midi_item *get_midi (Audio_item *);
   Midi_track *track_;
   bool percussion_;
   bool merge_unisons_;
   vsize index_;
-  vector<Audio_item*> items_;
+  vector<Audio_item *> items_;
   PQueue<Midi_note_event> stop_note_queue;
   int last_tick_;
 
-  vector<Midi_item*> midi_events_;
+  vector<Midi_item *> midi_events_;
 };
 
 #endif // MIDI_WALKER_HH
index f36e7cecc60de740ebd1f95eb22900f7ea8387eb..0491b5b4a91cd2f90d98a1edbea2d4d00eaea7ac 100644 (file)
@@ -42,7 +42,7 @@ sign (int i)
 inline int
 shift_left (int value, int shiftamount)
 {
- if (shiftamount < 0) return (value >> -shiftamount); 
+  if (shiftamount < 0) return (value >> -shiftamount);
   else return (value << shiftamount);
 }
 
@@ -50,12 +50,12 @@ inline Real
 linear_interpolate (Real x, Real x1, Real x2, Real y1, Real y2)
 {
   return (x2 - x) / (x2 - x1) * y1
-    + (x - x1) / (x2 - x1) * y2;
+         + (x - x1) / (x2 - x1) * y2;
 }
 
 Real directed_round (Real f, Direction d);
 
-Real peak_around (Real epsilon,  Real threshold, Real x);
+Real peak_around (Real epsilon, Real threshold, Real x);
 Real convex_amplifier (Real standard_x, Real increase_factor, Real x);
 string camel_case_to_lisp_identifier (string in);
 vsize utf8_char_len (char);
index 6a3922066eefe427a02cc74267857ef52c0363aa..5671d6b2342b7cbf915b017faa84e8d22fc23532 100644 (file)
@@ -64,9 +64,9 @@ public:
 
 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, +);
 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, -);
-IMPLEMENT_ARITHMETIC_OPERATOR (Moment, /);
+IMPLEMENT_ARITHMETIC_OPERATOR (Moment, / );
 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, *);
-IMPLEMENT_ARITHMETIC_OPERATOR (Moment, %);
+IMPLEMENT_ARITHMETIC_OPERATOR (Moment, % );
 
 DECLARE_UNSMOB (Moment, moment);
 int compare (Moment const &, Moment const &);
index 7c07b3c8dc670953f2d4f78da59a31ff1a158de6..399e1490d63af5ff555bd724de68b0e72b21354c 100644 (file)
@@ -26,7 +26,7 @@
 class Multi_measure_rest
 {
 public:
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (percent, (SCM));
   static void add_column (Grob *, Item *);
@@ -34,7 +34,6 @@ public:
   DECLARE_SCHEME_CALLBACK (set_text_rods, (SCM));
   DECLARE_SCHEME_CALLBACK (centered_stencil, (SCM));
 
-
   static void calculate_spacing_rods (Grob *me, Real length);
   static Stencil big_rest (Grob *, Real);
   static Stencil symbol_stencil (Grob *, Real);
index 863f87f31ba441a395d29ab22a86c199c0d47614..cc821a139422b376293a146a05798d831f80eba3 100644 (file)
@@ -64,7 +64,7 @@ protected:
   Moment music_length_;
   Moment start_mom_;
 
-  DECLARE_CLASSNAME(Music_iterator);
+  DECLARE_CLASSNAME (Music_iterator);
   DECLARE_SMOBS (Music_iterator);
   Music_iterator (Music_iterator const &);
 
@@ -102,15 +102,15 @@ private:
 
 bool is_child_context (Context *me, Context *child);
 
-#define IMPLEMENT_CTOR_CALLBACK(Class)                                 \
+#define IMPLEMENT_CTOR_CALLBACK(Class)                                  \
   LY_DEFINE_MEMBER_FUNCTION (Class, constructor, \
-                            mangle_cxx_identifier (string (#Class) + "::constructor").c_str(), \
-                            0, 0, 0,                                   \
-                            (),                                        \
-                            "")                                        \
-  {                                                                    \
-    Class *c = (new Class);                                            \
-    return c->unprotect ();                                            \
+                             mangle_cxx_identifier (string (#Class) + "::constructor").c_str(), \
+                             0, 0, 0,                                   \
+                             (),                                        \
+                             "")                                        \
+  {                                                                     \
+    Class *c = (new Class);                                             \
+    return c->unprotect ();                                             \
   }
 
 DECLARE_UNSMOB (Music_iterator, iterator);
index 27c6c423a86ef5bcead53e2c5bb5eef9fbf8e7f0..1a09bb6fbf9340cde0ecbcbd12b2500f35b8e9e2 100644 (file)
@@ -29,7 +29,7 @@
 class Music_output
 {
   DECLARE_SMOBS (Music_output);
-  DECLARE_CLASSNAME(Music_output);
+  DECLARE_CLASSNAME (Music_output);
 protected:
   Music_output ();
 
index 82a069574e4f41dcdf69c8390177cb8a23e5d035..8cfd9be7a9084b16f78390be04c0aa0a756c1137 100644 (file)
@@ -32,7 +32,7 @@ class Music_wrapper_iterator : public Music_iterator
 public:
   DECLARE_SCHEME_CALLBACK (constructor, ());
   Music_wrapper_iterator ();
-  DECLARE_CLASSNAME(Music_wrapper_iterator);
+  DECLARE_CLASSNAME (Music_wrapper_iterator);
 
   virtual void derived_substitute (Context *f, Context *t);
   virtual void derived_mark () const;
index e3fdb3f83d761c7fc6429efe789cd4f86630159d..fb9e11fe5a01656a6b29fcc2cb4057a0754ec34f 100644 (file)
@@ -53,12 +53,12 @@ public:
 
   /// Scale the music in time by #factor#.
   void compress (Moment factor);
-  
+
   // Broadcast the event in a context's event-source.
   void send_to_context (Context *c);
 
   DECLARE_SCHEME_CALLBACK (duration_length_callback, (SCM));
+
 protected:
   virtual SCM copy_mutable_properties () const;
   virtual void type_check_assignment (SCM, SCM) const;
index b2464067c8600a4df5ed3d6eb3817e5e9d5d162c..58006a7c6e6e2fc49428c63284d5c02db1786eed 100644 (file)
@@ -24,7 +24,6 @@
 #include "grob-interface.hh"
 #include "lily-proto.hh"
 
-
 /**
    Resolve conflicts between various Note_columns (chords).
 
 class Note_collision_interface
 {
 public:
-  static SCM automatic_shift (Grob *, Drul_array<vector<Grob*> >);
+  static SCM automatic_shift (Grob *, Drul_array<vector<Grob *> >);
   static SCM forced_shift (Grob *);
 
-  static Drul_array<vector<Grob*> > get_clash_groups (Grob *me);
+  static Drul_array<vector<Grob *> > get_clash_groups (Grob *me);
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM smob));
   static void add_column (Grob *me, Grob *ncol);
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 #endif // COLLISION_HH
index d2138e9fcdce2bdecae5808791ee528eec62ebb0..de440b31d3ee1c431fa9008865c20eca6e827335 100644 (file)
@@ -23,7 +23,6 @@
 #include "grob-interface.hh"
 #include "lily-proto.hh"
 
-
 /** a struct for treating a group of noteheads (noteheads, stem
     (chord) and scripts) as a single entity.
 
@@ -44,7 +43,7 @@ public:
   static bool has_rests (Grob *me);
   static Grob *dot_column (Grob *me);
   static Interval cross_staff_extent (Grob *me, Grob *refp);
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 
   static Item *get_stem (Grob *);
 };
index a7faff93054c0f6cfb3f26771dc4a797cf14a831..4fa1eca5893dc2dcac906fc1eca3110fcf5551fc 100644 (file)
@@ -23,7 +23,6 @@
 #include "stencil.hh"
 #include "grob-interface.hh"
 
-
 class Note_head
 {
 public:
@@ -32,7 +31,7 @@ public:
   DECLARE_SCHEME_CALLBACK (stem_x_shift, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_stem_attachment, (SCM));
   DECLARE_SCHEME_CALLBACK (include_ledger_line_height, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 
   static Real stem_attachment_coordinate (Grob *, Axis a);
   static int get_balltype (Grob *);
index d5465b639f1dd5679619c78de34df7dfc3fea852..29f9eaad5d7912200a0fc045aebc38bb41da0eaa 100644 (file)
 class Note_spacing
 {
 public:
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 
   static Spring get_spacing (Grob *me, Item *, Real, Real);
   static void stem_dir_correction (Grob *me, Item *next_col, Real incr,
-                                  Real *, Real *);
+                                   Real *, Real *);
 };
 
 #endif /* NOTE_SPACING_HH */
index 486606fd95cd2d138e99fc4b3bdc570b21383f45..785add735a839b608937efe2104f9255a66f2874 100644 (file)
 #ifndef OPEN_TYPE_FONT_HH
 #define OPEN_TYPE_FONT_HH
 
-
 #include "font-metric.hh"
 
 Index_to_charcode_map make_index_to_charcode_map (FT_Face face);
-void get_unicode_name (char*s, FT_ULong code);
-void get_glyph_index_name (char*s, FT_ULong code);
+void get_unicode_name (char *s, FT_ULong code);
+void get_glyph_index_name (char *s, FT_ULong code);
 
 class Open_type_font : public Font_metric
 {
@@ -40,13 +39,13 @@ class Open_type_font : public Font_metric
   Index_to_charcode_map index_to_charcode_map_;
   Open_type_font (FT_Face);
 
-  DECLARE_CLASSNAME(Open_type_font);
+  DECLARE_CLASSNAME (Open_type_font);
 public:
   SCM get_subfonts () const;
   SCM get_global_table () const;
   SCM get_char_table () const;
   SCM glyph_list () const;
-    
+
   string get_otf_table (string tag) const;
   static SCM make_otf (string);
   string font_name () const;
@@ -65,5 +64,4 @@ public:
 string get_otf_table (FT_Face face, string tag);
 FT_Face open_ft_face (string str, FT_Long idx);
 
-
 #endif /* OPEN_TYPE_FONT_HH */
index acf6bac51ce43e9d9a11263994c2deabb8eebd03..7d50db2524e9eaffc55705ce1fc2be206067aadc 100644 (file)
@@ -53,23 +53,23 @@ struct Break_position
 {
   /*
     index into system_specs_, if this is VPOS, the Break_position represents the
-    start of the book. 
+    start of the book.
    */
   vsize system_spec_index_;
 
   /* if system_spec_index_ indexes a score, then we start at the score_brk_'th
      possible page-break in the score */
-  vsize score_break_; 
+  vsize score_break_;
 
   /* if system_spec_index_ indexes a score, this points to the broken column */
-  Grob *col_;  
+  Grob *col_;
   bool score_ender_;
 
   /* if non-zero, this is the (fixed, uncompressed) number of lines between
      this Break_position and the previous. */
   int forced_line_count_;
 
-  Break_position (vsize s=VPOS, vsize brk=VPOS, Grob *g=NULL, bool end=false)
+  Break_position (vsize s = VPOS, vsize brk = VPOS, Grob *g = NULL, bool end = false)
   {
     system_spec_index_ = s;
     score_break_ = brk;
@@ -81,18 +81,18 @@ struct Break_position
   /*
     lexicographic in (system_spec_index_, score_break_)
    */
-  bool operator< (const Break_position &other)
+  bool operator < (const Break_position &other)
   {
     return (system_spec_index_ == VPOS && other.system_spec_index_ != VPOS)
-      || (system_spec_index_ < other.system_spec_index_)
-      || (system_spec_index_ == other.system_spec_index_ && score_break_ < other.score_break_);
+           || (system_spec_index_ < other.system_spec_index_)
+           || (system_spec_index_ == other.system_spec_index_ && score_break_ < other.score_break_);
   }
 
-  bool operator<= (const Break_position &other)
+  bool operator <= (const Break_position &other)
   {
     return (system_spec_index_ == VPOS)
-      || (system_spec_index_ < other.system_spec_index_ && other.system_spec_index_ != VPOS)
-      || (system_spec_index_ == other.system_spec_index_ && score_break_ <= other.score_break_);
+           || (system_spec_index_ < other.system_spec_index_ && other.system_spec_index_ != VPOS)
+           || (system_spec_index_ == other.system_spec_index_ && score_break_ <= other.score_break_);
   }
 };
 
@@ -102,7 +102,7 @@ public:
   typedef bool (*Break_predicate) (Grob *);
   typedef bool (*Prob_break_predicate) (Prob *);
   typedef vector<vsize> Line_division;
-  
+
   /*
     TODO: naming.
 
@@ -132,8 +132,8 @@ public:
   int line_count_status (int line_count) const;
   bool too_many_lines (int line_count) const;
   bool too_few_lines (int line_count) const;
-  Real min_whitespace_at_top_of_page (Line_details const&) const;
-  Real min_whitespace_at_bottom_of_page (Line_details const&) const;
+  Real min_whitespace_at_top_of_page (Line_details const &) const;
+  Real min_whitespace_at_bottom_of_page (Line_details const &) const;
   int orphan_penalty () const;
 
 protected:
@@ -146,31 +146,30 @@ protected:
   vsize min_system_count (vsize start, vsize end);
   vsize max_system_count (vsize start, vsize end);
 
-
   void break_into_pieces (vsize start, vsize end, Line_division const &div);
   SCM systems ();
   SCM footnotes ();
 
   void set_current_breakpoints (vsize start,
-                               vsize end,
-                               vsize system_count,
-                               Line_division lower_bound = Line_division (),
-                               Line_division upper_bound = Line_division ());
+                                vsize end,
+                                vsize system_count,
+                                Line_division lower_bound = Line_division (),
+                                Line_division upper_bound = Line_division ());
   void set_to_ideal_line_configuration (vsize start, vsize end);
 
   vsize current_configuration_count () const;
   Line_division current_configuration (vsize configuration_index) const;
   Page_spacing_result space_systems_on_n_pages (vsize configuration_index,
-                                               vsize n, vsize first_page_num);
+                                                vsize n, vsize first_page_num);
   Page_spacing_result space_systems_on_n_or_one_more_pages (vsize configuration_index, vsize n,
-                                                           vsize first_page_num,
-                                                           Real penalty_for_fewer_pages);
+                                                            vsize first_page_num,
+                                                            Real penalty_for_fewer_pages);
   Page_spacing_result space_systems_on_best_pages (vsize configuration_index,
-                                                  vsize first_page_num);
+                                                   vsize first_page_num);
   Page_spacing_result space_systems_with_fixed_number_per_page (vsize configuration_index,
-                                                               vsize first_page_num);
+      vsize first_page_num);
   Page_spacing_result pack_systems_on_least_pages (vsize configuration_index,
-                                                  vsize first_page_num);
+                                                   vsize first_page_num);
   vsize min_page_count (vsize configuration_index, vsize first_page_num);
   bool all_lines_stretched (vsize configuration_index);
   Real blank_page_penalty () const;
@@ -214,15 +213,15 @@ private:
   vector<Break_position> chunk_list (vsize start, vsize end);
   Line_division system_count_bounds (vector<Break_position> const &chunks, bool min);
   void line_breaker_args (vsize i,
-                         Break_position const &start,
-                         Break_position const &end,
-                         vsize *line_breaker_start,
-                         vsize *line_breaker_end);
+                          Break_position const &start,
+                          Break_position const &end,
+                          vsize *line_breaker_start,
+                          vsize *line_breaker_end);
 
   void line_divisions_rec (vsize system_count,
-                          Line_division const &min,
-                          Line_division const &max,
-                          Line_division *cur);
+                           Line_division const &min,
+                           Line_division const &max,
+                           Line_division *cur);
 
   vector<Line_details> line_details (vsize start, vsize end, Line_division const &div);
   Page_spacing_result space_systems_on_1_page (vector<Line_details> const &lines, Real page_height, bool ragged);
index 629528bb53db51c0f4ea5acee8646b59abda545a..6c952e3eedc0526847673566afce7959345d0fcf 100644 (file)
 class Page_layout_problem
 {
 public:
-  Page_layout_problem (Paper_book*, SCM page, SCM systems, int footnote_count);
+  Page_layout_problem (Paper_book *, SCM page, SCM systems, int footnote_count);
 
   SCM solution (bool ragged);
   void set_header_height (Real);
   void set_footer_height (Real);
-  static bool read_spacing_spec (SCM spec, Realdest, SCM sym);
+  static bool read_spacing_spec (SCM spec, Real *dest, SCM sym);
   static bool is_spaceable (Grob *g);
   static SCM get_details (Grob *g);
   static vsize get_footnote_count (SCM lines);
   static SCM get_footnotes_from_lines (SCM lines, int counter, Paper_book *pb);
-  static Stencilget_footnote_separator_stencil (Output_def *paper);
+  static Stencil *get_footnote_separator_stencil (Output_def *paper);
   static SCM get_spacing_spec (Grob *before, Grob *after, bool pure, int start, int end);
   static Real get_fixed_spacing (Grob *before, Grob *after, int spaceable_index, bool pure, int start, int end);
   static void add_footnotes_to_footer (SCM footnotes, Stencil *foot, Paper_book *pb);
 
 protected:
-  void append_system (System*, Spring const&, Real indent, Real padding);
-  void append_prob (Prob*, Spring const&, Real padding);
+  void append_system (System *, Spring const &, Real indent, Real padding);
+  void append_prob (Prob *, Spring const &, Real padding);
 
   void solve_rod_spring_problem (bool ragged);
   SCM find_system_offsets ();
-  void distribute_loose_lines (vector<Grob*> const&, vector<Real> const&, Real, Real);
+  void distribute_loose_lines (vector<Grob *> const &, vector<Real> const &, Real, Real);
 
-  static void build_system_skyline (vector<Grob*> const&, vector<Real> const&, Skyline* up, Skyline* down);
-  static vector<Grob*> filter_dead_elements (vector<Grob*> const&);
+  static void build_system_skyline (vector<Grob *> const &, vector<Real> const &, Skyline *up, Skyline *down);
+  static vector<Grob *> filter_dead_elements (vector<Grob *> const &);
 
   // This is a union (in spirit).
   // Either staves must be empty or prob must be null.
-  typedef struct Element {
+  typedef struct Element
+  {
     Prob *prob;
-    vector<Grob*> staves;
+    vector<Grob *> staves;
     vector<Real> min_offsets;
     // Store the appropriate '*-*-spacing 'padding,
     //  for spacing any adjacent loose line
     Real padding;
 
-    Element (vector<Grob*> const& a, vector<Real> const& o, Real p)
+    Element (vector<Grob *> const &a, vector<Real> const &o, Real p)
     {
       staves = a;
       min_offsets = o;
@@ -77,13 +78,13 @@ protected:
     }
   } Element;
 
-  static Interval first_staff_extent (Element const&);
-  static Interval last_staff_extent (Element const&);
-  static Interval prob_extent (Prob*);
-  static SCM get_details (Element const&);
-  static SCM details_get_property (SCM details, const char*);
-  static void alter_spring_from_spacing_spec (SCM spec, Springspring);
-  static void mark_as_spaceable (Grob*);
+  static Interval first_staff_extent (Element const &);
+  static Interval last_staff_extent (Element const &);
+  static Interval prob_extent (Prob *);
+  static SCM get_details (Element const &);
+  static SCM details_get_property (SCM details, const char *);
+  static void alter_spring_from_spacing_spec (SCM spec, Spring *spring);
+  static void mark_as_spaceable (Grob *);
 
   vector<Spring> springs_;
   vector<Element> elements_;
index 6d32bc6c2bc2752f2ac6d9552f98956b4382e5da..8f1f836af680e5c5cffab0e11682664b014471eb 100644 (file)
 // to represent the system count of several pages simultaneously,
 // it could be that one page has too many systems while another
 // has too few.
-typedef enum {
+typedef enum
+{
   SYSTEM_COUNT_OK = 0,
   SYSTEM_COUNT_TOO_MANY = 1,
   SYSTEM_COUNT_TOO_FEW = 2
 } System_count_status;
 
-struct Page_spacing_result {
+struct Page_spacing_result
+{
   vector<vsize> systems_per_page_;
   vector<Real> force_;
   Real penalty_;
@@ -42,7 +44,7 @@ struct Page_spacing_result {
 
   Real average_force () const;
   vsize page_count () const;
-  void print () const;  
+  void print () const;
   Page_spacing_result ();
 };
 
index 206bcbf426bb4193ab7c0bdf03c3665c01711229..111c154e27fedd2ab46452919707db5cba405f3d 100644 (file)
@@ -43,7 +43,6 @@
 const Real BAD_SPACING_PENALTY = 1e6;
 const Real TERRIBLE_SPACING_PENALTY = 1e8;
 
-
 /* for page_count > 2, we use a dynamic algorithm similar to
    constrained-breaking -- we have a class that stores the intermediate
    calculations so they can be reused for querying different page counts.
@@ -51,7 +50,7 @@ const Real TERRIBLE_SPACING_PENALTY = 1e8;
 class Page_spacer
 {
 public:
-  Page_spacer (vector<Line_details> const &lines, vsize first_page_num, Page_breaking const*);
+  Page_spacer (vector<Line_details> const &lines, vsize first_page_num, Page_breaking const *);
   Page_spacing_result solve (vsize page_count);
   Page_spacing_result solve ();
 
index 6717e5ba4a98d959491815d6b80742f951f6e43c..b090c0a15b0fecebd627aaff60479372acf6674d 100644 (file)
@@ -63,9 +63,9 @@ protected:
 
   vsize total_page_count (Break_node const &b);
   Break_node put_systems_on_pages (vsize start,
-                                  vsize end,
-                                  vsize configuration,
-                                  vsize page_number);
+                                   vsize end,
+                                   vsize configuration,
+                                   vsize page_number);
 
   SCM make_lines (vector<Break_node> *breaks);
   SCM make_pages (vector<Break_node> const &breaks, SCM systems);
index 3d435af9ca5ccba2640c63abcc76674f01bc421c..b92eb60c429d8af7da3403a671a645f1d75546a0 100644 (file)
@@ -42,11 +42,11 @@ class Pango_font : public Font_metric
 public:
   SCM physical_font_tab () const;
   Pango_font (PangoFT2FontMap *,
-             PangoFontDescription const *,
-             Real);
+              PangoFontDescription const *,
+              Real);
   ~Pango_font ();
 
-  string description_string () const; 
+  string description_string () const;
   SCM font_file_name () const;
   void register_font_file (string, string, int);
 
@@ -59,10 +59,10 @@ public:
 
 PangoFontDescription *
 symbols_to_pango_font_description (SCM family,
-                                  SCM style,
-                                  SCM variant,
-                                  SCM weight,
-                                  SCM stretch);
+                                   SCM style,
+                                   SCM variant,
+                                   SCM weight,
+                                   SCM stretch);
 
 Font_metric *
 select_pango_font (Output_def *layout, SCM chain);
index dd05ee41d23e20fe06943b8f0a394a61b8f0be66..fad47fe1ad35ecbf50c2c2856028625eee666a63 100644 (file)
@@ -37,7 +37,7 @@ class Paper_book
 
   void add_score_title (SCM);
   SCM get_score_title (SCM);
-  
+
 public:
   SCM header_;
   SCM header_0_;
@@ -59,20 +59,19 @@ public:
   SCM pages ();
   SCM get_system_specs ();
 
-
   Stencil book_title ();
   Stencil score_title (SCM);
-  
+
   void classic_output (SCM output_channel);
   void output (SCM output_channel);
 
 protected:
   void classic_output_aux (SCM output,
-                          int *first_performance_number);
+                           int *first_performance_number);
   int output_aux (SCM output_channel,
-                 bool is_last,
-                 int *first_page_number,
-                 int *first_performance_number);
+                  bool is_last,
+                  int *first_page_number,
+                  int *first_performance_number);
 };
 
 DECLARE_UNSMOB (Paper_book, paper_book)
index 449b26d9a45877351c2b271036caacc25b432a1d..edb6ad8d59bbaab5cae97000772a2b3b370b1900 100644 (file)
@@ -49,12 +49,12 @@ protected:
   DECLARE_ACKNOWLEDGER (staff_spacing);
 
   System *system_;
-  vector<Stream_event*> break_events_;
-  vector<Stream_event*> label_events_;
-  int breaks_;                 // used for stat printing
+  vector<Stream_event *> break_events_;
+  vector<Stream_event *> label_events_;
+  int breaks_;                  // used for stat printing
   Paper_column *command_column_;
   Paper_column *musical_column_;
-  vector<Item*> items_;
+  vector<Item *> items_;
   bool first_;
   bool made_columns_;
   Moment last_moment_;
index bc2eec12c22d400cb7d1c3c37152a4f5fbd8c7bc..acfd84668a693fafa739618a90211f786e843c9a 100644 (file)
@@ -39,10 +39,10 @@ public:
   virtual System *get_system () const;
   void set_system (System *);
 
-  static int compare (Grob * const &a,
-                     Grob * const &b);
+  static int compare (Grob *const &a,
+                      Grob *const &b);
   static bool less_than (Grob *const &a,
-                        Grob *const &b);
+                         Grob *const &b);
 
   int get_rank () const { return rank_; }
   void set_rank (int);
@@ -50,7 +50,7 @@ public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
 
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static int get_rank (Grob const *);
   static bool is_musical (Grob *);
   static Moment when_mom (Grob *);
index aec2846232fb1cfdc5a510acfa45c97197f151e9..fcce96ac911716afc99a50eebabcdbf8a4855007 100644 (file)
@@ -31,13 +31,13 @@ class Paper_score : public Music_output
   SCM systems_;
   SCM paper_systems_;
 
-  mutable vector<Grob*> cols_;
+  mutable vector<Grob *> cols_;
   mutable vector<vsize> break_indices_;
   mutable vector<vsize> break_ranks_;
 public:
   Paper_score (Output_def *);
-  
-  DECLARE_CLASSNAME(Paper_score);
+
+  DECLARE_CLASSNAME (Paper_score);
 
   Output_def *layout () const;
   System *root_system () const;
@@ -46,7 +46,7 @@ public:
   vector<Column_x_positions> calc_breaking ();
   vector<vsize> get_break_indices () const;
   vector<vsize> get_break_ranks () const;
-  vector<Grob*> get_columns () const;
+  vector<Grob *> get_columns () const;
   SCM get_paper_systems ();
 protected:
   void find_break_indices () const;
index 0322502e16fbcc4acd1ac88f6066794ca246c3d8..ad086061f867e86f61ea1779be5c72d63d294974 100644 (file)
@@ -34,12 +34,13 @@ struct Parse_start
   bool safe_;
   Lily_parser *parser_;
 
-  Parse_start() {
+  Parse_start ()
+  {
     str = 0;
     nchars = 0;
     safe_ = false;
     parser_ = 0;
-  }     
+  }
 };
 
 SCM catch_protected_parse_body (void *);
index a9e59e35f512f1fc711d27993f71dc5c33cffab5..999d0bbeb5d102ce3357f2a3655644ea33428ddf 100644 (file)
@@ -26,7 +26,7 @@
 class Percent_repeat_item_interface
 {
 public:
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (beat_slash, (SCM));
   DECLARE_SCHEME_CALLBACK (double_percent, (SCM));
   static Stencil x_percent (Grob *, int);
index 9612fb8aedd6c301639b6e12c21a15533352790d..31d65d9b33ad121489814934a2d3a7e751e9d1e1 100644 (file)
@@ -27,9 +27,9 @@
 class Performance : public Music_output
 {
 public:
-  Performance (bool ports=false);
+  Performance (bool ports = false);
   ~Performance ();
-  DECLARE_CLASSNAME(Performance);
+  DECLARE_CLASSNAME (Performance);
 
   void add_element (Audio_element *p);
   virtual void process ();
@@ -40,8 +40,8 @@ public:
   void print () const;
   void write_output (string filename) const;
 
-  vector<Audio_staff*> audio_staffs_;
-  vector<Audio_element*> audio_elements_;
+  vector<Audio_staff *> audio_staffs_;
+  vector<Audio_element *> audio_elements_;
   Output_def *midi_;
   bool ports_;
 };
index df829b2a0d3f8860259e1ae41ea4ef35d3d2bbe7..e0a6b45b87906eafcad29e2c2637052e038e314a 100644 (file)
@@ -24,7 +24,6 @@
 #include "smobs.hh"
 #include "rational.hh"
 
-
 /*
   A "tonal" pitch.  This is a pitch used in diatonal western music
   (24 quartertones in an octave), as opposed to a frequency in Hz or a
@@ -75,8 +74,8 @@ public:
   DECLARE_SIMPLE_SMOBS (Pitch);
 };
 
-
-enum {
+enum
+{
   DOUBLE_FLAT = -4,
   THREE_Q_FLAT,
   FLAT,
index 4d1a96aedef0ce5d450809f1cc6848a79c925c1c..b84ecc4571b81ade2da1a0fa38a7b436d1515fcb 100644 (file)
@@ -32,12 +32,12 @@ public:
   static void add_grob (Grob *, SCM nm, SCM x);
   static void add_unordered_grob (Grob *, SCM nm, Grob *);
   static void set_ordered (Grob *, SCM, bool);
-  static Grob_array *get_grob_array (Grob*, SCM);
-  static Grob *find_grob (Grob*, SCM, bool (*pred) (Grob*));
+  static Grob_array *get_grob_array (Grob *, SCM);
+  static Grob *find_grob (Grob *, SCM, bool (*pred) (Grob *));
 };
 
-vector<Grob*> const &internal_extract_grob_array (Grob const *elt, SCM symbol);
-vector<Item*> internal_extract_item_array (Grob const *elt, SCM symbol);
+vector<Grob *> const &internal_extract_grob_array (Grob const *elt, SCM symbol);
+vector<Item *> internal_extract_item_array (Grob const *elt, SCM symbol);
 
 #define extract_grob_array(x, prop) internal_extract_grob_array (x, ly_symbol2scm (prop))
 #define extract_item_array(x, prop) internal_extract_item_array (x, ly_symbol2scm (prop))
@@ -46,9 +46,9 @@ vector<Item*> internal_extract_item_array (Grob const *elt, SCM symbol);
   This is dubious coding style, but lets not risk that we change the
   representation of grob sets again.
 */
-#define extract_grob_set(grob, prop, set)                              \
+#define extract_grob_set(grob, prop, set)                               \
   vector<Grob*> const &set (internal_extract_grob_array (grob, ly_symbol2scm (prop)))
-#define extract_item_set(grob, prop, set)                              \
+#define extract_item_set(grob, prop, set)                               \
   vector<Item*> set (internal_extract_item_array (grob, ly_symbol2scm (prop)))
 
 #endif /* POINTER_GROUP_INTERFACE_HH */
index 5d4a50029f251454a743fbf25cfb2b7e92d3467b..dff74f49d5e096f3843544c69631e2d9a727de1f 100644 (file)
@@ -23,7 +23,6 @@
 #include "stencil.hh"
 #include "virtual-methods.hh"
 
-
 /*
   A formatted "system" (A block of titling also is a Property_object)
 
 class Prob
 {
   DECLARE_SMOBS (Prob);
-  DECLARE_CLASSNAME(Prob);
+  DECLARE_CLASSNAME (Prob);
 
   void init_vars ();
 protected:
   SCM mutable_property_alist_;
   SCM immutable_property_alist_;
   SCM type_;
-  
+
   virtual void derived_mark () const;
   virtual SCM copy_mutable_properties () const;
-  virtual void type_check_assignment (SCM,SCM) const;
-  
+  virtual void type_check_assignment (SCM, SCM) const;
+
 public:
   Prob (SCM, SCM);
   Prob (Prob const &);
@@ -54,15 +53,15 @@ public:
   SCM type () const { return type_; }
   SCM get_property_alist (bool _mutable) const;
   SCM internal_get_property (SCM sym) const;
-  void instrumented_set_property (SCM, SCM, const char*, int, const char*);
+  void instrumented_set_property (SCM, SCM, const char *, int, const char *);
   void internal_set_property (SCM sym, SCM val);
 };
 
-DECLARE_UNSMOB(Prob,prob);
+DECLARE_UNSMOB (Prob, prob);
 
 SCM ly_prob_set_property_x (SCM system, SCM sym, SCM value);
 SCM ly_prob_property (SCM prob, SCM sym, SCM val);
 
 SCM ly_prob_type_p (SCM obj, SCM sym);
-  
+
 #endif /* PROPERTY_OBJECT_HH */
index c53a4d9648162c1a2aa07c78fbb9f8760b0ca1c0..2e6548b2acc4a71ac02692452e165f55cc453172 100644 (file)
@@ -30,7 +30,7 @@ class Property_iterator : public Simple_music_iterator
 public:
   DECLARE_SCHEME_CALLBACK (constructor, ());
   DECLARE_SCHEME_CALLBACK (once_finalization, (SCM, SCM, SCM));
-  DECLARE_CLASSNAME(Property_iterator);
+  DECLARE_CLASSNAME (Property_iterator);
 
 protected:
   virtual void do_quit ();
@@ -44,7 +44,7 @@ class Property_unset_iterator : public Simple_music_iterator
 {
 public:
   DECLARE_SCHEME_CALLBACK (constructor, ());
-  DECLARE_CLASSNAME(Property_unset_iterator);
+  DECLARE_CLASSNAME (Property_unset_iterator);
 protected:
   virtual void process (Moment);
 };
@@ -54,7 +54,7 @@ class Push_property_iterator : public Simple_music_iterator
 public:
   DECLARE_SCHEME_CALLBACK (constructor, ());
   DECLARE_SCHEME_CALLBACK (once_finalization, (SCM, SCM));
-  DECLARE_CLASSNAME(Push_property_iterator);
+  DECLARE_CLASSNAME (Push_property_iterator);
 protected:
   virtual void process (Moment);
   virtual void do_quit ();
@@ -64,7 +64,7 @@ class Pop_property_iterator : public Simple_music_iterator
 {
 public:
   DECLARE_SCHEME_CALLBACK (constructor, ());
-  DECLARE_CLASSNAME(Pop_property_iterator);
+  DECLARE_CLASSNAME (Pop_property_iterator);
 protected:
   virtual void process (Moment);
 };
index a954b6f24b9c6ad88457dc25cfacd2975f1885da..b35c6e2e41a89a6f59354823dbe5bb33863b7987 100644 (file)
@@ -28,7 +28,7 @@ class Rest_collision
 public:
   static void add_column (Grob *me, Grob *);
 
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM element));
   DECLARE_SCHEME_CALLBACK (force_shift_callback_rest, (SCM element, SCM off));
   static SCM do_shift (Grob *);
index 053e3960c0d1dcb745ceb77bdc546dd8b5768fe3..ba1ab3e90a98e4b1eb5857e771266c31e502efcf 100644 (file)
@@ -29,10 +29,10 @@ class Rest
 public:
   DECLARE_SCHEME_CALLBACK (y_offset_callback, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static string glyph_name (Grob *, int, string, bool);
-  static SCM brew_internal_stencil (Grob*, bool);
-  static SCM generic_extent_callback (Grob*, Axis);
+  static SCM brew_internal_stencil (Grob *, bool);
+  static SCM generic_extent_callback (Grob *, Axis);
   static void translate (Grob *me, int dy);
   DECLARE_SCHEME_CALLBACK (polyphonic_offset_callback, (SCM));
   DECLARE_SCHEME_CALLBACK (print, (SCM));
index 7dbe9fa2e7c3792dbbee5a53df527759e31a7c91..8cad135232556da386553cc34d2298c8616fd71d 100644 (file)
@@ -32,7 +32,7 @@ public:
   static Item *get_dots (Grob *);
   static int dot_count (Grob *);
   DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif // RHYTHMIC_HEAD_HH
index 7f6a8817625483f98a6c39b7489d94ff57ea65a9..4562d372a7dfd6a251d4b430a49460f5af4b432e 100644 (file)
@@ -27,8 +27,8 @@
 struct Scale
 {
 public:
-  Scale (vector<Rational> const&);
-  Scale (Scale const&);
+  Scale (vector<Rational> const &);
+  Scale (Scale const &);
 
   Rational tones_at_step (int step, int octave) const;
   Rational step_size (int step) const;
@@ -45,4 +45,3 @@ extern Scale *default_global_scale;
 
 #endif /* SCALE_HH */
 
-
index 9ae0591bb4bda9fb33806fa6bda55e4e7276f12d..e3d0839db6b38208e5c3f8dbb88b88f824da9bbd 100644 (file)
@@ -1,8 +1,8 @@
-/* 
+/*
   scheme-engraver.hh -- declare Scheme_engraver
-  
+
   source file of the GNU LilyPond music typesetter
-  
+
   Copyright (c) 2009--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
 
   LilyPond is free software: you can redistribute it and/or modify
@@ -16,8 +16,7 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.  
-  
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef SCHEME_ENGRAVER_HH
 
 #include "engraver.hh"
 
-class Scheme_engraver : public Engraver {
+class Scheme_engraver : public Engraver
+{
 public:
   void init_from_scheme (SCM definition);
   TRANSLATOR_DECLARATIONS_NO_LISTENER (Scheme_engraver);
-  
+
   static Listener get_listener (void *generic_arg, SCM event);
-  
+
 protected:
   ~Scheme_engraver ();
-  
+
   void stop_translation_timestep ();
   void start_translation_timestep ();
   void process_music ();
@@ -54,7 +54,7 @@ private:
   DECLARE_END_ACKNOWLEDGER (grob);
 
   bool must_be_last_;
-  
+
   SCM acknowledge_grob_function_;
   SCM stop_translation_timestep_function_;
   SCM start_translation_timestep_function_;
index 3be8eb42f1eccc7e0c62fd3faa927e249e712af6..7bf177576b8ea2578ec393e2eafdc2069b76e2fd 100644 (file)
@@ -26,7 +26,7 @@ class Score_engraver : public Engraver_group
 {
   System *system_;
 
-  vector<Grob*> elems_;
+  vector<Grob *> elems_;
   Paper_score *pscore_;
 
   void typeset_all ();
index ea76373e555ccf2a2953c8bafcda0d7602672521..85a57d302783dc95aa3a4c4f9c70c6211e195e9c 100644 (file)
@@ -30,8 +30,8 @@ public:
   static void add_side_positioned (Grob *, Grob *);
   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
   DECLARE_SCHEME_CALLBACK (row_before_line_breaking, (SCM));
-  DECLARE_GROB_INTERFACE();
-  static void order_grobs (vector<Grob*> grobs);
+  DECLARE_GROB_INTERFACE ();
+  static void order_grobs (vector<Grob *> grobs);
 
 };
 
index 4ec00d01dff93bbbdae5b1857db6d49e894a1b19..3063594e715cce64850ec5769782c9649a86a806 100644 (file)
@@ -34,15 +34,15 @@ public:
   static Stencil get_stencil (Grob *, Direction d);
   static Direction get_direction (Grob *);
 
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
 };
 
-void make_script_from_event (Grob *p,  Context *tg,
-                            SCM type, int index);
+void make_script_from_event (Grob *p, Context *tg,
+                             SCM type, int index);
 
 #endif /* SCRIPT_INTERFACE_HH */
 
index be51ee061a6f93f10bdbd7fed1b1f09bbc4a9397..8ecde08a3e2f03b581e9611b44d8ae776935d570 100644 (file)
 
 struct Self_alignment_interface
 {
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 
   static SCM aligned_on_self (Grob *me, Axis a, bool pure, int start, int end);
   static SCM centered_on_object (Grob *me, Axis a);
   static SCM aligned_on_parent (Grob *me, Axis a);
   static void set_center_parent (Grob *me, Axis a);
   static void set_align_self (Grob *me, Axis a);
-  
+
   DECLARE_SCHEME_CALLBACK (x_aligned_on_self, (SCM element));
   DECLARE_SCHEME_CALLBACK (y_aligned_on_self, (SCM element));
 
index 58511cb170841f8e74bbebdd386e5c6df88c99e1..836fc9688834ec5a56d7cc984d8229664e32605b 100644 (file)
 
 struct Semi_tie_column
 {
-  DECLARE_GROB_INTERFACE();
-  
+  DECLARE_GROB_INTERFACE ();
+
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_head_direction, (SCM));
 };
 
-
 #endif /* SEMI_TIE_COLUMN_HH */
 
index 8cbb3601d7e9d6cf26869e8694788c3fa8160f81..34ff039e6fa4ded728a5366fc88402785a1176dd 100644 (file)
 #ifndef SEMI_TIE_HH
 #define SEMI_TIE_HH
 
-
 #include "grob-interface.hh"
 #include "lily-proto.hh"
 
 struct Semi_tie
 {
-  DECLARE_GROB_INTERFACE();
-  
+  DECLARE_GROB_INTERFACE ();
+
   DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_control_points, (SCM));
   static bool less (Grob *const &s1,
-                   Grob *const &s2);
+                    Grob *const &s2);
   static int get_position (Grob *);
 };
 
index 60bdac96bfc420b5cd1fb3c6b55735f964e20511..afe9169b10bc57cf2f49100efbdb0c7d6d6bf4cf 100644 (file)
@@ -30,7 +30,7 @@ class Sequential_iterator : public Music_iterator
 {
 public:
   DECLARE_SCHEME_CALLBACK (constructor, ());
-  DECLARE_CLASSNAME(Sequential_iterator);
+  DECLARE_CLASSNAME (Sequential_iterator);
   Sequential_iterator ();
   Sequential_iterator (Sequential_iterator const &);
   virtual void derived_substitute (Context *f, Context *t);
@@ -45,10 +45,10 @@ public:
 protected:
   virtual void process (Moment);
   virtual bool run_always () const;
-  
+
 protected:
   Music_iterator *iter_;
-  
+
   virtual SCM get_music_list () const;
   virtual void next_element (bool side_effect);
 
index 624bff4e89544c58a594c4c2433f418e32b424f1..b7d1427ee371adb693b1b468f4065ce449313b79 100644 (file)
@@ -40,13 +40,13 @@ public:
   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM element));
   DECLARE_SCHEME_CALLBACK (move_to_extremal_staff, (SCM));
 
-  static SCM aligned_side (Grob*me, Axis a, bool pure, int start, int end, Real *current_off_ptr);
+  static SCM aligned_side (Grob *me, Axis a, bool pure, int start, int end, Real *current_off_ptr);
 
   static SCM general_side_position (Grob *, Axis, bool, bool my_extents,
-                                   bool pure, int start, int end, Real *current_off);
+                                    bool pure, int start, int end, Real *current_off);
   static Axis get_axis (Grob *);
   static void set_axis (Grob *, Axis);
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static void add_support (Grob *, Grob *);
   static void add_staff_support (Grob *);
 };
index f046b84689cb2cb438b810e7feb5ee1b152607b5..df20fb817c45e42bdb9258bcf49cd317ea14e126 100644 (file)
@@ -29,7 +29,7 @@
 class Simple_music_iterator : public Music_iterator
 {
 protected:
-  DECLARE_CLASSNAME(Simple_music_iterator);
+  DECLARE_CLASSNAME (Simple_music_iterator);
 
   Moment last_processed_mom_;
 public:
index 895fbcf8d866dcfe2f687ad0239b750d6fe26e2c..620921fe9ad300f49b03810b2eeb7309a070009a 100644 (file)
@@ -32,7 +32,7 @@ public:
 
   void solve (Real line_len, bool ragged);
   void add_rod (int l, int r, Real dist);
-  void add_spring (Spring const&);
+  void add_spring (Spring const &);
   Real range_ideal_len (int l, int r) const;
   Real range_stiffness (int l, int r, bool stretch) const;
   Real configuration_length (Real) const;
@@ -57,15 +57,15 @@ private:
 };
 
 /* returns a vector of dimensions breaks.size () * breaks.size () */
-vector<Real> get_line_forces (vector<Grob*> const &columns,
-                             Real line_len,
-                             Real indent,
-                             bool ragged);
-
-Column_x_positions get_line_configuration (vector<Grob*> const &columns,
-                                          Real line_len,
-                                          Real indent,
-                                          bool ragged);
+vector<Real> get_line_forces (vector<Grob *> const &columns,
+                              Real line_len,
+                              Real indent,
+                              bool ragged);
+
+Column_x_positions get_line_configuration (vector<Grob *> const &columns,
+                                           Real line_len,
+                                           Real indent,
+                                           bool ragged);
 
 #endif /* SIMPLE_SPACER_HH */
 
index ff1100fb6d1951e7a1b5be2794bf80c62aec224f..30094126f421e1b4ad7d8eb2b889b7cd3500a694 100644 (file)
@@ -30,7 +30,7 @@ public:
   virtual void derived_substitute (Context *f, Context *t);
   virtual void derived_mark () const;
   DECLARE_SCHEME_CALLBACK (constructor, ());
-  DECLARE_CLASSNAME(Simultaneous_music_iterator);
+  DECLARE_CLASSNAME (Simultaneous_music_iterator);
 
   /// make a new context for every child.
   bool create_separate_contexts_;
index b32bd13815a522a01717f2e582630354eb0d5003..f4b5ced9e300a8c00a1d2014e25afc4827c51cbf 100644 (file)
@@ -27,7 +27,7 @@ class Skyline_pair
 private:
   Drul_array<Skyline> skylines_;
 
-  DECLARE_SIMPLE_SMOBS(Skyline_pair);
+  DECLARE_SIMPLE_SMOBS (Skyline_pair);
 public:
   Skyline_pair ();
   Skyline_pair (vector<Box> const &boxes, Real horizon_padding, Axis a);
index bb637a21bb4a56710c188e53dbdcb136a49b629a..2eccdb2ef4363a14389935a19b2da5b3a0977d81 100644 (file)
@@ -55,10 +55,10 @@ private:
   Direction sky_;
 
   void internal_merge_skyline (list<Building>*, list<Building>*,
-                              list<Building> *const result);
+                               list<Building> *const result);
   list<Building> internal_build_skyline (list<Box>*, Real, Axis, Direction);
 
-  DECLARE_SIMPLE_SMOBS(Skyline);
+  DECLARE_SIMPLE_SMOBS (Skyline);
 
 public:
   Skyline ();
index a4d78f99c912b913fe6cf9449869f3ab085d036c..acf2b1fdc6f21abc08870e59b414a1d737719af6 100644 (file)
@@ -46,15 +46,15 @@ public:
   };
 
   int next_scorer_todo;
-  
+
   Slur_configuration ();
 
   Real score () const { return score_; }
-  string card () const { return score_card_; } 
+  string card () const { return score_card_; }
   void add_score (Real, string);
-  
+
   void generate_curve (Slur_score_state const &state, Real r0, Real h_inf,
-                      vector<Offset> const &);
+                       vector<Offset> const &);
   void run_next_scorer (Slur_score_state const &);
   bool done () const;
   static Slur_configuration *new_config (Drul_array<Offset> const &offs, int idx);
@@ -72,7 +72,7 @@ protected:
 class Slur_configuration_less
 {
 public:
-  bool operator () (Slur_configuration* const& l, Slur_configuration* const& r)
+  bool operator () (Slur_configuration *const &l, Slur_configuration *const &r)
   {
     // Invert
     return l->score_ > r->score_;
index 866b216942f5dc831995567de7484e1a7581d09d..82784c49718ceabab7f118d11ab4970181b1faf6 100644 (file)
@@ -32,7 +32,7 @@ struct Extra_collision_info
   Real penalty_;
   Grob *grob_;
   SCM type_;
-  
+
   Extra_collision_info (Grob *g, Real idx, Interval x, Interval y, Real p);
   Extra_collision_info ();
 };
@@ -89,7 +89,7 @@ struct Slur_score_state
   bool has_same_beam_;
 
   Real musical_dy_;
-  vector<Grob*> columns_;
+  vector<Grob *> columns_;
   vector<Encompass_info> encompass_infos_;
   vector<Extra_collision_info> extra_encompass_infos_;
 
@@ -97,7 +97,7 @@ struct Slur_score_state
   Slur_score_parameters parameters_;
   Drul_array<Bound_info> extremes_;
   Drul_array<Offset> base_attachments_;
-  vector<Slur_configuration*> configurations_;
+  vector<Slur_configuration *> configurations_;
   Real staff_space_;
   Real thickness_;
 
@@ -108,18 +108,18 @@ struct Slur_score_state
   Slur_configuration *get_best_curve () const;
   void fill (Grob *);
   Direction slur_direction () const;
-  
+
   vector<Offset> generate_avoid_offsets () const;
   Drul_array<Bound_info> get_bound_info () const;
   void generate_curves () const;
-  vector<Slur_configuration*> enumerate_attachments (Drul_array<Real> end_ys) const;
+  vector<Slur_configuration *> enumerate_attachments (Drul_array<Real> end_ys) const;
   Drul_array<Offset> get_base_attachments () const;
   Drul_array<Real> get_y_attachment_range () const;
   Encompass_info get_encompass_info (Grob *col) const;
   vector<Extra_collision_info> get_extra_encompass_infos () const;
   Real move_away_from_staffline (Real y, Grob *on_staff) const;
 
-  Grob *breakable_bound_item (Direction) const;  
+  Grob *breakable_bound_item (Direction) const;
 };
 
 void set_slur_control_points (Grob *me);
index 7abc764559b4c07d40227f6f06c5c87847f9d5ec..78659c93171a84162cebc92e9ad0231b244f4891 100644 (file)
@@ -30,7 +30,7 @@ public:
   static void add_column (Grob *me, Grob *col);
   static void add_extra_encompass (Grob *me, Grob *col);
   static void replace_breakable_encompass_objects (Grob *me);
-  static void auxiliary_acknowledge_extra_object (Grob_info const &, vector<Grob*>&, vector<Grob*>&);
+  static void auxiliary_acknowledge_extra_object (Grob_info const &, vector<Grob *>&, vector<Grob *>&);
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_control_points, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
@@ -40,7 +40,7 @@ public:
   DECLARE_SCHEME_CALLBACK (pure_outside_slur_callback, (SCM, SCM, SCM, SCM));
   DECLARE_SCHEME_CALLBACK (outside_slur_cross_staff, (SCM, SCM));
   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static Bezier get_curve (Grob *me);
 };
 
index cf6ffcc9a3fb2f5f4754ffe875b17025885973df..f0cea0230191deb01516d24c035c1ac3daf0bb3b 100644 (file)
   from file "ly-smobs.icc"
 */
 
-#define DECLARE_SIMPLE_SMOBS(CL)               \
-  public:                                      \
-  SCM smobbed_copy () const;                   \
+#define DECLARE_SIMPLE_SMOBS(CL)                \
+  public:                                       \
+  SCM smobbed_copy () const;                    \
   DECLARE_BASE_SMOBS (CL)
 
-#define DECLARE_BASE_SMOBS(CL)                                 \
-  friend class Non_existent_class;                             \
-  private:                                                     \
+#define DECLARE_BASE_SMOBS(CL)                                  \
+  friend class Non_existent_class;                              \
+  private:                                                      \
   static const char* smob_name_; \
-  static scm_t_bits smob_tag_;                                 \
-  static SCM mark_smob (SCM);                                  \
-  static size_t free_smob (SCM s);                             \
-  static int print_smob (SCM s, SCM p, scm_print_state*);      \
-  public:                                                      \
-  static SCM equal_p (SCM a, SCM b);                           \
-  static CL *unsmob (SCM s) __attribute__((pure))              \
-  {                                                            \
-    if (SCM_NIMP (s) && SCM_CELL_TYPE (s) == smob_tag_)                \
-      return (CL *) SCM_CELL_WORD_1 (s);                       \
-    else                                                       \
-      return 0;                                                        \
-  }                                                            \
-  static SCM smob_p (SCM);                                     \
-  static void init_smobs ();                                   \
+  static scm_t_bits smob_tag_;                                  \
+  static SCM mark_smob (SCM);                                   \
+  static size_t free_smob (SCM s);                              \
+  static int print_smob (SCM s, SCM p, scm_print_state*);       \
+  public:                                                       \
+  static SCM equal_p (SCM a, SCM b);                            \
+  static CL *unsmob (SCM s) __attribute__((pure))               \
+  {                                                             \
+    if (SCM_NIMP (s) && SCM_CELL_TYPE (s) == smob_tag_)         \
+      return (CL *) SCM_CELL_WORD_1 (s);                        \
+    else                                                        \
+      return 0;                                                 \
+  }                                                             \
+  static SCM smob_p (SCM);                                      \
+  static void init_smobs ();                                    \
   private:
 
-#define DECLARE_SMOBS(CL)                      \
-  DECLARE_BASE_SMOBS (CL)                      \
-    protected:                                 \
-  virtual ~CL ();                              \
-  SCM unprotected_smobify_self ();             \
-  private:                                     \
-  void smobify_self ();                                \
-  SCM self_scm_;                               \
-  SCM protection_cons_;                                \
-  public:                                      \
-  SCM unprotect ();                            \
-  void protect ();                             \
-  SCM self_scm () const { return self_scm_; }  \
+#define DECLARE_SMOBS(CL)                       \
+  DECLARE_BASE_SMOBS (CL)                       \
+    protected:                                  \
+  virtual ~CL ();                               \
+  SCM unprotected_smobify_self ();              \
+  private:                                      \
+  void smobify_self ();                         \
+  SCM self_scm_;                                \
+  SCM protection_cons_;                         \
+  public:                                       \
+  SCM unprotect ();                             \
+  void protect ();                              \
+  SCM self_scm () const { return self_scm_; }   \
   private:
 
-#define DECLARE_UNSMOB(CL, name)               \
-  inline CL *                                  \
-  unsmob_ ## name (SCM s)                      \
-  {                                            \
-    return CL::unsmob (s);                     \
+#define DECLARE_UNSMOB(CL, name)                \
+  inline CL *                                   \
+  unsmob_ ## name (SCM s)                       \
+  {                                             \
+    return CL::unsmob (s);                      \
   }
 
 #define DECLARE_TYPE_P(CL) extern SCM CL ## _type_p_proc
index 9dedceb48ba17c2310c20a4eea4b8cf8b5e781cc..0210418c6531029e45e396d892a42bb0780fbd35 100644 (file)
@@ -37,7 +37,7 @@ using namespace std;
 
 class Source_file
 {
-  vector<char const*> newline_locations_;
+  vector<char const *> newline_locations_;
   istream *istream_;
   vector<char> characters_;
   SCM str_port_;
@@ -45,7 +45,7 @@ class Source_file
   void load_stdin ();
   void init_port ();
   void init ();
-  
+
   DECLARE_SMOBS (Source_file);
 public:
   Source_file (string fn);
@@ -65,7 +65,7 @@ public:
   Slice line_slice (char const *pos_str0) const;
   string line_string (char const *pos_str0) const;
   void get_counts (char const *pos_str0, int *, int *, int *, int *) const;
-  
+
   SCM get_port () const;
   string name_;
 
index b873ac8bc0ab11f918bf693cdfb6320abfd9c53d..d9deec1baacdc50ed26f2dc5e03ce39cfe67268a 100644 (file)
 class Sources
 {
   Sources (Sources const &);
-  vector<Source_file*> sourcefiles_;
+  vector<Source_file *> sourcefiles_;
 
 public:
   Sources ();
   ~Sources ();
 
-  Source_file *get_file (string file_name, string constcurrentpath);
+  Source_file *get_file (string file_name, string const &currentpath);
   void add (Source_file *sourcefile);
   void set_path (File_path *);
 
index 5788fecb476ece901265fbd8b797f2a266814656..16594c0fd5c8e95bf8089c1673342419c4efa26f 100644 (file)
@@ -31,7 +31,7 @@ struct Spaceable_grob
   static void add_spring (Grob *me, Grob *to, Spring sp);
   static Spring get_spring (Grob *me, Grob *other);
 
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static SCM get_minimum_distances (Grob *);
   static SCM get_ideal_distances (Grob *);
 };
index 5b23672c30b90625ccbafd1fe6fe8fba4ce7b9f3..b567f2dd1c2c26416c4f870d6066819960639a9d 100644 (file)
 struct Spacing_interface
 {
   static Real minimum_distance (Grob *me, Grob *right_col);
-  static vector<Item*> right_note_columns (Grob *me);
-  static vector<Item*> left_note_columns (Grob *me);
-  static Itemright_column (Grob *me);
-  static Itemleft_column (Grob *me);
+  static vector<Item *> right_note_columns (Grob *me);
+  static vector<Item *> left_note_columns (Grob *me);
+  static Item *right_column (Grob *me);
+  static Item *left_column (Grob *me);
   static Drul_array<Skyline> skylines (Grob *me, Grob *right_col);
-  static Grob* extremal_break_aligned_grob (Grob *me, Direction, Direction, Interval*);
+  static Grob *extremal_break_aligned_grob (Grob *me, Direction, Direction, Interval *);
 
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* SPACING_INTERFACE_HH */
index c96f1d0cfbec37e82b3a2992a28773392aacc6e2..0e465c8cffc9c9340e1432ea7841c67f817cf8f6 100644 (file)
@@ -38,8 +38,8 @@ struct Spacing_options
   Rational global_shortest_;
   Real increment_;
   Real shortest_duration_space_;
-  
-  Spacing_options();
+
+  Spacing_options ();
   void init_from_grob (Grob *me);
   Real get_duration_space (Rational d) const;
 };
index d469c3f4636a9069065caf0c688afe0b93700319..c7316fecb2645c8eeed673a43f40db72d235df66 100644 (file)
@@ -31,26 +31,26 @@ class Spacing_spanner
 private:
   static void set_distances_for_loose_col (Grob *me, Grob *c, Drul_array<Item *> next_door, Spacing_options const *);
   static void generate_pair_spacing (Grob *me,
-                                    Paper_column *l, Paper_column *r,
-                                    Paper_column *nextr,
-                                    Spacing_options const *options);
+                                     Paper_column *l, Paper_column *r,
+                                     Paper_column *nextr,
+                                     Spacing_options const *options);
   static Real default_bar_spacing (Grob *, Grob *, Grob *, Moment);
-  static Rational effective_shortest_duration (Grob *me, vector<Grob*> const &all);
+  static Rational effective_shortest_duration (Grob *me, vector<Grob *> const &all);
   static void breakable_column_spacing (Grob *, Item *l, Item *r, Spacing_options const *);
-  static void prune_loose_columns (Grob *, vector<Grob*> *cols, Spacing_options  *);
-  static void set_explicit_neighbor_columns (vector<Grob*> const &cols);
-  static void set_implicit_neighbor_columns (vector<Grob*> const &cols);
-  static void generate_springs (Grob *me, vector<Grob*> const &cols, Spacing_options const *);
+  static void prune_loose_columns (Grob *, vector<Grob *> *cols, Spacing_options *);
+  static void set_explicit_neighbor_columns (vector<Grob *> const &cols);
+  static void set_implicit_neighbor_columns (vector<Grob *> const &cols);
+  static void generate_springs (Grob *me, vector<Grob *> const &cols, Spacing_options const *);
   static void musical_column_spacing (Grob *, Item *, Item *, Spacing_options const *);
   static bool fills_measure (Grob *, Item *, Item *);
 public:
-  static vector<Grob*> get_columns (Grob *me);
+  static vector<Grob *> get_columns (Grob *me);
   static Real note_spacing (Grob *, Grob *, Grob *, Spacing_options const *);
   static Spring standard_breakable_column_spacing (Grob *me, Item *l, Item *r, Spacing_options const *);
-  
+
   DECLARE_SCHEME_CALLBACK (set_springs, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_common_shortest_duration, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 #endif /* SPACING_SPANNER_HH */
index 7ebedb4d46238d0555f7b1906c4c8d4da35cdb44..1f017321c517876e1cf420272b063972a115a199 100644 (file)
@@ -32,7 +32,7 @@ class Span_bar
 {
 public:
 
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static Interval get_spanned_interval (Grob *);
   static void add_bar (Grob *, Grob *);
   static void evaluate_glyph (Grob *);
index 7bda060c864d20d3920837b0ce861fac92d2ee25..b67dde0843108730489a6f33078a9555ceb83314 100644 (file)
@@ -44,7 +44,7 @@ class Spanner : public Grob
   Drul_array<Item *> spanned_drul_;
   vsize break_index_;
 
-  DECLARE_CLASSNAME(Spanner);
+  DECLARE_CLASSNAME (Spanner);
 
 public:
   DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
@@ -52,11 +52,11 @@ public:
   DECLARE_SCHEME_CALLBACK (bounds_width, (SCM));
   DECLARE_SCHEME_CALLBACK (kill_zero_spanned_time, (SCM));
 
-  vector<Spanner*> broken_intos_;
+  vector<Spanner *> broken_intos_;
 
   vsize get_break_index () const;
   Spanner *broken_neighbor (Direction d) const;
-  
+
   // todo: move to somewhere else.
   Real get_broken_left_end_align () const;
   void substitute_one_mutable_property (SCM sym, SCM val);
@@ -76,7 +76,7 @@ public:
   static bool less (Spanner *const &, Spanner *const &);
   virtual Grob *find_broken_piece (System *) const;
   virtual void derived_mark () const;
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   virtual System *get_system () const;
 
   SCM get_cached_pure_property (SCM sym, int start, int end);
index 71728094998e46dd7deb7a8849f29791747ff2fd..2afb0a5152ea6ff0901878e5e491493156559619 100644 (file)
@@ -45,7 +45,7 @@ public:
   Real inverse_stretch_strength () const {return inverse_stretch_strength_;}
   Real inverse_compress_strength () const {return inverse_compress_strength_;}
   Real blocking_force () const {return blocking_force_;}
-  
+
   Real length (Real f) const;
 
   void set_distance (Real);
@@ -58,8 +58,8 @@ public:
   void set_default_compress_strength ();
   void set_default_stretch_strength ();
 
-  void operator*= (Real);
-  bool operator> (Spring const&) const;
+  void operator *= (Real);
+  bool operator > (Spring const &) const;
 };
 DECLARE_UNSMOB (Spring, spring);
 
index fb572dc15768ae85b31298357d6a74e45dc13ee2..935bcf5b8326f75e0e826bba7ba19b089f19db76 100644 (file)
@@ -30,7 +30,7 @@ class Staff_spacing
   static Real next_notes_correction (Grob *, Grob *);
 
 public:
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static Spring get_spacing (Grob *, Grob *right_col);
   static Interval bar_y_positions (Grob *);
 };
index ed6156c62c78b1a1acae8423c1906d6e10cf8226..249fd8ed6cd40c14cf99c3177e2d11448648d303 100644 (file)
@@ -30,7 +30,7 @@
 class Staff_symbol_referencer
 {
 public:
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static bool ugly_hack (Grob *);
   static void set_position (Grob *, Real);
   DECLARE_SCHEME_CALLBACK (callback, (SCM element));
@@ -48,7 +48,7 @@ public:
   static Real get_position (Grob *);
   static Real staff_radius (Grob *);
   static int get_rounded_position (Grob *);
-  static Interval extent_in_staff (Grob *); 
+  static Interval extent_in_staff (Grob *);
 };
 
 int compare_position (Grob *const &, Grob *const &);
index 1c091c638811a87ba6170804519a34ac8e0e9b7e..9aee969f49533b141ede35799b10229c3eade3ca 100644 (file)
@@ -32,13 +32,13 @@ public:
   static Real staff_space (Grob *);
   static Real get_line_thickness (Grob *);
   static Real get_ledger_line_thickness (Grob *);
-  
+
   static int get_steps (Grob *);
   static int line_count (Grob *);
   static bool on_line (Grob *me, int pos);
   static Interval line_span (Grob *);
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_SCHEME_CALLBACK (height, (SCM));  
-  DECLARE_GROB_INTERFACE();
+  DECLARE_SCHEME_CALLBACK (height, (SCM));
+  DECLARE_GROB_INTERFACE ();
 };
 #endif // STAFF_SYMBOL_HH
index adc2c0c0b4607913ea7c546c22e4ee4bb03f7d93..a7e026a5704d04c0ea67ebfc9dede498466918bd 100644 (file)
@@ -27,7 +27,7 @@ class Stem_tremolo
 {
 public:
 
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (calc_slope, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_width, (SCM));
   DECLARE_SCHEME_CALLBACK (print, (SCM));
@@ -35,8 +35,8 @@ public:
   DECLARE_SCHEME_CALLBACK (calc_style, (SCM));
   DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM));
   static Stencil raw_stencil (Grob *, Real slope, Direction stemdir);
-  static Stencil translated_stencil (Grob*, Real slope);
-  static Stencil untranslated_stencil (Grob*, Real slope);
+  static Stencil translated_stencil (Grob *, Real slope);
+  static Stencil untranslated_stencil (Grob *, Real slope);
   static Real get_beam_translation (Grob *me);
   static Real vertical_length (Grob *me);
 };
index 3388e34b590b8d92601e990fa4dd21ecc765545a..b18b39e53a0035769da90726590c3a631363d1b6 100644 (file)
@@ -42,7 +42,7 @@ public:
   static Real chord_start_y (Grob *);
   static void set_stemend (Grob *, Real);
   static Slice beam_multiplicity (Grob *);
-  static Direction get_default_dir (Grob*);
+  static Direction get_default_dir (Grob *);
   static Real thickness (Grob *);
   static int head_count (Grob *);
   static bool is_invisible (Grob *);
@@ -51,10 +51,10 @@ public:
   static Interval head_positions (Grob *);
   static Real stem_end_position (Grob *);
   static Stencil flag (Grob *);
-  static Stencil get_translated_flag (Grob*);
-  DECLARE_GROB_INTERFACE();
+  static Stencil get_translated_flag (Grob *);
+  DECLARE_GROB_INTERFACE ();
   static void set_spacing_hints (Grob *);
-  
+
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_default_direction, (SCM));
   DECLARE_SCHEME_CALLBACK (offset_callback, (SCM element));
index 2e38cdfdfcd3df9e5085994fb59881c2c00b5b90..09a0ef01487156b729dcc038702ed29239cf60a5 100644 (file)
@@ -19,7 +19,7 @@
 #ifndef STENCIL_HH
 #define STENCIL_HH
 
-#include <cstdlib>             // size_t
+#include <cstdlib>              // size_t
 using namespace std;
 
 #include "lily-proto.hh"
@@ -90,14 +90,13 @@ public:
 DECLARE_UNSMOB (Stencil, stencil);
 
 void interpret_stencil_expression (SCM expr,
-                                  void (*func) (void *, SCM),
-                                  void *func_arg,
-                                  Offset o);
+                                   void (*func) (void *, SCM),
+                                   void *func_arg,
+                                   Offset o);
 SCM find_expression_fonts (SCM expr);
 
 void register_stencil_head (SCM symbol);
 bool is_stencil_head (SCM symbol);
 SCM all_stencil_heads ();
 
-
 #endif /* STENCIL_HH */
index 18b162a17c744978f4faf5714f1b701c1b2e8301..1a9fdd017df15583708f0450ba12dcbfac862c8c 100644 (file)
@@ -30,7 +30,7 @@ public:
   Stream_event ();
   VIRTUAL_COPY_CONSTRUCTOR (Stream_event, Stream_event);
 
-  Stream_event (SCM event_class, SCM mutable_props=SCM_EOL);
+  Stream_event (SCM event_class, SCM mutable_props = SCM_EOL);
   Stream_event (SCM class_name, Input *);
 
   Input *origin () const;
index 2547900e9e6d664067fc3e67eab9c2a185996492..06bd345da9f568a380a9613cff6e92312e6b3c25 100644 (file)
@@ -28,7 +28,7 @@ using namespace std;
 
 #if __GNUC__ > 2
 ostream *open_file_stream (string file_name,
-                               ios_base::openmode mode = ios::out);
+                           ios_base::openmode mode = ios::out);
 #else
 ostream *open_file_stream (string file_name, int mode = ios::out);
 #endif
index 5131eeb469067a51c57f84d14e4f40b17923d787..86ce97e4bd5ab88833b574a3b6933fda59b8eed9 100644 (file)
@@ -31,14 +31,14 @@ class System_start_delimiter
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
 
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static void try_collapse (Grob *);
   static Stencil staff_bracket (Grob *, Real);
   static Stencil old_staff_bracket (Grob *, Real);
   static Stencil staff_brace (Grob *, Real);
   static Stencil simple_bar (Grob *, Real);
   static Stencil line_bracket (Grob *, Real);
-  
+
 };
 
 #endif /* SYSTEM_START_DELIMITER_HH */
index 4b56238f367c49f563469bd93b6454a9fdd8c091..ee44d2afe6c27aff650795e09284fe3d0deba146 100644 (file)
@@ -34,15 +34,15 @@ class System : public Spanner
   int rank_;
   Grob_array *all_elements_;
   void init_elements ();
-  friend class Paper_score;    // ugh.
-  Paper_score *pscore_;        // ugh.
+  friend class Paper_score;     // ugh.
+  Paper_score *pscore_; // ugh.
   bool checked_footnotes_;
   vector<Grob *> footnote_grobs_; // TODO: make this a grob array
 
 public:
   Paper_score *paper_score () const;
   Grob *get_vertical_alignment ();
-  Grob *get_extremal_staff (Direction dir, Interval const&);
+  Grob *get_extremal_staff (Direction dir, Interval const &);
   Grob *get_pure_bound (Direction dir, int start, int end);
   Grob *get_maybe_pure_bound (Direction dir, bool pure, int start, int end);
   int get_rank () const;
@@ -69,10 +69,10 @@ public:
   int spanner_count () const;
 
   void break_into_pieces (vector<Column_x_positions> const &);
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 
-  vector<Item*> broken_col_range (Item const *, Item const *) const;
-  vector<Grob*> used_columns () const;
+  vector<Item *> broken_col_range (Item const *, Item const *) const;
+  vector<Grob *> used_columns () const;
   Paper_column *column (vsize i) const;
 
   void add_column (Paper_column *);
index e01bd4aeab158d02146ddb8c33104c738c921bcc..19c6e7c243333d8237c53b7f8cf196c37c7bd3fc 100644 (file)
 #include "stencil.hh"
 #include "grob-interface.hh"
 
-
 class Text_interface
 {
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (interpret_markup, (SCM, SCM, SCM));
   DECLARE_SCHEME_CALLBACK (interpret_string, (SCM, SCM, SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static bool is_markup (SCM);
   static bool is_markup_list (SCM);
 };
index 0a5ca6cacf5a7359a9860fe8dfdbb0062b074a6b..885ce6245e13d1d13033ebf8f200560f2defcaff 100644 (file)
 #include "tie-configuration.hh"
 
 void set_chord_outline (Skyline *skyline,
-                       vector<Item*> bounds,
-                       Grob *common,
-                       Direction d);
+                        vector<Item *> bounds,
+                        Grob *common,
+                        Direction d);
 void set_tie_config_directions (Ties_configuration *tie_configs_ptr);
 void shift_small_ties (Ties_configuration *tie_configs,
-                      Grob *staff_referencer,
-                      Tie_details const &details);
+                       Grob *staff_referencer,
+                       Tie_details const &details);
 void final_shape_adjustment (Tie_configuration &conf,
-                            Tie_formatting_problem const&,
-                            Grob *staff_referencer);
+                             Tie_formatting_problem const &,
+                             Grob *staff_referencer);
 void
 set_chord_outlines (Drul_array<Skyline> *skyline_drul,
-                   vector<Grob*> ties,
-                   Grob *common);
+                    vector<Grob *> ties,
+                    Grob *common);
 
 void
 set_manual_tie_configuration (Ties_configuration *tie_configs,
-                             bool *manual_override,
-                             SCM manual_configs
-                             );
-
+                              bool *manual_override,
+                              SCM manual_configs
+                             );
 
 #endif /* TIE_COLUMN_FORMAT_HH */
index 3821f3b80ae986c67717ee0ebf4fda7b28a29616..3a30de8b7c3899a21f503c06614c7da1e4afce26 100644 (file)
@@ -26,7 +26,7 @@
 class Tie_column
 {
 public:
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static void add_tie (Grob *me, Grob *);
   DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM));
   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
index 715928fd9b3e10e3f5d45fbf9983bfc4a784e495..ff8a9a2c9eedbe077e5735ae7c5eb0e804614cbc 100644 (file)
@@ -42,7 +42,7 @@ public:
   Direction dir_;
   Real delta_y_;
   Drul_array<int> column_ranks_;
-  
+
   /* computed. */
   Interval attachment_x_;
 
@@ -51,13 +51,13 @@ public:
   void center_tie_vertically (Tie_details const &);
   Bezier get_transformed_bezier (Tie_details const &) const;
   Bezier get_untransformed_bezier (Tie_details const &) const;
-  Real height (Tie_details const&) const;
+  Real height (Tie_details const &) const;
   int column_span_length () const;
-  
+
   static int compare (Tie_configuration const &a,
-                     Tie_configuration const &b);
+                      Tie_configuration const &b);
   static Real distance (Tie_configuration const &a,
-                      Tie_configuration const &b);
+                        Tie_configuration const &b);
 };
 
 INSTANTIATE_COMPARE (Tie_configuration, Tie_configuration::compare);
@@ -76,13 +76,11 @@ public:
   void add_tie_score (Real amount, int i, string description);
   Real score () const;
   void reset_score ();
-  string card () const; 
+  string card () const;
   string tie_card (int i) const { return tie_score_cards_[i]; }
   string complete_tie_card (vsize i) const;
-  string complete_score_card () const; 
+  string complete_score_card () const;
 };
 
 #endif /* TIE_CONFIGURATION_HH */
 
-
-
index e43fc7e13a08b2b2f3d402912c6dfce46cb4e906..cc9e8c9029e0679fdd0b2676fd9659d7f187560d 100644 (file)
@@ -28,7 +28,7 @@ struct Tie_details
   Real ratio_;
   Real staff_space_;
   Real x_gap_;
-  Real stem_gap_; 
+  Real stem_gap_;
   Real between_length_limit_;
   Real wrong_direction_offset_penalty_;
   Real same_dir_as_stem_penalty_;
@@ -54,11 +54,10 @@ struct Tie_details
   int single_tie_region_size_;
   int multi_tie_region_size_;
   Direction neutral_direction_;
-  
+
   Tie_details ();
   void from_grob (Grob *);
 };
 
 #endif /* TIE_DETAILS_HH */
 
-
index 9799839cb30d04b1c6c44b649519c438a43d6acc..6378b68242d64ad14bc3780286807174e4f404b0 100644 (file)
 #include <map>
 #include <set>
 
-typedef map< Tuple<int,4>, Tie_configuration *> Tie_configuration_map;
+typedef map< Tuple<int, 4>, Tie_configuration *> Tie_configuration_map;
 
 struct Tie_configuration_variation
 {
   vector<pair<int, Tie_configuration *> > index_suggestion_pairs_;
-  void add_suggestion(int index, Tie_configuration* suggestion)
+  void add_suggestion (int index, Tie_configuration *suggestion)
   {
     index_suggestion_pairs_.push_back (make_pair (index, suggestion));
   }
@@ -51,45 +51,44 @@ class Tie_formatting_problem
   Column_extent_map stem_extents_;
   Column_extent_map head_extents_;
   Position_extent_map head_positions_;
-  
+
   set<int> dot_positions_;
   Interval dot_x_;
   vector<Tie_specification> specifications_;
   bool use_horizontal_spacing_;
-  
+
   Tie_configuration_map possibilities_;
 
   Grob *x_refpoint_;
   Grob *y_refpoint_;
 
-  
   Tie_configuration *get_configuration (int position, Direction dir, Drul_array<int> cols, bool tune_y) const;
   Tie_configuration *generate_configuration (int position, Direction dir, Drul_array<int> cols, bool tune_y) const;
 
   vector<Tie_configuration_variation> generate_collision_variations (Ties_configuration const &ties) const;
   vector<Tie_configuration_variation> generate_extremal_tie_variations (Ties_configuration const &ties) const;
   vector<Tie_configuration_variation> generate_single_tie_variations (Ties_configuration const &ties) const;
-  
+
   void score_configuration (Tie_configuration *) const;
   Real score_aptitude (Tie_configuration *, Tie_specification const &,
-                      Ties_configuration *, int) const;
+                       Ties_configuration *, int) const;
   void score_ties_aptitude (Ties_configuration *ties) const;
   void score_ties_configuration (Ties_configuration *ties) const;
   void set_ties_config_standard_directions (Ties_configuration *tie_configs_ptr);
   void score_ties (Ties_configuration *) const;
-  
+
   Slice head_positions_slice (int) const;
   Ties_configuration generate_base_chord_configuration ();
   Ties_configuration find_best_variation (Ties_configuration const &base,
-                                         vector<Tie_configuration_variation> const &vars);
+                                          vector<Tie_configuration_variation> const &vars);
 
 public:
   Tie_details details_;
   void print_ties_configuration (Ties_configuration const *);
 
-  Interval get_stem_extent (int, Direction, Axis) const; 
-  Interval get_head_extent (int, Direction, Axis) const; 
-  
+  Interval get_stem_extent (int, Direction, Axis) const;
+  Interval get_head_extent (int, Direction, Axis) const;
+
 public:
   Tie_formatting_problem ();
   ~Tie_formatting_problem ();
@@ -98,11 +97,11 @@ public:
   Ties_configuration generate_optimal_configuration ();
   Ties_configuration generate_ties_configuration (Ties_configuration const &);
 
-  void from_ties (vector<Grob*> const &ties);
+  void from_ties (vector<Grob *> const &ties);
   void from_tie (Grob *tie);
-  void from_semi_ties (vector<Grob*> const &, Direction head_dir);
-  void set_chord_outline (vector<Item*>, Direction);
-  void set_column_chord_outline (vector<Item*>, Direction, int rank);
+  void from_semi_ties (vector<Grob *> const &, Direction head_dir);
+  void set_chord_outline (vector<Item *>, Direction);
+  void set_column_chord_outline (vector<Item *>, Direction, int rank);
   void set_manual_tie_configuration (SCM);
   Interval get_attachment (Real, Drul_array<int>) const;
   Grob *common_x_refpoint () const;
index a41aa3626bfc80e521b05854af5c42bf1b8e5f96..7434a499e85dcb666e4afc8f0042033e7b2f6dbf 100644 (file)
 struct Tie_specification
 {
   int position_;
-  Drul_array<Grob*> note_head_drul_;
+  Drul_array<Grob *> note_head_drul_;
   Drul_array<int> column_ranks_;
   Grob *tie_grob_;
-  
+
   bool has_manual_position_;
   bool has_manual_dir_;
   bool has_manual_delta_y_;
   bool has_accidental_;
-  
+
   Real manual_position_;
   Direction manual_dir_;
-  
+
   Tie_specification ();
   int column_span () const;
   void from_grob (Grob *);
index 9da006c8ef16c4cebee5fc27e365c0fdc34be2fd..60664e10741c1c35108c60a4400c25e82c97721e 100644 (file)
 #include "skyline.hh"
 #include "grob-interface.hh"
 
-
-  
-
 class Tie
 {
 public:
   static void set_head (Grob *, Direction, Grob *head);
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static Grob *head (Grob *, Direction);
   static int get_column_rank (Grob *, Direction);
   static int get_position (Grob *);
-  static Direction get_default_dir (Grob *);  
+  static Direction get_default_dir (Grob *);
   static SCM get_control_points (Grob *, Grob *,
-                                Tie_configuration const&,
-                                Tie_details const&);
+                                 Tie_configuration const &,
+                                 Tie_details const &);
   static SCM get_default_control_points (Grob *);
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_control_points, (SCM));
   static bool less (Grob *const &s1,
-                   Grob *const &s2);
+                    Grob *const &s2);
 };
 
-
 #endif // TIE_HH
index b3a4ce480dcf5336eab231574b48110ff917b93b..2b3d39f7d46e37629ab144e69cd2f981b1931ac0 100644 (file)
@@ -28,7 +28,7 @@ class Time_scaled_music_iterator : public Sequential_iterator
 public:
   DECLARE_SCHEME_CALLBACK (constructor, ());
   /* construction */
-  DECLARE_CLASSNAME(Time_scaled_music_iterator);
+  DECLARE_CLASSNAME (Time_scaled_music_iterator);
   Time_scaled_music_iterator ();
 protected:
   virtual SCM get_music_list () const;
index 95190025bcc41f8bdf67526fc10d79367b8d0fe3..72d02c1f85926c9d1ee2ad832f289addcaff808a 100644 (file)
@@ -32,7 +32,7 @@
 */
 struct Time_signature
 {
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   static Stencil special_time_signature (Grob *, SCM, int, int);
   static Stencil numbered_time_signature (Grob *, int, int);
   DECLARE_SCHEME_CALLBACK (print, (SCM));
index 1504ebcecce3efbff3f1c4e847e77f43015e48fb..1e848afabce19284d367c92190d43d016c323bc4 100644 (file)
@@ -36,7 +36,7 @@ class Engraver_dispatch_list
 public:
   void apply (Grob_info);
   SCM static create (SCM trans_list,
-                    SCM iface_list, Direction);
+                     SCM iface_list, Direction);
 
   DECLARE_SIMPLE_SMOBS (Engraver_dispatch_list);
 };
index 3eaf8a85b7c42d533624a5e38fc0530b85899c32..de0faf80f8d954ffd9e34541315eb2d7391f990e 100644 (file)
@@ -95,7 +95,7 @@ protected:
 
 SCM names_to_translators (SCM namelist, Context *tg);
 void recurse_over_translators (Context *c, Translator_method ptr,
-                              Translator_group_method ptr2, Direction);
+                               Translator_group_method ptr2, Direction);
 void precomputed_recurse_over_translators (Context *c, Translator_precompute_index idx, Direction dir);
 Translator_group *get_translator_group (SCM sym);
 
index d2723929ee83c9671f448da8e73e115a5b942925..0b35812015005a8e8610ac414e0de7f3af4fbc0b 100644 (file)
@@ -23,7 +23,7 @@
 #include "global-ctor.hh"
 #include "lily-proto.hh"
 #include "virtual-methods.hh"
-#include "input.hh"            // for error reporting
+#include "input.hh"             // for error reporting
 #include "smobs.hh"
 #include "std-vector.hh"
 #include "protected-scm.hh"
@@ -33,85 +33,86 @@ struct Acknowledge_information
   SCM symbol_;
   Engraver_void_function_engraver_grob_info function_;
 
-  Acknowledge_information () {
+  Acknowledge_information ()
+  {
     symbol_ = SCM_EOL;
     function_ = 0;
   }
 };
 
-
 /*
   Each translator class has a static list of listener records. Each
   record makes one explains how to register one of the class's stream event
   listeners to a context.
 */
-typedef struct translator_listener_record {
+typedef struct translator_listener_record
+{
   Listener (*get_listener_) (void *, SCM event_class);
   SCM event_class_;
   struct translator_listener_record *next_;
 
-  translator_listener_record () {
+  translator_listener_record ()
+  {
     next_ = 0;
     event_class_ = SCM_EOL;
     get_listener_ = 0;
   }
-    
-} translator_listener_record;
 
+} translator_listener_record;
 
 #define TRANSLATOR_DECLARATIONS_NO_LISTENER(NAME)                       \
-private:                                                               \
-  public:                                                              \
-  NAME ();                                                             \
-  VIRTUAL_COPY_CONSTRUCTOR (Translator, NAME);                         \
-  static SCM static_description_;                                      \
+private:                                                                \
+  public:                                                               \
+  NAME ();                                                              \
+  VIRTUAL_COPY_CONSTRUCTOR (Translator, NAME);                          \
+  static SCM static_description_;                                       \
   static Drul_array<vector<Acknowledge_information> > acknowledge_static_array_drul_; \
   virtual void fetch_precomputable_methods (Translator_void_method_ptr methods[]); \
-  virtual SCM static_translator_description () const;                  \
-  virtual SCM translator_description () const;                         \
+  virtual SCM static_translator_description () const;                   \
+  virtual SCM translator_description () const;                          \
   static Engraver_void_function_engraver_grob_info static_get_acknowledger (SCM sym); \
   static Engraver_void_function_engraver_grob_info static_get_end_acknowledger(SCM); \
   virtual Engraver_void_function_engraver_grob_info get_acknowledger (SCM sym) \
-  {                                                                    \
-    return static_get_acknowledger (sym);                              \
-  }                                                                    \
+  {                                                                     \
+    return static_get_acknowledger (sym);                               \
+  }                                                                     \
   virtual Engraver_void_function_engraver_grob_info get_end_acknowledger (SCM sym) \
-  {                                                                    \
-    return static_get_end_acknowledger (sym);                          \
+  {                                                                     \
+    return static_get_end_acknowledger (sym);                           \
   } \
   /* end #define */
 
-#define TRANSLATOR_DECLARATIONS(NAME)                                  \
-  TRANSLATOR_DECLARATIONS_NO_LISTENER(NAME)                            \
-private:                                                               \
-  static translator_listener_record *listener_list_;                   \
-public:                                                                        \
-  virtual translator_listener_record *get_listener_list () const       \
-  {                                                                    \
-    return listener_list_;                                             \
-  }                                                                    \
+#define TRANSLATOR_DECLARATIONS(NAME)                                   \
+  TRANSLATOR_DECLARATIONS_NO_LISTENER(NAME)                             \
+private:                                                                \
+  static translator_listener_record *listener_list_;                    \
+public:                                                                 \
+  virtual translator_listener_record *get_listener_list () const        \
+  {                                                                     \
+    return listener_list_;                                              \
+  }                                                                     \
   /* end #define */
 
-#define DECLARE_TRANSLATOR_LISTENER(m)                 \
-public:                                                        \
-inline void listen_ ## m (Stream_event *);             \
-/* Should be private */                                        \
-static void _internal_declare_ ## m ();                        \
-private:                                               \
- static Listener _get_ ## m ## _listener (void *, SCM);        \
+#define DECLARE_TRANSLATOR_LISTENER(m)                  \
+public:                                                 \
+inline void listen_ ## m (Stream_event *);              \
+/* Should be private */                                 \
+static void _internal_declare_ ## m ();                 \
+private:                                                \
+ static Listener _get_ ## m ## _listener (void *, SCM); \
 DECLARE_LISTENER (_listen_scm_ ## m);
 
 #define DECLARE_ACKNOWLEDGER(x) public : void acknowledge_ ## x (Grob_info); protected:
 #define DECLARE_END_ACKNOWLEDGER(x) public : void acknowledge_end_ ## x (Grob_info); protected:
 
 enum Translator_precompute_index
-  {
-    START_TRANSLATION_TIMESTEP,
-    STOP_TRANSLATION_TIMESTEP,
-    PROCESS_MUSIC,
-    PROCESS_ACKNOWLEDGED,
-    TRANSLATOR_METHOD_PRECOMPUTE_COUNT,
-  };
+{
+  START_TRANSLATION_TIMESTEP,
+  STOP_TRANSLATION_TIMESTEP,
+  PROCESS_MUSIC,
+  PROCESS_ACKNOWLEDGED,
+  TRANSLATOR_METHOD_PRECOMPUTE_COUNT,
+};
 
 /*
   Translate music into grobs.
@@ -150,19 +151,19 @@ public:
   TRANSLATOR_DECLARATIONS (Translator);
   DECLARE_SMOBS (Translator);
 
-protected:                     // should be private.
+protected:                      // should be private.
   Context *daddy_context_;
   void protect_event (SCM ev);
   virtual void derived_mark () const;
   static void add_translator_listener (translator_listener_record **listener_list,
-                                      translator_listener_record *r,
-                                      Listener (*get_listener) (void *, SCM),
-                                      const char *ev_class);
-  SCM static_translator_description (const char *grobs, 
-                                    const char *desc,
-                                    translator_listener_record *listener_list,
-                                    const char *read, 
-                                    const char *write) const;
+                                       translator_listener_record *r,
+                                       Listener (*get_listener) (void *, SCM),
+                                       const char *ev_class);
+  SCM static_translator_description (const char *grobs,
+                                     const char *desc,
+                                     translator_listener_record *listener_list,
+                                     const char *read,
+                                     const char *write) const;
 
   friend class Translator_group;
 };
@@ -174,13 +175,10 @@ Moment get_event_length (Stream_event *s, Moment now);
 Moment get_event_length (Stream_event *s);
 DECLARE_UNSMOB (Translator, translator);
 
-
 /*
   This helper is only meaningful inside listen_* methods.
 */
 extern bool internal_event_assignment (Stream_event **old_ev, Stream_event *new_ev, const char *function);
 #define ASSIGN_EVENT_ONCE(o,n) internal_event_assignment (&o, n, __FUNCTION__)
 
-
-
 #endif // TRANSLATOR_HH
index a7bb91060833191727f8359f6016452cbd2e2c64..e384d4c7fb98369fa7a658eef6deda857e66e74b 100644 (file)
 /**
    A macro to automate administration of translators.
 */
-#define ADD_THIS_TRANSLATOR(T)                                         \
-  SCM T::static_description_ = SCM_EOL;                                        \
-  static void _ ## T ## _adder ()                                      \
-  {                                                                    \
-    T *t = new T;                                                      \
-    T::static_description_ = t->static_translator_description ();      \
-    scm_permanent_object (T::static_description_);                     \
-    add_translator (t);                                                        \
-  }                                                                    \
-  SCM T::translator_description () const                               \
-  {                                                                    \
-    return static_description_;                                                \
-  }                                                                    \
+#define ADD_THIS_TRANSLATOR(T)                                          \
+  SCM T::static_description_ = SCM_EOL;                                 \
+  static void _ ## T ## _adder ()                                       \
+  {                                                                     \
+    T *t = new T;                                                       \
+    T::static_description_ = t->static_translator_description ();       \
+    scm_permanent_object (T::static_description_);                      \
+    add_translator (t);                                                 \
+  }                                                                     \
+  SCM T::translator_description () const                                \
+  {                                                                     \
+    return static_description_;                                         \
+  }                                                                     \
   ADD_GLOBAL_CTOR (_ ## T ## _adder); \
   /* end define */
 
 #define DEFINE_TRANSLATOR_LISTENER_LIST(T) \
-  translator_listener_record *T::listener_list_;       \
+  translator_listener_record *T::listener_list_;        \
   /* end define */
 
 #define DEFINE_ACKNOWLEDGERS(classname) \
-  Drul_array< vector<Acknowledge_information> > classname::acknowledge_static_array_drul_;     \
-  Engraver_void_function_engraver_grob_info                            \
-  classname::static_get_acknowledger (SCM sym)                         \
-  {                                                                    \
-    return generic_get_acknowledger (sym, &acknowledge_static_array_drul_[START]);     \
-  }                                                                    \
-  Engraver_void_function_engraver_grob_info                            \
-  classname::static_get_end_acknowledger (SCM sym)                             \
-  {                                                                    \
-    return generic_get_acknowledger (sym, &acknowledge_static_array_drul_[STOP]);      \
-  }                                                                    \
+  Drul_array< vector<Acknowledge_information> > classname::acknowledge_static_array_drul_;      \
+  Engraver_void_function_engraver_grob_info                             \
+  classname::static_get_acknowledger (SCM sym)                          \
+  {                                                                     \
+    return generic_get_acknowledger (sym, &acknowledge_static_array_drul_[START]);      \
+  }                                                                     \
+  Engraver_void_function_engraver_grob_info                             \
+  classname::static_get_end_acknowledger (SCM sym)                              \
+  {                                                                     \
+    return generic_get_acknowledger (sym, &acknowledge_static_array_drul_[STOP]);       \
+  }                                                                     \
   /* end define */
 
-#define DEFINE_TRANSLATOR_DOC(classname, desc, grobs, read, write)             \
-  SCM                                                                  \
-  classname::static_translator_description () const                    \
-  {                                                                    \
+#define DEFINE_TRANSLATOR_DOC(classname, desc, grobs, read, write)              \
+  SCM                                                                   \
+  classname::static_translator_description () const                     \
+  {                                                                     \
     return Translator::static_translator_description (grobs, desc, listener_list_, read, write); \
   }
 
-#define ADD_TRANSLATOR(classname, desc, grobs, read, write)            \
-  IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS (classname);                   \
-  ADD_THIS_TRANSLATOR (classname);                                     \
-  DEFINE_TRANSLATOR_DOC(classname, desc, grobs, read, write)           \
+#define ADD_TRANSLATOR(classname, desc, grobs, read, write)             \
+  IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS (classname);                    \
+  ADD_THIS_TRANSLATOR (classname);                                      \
+  DEFINE_TRANSLATOR_DOC(classname, desc, grobs, read, write)            \
   DEFINE_ACKNOWLEDGERS(classname) \
   DEFINE_TRANSLATOR_LISTENER_LIST(classname) \
-  
-#define IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS(T)                       \
-  void                                                                 \
-  T::fetch_precomputable_methods (Translator_void_method_ptr ptrs[])   \
-  {                                                                    \
-    ptrs[START_TRANSLATION_TIMESTEP] =                                 \
-      ((Translator_void_method_ptr) & T::start_translation_timestep == \
+#define IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS(T)                        \
+  void                                                                  \
+  T::fetch_precomputable_methods (Translator_void_method_ptr ptrs[])    \
+  {                                                                     \
+    ptrs[START_TRANSLATION_TIMESTEP] =                                  \
+      ((Translator_void_method_ptr) & T::start_translation_timestep ==  \
        (Translator_void_method_ptr) & Translator::start_translation_timestep) \
-      ? 0                                                              \
-      : (Translator_void_method_ptr) & T::start_translation_timestep;  \
-                                                                       \
-    ptrs[STOP_TRANSLATION_TIMESTEP] =                                  \
+      ? 0                                                               \
+      : (Translator_void_method_ptr) & T::start_translation_timestep;   \
+                                                                        \
+    ptrs[STOP_TRANSLATION_TIMESTEP] =                                   \
       ((Translator_void_method_ptr) & T::stop_translation_timestep == (Translator_void_method_ptr) & Translator::stop_translation_timestep) \
-      ? 0                                                              \
-      : (Translator_void_method_ptr) & T::stop_translation_timestep;   \
-                                                                       \
-    ptrs[PROCESS_MUSIC] =                                              \
+      ? 0                                                               \
+      : (Translator_void_method_ptr) & T::stop_translation_timestep;    \
+                                                                        \
+    ptrs[PROCESS_MUSIC] =                                               \
       ((Translator_void_method_ptr) & T::process_music == (Translator_void_method_ptr) & Translator::process_music) \
-      ? 0                                                              \
-      : (Translator_void_method_ptr) & T::process_music;               \
-                                                                       \
-    ptrs[PROCESS_ACKNOWLEDGED] =                                       \
+      ? 0                                                               \
+      : (Translator_void_method_ptr) & T::process_music;                \
+                                                                        \
+    ptrs[PROCESS_ACKNOWLEDGED] =                                        \
       ((Translator_void_method_ptr) & T::process_acknowledged == (Translator_void_method_ptr) & Translator::process_acknowledged) \
-      ? 0                                                              \
-      : (Translator_void_method_ptr) & T::process_acknowledged;                \
+      ? 0                                                               \
+      : (Translator_void_method_ptr) & T::process_acknowledged;         \
   }
 
 void add_acknowledger (Engraver_void_function_engraver_grob_info ptr,
-                      char const *func_name,
-                      vector<Acknowledge_information> *ack_array);
+                       char const *func_name,
+                       vector<Acknowledge_information> *ack_array);
 
 Engraver_void_function_engraver_grob_info
 generic_get_acknowledger (SCM sym,
-                         vector<Acknowledge_information> const *ack_array);
+                          vector<Acknowledge_information> const *ack_array);
 
-#define ADD_ACKNOWLEDGER(CLASS, NAME)                                  \
-  void CLASS ## NAME ## _ack_adder ()                                  \
-  {                                                                    \
+#define ADD_ACKNOWLEDGER(CLASS, NAME)                                   \
+  void CLASS ## NAME ## _ack_adder ()                                   \
+  {                                                                     \
     add_acknowledger ((Engraver_void_function_engraver_grob_info) & CLASS::acknowledge_ ## NAME, #NAME, &CLASS::acknowledge_static_array_drul_[START]); \
-  }                                                                    \
+  }                                                                     \
   ADD_SCM_INIT_FUNC (CLASS ## NAME ## _ack_adder_initclass, CLASS ## NAME ## _ack_adder);
 
-#define ADD_END_ACKNOWLEDGER(CLASS, NAME)                                      \
-  void CLASS ## NAME ## _end_ack_adder ()                                      \
-  {                                                                    \
+#define ADD_END_ACKNOWLEDGER(CLASS, NAME)                                       \
+  void CLASS ## NAME ## _end_ack_adder ()                                       \
+  {                                                                     \
     add_acknowledger ((Engraver_void_function_engraver_grob_info) & CLASS::acknowledge_end_ ## NAME, #NAME, &CLASS::acknowledge_static_array_drul_[STOP]); \
-  }                                                                    \
+  }                                                                     \
   ADD_SCM_INIT_FUNC (CLASS ## NAME ## _end_ack_adder_initclass, CLASS ## NAME ## _end_ack_adder);
 
 /*
-  Implement the method cl::listen_##m, and make it listen to stream 
+  Implement the method cl::listen_##m, and make it listen to stream
   events of class m.
  */
-#define IMPLEMENT_TRANSLATOR_LISTENER(cl, m)           \
-void                                                   \
-cl :: _internal_declare_ ## m ()                       \
-{                                                      \
-  static translator_listener_record r;                 \
+#define IMPLEMENT_TRANSLATOR_LISTENER(cl, m)            \
+void                                                    \
+cl :: _internal_declare_ ## m ()                        \
+{                                                       \
+  static translator_listener_record r;                  \
   add_translator_listener (&listener_list_, &r, _get_ ## m ## _listener, #m); \
-}                                                      \
-                                                       \
-ADD_SCM_INIT_FUNC (cl ## _declare_event_ ## m, cl::_internal_declare_ ## m);   \
-                                                       \
-Listener                                               \
+}                                                       \
+                                                        \
+ADD_SCM_INIT_FUNC (cl ## _declare_event_ ## m, cl::_internal_declare_ ## m);    \
+                                                        \
+Listener                                                \
  cl :: _get_ ## m ## _listener (void *me, SCM unused)   \
-{                                                      \
-  cl *obj = (cl *) me;                                 \
+{                                                       \
+  cl *obj = (cl *) me;                                  \
   (void) unused; \
-  return obj->GET_LISTENER (_listen_scm_ ## m);                \
-}                                                      \
-                                                       \
-IMPLEMENT_LISTENER (cl, _listen_scm_ ## m)             \
-void                                                   \
-cl::_listen_scm_ ## m (SCM sev)                                \
-{                                                      \
-  Stream_event *ev = unsmob_stream_event (sev);                \
-  protect_event (sev);                                 \
-  listen_ ## m (ev);                                   \
+  return obj->GET_LISTENER (_listen_scm_ ## m);         \
+}                                                       \
+                                                        \
+IMPLEMENT_LISTENER (cl, _listen_scm_ ## m)              \
+void                                                    \
+cl::_listen_scm_ ## m (SCM sev)                         \
+{                                                       \
+  Stream_event *ev = unsmob_stream_event (sev);         \
+  protect_event (sev);                                  \
+  listen_ ## m (ev);                                    \
 }
 
 #endif /* TRANSLATOR_ICC */
index 17285a09178107cbde3c90cb74c0e61a7d1ca214..ceeb7f3440c15c883bdb1b9f6c41db2e51807fea 100644 (file)
@@ -33,20 +33,20 @@ public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_connect_to_neighbors, (SCM smob));
   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
-  
-  DECLARE_GROB_INTERFACE();
-  static Grobget_common_x (Spanner *);
+
+  DECLARE_GROB_INTERFACE ();
+  static Grob *get_common_x (Spanner *);
   static void add_tuplet_bracket (Grob *me, Grob *smaller_bracket);
   static void get_bounds (Grob *, Grob **, Grob **);
   static void add_column (Grob *me, Item *);
   static void add_beam (Grob *me, Grob *);
-  static Grob *parallel_beam (Grob *me, vector<Grob*> const &cols,
-                             bool *equally_long);
+  static Grob *parallel_beam (Grob *me, vector<Grob *> const &cols,
+                              bool *equally_long);
   static void calc_position_and_height (Grob *, Real *, Real *dy);
   static Stencil make_bracket (Grob *me, Axis protrusion_axis,
-                              Offset dz, Drul_array<Real> height,
-                              Interval gap, Drul_array<Real> widen,
-                              Drul_array<Real> shorten);
+                               Offset dz, Drul_array<Real> height,
+                               Interval gap, Drul_array<Real> widen,
+                               Drul_array<Real> shorten);
   static Direction get_default_dir (Grob *);
 };
 
index 7379510aa8d9a8898a404184ceedebf37ded68ae..471119777fc8e27968e9aea5922ead49b8a47407 100644 (file)
@@ -27,7 +27,7 @@ struct Vaticana_ligature
 {
   DECLARE_SCHEME_CALLBACK (brew_ligature_primitive, (SCM));
   DECLARE_SCHEME_CALLBACK (print, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 /*
index 12821ffa0bb66da59177921b24d905ed7a987f94..539d42f028d11151782e379b427444ba05f00935 100644 (file)
@@ -26,7 +26,7 @@
 class Volta_bracket_interface
 {
 public:
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   static void modify_edge_height (Spanner *);
   static void add_bar (Grob *me, Item *bar);
index 379c2fa9bd2396bd9e29958e03e0c6f8fc6a9437..1325c8e1514e2fa76852d7eb45fe181b314e04f2 100644 (file)
 /* We don't use IMPLEMENT_TYPE_P, since the smobification part is
    implemented separately from the class.  */
 LY_DEFINE (ly_input_location_p, "ly:input-location?", 1, 0, 0,
-          (SCM x),
-          "Is @var{x} an @code{input-location}?")
+           (SCM x),
+           "Is @var{x} an @code{input-location}?")
 {
   return unsmob_input (x) ? SCM_BOOL_T : SCM_BOOL_F;
 }
 
 LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 1, (SCM sip, SCM msg, SCM rest),
-          "Print @var{msg} as a GNU compliant error message, pointing"
-          " to the location in @var{sip}.  @var{msg} is interpreted"
-          " similar to @code{format}'s argument, using @var{rest}.")
+           "Print @var{msg} as a GNU compliant error message, pointing"
+           " to the location in @var{sip}.  @var{msg} is interpreted"
+           " similar to @code{format}'s argument, using @var{rest}.")
 {
   Input *ip = unsmob_input (sip);
 
   LY_ASSERT_TYPE (unsmob_input, sip, 1);
-  LY_ASSERT_TYPE (scm_is_string, msg,2);
+  LY_ASSERT_TYPE (scm_is_string, msg, 2);
 
   msg = scm_simple_format (SCM_BOOL_F, msg, rest);
 
@@ -47,12 +47,11 @@ LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 1, (SCM sip, SCM msg, SCM
   return SCM_UNSPECIFIED;
 }
 
-
 LY_DEFINE (ly_input_file_line_char_column,
-          "ly:input-file-line-char-column",
-          1, 0, 0, (SCM sip),
-          "Return input location in @var{sip} as"
-          " @code{(file-name line char column)}.")
+           "ly:input-file-line-char-column",
+           1, 0, 0, (SCM sip),
+           "Return input location in @var{sip} as"
+           " @code{(file-name line char column)}.")
 {
   LY_ASSERT_TYPE (unsmob_input, sip, 1);
   Input *ip = unsmob_input (sip);
@@ -60,24 +59,24 @@ LY_DEFINE (ly_input_file_line_char_column,
   int l, ch, col, offset = 0;
   ip->get_counts (&l, &ch, &col, &offset);
   return scm_list_4 (ly_string2scm (ip->file_string ()),
-                    scm_from_int (l),
-                    scm_from_int (ch),
-                    scm_from_int (col));
+                     scm_from_int (l),
+                     scm_from_int (ch),
+                     scm_from_int (col));
 }
 
 LY_DEFINE (ly_input_both_locations,
-          "ly:input-both-locations",
-          1, 0, 0, (SCM sip),
-          "Return input location in @var{sip} as"
-          " @code{(file-name first-line first-column last-line last-column)}.")
+           "ly:input-both-locations",
+           1, 0, 0, (SCM sip),
+           "Return input location in @var{sip} as"
+           " @code{(file-name first-line first-column last-line last-column)}.")
 {
-  
+
   LY_ASSERT_TYPE (unsmob_input, sip, 1);
   Input *ip = unsmob_input (sip);
-  
+
   return scm_list_5 (ly_string2scm (ip->file_string ()),
-                    scm_from_int (ip->line_number ()),
-                    scm_from_int (ip->column_number ()),
-                    scm_from_int (ip->end_line_number ()),
-                    scm_from_int (ip->end_column_number ()));
+                     scm_from_int (ip->line_number ()),
+                     scm_from_int (ip->column_number ()),
+                     scm_from_int (ip->end_line_number ()),
+                     scm_from_int (ip->end_column_number ()));
 }
index 716c41d7137d094f076addc8156d3882ae05ca57..77a03fd54e7d08cfe499759b0ad3973c61614e4d 100644 (file)
@@ -59,9 +59,9 @@ equal_smob (SCM sa, SCM sb)
 {
   Input *a = (Input *) SCM_CELL_WORD_1 (sa);
   Input *b = (Input *) SCM_CELL_WORD_1 (sb);
-  if (a->get_source_file () == b->get_source_file () &&
-      a->start () == b->start () &&
-      a->end () == b->end ())
+  if (a->get_source_file () == b->get_source_file ()
+      && a->start () == b->start ()
+      && a->end () == b->end ())
     return SCM_BOOL_T;
   else
     return SCM_BOOL_F;
index cbb609941fb6924d0a0b9cd33e475da78f5b79d9..6cc8a182a540bdc29ecfe96d763af0dcf70f42b3 100644 (file)
@@ -83,23 +83,22 @@ Input::message (string s) const
 {
   if (source_file_)
     s = location_string () + ": " + s + "\n"
-      + source_file_->quote_input (start_) + "\n";
+        + source_file_->quote_input (start_) + "\n";
   ::message (s);
 }
 
-
 void
 Input::programming_error (string s) const
 {
   if (get_program_option ("warning-as-error"))
     ::error (s);
-  else {
-    message (_f ("programming error: %s", s.c_str ()));
-    message (_ ("continuing, cross fingers") + "\n");
-  }
+  else
+    {
+      message (_f ("programming error: %s", s.c_str ()));
+      message (_ ("continuing, cross fingers") + "\n");
+    }
 }
 
-
 void
 Input::warning (string s) const
 {
index 56fa84ee263a60c2abb275b433d5393d24487c0f..e3214069b3955bc3602c7b43ead87c33b410d8b0 100644 (file)
@@ -39,7 +39,7 @@ protected:
   SCM short_text_;
 
   vector<Grob *> axis_groups_;
-  
+
   virtual void finalize ();
   DECLARE_ACKNOWLEDGER (axis_group);
   void process_music ();
@@ -78,7 +78,7 @@ Instrument_name_engraver::consider_start_spanner ()
   SCM short_text = get_property ("shortInstrumentName");
 
   if (!(Text_interface::is_markup (long_text)
-       || Text_interface::is_markup (short_text)))
+        || Text_interface::is_markup (short_text)))
     {
       long_text = get_property ("vocalName");
       short_text = get_property ("shortVocalName");
@@ -87,11 +87,11 @@ Instrument_name_engraver::consider_start_spanner ()
   if ((Text_interface::is_markup (long_text)
        || Text_interface::is_markup (short_text))
       && (!text_spanner_
-         || short_text_ != short_text
-         || long_text_ != long_text))
+          || short_text_ != short_text
+          || long_text_ != long_text))
     {
       if (text_spanner_)
-       stop_spanner ();
+        stop_spanner ();
 
       short_text_ = short_text;
       long_text_ = long_text;
@@ -149,36 +149,35 @@ Instrument_name_engraver::stop_spanner ()
 {
   for (vsize i = 0; i < axis_groups_.size (); i++)
     Pointer_group_interface::add_grob (text_spanner_,
-                                      ly_symbol2scm ("elements"),
-                                      axis_groups_[i]);
-  
+                                       ly_symbol2scm ("elements"),
+                                       axis_groups_[i]);
+
   text_spanner_->set_bound (RIGHT,
-                           unsmob_grob (get_property ("currentCommandColumn")));
+                            unsmob_grob (get_property ("currentCommandColumn")));
 
   Pointer_group_interface::set_ordered (text_spanner_,
-                                       ly_symbol2scm ("elements"),
-                                       false);
+                                        ly_symbol2scm ("elements"),
+                                        false);
 
   text_spanner_ = 0;
 }
 
-
 ADD_ACKNOWLEDGER (Instrument_name_engraver, axis_group);
 
 ADD_TRANSLATOR (Instrument_name_engraver,
-               /* doc */
-               "Create a system start text for instrument or vocal names.",
-               
-               /* create */
-               "InstrumentName ",
-               
-               /* read */
-               "currentCommandColumn "
-               "instrumentName "
-               "shortInstrumentName "
-               "shortVocalName "
-               "vocalName ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Create a system start text for instrument or vocal names.",
+
+                /* create */
+                "InstrumentName ",
+
+                /* read */
+                "currentCommandColumn "
+                "instrumentName "
+                "shortInstrumentName "
+                "shortVocalName "
+                "vocalName ",
+
+                /* write */
+                ""
+               );
index 8ae322fae0e7d1c24587b452cb5606ff02839b07..852aed0d40b507efca6267071d9fdb5b1945a20e 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "translator.icc"
 
-
 class Instrument_switch_engraver : public Engraver
 {
 
@@ -77,15 +76,15 @@ Instrument_switch_engraver::stop_translation_time_step ()
 }
 
 ADD_TRANSLATOR (Instrument_switch_engraver,
-               /* doc */
-               "Create a cue text for taking instrument.",
-                       
-               /* create */
-               "InstrumentSwitch ",
-
-               /* read */
-               "instrumentCueName ",
-                       
-               /* write */
-               ""
-               );
+                /* doc */
+                "Create a cue text for taking instrument.",
+
+                /* create */
+                "InstrumentSwitch ",
+
+                /* read */
+                "instrumentCueName ",
+
+                /* write */
+                ""
+               );
index 405fe776cdf42f157f674ad50fa1328998f01b11..bd612efdee551e47bd0073b77962c4b5da0e7592 100644 (file)
 
 #include "item.hh"
 
-
 LY_DEFINE (ly_item_p, "ly:item?",
-          1, 0, 0, (SCM g),
-          "Is @var{g} an @code{Item} object?")
+           1, 0, 0, (SCM g),
+           "Is @var{g} an @code{Item} object?")
 {
   Grob *me = unsmob_grob (g);
   bool b = dynamic_cast<Item *> (me);
@@ -31,10 +30,10 @@ LY_DEFINE (ly_item_p, "ly:item?",
 }
 
 LY_DEFINE (ly_item_break_dir, "ly:item-break-dir",
-          1, 0, 0, (SCM it),
-          "The break status direction of item @var{it}.  @code{-1} means"
-          " end of line, @code{0}@tie{}unbroken, and"
-          " @code{1}@tie{}beginning of line.")
+           1, 0, 0, (SCM it),
+           "The break status direction of item @var{it}.  @code{-1} means"
+           " end of line, @code{0}@tie{}unbroken, and"
+           " @code{1}@tie{}beginning of line.")
 {
   LY_ASSERT_TYPE (unsmob_item, it, 1);
   Item *me = unsmob_item (it);
index 0a853484e05bb58c1a1f3ca7594d0b977a610abf..4e9818192aad73b851129f72d5a70194d67a8797 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "moment.hh"
 
-
 Grob *
 Item::clone () const
 {
@@ -124,7 +123,7 @@ Item::find_broken_piece (System *l) const
     {
       Grob *s = broken_to_drul_[d];
       if (s && s->get_system () == l)
-       return s;
+        return s;
     }
   while (flip (&d) != LEFT);
 
@@ -169,7 +168,7 @@ Item::handle_prebroken_dependencies ()
 bool
 Item::break_visible (Grob *g)
 {
-  Item *it = dynamic_cast<Item*> (g);
+  Item *it = dynamic_cast<Item *> (g);
   SCM vis = g->get_property ("break-visibility");
   if (scm_is_vector (vis))
     return to_boolean (scm_c_vector_ref (vis, it->break_status_dir () + 1));
@@ -185,9 +184,9 @@ Item::pure_is_visible (int start, int end) const
       int pos = 1;
       int pc_rank = Paper_column::get_rank (get_column ());
       if (pc_rank == start)
-       pos = 2;
+        pos = 2;
       else if (pc_rank == end)
-       pos = 0;
+        pos = 0;
       return to_boolean (scm_vector_ref (vis, scm_from_int (pos)));
     }
   return true;
@@ -201,32 +200,30 @@ Item::spanned_rank_interval () const
 }
 
 Interval_t<Moment>
-spanned_time_interval (Item *l, Item *r) 
+spanned_time_interval (Item *l, Item *r)
 {
-  Drul_array<Item*> bounds (l, r);
+  Drul_array<Item *> bounds (l, r);
   Interval_t<Moment> iv;
 
   Direction d = LEFT;
   do
     {
       if (bounds[d] && bounds[d]->get_column ())
-       iv[d] = robust_scm2moment (bounds[d]->get_column ()->get_property ("when"),
-                                 iv[d]);
+        iv[d] = robust_scm2moment (bounds[d]->get_column ()->get_property ("when"),
+                                   iv[d]);
     }
   while (flip (&d) != LEFT);
 
   do
     {
       if (!bounds[d] || !bounds[d]->get_column ())
-       iv[d] = iv[-d];
+        iv[d] = iv[-d];
     }
   while (flip (&d) != LEFT);
-  
-  
+
   return iv;
 }
 
-
 void
 Item::derived_mark () const
 {
@@ -254,46 +251,46 @@ Item::pure_height (Grob *g, int start, int end)
 }
 
 ADD_INTERFACE (Item,
-              "Grobs can be distinguished in their role in the horizontal"
-              " spacing.  Many grobs define constraints on the spacing by"
-              " their sizes, for example, note heads, clefs, stems, and all"
-              " other symbols with a fixed shape.  These grobs form a"
-              " subtype called @code{Item}.\n"
-              "\n"
-              "Some items need special treatment for line breaking.  For"
-              " example, a clef is normally only printed at the start of a"
-              " line (i.e., after a line break).   To model this,"
-              " @q{breakable} items (clef, key signature, bar lines, etc.)"
-              " are copied twice.  Then we have three versions of each"
-              " breakable item: one version if there is no line break, one"
-              " version that is printed before the line break (at the end of"
-              " a system), and one version that is printed after the line"
-              " break.\n"
-              "\n"
-              "Whether these versions are visible and take up space is"
-              " determined by the outcome of the @code{break-visibility}"
-              " grob property, which is a function taking a direction"
-              " (@code{-1}, @code{0} or@tie{}@code{1}) as an argument.  It"
-              " returns a cons of booleans, signifying whether this grob"
-              " should be transparent and have no extent.\n"
-              "\n"
-              "The following variables for @code{break-visibility} are"
-              " predefined:\n"
-              "@example\n"
-              "           grob will show:   before  no     after\n"
-              "                             break   break  break\n"
-              "  all-invisible              no      no     no\n"
-              "  begin-of-line-visible      no      no     yes\n"
-              "  end-of-line-visible        yes     no     no\n"
-              "  all-visible                yes     yes    yes\n"
-              "  begin-of-line-invisible    yes     yes    no\n"
-              "  end-of-line-invisible      no      yes    yes\n"
-              "  center-invisible           yes      no    yes\n"
-              "@end example",
-
-              /* properties */
-              "break-visibility "
-              "extra-spacing-height "
-              "extra-spacing-width "
-              "non-musical "
-              );
+               "Grobs can be distinguished in their role in the horizontal"
+               " spacing.  Many grobs define constraints on the spacing by"
+               " their sizes, for example, note heads, clefs, stems, and all"
+               " other symbols with a fixed shape.  These grobs form a"
+               " subtype called @code{Item}.\n"
+               "\n"
+               "Some items need special treatment for line breaking.  For"
+               " example, a clef is normally only printed at the start of a"
+               " line (i.e., after a line break).   To model this,"
+               " @q{breakable} items (clef, key signature, bar lines, etc.)"
+               " are copied twice.  Then we have three versions of each"
+               " breakable item: one version if there is no line break, one"
+               " version that is printed before the line break (at the end of"
+               " a system), and one version that is printed after the line"
+               " break.\n"
+               "\n"
+               "Whether these versions are visible and take up space is"
+               " determined by the outcome of the @code{break-visibility}"
+               " grob property, which is a function taking a direction"
+               " (@code{-1}, @code{0} or@tie{}@code{1}) as an argument.  It"
+               " returns a cons of booleans, signifying whether this grob"
+               " should be transparent and have no extent.\n"
+               "\n"
+               "The following variables for @code{break-visibility} are"
+               " predefined:\n"
+               "@example\n"
+               "           grob will show:   before  no     after\n"
+               "                             break   break  break\n"
+               "  all-invisible              no      no     no\n"
+               "  begin-of-line-visible      no      no     yes\n"
+               "  end-of-line-visible        yes     no     no\n"
+               "  all-visible                yes     yes    yes\n"
+               "  begin-of-line-invisible    yes     yes    no\n"
+               "  end-of-line-invisible      no      yes    yes\n"
+               "  center-invisible           yes      no    yes\n"
+               "@end example",
+
+               /* properties */
+               "break-visibility "
+               "extra-spacing-height "
+               "extra-spacing-width "
+               "non-musical "
+              );
index 8cda5a0d5fecec3d4b342a2a4670095079633220..2bc4754811a6ee23d43fbb172dc5941c8743162d 100644 (file)
@@ -27,7 +27,7 @@
 
 class Keep_alive_together_engraver: public Engraver
 {
-  vector<Grob*> group_spanners_;
+  vector<Grob *> group_spanners_;
 
 public:
   TRANSLATOR_DECLARATIONS (Keep_alive_together_engraver);
@@ -65,21 +65,21 @@ Keep_alive_together_engraver::finalize ()
 ADD_ACKNOWLEDGER (Keep_alive_together_engraver, hara_kiri_group_spanner);
 
 ADD_TRANSLATOR (Keep_alive_together_engraver,
-               /* doc */
-               "This engraver collects all @code{Hara_kiri_group_spanner}s "
-               "that are created in contexts at or below its own.  "
-               "These spanners are then tied together so that one will "
-               "be removed only if all are removed.  For example, "
-               "if a @code{StaffGroup} uses this engraver, then the staves "
-               "in the group will all be visible as long as there is a note "
-               "in at least one of them.",
-
-               /* create */
-               "",
-
-               /* read */
-               "",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "This engraver collects all @code{Hara_kiri_group_spanner}s "
+                "that are created in contexts at or below its own.  "
+                "These spanners are then tied together so that one will "
+                "be removed only if all are removed.  For example, "
+                "if a @code{StaffGroup} uses this engraver, then the staves "
+                "in the group will all be visible as long as there is a note "
+                "in at least one of them.",
+
+                /* create */
+                "",
+
+                /* read */
+                "",
+
+                /* write */
+                ""
+               );
index 2264e27876a4e5473cda92b2328ac0ebaedccb55..4dec628213d720ca93981e3854ef7badbe9338dc 100644 (file)
@@ -63,55 +63,54 @@ Key_engraver::Key_engraver ()
   cancellation_ = 0;
 }
 
-
 void
 Key_engraver::create_key (bool is_default)
 {
   if (!item_)
     {
       item_ = make_item ("KeySignature",
-                        key_event_ ? key_event_->self_scm () : SCM_EOL);
+                         key_event_ ? key_event_->self_scm () : SCM_EOL);
 
       /* Use middleCClefPosition rather than middleCPosition, because cue
-       * notes with a different clef will modify middleCPosition. The 
+       * notes with a different clef will modify middleCPosition. The
        * Key signature, however, should still be printed at the original
        * position. */
       item_->set_property ("c0-position",
-                          get_property ("middleCClefPosition"));
+                           get_property ("middleCClefPosition"));
 
       SCM last = get_property ("lastKeySignature");
       SCM key = get_property ("keySignature");
 
       if ((to_boolean (get_property ("printKeyCancellation"))
-          || key == SCM_EOL)
-         && !scm_is_eq (last, key))
-       {
-         SCM restore = SCM_EOL;
-         SCM *tail = &restore;
-         for (SCM s = last; scm_is_pair (s); s = scm_cdr (s))
-           {
-             SCM new_alter_pair = scm_assoc (scm_caar (s), key);
-             Rational old_alter = robust_scm2rational (scm_cdar (s), 0);
-             if (new_alter_pair == SCM_BOOL_F
-                 || ((ly_scm2rational (scm_cdr (new_alter_pair)) - old_alter) * old_alter
-                     < Rational (0)))
-               {
-                 *tail = scm_cons (scm_car (s), *tail);
-                 tail = SCM_CDRLOC (*tail);
-               }
-           }
-
-         if (scm_is_pair (restore))
-           {
-             cancellation_ = make_item ("KeyCancellation",
-                                        key_event_
-                                        ? key_event_->self_scm () : SCM_EOL);
-             
-             cancellation_->set_property ("alteration-alist", scm_reverse (restore));
-             cancellation_->set_property ("c0-position",
-                                          get_property ("middleCPosition"));
-           }
-       }
+           || key == SCM_EOL)
+          && !scm_is_eq (last, key))
+        {
+          SCM restore = SCM_EOL;
+          SCM *tail = &restore;
+          for (SCM s = last; scm_is_pair (s); s = scm_cdr (s))
+            {
+              SCM new_alter_pair = scm_assoc (scm_caar (s), key);
+              Rational old_alter = robust_scm2rational (scm_cdar (s), 0);
+              if (new_alter_pair == SCM_BOOL_F
+                  || ((ly_scm2rational (scm_cdr (new_alter_pair)) - old_alter) * old_alter
+                      < Rational (0)))
+                {
+                  *tail = scm_cons (scm_car (s), *tail);
+                  tail = SCM_CDRLOC (*tail);
+                }
+            }
+
+          if (scm_is_pair (restore))
+            {
+              cancellation_ = make_item ("KeyCancellation",
+                                         key_event_
+                                         ? key_event_->self_scm () : SCM_EOL);
+
+              cancellation_->set_property ("alteration-alist", scm_reverse (restore));
+              cancellation_->set_property ("c0-position",
+                                           get_property ("middleCPosition"));
+            }
+        }
 
       item_->set_property ("alteration-alist", scm_reverse (key));
     }
@@ -179,31 +178,31 @@ Key_engraver::read_event (Stream_event const *r)
        scm_is_pair (s) && scm_is_pair (alist); s = scm_cdr (s))
     {
       SCM head = scm_member (scm_car (s), alist);
-      
+
       if (scm_is_pair (head))
-       {
-         accs = scm_cons (scm_car (head), accs);
-         alist = scm_delete_x (scm_car (head), alist);
-       }
+        {
+          accs = scm_cons (scm_car (head), accs);
+          alist = scm_delete_x (scm_car (head), alist);
+        }
     }
 
   if (scm_is_pair (alist))
     {
       bool warn = false;
       for (SCM s = alist; scm_is_pair (s); s = scm_cdr (s))
-       if (ly_scm2rational (scm_cdar (s)))
-         {
-           warn = true;
-           accs = scm_cons (scm_car (s), accs);
-         }
+        if (ly_scm2rational (scm_cdar (s)))
+          {
+            warn = true;
+            accs = scm_cons (scm_car (s), accs);
+          }
 
       if (warn)
-       r->origin ()->warning ("Incomplete keyAlterationOrder for key signature");
+        r->origin ()->warning ("Incomplete keyAlterationOrder for key signature");
     }
-  
+
   context ()->set_property ("keySignature", scm_reverse (accs));
   context ()->set_property ("tonic",
-                           r->get_property ("tonic"));
+                            r->get_property ("tonic"));
 }
 
 void
@@ -220,25 +219,25 @@ ADD_ACKNOWLEDGER (Key_engraver, clef);
 ADD_ACKNOWLEDGER (Key_engraver, bar_line);
 
 ADD_TRANSLATOR (Key_engraver,
-               /* doc */
-               "Engrave a key signature.",
-
-               /* create */
-               "KeyCancellation "
-               "KeySignature ",
-               
-               /* read */
-               "createKeyOnClefChange "
-               "explicitKeySignatureVisibility "
-               "extraNatural "
-               "keyAlterationOrder "
-               "keySignature "
-               "lastKeySignature "
-               "printKeyCancellation "
-               "middleCClefPosition ",
-               
-               /* write */
-               "keySignature "
-               "lastKeySignature "
-               "tonic "
-               );
+                /* doc */
+                "Engrave a key signature.",
+
+                /* create */
+                "KeyCancellation "
+                "KeySignature ",
+
+                /* read */
+                "createKeyOnClefChange "
+                "explicitKeySignatureVisibility "
+                "extraNatural "
+                "keyAlterationOrder "
+                "keySignature "
+                "lastKeySignature "
+                "printKeyCancellation "
+                "middleCClefPosition ",
+
+                /* write */
+                "keySignature "
+                "lastKeySignature "
+                "tonic "
+               );
index 93d932b8d5494a0a3483eaa9e66991572ef52030..dc247440fbacc7e1b042871dda0fc5e263b6d3ed 100644 (file)
@@ -62,26 +62,26 @@ Key_performer::process_music ()
       SCM acc = scm_call_1 (proc, pitchlist);
 
       Pitch key_do (0,
-                   scm_to_int (scm_caar (pitchlist)),
-                   ly_scm2rational (scm_cdar (pitchlist)));
+                    scm_to_int (scm_caar (pitchlist)),
+                    ly_scm2rational (scm_cdar (pitchlist)));
 
       Pitch c_do (0, 0, 0);
 
       SCM c_pitchlist
-       = ly_transpose_key_alist (pitchlist,
-                                 pitch_interval (key_do, c_do).smobbed_copy ());
+        = ly_transpose_key_alist (pitchlist,
+                                  pitch_interval (key_do, c_do).smobbed_copy ());
 
       /* MIDI keys are too limited for lilypond scales.
-        We check for minor scale and assume major otherwise.  */
+         We check for minor scale and assume major otherwise.  */
 
       SCM third = scm_assoc (scm_from_int (2),
-                            c_pitchlist);
+                             c_pitchlist);
       bool minor = (scm_is_pair (third)
-                   && scm_is_number (scm_cdr (third))
-                   && ly_scm2rational (scm_cdr (third)) == FLAT_ALTERATION);
+                    && scm_is_number (scm_cdr (third))
+                    && ly_scm2rational (scm_cdr (third)) == FLAT_ALTERATION);
 
       audio_ = new Audio_key (scm_to_int (acc),
-                             !minor);
+                              !minor);
 
       Audio_element_info info (audio_, key_ev_);
       announce_element (info);
@@ -107,15 +107,15 @@ Key_performer::listen_key_change (Stream_event *ev)
 }
 
 ADD_TRANSLATOR (Key_performer,
-               /* doc */
-               "",
+                /* doc */
+                "",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index f05dc7dabe9019dc3ef49de900d47420a79410da..52fbcffb6f206bef3578fb4e6747a1d0cfb91368 100644 (file)
@@ -34,7 +34,6 @@ struct Key_signature_interface
   DECLARE_GROB_INTERFACE ();
 };
 
-
 /*
   TODO
   - space the `natural' signs wider
@@ -52,7 +51,7 @@ Key_signature_interface::print (SCM smob)
   SCM c0s = me->get_property ("c0-position");
 
   bool is_cancellation = me->internal_has_interface
-    (ly_symbol2scm ("key-cancellation-interface"));
+                         (ly_symbol2scm ("key-cancellation-interface"));
 
   /*
     SCM lists are stacks, so we work from right to left, ending with
@@ -62,60 +61,60 @@ Key_signature_interface::print (SCM smob)
   int last_pos = -1000;
   SCM last_glyph_name = SCM_BOOL_F;
   SCM padding_pairs = me->get_property ("padding-pairs");
-    
+
   Font_metric *fm = Font_interface::get_default_font (me);
   SCM alist = me->get_property ("glyph-name-alist");
 
   for (SCM s = me->get_property ("alteration-alist"); scm_is_pair (s); s = scm_cdr (s))
     {
       SCM alt = is_cancellation
-       ? scm_from_int (0)
-       : scm_cdar (s);
+                ? scm_from_int (0)
+                : scm_cdar (s);
 
       SCM glyph_name_scm = ly_assoc_get (alt, alist, SCM_BOOL_F);
       if (!scm_is_string (glyph_name_scm))
-       {
-         me->warning (_f ("No glyph found for alteration: %s",
-                          ly_scm2rational (alt).to_string ().c_str ()));
-         continue;
-       }
+        {
+          me->warning (_f ("No glyph found for alteration: %s",
+                           ly_scm2rational (alt).to_string ().c_str ()));
+          continue;
+        }
 
       string glyph_name = ly_scm2string (glyph_name_scm);
 
       Stencil acc (fm->find_by_name (glyph_name));
 
       if (acc.is_empty ())
-       me->warning (_ ("alteration not found"));
+        me->warning (_ ("alteration not found"));
       else
-       {
-         SCM what = scm_caar (s);
-
-         SCM proc = ly_lily_module_constant ("key-signature-interface::alteration-position");
-
-         int pos = scm_to_int (scm_call_3 (proc, what, scm_cdar (s), c0s));
-         acc.translate_axis (pos * inter, Y_AXIS);
-
-         /*
-           The natural sign (unlike flat & sharp)
-           has vertical edges on both sides. A little padding is
-           needed to prevent collisions.
-         */
-         Real padding = robust_scm2double (me->get_property ("padding"),
-                                           0.0);
-         SCM handle = scm_assoc (scm_cons (glyph_name_scm, last_glyph_name),
-                                 padding_pairs);
-         if (scm_is_pair (handle))
-           padding = robust_scm2double (scm_cdr (handle), 0.0);
-         else if (glyph_name ==  "accidentals.natural"
-             && last_pos < pos + 2
-             && last_pos > pos - 6)
-           padding += 0.3;
-
-         mol.add_at_edge (X_AXIS, LEFT, acc, padding);
-         
-         last_pos = pos;
-         last_glyph_name = glyph_name_scm;
-       }
+        {
+          SCM what = scm_caar (s);
+
+          SCM proc = ly_lily_module_constant ("key-signature-interface::alteration-position");
+
+          int pos = scm_to_int (scm_call_3 (proc, what, scm_cdar (s), c0s));
+          acc.translate_axis (pos * inter, Y_AXIS);
+
+          /*
+            The natural sign (unlike flat & sharp)
+            has vertical edges on both sides. A little padding is
+            needed to prevent collisions.
+          */
+          Real padding = robust_scm2double (me->get_property ("padding"),
+                                            0.0);
+          SCM handle = scm_assoc (scm_cons (glyph_name_scm, last_glyph_name),
+                                  padding_pairs);
+          if (scm_is_pair (handle))
+            padding = robust_scm2double (scm_cdr (handle), 0.0);
+          else if (glyph_name == "accidentals.natural"
+                   && last_pos < pos + 2
+                   && last_pos > pos - 6)
+            padding += 0.3;
+
+          mol.add_at_edge (X_AXIS, LEFT, acc, padding);
+
+          last_pos = pos;
+          last_glyph_name = glyph_name_scm;
+        }
     }
 
   mol.align_to (X_AXIS, LEFT);
@@ -124,12 +123,12 @@ Key_signature_interface::print (SCM smob)
 }
 
 ADD_INTERFACE (Key_signature_interface,
-              "A group of accidentals, to be printed as signature sign.",
-
-              /* properties */
-              "alteration-alist "
-              "c0-position "
-              "glyph-name-alist "
-              "padding "
-              "padding-pairs "
-              );
+               "A group of accidentals, to be printed as signature sign.",
+
+               /* properties */
+               "alteration-alist "
+               "c0-position "
+               "glyph-name-alist "
+               "padding "
+               "padding-pairs "
+              );
index 49c64ce772d8908ef7d70e0206fb8c3523f2fd66..307f5aa7e6700dc3847ca8157a3e2663381c50ca 100644 (file)
@@ -29,7 +29,7 @@ class Laissez_vibrer_engraver : public Engraver
 {
   Stream_event *event_;
   Grob *lv_column_;
-  vector<Grob*> lv_ties_;
+  vector<Grob *> lv_ties_;
 
   void stop_translation_timestep ();
   DECLARE_ACKNOWLEDGER (note_head);
@@ -75,7 +75,7 @@ Laissez_vibrer_engraver::acknowledge_note_head (Grob_info inf)
   lv_tie->set_object ("note-head", inf.grob ()->self_scm ());
 
   Pointer_group_interface::add_grob (lv_column_, ly_symbol2scm ("ties"),
-                                    lv_tie);
+                                     lv_tie);
 
   if (is_direction (unsmob_stream_event (cause)->get_property ("direction")))
     {
@@ -90,16 +90,16 @@ Laissez_vibrer_engraver::acknowledge_note_head (Grob_info inf)
 
 ADD_ACKNOWLEDGER (Laissez_vibrer_engraver, note_head);
 ADD_TRANSLATOR (Laissez_vibrer_engraver,
-               /* doc */
-               "Create laissez vibrer items.",
+                /* doc */
+                "Create laissez vibrer items.",
 
-               /* create */
-               "LaissezVibrerTie "
-               "LaissezVibrerTieColumn ",
+                /* create */
+                "LaissezVibrerTie "
+                "LaissezVibrerTieColumn ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 048920b1926c25a02b56d982b36aff302e8b0893..66a0999780a9f84bc79dfbdba016e7ae418ca6a0 100644 (file)
 
 void
 minimise_least_squares (Real *coef, Real *offset,
-                       vector<Offset> const &input)
+                        vector<Offset> const &input)
 {
   Real sx = 0.0;
   Real sy = 0.0;
   Real sqx = 0.0;
   Real sxy = 0.0;
 
-  for (vsize i = 0; i < input.size ();i++)
+  for (vsize i = 0; i < input.size (); i++)
     {
       Real x = input[i][X_AXIS];
       Real y = input[i][Y_AXIS];
       sx += x;
       sy += y;
       sqx += sqr (x);
-      sxy += x*y;
+      sxy += x * y;
     }
 
   int count = input.size ();
@@ -49,8 +49,8 @@ minimise_least_squares (Real *coef, Real *offset,
   if (!count || !den)
     {
       programming_error ("minimise_least_squares ():  Nothing to minimise\n"
-                        "This means that vertical spacing is triggered\n"
-                        "before line breaking\n");
+                         "This means that vertical spacing is triggered\n"
+                         "before line breaking\n");
       *coef = 0.0;
       *offset = count ? sy / count : 0.0;
     }
index bd0a323e97221bbe2bf1bab7bab3945c00d0febe..e1d2539f09bc5fb223b82d1f82f8bacd60af053a 100644 (file)
@@ -25,8 +25,8 @@
 class Ledger_line_engraver : public Engraver
 {
   Spanner *span_;
-  vector<Grob*> ledgered_grobs_;
-  
+  vector<Grob *> ledgered_grobs_;
+
 public:
   TRANSLATOR_DECLARATIONS (Ledger_line_engraver);
 
@@ -62,12 +62,12 @@ Ledger_line_engraver::stop_translation_timestep ()
   if (span_)
     {
       for (vsize i = 0; i < ledgered_grobs_.size (); i++)
-       {
-         if (!to_boolean (ledgered_grobs_[i]->get_property ("no-ledgers")))
-           Pointer_group_interface::add_grob (span_,
-                                              ly_symbol2scm ("note-heads"),
-                                              ledgered_grobs_[i]);
-       }
+        {
+          if (!to_boolean (ledgered_grobs_[i]->get_property ("no-ledgers")))
+            Pointer_group_interface::add_grob (span_,
+                                               ly_symbol2scm ("note-heads"),
+                                               ledgered_grobs_[i]);
+        }
     }
 
   ledgered_grobs_.clear ();
@@ -77,7 +77,7 @@ void
 Ledger_line_engraver::process_music ()
 {
   /*
-    Need to do this, otherwise the first note might miss ledgers. 
+    Need to do this, otherwise the first note might miss ledgers.
   */
   if (!span_)
     start_spanner ();
@@ -124,16 +124,16 @@ Ledger_line_engraver::acknowledge_ledgered (Grob_info s)
 ADD_ACKNOWLEDGER (Ledger_line_engraver, ledgered);
 ADD_ACKNOWLEDGER (Ledger_line_engraver, staff_symbol);
 ADD_TRANSLATOR (Ledger_line_engraver,
-               /* doc */
-               "Create the spanner to draw ledger lines, and notices"
-               " objects that need ledger lines.",
+                /* doc */
+                "Create the spanner to draw ledger lines, and notices"
+                " objects that need ledger lines.",
 
-               /* create */
-               "LedgerLineSpanner ",
+                /* create */
+                "LedgerLineSpanner ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index a518bc9225b5ef0abdd819cb42436c8336d6cda5..01238222147c9afbf4f33a2e6b62ac2018a46c9f 100644 (file)
@@ -33,55 +33,55 @@ struct Ledger_line_spanner
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
   static Stencil brew_ledger_lines (Grob *me,
-                                   int pos,
-                                   Interval,
-                                   Real, Real,
-                                   Interval x_extent,
-                                   Real left_shorten);
+                                    int pos,
+                                    Interval,
+                                    Real, Real,
+                                    Interval x_extent,
+                                    Real left_shorten);
 
   DECLARE_GROB_INTERFACE ();
 };
 
 Stencil
 Ledger_line_spanner::brew_ledger_lines (Grob *staff,
-                                       int pos,
-                                       Interval staff_extent,
-                                       Real halfspace,
-                                       Real ledgerlinethickness,
-                                       Interval x_extent,
-                                       Real left_shorten)
+                                        int pos,
+                                        Interval staff_extent,
+                                        Real halfspace,
+                                        Real ledgerlinethickness,
+                                        Interval x_extent,
+                                        Real left_shorten)
 {
   int line_count = (staff_extent.contains (pos)
-                   ? 0
-                   : sign (pos) * int (rint (pos -  staff_extent[Direction (sign (pos))])) / 2);
+                    ? 0
+                    : sign (pos) * int (rint (pos - staff_extent[Direction (sign (pos))])) / 2);
   Stencil stencil;
   if (line_count)
     {
       Real blotdiameter = ledgerlinethickness;
       Interval y_extent
-       = Interval (-0.5 * (ledgerlinethickness),
-                   +0.5 * (ledgerlinethickness));
+        = Interval (-0.5 * (ledgerlinethickness),
+                    +0.5 * (ledgerlinethickness));
       Stencil proto_ledger_line
-       = Lookup::round_filled_box (Box (x_extent, y_extent), blotdiameter);
+        = Lookup::round_filled_box (Box (x_extent, y_extent), blotdiameter);
 
       x_extent[LEFT] += left_shorten;
       Stencil proto_first_line
-       = Lookup::round_filled_box (Box (x_extent, y_extent), blotdiameter);
+        = Lookup::round_filled_box (Box (x_extent, y_extent), blotdiameter);
 
       Direction dir = (Direction)sign (pos);
       Real offs = (Staff_symbol_referencer::on_line (staff, pos))
-       ? 0.0
-       : -dir * halfspace;
+                  ? 0.0
+                  : -dir * halfspace;
 
       offs += pos * halfspace;
       for (int i = 0; i < line_count; i++)
-       {
-         Stencil ledger_line ((i == 0)
-                              ? proto_first_line
-                              : proto_ledger_line);
-         ledger_line.translate_axis (-dir * halfspace * i * 2 + offs, Y_AXIS);
-         stencil.add_stencil (ledger_line);
-       }
+        {
+          Stencil ledger_line ((i == 0)
+                               ? proto_first_line
+                               : proto_ledger_line);
+          ledger_line.translate_axis (-dir * halfspace * i * 2 + offs, Y_AXIS);
+          stencil.add_stencil (ledger_line);
+        }
     }
 
   return stencil;
@@ -89,33 +89,33 @@ Ledger_line_spanner::brew_ledger_lines (Grob *staff,
 
 static void
 set_rods (Drul_array<Interval> const &current_extents,
-         Drul_array<Interval> const &previous_extents,
-         Item *current_column,
-         Item *previous_column,
-         Real min_length_fraction)
+          Drul_array<Interval> const &previous_extents,
+          Item *current_column,
+          Item *previous_column,
+          Real min_length_fraction)
 {
   Direction d = UP;
   do
     {
       if (!current_extents[d].is_empty ()
-         && !previous_extents[d].is_empty ())
-       {
-         Real total_head_length = previous_extents[d].length ()
-           + current_extents[d].length ();
-
-         Rod rod;
-         rod.distance_ = total_head_length
-           * (3 / 2 * min_length_fraction)
-           /*
-             we go from right to left.
-           */
-           - previous_extents[d][LEFT]
-           + current_extents[d][RIGHT];
-
-         rod.item_drul_[LEFT] = current_column;
-         rod.item_drul_[RIGHT] = previous_column;
-         rod.add_to_cols ();
-       }
+          && !previous_extents[d].is_empty ())
+        {
+          Real total_head_length = previous_extents[d].length ()
+                                   + current_extents[d].length ();
+
+          Rod rod;
+          rod.distance_ = total_head_length
+                          * (3 / 2 * min_length_fraction)
+                          /*
+                            we go from right to left.
+                          */
+                          - previous_extents[d][LEFT]
+                          + current_extents[d][RIGHT];
+
+          rod.item_drul_[LEFT] = current_column;
+          rod.item_drul_[RIGHT] = previous_column;
+          rod.add_to_cols ();
+        }
     }
   while (flip (&d) != DOWN);
 }
@@ -146,7 +146,7 @@ Ledger_line_spanner::set_spacing_rods (SCM smob)
 
   Interval staff_extent = staff->extent (staff, Y_AXIS);
   staff_extent *= 1 / halfspace;
-    
+
   /*
     Run through heads using a loop. Since Ledger_line_spanner can
     contain a lot of noteheads, superlinear performance is too slow.
@@ -158,35 +158,35 @@ Ledger_line_spanner::set_spacing_rods (SCM smob)
 
       int pos = Staff_symbol_referencer::get_rounded_position (h);
       if (staff_extent.contains (pos))
-       continue;
+        continue;
 
       Item *column = h->get_column ();
       if (current_column != column)
-       {
-         set_rods (current_extents, previous_extents,
-                   current_column, previous_column,
-                   min_length_fraction);
+        {
+          set_rods (current_extents, previous_extents,
+                    current_column, previous_column,
+                    min_length_fraction);
 
-         previous_column = current_column;
-         current_column = column;
-         previous_extents = current_extents;
+          previous_column = current_column;
+          current_column = column;
+          previous_extents = current_extents;
 
-         current_extents[DOWN].set_empty ();
-         current_extents[UP].set_empty ();
-       }
+          current_extents[DOWN].set_empty ();
+          current_extents[UP].set_empty ();
+        }
 
       Interval head_extent = h->extent (column, X_AXIS);
       Direction vdir = Direction (sign (pos));
       if (!vdir)
-       continue;
+        continue;
 
       current_extents[vdir].unite (head_extent);
     }
 
   if (previous_column && current_column)
     set_rods (current_extents, previous_extents,
-             current_column, previous_column,
-             min_length_fraction);
+              current_column, previous_column,
+              min_length_fraction);
 
   return SCM_UNSPECIFIED;
 }
@@ -231,7 +231,7 @@ Ledger_line_spanner::print (SCM smob)
 
   Interval staff_extent = staff->extent (staff, Y_AXIS);
   staff_extent *= 1 / halfspace;
-  
+
   Real length_fraction
     = robust_scm2double (me->get_property ("length-fraction"), 0.25);
 
@@ -245,8 +245,8 @@ Ledger_line_spanner::print (SCM smob)
       Axis a = Axis (i);
       common[a] = common_refpoint_of_array (heads, me, a);
       for (vsize i = heads.size (); i--;)
-       if (Grob *g = unsmob_grob (me->get_object ("accidental-grob")))
-         common[a] = common[a]->common_refpoint (g, a);
+        if (Grob *g = unsmob_grob (me->get_object ("accidental-grob")))
+          common[a] = common[a]->common_refpoint (g, a);
     }
 
   Ledger_requests reqs;
@@ -256,19 +256,19 @@ Ledger_line_spanner::print (SCM smob)
 
       int pos = Staff_symbol_referencer::get_rounded_position (h);
       if (pos && !staff_extent.contains (pos))
-       {
-         Interval head_extent = h->extent (common[X_AXIS], X_AXIS);
-         Interval ledger_extent = head_extent;
-         ledger_extent.widen (length_fraction * head_extent.length ());
-
-         Direction vdir = Direction (sign (pos));
-         int rank = h->get_column ()->get_rank ();
-
-         reqs[rank][vdir].ledger_extent_.unite (ledger_extent);
-         reqs[rank][vdir].head_extent_.unite (head_extent);
-         reqs[rank][vdir].position_
-           = vdir * max (vdir * reqs[rank][vdir].position_, vdir * pos);
-       }
+        {
+          Interval head_extent = h->extent (common[X_AXIS], X_AXIS);
+          Interval ledger_extent = head_extent;
+          ledger_extent.widen (length_fraction * head_extent.length ());
+
+          Direction vdir = Direction (sign (pos));
+          int rank = h->get_column ()->get_rank ();
+
+          reqs[rank][vdir].ledger_extent_.unite (ledger_extent);
+          reqs[rank][vdir].head_extent_.unite (head_extent);
+          reqs[rank][vdir].position_
+            = vdir * max (vdir * reqs[rank][vdir].position_, vdir * pos);
+        }
     }
 
   // determine maximum size for non-colliding ledger.
@@ -278,37 +278,37 @@ Ledger_line_spanner::print (SCM smob)
        i != reqs.end (); last = i++)
     {
       if (last == reqs.end ())
-       continue;
+        continue;
 
       Direction d = DOWN;
       do
-       {
-         if (!staff_extent.contains (last->second[d].position_)
-             && !staff_extent.contains (i->second[d].position_))
-           {
-             Real center
-               = (last->second[d].head_extent_[RIGHT]
-                  + i->second[d].head_extent_[LEFT]) / 2;
-
-             Direction which = LEFT;
-             do
-               {
-                 Ledger_request &lr = ((which == LEFT) ? * last : *i).second[d];
-
-                 // due tilt of quarter note-heads
-                 /* FIXME */
-                 bool both
-                   = (!staff_extent.contains (last->second[d].position_
-                                              - sign (last->second[d].position_))
-                      && !staff_extent.contains (i->second[d].position_
-                                                 - sign (i->second[d].position_)));
-                 Real limit = (center + (both ? which * gap / 2 : 0));
-                 lr.ledger_extent_.at (-which)
-                   = which * max (which * lr.ledger_extent_[-which], which * limit);
-               }
-             while (flip (&which) != LEFT);
-           }
-       }
+        {
+          if (!staff_extent.contains (last->second[d].position_)
+              && !staff_extent.contains (i->second[d].position_))
+            {
+              Real center
+                = (last->second[d].head_extent_[RIGHT]
+                   + i->second[d].head_extent_[LEFT]) / 2;
+
+              Direction which = LEFT;
+              do
+                {
+                  Ledger_request &lr = ((which == LEFT) ? * last : *i).second[d];
+
+                  // due tilt of quarter note-heads
+                  /* FIXME */
+                  bool both
+                    = (!staff_extent.contains (last->second[d].position_
+                                               - sign (last->second[d].position_))
+                       && !staff_extent.contains (i->second[d].position_
+                                                  - sign (i->second[d].position_)));
+                  Real limit = (center + (both ? which * gap / 2 : 0));
+                  lr.ledger_extent_.at (-which)
+                    = which * max (which * lr.ledger_extent_[-which], which * limit);
+                }
+              while (flip (&which) != LEFT);
+            }
+        }
       while (flip (&d) != DOWN);
     }
 
@@ -321,58 +321,58 @@ Ledger_line_spanner::print (SCM smob)
 
       int pos = Staff_symbol_referencer::get_rounded_position (h);
       if (!staff_extent.contains (pos - sign (pos)) && !staff_extent.is_empty ())
-       {
-         Interval head_size = h->extent (common[X_AXIS], X_AXIS);
-         Interval ledger_size = head_size;
-         ledger_size.widen (ledger_size.length () * length_fraction);
-
-         Interval max_size = reqs[h->get_column ()->get_rank ()]
-           [Direction (sign (pos))].ledger_extent_;
-
-         ledger_size.intersect (max_size);
-         Real left_shorten = 0.0;
-         if (Grob *g = unsmob_grob (h->get_object ("accidental-grob")))
-           {
-             Interval accidental_size = g->extent (common[X_AXIS], X_AXIS);
-             Real d
-               = linear_combination (Drul_array<Real> (accidental_size[RIGHT],
-                                                       head_size[LEFT]),
-                                     0.0);
-
-             left_shorten = max (-ledger_size[LEFT] + d, 0.0);
-
-             /*
-               TODO: shorten 2 ledger lines for the case natural +
-               downstem.
-             */
-           }
-
-         ledgers.add_stencil (brew_ledger_lines (staff, pos, staff_extent,
-                                                 halfspace,
-                                                 ledgerlinethickness,
-                                                 ledger_size,
-                                                 left_shorten));
-       }
+        {
+          Interval head_size = h->extent (common[X_AXIS], X_AXIS);
+          Interval ledger_size = head_size;
+          ledger_size.widen (ledger_size.length () * length_fraction);
+
+          Interval max_size = reqs[h->get_column ()->get_rank ()]
+                              [Direction (sign (pos))].ledger_extent_;
+
+          ledger_size.intersect (max_size);
+          Real left_shorten = 0.0;
+          if (Grob *g = unsmob_grob (h->get_object ("accidental-grob")))
+            {
+              Interval accidental_size = g->extent (common[X_AXIS], X_AXIS);
+              Real d
+                = linear_combination (Drul_array<Real> (accidental_size[RIGHT],
+                                                        head_size[LEFT]),
+                                      0.0);
+
+              left_shorten = max (-ledger_size[LEFT] + d, 0.0);
+
+              /*
+                TODO: shorten 2 ledger lines for the case natural +
+                downstem.
+              */
+            }
+
+          ledgers.add_stencil (brew_ledger_lines (staff, pos, staff_extent,
+                                                  halfspace,
+                                                  ledgerlinethickness,
+                                                  ledger_size,
+                                                  left_shorten));
+        }
     }
 
   ledgers.translate_axis (-me->relative_coordinate (common[X_AXIS], X_AXIS),
-                         X_AXIS);
+                          X_AXIS);
 
   return ledgers.smobbed_copy ();
 }
 
 ADD_INTERFACE (Ledger_line_spanner,
-              "This spanner draws the ledger lines of a staff.  This is a"
-              " separate grob because it has to process all potential"
-              " collisions between all note heads.",
-
-              /* properties */
-              "gap "   
-              "length-fraction "       
-              "minimum-length-fraction "
-              "note-heads "
-              "thickness "
-              );
+               "This spanner draws the ledger lines of a staff.  This is a"
+               " separate grob because it has to process all potential"
+               " collisions between all note heads.",
+
+               /* properties */
+               "gap "
+               "length-fraction "
+               "minimum-length-fraction "
+               "note-heads "
+               "thickness "
+              );
 
 struct Ledgered_interface
 {
@@ -380,9 +380,9 @@ struct Ledgered_interface
 };
 
 ADD_INTERFACE (Ledgered_interface,
-              "Objects that need ledger lines, typically note heads.  See"
-              " also @ref{ledger-line-spanner-interface}.",
+               "Objects that need ledger lines, typically note heads.  See"
+               " also @ref{ledger-line-spanner-interface}.",
 
-              /* properties */
-              "no-ledgers "
-              );
+               /* properties */
+               "no-ledgers "
+              );
index b467ec998a3a16383da42f0f648af9b8fbe36a86..47c28c71e6e0ff42b8f8cfc6e4df53d7bf5d3e34 100644 (file)
@@ -63,15 +63,15 @@ Ligature_bracket_engraver::Ligature_bracket_engraver ()
 }
 
 void
-Ligature_bracket_engraver::process_music()
+Ligature_bracket_engraver::process_music ()
 {
   if (events_drul_[STOP])
     {
       if (!ligature_)
-       {
-         events_drul_[STOP]->origin ()->warning (_ ("cannot find start of ligature"));
-         return;
-       }
+        {
+          events_drul_[STOP]->origin ()->warning (_ ("cannot find start of ligature"));
+          return;
+        }
 
       finished_ligature_ = ligature_;
       ligature_ = 0;
@@ -81,10 +81,10 @@ Ligature_bracket_engraver::process_music()
   if (events_drul_[START])
     {
       if (ligature_)
-       {
-         events_drul_[START]->origin ()->warning (_ ("already have a ligature"));
-         return;
-       }
+        {
+          events_drul_[START]->origin ()->warning (_ ("already have a ligature"));
+          return;
+        }
 
       previous_start_event_ = events_drul_[START];
       ligature_ = make_spanner ("LigatureBracket", events_drul_[START]->self_scm ());
@@ -97,23 +97,22 @@ Ligature_bracket_engraver::acknowledge_note_column (Grob_info info)
   if (ligature_)
     {
       Tuplet_bracket::add_column (ligature_,
-                                 info.item ());
-      add_bound_item (ligature_, info.item());
+                                  info.item ());
+      add_bound_item (ligature_, info.item ());
     }
 }
 
 void
 Ligature_bracket_engraver::acknowledge_rest (Grob_info info)
 {
-  acknowledge_note_column(info);
+  acknowledge_note_column (info);
 }
 
-
 void
 Ligature_bracket_engraver::stop_translation_timestep ()
 {
-  events_drul_[LEFT] =  
-    events_drul_[RIGHT] = 0;
+  events_drul_[LEFT]
+    events_drul_[RIGHT] = 0;
   finished_ligature_ = 0;
 }
 
@@ -121,16 +120,16 @@ ADD_ACKNOWLEDGER (Ligature_bracket_engraver, rest);
 ADD_ACKNOWLEDGER (Ligature_bracket_engraver, note_column);
 
 ADD_TRANSLATOR (Ligature_bracket_engraver,
-               /* doc */
-               "Handle @code{Ligature_events} by engraving @code{Ligature}"
-               " brackets.",
+                /* doc */
+                "Handle @code{Ligature_events} by engraving @code{Ligature}"
+                " brackets.",
 
-               /* create */
-               "LigatureBracket ",
+                /* create */
+                "LigatureBracket ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 99e86ed20b193a1da92e40532ebac1a85f340d2a..ed346a14805504e7cf68374e005bf83340ce51a8 100644 (file)
@@ -100,15 +100,15 @@ Ligature_engraver::process_music ()
   if (events_drul_[STOP])
     {
       if (!ligature_)
-       {
-         events_drul_[STOP]->origin ()->warning (_ ("cannot find start of ligature"));
-         return;
-       }
+        {
+          events_drul_[STOP]->origin ()->warning (_ ("cannot find start of ligature"));
+          return;
+        }
 
       if (!last_bound_)
-       events_drul_[STOP]->origin ()->warning (_ ("no right bound"));
+        events_drul_[STOP]->origin ()->warning (_ ("no right bound"));
       else
-       ligature_->set_bound (RIGHT, last_bound_);
+        ligature_->set_bound (RIGHT, last_bound_);
 
       prev_start_event_ = 0;
       finished_primitives_ = primitives_;
@@ -127,19 +127,19 @@ Ligature_engraver::process_music ()
   if (events_drul_[START])
     {
       if (ligature_)
-       {
-         events_drul_[START]->origin ()->warning (_ ("already have a ligature"));
-         return;
-       }
+        {
+          events_drul_[START]->origin ()->warning (_ ("already have a ligature"));
+          return;
+        }
 
       prev_start_event_ = events_drul_[START];
       ligature_ = create_ligature_spanner ();
 
       Grob *bound = unsmob_grob (get_property ("currentMusicalColumn"));
       if (!bound)
-       events_drul_[START]->origin ()->warning (_ ("no left bound"));
+        events_drul_[START]->origin ()->warning (_ ("no left bound"));
       else
-       ligature_->set_bound (LEFT, bound);
+        ligature_->set_bound (LEFT, bound);
 
       ligature_start_mom_ = now_mom ();
 
@@ -154,16 +154,15 @@ Ligature_engraver::stop_translation_timestep ()
   if (finished_ligature_)
     {
       if (!finished_primitives_.size ())
-       {
-         finished_ligature_->programming_error (
-           "Ligature_engraver::stop_translation_timestep ():"
-           " junking empty ligature");
-       }
+        {
+          finished_ligature_->programming_error ("Ligature_engraver::stop_translation_timestep ():"
+                                                 " junking empty ligature");
+        }
       else
-       {
-         typeset_ligature (finished_ligature_, finished_primitives_);
-         finished_primitives_.clear ();
-       }
+        {
+          typeset_ligature (finished_ligature_, finished_primitives_);
+          finished_primitives_.clear ();
+        }
       finished_ligature_ = 0;
     }
 
index 1763a5cebbe23593f744ec98def2bc3ea60bcc61..4d6f6a79c6440c331d54f090853cda0439243500 100644 (file)
@@ -41,7 +41,6 @@ using namespace std;
 #include "version.hh"
 #include "warn.hh"
 
-
 /*
   symbols/strings.
  */
@@ -49,9 +48,9 @@ string
 ly_scm_write_string (SCM s)
 {
   SCM port = scm_mkstrport (SCM_INUM0,
-                           scm_make_string (SCM_INUM0, SCM_UNDEFINED),
-                           SCM_OPN | SCM_WRTNG,
-                           "ly_write2string");
+                            scm_make_string (SCM_INUM0, SCM_UNDEFINED),
+                            SCM_OPN | SCM_WRTNG,
+                            "ly_write2string");
   //  SCM write = scm_eval_3 (ly_symbol2scm ("write"), s, SCM_EOL);
   SCM write = scm_primitive_eval (ly_symbol2scm ("write"));
 
@@ -83,13 +82,13 @@ gulp_file_to_string (string fn, bool must_exist, int size)
   if (s == "")
     {
       if (must_exist)
-       {
-         string e = _f ("cannot find file: `%s'", fn);
-         e += " ";
-         e += _f ("(load path: `%s')", global_path.to_string ());
-         error (e);
-         /* unreachable */
-       }
+        {
+          string e = _f ("cannot find file: `%s'", fn);
+          e += " ";
+          e += _f ("(load path: `%s')", global_path.to_string ());
+          error (e);
+          /* unreachable */
+        }
       return s;
     }
 
@@ -124,10 +123,11 @@ ly_scm2string (SCM str)
   assert (scm_is_string (str));
   string result;
   size_t len = scm_c_string_length (str);
-  if (len) {
-    result.resize(len);
-    scm_to_locale_stringbuf(str, &result.at(0), len);
-  }
+  if (len)
+    {
+      result.resize (len);
+      scm_to_locale_stringbuf (str, &result.at (0), len);
+    }
   return result;
 }
 
@@ -135,7 +135,7 @@ SCM
 ly_string2scm (string const &str)
 {
   return scm_from_locale_stringn (str.c_str (),
-                                 str.length ());
+                                  str.length ());
 }
 
 char *
@@ -147,7 +147,7 @@ ly_scm2str0 (SCM str)
 /*
   PAIRS
 */
-SCM 
+SCM
 index_get_cell (SCM s, Direction d)
 {
   assert (d);
@@ -168,10 +168,9 @@ bool
 is_number_pair (SCM p)
 {
   return scm_is_pair (p)
-    && scm_is_number (scm_car (p)) && scm_is_number (scm_cdr (p));
+         && scm_is_number (scm_car (p)) && scm_is_number (scm_cdr (p));
 }
 
-
 unsigned int
 ly_scm_hash (SCM s)
 {
@@ -236,7 +235,7 @@ Drul_array<Real>
 ly_scm2realdrul (SCM p)
 {
   return Drul_array<Real> (scm_to_double (scm_car (p)),
-                          scm_to_double (scm_cdr (p)));
+                           scm_to_double (scm_cdr (p)));
 }
 
 SCM
@@ -245,7 +244,6 @@ ly_interval2scm (Drul_array<Real> i)
   return scm_cons (scm_from_double (i[LEFT]), scm_from_double (i[RIGHT]));
 }
 
-
 Interval
 robust_scm2interval (SCM k, Drul_array<Real> v)
 {
@@ -289,7 +287,7 @@ Offset
 ly_scm2offset (SCM s)
 {
   return Offset (scm_to_double (scm_car (s)),
-                scm_to_double (scm_cdr (s)));
+                 scm_to_double (scm_cdr (s)));
 }
 
 Offset
@@ -321,9 +319,6 @@ ly_scm2offsets (SCM s)
   return os;
 }
 
-
-
-
 /*
   ALIST
 */
@@ -339,9 +334,9 @@ alist_equal_p (SCM a, SCM b)
       SCM l = scm_assoc (key, b);
 
       if (l == SCM_BOOL_F
-         || !ly_is_equal (scm_cdr (l), val))
+          || !ly_is_equal (scm_cdr (l), val))
 
-       return false;
+        return false;
     }
   return true;
 }
@@ -371,7 +366,6 @@ robust_list_ref (int i, SCM l)
   return scm_car (l);
 }
 
-
 SCM
 ly_deep_copy (SCM src)
 {
@@ -381,11 +375,11 @@ ly_deep_copy (SCM src)
     {
       int len = scm_c_vector_length (src);
       SCM nv = scm_c_make_vector (len, SCM_UNDEFINED);
-      for (int i = 0;i < len; i++)
-       {
-         SCM si = scm_from_int (i);
-         scm_vector_set_x (nv, si, ly_deep_copy (scm_vector_ref (src, si)));
-       }
+      for (int i = 0; i < len; i++)
+        {
+          SCM si = scm_from_int (i);
+          scm_vector_set_x (nv, si, ly_deep_copy (scm_vector_ref (src, si)));
+        }
     }
   return src;
 }
@@ -396,8 +390,8 @@ print_scm_val (SCM val)
   string realval = ly_scm_write_string (val);
   if (realval.length () > 200)
     realval = realval.substr (0, 100)
-      + "\n :\n :\n"
-      + realval.substr (realval.length () - 100);
+              + "\n :\n :\n"
+              + realval.substr (realval.length () - 100);
   return realval;
 }
 
@@ -419,15 +413,15 @@ type_check_assignment (SCM sym, SCM val, SCM type_symbol)
 #if 0
     return false;
 #else
-  /*
-    This is used for autoBeamSettings.
+    /*
+      This is used for autoBeamSettings.
 
-    TODO: deprecate the use of \override and \revert for
-    autoBeamSettings?
+      TODO: deprecate the use of \override and \revert for
+      autoBeamSettings?
 
-    or use a symbol autoBeamSettingS?
-  */
-  return true;
+      or use a symbol autoBeamSettingS?
+    */
+    return true;
 #endif
 
   SCM type = scm_object_property (sym, type_symbol);
@@ -435,33 +429,33 @@ type_check_assignment (SCM sym, SCM val, SCM type_symbol)
   if (type != SCM_EOL && !ly_is_procedure (type))
     {
       warning (_f ("cannot find property type-check for `%s' (%s).",
-                  ly_symbol2string (sym).c_str (),
-                  ly_symbol2string (type_symbol).c_str ())
-              + "  " + _ ("perhaps a typing error?"));
+                   ly_symbol2string (sym).c_str (),
+                   ly_symbol2string (type_symbol).c_str ())
+               + "  " + _ ("perhaps a typing error?"));
 
       /* Be strict when being anal :) */
       if (do_internal_type_checking_global)
-       scm_throw (ly_symbol2scm ("ly-file-failed"), scm_list_3 (ly_symbol2scm ("typecheck"),
-                                                                sym, val));
+        scm_throw (ly_symbol2scm ("ly-file-failed"), scm_list_3 (ly_symbol2scm ("typecheck"),
+                                                                 sym, val));
 
       warning (_ ("doing assignment anyway"));
     }
   else
     {
       if (val != SCM_EOL
-         && ly_is_procedure (type)
-         && scm_call_1 (type, val) == SCM_BOOL_F)
-       {
-         ok = false;
-         SCM typefunc = ly_lily_module_constant ("type-name");
-         SCM type_name = scm_call_1 (typefunc, type);
-
-         warning (_f ("type check for `%s' failed; value `%s' must be of type `%s'",
-                      ly_symbol2string (sym).c_str (),
-                      print_scm_val (val),
-                      ly_scm2string (type_name).c_str ()));
-         progress_indication ("\n");
-       }
+          && ly_is_procedure (type)
+          && scm_call_1 (type, val) == SCM_BOOL_F)
+        {
+          ok = false;
+          SCM typefunc = ly_lily_module_constant ("type-name");
+          SCM type_name = scm_call_1 (typefunc, type);
+
+          warning (_f ("type check for `%s' failed; value `%s' must be of type `%s'",
+                       ly_symbol2string (sym).c_str (),
+                       print_scm_val (val),
+                       ly_scm2string (type_name).c_str ()));
+          progress_indication ("\n");
+        }
     }
   return ok;
 }
@@ -479,13 +473,12 @@ ly_unique (SCM list)
   for (SCM i = list; scm_is_pair (i); i = scm_cdr (i))
     {
       if (!scm_is_pair (scm_cdr (i))
-         || !ly_is_equal (scm_car (i), scm_cadr (i)))
-       unique = scm_cons (scm_car (i), unique);
+          || !ly_is_equal (scm_car (i), scm_cadr (i)))
+        unique = scm_cons (scm_car (i), unique);
     }
   return scm_reverse_x (unique, SCM_EOL);
 }
 
-
 /* Split list at member s, removing s.
    Return (BEFORE . AFTER)  */
 SCM
@@ -498,7 +491,7 @@ ly_split_list (SCM s, SCM list)
       SCM i = scm_car (after);
       after = scm_cdr (after);
       if (ly_is_equal (i, s))
-       break;
+        break;
       before = scm_cons (i, before);
     }
   return scm_cons (scm_reverse_x (before, SCM_EOL), after);
@@ -549,7 +542,6 @@ robust_scm2double (SCM k, double x)
   return x;
 }
 
-
 string
 robust_scm2string (SCM k, string s)
 {
@@ -566,20 +558,18 @@ robust_scm2int (SCM k, int o)
   return o;
 }
 
-
 SCM
 ly_rational2scm (Rational r)
 {
   return scm_divide (scm_from_int64 (r.numerator ()),
-                    scm_from_int64 (r.denominator ()));
+                     scm_from_int64 (r.denominator ()));
 }
 
-
 Rational
 ly_scm2rational (SCM r)
 {
   return Rational (scm_to_int64 (scm_numerator (r)),
-                  scm_to_int64 (scm_denominator (r)));
+                   scm_to_int64 (scm_denominator (r)));
 }
 
 Rational
@@ -614,7 +604,6 @@ ly_hash2alist (SCM tab)
   return scm_call_1 (func, tab);
 }
 
-
 /*
   C++ interfacing.
  */
@@ -639,17 +628,14 @@ mangle_cxx_identifier (string cxx_id)
   replace_all (&cxx_id, "__", "::");
   replace_all (&cxx_id, '_', '-');
 
-
   return cxx_id;
 }
 
-
-
 SCM
 ly_string_array_to_scm (vector<string> a)
 {
   SCM s = SCM_EOL;
-  for (vsize i = a.size (); i ; i--)
+  for (vsize i = a.size (); i; i--)
     s = scm_cons (ly_symbol2scm (a[i - 1].c_str ()), s);
   return s;
 }
index e2be4fca43067fd53d1e2aaf32e36ae2249b9fac..02644096b671f28c29c93e1068bd3e2e8f28f152 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2006--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
-  
+
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
 #include "lily-lexer.hh"
 
 LY_DEFINE (ly_lexer_keywords, "ly:lexer-keywords",
-         1, 0, 0, (SCM lexer),
-         "Return a list of @code{(KEY . CODE)} pairs, signifying the"
-         " LilyPond reserved words list.")
+           1, 0, 0, (SCM lexer),
+           "Return a list of @code{(KEY . CODE)} pairs, signifying the"
+           " LilyPond reserved words list.")
 {
   LY_ASSERT_SMOB (Lily_lexer, lexer, 1);
 
-  Lily_lexer * lex = Lily_lexer::unsmob (lexer);
+  Lily_lexer *lex = Lily_lexer::unsmob (lexer);
   return lex->keyword_list ();
 }
index 1160fe69f6e18b0af582a74789c95eb412b57dc5..5d87c83872d25052496f800de539760a71264c69 100644 (file)
@@ -37,7 +37,8 @@ using namespace std;
 #include "lily-parser.hh"
 
 static Keyword_ent the_key_tab[]
-= {
+=
+{
   {"accepts", ACCEPTS},
   {"addlyrics", ADDLYRICS},
   {"alias", ALIAS},
@@ -209,8 +210,8 @@ Lily_lexer::keyword_list () const
   for (vsize i = 0; i < keytable_->table_.size (); i++)
     {
       *tail = scm_acons (scm_from_locale_string (keytable_->table_[i].name_),
-                        scm_from_int (keytable_->table_[i].tokcode_),
-                        SCM_EOL);
+                         scm_from_int (keytable_->table_[i].tokcode_),
+                         SCM_EOL);
 
       tail = SCM_CDRLOC (*tail);
     }
@@ -225,7 +226,7 @@ Lily_lexer::lookup_identifier_symbol (SCM sym)
     {
       SCM var = ly_module_lookup (scm_car (s), sym);
       if (var != SCM_BOOL_F)
-       return scm_variable_ref (var);
+        return scm_variable_ref (var);
     }
 
   return SCM_UNDEFINED;
@@ -246,8 +247,8 @@ Lily_lexer::start_main_input ()
   new_input (main_input_name_, sources_);
 
   scm_module_define (scm_car (scopes_),
-                    ly_symbol2scm ("input-file-name"),
-                    ly_string2scm (main_input_name_));
+                     ly_symbol2scm ("input-file-name"),
+                     ly_string2scm (main_input_name_));
 }
 
 void
@@ -286,19 +287,19 @@ Lily_lexer::set_identifier (SCM path, SCM val)
   if (scm_is_symbol (sym))
     {
       if (lookup_keyword (ly_symbol2string (sym)) >= 0)
-       {
-         string symstr = ly_symbol2string (sym);
-         warning (_f ("identifier name is a keyword: `%s'", symstr.c_str ()));
-       }
+        {
+          string symstr = ly_symbol2string (sym);
+          warning (_f ("identifier name is a keyword: `%s'", symstr.c_str ()));
+        }
 
       SCM mod = scm_car (scopes_);
 
       if (scm_is_pair (path))
-       {
-         SCM prev = ly_module_lookup (mod, sym);
-         if (prev != SCM_BOOL_F)
-           val = nested_property_alist (scm_variable_ref (prev), path, val);
-       }
+        {
+          SCM prev = ly_module_lookup (mod, sym);
+          if (prev != SCM_BOOL_F)
+            val = nested_property_alist (scm_variable_ref (prev), path, val);
+        }
       scm_module_define (mod, sym, val);
     }
   else
@@ -356,7 +357,7 @@ Lily_lexer::add_lexed_char (int count)
 {
   char const *start = here_str0 ();
   lexloc_->set (get_source_file (),
-               start, start + count);
+                start, start + count);
   char_count_stack_.back () += count;
 }
 
@@ -382,7 +383,7 @@ Lily_lexer::mark_smob (SCM s)
 }
 
 int
-Lily_lexer::print_smob (SCM s, SCM port, scm_print_state*)
+Lily_lexer::print_smob (SCM s, SCM port, scm_print_state *)
 {
   Lily_lexer *lexer = Lily_lexer::unsmob (s);
 
index 6a5f8d791ba5d6ca880ee9fbee579f441af430d0..ceefa6b0387626e2395fe190673ce714af237675 100644 (file)
@@ -33,9 +33,9 @@
 #include "warn.hh"
 
 LY_DEFINE (ly_parse_file, "ly:parse-file",
-          1, 0, 0, (SCM name),
-          "Parse a single @code{.ly} file."
-          "  Upon failure, throw @code{ly-file-failed} key.")
+           1, 0, 0, (SCM name),
+           "Parse a single @code{.ly} file."
+           "  Upon failure, throw @code{ly-file-failed} key.")
 {
   LY_ASSERT_TYPE (scm_is_string, name, 1);
   string file = ly_scm2string (name);
@@ -51,9 +51,10 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
   out_file_name.ext_ = "";
   out_file_name.root_ = "";
   if (ly_get_option (ly_symbol2scm ("gui")) != SCM_BOOL_T
-      && ly_get_option (ly_symbol2scm ("strip-output-dir")) == SCM_BOOL_T) {
-    out_file_name.dir_ = "";
-  }
+      && ly_get_option (ly_symbol2scm ("strip-output-dir")) == SCM_BOOL_T)
+    {
+      out_file_name.dir_ = "";
+    }
 
   /* When running from gui, generate output in .ly source directory.  */
   string output_name = output_name_global;
@@ -62,29 +63,29 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
       /* Interpret --output=DIR to mean --output=DIR/BASE.  */
       string dir;
       if (is_dir (output_name))
-       {
-         dir = output_name;
-         output_name = "";
-       }
+        {
+          dir = output_name;
+          output_name = "";
+        }
       else
-       {
-         File_name out (output_name);
-         if (is_dir (out.dir_part ()))
-           {
-             dir = out.dir_part ();
-             out_file_name = out.file_part ();
-           }
-       }
+        {
+          File_name out (output_name);
+          if (is_dir (out.dir_part ()))
+            {
+              dir = out.dir_part ();
+              out_file_name = out.file_part ();
+            }
+        }
 
       if (dir != "" && dir != "." && dir != get_working_directory ())
-       {
-         global_path.prepend (get_working_directory ());
-         message (_f ("Changing working directory to: `%s'",
-                      dir.c_str ()));
-         chdir (dir.c_str ());
-       }
+        {
+          global_path.prepend (get_working_directory ());
+          message (_f ("Changing working directory to: `%s'",
+                       dir.c_str ()));
+          chdir (dir.c_str ());
+        }
       else
-       out_file_name = File_name (output_name);
+        out_file_name = File_name (output_name);
     }
 
   string init;
@@ -98,11 +99,10 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
     {
       warning (_f ("cannot find init file: `%s'", init));
       warning (_f ("(search path: `%s')",
-                  global_path.to_string ().c_str ()));
+                   global_path.to_string ().c_str ()));
       exit (2);
     }
 
-
   bool error = false;
   if ((file_name != "-") && file_name.empty ())
     {
@@ -134,23 +134,22 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
   if (error)
     /* TODO: pass renamed input file too.  */
     scm_throw (ly_symbol2scm ("ly-file-failed"),
-              scm_list_1 (ly_string2scm (file_name)));
+               scm_list_1 (ly_string2scm (file_name)));
 
   return SCM_UNSPECIFIED;
 }
 
-
 LY_DEFINE (ly_parser_lexer, "ly:parser-lexer",
-          1, 0, 0, (SCM parser_smob),
-          "Return the lexer for @var{parser-smob}.")
+           1, 0, 0, (SCM parser_smob),
+           "Return the lexer for @var{parser-smob}.")
 {
   Lily_parser *parser = unsmob_lily_parser (parser_smob);
   return parser->lexer_->self_scm ();
 }
 
 LY_DEFINE (ly_parser_clone, "ly:parser-clone",
-          1, 0, 0, (SCM parser_smob),
-          "Return a clone of @var{parser-smob}.")
+           1, 0, 0, (SCM parser_smob),
+           "Return a clone of @var{parser-smob}.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
   Lily_parser *parser = unsmob_lily_parser (parser_smob);
@@ -160,8 +159,8 @@ LY_DEFINE (ly_parser_clone, "ly:parser-clone",
 }
 
 LY_DEFINE (ly_parser_define_x, "ly:parser-define!",
-          3, 0, 0, (SCM parser_smob, SCM symbol, SCM val),
-          "Bind @var{symbol} to @var{val} in @var{parser-smob}'s module.")
+           3, 0, 0, (SCM parser_smob, SCM symbol, SCM val),
+           "Bind @var{symbol} to @var{val} in @var{parser-smob}'s module.")
 {
 
   LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
@@ -174,9 +173,9 @@ LY_DEFINE (ly_parser_define_x, "ly:parser-define!",
 }
 
 LY_DEFINE (ly_parser_lookup, "ly:parser-lookup",
-          2, 0, 0, (SCM parser_smob, SCM symbol),
-          "Look up @var{symbol} in @var{parser-smob}'s module."
-          "  Return @code{'()} if not defined.")
+           2, 0, 0, (SCM parser_smob, SCM symbol),
+           "Look up @var{symbol} in @var{parser-smob}'s module."
+           "  Return @code{'()} if not defined.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
 
@@ -192,9 +191,9 @@ LY_DEFINE (ly_parser_lookup, "ly:parser-lookup",
 }
 
 LY_DEFINE (ly_parser_parse_string, "ly:parser-parse-string",
-          2, 0, 0, (SCM parser_smob, SCM ly_code),
-          "Parse the string @var{ly-code} with @var{parser-smob}."
-          "  Upon failure, throw @code{ly-file-failed} key.")
+           2, 0, 0, (SCM parser_smob, SCM ly_code),
+           "Parse the string @var{ly-code} with @var{parser-smob}."
+           "  Upon failure, throw @code{ly-file-failed} key.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
   Lily_parser *parser = unsmob_lily_parser (parser_smob);
@@ -202,7 +201,7 @@ LY_DEFINE (ly_parser_parse_string, "ly:parser-parse-string",
 
   if (!parser->lexer_->is_clean ())
     parser->parser_error (_ ("ly:parser-parse-string is only valid with a new parser."
-                            "  Use ly:parser-include-string instead."));
+                             "  Use ly:parser-include-string instead."));
   else
     parser->parse_string (ly_scm2string (ly_code));
 
@@ -210,9 +209,9 @@ LY_DEFINE (ly_parser_parse_string, "ly:parser-parse-string",
 }
 
 LY_DEFINE (ly_parser_include_string, "ly:parser-include-string",
-          2, 0, 0, (SCM parser_smob, SCM ly_code),
-          "Include the string @var{ly-code} into the input stream"
-          " for @var{parser-smob}.")
+           2, 0, 0, (SCM parser_smob, SCM ly_code),
+           "Include the string @var{ly-code} into the input stream"
+           " for @var{parser-smob}.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
   Lily_parser *parser = unsmob_lily_parser (parser_smob);
@@ -224,10 +223,10 @@ LY_DEFINE (ly_parser_include_string, "ly:parser-include-string",
 }
 
 LY_DEFINE (ly_parser_set_note_names, "ly:parser-set-note-names",
-          2, 0, 0, (SCM parser, SCM names),
-          "Replace current note names in @var{parser}."
-          "  @var{names} is an alist of symbols.  This only has effect"
-          " if the current mode is notes.")
+           2, 0, 0, (SCM parser, SCM names),
+           "Replace current note names in @var{parser}."
+           "  @var{names} is an alist of symbols.  This only has effect"
+           " if the current mode is notes.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser, 1);
   Lily_parser *p = unsmob_lily_parser (parser);
@@ -268,8 +267,8 @@ LY_DEFINE (ly_parser_set_repetition_function, "ly:parser-set-repetition-function
 }
 
 LY_DEFINE (ly_parser_output_name, "ly:parser-output-name",
-          1, 0, 0, (SCM parser),
-          "Return the base name of the output file.")
+           1, 0, 0, (SCM parser),
+           "Return the base name of the output file.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser, 1);
   Lily_parser *p = unsmob_lily_parser (parser);
@@ -278,8 +277,8 @@ LY_DEFINE (ly_parser_output_name, "ly:parser-output-name",
 }
 
 LY_DEFINE (ly_parser_error, "ly:parser-error",
-          2, 1, 0, (SCM parser, SCM msg, SCM input),
-          "Display an error message and make the parser fail.")
+           2, 1, 0, (SCM parser, SCM msg, SCM input),
+           "Display an error message and make the parser fail.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser, 1);
   Lily_parser *p = unsmob_lily_parser (parser);
@@ -297,13 +296,12 @@ LY_DEFINE (ly_parser_error, "ly:parser-error",
 }
 
 LY_DEFINE (ly_parser_clear_error, "ly:parser-clear-error",
-          1, 0, 0, (SCM parser),
-          "Clear the error flag for the parser.")
+           1, 0, 0, (SCM parser),
+           "Clear the error flag for the parser.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser, 1);
   Lily_parser *p = unsmob_lily_parser (parser);
 
-
   p->error_level_ = 0;
   p->lexer_->error_level_ = 0;
 
@@ -311,8 +309,8 @@ LY_DEFINE (ly_parser_clear_error, "ly:parser-clear-error",
 }
 
 LY_DEFINE (ly_parser_has_error_p, "ly:parser-has-error?",
-          1, 0, 0, (SCM parser),
-          "Does @var{parser} have an error flag?")
+           1, 0, 0, (SCM parser),
+           "Does @var{parser} have an error flag?")
 {
   LY_ASSERT_SMOB (Lily_parser, parser, 1);
   Lily_parser *p = unsmob_lily_parser (parser);
index 2ee77b1e6dec7a0f270761362c642c37d792aaa0..ba3bd0f99be8c0f5a503d5dffe50d7cb007f047a 100644 (file)
@@ -72,7 +72,6 @@ Lily_parser::~Lily_parser ()
 {
 }
 
-
 SCM
 Lily_parser::mark_smob (SCM s)
 {
@@ -81,7 +80,7 @@ Lily_parser::mark_smob (SCM s)
 }
 
 int
-Lily_parser::print_smob (SCM s, SCM port, scm_print_state*)
+Lily_parser::print_smob (SCM s, SCM port, scm_print_state *)
 {
   scm_puts ("#<Lily_parser ", port);
   Lily_parser *parser = (Lily_parser *) SCM_CELL_WORD_1 (s);
@@ -124,7 +123,7 @@ Lily_parser::parse_file (string init, string name, string out_name)
     Don't mix cyclic pointers with weak tables.
   */
   lexer_->set_identifier (ly_symbol2scm ("parser"),
-                         SCM_EOL);
+                          SCM_EOL);
   ly_reexport_module (scm_current_module ());
 
   scm_set_current_module (mod);
@@ -144,7 +143,7 @@ Lily_parser::parse_string (string ly_code)
 {
   // TODO: use $parser
   lexer_->set_identifier (ly_symbol2scm ("parser"),
-                         self_scm ());
+                          self_scm ());
 
   lexer_->main_input_name_ = "<string>";
   lexer_->is_main_input_ = true;
@@ -157,8 +156,8 @@ Lily_parser::parse_string (string ly_code)
   if (!define_spots_.empty ())
     {
       if (define_spots_.empty ()
-         && !error_level_)
-       programming_error ("define_spots_ don't match, but error_level_ not set.");
+          && !error_level_)
+        programming_error ("define_spots_ don't match, but error_level_ not set.");
     }
 
   error_level_ = error_level_ | lexer_->error_level_;
@@ -176,7 +175,7 @@ Lily_parser::clear ()
   if (lexer_)
     {
       while (lexer_->has_scope ())
-       lexer_->remove_scope ();
+        lexer_->remove_scope ();
     }
 
   lexer_ = 0;
@@ -202,13 +201,10 @@ Lily_parser::parser_error (Input const &i, string s)
   error_level_ = 1;
 }
 
-
-
 IMPLEMENT_SMOBS (Lily_parser);
 IMPLEMENT_TYPE_P (Lily_parser, "ly:lily-parser?");
 IMPLEMENT_DEFAULT_EQUAL_P (Lily_parser);
 
-
 /****************************************************************
   OUTPUT-DEF
  ****************************************************************/
@@ -240,8 +236,8 @@ Output_def *
 get_paper (Lily_parser *parser)
 {
   SCM papers = parser->lexer_->lookup_identifier ("$papers");
-  Output_def *layout = ((papers == SCM_UNDEFINED) || scm_is_null (papers)) ?
-    0 : unsmob_output_def (scm_car (papers));
+  Output_def *layout = ((papers == SCM_UNDEFINED) || scm_is_null (papers))
+                       ? 0 : unsmob_output_def (scm_car (papers));
   SCM default_paper = parser->lexer_->lookup_identifier ("$defaultpaper");
   layout = layout ? layout : unsmob_output_def (default_paper);
 
index e7b686a208e920ac0eda5cfe00b803c8eb6744d0..8db2b47440bb041f39de0cf6e56bb00463f4fb60 100644 (file)
@@ -32,10 +32,10 @@ Lilypond_version::Lilypond_version (int major, int minor, int patch)
 
 Lilypond_version::Lilypond_version (string str)
 {
-  major_ = 0; 
+  major_ = 0;
   minor_ = 0;
   patch_ = 0;
-  
+
   vector<string> version;
   version = string_split (str, '.');
 
@@ -43,7 +43,7 @@ Lilypond_version::Lilypond_version (string str)
     major_ = String_convert::dec2int (version[0]);
   if (version.size () > 1 && isdigit (version[1][0]))
     minor_ = String_convert::dec2int (version[1]);
-  
+
   patch_ = 0;
   if (version.size () >= 3
       && isdigit (version[2][0]))
@@ -57,8 +57,8 @@ string
 Lilypond_version::to_string () const
 {
   return ::to_string (major_)
-    + "." + ::to_string (minor_)
-    + "." + ::to_string (patch_);
+         + "." + ::to_string (minor_)
+         + "." + ::to_string (patch_);
 }
 
 Lilypond_version::operator int () const
index ebbd62ef4f2b61ac9bff1824b9e102b15c3edb4d..991225f517b11526c1b12559c72dd4172a79e857 100644 (file)
@@ -27,8 +27,8 @@
 
 Stencil
 Line_interface::make_arrow (Offset begin, Offset end,
-                           Real thick,
-                           Real length, Real width)
+                            Real thick,
+                            Real length, Real width)
 {
   Real angle = (end - begin).arg ();
   vector<Offset> points;
@@ -45,8 +45,8 @@ Line_interface::make_arrow (Offset begin, Offset end,
 
 Stencil
 Line_interface::make_trill_line (Grob *me,
-                                Offset from,
-                                Offset to)
+                                 Offset from,
+                                 Offset to)
 {
   Offset dz = (to - from);
 
@@ -60,7 +60,7 @@ Line_interface::make_trill_line (Grob *me,
       programming_error ("can't find scripts.trill_element");
       return Stencil ();
     }
-      
+
   Stencil line;
   Real len = 0.0;
   do
@@ -73,19 +73,18 @@ Line_interface::make_trill_line (Grob *me,
   line.rotate (dz.arg (), Offset (LEFT, CENTER));
   line.translate (from);
 
-  return line; 
+  return line;
 }
 
-
 Stencil
 Line_interface::make_zigzag_line (Grob *me,
-                                 Offset from,
-                                 Offset to)
+                                  Offset from,
+                                  Offset to)
 {
   Offset dz = to - from;
 
   Real thick = Staff_symbol_referencer::line_thickness (me);
-  thick *= robust_scm2double (me->get_property ("thickness"), 1.0); // todo: staff sym referencer? 
+  thick *= robust_scm2double (me->get_property ("thickness"), 1.0); // todo: staff sym referencer?
 
   Real staff_space = Staff_symbol_referencer::staff_space (me);
 
@@ -119,23 +118,22 @@ Line_interface::make_zigzag_line (Grob *me,
   return total;
 }
 
-
 Stencil
 Line_interface::make_dashed_line (Real thick, Offset from, Offset to,
-                                 Real dash_period, Real dash_fraction)
+                                  Real dash_period, Real dash_fraction)
 {
   dash_fraction = min (max (dash_fraction, 0.0), 1.0);
   Real on = dash_fraction * dash_period + thick;
   Real off = max (0.0, dash_period - on);
 
   SCM at = scm_list_n (ly_symbol2scm ("dashed-line"),
-                      scm_from_double (thick),
-                      scm_from_double (on),
-                      scm_from_double (off),
-                      scm_from_double (to[X_AXIS] - from[X_AXIS]),
-                      scm_from_double (to[Y_AXIS] - from[Y_AXIS]),
-                      scm_from_double (0.0),
-                      SCM_UNDEFINED);
+                       scm_from_double (thick),
+                       scm_from_double (on),
+                       scm_from_double (off),
+                       scm_from_double (to[X_AXIS] - from[X_AXIS]),
+                       scm_from_double (to[Y_AXIS] - from[Y_AXIS]),
+                       scm_from_double (0.0),
+                       SCM_UNDEFINED);
 
   Box box;
   box.add_point (Offset (0, 0));
@@ -153,12 +151,12 @@ Stencil
 Line_interface::make_line (Real th, Offset from, Offset to)
 {
   SCM at = scm_list_n (ly_symbol2scm ("draw-line"),
-                      scm_from_double (th),
-                      scm_from_double (from[X_AXIS]),
-                      scm_from_double (from[Y_AXIS]),
-                      scm_from_double (to[X_AXIS]),
-                      scm_from_double (to[Y_AXIS]),
-                      SCM_UNDEFINED);
+                       scm_from_double (th),
+                       scm_from_double (from[X_AXIS]),
+                       scm_from_double (from[Y_AXIS]),
+                       scm_from_double (to[X_AXIS]),
+                       scm_from_double (to[Y_AXIS]),
+                       SCM_UNDEFINED);
 
   Box box;
   box.add_point (from);
@@ -172,24 +170,24 @@ Line_interface::make_line (Real th, Offset from, Offset to)
 
 Stencil
 Line_interface::arrows (Grob *me, Offset from, Offset to,
-                       bool from_arrow,
-                       bool to_arrow)
+                        bool from_arrow,
+                        bool to_arrow)
 {
   Stencil a;
   if (from_arrow || to_arrow)
     {
       Real thick = Staff_symbol_referencer::line_thickness (me)
-       * robust_scm2double (me->get_property ("thickness"), 1);
+                   * robust_scm2double (me->get_property ("thickness"), 1);
       Real ss = Staff_symbol_referencer::staff_space (me);
 
       Real len = robust_scm2double (me->get_property ("arrow-length"), 1.3 * ss);
       Real wid = robust_scm2double (me->get_property ("arrow-width"), 0.5 * ss);
 
       if (to_arrow)
-       a.add_stencil (make_arrow (from, to, thick, len, wid));
+        a.add_stencil (make_arrow (from, to, thick, len, wid));
 
       if (from_arrow)
-       a.add_stencil (make_arrow (to, from, thick, len, wid));
+        a.add_stencil (make_arrow (to, from, thick, len, wid));
     }
 
   return a;
@@ -199,7 +197,7 @@ Stencil
 Line_interface::line (Grob *me, Offset from, Offset to)
 {
   Real thick = Staff_symbol_referencer::line_thickness (me)
-    * robust_scm2double (me->get_property ("thickness"), 1);
+               * robust_scm2double (me->get_property ("thickness"), 1);
 
   SCM type = me->get_property ("style");
   if (type == ly_symbol2scm ("zigzag"))
@@ -208,36 +206,36 @@ Line_interface::line (Grob *me, Offset from, Offset to)
     return make_trill_line (me, from, to);
   else if (type == ly_symbol2scm ("none"))
     return Stencil ();
-  
+
   Stencil stencil;
 
   if (type == ly_symbol2scm ("dashed-line") || type == ly_symbol2scm ("dotted-line"))
     {
 
       Real fraction
-       = type == ly_symbol2scm ("dotted-line")
-       ? 0.0
-       : robust_scm2double (me->get_property ("dash-fraction"), 0.4);
+        = type == ly_symbol2scm ("dotted-line")
+          ? 0.0
+          : robust_scm2double (me->get_property ("dash-fraction"), 0.4);
 
       fraction = min (max (fraction, 0.0), 1.0);
       Real period = Staff_symbol_referencer::staff_space (me)
-       * robust_scm2double (me->get_property ("dash-period"), 1.0);
+                    * robust_scm2double (me->get_property ("dash-period"), 1.0);
 
       if (period <= 0)
-       return Stencil ();
+        return Stencil ();
 
       Real len = (to - from).length ();
-      
+
       int n = (int) rint ((len - period * fraction) / period);
       n = max (0, n);
       if (n > 0)
-       {
-         /*
-           TODO: figure out something intelligent for really short
-           sections.
-          */
-         period = ((to - from).length () - period * fraction) / n;
-       }
+        {
+          /*
+            TODO: figure out something intelligent for really short
+            sections.
+           */
+          period = ((to - from).length () - period * fraction) / n;
+        }
       stencil = make_dashed_line (thick, from, to, period, fraction);
     }
   else
@@ -247,22 +245,22 @@ Line_interface::line (Grob *me, Offset from, Offset to)
 }
 
 ADD_INTERFACE (Line_interface,
-              "Generic line objects.  Any object using lines supports this."
-              "  The property @code{style} can be @code{line},"
-              " @code{dashed-line}, @code{trill}, @code{dotted-line},"
-              " @code{zigzag} or @code{none} (a transparent line).\n"
-              "\n"
-              "For @code{dashed-line}, the length of the dashes is tuned"
-              " with @code{dash-fraction}.  If the latter is set to@tie{}0, a"
-              " dotted line is produced.",
-
-              /* properties */
-              "arrow-length "
-              "arrow-width "
-              "dash-fraction "
-              "dash-period "
-              "style "
-              "thickness "
-              "zigzag-length "
-              "zigzag-width "
-              );
+               "Generic line objects.  Any object using lines supports this."
+               "  The property @code{style} can be @code{line},"
+               " @code{dashed-line}, @code{trill}, @code{dotted-line},"
+               " @code{zigzag} or @code{none} (a transparent line).\n"
+               "\n"
+               "For @code{dashed-line}, the length of the dashes is tuned"
+               " with @code{dash-fraction}.  If the latter is set to@tie{}0, a"
+               " dotted line is produced.",
+
+               /* properties */
+               "arrow-length "
+               "arrow-width "
+               "dash-fraction "
+               "dash-period "
+               "style "
+               "thickness "
+               "zigzag-length "
+               "zigzag-width "
+              );
index d55c01ff45b8e391bcb45ffa91970a164d8d35a2..b2877211f17d31eac7fb87ead457feadaf892777 100644 (file)
@@ -63,17 +63,17 @@ Line_spanner::calc_bound_info (SCM smob, Direction dir)
   SCM details = SCM_BOOL_F;
   if (details == SCM_BOOL_F)
     details = ly_assoc_get ((dir == LEFT)
-                           ? ly_symbol2scm ("left")
-                           : ly_symbol2scm ("right"), bound_details, SCM_BOOL_F);
+                            ? ly_symbol2scm ("left")
+                            : ly_symbol2scm ("right"), bound_details, SCM_BOOL_F);
 
   if (me->get_bound (dir)->break_status_dir ())
     {
       SCM extra = ly_assoc_get ((dir == LEFT)
-                               ? ly_symbol2scm ("left-broken")
-                               : ly_symbol2scm ("right-broken"), bound_details, SCM_EOL);
+                                ? ly_symbol2scm ("left-broken")
+                                : ly_symbol2scm ("right-broken"), bound_details, SCM_EOL);
 
       for (SCM s = scm_reverse (extra); scm_is_pair (s); s = scm_cdr (s))
-       details = scm_cons (scm_car (s), details);
+        details = scm_cons (scm_car (s), details);
     }
 
   if (details == SCM_BOOL_F)
@@ -85,107 +85,106 @@ Line_spanner::calc_bound_info (SCM smob, Direction dir)
       Output_def *layout = me->layout ();
       SCM properties = Font_interface::text_font_alist_chain (me);
       details = scm_acons (ly_symbol2scm ("stencil"),
-                          Text_interface::interpret_markup (layout->self_scm (),
-                                                            properties, text),
-                          details);
+                           Text_interface::interpret_markup (layout->self_scm (),
+                                                             properties, text),
+                           details);
     }
 
   if (!scm_is_number (ly_assoc_get (ly_symbol2scm ("X"), details, SCM_BOOL_F)))
     {
       Direction attach = (Direction)
-       robust_scm2int (ly_assoc_get (ly_symbol2scm ("attach-dir"),
-                                                    details, SCM_BOOL_F),
-                       CENTER);
+                         robust_scm2int (ly_assoc_get (ly_symbol2scm ("attach-dir"),
+                                                       details, SCM_BOOL_F),
+                                         CENTER);
 
       Item *bound_item = me->get_bound (dir);
       Grob *bound_grob = bound_item;
       if (to_boolean (ly_assoc_get (ly_symbol2scm ("end-on-note"), details, SCM_BOOL_F))
-         && bound_item->break_status_dir ())
-       {
-         extract_grob_set (me, "note-columns", columns);
-         if (columns.size ())
-           bound_grob = (dir == LEFT)
-             ? columns[0] : columns.back();
-       }
+          && bound_item->break_status_dir ())
+        {
+          extract_grob_set (me, "note-columns", columns);
+          if (columns.size ())
+            bound_grob = (dir == LEFT)
+                         ? columns[0] : columns.back ();
+        }
 
       details = scm_acons (ly_symbol2scm ("X"),
-                          scm_from_double (robust_relative_extent (bound_grob, commonx, X_AXIS)
-                                           .linear_combination (attach)),
-                          details);
+                           scm_from_double (robust_relative_extent (bound_grob, commonx, X_AXIS)
+                                            .linear_combination (attach)),
+                           details);
     }
 
-
   if (!scm_is_number (ly_assoc_get (ly_symbol2scm ("Y"), details, SCM_BOOL_F)))
     {
       Real y = 0.0;
 
       Real extra_dy = robust_scm2double (me->get_property ("extra-dy"),
-                                        0.0);
+                                         0.0);
 
       Grob *common_y = me->common_refpoint (me->get_bound (dir), Y_AXIS);
       if (me->get_bound (dir)->break_status_dir ())
-       {
-         if (to_boolean (me->get_property ("simple-Y")))
-           {
-             Spanner *orig = dynamic_cast<Spanner *>(me->original ());
-             Spanner *extreme = dir == LEFT ? orig->broken_intos_.front () : orig->broken_intos_.back ();
-             Grob *e_bound = extreme->get_bound (dir);
+        {
+          if (to_boolean (me->get_property ("simple-Y")))
+            {
+              Spanner *orig = dynamic_cast<Spanner *>(me->original ());
+              Spanner *extreme = dir == LEFT ? orig->broken_intos_.front () : orig->broken_intos_.back ();
+              Grob *e_bound = extreme->get_bound (dir);
               Grob *e_common_y = extreme->common_refpoint (e_bound, Y_AXIS);
               y = e_bound->extent (e_common_y, Y_AXIS).center ();
-           }
+            }
           else
             {
-             Spanner *next_sp = me->broken_neighbor (dir);
-             Item *next_bound = next_sp->get_bound (dir);
-
-             if (next_bound->break_status_dir ())
-               {
-                 programming_error ("no note heads for the line spanner on neighbor line?"
-                                    " Confused.");
-                 me->suicide ();
-                 return SCM_EOL;
-               }
-
-             Spanner *next_bound_parent = parent_spanner (next_bound);
-             Interval next_ext = next_bound->extent (next_bound_parent, Y_AXIS);
-
-             /*
-               We want to know what would be the y-position of the next
-               bound (relative to my y-parent) if it belonged to the
-               same system as this bound.  We rely on the fact that the
-               y-parent of the next bound is a spanner (probably the
-               VerticalAxisGroup of a staff) that extends over the break.
-             */
-             Spanner *next_bound_parent_on_this_line =
-               next_bound_parent->broken_neighbor (other_dir (dir));
-
-             if (next_bound_parent_on_this_line)
-               {
-                 Grob *common = me->common_refpoint (next_bound_parent_on_this_line, Y_AXIS);
-                 Real bound_offset = next_bound_parent_on_this_line->relative_coordinate (common, Y_AXIS);
-                 y = next_ext.center () + bound_offset - me->relative_coordinate (common, Y_AXIS);
-               }
-             else
-               {
-                 /*
-                   We fall back to assuming that the distance between
-                   staves doesn't change over line breaks.
-                 */
-                 programming_error ("next-bound's parent doesn't extend to this line");
-                 Grob *next_system = next_bound->get_system ();
-                 Grob *this_system = me->get_system ();
-                 y = next_ext.center () + next_bound_parent->relative_coordinate (next_system, Y_AXIS)
-                     - me->relative_coordinate (this_system, Y_AXIS);
-               }
+              Spanner *next_sp = me->broken_neighbor (dir);
+              Item *next_bound = next_sp->get_bound (dir);
+
+              if (next_bound->break_status_dir ())
+                {
+                  programming_error ("no note heads for the line spanner on neighbor line?"
+                                     " Confused.");
+                  me->suicide ();
+                  return SCM_EOL;
+                }
+
+              Spanner *next_bound_parent = parent_spanner (next_bound);
+              Interval next_ext = next_bound->extent (next_bound_parent, Y_AXIS);
+
+              /*
+                We want to know what would be the y-position of the next
+                bound (relative to my y-parent) if it belonged to the
+                same system as this bound.  We rely on the fact that the
+                y-parent of the next bound is a spanner (probably the
+                VerticalAxisGroup of a staff) that extends over the break.
+              */
+              Spanner *next_bound_parent_on_this_line
+                = next_bound_parent->broken_neighbor (other_dir (dir));
+
+              if (next_bound_parent_on_this_line)
+                {
+                  Grob *common = me->common_refpoint (next_bound_parent_on_this_line, Y_AXIS);
+                  Real bound_offset = next_bound_parent_on_this_line->relative_coordinate (common, Y_AXIS);
+                  y = next_ext.center () + bound_offset - me->relative_coordinate (common, Y_AXIS);
+                }
+              else
+                {
+                  /*
+                    We fall back to assuming that the distance between
+                    staves doesn't change over line breaks.
+                  */
+                  programming_error ("next-bound's parent doesn't extend to this line");
+                  Grob *next_system = next_bound->get_system ();
+                  Grob *this_system = me->get_system ();
+                  y = next_ext.center () + next_bound_parent->relative_coordinate (next_system, Y_AXIS)
+                      - me->relative_coordinate (this_system, Y_AXIS);
+                }
             }
-       }
+        }
       else
-       {
-         y = me->get_bound (dir)->extent (common_y, Y_AXIS).center ();
-         details = scm_acons (ly_symbol2scm ("common-Y"), common_y->self_scm (), details);
-       }
+        {
+          y = me->get_bound (dir)->extent (common_y, Y_AXIS).center ();
+          details = scm_acons (ly_symbol2scm ("common-Y"), common_y->self_scm (), details);
+        }
 
-      y += dir * extra_dy / 2; 
+      y += dir * extra_dy / 2;
       details = scm_acons (ly_symbol2scm ("Y"), scm_from_double (y), details);
     }
 
@@ -221,9 +220,9 @@ Line_spanner::calc_left_bound_info_and_text (SCM smob)
       Output_def *layout = me->layout ();
       SCM properties = Font_interface::text_font_alist_chain (me);
       alist = scm_acons (ly_symbol2scm ("stencil"),
-                        Text_interface::interpret_markup (layout->self_scm (),
-                                                          properties, text),
-                        alist);
+                         Text_interface::interpret_markup (layout->self_scm (),
+                                                           properties, text),
+                         alist);
     }
 
   return alist;
@@ -239,20 +238,20 @@ Line_spanner::print (SCM smob)
   bool simple_y = to_boolean (me->get_property ("simple-Y")) && !to_boolean (me->get_property ("cross-staff"));
 
   Drul_array<SCM> bounds (me->get_property ("left-bound-info"),
-                         me->get_property ("right-bound-info"));
+                          me->get_property ("right-bound-info"));
 
   Grob *commonx = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS);
   commonx = me->common_refpoint (commonx, X_AXIS);
 
   Drul_array<Offset> span_points;
 
-  Direction d =  LEFT;
+  Direction d = LEFT;
   do
     {
       Offset z (robust_scm2double (ly_assoc_get (ly_symbol2scm ("X"),
-                                                bounds[d], SCM_BOOL_F), 0.0),
-               robust_scm2double (ly_assoc_get (ly_symbol2scm ("Y"),
-                                                bounds[d], SCM_BOOL_F), 0.0));
+                                                 bounds[d], SCM_BOOL_F), 0.0),
+                robust_scm2double (ly_assoc_get (ly_symbol2scm ("Y"),
+                                                 bounds[d], SCM_BOOL_F), 0.0));
 
       span_points[d] = z;
     }
@@ -260,7 +259,7 @@ Line_spanner::print (SCM smob)
 
   Drul_array<Real> gaps (0, 0);
   Drul_array<bool> arrows (0, 0);
-  Drul_array<Stencil *> stencils (0,0);
+  Drul_array<Stencil *> stencils (0, 0);
   Drul_array<Grob *> common_y (0, 0);
 
   // For scaling of 'padding and 'stencil-offset
@@ -270,15 +269,15 @@ Line_spanner::print (SCM smob)
   do
     {
       gaps[d] = robust_scm2double (ly_assoc_get (ly_symbol2scm ("padding"),
-                                                bounds[d], SCM_BOOL_F), 0.0);
+                                                 bounds[d], SCM_BOOL_F), 0.0);
       arrows[d] = to_boolean (ly_assoc_get (ly_symbol2scm ("arrow"),
-                                           bounds[d], SCM_BOOL_F));
+                                            bounds[d], SCM_BOOL_F));
       stencils[d] = unsmob_stencil (ly_assoc_get (ly_symbol2scm ("stencil"),
-                                                 bounds[d], SCM_BOOL_F));
+                                                  bounds[d], SCM_BOOL_F));
       common_y[d] = unsmob_grob (ly_assoc_get (ly_symbol2scm ("common-Y"),
-                                              bounds[d], SCM_BOOL_F));
+                                               bounds[d], SCM_BOOL_F));
       if (!common_y[d])
-       common_y[d] = me;
+        common_y[d] = me;
     }
   while (flip (&d) != LEFT);
 
@@ -310,66 +309,65 @@ Line_spanner::print (SCM smob)
       span_points[d] += -d * gaps[d] * magstep * dz.direction ();
 
       if (stencils[d])
-       {
-         Stencil s = stencils[d]->translated (span_points[d]);
-         SCM align = ly_assoc_get (ly_symbol2scm ("stencil-align-dir-y"),
-                                   bounds[d], SCM_BOOL_F);
-         SCM off = ly_assoc_get (ly_symbol2scm ("stencil-offset"),
-                                 bounds[d], SCM_BOOL_F);
+        {
+          Stencil s = stencils[d]->translated (span_points[d]);
+          SCM align = ly_assoc_get (ly_symbol2scm ("stencil-align-dir-y"),
+                                    bounds[d], SCM_BOOL_F);
+          SCM off = ly_assoc_get (ly_symbol2scm ("stencil-offset"),
+                                  bounds[d], SCM_BOOL_F);
 
-         if (scm_is_number (align))
-           s.align_to (Y_AXIS, scm_to_double (align));
+          if (scm_is_number (align))
+            s.align_to (Y_AXIS, scm_to_double (align));
 
-         if (is_number_pair (off))
-           s.translate (ly_scm2offset (off) * magstep);
+          if (is_number_pair (off))
+            s.translate (ly_scm2offset (off) * magstep);
 
-         line.add_stencil (s);
-       }
+          line.add_stencil (s);
+        }
     }
   while (flip (&d) != LEFT);
 
   do
     {
       if (stencils[d])
-       span_points[d] += dz_dir *
-         (stencils[d]->extent (X_AXIS)[-d] / dz_dir[X_AXIS]);
+        span_points[d] += dz_dir *
+                          (stencils[d]->extent (X_AXIS)[-d] / dz_dir[X_AXIS]);
     }
   while (flip (&d) != LEFT);
 
-  Offset adjust = dz.direction() * Staff_symbol_referencer::staff_space (me);
+  Offset adjust = dz.direction () * Staff_symbol_referencer::staff_space (me);
 
-  Offset line_left = span_points[LEFT] + (arrows[LEFT] ? adjust*1.4 : Offset (0, 0));
-  Offset line_right = span_points[RIGHT] - (arrows[RIGHT] ? adjust*0.55 : Offset (0, 0));
+  Offset line_left = span_points[LEFT] + (arrows[LEFT] ? adjust * 1.4 : Offset (0, 0));
+  Offset line_right = span_points[RIGHT] - (arrows[RIGHT] ? adjust * 0.55 : Offset (0, 0));
   if (line_right[X_AXIS] > line_left[X_AXIS])
     {
       line.add_stencil (Line_interface::line (me, line_left, line_right));
 
       line.add_stencil (Line_interface::arrows (me,
-                                               span_points[LEFT],
-                                               span_points[RIGHT],
-                                               arrows[LEFT],
-                                               arrows[RIGHT]));
+                                                span_points[LEFT],
+                                                span_points[RIGHT],
+                                                arrows[LEFT],
+                                                arrows[RIGHT]));
     }
 
   line.translate (Offset (-me->relative_coordinate (commonx, X_AXIS),
-                         simple_y ? 0.0 : -me->relative_coordinate (my_common_y, Y_AXIS)));
-
+                          simple_y ? 0.0 : -me->relative_coordinate (my_common_y, Y_AXIS)));
 
   return line.smobbed_copy ();
 }
 
 ADD_INTERFACE (Line_spanner,
-              "Generic line drawn between two objects, e.g., for use with"
-              " glissandi.",
-
-              /* properties */
-              "bound-details "
-              "extra-dy "
-              "gap "
-              "left-bound-info "
-              "note-columns "
-              "right-bound-info "
-              "simple-Y "
-              "thickness "
-              "to-barline "
-              );
+               "Generic line drawn between two objects, e.g., for use with"
+               " glissandi.",
+
+               /* properties */
+               "bound-details "
+               "extra-dy "
+               "gap "
+               "left-bound-info "
+               "note-columns "
+               "right-bound-info "
+               "simple-Y "
+               "thickness "
+               "to-barline "
+              );
index 686ee3ad67395fa721ec210d2921c45ef2295559..c785ff3d72d502302f4f6ba98fbaaa91fbf6d018 100644 (file)
@@ -36,10 +36,11 @@ Listener::Listener (const void *target, Listener_function_table *type)
 Listener::Listener (Listener const &other)
 {
   target_ = other.target_;
-  type_ = other.type_; 
+  type_ = other.type_;
 }
 
-void Listener::listen (SCM ev) const {
+void Listener::listen (SCM ev) const
+{
   (type_->listen_callback) (target_, ev);
 }
 
@@ -53,7 +54,7 @@ Listener::mark_smob (SCM sm)
 }
 
 int
-Listener::print_smob (SCM, SCM p, scm_print_state*)
+Listener::print_smob (SCM, SCM p, scm_print_state *)
 {
   scm_puts ("#<Listener>", p);
   return 1;
index aec43fe8fb9eb41c7a763a7a6ab1b0674e928c5a..1bdc738214b81beab05088d5558e74022038a1d9 100644 (file)
@@ -37,10 +37,10 @@ Stencil
 Lookup::dot (Offset p, Real radius)
 {
   SCM at = (scm_list_n (ly_symbol2scm ("dot"),
-                       scm_from_double (p[X_AXIS]),
-                       scm_from_double (p[Y_AXIS]),
-                       scm_from_double (radius),
-                       SCM_UNDEFINED));
+                        scm_from_double (p[X_AXIS]),
+                        scm_from_double (p[Y_AXIS]),
+                        scm_from_double (radius),
+                        SCM_UNDEFINED));
   Box box;
   box.add_point (p - Offset (radius, radius));
   box.add_point (p + Offset (radius, radius));
@@ -61,38 +61,38 @@ Lookup::beam (Real slope, Real width, Real thick, Real blot)
   SCM points = SCM_EOL;
 
   points = scm_cons (scm_from_double (p[X_AXIS]),
-                    scm_cons (scm_from_double (p[Y_AXIS]),
-                              points));
+                     scm_cons (scm_from_double (p[Y_AXIS]),
+                               points));
 
   p = Offset (0, -thick / 2);
   b.add_point (p);
   p += Offset (1, 1) * (blot / 2);
 
   points = scm_cons (scm_from_double (p[X_AXIS]),
-                    scm_cons (scm_from_double (p[Y_AXIS]),
-                              points));
+                     scm_cons (scm_from_double (p[Y_AXIS]),
+                               points));
 
   p = Offset (width, width * slope - thick / 2);
   b.add_point (p);
   p += Offset (-1, 1) * (blot / 2);
 
   points = scm_cons (scm_from_double (p[X_AXIS]),
-                    scm_cons (scm_from_double (p[Y_AXIS]),
-                              points));
+                     scm_cons (scm_from_double (p[Y_AXIS]),
+                               points));
 
   p = Offset (width, width * slope + thick / 2);
   b.add_point (p);
   p += Offset (-1, -1) * (blot / 2);
 
   points = scm_cons (scm_from_double (p[X_AXIS]),
-                    scm_cons (scm_from_double (p[Y_AXIS]),
-                              points));
+                     scm_cons (scm_from_double (p[Y_AXIS]),
+                               points));
 
   SCM expr = scm_list_n (ly_symbol2scm ("polygon"),
-                        ly_quote_scm (points),
-                        scm_from_double (blot),
-                        SCM_BOOL_T,
-                        SCM_UNDEFINED);
+                         ly_quote_scm (points),
+                         scm_from_double (blot),
+                         SCM_BOOL_T,
+                         SCM_UNDEFINED);
 
   return Stencil (b, expr);
 }
@@ -103,9 +103,9 @@ Lookup::rotated_box (Real slope, Real width, Real thick, Real blot)
   vector<Offset> pts;
   Offset rot (1, slope);
 
-  thick -= 2*blot;
-  width -= 2*blot;
-  rot /= sqrt (1 + slope*slope);
+  thick -= 2 * blot;
+  width -= 2 * blot;
+  rot /= sqrt (1 + slope * slope);
   pts.push_back (Offset (0, -thick / 2) * rot);
   pts.push_back (Offset (width, -thick / 2) * rot);
   pts.push_back (Offset (width, thick / 2) * rot);
@@ -117,12 +117,12 @@ Stencil
 Lookup::horizontal_line (Interval w, Real th)
 {
   SCM at = scm_list_n (ly_symbol2scm ("draw-line"),
-                      scm_from_double (th),
-                      scm_from_double (w[LEFT]),
-                      scm_from_double (0),
-                      scm_from_double (w[RIGHT]),
-                      scm_from_double (0),
-                      SCM_UNDEFINED);
+                       scm_from_double (th),
+                       scm_from_double (w[LEFT]),
+                       scm_from_double (0),
+                       scm_from_double (w[RIGHT]),
+                       scm_from_double (0),
+                       SCM_UNDEFINED);
 
   Box box;
   box[X_AXIS] = w;
@@ -179,12 +179,12 @@ Lookup::round_filled_box (Box b, Real blotdiameter)
     blotdiameter = b.y ().length ();
 
   SCM at = (scm_list_n (ly_symbol2scm ("round-filled-box"),
-                       scm_from_double (-b[X_AXIS][LEFT]),
-                       scm_from_double (b[X_AXIS][RIGHT]),
-                       scm_from_double (-b[Y_AXIS][DOWN]),
-                       scm_from_double (b[Y_AXIS][UP]),
-                       scm_from_double (blotdiameter),
-                       SCM_UNDEFINED));
+                        scm_from_double (-b[X_AXIS][LEFT]),
+                        scm_from_double (b[X_AXIS][RIGHT]),
+                        scm_from_double (-b[Y_AXIS][DOWN]),
+                        scm_from_double (b[Y_AXIS][UP]),
+                        scm_from_double (blotdiameter),
+                        SCM_UNDEFINED));
 
   return Stencil (b, at);
 }
@@ -231,7 +231,7 @@ Lookup::round_filled_box (Box b, Real blotdiameter)
  */
 Stencil
 Lookup::round_filled_polygon (vector<Offset> const &points,
-                             Real blotdiameter)
+                              Real blotdiameter)
 {
   /* TODO: Maybe print a warning if one of the above limitations
      applies to the given polygon.  However, this is quite complicated
@@ -246,7 +246,7 @@ Lookup::round_filled_polygon (vector<Offset> const &points,
       int next = (i + 1) % points.size ();
       Real d = (points[i] - points[next]).length ();
       if (d < epsilon)
-       programming_error ("Polygon should not have duplicate points");
+        programming_error ("Polygon should not have duplicate points");
     }
 #endif
 
@@ -273,17 +273,18 @@ Lookup::round_filled_polygon (vector<Offset> const &points,
       Offset p10 = p0 - p1;
       Offset p12 = p2 - p1;
       if (p10.length () != 0.0)
-       { // recompute ccw
-         Real phi = p10.arg ();
-         // rotate (p2 - p0) by (-phi)
-         Offset q = complex_multiply (p2 - p0, complex_exp (Offset (1.0, -phi)));
-
-         if (q[Y_AXIS] > 0)
-           ccw = 1;
-         else if (q[Y_AXIS] < 0)
-           ccw = 0;
-         else {} // keep ccw unchanged
-       }
+        {
+          // recompute ccw
+          Real phi = p10.arg ();
+          // rotate (p2 - p0) by (-phi)
+          Offset q = complex_multiply (p2 - p0, complex_exp (Offset (1.0, -phi)));
+
+          if (q[Y_AXIS] > 0)
+            ccw = 1;
+          else if (q[Y_AXIS] < 0)
+            ccw = 0;
+          else {} // keep ccw unchanged
+        }
       else {} // keep ccw unchanged
       Offset p10n = (1.0 / p10.length ()) * p10; // normalize length to 1.0
       Offset p12n = (1.0 / p12.length ()) * p12;
@@ -292,15 +293,15 @@ Lookup::round_filled_polygon (vector<Offset> const &points,
       Offset p13;
       Real d = p13n.length () * p14n.length (); // distance p3n to line (p1..p0)
       if (d < epsilon)
-       // special case: p0, p1, p2 are on a single line => build
-       // vector orthogonal to (p2-p0) of length 0.5 blotdiameter
-       {
-         p13[X_AXIS] = p10[Y_AXIS];
-         p13[Y_AXIS] = -p10[X_AXIS];
-         p13 = (0.5 * blotdiameter / p13.length ()) * p13;
-       }
+        // special case: p0, p1, p2 are on a single line => build
+        // vector orthogonal to (p2-p0) of length 0.5 blotdiameter
+        {
+          p13[X_AXIS] = p10[Y_AXIS];
+          p13[Y_AXIS] = -p10[X_AXIS];
+          p13 = (0.5 * blotdiameter / p13.length ()) * p13;
+        }
       else
-       p13 = (0.5 * blotdiameter / d) * p13n;
+        p13 = (0.5 * blotdiameter / d) * p13n;
       shrunk_points[i1] = p1 + ((ccw) ? p13 : -p13);
     }
 
@@ -315,10 +316,10 @@ Lookup::round_filled_polygon (vector<Offset> const &points,
       box.add_point (points[i]);
     }
   SCM polygon_scm = scm_list_n (ly_symbol2scm ("polygon"),
-                               ly_quote_scm (shrunk_points_scm),
-                               scm_from_double (blotdiameter),
-                               SCM_BOOL_T,
-                               SCM_UNDEFINED);
+                                ly_quote_scm (shrunk_points_scm),
+                                scm_from_double (blotdiameter),
+                                SCM_BOOL_T,
+                                SCM_UNDEFINED);
 
   Stencil polygon = Stencil (box, polygon_scm);
   shrunk_points.clear ();
@@ -335,16 +336,16 @@ Lookup::frame (Box b, Real thick, Real blot)
   Direction d = LEFT;
   for (Axis a = X_AXIS; a < NO_AXES; a = Axis (a + 1))
     {
-      Axis o = Axis ((a + 1)%NO_AXES);
+      Axis o = Axis ((a + 1) % NO_AXES);
       do
-       {
-         Box edges;
-         edges[a] = b[a][d] + 0.5 * thick * Interval (-1, 1);
-         edges[o][DOWN] = b[o][DOWN] - thick / 2;
-         edges[o][UP] = b[o][UP] + thick / 2;
-
-         m.add_stencil (round_filled_box (edges, blot));
-       }
+        {
+          Box edges;
+          edges[a] = b[a][d] + 0.5 * thick * Interval (-1, 1);
+          edges[o][DOWN] = b[o][DOWN] - thick / 2;
+          edges[o][UP] = b[o][UP] + thick / 2;
+
+          m.add_stencil (round_filled_box (edges, blot));
+        }
       while (flip (&d) != LEFT);
     }
   return m;
@@ -359,7 +360,7 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick,
 {
   Stencil return_value;
 
-  /* 
+  /*
       calculate the offset for the two beziers that make the sandwich
       for the slur
   */
@@ -371,36 +372,36 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick,
 
   curve.control_[1] -= perp;
   curve.control_[2] -= perp;
+
   if (!scm_is_pair (dash_details))
-    { 
+    {
       /* solid slur  */
       return_value = bezier_sandwich (back, curve, linethick);
     }
   else
-    { 
+    {
       /* dashed or combination slur */
       int num_segments = scm_to_int (scm_length (dash_details));
-      for (int i=0; i<num_segments; i++)
+      for (int i = 0; i < num_segments; i++)
         {
           SCM dash_pattern = scm_list_ref (dash_details, scm_from_int (i));
           Real t_min = robust_scm2double (scm_car (dash_pattern), 0);
           Real t_max = robust_scm2double (scm_cadr (dash_pattern), 1.0);
-          Real dash_fraction = 
-            robust_scm2double (scm_caddr (dash_pattern), 1.0);
-          Real dash_period = 
-            robust_scm2double (scm_cadddr (dash_pattern), 0.75);
+          Real dash_fraction
+            robust_scm2double (scm_caddr (dash_pattern), 1.0);
+          Real dash_period
+            robust_scm2double (scm_cadddr (dash_pattern), 0.75);
           Bezier back_segment = back.extract (t_min, t_max);
           Bezier curve_segment = curve.extract (t_min, t_max);
-          if (dash_fraction == 1.0) 
-              return_value.add_stencil (bezier_sandwich (back_segment,
-                                                         curve_segment,
-                                                         linethick));
+          if (dash_fraction == 1.0)
+            return_value.add_stencil (bezier_sandwich (back_segment,
+                                                       curve_segment,
+                                                       linethick));
           else
             {
               Bezier back_dash, curve_dash;
-              Real seg_length = (back_segment.control_[3] - 
-                                 back_segment.control_[0]).length ();
+              Real seg_length = (back_segment.control_[3]
+                                 back_segment.control_[0]).length ();
               int pattern_count = (int) (seg_length / dash_period);
               Real pattern_length = 1.0 / (pattern_count + dash_fraction);
               Real start_t, end_t;
@@ -408,10 +409,10 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick,
                 {
                   start_t = p * pattern_length;
                   end_t = (p + dash_fraction) * pattern_length;
-                  back_dash = 
-                    back_segment.extract (start_t, end_t);
-                  curve_dash =
-                    curve_segment.extract (start_t, end_t);
+                  back_dash
+                    back_segment.extract (start_t, end_t);
+                  curve_dash
+                    curve_segment.extract (start_t, end_t);
                   return_value.add_stencil (bezier_sandwich (back_dash,
                                                              curve_dash,
                                                              linethick));
@@ -422,7 +423,6 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick,
   return return_value;
 }
 
-
 /*
  * Bezier Sandwich:
  *
@@ -463,9 +463,9 @@ Lookup::bezier_sandwich (Bezier top_curve, Bezier bottom_curve, Real thickness)
   list = scm_cons (ly_offset2scm (top_curve.control_[1]), list);
 
   SCM horizontal_bend = scm_list_n (ly_symbol2scm ("bezier-sandwich"),
-                                   ly_quote_scm (list),
-                                   scm_from_double (thickness),
-                                   SCM_UNDEFINED);
+                                    ly_quote_scm (list),
+                                    scm_from_double (thickness),
+                                    SCM_UNDEFINED);
 
   Interval x_extent = top_curve.extent (X_AXIS);
   x_extent.unite (bottom_curve.extent (X_AXIS));
@@ -494,10 +494,10 @@ Lookup::repeat_slash (Real w, Real s, Real t)
   SCM sl = scm_from_double (s);
   SCM thick = scm_from_double (t);
   SCM slashnodot = scm_list_n (ly_symbol2scm ("repeat-slash"),
-                              wid, sl, thick, SCM_UNDEFINED);
+                               wid, sl, thick, SCM_UNDEFINED);
 
   Box b (Interval (0, w + sqrt (sqr (t / s) + sqr (t))),
-        Interval (0, w * s));
+         Interval (0, w * s));
 
   return Stencil (b, slashnodot); //  http://slashnodot.org
 }
@@ -506,7 +506,7 @@ Stencil
 Lookup::bracket (Axis a, Interval iv, Real thick, Real protrude, Real blot)
 {
   Box b;
-  Axis other = Axis ((a + 1)%2);
+  Axis other = Axis ((a + 1) % 2);
   b[a] = iv;
   b[other] = Interval (-1, 1) * thick * 0.5;
 
@@ -540,20 +540,18 @@ Lookup::triangle (Interval iv, Real thick, Real protrude)
 
 }
 
-
-
 Stencil
 Lookup::points_to_line_stencil (Real thick, vector<Offset> const &points)
 {
   Stencil ret;
   for (vsize i = 1; i < points.size (); i++)
     {
-      if (points[i-1].is_sane () && points[i].is_sane ())
-       {
-         Stencil line
-           = Line_interface::make_line (thick, points[i-1], points[i]);
-         ret.add_stencil (line);
-       }
+      if (points[i - 1].is_sane () && points[i].is_sane ())
+        {
+          Stencil line
+            = Line_interface::make_line (thick, points[i - 1], points[i]);
+          ret.add_stencil (line);
+        }
     }
   return ret;
 }
index 210c74293ae2672215ebc47b2f17b91fd0809f40..b964a56ade62080ddc02c2f124898dd454f1bcf1 100644 (file)
@@ -23,8 +23,6 @@
 #include "std-string.hh"
 #include "protected-scm.hh"
 
-
-
 SCM
 ly_make_module (bool safe)
 {
@@ -36,17 +34,17 @@ ly_make_module (bool safe)
       SCM maker = ly_lily_module_constant ("make-module");
       mod = scm_call_0 (maker);
       /*
-       Look up and call Guile module-export-all! or, when using
-       Guile V1.8, the compatible shim defined in lily.scm.
+        Look up and call Guile module-export-all! or, when using
+        Guile V1.8, the compatible shim defined in lily.scm.
       */
       SCM module_export_all_x = ly_lily_module_constant ("module-export-all!");
       scm_call_1 (module_export_all_x, mod);
 
       /*
-       Evaluate Guile module "the-root-module",
-       and ensure we inherit definitions from it and the "lily" module
-       N.B. this used to be "the-scm-module" and is deprecated in
-       Guile V1.9/2.0
+        Evaluate Guile module "the-root-module",
+        and ensure we inherit definitions from it and the "lily" module
+        N.B. this used to be "the-scm-module" and is deprecated in
+        Guile V1.9/2.0
       */
       SCM scm_module = ly_lily_module_constant ("the-root-module");
       ly_use_module (mod, scm_module);
@@ -87,7 +85,6 @@ ly_use_module (SCM mod, SCM used)
 
 #define FUNC_NAME __FUNCTION__
 
-
 SCM
 ly_module_symbols (SCM mod)
 {
@@ -99,9 +96,9 @@ ly_module_symbols (SCM mod)
 
 static SCM
 entry_to_alist (void * /* closure */,
-               SCM key,
-               SCM val,
-               SCM result)
+                SCM key,
+                SCM val,
+                SCM result)
 {
   if (scm_variable_bound_p (val) == SCM_BOOL_T)
     return scm_cons (scm_cons (key, scm_variable_ref (val)), result);
@@ -110,14 +107,14 @@ entry_to_alist (void * /* closure */,
 }
 
 LY_DEFINE (ly_module_2_alist, "ly:module->alist",
-          1, 0, 0, (SCM mod),
-          "Dump the contents of module @var{mod} as an alist.")
+           1, 0, 0, (SCM mod),
+           "Dump the contents of module @var{mod} as an alist.")
 {
   SCM_VALIDATE_MODULE (1, mod);
   SCM obarr = SCM_MODULE_OBARRAY (mod);
 
   return scm_internal_hash_fold ((scm_t_hash_fold_fn) &entry_to_alist,
-                                NULL, SCM_EOL, obarr);
+                                 NULL, SCM_EOL, obarr);
 }
 
 void
index 0168da15003a47a245cd425c48659fc63e2eb72e..a6de96f5d3b8020981bf869962d6a6414e2865ea 100644 (file)
@@ -70,7 +70,7 @@ private:
 
   Moment busy_moment_;
   Moment pending_grace_moment_;
-  
+
   Music_iterator *lyric_iter_;
 };
 
@@ -85,11 +85,10 @@ Lyric_combine_music_iterator::Lyric_combine_music_iterator ()
   busy_moment_.set_infinite (-1);
 }
 
-
 /*
   It's dubious whether we can ever make this fully work.  Due to
-  associatedVoice switching, this routine may be triggered for 
-  the wrong music_context_ 
+  associatedVoice switching, this routine may be triggered for
+  the wrong music_context_
  */
 IMPLEMENT_LISTENER (Lyric_combine_music_iterator, set_busy)
 void
@@ -99,10 +98,10 @@ Lyric_combine_music_iterator::set_busy (SCM se)
 
   if ((e->in_event_class ("note-event") || e->in_event_class ("cluster-note-event"))
       && music_context_)
-    
+
     busy_moment_ = max (music_context_->now_mom (),
-                       busy_moment_);
-  
+                        busy_moment_);
+
 }
 
 void
@@ -111,14 +110,14 @@ Lyric_combine_music_iterator::set_music_context (Context *to)
   if (music_context_)
     {
       music_context_->event_source ()->
-       remove_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event"));
+      remove_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event"));
     }
 
   music_context_ = to;
   if (to)
     {
       to->event_source ()->add_listener (GET_LISTENER (set_busy),
-                                        ly_symbol2scm ("music-event"));
+                                         ly_symbol2scm ("music-event"));
     }
 }
 
@@ -135,7 +134,7 @@ Lyric_combine_music_iterator::start_new_syllable () const
     {
       bool m = melisma_busy (music_context_);
       if (m)
-       return false;
+        return false;
     }
 
   return true;
@@ -193,13 +192,13 @@ Lyric_combine_music_iterator::construct_children ()
   if (!lyric_iter_)
     return;
   lyrics_context_ = find_context_below (lyric_iter_->get_outlet (),
-                                       ly_symbol2scm ("Lyrics"), "");
+                                        ly_symbol2scm ("Lyrics"), "");
 
   if (!lyrics_context_)
     {
       m->origin ()->warning ("argument of \\lyricsto should contain Lyrics context");
     }
-  
+
   lyricsto_voice_name_ = get_music ()->get_property ("associated-context");
 
   Context *voice = find_voice ();
@@ -207,7 +206,7 @@ Lyric_combine_music_iterator::construct_children ()
     set_music_context (voice);
 
   /*
-    Wait for a Create_context event. If this isn't done, lyrics can be 
+    Wait for a Create_context event. If this isn't done, lyrics can be
     delayed when voices are created implicitly.
   */
   Global_context *g = get_outlet ()->get_global_context ();
@@ -225,8 +224,8 @@ void
 Lyric_combine_music_iterator::check_new_context (SCM sev)
 {
   if (!ok ())
-    return ;
-  
+    return;
+
   // Search for a possible candidate voice to attach the lyrics to. If none
   // is found, we'll try next time again.
   Context *voice = find_voice ();
@@ -248,8 +247,8 @@ Lyric_combine_music_iterator::find_voice ()
 {
   SCM voice_name = lyricsto_voice_name_;
   SCM running = lyrics_context_
-    ? lyrics_context_->get_property ("associatedVoice")
-    : SCM_EOL;
+                ? lyrics_context_->get_property ("associatedVoice")
+                : SCM_EOL;
 
   if (scm_is_string (running))
     voice_name = running;
@@ -259,7 +258,7 @@ Lyric_combine_music_iterator::find_voice ()
     {
       Context *t = get_outlet ();
       while (t && t->get_parent_context ())
-       t = t->get_parent_context ();
+        t = t->get_parent_context ();
 
       string name = ly_scm2string (voice_name);
       return find_context_below (t, ly_symbol2scm ("Voice"), name);
@@ -283,35 +282,35 @@ Lyric_combine_music_iterator::process (Moment /* when */)
   if (!music_context_->get_parent_context ())
     {
       /*
-       The melody has died.
-       We die too.
+        The melody has died.
+        We die too.
       */
       if (lyrics_context_)
-       lyrics_context_->unset_property (ly_symbol2scm ("associatedVoiceContext"));
+        lyrics_context_->unset_property (ly_symbol2scm ("associatedVoiceContext"));
       lyric_iter_ = 0;
       set_music_context (0);
     }
 
   if (music_context_
-      && (start_new_syllable () ||
-         (busy_moment_ >= pending_grace_moment_))
+      && (start_new_syllable ()
+          || (busy_moment_ >= pending_grace_moment_))
       && lyric_iter_->ok ())
     {
       Moment now = music_context_->now_mom ();
       if (now.grace_part_ && !to_boolean (lyrics_context_->get_property ("includeGraceNotes")))
-       {
-         pending_grace_moment_ = now;
-         pending_grace_moment_.grace_part_ = Rational (0);
-         return;
-       }
+        {
+          pending_grace_moment_ = now;
+          pending_grace_moment_.grace_part_ = Rational (0);
+          return;
+        }
       else
-       {
-         pending_grace_moment_.set_infinite (1);
-       }
+        {
+          pending_grace_moment_.set_infinite (1);
+        }
 
       Moment m = lyric_iter_->pending_moment ();
       lyrics_context_->set_property (ly_symbol2scm ("associatedVoiceContext"),
-                                    music_context_->self_scm ());
+                                     music_context_->self_scm ());
       lyric_iter_->process (m);
 
       music_found_ = true;
index c52cba8356cb59f25bfb678ef3e9dc164dc8e4b0..e67fa97b481149ffb5e1affd7018b503fb19aeb0 100644 (file)
@@ -71,22 +71,22 @@ Lyric_engraver::process_music ()
       SCM text = event_->get_property ("text");
 
       if (ly_is_equal (text, scm_from_locale_string (" ")))
-       {
-         if (last_text_)
-           last_text_->set_property ("self-alignment-X",
-                                     get_property ("lyricMelismaAlignment"));
-       }
+        {
+          if (last_text_)
+            last_text_->set_property ("self-alignment-X",
+                                      get_property ("lyricMelismaAlignment"));
+        }
       else
-       text_ = make_item ("LyricText", event_->self_scm ());
+        text_ = make_item ("LyricText", event_->self_scm ());
     }
 
-    Context *voice = get_voice_to_lyrics (context ());
-    if (last_text_
-        && voice
-        && to_boolean (voice->get_property ("melismaBusy"))
-        && !to_boolean (context ()->get_property ("ignoreMelismata")))
-      last_text_->set_property ("self-alignment-X",
-                               get_property ("lyricMelismaAlignment"));
+  Context *voice = get_voice_to_lyrics (context ());
+  if (last_text_
+      && voice
+      && to_boolean (voice->get_property ("melismaBusy"))
+      && !to_boolean (context ()->get_property ("ignoreMelismata")))
+    last_text_->set_property ("self-alignment-X",
+                              get_property ("lyricMelismaAlignment"));
 }
 
 Context *
@@ -109,7 +109,7 @@ get_voice_to_lyrics (Context *lyrics)
     {
       ssize idx = nm.rfind ('-');
       if (idx != NPOS)
-       nm = nm.substr (0, idx);
+        nm = nm.substr (0, idx);
     }
 
   Context *parent = lyrics;
@@ -144,17 +144,17 @@ get_current_note_head (Context *voice, bool include_grace_notes)
       Grob *g = unsmob_grob (scm_cdar (s));;
       Moment *end_mom = unsmob_moment (scm_caar (s));
       if (!end_mom || !g)
-       {
-         programming_error ("busyGrobs invalid");
-         continue;
-       }
+        {
+          programming_error ("busyGrobs invalid");
+          continue;
+        }
 
-      if (((end_mom->main_part_ > now.main_part_) ||
-           (include_grace_notes && end_mom->grace_part_ > now.grace_part_))
+      if (((end_mom->main_part_ > now.main_part_)
+           || (include_grace_notes && end_mom->grace_part_ > now.grace_part_))
           && dynamic_cast<Item *> (g)
           && Note_head::has_interface (g))
         {
-         return g;
+          return g;
         }
     }
 
@@ -169,24 +169,24 @@ Lyric_engraver::stop_translation_timestep ()
       Context *voice = get_voice_to_lyrics (context ());
 
       if (voice)
-       {
-         bool include_grace_notes = to_boolean (get_property ("includeGraceNotes"));
-         Grob *head = get_current_note_head (voice, include_grace_notes);
-
-         if (head)
-           {
-             text_->set_parent (head, X_AXIS);
-             if (melisma_busy (voice)
-                 && !to_boolean (get_property ("ignoreMelismata")))
-               text_->set_property ("self-alignment-X",
-                                    get_property ("lyricMelismaAlignment"));
-           }
-         else
-           {
-             text_->warning (_ ("Lyric syllable does not have note. Use \\lyricsto or associatedVoice."));
-             text_->set_property ("X-offset", scm_from_int (0));
-           }
-       }
+        {
+          bool include_grace_notes = to_boolean (get_property ("includeGraceNotes"));
+          Grob *head = get_current_note_head (voice, include_grace_notes);
+
+          if (head)
+            {
+              text_->set_parent (head, X_AXIS);
+              if (melisma_busy (voice)
+                  && !to_boolean (get_property ("ignoreMelismata")))
+                text_->set_property ("self-alignment-X",
+                                     get_property ("lyricMelismaAlignment"));
+            }
+          else
+            {
+              text_->warning (_ ("Lyric syllable does not have note. Use \\lyricsto or associatedVoice."));
+              text_->set_property ("X-offset", scm_from_int (0));
+            }
+        }
 
       last_text_ = text_;
       text_ = 0;
@@ -195,18 +195,18 @@ Lyric_engraver::stop_translation_timestep ()
 }
 
 ADD_TRANSLATOR (Lyric_engraver,
-               /* doc */
-               "Engrave text for lyrics.",
+                /* doc */
+                "Engrave text for lyrics.",
 
-               /* create */
-               "LyricText ",
+                /* create */
+                "LyricText ",
 
-               /* read */
-               "ignoreMelismata "
-               "includeGraceNotes "
-               "lyricMelismaAlignment "
-               "searchForVoice",
+                /* read */
+                "ignoreMelismata "
+                "includeGraceNotes "
+                "lyricMelismaAlignment "
+                "searchForVoice",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 088881fc1dd5c9ffe2a7922c5af924493a5a2bef..b167e923ab16e7691bc03091f190286ffcc6fba7 100644 (file)
@@ -43,7 +43,7 @@ Lyric_extender::print (SCM smob)
 
   common = common->common_refpoint (me->get_bound (RIGHT), X_AXIS);
   common = common->common_refpoint (me->get_system (), X_AXIS);
-  
+
   Real sl = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
 
   extract_grob_set (me, "heads", heads);
@@ -71,13 +71,13 @@ Lyric_extender::print (SCM smob)
     = left_point + (robust_scm2double (minlen, 0));
 
   right_point = min (right_point, me->get_system ()->get_bound (RIGHT)->relative_coordinate (common, X_AXIS));
-    
+
   if (heads.size ())
     right_point = max (right_point, heads.back ()->extent (common, X_AXIS)[RIGHT]);
 
   Real h = sl * robust_scm2double (me->get_property ("thickness"), 0);
   Drul_array<Real> paddings (robust_scm2double (me->get_property ("left-padding"), h),
-                            robust_scm2double (me->get_property ("right-padding"), h));
+                             robust_scm2double (me->get_property ("right-padding"), h));
 
   if (right_text)
     right_point = min (right_point, (robust_relative_extent (right_text, common, X_AXIS)[LEFT] - paddings[RIGHT]));
@@ -93,22 +93,22 @@ Lyric_extender::print (SCM smob)
     return SCM_EOL;
 
   Stencil mol (Lookup::round_filled_box (Box (Interval (0, w),
-                                             Interval (0, h)),
-                                        0.8 * h));
+                                              Interval (0, h)),
+                                         0.8 * h));
   mol.translate_axis (left_point - me->relative_coordinate (common, X_AXIS),
-                     X_AXIS);
+                      X_AXIS);
   return mol.smobbed_copy ();
 }
 
 ADD_INTERFACE (Lyric_extender,
-              "The extender is a simple line at the baseline of the lyric"
-              " that helps show the length of a melisma (a tied or slurred"
-              " note).",
-
-              /* properties */
-              "heads "
-              "left-padding "
-              "next "
-              "right-padding "
-              "thickness "
-              );
+               "The extender is a simple line at the baseline of the lyric"
+               " that helps show the length of a melisma (a tied or slurred"
+               " note).",
+
+               /* properties */
+               "heads "
+               "left-padding "
+               "next "
+               "right-padding "
+               "thickness "
+              );
index 5fae21fc34f9e4704d6561ad0637158c193b56fc..695cc59293f4fc8b16c6bddf21a369a9d274cbd3 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "lyric-hyphen.hh"
 
-
 #include "lookup.hh"
 #include "output-def.hh"
 #include "paper-column.hh"
@@ -37,11 +36,11 @@ Lyric_hyphen::print (SCM smob)
 {
   Spanner *me = unsmob_spanner (smob);
   Drul_array<Item *> bounds (me->get_bound (LEFT),
-                            me->get_bound (RIGHT));
+                             me->get_bound (RIGHT));
 
   if (bounds[LEFT]->break_status_dir ()
       && (Paper_column::when_mom (bounds[LEFT])
-         == Paper_column::when_mom (bounds[RIGHT]->get_column ())))
+          == Paper_column::when_mom (bounds[RIGHT]->get_column ())))
     return SCM_EOL;
 
   Grob *common = bounds[LEFT]->common_refpoint (bounds[RIGHT], X_AXIS);
@@ -54,8 +53,8 @@ Lyric_hyphen::print (SCM smob)
       Interval iv = bounds[d]->extent (common, X_AXIS);
 
       span_points[d] = iv.is_empty ()
-       ? bounds[d]->relative_coordinate (common, X_AXIS)
-       : iv[-d];
+                       ? bounds[d]->relative_coordinate (common, X_AXIS)
+                       : iv[-d];
     }
   while (flip (&d) != LEFT);
 
@@ -63,7 +62,7 @@ Lyric_hyphen::print (SCM smob)
   Real th = robust_scm2double (me->get_property ("thickness"), 1) * lt;
   Real font_size_step = robust_scm2double (me->get_property ("font-size"), 0.0);
   Real h = robust_scm2double (me->get_property ("height"), 0.5)
-    * pow (2.0, font_size_step / 6.0);
+           * pow (2.0, font_size_step / 6.0);
 
   // interval?
 
@@ -129,7 +128,7 @@ Lyric_hyphen::set_spacing_rods (SCM smob)
     {
       r.item_drul_[d] = sp->get_bound (d);
       if (r.item_drul_[d])
-       r.distance_ += -d * r.item_drul_[d]->extent (r.item_drul_[d], X_AXIS)[-d];
+        r.distance_ += -d * r.item_drul_[d]->extent (r.item_drul_[d], X_AXIS)[-d];
     }
   while (flip (&d) != LEFT);
 
@@ -141,16 +140,16 @@ Lyric_hyphen::set_spacing_rods (SCM smob)
 }
 
 ADD_INTERFACE (Lyric_hyphen,
-              "A centered hyphen is simply a line between lyrics used to"
-              " divide syllables.",
-
-              /* properties */
-              "dash-period "
-              "height "
-              "length "
-              "minimum-distance "
-              "minimum-length "
-              "padding "
-              "thickness "
-              );
+               "A centered hyphen is simply a line between lyrics used to"
+               " divide syllables.",
+
+               /* properties */
+               "dash-period "
+               "height "
+               "length "
+               "minimum-distance "
+               "minimum-length "
+               "padding "
+               "thickness "
+              );
 
index decb4c9c6c6f5511debef38eccca03dbd51aae5e..2b117fe4fd6ccf57695058bd3e4d4585790fc51e 100644 (file)
@@ -50,7 +50,7 @@ Lyric_performer::process_music ()
       && ly_scm2string (events_[0]->get_property ("text")).length ())
     {
       audio_ = new Audio_text (Audio_text::LYRIC,
-                              ly_scm2string (events_[0]->get_property ("text")));
+                               ly_scm2string (events_[0]->get_property ("text")));
       Audio_element_info info (audio_, events_[0]);
       announce_element (info);
     }
@@ -75,15 +75,15 @@ Lyric_performer::listen_lyric (Stream_event *event)
 }
 
 ADD_TRANSLATOR (Lyric_performer,
-               /* doc */
-               "",
+                /* doc */
+                "",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 9e33ec13dcdd56139db961355b9ab6885daf4962..d0d21601ec500bb94d5e8a7f7a733f1accc39e94 100644 (file)
@@ -65,7 +65,6 @@ vector<string> dump_header_fieldnames_global;
 /* Name of initialisation file. */
 string init_name_global;
 
-
 /* Output formats to generate.  */
 string output_format_global = "";
 
@@ -88,7 +87,6 @@ string init_scheme_variables_global;
 
 bool relocate_binary = true;
 
-
 /*
  * Miscellaneous global stuff.
  */
@@ -99,33 +97,33 @@ File_path global_path;
  */
 
 static char const *AUTHORS
-= "  Han-Wen Nienhuys <hanwen@xs4all.nl>\n"
-  "  Jan Nieuwenhuizen <janneke@gnu.org>\n";
+  = "  Han-Wen Nienhuys <hanwen@xs4all.nl>\n"
+    "  Jan Nieuwenhuizen <janneke@gnu.org>\n";
 
 static char const *PROGRAM_NAME = "lilypond";
 static char const *PROGRAM_URL = "http://lilypond.org";
 
 static char const *NOTICE
-= _i ("This program is free software.  It is covered by the GNU General Public\n"
-      "License and you are welcome to change it and/or distribute copies of it\n"
-      "under certain conditions.  Invoke as `%s --warranty' for more\n"
-      "information.\n");
+  = _i ("This program is free software.  It is covered by the GNU General Public\n"
+        "License and you are welcome to change it and/or distribute copies of it\n"
+        "under certain conditions.  Invoke as `%s --warranty' for more\n"
+        "information.\n");
 
 static char const *WARRANTY
-= _i ("    This program is free software; you can redistribute it and/or\n"
-      "modify it under the terms of the GNU General Public License as \n"
-      "published by the Free Software Foundation, either version 3 of\n"
-      "the License, or (at your option) any later version.\n"
-      "\n"
-      "    This program is distributed in the hope that it will be useful,\n"
-      "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
-      "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n"
-      "General Public License for more details.\n"
-      "\n"
-      "    You should have received a copy of the\n"
-      "GNU General Public License along with this program; if not, write to\n"
-      "the Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n"
-      "Boston, MA 02111-1307, USA.\n");
+  = _i ("    This program is free software; you can redistribute it and/or\n"
+        "modify it under the terms of the GNU General Public License as \n"
+        "published by the Free Software Foundation, either version 3 of\n"
+        "the License, or (at your option) any later version.\n"
+        "\n"
+        "    This program is distributed in the hope that it will be useful,\n"
+        "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+        "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n"
+        "General Public License for more details.\n"
+        "\n"
+        "    You should have received a copy of the\n"
+        "GNU General Public License along with this program; if not, write to\n"
+        "the Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n"
+        "Boston, MA 02111-1307, USA.\n");
 
 /* Where the init files live.  Typically:
    LILYPOND_DATADIR = /usr/share/lilypond
@@ -143,10 +141,13 @@ static Getopt_long *option_parser = 0;
  * call gettext () explicitly for actual "translation"  */
 
 static Long_option_init options_static[]
-= {
-  {_i ("SYM[=VAL]"), "define-default", 'd',
-   _i ("set Scheme option SYM to VAL (default: #t).\n"
-       "Use -dhelp for help.")},
+=
+{
+  {
+    _i ("SYM[=VAL]"), "define-default", 'd',
+    _i ("set Scheme option SYM to VAL (default: #t).\n"
+    "Use -dhelp for help.")
+  },
 
   {_i ("EXPR"), "evaluate", 'e', _i ("evaluate scheme code")},
   /* Bug in option parser: --output =foe is taken as an abbreviation
@@ -155,33 +156,36 @@ static Long_option_init options_static[]
   {0, "pdf", 0, _i ("generate PDF (default)")},
   {0, "png", 0, _i ("generate PNG")},
   {0, "ps", 0, _i ("generate PostScript")},
-  {0, "help", 'h',  _i ("show this help and exit")},
-  {_i ("FIELD"), "header", 'H',  _i ("dump header field FIELD to file\n"
-                                    "named BASENAME.FIELD")},
-  {_i ("DIR"), "include", 'I',  _i ("add DIR to search path")},
-  {_i ("FILE"), "init", 'i',  _i ("use FILE as init file")},
+  {0, "help", 'h', _i ("show this help and exit")},
+  {
+    _i ("FIELD"), "header", 'H', _i ("dump header field FIELD to file\n"
+    "named BASENAME.FIELD")
+  },
+  {_i ("DIR"), "include", 'I', _i ("add DIR to search path")},
+  {_i ("FILE"), "init", 'i', _i ("use FILE as init file")},
 #if HAVE_CHROOT
-  {_i ("USER, GROUP, JAIL, DIR"), "jail", 'j', _i ("chroot to JAIL, become USER:GROUP\n"
-                                               "and cd into DIR")},
+  {
+    _i ("USER, GROUP, JAIL, DIR"), "jail", 'j', _i ("chroot to JAIL, become USER:GROUP\n"
+    "and cd into DIR")
+  },
 #endif
-  {_i ("FILE"), "output", 'o',  _i ("write output to FILE (suffix will be added)")},
+  {_i ("FILE"), "output", 'o', _i ("write output to FILE (suffix will be added)")},
   {0, "relocate", 0, _i ("relocate using directory of lilypond program")},
-  {0, "version", 'v',  _i ("show version number and exit")},
+  {0, "version", 'v', _i ("show version number and exit")},
   {0, "verbose", 'V', _i ("be verbose")},
-  {0, "warranty", 'w',  _i ("show warranty and copyright")},
+  {0, "warranty", 'w', _i ("show warranty and copyright")},
   {0, 0, 0, 0}
 };
 
 char const *LILYPOND_DATADIR = PACKAGE_DATADIR "/" TOPLEVEL_VERSION;
 
-
 /* x86 defaults to using 80-bit extended precision arithmetic. This can cause
    problems because the truncation from 80 bits to 64 bits can occur in
    unpredictable places. To get around this, we tell the x87 FPU to use only
    double precision. Note that this is not needed for x86_64 because that uses
    the SSE unit by default instead of the x87 FPU. */
-#if ((defined(__x86__) || defined(__i386__)) \
-  && defined(HAVE_FPU_CONTROL_H) && (HAVE_FPU_CONTROL_H == 1))
+#if ((defined (__x86__) || defined (__i386__)) \
+  && defined (HAVE_FPU_CONTROL_H) && (HAVE_FPU_CONTROL_H == 1))
 
 #include <fpu_control.h>
 static void
@@ -200,7 +204,6 @@ configure_fpu ()
 
 #endif /* defined(__x86__) || defined(__i386__) */
 
-
 static void
 env_var_info (FILE *out, char const *key)
 {
@@ -259,8 +262,8 @@ notice ()
 }
 
 LY_DEFINE (ly_usage, "ly:usage",
-          0, 0, 0, (),
-          "Print usage message.")
+           0, 0, 0, (),
+           "Print usage message.")
 {
   /* No version number or newline here.  It confuses help2man.  */
   printf ("%s", (_f ("Usage: %s [OPTION]... FILE...", PROGRAM_NAME).c_str ()));
@@ -280,8 +283,8 @@ LY_DEFINE (ly_usage, "ly:usage",
      or if there is a LilyPond users list or forum in your language
      "Report bugs in English via %s or in YOUR_LANG via URI"  */
   printf ("%s", (_f ("Report bugs via %s",
-                    "http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs"
-                    ).c_str ()));
+                     "http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs"
+                    ).c_str ()));
   printf ("\n");
   printf ("\n");
   return SCM_UNSPECIFIED;
@@ -318,15 +321,15 @@ do_chroot_jail ()
      actual actions.  */
 
   enum Jail
-    {
-      USER_NAME, GROUP_NAME, JAIL, DIR, JAIL_MAX
-    };
+  {
+    USER_NAME, GROUP_NAME, JAIL, DIR, JAIL_MAX
+  };
 
   vector<string> components = string_split (jail_spec, ',');
   if (components.size () != JAIL_MAX)
     {
       error (_f ("expected %d arguments with jail, found: %u", JAIL_MAX,
-                (unsigned) components.size ()));
+                 (unsigned) components.size ()));
       exit (2);
     }
 
@@ -334,16 +337,16 @@ do_chroot_jail ()
   errno = 0;
 
   int uid;
-  if (passwd * passwd = getpwnam (components[USER_NAME].c_str ()))
+  if (passwd *passwd = getpwnam (components[USER_NAME].c_str ()))
     uid = passwd->pw_uid;
   else
     {
       if (errno == 0)
-       error (_f ("no such user: %s", components[USER_NAME]));
+        error (_f ("no such user: %s", components[USER_NAME]));
       else
-       error (_f ("cannot get user id from user name: %s: %s",
-                  components[USER_NAME],
-                  strerror (errno)));
+        error (_f ("cannot get user id from user name: %s: %s",
+                   components[USER_NAME],
+                   strerror (errno)));
       exit (3);
     }
 
@@ -351,23 +354,23 @@ do_chroot_jail ()
   errno = 0;
 
   int gid;
-  if (group * group = getgrnam (components[GROUP_NAME].c_str ()))
+  if (group *group = getgrnam (components[GROUP_NAME].c_str ()))
     gid = group->gr_gid;
   else
     {
       if (errno == 0)
-       error (_f ("no such group: %s", components[GROUP_NAME]));
+        error (_f ("no such group: %s", components[GROUP_NAME]));
       else
-       error (_f ("cannot get group id from group name: %s: %s",
-                  components[GROUP_NAME],
-                  strerror (errno)));
+        error (_f ("cannot get group id from group name: %s: %s",
+                   components[GROUP_NAME],
+                   strerror (errno)));
       exit (3);
     }
 
   if (chroot (components[JAIL].c_str ()))
     {
       error (_f ("cannot chroot to: %s: %s", components[JAIL],
-                strerror (errno)));
+                 strerror (errno)));
       exit (3);
     }
 
@@ -386,7 +389,7 @@ do_chroot_jail ()
   if (chdir (components[DIR].c_str ()))
     {
       error (_f ("cannot change working directory to: %s: %s", components[DIR],
-                strerror (errno)));
+                 strerror (errno)));
       exit (3);
     }
 }
@@ -477,90 +480,90 @@ parse_argv (int argc, char **argv)
   while (Long_option_init const *opt = (*option_parser) ())
     {
       switch (opt->shortname_char_)
-       {
-       case 0:
-         if (string (opt->longname_str0_) == "pdf"
-             || string (opt->longname_str0_) == "png"
-             || string (opt->longname_str0_) == "ps")
-           add_output_format (opt->longname_str0_);
-         else if (string (opt->longname_str0_) == "relocate")
-           relocate_binary = true;
-         break;
-
-       case 'd':
-         {
-           string arg (option_parser->optional_argument_str0_);
-           ssize eq = arg.find ('=');
-
-           string key = arg;
-           string val = "#t";
-
-           if (eq != NPOS)
-             {
-               key = arg.substr (0, eq);
-               val = arg.substr (eq + 1, arg.length () - 1);
-             }
-
-           init_scheme_variables_global
-             += "(cons \'" + key + " '" + val + ")\n";
-         }
-         break;
-
-       case 'v':
-         notice ();
-         exit (0);
-         break;
-       case 'o':
-         {
-           string s = option_parser->optional_argument_str0_;
-           File_name file_name (s);
-           output_name_global = file_name.to_string ();
-         }
-         break;
-       case 'j':
-         jail_spec = option_parser->optional_argument_str0_;
-         break;
-
-       case 'e':
-         init_scheme_code_global
-            += option_parser->optional_argument_str0_ + string (" ");
-         break;
-       case 'w':
-         warranty ();
-         exit (0);
-         break;
-
-       case 'f':
-         {
-           vector<string> components
-             = string_split (option_parser->optional_argument_str0_, ',');
-           for (vsize i = 0; i < components.size (); i++)
-             add_output_format (components[i]);
-         }
-         break;
-
-       case 'H':
-         dump_header_fieldnames_global
-           .push_back (option_parser->optional_argument_str0_);
-         break;
-       case 'I':
-         global_path.append (option_parser->optional_argument_str0_);
-         break;
-       case 'i':
-         init_name_global = option_parser->optional_argument_str0_;
-         break;
-       case 'h':
-         show_help = true;
-         break;
-       case 'V':
-         be_verbose_global = true;
-         break;
-       default:
-         programming_error (to_string ("unhandled short option: %c",
-                                       opt->shortname_char_));
-         assert (false);
-         break;
-       }
+        {
+        case 0:
+          if (string (opt->longname_str0_) == "pdf"
+              || string (opt->longname_str0_) == "png"
+              || string (opt->longname_str0_) == "ps")
+            add_output_format (opt->longname_str0_);
+          else if (string (opt->longname_str0_) == "relocate")
+            relocate_binary = true;
+          break;
+
+        case 'd':
+          {
+            string arg (option_parser->optional_argument_str0_);
+            ssize eq = arg.find ('=');
+
+            string key = arg;
+            string val = "#t";
+
+            if (eq != NPOS)
+              {
+                key = arg.substr (0, eq);
+                val = arg.substr (eq + 1, arg.length () - 1);
+              }
+
+            init_scheme_variables_global
+            += "(cons \'" + key + " '" + val + ")\n";
+          }
+          break;
+
+        case 'v':
+          notice ();
+          exit (0);
+          break;
+        case 'o':
+          {
+            string s = option_parser->optional_argument_str0_;
+            File_name file_name (s);
+            output_name_global = file_name.to_string ();
+          }
+          break;
+        case 'j':
+          jail_spec = option_parser->optional_argument_str0_;
+          break;
+
+        case 'e':
+          init_scheme_code_global
+          += option_parser->optional_argument_str0_ + string (" ");
+          break;
+        case 'w':
+          warranty ();
+          exit (0);
+          break;
+
+        case 'f':
+          {
+            vector<string> components
+              = string_split (option_parser->optional_argument_str0_, ',');
+            for (vsize i = 0; i < components.size (); i++)
+              add_output_format (components[i]);
+          }
+          break;
+
+        case 'H':
+          dump_header_fieldnames_global
+          .push_back (option_parser->optional_argument_str0_);
+          break;
+        case 'I':
+          global_path.append (option_parser->optional_argument_str0_);
+          break;
+        case 'i':
+          init_name_global = option_parser->optional_argument_str0_;
+          break;
+        case 'h':
+          show_help = true;
+          break;
+        case 'V':
+          be_verbose_global = true;
+          break;
+        default:
+          programming_error (to_string ("unhandled short option: %c",
+                                        opt->shortname_char_));
+          assert (false);
+          break;
+        }
     }
 
   if (output_format_global == "")
@@ -570,7 +573,7 @@ parse_argv (int argc, char **argv)
     {
       ly_usage ();
       if (be_verbose_global)
-       dir_info (stdout);
+        dir_info (stdout);
       exit (0);
     }
 }
@@ -590,11 +593,10 @@ setup_guile_env ()
   sane_putenv ("GUILE_MIN_YIELD_2", yield, overwrite);
   sane_putenv ("GUILE_MIN_YIELD_MALLOC", yield, overwrite);
 
-
   sane_putenv ("GUILE_INIT_SEGMENT_SIZE_1",
-              "10485760", overwrite);
+               "10485760", overwrite);
   sane_putenv ("GUILE_MAX_SEGMENT_SIZE",
-              "104857600", overwrite);
+               "104857600", overwrite);
 }
 
 vector<string> start_environment_global;
@@ -602,10 +604,10 @@ vector<string> start_environment_global;
 int
 main (int argc, char **argv, char **envp)
 {
-  configure_fpu();
+  configure_fpu ();
 
   for (char **p = envp; *p; p++)
-    start_environment_global.push_back(*p);
+    start_environment_global.push_back (*p);
 
   if (getenv ("LILYPOND_VERBOSE"))
     be_verbose_global = true;
index 67ad8848248c6ac091ac73f23ba80efbedd1d973..2d6501af0a927fbe662592a50d887b1682622636 100644 (file)
@@ -85,12 +85,12 @@ void
 Mark_engraver::stop_translation_timestep ()
 {
   if (text_)
-  {
-    text_->set_object ("side-support-elements",
-                      grob_list_to_grob_array (get_property ("stavesFound")));
-    final_text_ = text_;
-    text_ = 0;
-  }
+    {
+      text_->set_object ("side-support-elements",
+                         grob_list_to_grob_array (get_property ("stavesFound")));
+      final_text_ = text_;
+      text_ = 0;
+    }
   mark_ev_ = 0;
 }
 
@@ -99,7 +99,7 @@ Mark_engraver::finalize ()
 {
   if (final_text_)
     final_text_->set_property ("break-visibility",
-                              scm_c_make_vector (3, SCM_BOOL_T));
+                               scm_c_make_vector (3, SCM_BOOL_T));
   final_text_ = 0;
 }
 
@@ -130,58 +130,58 @@ Mark_engraver::process_music ()
       create_items (mark_ev_);
 
       /*
-       automatic marks.
+        automatic marks.
       */
 
       SCM m = mark_ev_->get_property ("label");
       SCM proc = get_property ("markFormatter");
       if (!Text_interface::is_markup (m)
-         && ly_is_procedure (proc))
-       {
-         if (!scm_is_number (m))
-           m = get_property ("rehearsalMark");
-
-         if (scm_integer_p (m) == SCM_BOOL_T
-             && scm_exact_p (m) == SCM_BOOL_T)
-           {
-             int mark_count = scm_to_int (m);
-             mark_count++;
-             context ()->set_property ("rehearsalMark",
-                                       scm_from_int (mark_count));
-           }
-
-         if (scm_is_number (m))
-           m = scm_call_2 (proc, m, context ()->self_scm ());
-         else
-           /* FIXME: constant error message.  */
-           warning (_ ("rehearsalMark must have integer value"));
-       }
+          && ly_is_procedure (proc))
+        {
+          if (!scm_is_number (m))
+            m = get_property ("rehearsalMark");
+
+          if (scm_integer_p (m) == SCM_BOOL_T
+              && scm_exact_p (m) == SCM_BOOL_T)
+            {
+              int mark_count = scm_to_int (m);
+              mark_count++;
+              context ()->set_property ("rehearsalMark",
+                                        scm_from_int (mark_count));
+            }
+
+          if (scm_is_number (m))
+            m = scm_call_2 (proc, m, context ()->self_scm ());
+          else
+            /* FIXME: constant error message.  */
+            warning (_ ("rehearsalMark must have integer value"));
+        }
 
       if (Text_interface::is_markup (m))
-       text_->set_property ("text", m);
+        text_->set_property ("text", m);
       else
-       warning (_ ("mark label must be a markup object"));
+        warning (_ ("mark label must be a markup object"));
     }
 }
 
 ADD_ACKNOWLEDGER (Mark_engraver, break_alignment);
 
 ADD_TRANSLATOR (Mark_engraver,
-               /* doc */
-               "Create @code{RehearsalMark} objects.  It puts them on top of"
-               " all staves (which is taken from the property"
-               " @code{stavesFound}).  If moving this engraver to a different"
-               " context, @ref{Staff_collecting_engraver} must move along,"
-               " otherwise all marks end up on the same Y@tie{}location.",
-               
-               /* create */
-               "RehearsalMark ",
-
-               /* read */
-               "markFormatter "
-               "rehearsalMark "
-               "stavesFound ",
-               
-               /* write */
-               ""
-               );
+                /* doc */
+                "Create @code{RehearsalMark} objects.  It puts them on top of"
+                " all staves (which is taken from the property"
+                " @code{stavesFound}).  If moving this engraver to a different"
+                " context, @ref{Staff_collecting_engraver} must move along,"
+                " otherwise all marks end up on the same Y@tie{}location.",
+
+                /* create */
+                "RehearsalMark ",
+
+                /* read */
+                "markFormatter "
+                "rehearsalMark "
+                "stavesFound ",
+
+                /* write */
+                ""
+               );
index 7a788dc3d263d637dbb5cc0e40131e2fc229c88f..144d279d7c9b4c7c433c0134f758af61093c6459 100644 (file)
@@ -64,7 +64,7 @@ Measure_grouping_engraver::process_music ()
   if (grouping_ && now.main_part_ >= stop_grouping_mom_ && !now.grace_part_)
     {
       grouping_->set_bound (RIGHT,
-                           unsmob_grob (get_property ("currentMusicalColumn")));
+                            unsmob_grob (get_property ("currentMusicalColumn")));
 
       grouping_ = 0;
     }
@@ -83,34 +83,34 @@ Measure_grouping_engraver::process_music ()
 
       Rational where (0);
       for (SCM s = grouping; scm_is_pair (s);
-          where += Rational ((int) scm_to_int (scm_car (s))) * base_moment,
-            s = scm_cdr (s))
-       {
-         int grouplen = scm_to_int (scm_car (s));
-         if (where == mp)
-           {
-             if (grouping_)
-               {
-                 programming_error ("last grouping not finished yet");
-                 continue;
-               }
+           where += Rational ((int) scm_to_int (scm_car (s))) * base_moment,
+           s = scm_cdr (s))
+        {
+          int grouplen = scm_to_int (scm_car (s));
+          if (where == mp)
+            {
+              if (grouping_)
+                {
+                  programming_error ("last grouping not finished yet");
+                  continue;
+                }
               if (grouplen > 1)
-               {
-                grouping_ = make_spanner ("MeasureGrouping", SCM_EOL);
-                grouping_->set_bound (LEFT, unsmob_grob (get_property ("currentMusicalColumn")));
-
-                stop_grouping_mom_ = now.main_part_ + Rational (grouplen - 1) * base_moment;
-                get_global_context ()->add_moment_to_process (Moment (stop_grouping_mom_));
-
-                if (grouplen == 3)
-                  grouping_->set_property ("style", ly_symbol2scm ("triangle"));
-                else
-                  grouping_->set_property ("style", ly_symbol2scm ("bracket"));
-
-                break;
-               }
-           }
-       }
+                {
+                  grouping_ = make_spanner ("MeasureGrouping", SCM_EOL);
+                  grouping_->set_bound (LEFT, unsmob_grob (get_property ("currentMusicalColumn")));
+
+                  stop_grouping_mom_ = now.main_part_ + Rational (grouplen - 1) * base_moment;
+                  get_global_context ()->add_moment_to_process (Moment (stop_grouping_mom_));
+
+                  if (grouplen == 3)
+                    grouping_->set_property ("style", ly_symbol2scm ("triangle"));
+                  else
+                    grouping_->set_property ("style", ly_symbol2scm ("bracket"));
+
+                  break;
+                }
+            }
+        }
     }
 }
 
@@ -121,18 +121,18 @@ Measure_grouping_engraver::Measure_grouping_engraver ()
 
 ADD_ACKNOWLEDGER (Measure_grouping_engraver, note_column);
 ADD_TRANSLATOR (Measure_grouping_engraver,
-               /* doc */
-               "Create @code{MeasureGrouping} to indicate beat subdivision.",
+                /* doc */
+                "Create @code{MeasureGrouping} to indicate beat subdivision.",
 
-               /* create */
-               "MeasureGrouping ",
+                /* create */
+                "MeasureGrouping ",
 
-               /* read */
+                /* read */
                 "baseMoment "
-               "beatStructure "
-               "currentMusicalColumn "
-               "measurePosition ",
+                "beatStructure "
+                "currentMusicalColumn "
+                "measurePosition ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index db6b4fced215a32f682251c42d14c0590424df9e..5d5b9a0758c578f783f918fdee17deef643758ea 100644 (file)
@@ -36,10 +36,10 @@ Measure_grouping::print (SCM grob)
 
   Real t = Staff_symbol_referencer::line_thickness (me) * robust_scm2double (me->get_property ("thickness"), 1);
   Grob *common = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT),
-                                                       X_AXIS);
+                                                        X_AXIS);
 
   Real right_point = robust_relative_extent (me->get_bound (RIGHT),
-                                            common, X_AXIS).linear_combination (CENTER);
+                                             common, X_AXIS).linear_combination (CENTER);
   Real left_point = me->get_bound (LEFT)->relative_coordinate (common, X_AXIS);
 
   Interval iv (left_point, right_point);
@@ -59,12 +59,12 @@ Measure_grouping::print (SCM grob)
 }
 
 ADD_INTERFACE (Measure_grouping,
-              "This object indicates groups of beats.  Valid choices for"
-              " @code{style} are @code{bracket} and @code{triangle}.",
-
-              /* properties */
-              "thickness "
-              "style "
-              "height "
-              );
+               "This object indicates groups of beats.  Valid choices for"
+               " @code{style} are @code{bracket} and @code{triangle}.",
+
+               /* properties */
+               "thickness "
+               "style "
+               "height "
+              );
 
index 96873d3293b778f2cdfb21bf7633cf3b382b4c67..9e601a1949122db274f6a12ab396d54f3aef1202 100644 (file)
@@ -17,7 +17,6 @@
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include "engraver.hh"
 
 #include "item.hh"
@@ -27,9 +26,9 @@
 class Melody_engraver : public Engraver
 {
   Grob *melody_item_;
-  Grob *stem_; 
+  Grob *stem_;
 protected:
-  
+
   DECLARE_ACKNOWLEDGER (stem);
   DECLARE_ACKNOWLEDGER (slur);
   TRANSLATOR_DECLARATIONS (Melody_engraver);
@@ -37,7 +36,6 @@ protected:
   void process_music ();
 };
 
-
 Melody_engraver::Melody_engraver ()
 {
   stem_ = 0;
@@ -50,7 +48,7 @@ Melody_engraver::process_music ()
   if (scm_is_string (get_property ("whichBar")))
     melody_item_ = 0;
 }
-  
+
 void
 Melody_engraver::stop_translation_timestep ()
 {
@@ -59,51 +57,47 @@ Melody_engraver::stop_translation_timestep ()
     {
       extract_grob_set (stem_, "rests", rests);
       if (rests.size ())
-       melody_item_ = 0;
+        melody_item_ = 0;
       else
-       {
-         if (!melody_item_)
-           melody_item_ = make_item ("MelodyItem", stem_->self_scm ());
+        {
+          if (!melody_item_)
+            melody_item_ = make_item ("MelodyItem", stem_->self_scm ());
 
-         Melody_spanner::add_stem (melody_item_, stem_);
-       }
+          Melody_spanner::add_stem (melody_item_, stem_);
+        }
     }
   stem_ = 0;
 }
 
-
 void
 Melody_engraver::acknowledge_slur (Grob_info /* info */)
 {
   melody_item_ = 0;
 }
 
-
 void
 Melody_engraver::acknowledge_stem (Grob_info info)
 {
   stem_ = info.grob ();
 }
 
-
-
 #include "translator.icc"
 
 ADD_ACKNOWLEDGER (Melody_engraver, stem);
 ADD_ACKNOWLEDGER (Melody_engraver, slur);
 
 ADD_TRANSLATOR (Melody_engraver,
-               /* doc */
-               "Create information for context dependent typesetting"
-               " decisions.",
+                /* doc */
+                "Create information for context dependent typesetting"
+                " decisions.",
+
+                /* create */
+                "MelodyItem ",
 
-               /* create */
-               "MelodyItem ",
+                /* read */
+                "",
 
-               /* read */
-               "",
+                /* write */
+                ""
+               );
 
-               /* write */
-               ""
-               );
-               
index 8a96a2feb7de7ec0b35c90f16a44dcca4ebae6fc..a6bda0e75be3870e3f3ed87bf896d745a82b556c 100644 (file)
@@ -27,7 +27,6 @@
   let's take item for now.
 */
 
-                
 /*
   Interpolate stem directions for neutral stems.
  */
@@ -36,10 +35,10 @@ SCM
 Melody_spanner::calc_neutral_stem_direction (SCM smob)
 {
   Grob *stem = unsmob_grob (smob);
-  Grob *me =  unsmob_grob (stem->get_object ("melody-spanner"));
+  Grob *me = unsmob_grob (stem->get_object ("melody-spanner"));
   if (!me || !me->is_live ())
     return scm_from_int (DOWN);
-  
+
   extract_grob_set (me, "stems", stems);
 
   vector<Direction> dirs;
@@ -49,47 +48,47 @@ Melody_spanner::calc_neutral_stem_direction (SCM smob)
   vsize last_nonneutral = VPOS;
   vsize next_nonneutral = 0;
   while (next_nonneutral != VPOS && next_nonneutral < dirs.size ()
-        &&  !dirs[next_nonneutral])
+         && !dirs[next_nonneutral])
     next_nonneutral++;
 
   SCM retval = SCM_EOL;
-  while (last_nonneutral == VPOS || last_nonneutral + 1 < dirs.size ()) 
+  while (last_nonneutral == VPOS || last_nonneutral + 1 < dirs.size ())
     {
       Direction d1 = CENTER;
       Direction d2 = CENTER;
       if (last_nonneutral != VPOS)
-       d1 = dirs[last_nonneutral];
+        d1 = dirs[last_nonneutral];
       if (next_nonneutral < dirs.size ())
-       d2 = dirs[next_nonneutral];
+        d2 = dirs[next_nonneutral];
 
       Direction total = CENTER;
       if (d1 && d1 == d2)
-       total = d1;
+        total = d1;
       else if (d1 && !d2)
-       total = d1;
+        total = d1;
       else if (d2 && !d1)
-       total = d2;
+        total = d2;
       else
-       total = to_dir (me->get_property ("neutral-direction"));
-      
-      for (vsize i = last_nonneutral + 1; i <  next_nonneutral; i++)
-       {
-         if (stems[i] == stem)
-           retval = scm_from_int (total);
-         else
-           stems[i]->set_property ("neutral-direction", scm_from_int (total));
-       }
+        total = to_dir (me->get_property ("neutral-direction"));
+
+      for (vsize i = last_nonneutral + 1; i < next_nonneutral; i++)
+        {
+          if (stems[i] == stem)
+            retval = scm_from_int (total);
+          else
+            stems[i]->set_property ("neutral-direction", scm_from_int (total));
+        }
 
       last_nonneutral = next_nonneutral;
       while (last_nonneutral < dirs.size ()
-            && dirs[last_nonneutral])
-       last_nonneutral++;
+             && dirs[last_nonneutral])
+        last_nonneutral++;
       next_nonneutral = last_nonneutral;
       last_nonneutral--;
 
       while (next_nonneutral < dirs.size ()
-            && !dirs[next_nonneutral])
-       next_nonneutral++;
+             && !dirs[next_nonneutral])
+        next_nonneutral++;
     }
 
   return retval;
@@ -104,11 +103,10 @@ Melody_spanner::add_stem (Grob *me, Grob *stem)
 }
 
 ADD_INTERFACE (Melody_spanner,
-              "Context dependent typesetting decisions.",
+               "Context dependent typesetting decisions.",
 
-              /* properties */
-              "stems "
-              "neutral-direction "
-              );
+               /* properties */
+               "stems "
+               "neutral-direction "
+              );
 
-  
index ead5f1f0ad7d8242f89e69672a3216530930a8bc..a51f223e18c05d14366adca4be4daefc2b4c2743 100644 (file)
@@ -78,8 +78,8 @@ Mensural_ligature_engraver::listen_ligature (Stream_event *ev)
 
 Mensural_ligature_engraver::Mensural_ligature_engraver ()
 {
-  brew_ligature_primitive_proc =
-    Mensural_ligature::brew_ligature_primitive_proc;
+  brew_ligature_primitive_proc
+    Mensural_ligature::brew_ligature_primitive_proc;
 }
 
 Spanner *
@@ -115,52 +115,52 @@ Mensural_ligature_engraver::transform_heads (vector<Grob_info> primitives)
       Stream_event *nr = info.event_cause ();
 
       /*
-       ugh. why not simply check for pitch?
+        ugh. why not simply check for pitch?
       */
       if (!nr->in_event_class ("note-event"))
-       {
-         nr->origin ()->warning
-           (_ ("cannot determine pitch of ligature primitive -> skipping"));
-         at_beginning = true;
-         continue;
-       }
+        {
+          nr->origin ()->warning
+          (_ ("cannot determine pitch of ligature primitive -> skipping"));
+          at_beginning = true;
+          continue;
+        }
 
       int pitch = unsmob_pitch (nr->get_property ("pitch"))->steps ();
       int prim = 0;
 
       if (at_beginning)
-       {
-         if (i == s - 1)
-           {
-             // we can get here after invalid input
-             nr->origin ()->warning
-               (_ ("single note ligature - skipping"));
-             break;
-           }
-         prev_semibrevis = prev_brevis_shape = false;
-         prev_primitive = NULL;
-       }
+        {
+          if (i == s - 1)
+            {
+              // we can get here after invalid input
+              nr->origin ()->warning
+              (_ ("single note ligature - skipping"));
+              break;
+            }
+          prev_semibrevis = prev_brevis_shape = false;
+          prev_primitive = NULL;
+        }
       else
-       {
-         if (pitch == prev_pitch)
-           {
-             nr->origin ()->warning
-               (_ ("prime interval within ligature -> skipping"));
-             at_beginning = true;
+        {
+          if (pitch == prev_pitch)
+            {
+              nr->origin ()->warning
+              (_ ("prime interval within ligature -> skipping"));
+              at_beginning = true;
               prim = MLP_NONE;
-             continue;
-           }
-       }
+              continue;
+            }
+        }
 
       if (duration_log < -3 // is this possible at all???
-         || duration_log > 0)
-       {
-         nr->origin ()->warning
-           (_ ("mensural ligature: duration none of Mx, L, B, S -> skipping"));
+          || duration_log > 0)
+        {
+          nr->origin ()->warning
+          (_ ("mensural ligature: duration none of Mx, L, B, S -> skipping"));
           prim = MLP_NONE;
-         at_beginning = true;
-         continue;
-       }
+          at_beginning = true;
+          continue;
+        }
 
       bool general_case = true;
       bool make_flexa = false;
@@ -169,82 +169,82 @@ Mensural_ligature_engraver::transform_heads (vector<Grob_info> primitives)
       // first check special cases
       // 1. beginning
       if (at_beginning)
-       {
-         // a. semibreves
-         if (duration_log == 0)
-           {
+        {
+          // a. semibreves
+          if (duration_log == 0)
+            {
               prim = MLP_UP | MLP_BREVIS;
-             general_case = false;
-           }
-         // b. descendens longa or brevis
-         else if (i < s - 1
-                  && (unsmob_pitch (primitives[i + 1].event_cause ()
-                                    ->get_property ("pitch"))->steps () < pitch)
-                  && duration_log > -3)
-           {
-             int left_stem = duration_log == -1 ? MLP_DOWN : 0;
+              general_case = false;
+            }
+          // b. descendens longa or brevis
+          else if (i < s - 1
+                   && (unsmob_pitch (primitives[i + 1].event_cause ()
+                                     ->get_property ("pitch"))->steps () < pitch)
+                   && duration_log > -3)
+            {
+              int left_stem = duration_log == -1 ? MLP_DOWN : 0;
               prim = left_stem | MLP_BREVIS;
-             general_case = false;
-           }
-       }
+              general_case = false;
+            }
+        }
       // 2. initial semibrevis must be followed by another one
       else if (prev_semibrevis)
-       {
-         prev_semibrevis = false;
-         if (duration_log == 0)
-           {
-             prim = MLP_BREVIS;
-             general_case = false;
-           }
-         else
-           {
-             nr->origin ()->warning
-               (_ ("semibrevis must be followed by another one -> skipping"));
+        {
+          prev_semibrevis = false;
+          if (duration_log == 0)
+            {
+              prim = MLP_BREVIS;
+              general_case = false;
+            }
+          else
+            {
+              nr->origin ()->warning
+              (_ ("semibrevis must be followed by another one -> skipping"));
               prim = MLP_NONE;
-             at_beginning = true;
-             continue;
-           }
-       }
+              at_beginning = true;
+              continue;
+            }
+        }
       // 3. semibreves are otherwise not allowed
       else if (duration_log == 0)
-       {
-         nr->origin ()->warning
-           (_ ("semibreves can only appear at the beginning of a ligature,\n"
-               "and there may be only zero or two of them"));
+        {
+          nr->origin ()->warning
+          (_ ("semibreves can only appear at the beginning of a ligature,\n"
+              "and there may be only zero or two of them"));
           prim = MLP_NONE;
-         at_beginning = true;
-         continue;
-       }
+          at_beginning = true;
+          continue;
+        }
       // 4. end, descendens
       else if (i == s - 1 && pitch < prev_pitch)
-       {
-         // brevis; previous note must be turned into flexa
-         if (duration_log == -1)
-           {
-             if (prev_brevis_shape)
-               {
+        {
+          // brevis; previous note must be turned into flexa
+          if (duration_log == -1)
+            {
+              if (prev_brevis_shape)
+                {
                   make_flexa = true;
                   general_case = false;
-               }
-             else
-               {
-                 nr->origin ()->warning
-                   (_ ("invalid ligatura ending:\n"
-                       "when the last note is a descending brevis,\n"
-                       "the penultimate note must be another one,\n"
-                       "or the ligatura must be LB or SSB"));
-                 prim = MLP_NONE;
-                 break;
-               }
-           }
-         // longa
-         else if (duration_log == -2)
-           {
-             prim = MLP_BREVIS;
-             general_case = allow_flexa = false;
-           }
-         // else maxima; fall through to regular case below
-       }
+                }
+              else
+                {
+                  nr->origin ()->warning
+                  (_ ("invalid ligatura ending:\n"
+                      "when the last note is a descending brevis,\n"
+                      "the penultimate note must be another one,\n"
+                      "or the ligatura must be LB or SSB"));
+                  prim = MLP_NONE;
+                  break;
+                }
+            }
+          // longa
+          else if (duration_log == -2)
+            {
+              prim = MLP_BREVIS;
+              general_case = allow_flexa = false;
+            }
+          // else maxima; fall through to regular case below
+        }
 
       if (allow_flexa
           && to_boolean (primitive->get_property ("ligature-flexa")))
@@ -272,22 +272,22 @@ Mensural_ligature_engraver::transform_heads (vector<Grob_info> primitives)
                     breve: check whether descending
                   */
                   int const next_pitch = unsmob_pitch
-                    (next_info.event_cause ()->get_property ("pitch"))->steps ();
+                                         (next_info.event_cause ()->get_property ("pitch"))->steps ();
                   if (next_pitch < pitch)
-                   /*
-                     sorry, forbidden
-                   */
-                   make_flexa = false;
+                    /*
+                      sorry, forbidden
+                    */
+                    make_flexa = false;
                 }
             }
         }
 
       if (general_case)
-       {
+        {
           static int const shape[3] = {MLP_MAXIMA, MLP_LONGA, MLP_BREVIS};
 
           prim = shape[duration_log + 3];
-       }
+        }
 
       if (make_flexa)
         {
@@ -295,21 +295,21 @@ Mensural_ligature_engraver::transform_heads (vector<Grob_info> primitives)
             turn the note with the previous one into a flexa
           */
           prev_primitive->set_property
-            ("primitive",
-             scm_from_int
-             (MLP_FLEXA_BEGIN
-              | (scm_to_int (prev_primitive->get_property ("primitive"))
-                 & MLP_STEM)));
+          ("primitive",
+           scm_from_int
+           (MLP_FLEXA_BEGIN
+            | (scm_to_int (prev_primitive->get_property ("primitive"))
+               & MLP_STEM)));
           prev_primitive->set_property
-            ("flexa-interval", scm_from_int (pitch - prev_pitch));
+          ("flexa-interval", scm_from_int (pitch - prev_pitch));
           prim = MLP_FLEXA_END;
           primitive->set_property
-            ("flexa-interval", scm_from_int (pitch - prev_pitch));
+          ("flexa-interval", scm_from_int (pitch - prev_pitch));
         }
 
       // join_primitives replacement
       if (!(at_beginning || make_flexa))
-       prev_primitive->set_property ("add-join", ly_bool2scm (true));
+        prev_primitive->set_property ("add-join", ly_bool2scm (true));
 
       at_beginning = false;
       prev_primitive = primitive;
@@ -336,19 +336,19 @@ Mensural_ligature_engraver::transform_heads (vector<Grob_info> primitives)
  */
 void
 Mensural_ligature_engraver::propagate_properties (Spanner *ligature,
-                                                 vector<Grob_info> primitives)
+                                                  vector<Grob_info> primitives)
 {
   Real thickness
     = robust_scm2double (ligature->get_property ("thickness"), 1.4);
   thickness
-    *= ligature->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
+  *= ligature->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
 
   Real head_width
     = Font_interface::get_default_font (ligature)->
-    find_by_name ("noteheads.sM1mensural").extent (X_AXIS).length ();
+      find_by_name ("noteheads.sM1mensural").extent (X_AXIS).length ();
   Real maxima_head_width
     = Font_interface::get_default_font (ligature)->
-    find_by_name ("noteheads.sM3ligmensural").extent (X_AXIS).length ();
+      find_by_name ("noteheads.sM3ligmensural").extent (X_AXIS).length ();
 
   Item *prev_primitive = NULL;
   for (vsize i = 0; i < primitives.size (); i++)
@@ -356,36 +356,37 @@ Mensural_ligature_engraver::propagate_properties (Spanner *ligature,
       Item *primitive = dynamic_cast<Item *> (primitives[i].grob ());
       int output = scm_to_int (primitive->get_property ("primitive"));
       primitive->set_property ("thickness",
-                              scm_from_double (thickness));
-
-      switch (output & MLP_ANY) {
-      case MLP_BREVIS:
-      case MLP_LONGA:
-       primitive->set_property ("head-width", scm_from_double (head_width));
-       break;
-      case MLP_MAXIMA:
-       primitive->set_property ("head-width",
-                                scm_from_double (maxima_head_width));
-       break;
-      case MLP_FLEXA_BEGIN:
-        /*
-          the next note (should be MLP_FLEXA_END) will handle this one
-        */
-        break;
-      case MLP_FLEXA_END:
+                               scm_from_double (thickness));
+
+      switch (output & MLP_ANY)
         {
-          SCM flexa_scm = primitive->get_property ("flexa-width");
-          Real const flexa_width = robust_scm2double (flexa_scm, 2.0);
-          SCM head_width = scm_from_double (0.5 * (flexa_width + thickness));
-          primitive->set_property ("head-width", head_width);
-          prev_primitive->set_property ("head-width", head_width);
-          prev_primitive->set_property ("flexa-width", flexa_scm);
+        case MLP_BREVIS:
+        case MLP_LONGA:
+          primitive->set_property ("head-width", scm_from_double (head_width));
+          break;
+        case MLP_MAXIMA:
+          primitive->set_property ("head-width",
+                                   scm_from_double (maxima_head_width));
+          break;
+        case MLP_FLEXA_BEGIN:
+          /*
+            the next note (should be MLP_FLEXA_END) will handle this one
+          */
+          break;
+        case MLP_FLEXA_END:
+          {
+            SCM flexa_scm = primitive->get_property ("flexa-width");
+            Real const flexa_width = robust_scm2double (flexa_scm, 2.0);
+            SCM head_width = scm_from_double (0.5 * (flexa_width + thickness));
+            primitive->set_property ("head-width", head_width);
+            prev_primitive->set_property ("head-width", head_width);
+            prev_primitive->set_property ("flexa-width", flexa_scm);
+          }
+          break;
+        default:
+          programming_error (_ ("unexpected case fall-through"));
+          break;
         }
-       break;
-      default:
-       programming_error (_ ("unexpected case fall-through"));
-       break;
-      }
 
       prev_primitive = primitive;
     }
@@ -403,69 +404,69 @@ Mensural_ligature_engraver::fold_up_primitives (vector<Grob_info> primitives)
     {
       Item *current = dynamic_cast<Item *> (primitives[i].grob ());
       if (i == 0)
-       {
-         first = current;
-         staff_space = Staff_symbol_referencer::staff_space (first);
-         thickness = scm_to_double (current->get_property ("thickness"));
-       }
+        {
+          first = current;
+          staff_space = Staff_symbol_referencer::staff_space (first);
+          thickness = scm_to_double (current->get_property ("thickness"));
+        }
 
       move_related_items_to_column (current, first->get_column (),
-                                   distance);
+                                    distance);
 
       Real head_width = scm_to_double (current->get_property ("head-width"));
       distance += head_width - thickness;
 
       if (Rhythmic_head::dot_count (current) > 0)
-       /*
-         Move dots above/behind the ligature.
-         dots should also avoid staff lines.
-       */
-       {
-         Grob *dot_gr = Rhythmic_head::get_dots (current);
-
-         bool const on_line = Staff_symbol_referencer::on_line
-           (current,
-            robust_scm2int (current->get_property ("staff-position"), 0));
-         Real vert_shift = on_line ? staff_space * 0.5 : 0.0;
-          bool const flexa_begin =
-            scm_to_int (current->get_property ("primitive"))
-            & MLP_FLEXA_BEGIN;
-
-         if (i + 1 < primitives.size ())
-           /*
-             dot in the midst => avoid next note;
-             what to avoid and where depends on
-             being on a line or between lines
-           */
-           {
-             int const delta =
-               scm_to_int (current->get_property ("delta-position"));
-             if (flexa_begin)
-               vert_shift += delta < 0
-                 ? staff_space : (on_line ? -2.0 : -1.0) * staff_space;
-             else if (on_line)
-               {
-                 if (0 < delta && delta < 3)
-                   vert_shift -= staff_space;
-               }
-             else if (delta == 1 || delta == -1)
-                 vert_shift -= delta * staff_space;
-           }
-
-         dot_gr->translate_axis (vert_shift, Y_AXIS);
-
-         /*
-           move all dots behind head
-         */
-         dot_gr->translate_axis
-            ((flexa_begin ? staff_space * 0.6 : head_width) - 2.0*thickness, X_AXIS);
-       }
+        /*
+          Move dots above/behind the ligature.
+          dots should also avoid staff lines.
+        */
+        {
+          Grob *dot_gr = Rhythmic_head::get_dots (current);
+
+          bool const on_line = Staff_symbol_referencer::on_line
+                               (current,
+                                robust_scm2int (current->get_property ("staff-position"), 0));
+          Real vert_shift = on_line ? staff_space * 0.5 : 0.0;
+          bool const flexa_begin
+            scm_to_int (current->get_property ("primitive"))
+              & MLP_FLEXA_BEGIN;
+
+          if (i + 1 < primitives.size ())
+            /*
+              dot in the midst => avoid next note;
+              what to avoid and where depends on
+              being on a line or between lines
+            */
+            {
+              int const delta
+                = scm_to_int (current->get_property ("delta-position"));
+              if (flexa_begin)
+                vert_shift += delta < 0
+                              ? staff_space : (on_line ? -2.0 : -1.0) * staff_space;
+              else if (on_line)
+                {
+                  if (0 < delta && delta < 3)
+                    vert_shift -= staff_space;
+                }
+              else if (delta == 1 || delta == -1)
+                vert_shift -= delta * staff_space;
+            }
+
+          dot_gr->translate_axis (vert_shift, Y_AXIS);
+
+          /*
+            move all dots behind head
+          */
+          dot_gr->translate_axis
+          ((flexa_begin ? staff_space * 0.6 : head_width) - 2.0 * thickness, X_AXIS);
+        }
     }
 }
 
 void
 Mensural_ligature_engraver::build_ligature (Spanner *ligature,
-                                           vector<Grob_info> primitives)
+                                            vector<Grob_info> primitives)
 {
   transform_heads (primitives);
   propagate_properties (ligature, primitives);
@@ -476,16 +477,16 @@ ADD_ACKNOWLEDGER (Mensural_ligature_engraver, rest);
 ADD_ACKNOWLEDGER (Mensural_ligature_engraver, ligature_head);
 
 ADD_TRANSLATOR (Mensural_ligature_engraver,
-               /* doc */
-               "Handle @code{Mensural_ligature_events} by glueing special"
-               " ligature heads together.",
+                /* doc */
+                "Handle @code{Mensural_ligature_events} by glueing special"
+                " ligature heads together.",
 
-               /* create */
-               "MensuralLigature ",
+                /* create */
+                "MensuralLigature ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index ad2f0918a9ab22cd427bef19b349401bbeafc0e8..f7de22edcf6f5411ce16e248df9980c8906fe1e1 100644 (file)
  */
 Stencil
 brew_flexa (Grob *me,
-           bool solid,
-           Real width,
-           Real thickness,
-           bool begin)
+            bool solid,
+            Real width,
+            Real thickness,
+            bool begin)
 {
   Real staff_space = Staff_symbol_referencer::staff_space (me);
 
@@ -60,8 +60,8 @@ brew_flexa (Grob *me,
 
   Real height = staff_space - horizontal_line_thickness;
   Stencil stencil;
-  Real const interval =
-    robust_scm2double (me->get_property ("flexa-interval"), 0.0);
+  Real const interval
+    robust_scm2double (me->get_property ("flexa-interval"), 0.0);
   Real slope = (interval / 2.0 * staff_space) / width;
 
   // Compensate optical illusion regarding vertical position of left
@@ -78,22 +78,22 @@ brew_flexa (Grob *me,
     {
       stencil = Lookup::beam (corrected_slope, thickness, height, 0.0);
       if (!begin)
-       {
-         stencil.translate_axis (width*0.5 - thickness, X_AXIS);
-         stencil.translate_axis (corrected_slope * (width*0.5 - thickness),
+        {
+          stencil.translate_axis (width * 0.5 - thickness, X_AXIS);
+          stencil.translate_axis (corrected_slope * (width * 0.5 - thickness),
                                   Y_AXIS);
         }
 
-      Stencil bottom_edge =
-        Lookup::beam (corrected_slope, width * 0.5, horizontal_line_thickness,
-                      0.0);
-      bottom_edge.translate_axis (-0.5*height, Y_AXIS);
+      Stencil bottom_edge
+        Lookup::beam (corrected_slope, width * 0.5, horizontal_line_thickness,
+                        0.0);
+      bottom_edge.translate_axis (-0.5 * height, Y_AXIS);
       stencil.add_stencil (bottom_edge);
 
-      Stencil top_edge =
-        Lookup::beam (corrected_slope, width * 0.5, horizontal_line_thickness,
-                      0.0);
-      top_edge.translate_axis (+0.5*height, Y_AXIS);
+      Stencil top_edge
+        Lookup::beam (corrected_slope, width * 0.5, horizontal_line_thickness,
+                        0.0);
+      top_edge.translate_axis (+0.5 * height, Y_AXIS);
       stencil.add_stencil (top_edge);
     }
 
@@ -116,7 +116,7 @@ internal_brew_primitive (Grob *me)
   if (primitive_scm == SCM_EOL)
     {
       programming_error ("Mensural_ligature:"
-                        " undefined primitive -> ignoring grob");
+                         " undefined primitive -> ignoring grob");
       return Lookup::blank (Box (Interval (0, 0), Interval (0, 0)));
     }
   int primitive = scm_to_int (primitive_scm);
@@ -127,10 +127,10 @@ internal_brew_primitive (Grob *me)
   Real flexa_width = 0.0;
   Real staff_space = Staff_symbol_referencer::staff_space (me);
 
-  bool const color =
-    me->get_property ("style") == ly_symbol2scm ("blackpetrucci");
-  bool const semi =
-    me->get_property ("style") == ly_symbol2scm ("semipetrucci");
+  bool const color
+    me->get_property ("style") == ly_symbol2scm ("blackpetrucci");
+  bool const semi
+    me->get_property ("style") == ly_symbol2scm ("semipetrucci");
 
   if (primitive & MLP_ANY)
     {
@@ -139,7 +139,7 @@ internal_brew_primitive (Grob *me)
     }
   if (primitive & MLP_FLEXA)
     flexa_width = robust_scm2double (me->get_property ("flexa-width"), 2.0)
-      * staff_space;
+                  * staff_space;
 
   int const note_shape = primitive & MLP_ANY;
 
@@ -149,27 +149,27 @@ internal_brew_primitive (Grob *me)
       return Lookup::blank (Box (Interval (0, 0), Interval (0, 0)));
     case MLP_LONGA: // mensural brevis head with right cauda
       out = Font_interface::get_default_font (me)->find_by_name
-       (color ? "noteheads.sM2blackmensural" :
-         semi ? "noteheads.sM2semimensural" : "noteheads.sM2mensural");
+            (color ? "noteheads.sM2blackmensural"
+             : semi ? "noteheads.sM2semimensural" : "noteheads.sM2mensural");
       break;
     case MLP_BREVIS: // mensural brevis head
       out = Font_interface::get_default_font (me)->find_by_name
-       (color ? "noteheads.sM1blackmensural" :
-         semi ? "noteheads.sM1semimensural" : "noteheads.sM1mensural");
+            (color ? "noteheads.sM1blackmensural"
+             : semi ? "noteheads.sM1semimensural" : "noteheads.sM1mensural");
       break;
     case MLP_MAXIMA: // should be mensural maxima head without stem
       out = Font_interface::get_default_font (me)->find_by_name
-       (color ? "noteheads.sM3blackligmensural" :
-         semi ? "noteheads.sM3semiligmensural" : "noteheads.sM3ligmensural");
+            (color ? "noteheads.sM3blackligmensural"
+             : semi ? "noteheads.sM3semiligmensural" : "noteheads.sM3ligmensural");
       break;
     case MLP_FLEXA_BEGIN:
     case MLP_FLEXA_END:
       out = brew_flexa (me, color, flexa_width, thickness,
-                       note_shape == MLP_FLEXA_BEGIN);
+                        note_shape == MLP_FLEXA_BEGIN);
       break;
     default:
       programming_error (_ ("Mensural_ligature:"
-                           " unexpected case fall-through"));
+                            " unexpected case fall-through"));
       return Lookup::blank (Box (Interval (0, 0), Interval (0, 0)));
     }
 
@@ -182,10 +182,10 @@ internal_brew_primitive (Grob *me)
       Real y_bottom = 0.0, y_top = 3.0 * staff_space;
 
       if (primitive & MLP_DOWN)
-       {
-         y_bottom = -y_top;
-         y_top = 0.0;
-       }
+        {
+          y_bottom = -y_top;
+          y_top = 0.0;
+        }
 
       Interval x_extent (0, thickness);
       Interval y_extent (y_bottom, y_top);
@@ -199,38 +199,38 @@ internal_brew_primitive (Grob *me)
     {
       int join_right = scm_to_int (me->get_property ("delta-position"));
       if (join_right)
-       {
-         Real y_top = join_right * 0.5 * staff_space;
-         Real y_bottom = 0.0;
-
-         if (y_top < 0.0)
-           {
-             y_bottom = y_top;
-             y_top = 0.0;
-
-             /*
-               if the previous note is longa-shaped,
-               the joining line may hide the stem, so made it longer
-               to serve as stem as well
-             */
-             if (primitive & MLP_LONGA)
-               /*
-                 instead of 3.0 the length of a longa stem should be used
-                 Font_interface::get_default_font (???)->find_by_name
-                 ("noteheads.s-2mensural").extent (Y_AXIS).length () * 0.5
-               */
-               y_bottom -= 3.0 * staff_space;
-           }
-
-         Interval x_extent (width - thickness, width);
-         Interval y_extent (y_bottom, y_top);
-         Box join_box (x_extent, y_extent);
-         Stencil join = Lookup::round_filled_box (join_box, blotdiameter);
-
-         out.add_stencil (join);
-       }
+        {
+          Real y_top = join_right * 0.5 * staff_space;
+          Real y_bottom = 0.0;
+
+          if (y_top < 0.0)
+            {
+              y_bottom = y_top;
+              y_top = 0.0;
+
+              /*
+                if the previous note is longa-shaped,
+                the joining line may hide the stem, so made it longer
+                to serve as stem as well
+              */
+              if (primitive & MLP_LONGA)
+                /*
+                  instead of 3.0 the length of a longa stem should be used
+                  Font_interface::get_default_font (???)->find_by_name
+                  ("noteheads.s-2mensural").extent (Y_AXIS).length () * 0.5
+                */
+                y_bottom -= 3.0 * staff_space;
+            }
+
+          Interval x_extent (width - thickness, width);
+          Interval y_extent (y_bottom, y_top);
+          Box join_box (x_extent, y_extent);
+          Stencil join = Lookup::round_filled_box (join_box, blotdiameter);
+
+          out.add_stencil (join);
+        }
       else
-       programming_error (_ ("Mensural_ligature: (join_right == 0)"));
+        programming_error (_ ("Mensural_ligature: (join_right == 0)"));
     }
 
 #if 0 /* what happend with the ledger lines? */
@@ -261,14 +261,14 @@ Mensural_ligature::print (SCM)
 }
 
 ADD_INTERFACE (Mensural_ligature,
-              "A mensural ligature.",
-
-              /* properties */
-              "delta-position "
-              "ligature-flexa "
-              "head-width "
-              "add-join "
-              "flexa-interval "
-              "primitive "
-              "thickness "
-              );
+               "A mensural ligature.",
+
+               /* properties */
+               "delta-position "
+               "ligature-flexa "
+               "head-width "
+               "add-join "
+               "flexa-interval "
+               "primitive "
+               "thickness "
+              );
index 09606c261e655185bee87ee4d76ab277d4cd02c1..b6d721ad24c077f0674d2888eb09f4fa8736a89b 100644 (file)
@@ -72,7 +72,7 @@ static bool
 safe_is_member (SCM scm, SCM lst)
 {
   return scm_list_p (lst) == SCM_BOOL_T
-    && scm_member (scm, lst) != SCM_BOOL_F;
+         && scm_member (scm, lst) != SCM_BOOL_F;
 }
 
 void
@@ -85,10 +85,10 @@ Metronome_mark_engraver::acknowledge_break_aligned (Grob_info info)
       == ly_symbol2scm ("staff-bar"))
     bar_ = g;
   else if (text_
-          && !support_
-          && safe_is_member (g->get_property ("break-align-symbol"),
-                             text_->get_property ("break-align-symbols"))
-          && Item::break_visible (g))
+           && !support_
+           && safe_is_member (g->get_property ("break-align-symbol"),
+                              text_->get_property ("break-align-symbols"))
+           && Item::break_visible (g))
     {
       support_ = g;
       text_->set_parent (g, X_AXIS);
@@ -115,10 +115,10 @@ Metronome_mark_engraver::acknowledge_grob (Grob_info info)
 
   if (text_)
     for (SCM s = text_->get_property ("non-break-align-symbols");
-        scm_is_pair (s);
-        s = scm_cdr (s))
+         scm_is_pair (s);
+         s = scm_cdr (s))
       if (g->internal_has_interface (scm_car (s)))
-       text_->set_parent (g, X_AXIS);
+        text_->set_parent (g, X_AXIS);
 }
 
 void
@@ -127,25 +127,25 @@ Metronome_mark_engraver::stop_translation_timestep ()
   if (text_)
     {
       if (text_->get_parent (X_AXIS)
-         && text_->get_parent (X_AXIS)->internal_has_interface (ly_symbol2scm ("multi-measure-rest-interface"))
-         && bar_)
-       text_->set_parent (bar_, X_AXIS);
+          && text_->get_parent (X_AXIS)->internal_has_interface (ly_symbol2scm ("multi-measure-rest-interface"))
+          && bar_)
+        text_->set_parent (bar_, X_AXIS);
       else if (!support_)
-       {
-         /*
-           Gardner Read "Music Notation", p.278
-
-           Align the metronome mark over the time signature (or the
-           first notational element of the measure if no time
-           signature is present in that measure).
-         */
-         if (Grob *mc = unsmob_grob (get_property ("currentMusicalColumn")))
-           text_->set_parent (mc, X_AXIS);
-         else if (Grob *cc = unsmob_grob (get_property ("currentCommandColumn")))
-           text_->set_parent (cc, X_AXIS);
-       }
+        {
+          /*
+            Gardner Read "Music Notation", p.278
+
+            Align the metronome mark over the time signature (or the
+            first notational element of the measure if no time
+            signature is present in that measure).
+          */
+          if (Grob *mc = unsmob_grob (get_property ("currentMusicalColumn")))
+            text_->set_parent (mc, X_AXIS);
+          else if (Grob *cc = unsmob_grob (get_property ("currentCommandColumn")))
+            text_->set_parent (cc, X_AXIS);
+        }
       text_->set_object ("side-support-elements",
-                        grob_list_to_grob_array (get_property ("stavesFound")));
+                         grob_list_to_grob_array (get_property ("stavesFound")));
       text_ = 0;
       support_ = 0;
       bar_ = 0;
@@ -162,8 +162,8 @@ Metronome_mark_engraver::process_music ()
 
       SCM proc = get_property ("metronomeMarkFormatter");
       SCM result = scm_call_2 (proc,
-                              tempo_ev_->self_scm (),
-                              context ()->self_scm ());
+                               tempo_ev_->self_scm (),
+                               context ()->self_scm ());
 
       text_->set_property ("text", result);
     }
@@ -174,23 +174,23 @@ ADD_ACKNOWLEDGER (Metronome_mark_engraver, break_alignment);
 ADD_ACKNOWLEDGER (Metronome_mark_engraver, grob);
 
 ADD_TRANSLATOR (Metronome_mark_engraver,
-               /* doc */
-               "Engrave metronome marking.  This delegates the formatting"
-               " work to the function in the @code{metronomeMarkFormatter}"
-               " property.  The mark is put over all staves.  The staves are"
-               " taken from the @code{stavesFound} property, which is"
-               " maintained by @ref{Staff_collecting_engraver}.",
-
-               /* create */
-               "MetronomeMark ",
-
-               /* read */
-               "currentCommandColumn "
-               "currentMusicalColumn "
-               "metronomeMarkFormatter "
-               "stavesFound "
-               "tempoHideNote ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Engrave metronome marking.  This delegates the formatting"
+                " work to the function in the @code{metronomeMarkFormatter}"
+                " property.  The mark is put over all staves.  The staves are"
+                " taken from the @code{stavesFound} property, which is"
+                " maintained by @ref{Staff_collecting_engraver}.",
+
+                /* create */
+                "MetronomeMark ",
+
+                /* read */
+                "currentCommandColumn "
+                "currentMusicalColumn "
+                "metronomeMarkFormatter "
+                "stavesFound "
+                "tempoHideNote ",
+
+                /* write */
+                ""
+               );
index 0aa11eb5497bc388f83b7e323217d46ab9705cbb..804a6e1a0729428bac4ea4bdd499862d4adcc034 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2007--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
-  
+
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
 #include "string-convert.hh"
 
 Midi_track::Midi_track (int number, bool port)
- : number_ (number)
 : number_ (number)
 {
   //                4D 54 72 6B     MTrk
   //                00 00 00 3B     chunk length (59)
@@ -42,14 +42,14 @@ Midi_track::Midi_track (int number, bool port)
   //         mi = 1:  minor key
 
   char const *data_str0 = ""
-    //        "00" "ff58" "0404" "0218" "08"
-    // "00" "ff51" "0307" "a120"
-    // why a key at all, in midi?
-    // key: C
-    // "00" "ff59" "02" "00" "00"
-    // key: F (scsii-menuetto)
-    //                           "00" "ff59" "02" "ff" "00"
-    ;
+                          //        "00" "ff58" "0404" "0218" "08"
+                          //  "00" "ff51" "0307" "a120"
+                          // why a key at all, in midi?
+                          // key: C
+                          //  "00" "ff59" "02" "00" "00"
+                          // key: F (scsii-menuetto)
+                          //                            "00" "ff59" "02" "ff" "00"
+                          ;
 
   string data_string;
   // only for format 0 (currently using format 1)?
@@ -58,7 +58,7 @@ Midi_track::Midi_track (int number, bool port)
   if (port)
     {
       string port = "00" "ff" "21" "01"
-       + String_convert::int2hex (number_, 2, '0');
+                    + String_convert::int2hex (number_, 2, '0');
       data_string += String_convert::hex2bin (port);
     }
 
@@ -82,18 +82,17 @@ Midi_track::data_string () const
 {
   string str = Midi_chunk::data_string ();
 
-  for (vector<Midi_event*>::const_iterator i (events_.begin ());
-       i != events_.end (); i ++)
+  for (vector<Midi_event *>::const_iterator i (events_.begin ());
+       i != events_.end (); i++)
     {
       str += (*i)->to_string ();
     }
   return str;
 }
 
-
 Midi_track::~Midi_track ()
 {
-  junk_pointers (events_); 
+  junk_pointers (events_);
 }
 
 /****************************************************************
@@ -114,7 +113,7 @@ Midi_event::to_string () const
 }
 /****************************************************************
  header
-*/ 
+*/
 
 Midi_header::Midi_header (int format, int tracks, int clocks_per_4)
 {
@@ -132,13 +131,12 @@ Midi_header::Midi_header (int format, int tracks, int clocks_per_4)
   set ("MThd", str, "");
 }
 
-
 /****************************************************************
    chunk
  */
 Midi_chunk::~Midi_chunk ()
 {
-  
+
 }
 
 void
@@ -161,7 +159,7 @@ Midi_chunk::to_string () const
   string str = header_string_;
   string dat = data_string ();
   string length_string = String_convert::int2hex (dat.length ()
-                                                 + footer_string_.length (), 8, '0');
+                                                  + footer_string_.length (), 8, '0');
   length_string = String_convert::hex2bin (length_string);
 
   str += length_string;
index aa96849f26c81d4ffe8674fde7c1e7cc4d129e68..a52c990ae0ff072d789e5cf76eafd0e6b3fab731 100644 (file)
@@ -56,8 +56,6 @@ Midi_item::get_midi (Audio_item *a)
   return 0;
 }
 
-
-
 Midi_duration::Midi_duration (Real seconds_f)
 {
   seconds_ = seconds_f;
@@ -70,8 +68,8 @@ Midi_duration::to_string () const
 }
 
 Midi_instrument::Midi_instrument (Audio_instrument *a)
-  : Midi_channel_item (a)
-  , audio_ (a)
+  : Midi_channel_item (a),
+    audio_ (a)
 {
   audio_->str_ = String_convert::to_lower (audio_->str_);
 }
@@ -124,9 +122,9 @@ int2midi_varint_string (int i)
     {
       str += ::to_string ((char)buffer);
       if (buffer & 0x80)
-       buffer >>= 8;
+        buffer >>= 8;
       else
-       break;
+        break;
     }
   return str;
 }
@@ -149,8 +147,8 @@ Midi_key::to_string () const
 }
 
 Midi_time_signature::Midi_time_signature (Audio_time_signature *a)
-  : audio_ (a)
-  , clocks_per_1_ (18)
+  : audio_ (a),
+    clocks_per_1_ (18)
 {
 }
 
@@ -166,8 +164,6 @@ Midi_time_signature::to_string () const
 
   int den = audio_->one_beat_;
 
-
-  
   string str = "ff5804";
   str += String_convert::int2hex (num, 2, '0');
   str += String_convert::int2hex (intlog2 (den), 2, '0');
@@ -177,10 +173,10 @@ Midi_time_signature::to_string () const
 }
 
 Midi_note::Midi_note (Audio_note *a)
-  : Midi_channel_item (a)
-  , audio_ (a)
-  , dynamic_byte_ (a->dynamic_ && a->dynamic_->volume_ >= 0
-                  ? Byte (a->dynamic_->volume_ * 0x7f) : Byte (0x5a))
+  : Midi_channel_item (a),
+    audio_ (a),
+    dynamic_byte_ (a->dynamic_ && a->dynamic_->volume_ >= 0
+                   ? Byte (a->dynamic_->volume_ * 0x7f) : Byte (0x5a))
 {
 }
 
@@ -188,7 +184,7 @@ int
 Midi_note::get_fine_tuning () const
 {
   Rational tune = (audio_->pitch_.tone_pitch ()
-                  + audio_->transposing_.tone_pitch ()) * Rational (2);
+                   + audio_->transposing_.tone_pitch ()) * Rational (2);
   tune -= Rational (get_semitone_pitch ());
 
   tune *= PITCH_WHEEL_SEMITONE;
@@ -199,7 +195,7 @@ int
 Midi_note::get_semitone_pitch () const
 {
   double tune = double ((audio_->pitch_.tone_pitch ()
-                        + audio_->transposing_.tone_pitch ()) * Rational (2));
+                         + audio_->transposing_.tone_pitch ()) * Rational (2));
   return int (rint (tune));
 }
 
@@ -252,7 +248,7 @@ Midi_note_off::to_string () const
       // Move pitch wheel back to the central position.
       str += ::to_string ((char) 0x00);
       str += ::to_string ((char) (0xE0 + channel_));
-      str += ::to_string ((char) (PITCH_WHEEL_CENTER &0x7F));
+      str += ::to_string ((char) (PITCH_WHEEL_CENTER & 0x7F));
       str += ::to_string ((char) (PITCH_WHEEL_CENTER >> 7));
     }
 
@@ -260,8 +256,8 @@ Midi_note_off::to_string () const
 }
 
 Midi_dynamic::Midi_dynamic (Audio_dynamic *a)
-  : Midi_channel_item (a)
-  , audio_ (a)
+  : Midi_channel_item (a),
+    audio_ (a)
 {
 }
 
@@ -287,15 +283,15 @@ Midi_dynamic::to_string () const
   int const volume_default = 100;
   if (audio_->volume_ < 0 || audio_->silent_)
     volume = volume_default;
-  
+
   str += ::to_string ((char)0x07);
   str += ::to_string ((char)volume);
   return str;
 }
 
 Midi_piano_pedal::Midi_piano_pedal (Audio_piano_pedal *a)
-  : Midi_channel_item (a)
-  , audio_ (a)
+  : Midi_channel_item (a),
+    audio_ (a)
 {
 }
 
@@ -349,5 +345,5 @@ Midi_text::to_string () const
 char const *
 Midi_item::name () const
 {
-   return this->class_name ();
+  return this->class_name ();
 }
index 6fbb780a1ba4c05b98ac9af1c2d40ffa825e6835..f287f2a7883f00a7aadf4cf94c6cfdee2561f655 100644 (file)
@@ -46,10 +46,10 @@ compare (Midi_note_event const &left, Midi_note_event const &right)
 }
 
 bool
-audio_item_less (Audio_item * const a,
-                Audio_item * const b)
+audio_item_less (Audio_item *const a,
+                 Audio_item *const b)
 {
-  return a->get_column ()->when_ <  b->get_column ()->when_;
+  return a->get_column ()->when_ < b->get_column ()->when_;
 }
 
 Midi_walker::Midi_walker (Audio_staff *audio_staff, Midi_track *track)
@@ -89,39 +89,39 @@ Midi_walker::do_start_note (Midi_note *note)
     {
       /* if this pitch already in queue */
       if (stop_note_queue[i].val->get_semitone_pitch ()
-         == note->get_semitone_pitch ())
-       {
-         int queued_ticks
-           = stop_note_queue[i].val->audio_->audio_column_->ticks ();
-         // If the two notes started at the same time, or option is set,
-         if (now_ticks == queued_ticks || merge_unisons_)
-           {
-             // merge them.
-             if (stop_note_queue[i].key < stop_ticks)
-               {
-                 Midi_note_event e;
-                 e.val = stop_note_queue[i].val;
-                 e.key = stop_ticks;
-                 stop_note_queue[i].ignore_ = true;
-                 stop_note_queue.insert (e);
-               }
-             note = 0;
-             break;
-           }
-         else
-           {
-             // A note was played that interruped a played note.
-             // Stop the old note, and continue to the greatest moment
-             // between the two.
-             if (stop_note_queue[i].key > stop_ticks)
-               {
-                 stop_ticks = stop_note_queue[i].key;
-               }
-             output_event (now_ticks, stop_note_queue[i].val);
-             stop_note_queue[i].ignore_ = true;
-             break;
-           }
-       }
+          == note->get_semitone_pitch ())
+        {
+          int queued_ticks
+            = stop_note_queue[i].val->audio_->audio_column_->ticks ();
+          // If the two notes started at the same time, or option is set,
+          if (now_ticks == queued_ticks || merge_unisons_)
+            {
+              // merge them.
+              if (stop_note_queue[i].key < stop_ticks)
+                {
+                  Midi_note_event e;
+                  e.val = stop_note_queue[i].val;
+                  e.key = stop_ticks;
+                  stop_note_queue[i].ignore_ = true;
+                  stop_note_queue.insert (e);
+                }
+              note = 0;
+              break;
+            }
+          else
+            {
+              // A note was played that interruped a played note.
+              // Stop the old note, and continue to the greatest moment
+              // between the two.
+              if (stop_note_queue[i].key > stop_ticks)
+                {
+                  stop_ticks = stop_note_queue[i].key;
+                }
+              output_event (now_ticks, stop_note_queue[i].val);
+              stop_note_queue[i].ignore_ = true;
+              break;
+            }
+        }
     }
 
   if (note)
@@ -144,9 +144,9 @@ Midi_walker::do_stop_notes (int max_ticks)
     {
       Midi_note_event e = stop_note_queue.get ();
       if (e.ignore_)
-       {
-         continue;
-       }
+        {
+          continue;
+        }
 
       int stop_ticks = e.key;
       Midi_note *note = e.val;
@@ -183,22 +183,22 @@ Midi_walker::process ()
   if (Midi_item *midi = get_midi (audio))
     {
       if (Midi_note *note = dynamic_cast<Midi_note *> (midi))
-       {
-         if (note->audio_->length_mom_.to_bool ())
-           do_start_note (note);
-       }
+        {
+          if (note->audio_->length_mom_.to_bool ())
+            do_start_note (note);
+        }
       else
-       output_event (audio->audio_column_->ticks (), midi);
+        output_event (audio->audio_column_->ticks (), midi);
     }
 }
 
-Midi_item*
+Midi_item *
 Midi_walker::get_midi (Audio_item *i)
 {
   Midi_item *mi = Midi_item::get_midi (i);
 
   if (percussion_)
-    if (Midi_channel_item *mci = dynamic_cast<Midi_channel_item*> (mi))
+    if (Midi_channel_item *mci = dynamic_cast<Midi_channel_item *> (mi))
       mci->channel_ = 9;
 
   midi_events_.push_back (mi);
@@ -212,7 +212,7 @@ Midi_walker::ok () const
 }
 
 void
-Midi_walker::operator ++ (int)
+Midi_walker::operator ++(int)
 {
   assert (ok ());
   index_++;
index 4b7dc472ed6fc1312522683de8321ba159645a6a..0fa4a9024006b4e24b0fe0f00e824fc65538dd86 100644 (file)
@@ -18,7 +18,6 @@
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include "misc.hh"
 #include "warn.hh"
 
@@ -55,13 +54,11 @@ directed_round (Real f, Direction d)
     return ceil (f);
 }
 
-
-
 /*
    0 at threshold,  1 at 0, with 1/x falloff.
  */
 Real
-peak_around (Real epsilon,  Real threshold, Real x)
+peak_around (Real epsilon, Real threshold, Real x)
 {
   if (x < 0)
     return 1.0;
@@ -69,29 +66,29 @@ peak_around (Real epsilon,  Real threshold, Real x)
 }
 
 /*
-  0 at 0,  1 at standard_x, and increasing thereafter. 
+  0 at 0,  1 at standard_x, and increasing thereafter.
  */
 Real
 convex_amplifier (Real standard_x, Real increase_factor, Real x)
 {
-  return (exp (increase_factor * x / standard_x) - 1.0) / (exp (increase_factor) - 1.0); 
+  return (exp (increase_factor * x / standard_x) - 1.0) / (exp (increase_factor) - 1.0);
 }
 
 string
 camel_case_to_lisp_identifier (string in)
 {
   vector<char> out;
-  
+
   /* don't add '-' before first character */
   out.push_back (char (tolower (in[0])));
-    
+
   for (size_t inpos = 1; inpos < in.size (); inpos++)
     {
       if (isupper (in[inpos]))
-       out.push_back ('-');
-      out.push_back ( char(tolower (in[inpos])));
+        out.push_back ('-');
+      out.push_back ( char (tolower (in[inpos])));
     }
-  
+
   string result (&out[0], out.size ());
   replace_all (&result, '_', '-');
 
index eff730176b61e50a45fcadd028afdf74ddfd9e45..1fee1b98429a52542931ade8df514732835e1b5b 100644 (file)
@@ -27,7 +27,7 @@ using namespace std;
 #include "program-option.hh"
 
 Modified_font_metric::Modified_font_metric (Font_metric *fm,
-                                           Real magnification)
+                                            Real magnification)
 {
   magnification_ = magnification;
 
index f2e66459a0e56ee3cf5dcaac902222d630122a77..bcea57a6fd719ca9f9fe82f859d1c171201752be 100644 (file)
@@ -23,7 +23,6 @@
 #include "main.hh"
 #include "std-string.hh"
 
-
 /*
   If a variable is changed in SRC, then DEST doesn't see the
   definitions.
@@ -31,9 +30,9 @@
 
 static SCM
 module_define_closure_func (void *closure,
-                           SCM key,
-                           SCM val,
-                           SCM /* result */)
+                            SCM key,
+                            SCM val,
+                            SCM /* result */)
 {
   SCM module = (SCM) closure;
   if (scm_variable_bound_p (val) == SCM_BOOL_T)
@@ -42,18 +41,17 @@ module_define_closure_func (void *closure,
 }
 
 LY_DEFINE (ly_module_copy, "ly:module-copy",
-          2, 0, 0, (SCM dest, SCM src),
-          "Copy all bindings from module @var{src} into @var{dest}.")
+           2, 0, 0, (SCM dest, SCM src),
+           "Copy all bindings from module @var{src} into @var{dest}.")
 {
 #define FUNC_NAME __FUNCTION__
   SCM_VALIDATE_MODULE (1, src);
   scm_internal_hash_fold ((scm_t_hash_fold_fn) &module_define_closure_func,
-                         (void *) dest,
-                         SCM_EOL, SCM_MODULE_OBARRAY (src));
+                          (void *) dest,
+                          SCM_EOL, SCM_MODULE_OBARRAY (src));
   return SCM_UNSPECIFIED;
 }
 
-
 /* Lookup SYM, but don't give error when it is not defined.  */
 SCM
 ly_module_lookup (SCM module, SCM sym)
@@ -68,18 +66,18 @@ ly_module_lookup (SCM module, SCM sym)
 /* Lookup SYM in a list of modules, which do not have to be related.
    Return the first instance. */
 LY_DEFINE (ly_modules_lookup, "ly:modules-lookup",
-          2, 1, 0,
-          (SCM modules, SCM sym, SCM def),
-          "Look up @var{sym} in the list @var{modules},"
-          " returning the first occurence.  If not found, return"
-          " @var{def} or @code{#f} if @var{def} isn't specified.")
+           2, 1, 0,
+           (SCM modules, SCM sym, SCM def),
+           "Look up @var{sym} in the list @var{modules},"
+           " returning the first occurence.  If not found, return"
+           " @var{def} or @code{#f} if @var{def} isn't specified.")
 {
   for (SCM s = modules; scm_is_pair (s); s = scm_cdr (s))
     {
       SCM mod = scm_car (s);
       SCM v = ly_module_lookup (mod, sym);
       if (SCM_VARIABLEP (v) && SCM_VARIABLE_REF (v) != SCM_UNDEFINED)
-       return scm_variable_ref (v);
+        return scm_variable_ref (v);
     }
 
   if (def != SCM_UNDEFINED)
index 6b1054140386fcdb141f50e784df23c80f37efe6..cc43ea40bff4a02133631409b12e89bce1502769 100644 (file)
 
 /* TODO: add optional factor argument. */
 LY_DEFINE (ly_make_moment, "ly:make-moment",
-          2, 2, 0, (SCM n, SCM d, SCM gn, SCM gd),
-          "Create the rational number with main timing @var{n}/@var{d},"
-          " and optional grace timing @var{gn}/@var{gd}.\n"
-          "\n"
-          "A @dfn{moment} is a point in musical time.  It consists of"
-          " a pair of rationals (@var{m},@tie{}@var{g}), where @var{m} is"
-          " the timing for the main notes, and @var{g} the timing for"
-          " grace notes.  In absence of grace notes, @var{g}@tie{}is zero.")
+           2, 2, 0, (SCM n, SCM d, SCM gn, SCM gd),
+           "Create the rational number with main timing @var{n}/@var{d},"
+           " and optional grace timing @var{gn}/@var{gd}.\n"
+           "\n"
+           "A @dfn{moment} is a point in musical time.  It consists of"
+           " a pair of rationals (@var{m},@tie{}@var{g}), where @var{m} is"
+           " the timing for the main notes, and @var{g} the timing for"
+           " grace notes.  In absence of grace notes, @var{g}@tie{}is zero.")
 {
   LY_ASSERT_TYPE (scm_is_integer, n, 1);
   LY_ASSERT_TYPE (scm_is_integer, d, 2);
@@ -48,16 +48,16 @@ LY_DEFINE (ly_make_moment, "ly:make-moment",
     }
 
   return Moment (Rational (scm_to_int (n), scm_to_int (d)),
-                Rational (grace_num, grace_den)).smobbed_copy ();
+                 Rational (grace_num, grace_den)).smobbed_copy ();
 }
 
 LY_DEFINE (ly_moment_sub, "ly:moment-sub",
-          2, 0, 0, (SCM a, SCM b),
-          "Subtract two moments.")
+           2, 0, 0, (SCM a, SCM b),
+           "Subtract two moments.")
 {
-  LY_ASSERT_SMOB (Moment, a, 1); 
+  LY_ASSERT_SMOB (Moment, a, 1);
   LY_ASSERT_SMOB (Moment, b, 2);
-  
+
   Moment *ma = unsmob_moment (a);
   Moment *mb = unsmob_moment (b);
 
@@ -65,11 +65,11 @@ LY_DEFINE (ly_moment_sub, "ly:moment-sub",
 }
 
 LY_DEFINE (ly_moment_add, "ly:moment-add",
-          2, 0, 0, (SCM a, SCM b),
-          "Add two moments.")
+           2, 0, 0, (SCM a, SCM b),
+           "Add two moments.")
 {
-  LY_ASSERT_SMOB (Moment, a, 1); 
-  LY_ASSERT_SMOB (Moment, b, 2); 
+  LY_ASSERT_SMOB (Moment, a, 1);
+  LY_ASSERT_SMOB (Moment, b, 2);
 
   Moment *ma = unsmob_moment (a);
   Moment *mb = unsmob_moment (b);
@@ -78,11 +78,11 @@ LY_DEFINE (ly_moment_add, "ly:moment-add",
 }
 
 LY_DEFINE (ly_moment_mul, "ly:moment-mul",
-          2, 0, 0, (SCM a, SCM b),
-          "Multiply two moments.")
+           2, 0, 0, (SCM a, SCM b),
+           "Multiply two moments.")
 {
-  LY_ASSERT_SMOB (Moment, a, 1); 
-  LY_ASSERT_SMOB (Moment, b, 2); 
+  LY_ASSERT_SMOB (Moment, a, 1);
+  LY_ASSERT_SMOB (Moment, b, 2);
 
   Moment *ma = unsmob_moment (a);
   Moment *mb = unsmob_moment (b);
@@ -90,33 +90,33 @@ LY_DEFINE (ly_moment_mul, "ly:moment-mul",
 }
 
 LY_DEFINE (ly_moment_div, "ly:moment-div",
-          2, 0, 0, (SCM a, SCM b),
-          "Divide two moments.")
+           2, 0, 0, (SCM a, SCM b),
+           "Divide two moments.")
 {
-  LY_ASSERT_SMOB (Moment, a, 1); 
-  LY_ASSERT_SMOB (Moment, b, 2); 
+  LY_ASSERT_SMOB (Moment, a, 1);
+  LY_ASSERT_SMOB (Moment, b, 2);
 
   Moment *ma = unsmob_moment (a);
   Moment *mb = unsmob_moment (b);
-  
+
   return (*ma / * mb).smobbed_copy ();
 }
 
 LY_DEFINE (ly_moment_mod, "ly:moment-mod",
-          2, 0, 0, (SCM a, SCM b),
-          "Modulo of two moments.")
+           2, 0, 0, (SCM a, SCM b),
+           "Modulo of two moments.")
 {
-  LY_ASSERT_SMOB (Moment, a, 1); 
-  LY_ASSERT_SMOB (Moment, b, 2); 
-  
+  LY_ASSERT_SMOB (Moment, a, 1);
+  LY_ASSERT_SMOB (Moment, b, 2);
+
   Moment *ma = unsmob_moment (a);
   Moment *mb = unsmob_moment (b);
   return (*ma % * mb).smobbed_copy ();
 }
 
 LY_DEFINE (ly_moment_grace_numerator, "ly:moment-grace-numerator",
-          1, 0, 0, (SCM mom),
-          "Extract numerator from grace timing.")
+           1, 0, 0, (SCM mom),
+           "Extract numerator from grace timing.")
 {
   LY_ASSERT_SMOB (Moment, mom, 1);
 
@@ -126,8 +126,8 @@ LY_DEFINE (ly_moment_grace_numerator, "ly:moment-grace-numerator",
 }
 
 LY_DEFINE (ly_moment_grace_denominator, "ly:moment-grace-denominator",
-          1, 0, 0, (SCM mom),
-          "Extract denominator from grace timing.")
+           1, 0, 0, (SCM mom),
+           "Extract denominator from grace timing.")
 {
   LY_ASSERT_SMOB (Moment, mom, 1);
   Moment *ma = unsmob_moment (mom);
@@ -135,8 +135,8 @@ LY_DEFINE (ly_moment_grace_denominator, "ly:moment-grace-denominator",
   return scm_from_int64 (ma->grace_part_.denominator ());
 }
 LY_DEFINE (ly_moment_main_numerator, "ly:moment-main-numerator",
-          1, 0, 0, (SCM mom),
-          "Extract numerator from main timing.")
+           1, 0, 0, (SCM mom),
+           "Extract numerator from main timing.")
 {
   LY_ASSERT_SMOB (Moment, mom, 1);
   Moment *ma = unsmob_moment (mom);
@@ -145,8 +145,8 @@ LY_DEFINE (ly_moment_main_numerator, "ly:moment-main-numerator",
 }
 
 LY_DEFINE (ly_moment_main_denominator, "ly:moment-main-denominator",
-          1, 0, 0, (SCM mom),
-          "Extract denominator from main timing.")
+           1, 0, 0, (SCM mom),
+           "Extract denominator from main timing.")
 {
   LY_ASSERT_SMOB (Moment, mom, 1);
   Moment *ma = unsmob_moment (mom);
@@ -155,12 +155,12 @@ LY_DEFINE (ly_moment_main_denominator, "ly:moment-main-denominator",
 }
 
 LY_DEFINE (ly_moment_less_p, "ly:moment<?",
-          2, 0, 0, (SCM a, SCM b),
-          "Compare two moments.")
+           2, 0, 0, (SCM a, SCM b),
+           "Compare two moments.")
 {
-  LY_ASSERT_SMOB (Moment, a, 1); 
-  LY_ASSERT_SMOB (Moment, b, 2); 
-  
+  LY_ASSERT_SMOB (Moment, a, 1);
+  LY_ASSERT_SMOB (Moment, b, 2);
+
   Moment *ma = unsmob_moment (a);
   Moment *mb = unsmob_moment (b);
 
index ae6ea63dd2f6f421c0ea2b127a6edd0dfd97d123..94d67a7b10596ebaf72800cae4d1eb54ad6cd356 100644 (file)
@@ -71,10 +71,10 @@ SCM
 Moment::as_scheme () const
 {
   return scm_list_5 (ly_symbol2scm ("ly:make-moment"),
-                    scm_from_int64 (main_part_.num ()),
-                    scm_from_int64 (main_part_.den ()),
-                    scm_from_int64 (grace_part_.num ()),
-                    scm_from_int64 (grace_part_.den ()));
+                     scm_from_int64 (main_part_.num ()),
+                     scm_from_int64 (main_part_.den ()),
+                     scm_from_int64 (grace_part_.num ()),
+                     scm_from_int64 (grace_part_.den ()));
 }
 
 SCM
index 786ab143c14957c8896542f9cd898e44e2bd6327..590260a66e3299bc2d8e0f0d78e356fce55b0319 100644 (file)
@@ -47,7 +47,7 @@ protected:
 
 private:
   Stream_event *rest_ev_;
-  vector<Stream_event*> text_events_;
+  vector<Stream_event *> text_events_;
   int start_measure_;
   Rational last_main_moment_;
   Moment stop_moment_;
@@ -57,8 +57,8 @@ private:
   Spanner *last_rest_;
   Spanner *mmrest_;
 
-  vector<Spanner*> numbers_;
-  vector<Spanner*> last_numbers_;
+  vector<Spanner *> numbers_;
+  vector<Spanner *> last_numbers_;
 };
 
 Multi_measure_rest_engraver::Multi_measure_rest_engraver ()
@@ -105,53 +105,53 @@ Multi_measure_rest_engraver::process_music ()
       mmrest_ = make_spanner ("MultiMeasureRest", rest_ev_->self_scm ());
 
       Spanner *sp
-       = make_spanner ("MultiMeasureRestNumber", rest_ev_->self_scm ());
+        = make_spanner ("MultiMeasureRestNumber", rest_ev_->self_scm ());
       numbers_.push_back (sp);
 
       if (text_events_.size ())
-       {
-         for (vsize i = 0; i < text_events_.size (); i++)
-           {
-             Stream_event *e = text_events_[i];
-             Spanner *sp
-               = make_spanner ("MultiMeasureRestText", e->self_scm ());
-             SCM t = e->get_property ("text");
-             SCM dir = e->get_property ("direction");
-             sp->set_property ("text", t);
-             if (is_direction (dir))
-               sp->set_property ("direction", dir);
-
-             numbers_.push_back (sp);
-           }
-
-         /*
-           Stack different scripts.
-         */
-         Direction d = DOWN;
-         do
-           {
-             Grob *last = 0;
-             for (vsize i = 0; i < numbers_.size (); i++)
-               {
-                 if (scm_from_int (d) == numbers_[i]->get_property ("direction"))
-                   {
-                     if (last)
-                       Side_position_interface::add_support (numbers_[i], last);
-                     last = numbers_[i];
-                   }
-               }
-           }
-         while (flip (&d) != DOWN);
-       }
+        {
+          for (vsize i = 0; i < text_events_.size (); i++)
+            {
+              Stream_event *e = text_events_[i];
+              Spanner *sp
+                = make_spanner ("MultiMeasureRestText", e->self_scm ());
+              SCM t = e->get_property ("text");
+              SCM dir = e->get_property ("direction");
+              sp->set_property ("text", t);
+              if (is_direction (dir))
+                sp->set_property ("direction", dir);
+
+              numbers_.push_back (sp);
+            }
+
+          /*
+            Stack different scripts.
+          */
+          Direction d = DOWN;
+          do
+            {
+              Grob *last = 0;
+              for (vsize i = 0; i < numbers_.size (); i++)
+                {
+                  if (scm_from_int (d) == numbers_[i]->get_property ("direction"))
+                    {
+                      if (last)
+                        Side_position_interface::add_support (numbers_[i], last);
+                      last = numbers_[i];
+                    }
+                }
+            }
+          while (flip (&d) != DOWN);
+        }
 
       for (vsize i = 0; i < numbers_.size (); i++)
-       {
-         Side_position_interface::add_support (numbers_[i], mmrest_);
-         numbers_[i]->set_parent (mmrest_, Y_AXIS);
-       }
+        {
+          Side_position_interface::add_support (numbers_[i], mmrest_);
+          numbers_[i]->set_parent (mmrest_, Y_AXIS);
+        }
 
       start_measure_
-       = scm_to_int (get_property ("internalBarNumber"));
+        = scm_to_int (get_property ("internalBarNumber"));
     }
 
   bar_seen_ = bar_seen_ || scm_is_string (get_property ("whichBar"));
@@ -176,20 +176,20 @@ Multi_measure_rest_engraver::stop_translation_timestep ()
   if (last_command_item_ && (mmrest_ || last_rest_))
     {
       if (last_rest_)
-       {
-         add_bound_item (last_rest_, last_command_item_);
-         for (vsize i = 0; i < last_numbers_.size (); i++)
-           add_bound_item (last_numbers_[i], last_command_item_);
-       }
+        {
+          add_bound_item (last_rest_, last_command_item_);
+          for (vsize i = 0; i < last_numbers_.size (); i++)
+            add_bound_item (last_numbers_[i], last_command_item_);
+        }
 
       if (mmrest_)
-       {
-         add_bound_item (mmrest_, last_command_item_);
-         for (vsize i = 0; i < numbers_.size (); i++)
-           add_bound_item (numbers_[i], last_command_item_);
+        {
+          add_bound_item (mmrest_, last_command_item_);
+          for (vsize i = 0; i < numbers_.size (); i++)
+            add_bound_item (numbers_[i], last_command_item_);
 
-         last_command_item_ = 0;
-       }
+          last_command_item_ = 0;
+        }
     }
 
   Moment mp (robust_scm2moment (get_property ("measurePosition"), Moment (0)));
@@ -223,8 +223,8 @@ Multi_measure_rest_engraver::start_translation_timestep ()
       int num = cur - start_measure_;
 
       /*
-       We can't plug a markup directly into the grob, since the
-       measure-count determines the formatting of the mmrest.
+        We can't plug a markup directly into the grob, since the
+        measure-count determines the formatting of the mmrest.
       */
       last_rest_->set_property ("measure-count", scm_from_int (num));
 
@@ -233,21 +233,21 @@ Multi_measure_rest_engraver::start_translation_timestep ()
 
       Grob *last = last_numbers_.size () ? last_numbers_[0] : 0;
       if (last && last->get_property ("text") == SCM_EOL)
-       {
-         SCM thres = get_property ("restNumberThreshold");
-         int t = 1;
-         if (scm_is_number (thres))
-           t = scm_to_int (thres);
-
-         if (num <= t)
-           last->suicide ();
-         else
-           {
-             SCM text
-               = scm_number_to_string (scm_from_int (num), scm_from_int (10));
-             last->set_property ("text", text);
-           }
-       }
+        {
+          SCM thres = get_property ("restNumberThreshold");
+          int t = 1;
+          if (scm_is_number (thres))
+            t = scm_to_int (thres);
+
+          if (num <= t)
+            last->suicide ();
+          else
+            {
+              SCM text
+                = scm_number_to_string (scm_from_int (num), scm_from_int (10));
+              last->set_property ("text", text);
+            }
+        }
     }
 
   last_main_moment_ = now.main_part_;
@@ -259,23 +259,23 @@ Multi_measure_rest_engraver::finalize ()
 }
 
 ADD_TRANSLATOR (Multi_measure_rest_engraver,
-               /* doc */
-               "Engrave multi-measure rests that are produced with"
-               " @samp{R}.  It reads @code{measurePosition} and"
-               " @code{internalBarNumber} to determine what number to print"
-               " over the @ref{MultiMeasureRest}.",
-               
-               /* create */
-               "MultiMeasureRest "
-               "MultiMeasureRestNumber "
-               "MultiMeasureRestText ",
-
-               /* read */
-               "internalBarNumber "
-               "restNumberThreshold "
-               "currentCommandColumn "
-               "measurePosition ",
-               
-               /* write */
-               ""
-               );
+                /* doc */
+                "Engrave multi-measure rests that are produced with"
+                " @samp{R}.  It reads @code{measurePosition} and"
+                " @code{internalBarNumber} to determine what number to print"
+                " over the @ref{MultiMeasureRest}.",
+
+                /* create */
+                "MultiMeasureRest "
+                "MultiMeasureRestNumber "
+                "MultiMeasureRestText ",
+
+                /* read */
+                "internalBarNumber "
+                "restNumberThreshold "
+                "currentCommandColumn "
+                "measurePosition ",
+
+                /* write */
+                ""
+               );
index 1a9f5e11a7801d9f50cc57e5ad3bec1375be6b86..09f92b58a35df5f39a56c13b6b0ccfdf944d8d53 100644 (file)
@@ -44,9 +44,9 @@ Multi_measure_rest::bar_width (Spanner *me)
     {
       Item *col = me->get_bound (d)->get_column ();
       SCM align_sym
-       = (scm_is_pair (spacing_pair)
-          ? index_get_cell (spacing_pair, d)
-          : ly_symbol2scm ("staff-bar"));
+        = (scm_is_pair (spacing_pair)
+           ? index_get_cell (spacing_pair, d)
+           : ly_symbol2scm ("staff-bar"));
       Interval coldim = Paper_column::break_align_width (col, align_sym);
 
       iv[d] = coldim[-d];
@@ -69,7 +69,7 @@ Multi_measure_rest::percent (SCM smob)
   // ugh copy & paste.
 
   Grob *common_x = sp->get_bound (LEFT)->common_refpoint (sp->get_bound (RIGHT),
-                                                         X_AXIS);
+                                                          X_AXIS);
   Interval sp_iv = bar_width (sp);
   Real x_off = 0.0;
 
@@ -123,7 +123,7 @@ int
 measure_duration_log (Grob *me)
 {
   SCM sml = dynamic_cast<Spanner *> (me)->get_bound (LEFT)
-                                        ->get_property ("measure-length");
+            ->get_property ("measure-length");
   bool round = to_boolean (me->get_property ("round-to-longer-rest"));
   Rational ml = (unsmob_moment (sml)) ? unsmob_moment (sml)->main_part_ : Rational (1);
 
@@ -136,13 +136,13 @@ measure_duration_log (Grob *me)
   int closest_list_elt = -15; // -15 is out of range.
 
   for (int i = 0; i < scm_to_int (scm_length (duration_logs_list)); i++)
-  {
-    int list_elt = scm_to_int (scm_list_ref (duration_logs_list, scm_from_int (i)));
-    int shortest_distance = abs (measure_duration_log - closest_list_elt);
-    int distance = abs (measure_duration_log - list_elt);
-    if (distance < shortest_distance)
-      closest_list_elt = list_elt;
-  }
+    {
+      int list_elt = scm_to_int (scm_list_ref (duration_logs_list, scm_from_int (i)));
+      int shortest_distance = abs (measure_duration_log - closest_list_elt);
+      int distance = abs (measure_duration_log - list_elt);
+      if (distance < shortest_distance)
+        closest_list_elt = list_elt;
+    }
 
   return closest_list_elt;
 }
@@ -217,7 +217,7 @@ Multi_measure_rest::big_rest (Grob *me, Real width)
 */
 Stencil
 Multi_measure_rest::church_rest (Grob *me, Font_metric *musfont, int measures,
-                                Real space)
+                                 Real space)
 {
   SCM mols = SCM_EOL;
 
@@ -227,52 +227,52 @@ Multi_measure_rest::church_rest (Grob *me, Font_metric *musfont, int measures,
   SCM duration_logs_list = me->get_property ("usable-duration-logs");
   int longest_church_rest = 10; // 10 is out of range.
   for (int i = 0; i < scm_to_int (scm_length (duration_logs_list)); i++)
-  {
-    longest_church_rest = min (longest_church_rest,
-                               scm_to_int (scm_list_ref (duration_logs_list,
-                                                         scm_from_int (i))));
-  }
-
-  while (l)
-  {
-    int k;
-    int i = longest_church_rest - 1;
-    int length;
-    int mdl = measure_duration_log (me);
-
-    do
     {
-      i++;
-      length = int (pow (2.0, -i));
+      longest_church_rest = min (longest_church_rest,
+                                 scm_to_int (scm_list_ref (duration_logs_list,
+                                                           scm_from_int (i))));
     }
-    while (i <= 0 &&
-           !(l >= length && mdl >= longest_church_rest - i));
-
-    l -= length;
-    k = mdl + i;
 
-    Stencil r (musfont->find_by_name ("rests." + to_string (k)));
-    if (k == 0)
+  while (l)
     {
-      Real staff_space = Staff_symbol_referencer::staff_space (me);
-      r.translate_axis (staff_space, Y_AXIS);
+      int k;
+      int i = longest_church_rest - 1;
+      int length;
+      int mdl = measure_duration_log (me);
+
+      do
+        {
+          i++;
+          length = int (pow (2.0, -i));
+        }
+      while (i <= 0
+             && !(l >= length && mdl >= longest_church_rest - i));
+
+      l -= length;
+      k = mdl + i;
+
+      Stencil r (musfont->find_by_name ("rests." + to_string (k)));
+      if (k == 0)
+        {
+          Real staff_space = Staff_symbol_referencer::staff_space (me);
+          r.translate_axis (staff_space, Y_AXIS);
+        }
+      symbols_width += r.extent (X_AXIS).length ();
+      mols = scm_cons (r.smobbed_copy (), mols);
+      count++;
     }
-    symbols_width += r.extent (X_AXIS).length ();
-    mols = scm_cons (r.smobbed_copy (), mols);
-    count++;
-  }
 
   /* Make outer padding this much bigger.  */
   Real outer_padding_factor = 1.5;
   Real inner_padding = (space - symbols_width)
-    / (2 * outer_padding_factor + (count - 1));
+                       / (2 * outer_padding_factor + (count - 1));
   if (inner_padding < 0)
     inner_padding = 1.0;
 
   Stencil mol;
   for (SCM s = mols; scm_is_pair (s); s = scm_cdr (s))
     mol.add_at_edge (X_AXIS, LEFT, *unsmob_stencil (scm_car (s)),
-                    inner_padding);
+                     inner_padding);
   mol.align_to (X_AXIS, LEFT);
   mol.translate_axis (outer_padding_factor * inner_padding, X_AXIS);
 
@@ -301,9 +301,10 @@ Multi_measure_rest::calculate_spacing_rods (Grob *me, Real length)
   Item *rb = ri->find_prebroken_piece (LEFT);
 
   Item *combinations[4][2] = {{li, ri},
-                             {lb, ri},
-                             {li, rb},
-                             {lb, rb}};
+    {lb, ri},
+    {li, rb},
+    {lb, rb}
+  };
 
   for (int i = 0; i < 4; i++)
     {
@@ -311,15 +312,15 @@ Multi_measure_rest::calculate_spacing_rods (Grob *me, Real length)
       Item *ri = combinations[i][1];
 
       if (!li || !ri)
-       continue;
+        continue;
 
       Rod rod;
       rod.item_drul_[LEFT] = li;
       rod.item_drul_[RIGHT] = ri;
 
       rod.distance_ = Paper_column::minimum_distance (li, ri)
-       + length
-       + 2 * robust_scm2double (me->get_property ("bound-padding"), 1.0);
+                      + length
+                      + 2 * robust_scm2double (me->get_property ("bound-padding"), 1.0);
 
       Real minlen = robust_scm2double (me->get_property ("minimum-length"), 0);
       rod.distance_ = max (rod.distance_, minlen);
@@ -347,24 +348,24 @@ Multi_measure_rest::set_text_rods (SCM smob)
 
   /* FIXME uncached */
   Real len = (stil && !stil->extent (X_AXIS).is_empty ())
-    ? stil->extent (X_AXIS).length ()
-    : 0.0;
+             ? stil->extent (X_AXIS).length ()
+             : 0.0;
   calculate_spacing_rods (me, len);
 
   return SCM_UNSPECIFIED;
 }
 
 ADD_INTERFACE (Multi_measure_rest,
-              "A rest that spans a whole number of measures.",
-
-              /* properties */
-              "bound-padding "
-              "expand-limit "
-              "hair-thickness "
-              "measure-count "
-              "minimum-length "
-              "round-to-longer-rest "
-              "spacing-pair "
-              "thick-thickness "
+               "A rest that spans a whole number of measures.",
+
+               /* properties */
+               "bound-padding "
+               "expand-limit "
+               "hair-thickness "
+               "measure-count "
+               "minimum-length "
+               "round-to-longer-rest "
+               "spacing-pair "
+               "thick-thickness "
                "usable-duration-logs "
-              );
+              );
index b6473b19d190395c80030a1addb5c2dec702d364..f78a387336021f9c1166aec680b9fb1cae610e5c 100644 (file)
@@ -1,30 +1,30 @@
 #include "music-function.hh"
 
 LY_DEFINE (ly_music_function_p, "ly:music-function?", 1, 0, 0,
-          (SCM x),
-          "Is @var{x} a @code{music-function}?")
+           (SCM x),
+           "Is @var{x} a @code{music-function}?")
 {
   return is_music_function (x) ? SCM_BOOL_T : SCM_BOOL_F;
 }
-                
+
 LY_DEFINE (ly_music_function_extract, "ly:music-function-extract", 1, 0, 0,
-          (SCM x),
-          "Return the Scheme function inside@tie{}@var{x}.")
+           (SCM x),
+           "Return the Scheme function inside@tie{}@var{x}.")
 {
   LY_ASSERT_TYPE (is_music_function, x, 1);
-  
-  return SCM_CELL_OBJECT_1(x);
+
+  return SCM_CELL_OBJECT_1 (x);
 }
 
 LY_DEFINE (ly_make_music_function, "ly:make-music-function", 2, 0, 0,
-          (SCM signature, SCM func),
-          "Make a function to process music, to be used for the"
-          " parser.  @var{func} is the function, and @var{signature}"
-          " describes its arguments.  @var{signature} is a list"
-          " containing either @code{ly:music?} predicates or other type"
-          " predicates.")
+           (SCM signature, SCM func),
+           "Make a function to process music, to be used for the"
+           " parser.  @var{func} is the function, and @var{signature}"
+           " describes its arguments.  @var{signature} is a list"
+           " containing either @code{ly:music?} predicates or other type"
+           " predicates.")
 {
   LY_ASSERT_TYPE (ly_is_procedure, func, 1);
-  return  make_music_function (signature, func);
+  return make_music_function (signature, func);
 }
 
index 85eecb7c33eb371216781cc7e3dedca0f48de4a8..5d8964e7d5c078bafa0263e6c7cd746f653698d1 100644 (file)
@@ -64,7 +64,7 @@ SCM
 make_music_function (SCM signature, SCM func)
 {
   scm_set_object_property_x (func, ly_symbol2scm ("music-function-signature"),
-                            signature);
+                             signature);
 
   SCM_RETURN_NEWSMOB (music_function_tag, func);
 }
index 46d9fb035dbc2d7b3af965c2c84bfba9e1f53185..c1603c8709f10353d739f6063228a22b982268cf 100644 (file)
@@ -17,7 +17,6 @@
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include <cstdio>
 using namespace std;
 
@@ -97,11 +96,11 @@ Music_iterator::get_static_get_iterator (Music *m)
   else
     {
       if (dynamic_cast<Music_wrapper *> (m))
-       p = new Music_wrapper_iterator;
+        p = new Music_wrapper_iterator;
       else if (m->is_mus_type ("event"))
         p = new Event_iterator;
       else
-       p = new Simple_music_iterator;
+        p = new Simple_music_iterator;
 
       iter = p->self_scm ();
       p->unprotect ();
@@ -170,13 +169,13 @@ Music_iterator::descend_to_bottom_context ()
     set_context (get_outlet ()->get_default_interpreter ());
 }
 
-void 
+void
 Music_iterator::report_event (Music *m)
 {
   descend_to_bottom_context ();
 
   /*
-    FIXME: then don't do it. 
+    FIXME: then don't do it.
   */
   if (!m->is_mus_type ("event"))
     m->origin ()->programming_error (_ ("Sending non-event to context"));
@@ -217,7 +216,7 @@ Music_iterator::mark_smob (SCM smob)
 }
 
 int
-Music_iterator::print_smob (SCM sm, SCM port, scm_print_state*)
+Music_iterator::print_smob (SCM sm, SCM port, scm_print_state *)
 {
   char s[1000];
 
index 9b8a99c724c571eda92dbf3f0dba2c321a132227..400e53eb3f43cb948078ceace2f14e5f9e3db0b0 100644 (file)
@@ -54,7 +54,7 @@ Music_output::mark_smob (SCM s)
 }
 
 int
-Music_output::print_smob (SCM s, SCM p, scm_print_state*)
+Music_output::print_smob (SCM s, SCM p, scm_print_state *)
 {
   Music_output *sc = (Music_output *) SCM_CELL_WORD_1 (s);
   scm_puts ("#<", p);
index c0e4eb3167fdfcaa55b82b89491a8ba1b85a3eb6..f8eca4a6fe4d80faa004b9bfb7d734efcfbf0807 100644 (file)
@@ -23,9 +23,9 @@
 #include "warn.hh"
 
 LY_DEFINE (ly_music_length, "ly:music-length",
-          1, 0, 0, (SCM mus),
-          "Get the length of music expression @var{mus} and return"
-          " it as a @code{Moment} object.")
+           1, 0, 0, (SCM mus),
+           "Get the length of music expression @var{mus} and return"
+           " it as a @code{Moment} object.")
 {
   LY_ASSERT_TYPE (unsmob_music, mus, 1);
   Music *sc = unsmob_music (mus);
@@ -33,53 +33,52 @@ LY_DEFINE (ly_music_length, "ly:music-length",
 }
 
 LY_DEFINE (ly_music_property, "ly:music-property",
-          2, 1, 0, (SCM mus, SCM sym, SCM val),
-          "Return the value for property @var{sym} of music expression"
-          " @var{mus}.  If no value is found, return @var{val} or"
-          " @code{'()} if @var{val} is not specified.")
+           2, 1, 0, (SCM mus, SCM sym, SCM val),
+           "Return the value for property @var{sym} of music expression"
+           " @var{mus}.  If no value is found, return @var{val} or"
+           " @code{'()} if @var{val} is not specified.")
 {
   LY_ASSERT_TYPE (unsmob_music, mus, 1);
   return ly_prob_property (mus, sym, val);
 }
 
 LY_DEFINE (ly_music_set_property_x, "ly:music-set-property!",
-          3, 0, 0, (SCM mus, SCM sym, SCM val),
-          "Set property @var{sym} in music expression @var{mus} to"
-          " @var{val}.")
+           3, 0, 0, (SCM mus, SCM sym, SCM val),
+           "Set property @var{sym} in music expression @var{mus} to"
+           " @var{val}.")
 {
   LY_ASSERT_TYPE (unsmob_music, mus, 1);
 
   return ly_prob_set_property_x (mus, sym, val);
 }
 
-
 /* todo:  property args */
 LY_DEFINE (ly_make_music, "ly:make-music",
-          1, 0, 0, (SCM props),
-          "Make a C++ @code{Music} object and initialize it with"
-          " @var{props}.\n"
-          "\n"
-          "This function is for internal use and is only called by"
-          " @code{make-music}, which is the preferred interface"
-          " for creating music objects.")
+           1, 0, 0, (SCM props),
+           "Make a C++ @code{Music} object and initialize it with"
+           " @var{props}.\n"
+           "\n"
+           "This function is for internal use and is only called by"
+           " @code{make-music}, which is the preferred interface"
+           " for creating music objects.")
 {
   Music *ms = new Music (props);
   return ms->unprotect ();
 }
 
 LY_DEFINE (ly_music_p, "ly:music?",
-          1, 0, 0, (SCM obj),
-          "Is @var{obj} a music object?")
+           1, 0, 0, (SCM obj),
+           "Is @var{obj} a music object?")
 {
   return scm_from_bool (unsmob_music (obj));
 }
 
 /* todo: property args */
 LY_DEFINE (ly_music_mutable_properties, "ly:music-mutable-properties",
-          1, 0, 0, (SCM mus),
-          "Return an alist containing the mutable properties of @var{mus}."
-          "  The immutable properties are not available, since they are"
-          " constant and initialized by the @code{make-music} function.")
+           1, 0, 0, (SCM mus),
+           "Return an alist containing the mutable properties of @var{mus}."
+           "  The immutable properties are not available, since they are"
+           " constant and initialized by the @code{make-music} function.")
 {
   LY_ASSERT_TYPE (unsmob_music, mus, 1);
   Music *m = unsmob_music (mus);
@@ -87,23 +86,23 @@ LY_DEFINE (ly_music_mutable_properties, "ly:music-mutable-properties",
 }
 
 LY_DEFINE (ly_music_list_p, "ly:music-list?",
-          1, 0, 0, (SCM lst),
-          "Is @var{lst} a list of music objects?")
+           1, 0, 0, (SCM lst),
+           "Is @var{lst} a list of music objects?")
 {
   if (scm_list_p (lst) == SCM_BOOL_T)
     while (scm_is_pair (lst))
       {
-       if (!unsmob_music (scm_car (lst)))
-         return SCM_BOOL_F;
-       lst = scm_cdr (lst);
+        if (!unsmob_music (scm_car (lst)))
+          return SCM_BOOL_F;
+        lst = scm_cdr (lst);
       }
 
   return SCM_BOOL_T;
 }
 
 LY_DEFINE (ly_music_deep_copy, "ly:music-deep-copy",
-          1, 0, 0, (SCM m),
-          "Copy @var{m} and all sub expressions of@tie{}@var{m}.")
+           1, 0, 0, (SCM m),
+           "Copy @var{m} and all sub expressions of@tie{}@var{m}.")
 {
   SCM copy = m;
   if (unsmob_music (m))
@@ -113,14 +112,14 @@ LY_DEFINE (ly_music_deep_copy, "ly:music-deep-copy",
     }
   else if (scm_is_pair (m))
     copy = scm_cons (ly_music_deep_copy (scm_car (m)),
-                    ly_music_deep_copy (scm_cdr (m)));
+                     ly_music_deep_copy (scm_cdr (m)));
   return copy;
 }
 
 LY_DEFINE (ly_music_transpose, "ly:music-transpose",
-          2, 0, 0, (SCM m, SCM p),
-          "Transpose @var{m} such that central@tie{}C is mapped"
-          " to@tie{}@var{p}.  Return@tie{}@var{m}.")
+           2, 0, 0, (SCM m, SCM p),
+           "Transpose @var{m} such that central@tie{}C is mapped"
+           " to@tie{}@var{p}.  Return@tie{}@var{m}.")
 {
   LY_ASSERT_TYPE (unsmob_music, m, 1);
   LY_ASSERT_SMOB (Pitch, p, 2);
@@ -137,8 +136,8 @@ LY_DEFINE (ly_music_transpose, "ly:music-transpose",
   TODO: should take moment factor?
 */
 LY_DEFINE (ly_music_compress, "ly:music-compress",
-          2, 0, 0, (SCM m, SCM factor),
-          "Compress music object@tie{}@var{m} by moment @var{factor}.")
+           2, 0, 0, (SCM m, SCM factor),
+           "Compress music object@tie{}@var{m} by moment @var{factor}.")
 {
   LY_ASSERT_TYPE (unsmob_music, m, 1);
   LY_ASSERT_TYPE (unsmob_moment, factor, 2);
@@ -149,9 +148,9 @@ LY_DEFINE (ly_music_compress, "ly:music-compress",
 }
 
 LY_DEFINE (ly_music_duration_length, "ly:music-duration-length", 1, 0, 0,
-          (SCM mus),
-          "Extract the duration field from @var{mus} and return the"
-          " length.")
+           (SCM mus),
+           "Extract the duration field from @var{mus} and return the"
+           " length.")
 {
   LY_ASSERT_TYPE (unsmob_music, mus, 1);
   Music *m = unsmob_music (mus);
@@ -167,13 +166,13 @@ LY_DEFINE (ly_music_duration_length, "ly:music-duration-length", 1, 0, 0,
 }
 
 LY_DEFINE (ly_music_duration_compress, "ly:music-duration-compress", 2, 0, 0,
-          (SCM mus, SCM fact),
-          "Compress @var{mus} by factor @var{fact}, which is a"
-          " @code{Moment}.")
+           (SCM mus, SCM fact),
+           "Compress @var{mus} by factor @var{fact}, which is a"
+           " @code{Moment}.")
 {
   LY_ASSERT_TYPE (unsmob_music, mus, 1);
   LY_ASSERT_SMOB (Moment, fact, 2);
-  
+
   Music *m = unsmob_music (mus);
   Moment *f = unsmob_moment (fact);
 
@@ -191,9 +190,9 @@ LY_DEFINE (ly_music_duration_compress, "ly:music-duration-compress", 2, 0, 0,
   TODO: this should use ly:pitch.
 */
 LY_DEFINE (ly_transpose_key_alist, "ly:transpose-key-alist",
-          2, 0, 0, (SCM l, SCM pit),
-          "Make a new key alist of@tie{}@var{l} transposed by"
-          " pitch @var{pit}.")
+           2, 0, 0, (SCM l, SCM pit),
+           "Make a new key alist of@tie{}@var{l} transposed by"
+           " pitch @var{pit}.")
 {
   SCM newlist = SCM_EOL;
   Pitch *p = unsmob_pitch (pit);
@@ -203,28 +202,28 @@ LY_DEFINE (ly_transpose_key_alist, "ly:transpose-key-alist",
       SCM key = scm_caar (s);
       SCM alter = scm_cdar (s);
       if (scm_is_pair (key))
-       {
-         Pitch orig (scm_to_int (scm_car (key)),
-                     scm_to_int (scm_cdr (key)),
-                     ly_scm2rational (alter));
+        {
+          Pitch orig (scm_to_int (scm_car (key)),
+                      scm_to_int (scm_cdr (key)),
+                      ly_scm2rational (alter));
 
-         orig = orig.transposed (*p);
+          orig = orig.transposed (*p);
 
-         SCM key = scm_cons (scm_from_int (orig.get_octave ()),
-                             scm_from_int (orig.get_notename ()));
+          SCM key = scm_cons (scm_from_int (orig.get_octave ()),
+                              scm_from_int (orig.get_notename ()));
 
-         newlist = scm_cons (scm_cons (key, ly_rational2scm (orig.get_alteration ())),
-                             newlist);
-       }
+          newlist = scm_cons (scm_cons (key, ly_rational2scm (orig.get_alteration ())),
+                              newlist);
+        }
       else if (scm_is_number (key))
-       {
-         Pitch orig (0, scm_to_int (key), ly_scm2rational (alter));
-         orig = orig.transposed (*p);
-
-         key = scm_from_int (orig.get_notename ());
-         alter = ly_rational2scm (orig.get_alteration ());
-         newlist = scm_cons (scm_cons (key, alter), newlist);
-       }
+        {
+          Pitch orig (0, scm_to_int (key), ly_scm2rational (alter));
+          orig = orig.transposed (*p);
+
+          key = scm_from_int (orig.get_notename ());
+          alter = ly_rational2scm (orig.get_alteration ());
+          newlist = scm_cons (scm_cons (key, alter), newlist);
+        }
     }
   return scm_reverse_x (newlist, SCM_EOL);
 }
index 8c9642c8608568b11030f5c9ade4284c0c615736..e8493b8ada14ce36e54e593de9e2c30bff9e7fc5 100644 (file)
@@ -41,7 +41,7 @@ Music_sequence::cumulative_length (SCM l)
     {
       Moment l = unsmob_music (scm_car (s))->get_length ();
       if (last_len.grace_part_ && l.main_part_)
-       last_len.grace_part_ = Rational (0);
+        last_len.grace_part_ = Rational (0);
       cumulative += last_len;
       last_len = l;
     }
@@ -60,12 +60,12 @@ Music_sequence::maximum_length (SCM l)
     {
       Music *m = unsmob_music (scm_car (s));
       if (!m)
-       programming_error ("Music sequence should have music elements");
+        programming_error ("Music sequence should have music elements");
       else
-       {
-         Moment l = m->get_length ();
-         dur = max (dur, l);
-       }
+        {
+          Moment l = m->get_length ();
+          dur = max (dur, l);
+        }
     }
 
   return dur;
@@ -113,11 +113,11 @@ music_list_to_relative (SCM l, Pitch p, bool ret_first)
   for (SCM s = l; scm_is_pair (s); s = scm_cdr (s))
     {
       if (Music *m = unsmob_music (scm_car (s)))
-       {
-         last = m->to_relative_octave (last);
-         if (!count++)
-           first = last;
-       }
+        {
+          last = m->to_relative_octave (last);
+          if (!count++)
+            first = last;
+        }
     }
 
   return (ret_first) ? first : last;
@@ -151,7 +151,7 @@ Music_sequence::first_start (SCM l)
       Moment l = mus->get_length ();
       Moment s = mus->start_mom ();
       if (l.to_bool () || s.to_bool ())
-       return s;
+        return s;
     }
   return m;
 }
@@ -175,7 +175,7 @@ Music_sequence::simultaneous_relative_callback (SCM music, SCM pitch)
 
       Pitch retval_1_8 = music_list_to_relative (copied, p, true);
       if (retval_1_8 != retval)
-       lily_1_8_compatibility_used = true;
+        lily_1_8_compatibility_used = true;
 
       retval = retval_1_8;
     }
@@ -190,7 +190,7 @@ Music_sequence::event_chord_relative_callback (SCM music, SCM pitch)
   Music *me = unsmob_music (music);
   Pitch p = *unsmob_pitch (pitch);
   return music_list_to_relative (me->get_property ("elements"),
-                                p, true).smobbed_copy ();
+                                 p, true).smobbed_copy ();
 }
 
 MAKE_SCHEME_CALLBACK (Music_sequence, repeated_chord_relative_callback, 2);
@@ -212,14 +212,14 @@ Music_sequence::repeated_chord_relative_callback (SCM music, SCM pitch)
   if (original_chord)
     {
       for (SCM s = original_chord->get_property ("elements"); scm_is_pair (s); s = scm_cdr (s))
-       {
-         if (Music *m = unsmob_music (scm_car (s)))
-           {
-             p = unsmob_pitch (m->get_property ("pitch"));
-             if (p)
-               break;
-           }
-       }
+        {
+          if (Music *m = unsmob_music (scm_car (s)))
+            {
+              p = unsmob_pitch (m->get_property ("pitch"));
+              if (p)
+                break;
+            }
+        }
     }
   /* Use the `pitch' argument if no pitch found in original chord. */
   if (! p)
@@ -231,17 +231,17 @@ Music_sequence::repeated_chord_relative_callback (SCM music, SCM pitch)
   for (SCM s = repeated_chord->get_property ("elements"); scm_is_pair (s); s = scm_cdr (s))
     {
       if (Music *m = unsmob_music (scm_car (s)))
-       {
-         Pitch *first_pitch = unsmob_pitch (m->get_property ("pitch"));
-         if (first_pitch)
-           {
-             Pitch new_pitch = Pitch (-1,
-                                      first_pitch->get_notename (),
-                                      first_pitch->get_alteration ());
-             m->set_property ("pitch", new_pitch.smobbed_copy ());
-             break;
-           }
-       }
+        {
+          Pitch *first_pitch = unsmob_pitch (m->get_property ("pitch"));
+          if (first_pitch)
+            {
+              Pitch new_pitch = Pitch (-1,
+                                       first_pitch->get_notename (),
+                                       first_pitch->get_alteration ());
+              m->set_property ("pitch", new_pitch.smobbed_copy ());
+              break;
+            }
+        }
     }
   music_list_to_relative (repeated_chord->get_property ("elements"), *p, true).smobbed_copy ();
   /* Return `pitch' instead of the repeated chord first pitch,
index 4a4735735556edb8bbb50c8258513a1fe20cb2ed..ada08b14aaa91cab2249c8b4167503643ce529ff 100644 (file)
@@ -53,8 +53,8 @@ Music_wrapper_iterator::construct_children ()
   Music *my_music = get_music ();
   Music *child = unsmob_music (my_music->get_property ("element"));
   child_iter_ = (child)
-    ? unsmob_iterator (get_iterator (child))
-    : 0;
+                ? unsmob_iterator (get_iterator (child))
+                : 0;
 }
 
 bool
@@ -84,5 +84,5 @@ IMPLEMENT_CTOR_CALLBACK (Music_wrapper_iterator);
 bool
 Music_wrapper_iterator::run_always () const
 {
-  return (child_iter_ &&  child_iter_->run_always ());
+  return (child_iter_ && child_iter_->run_always ());
 }
index 401e9efafb94fbd47677d0d871689c984632e4ff..cc6281addcb326eaca53aff577580e51c5a5c48f 100644 (file)
@@ -83,7 +83,7 @@ Music::Music (Music const &m)
   length_callback_ = m.length_callback_;
   start_callback_ = m.start_callback_;
 
-  /// why? 
+  /// why?
   set_spot (*m.origin ());
 }
 
@@ -130,7 +130,6 @@ print_alist (SCM a, SCM port)
     }
 }
 
-
 Pitch
 Music::generic_to_relative_octave (Pitch last)
 {
@@ -143,16 +142,16 @@ Music::generic_to_relative_octave (Pitch last)
 
       SCM check = get_property ("absolute-octave");
       if (scm_is_number (check)
-         && new_pit.get_octave () != scm_to_int (check))
-       {
-         Pitch expected_pit (scm_to_int (check),
-                             new_pit.get_notename (),
-                             new_pit.get_alteration ());
-         origin ()->warning (_f ("octave check failed; expected \"%s\", found: \"%s\"",
-                                 expected_pit.to_string (),
-                                 new_pit.to_string ()));
-         new_pit = expected_pit;
-       }
+          && new_pit.get_octave () != scm_to_int (check))
+        {
+          Pitch expected_pit (scm_to_int (check),
+                              new_pit.get_notename (),
+                              new_pit.get_alteration ());
+          origin ()->warning (_f ("octave check failed; expected \"%s\", found: \"%s\"",
+                                  expected_pit.to_string (),
+                                  new_pit.to_string ()));
+          new_pit = expected_pit;
+        }
 
       set_property ("pitch", new_pit.smobbed_copy ());
 
@@ -173,7 +172,7 @@ Music::to_relative_octave (Pitch last)
   if (ly_is_procedure (callback))
     {
       Pitch *p = unsmob_pitch (scm_call_2 (callback, self_scm (),
-                                          last.smobbed_copy ()));
+                                           last.smobbed_copy ()));
       return *p;
     }
 
@@ -192,11 +191,11 @@ Music::compress (Moment factor)
   Duration *d = unsmob_duration (get_property ("duration"));
   if (d)
     set_property ("duration",
-                 d->compressed (factor.main_part_).smobbed_copy ());
+                  d->compressed (factor.main_part_).smobbed_copy ());
 }
 
 /*
-  This mutates alist.  Hence, make sure that it is not shared 
+  This mutates alist.  Hence, make sure that it is not shared
 */
 void
 transpose_mutable (SCM alist, Pitch delta)
@@ -209,38 +208,38 @@ transpose_mutable (SCM alist, Pitch delta)
       SCM new_val = val;
 
       if (Pitch *p = unsmob_pitch (val))
-       {
-         Pitch transposed = p->transposed (delta);
-         if (transposed.get_alteration ().abs () > Rational (1,1))
-           {
-             string delta_str;
-             if (delta.get_alteration ().abs () > Rational (1, 1))
-               delta_str = (delta.normalized ().to_string ()
-                            + " " + _ ("(normalized pitch)"));
-             else
-               delta_str = delta.to_string ();
-
-             warning (_f ("Transposing %s by %s makes alteration larger than double",
-                          p->to_string (),
-                          delta_str));
-             transposed = transposed.normalized ();
-           }
-
-         new_val = transposed.smobbed_copy ();
-       }
+        {
+          Pitch transposed = p->transposed (delta);
+          if (transposed.get_alteration ().abs () > Rational (1, 1))
+            {
+              string delta_str;
+              if (delta.get_alteration ().abs () > Rational (1, 1))
+                delta_str = (delta.normalized ().to_string ()
+                             + " " + _ ("(normalized pitch)"));
+              else
+                delta_str = delta.to_string ();
+
+              warning (_f ("Transposing %s by %s makes alteration larger than double",
+                           p->to_string (),
+                           delta_str));
+              transposed = transposed.normalized ();
+            }
+
+          new_val = transposed.smobbed_copy ();
+        }
       else if (prop == ly_symbol2scm ("element"))
-       {
-         if (Music *m = unsmob_music (val))
-           m->transpose (delta);
-       }
+        {
+          if (Music *m = unsmob_music (val))
+            m->transpose (delta);
+        }
       else if (prop == ly_symbol2scm ("elements"))
-       transpose_music_list (val, delta);
-      else if (prop == ly_symbol2scm ("pitch-alist") &&
-              scm_is_pair (val))
-       new_val = ly_transpose_key_alist (val, delta.smobbed_copy ());
+        transpose_music_list (val, delta);
+      else if (prop == ly_symbol2scm ("pitch-alist")
+               && scm_is_pair (val))
+        new_val = ly_transpose_key_alist (val, delta.smobbed_copy ());
 
       if (val != new_val)
-       scm_set_cdr_x (entry , new_val);
+        scm_set_cdr_x (entry, new_val);
     }
 }
 
@@ -289,11 +288,11 @@ Music::to_event () const
     {
       SCM art_ev = SCM_EOL;
       for (; scm_is_pair (art_mus); art_mus = scm_cdr (art_mus))
-       {
-         Music *m = unsmob_music (scm_car (art_mus));
-         SCM ev = m ? m->to_event ()->unprotect () : scm_car (art_mus);
-         art_ev = scm_cons (ev, art_ev);
-       }
+        {
+          Music *m = unsmob_music (scm_car (art_mus));
+          SCM ev = m ? m->to_event ()->unprotect () : scm_car (art_mus);
+          art_ev = scm_cons (ev, art_ev);
+        }
       e->set_property ("articulations", scm_reverse_x (art_ev, SCM_EOL));
     }
 
index db897d3fd847d60cce195e926889eced04c9ec23..9c3cc73387a74dbd2533206b8148a03308871225 100644 (file)
@@ -1,7 +1,6 @@
 #include "context.hh"
 #include "grob.hh"
 
-
 /*
   Drop symbol from the list alist..alist_end.
  */
@@ -14,10 +13,10 @@ evict_from_alist (SCM symbol, SCM alist, SCM alist_end)
   while (alist != alist_end)
     {
       if (ly_is_equal (scm_caar (alist), symbol))
-       {
-         alist = scm_cdr (alist);
-         break;
-       }
+        {
+          alist = scm_cdr (alist);
+          break;
+        }
 
       *tail = scm_cons (scm_car (alist), SCM_EOL);
       tail = SCM_CDRLOC (*tail);
@@ -61,9 +60,7 @@ nested_property_alist (SCM alist, SCM prop_path, SCM value)
 SCM
 nested_property_revert_alist (SCM alist, SCM prop_path)
 {
-  int copy_count = 0;
-  bool drop = false;
-  assert(scm_is_pair (prop_path));
+  assert (scm_is_pair (prop_path));
 
   SCM wanted_sym = scm_car (prop_path);
 
@@ -73,62 +70,37 @@ nested_property_revert_alist (SCM alist, SCM prop_path)
     {
       SCM sub_sym = scm_caar (s);
       SCM old_val = scm_cdar (s);
-      drop = false;
 
       if (sub_sym == wanted_sym)
-       {
-         if (scm_is_pair (scm_cdr (prop_path)))
-           {
-             SCM new_val = nested_property_revert_alist (old_val, scm_cdr (prop_path));
-
-             /* nothing changed: drop newly constructed list. */
-             if (old_val == new_val)
-               return alist;
-
-             *tail = scm_acons (sub_sym, new_val, SCM_EOL);
-             tail = SCM_CDRLOC(*tail);
-              *tail = scm_cdr (s);
-              return new_list;
-           }
-         else
-           {
-              /* old value should be dropped only if we have another copy of it in the alist */
-              copy_count++;
-              /*
-                Only drop the first instance found.
-                the overridden value is always the first
-                if this was the only copy, we will return
-                the original list anyways so it is not relevant
-                if we drop this pair
-              */
-              if (copy_count == 1)
-                drop = true;
-           }
-         /* we now iterate over every item */
-       }
-      /*
-        Make a new list with every item
-        except for the eventual dropped one
-      */
-      if (!drop)
         {
-          *tail = scm_acons (sub_sym, old_val, SCM_EOL);
-          tail = SCM_CDRLOC (*tail);
+          if (scm_is_pair (scm_cdr (prop_path)))
+            {
+              SCM new_val = nested_property_revert_alist (old_val, scm_cdr (prop_path));
+
+              /* nothing changed: drop newly constructed list. */
+              if (old_val == new_val)
+                return alist;
+
+              *tail = scm_acons (sub_sym, new_val, SCM_EOL);
+              tail = SCM_CDRLOC (*tail);
+            }
+          else
+            {
+              /* old value is dropped. */
+            }
+
+          *tail = scm_cdr (s);
+          return new_list;
         }
+
+      *tail = scm_acons (sub_sym, old_val, SCM_EOL);
+      tail = SCM_CDRLOC (*tail);
     }
 
-  /*
-    If we find more than one copy of the property
-    push the new list, else it means we are trying to
-    revert the original value
-  */
-  if (copy_count > 1)
-    return new_list;
-  else
-    return alist;
+  /* Wanted symbol not found: drop newly constructed list. */
+  return alist;
 }
 
-
 void
 set_nested_property (Grob *me, SCM big_to_small, SCM value)
 {
@@ -138,4 +110,3 @@ set_nested_property (Grob *me, SCM big_to_small, SCM value)
 
   me->set_property (scm_car (big_to_small), alist);
 }
-
index 331d6056168363eb84aac48861b21aa7ec2a2360..3554b22e9ee00a290fabdf0c47eb8245e3e5f74a 100644 (file)
@@ -45,7 +45,7 @@ protected:
 
 private:
   SCM get_property_setting (Stream_event *evt, char const *evprop,
-                           char const *ctxprop);
+                            char const *ctxprop);
   string get_spanner_type (Stream_event *ev);
 
   Drul_array<Stream_event *> accepted_spanevents_drul_;
@@ -103,8 +103,8 @@ New_dynamic_engraver::listen_break_span (Stream_event *event)
 
 SCM
 New_dynamic_engraver::get_property_setting (Stream_event *evt,
-                                           char const *evprop,
-                                           char const *ctxprop)
+                                            char const *evprop,
+                                            char const *ctxprop)
 {
   SCM spanner_type = evt->get_property (evprop);
   if (spanner_type == SCM_EOL)
@@ -117,15 +117,15 @@ New_dynamic_engraver::process_music ()
 {
   if (current_spanner_
       && (accepted_spanevents_drul_[STOP]
-         || script_event_
-         || accepted_spanevents_drul_[START]))
+          || script_event_
+          || accepted_spanevents_drul_[START]))
     {
       Stream_event *ender = accepted_spanevents_drul_[STOP];
       if (!ender)
-       ender = script_event_;
+        ender = script_event_;
 
       if (!ender)
-       ender = accepted_spanevents_drul_[START];
+        ender = accepted_spanevents_drul_[START];
 
       finished_spanner_ = current_spanner_;
       announce_end_grob (finished_spanner_, ender->self_scm ());
@@ -139,37 +139,37 @@ New_dynamic_engraver::process_music ()
 
       string start_type = get_spanner_type (current_span_event_);
       SCM cresc_type = get_property_setting (current_span_event_, "span-type",
-                                            (start_type + "Spanner").c_str ());
+                                             (start_type + "Spanner").c_str ());
 
       if (cresc_type == ly_symbol2scm ("text"))
-       {
-         current_spanner_
-           = make_spanner ("DynamicTextSpanner",
-                           accepted_spanevents_drul_[START]->self_scm ());
-
-         SCM text = get_property_setting (current_span_event_, "span-text",
-                                          (start_type + "Text").c_str ());
-         if (Text_interface::is_markup (text))
-           current_spanner_->set_property ("text", text);
-         /*
-           If the line of a text spanner is hidden, end the alignment spanner
-           early: this allows dynamics to be spaced individually instead of
-           being linked together.
-         */
-         if (current_spanner_->get_property ("style") == ly_symbol2scm ("none"))
-           current_spanner_->set_property ("spanner-broken", SCM_BOOL_T);
-       }
+        {
+          current_spanner_
+            = make_spanner ("DynamicTextSpanner",
+                            accepted_spanevents_drul_[START]->self_scm ());
+
+          SCM text = get_property_setting (current_span_event_, "span-text",
+                                           (start_type + "Text").c_str ());
+          if (Text_interface::is_markup (text))
+            current_spanner_->set_property ("text", text);
+          /*
+            If the line of a text spanner is hidden, end the alignment spanner
+            early: this allows dynamics to be spaced individually instead of
+            being linked together.
+          */
+          if (current_spanner_->get_property ("style") == ly_symbol2scm ("none"))
+            current_spanner_->set_property ("spanner-broken", SCM_BOOL_T);
+        }
       else
-       {
-         if (cresc_type != ly_symbol2scm ("hairpin"))
-           {
-             string as_string = ly_scm_write_string (cresc_type);
-             current_span_event_
-               ->origin()->warning (_f ("unknown crescendo style: %s\ndefaulting to hairpin.", as_string.c_str()));
-           }
-         current_spanner_ = make_spanner ("Hairpin",
-                                          current_span_event_->self_scm ());
-       }
+        {
+          if (cresc_type != ly_symbol2scm ("hairpin"))
+            {
+              string as_string = ly_scm_write_string (cresc_type);
+              current_span_event_
+              ->origin ()->warning (_f ("unknown crescendo style: %s\ndefaulting to hairpin.", as_string.c_str ()));
+            }
+          current_spanner_ = make_spanner ("Hairpin",
+                                           current_span_event_->self_scm ());
+        }
       // if we have a break-dynamic-span event right after the start dynamic, break the new spanner immediately
       if (end_new_spanner_)
         {
@@ -177,28 +177,28 @@ New_dynamic_engraver::process_music ()
           end_new_spanner_ = false;
         }
       if (finished_spanner_)
-       {
-         if (Hairpin::has_interface (finished_spanner_))
-           Pointer_group_interface::add_grob (finished_spanner_,
-                                              ly_symbol2scm ("adjacent-spanners"),
-                                              current_spanner_);
-         if (Hairpin::has_interface (current_spanner_))
-           Pointer_group_interface::add_grob (current_spanner_,
-                                              ly_symbol2scm ("adjacent-spanners"),
-                                              finished_spanner_);
-       }
+        {
+          if (Hairpin::has_interface (finished_spanner_))
+            Pointer_group_interface::add_grob (finished_spanner_,
+                                               ly_symbol2scm ("adjacent-spanners"),
+                                               current_spanner_);
+          if (Hairpin::has_interface (current_spanner_))
+            Pointer_group_interface::add_grob (current_spanner_,
+                                               ly_symbol2scm ("adjacent-spanners"),
+                                               finished_spanner_);
+        }
     }
 
   if (script_event_)
     {
       script_ = make_item ("DynamicText", script_event_->self_scm ());
       script_->set_property ("text",
-                            script_event_->get_property ("text"));
+                             script_event_->get_property ("text"));
 
       if (finished_spanner_)
-       finished_spanner_->set_bound (RIGHT, script_);
+        finished_spanner_->set_bound (RIGHT, script_);
       if (current_spanner_)
-       current_spanner_->set_bound (LEFT, script_);
+        current_spanner_->set_bound (LEFT, script_);
     }
 }
 
@@ -207,13 +207,13 @@ New_dynamic_engraver::stop_translation_timestep ()
 {
   if (finished_spanner_ && !finished_spanner_->get_bound (RIGHT))
     finished_spanner_
-      ->set_bound (RIGHT,
-                  unsmob_grob (get_property ("currentMusicalColumn")));
+    ->set_bound (RIGHT,
+                 unsmob_grob (get_property ("currentMusicalColumn")));
 
   if (current_spanner_ && !current_spanner_->get_bound (LEFT))
     current_spanner_
-      ->set_bound (LEFT,
-                  unsmob_grob (get_property ("currentMusicalColumn")));
+    ->set_bound (LEFT,
+                 unsmob_grob (get_property ("currentMusicalColumn")));
   script_ = 0;
   script_event_ = 0;
   accepted_spanevents_drul_.set (0, 0);
@@ -230,9 +230,9 @@ New_dynamic_engraver::finalize ()
   if (current_spanner_)
     {
       current_span_event_
-       ->origin ()->warning (_f ("unterminated %s",
-                                 get_spanner_type (current_span_event_)
-                                 .c_str ()));
+      ->origin ()->warning (_f ("unterminated %s",
+                                get_spanner_type (current_span_event_)
+                                .c_str ()));
       current_spanner_->suicide ();
       current_spanner_ = 0;
     }
@@ -261,17 +261,17 @@ New_dynamic_engraver::acknowledge_note_column (Grob_info info)
     {
       extract_grob_set (info.grob (), "note-heads", heads);
       /*
-       Spacing constraints may require dynamics to be aligned on rests,
-       so check for a rest if this note column has no note heads.
+        Spacing constraints may require dynamics to be aligned on rests,
+        so check for a rest if this note column has no note heads.
       */
       Grob *x_parent = (heads.size ()
-                       ? heads[0]
-                       : unsmob_grob (info.grob ()->get_object ("rest")));
+                        ? heads[0]
+                        : unsmob_grob (info.grob ()->get_object ("rest")));
       if (x_parent)
-       {
-         script_->set_parent (x_parent, X_AXIS);
-         Self_alignment_interface::set_center_parent (script_, X_AXIS);
-       }
+        {
+          script_->set_parent (x_parent, X_AXIS);
+          Self_alignment_interface::set_center_parent (script_, X_AXIS);
+        }
     }
 
   if (current_spanner_ && !current_spanner_->get_bound (LEFT))
@@ -282,21 +282,21 @@ New_dynamic_engraver::acknowledge_note_column (Grob_info info)
 
 ADD_ACKNOWLEDGER (New_dynamic_engraver, note_column);
 ADD_TRANSLATOR (New_dynamic_engraver,
-               /* doc */
-               "Create hairpins, dynamic texts and dynamic text spanners.",
-
-               /* create */
-               "DynamicTextSpanner "
-               "DynamicText "
-               "Hairpin ",
-
-               /* read */
-               "crescendoSpanner "
-               "crescendoText "
-               "currentMusicalColumn "
-               "decrescendoSpanner "
-               "decrescendoText ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Create hairpins, dynamic texts and dynamic text spanners.",
+
+                /* create */
+                "DynamicTextSpanner "
+                "DynamicText "
+                "Hairpin ",
+
+                /* read */
+                "crescendoSpanner "
+                "crescendoText "
+                "currentMusicalColumn "
+                "decrescendoSpanner "
+                "decrescendoText ",
+
+                /* write */
+                ""
+               );
index db99dede95b2979324c3d7858911928bb67ac069..6444a06bff056609c20e93652587c85604c86957 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "translator.icc"
 
-
 struct Finger_tuple
 {
   Grob *head_;
@@ -51,7 +50,7 @@ struct Finger_tuple
 };
 
 bool
-operator< (Finger_tuple const &a, Finger_tuple const &b)
+operator < (Finger_tuple const &a, Finger_tuple const &b)
 {
   return a.position_ < b.position_;
 }
@@ -74,8 +73,8 @@ protected:
   DECLARE_ACKNOWLEDGER (rhythmic_head);
   DECLARE_ACKNOWLEDGER (stem);
   void add_fingering (Grob *, SCM,
-                     vector<Finger_tuple> *,
-                     Stream_event *, Stream_event *);
+                      vector<Finger_tuple> *,
+                      Stream_event *, Stream_event *);
   void add_script (Grob *, Stream_event *, Stream_event *);
   void add_string (Grob *, Stream_event *, Stream_event *);
   void position_scripts (SCM orientations, vector<Finger_tuple> *);
@@ -95,32 +94,32 @@ New_fingering_engraver::acknowledge_rhythmic_head (Grob_info inf)
       Stream_event *ev = unsmob_stream_event (scm_car (s));
 
       if (!ev)
-       continue;
+        continue;
 
       if (ev->in_event_class ("fingering-event"))
-       add_fingering (inf.grob (),
-                      ly_symbol2scm ("Fingering"),
-                      &fingerings_,
-                      ev, note_ev);
+        add_fingering (inf.grob (),
+                       ly_symbol2scm ("Fingering"),
+                       &fingerings_,
+                       ev, note_ev);
       else if (ev->in_event_class ("text-script-event"))
-       ev->origin ()->warning (_ ("cannot add text scripts to individual note heads"));
+        ev->origin ()->warning (_ ("cannot add text scripts to individual note heads"));
       else if (ev->in_event_class ("script-event"))
-       add_script (inf.grob (), ev, note_ev);
+        add_script (inf.grob (), ev, note_ev);
       else if (ev->in_event_class ("string-number-event"))
-       add_fingering (inf.grob (),
-                      ly_symbol2scm ("StringNumber"), &string_numbers_,
-                      ev, note_ev);
+        add_fingering (inf.grob (),
+                       ly_symbol2scm ("StringNumber"), &string_numbers_,
+                       ev, note_ev);
       else if (ev->in_event_class ("stroke-finger-event"))
-       add_fingering (inf.grob (),
-                      ly_symbol2scm ("StrokeFinger"), &stroke_fingerings_,
-                      ev, note_ev);
+        add_fingering (inf.grob (),
+                       ly_symbol2scm ("StrokeFinger"), &stroke_fingerings_,
+                       ev, note_ev);
       else if (ev->in_event_class ("harmonic-event"))
-       {
-         inf.grob ()->set_property ("style", ly_symbol2scm ("harmonic"));
-         Grob *d = unsmob_grob (inf.grob ()->get_object ("dot"));
-         if (d && !to_boolean (get_property ("harmonicDots")))
-           d->suicide ();
-       }
+        {
+          inf.grob ()->set_property ("style", ly_symbol2scm ("harmonic"));
+          Grob *d = unsmob_grob (inf.grob ()->get_object ("dot"));
+          if (d && !to_boolean (get_property ("harmonicDots")))
+            d->suicide ();
+        }
     }
 
   heads_.push_back (inf.grob ());
@@ -134,14 +133,14 @@ New_fingering_engraver::acknowledge_stem (Grob_info inf)
 
 void
 New_fingering_engraver::add_script (Grob *head,
-                                   Stream_event *event,
-                                   Stream_event * /* note */)
+                                    Stream_event *event,
+                                    Stream_event * /* note */)
 {
   Finger_tuple ft;
 
   Grob *g = make_item ("Script", event->self_scm ());
   make_script_from_event (g, context (),
-                         event->get_property ("articulation-type"), 0);
+                          event->get_property ("articulation-type"), 0);
   ft.script_ = g;
   ft.script_->set_parent (head, X_AXIS);
 
@@ -154,16 +153,16 @@ New_fingering_engraver::add_script (Grob *head,
 
 void
 New_fingering_engraver::add_fingering (Grob *head,
-                                      SCM grob_sym,
-                                      vector<Finger_tuple> *tuple_vector,
-                                      Stream_event *event,
-                                      Stream_event *hevent)
+                                       SCM grob_sym,
+                                       vector<Finger_tuple> *tuple_vector,
+                                       Stream_event *event,
+                                       Stream_event *hevent)
 {
   Finger_tuple ft;
 
   ft.script_ = internal_make_item (grob_sym, event->self_scm (),
-                                  ly_symbol2string (grob_sym).c_str (),
-                                  __FILE__, __LINE__, __FUNCTION__);
+                                   ly_symbol2string (grob_sym).c_str (),
+                                   __FILE__, __LINE__, __FUNCTION__);
 
   Side_position_interface::add_support (ft.script_, head);
 
@@ -176,7 +175,7 @@ New_fingering_engraver::add_fingering (Grob *head,
 
 void
 New_fingering_engraver::position_scripts (SCM orientations,
-                                         vector<Finger_tuple> *scripts)
+                                          vector<Finger_tuple> *scripts)
 {
   for (vsize i = 0; i < scripts->size (); i++)
     if (stem_ && to_boolean (scripts->at (i).script_->get_property ("add-stem-support")))
@@ -203,10 +202,10 @@ New_fingering_engraver::position_scripts (SCM orientations,
     {
       SCM d = (*scripts)[i].finger_event_->get_property ("direction");
       if (to_dir (d))
-       {
-         ((to_dir (d) == UP) ? up : down).push_back ((*scripts)[i]);
-         scripts->erase (scripts->begin () + i);
-       }
+        {
+          ((to_dir (d) == UP) ? up : down).push_back ((*scripts)[i]);
+          scripts->erase (scripts->begin () + i);
+        }
     }
 
   vector_sort (*scripts, less<Finger_tuple> ());
@@ -219,16 +218,16 @@ New_fingering_engraver::position_scripts (SCM orientations,
   if (left_p || right_p)
     {
       if (up_p && !up.size () && scripts->size ())
-       {
-         up.push_back (scripts->back ());
-         scripts->pop_back ();
-       }
+        {
+          up.push_back (scripts->back ());
+          scripts->pop_back ();
+        }
 
       if (down_p && !down.size () && scripts->size ())
-       {
-         down.push_back ((*scripts)[0]);
-         scripts->erase (scripts->begin ());
-       }
+        {
+          down.push_back ((*scripts)[0]);
+          scripts->erase (scripts->begin ());
+        }
 
       horiz.insert (horiz.end (), scripts->begin (), scripts->end ());
     }
@@ -246,10 +245,10 @@ New_fingering_engraver::position_scripts (SCM orientations,
   else
     {
       if (!down_p)
-       {
-         warning (_ ("no placement found for fingerings"));
-         warning (_ ("placing below"));
-       }
+        {
+          warning (_ ("no placement found for fingerings"));
+          warning (_ ("placing below"));
+        }
       down.insert (down.end (), scripts->begin (), scripts->end ());
       scripts->clear ();
     }
@@ -262,12 +261,12 @@ New_fingering_engraver::position_scripts (SCM orientations,
       f->set_parent (ft.head_, Y_AXIS);
       f->set_property ("avoid-slur", SCM_BOOL_F);
       if (hordir == LEFT
-         && unsmob_grob (ft.head_->get_object ("accidental-grob")))
-       Side_position_interface::add_support (f,
-                                             unsmob_grob (ft.head_->get_object ("accidental-grob")));
+          && unsmob_grob (ft.head_->get_object ("accidental-grob")))
+        Side_position_interface::add_support (f,
+                                              unsmob_grob (ft.head_->get_object ("accidental-grob")));
       else if (unsmob_grob (ft.head_->get_object ("dot")))
-       Side_position_interface::add_support (f,
-                                             unsmob_grob (ft.head_->get_object ("dot")));
+        Side_position_interface::add_support (f,
+                                              unsmob_grob (ft.head_->get_object ("dot")));
 
       Self_alignment_interface::set_align_self (f, Y_AXIS);
       Self_alignment_interface::set_center_parent (f, Y_AXIS);
@@ -281,20 +280,20 @@ New_fingering_engraver::position_scripts (SCM orientations,
   do
     {
       for (vsize i = 0; i < vertical[d].size (); i++)
-       {
-         Finger_tuple ft = vertical[d][i];
-         Grob *f = ft.script_;
-         int finger_prio = robust_scm2int (f->get_property ("script-priority"), 200);
-         f->set_parent (ft.head_, X_AXIS);
-         f->set_property ("script-priority",
-                          scm_from_int (finger_prio + d * ft.position_));
-
-         Self_alignment_interface::set_align_self (f, X_AXIS);
-         Self_alignment_interface::set_center_parent (f, X_AXIS);
-         Side_position_interface::set_axis (f, Y_AXIS);
-
-         f->set_property ("direction", scm_from_int (d));
-       }
+        {
+          Finger_tuple ft = vertical[d][i];
+          Grob *f = ft.script_;
+          int finger_prio = robust_scm2int (f->get_property ("script-priority"), 200);
+          f->set_parent (ft.head_, X_AXIS);
+          f->set_property ("script-priority",
+                           scm_from_int (finger_prio + d * ft.position_));
+
+          Self_alignment_interface::set_align_self (f, X_AXIS);
+          Self_alignment_interface::set_center_parent (f, X_AXIS);
+          Side_position_interface::set_axis (f, Y_AXIS);
+
+          f->set_property ("direction", scm_from_int (d));
+        }
     }
   while (flip (&d) != DOWN);
 }
@@ -313,21 +312,21 @@ New_fingering_engraver::position_all ()
   if (fingerings_.size ())
     {
       position_scripts (get_property ("fingeringOrientations"),
-                       &fingerings_);
+                        &fingerings_);
       fingerings_.clear ();
     }
 
   if (string_numbers_.size ())
     {
       position_scripts (get_property ("stringNumberOrientations"),
-                       &string_numbers_);
+                        &string_numbers_);
       string_numbers_.clear ();
     }
 
   if (stroke_fingerings_.size ())
     {
       position_scripts (get_property ("strokeFingerOrientations"),
-                       &stroke_fingerings_);
+                        &stroke_fingerings_);
       stroke_fingerings_.clear ();
     }
 
@@ -336,13 +335,13 @@ New_fingering_engraver::position_all ()
       Grob *script = articulations_[i].script_;
 
       for (vsize j = heads_.size (); j--;)
-       Side_position_interface::add_support (script, heads_[j]);
+        Side_position_interface::add_support (script, heads_[j]);
 
       if (stem_ && to_dir (script->get_property ("side-relative-direction")))
-       script->set_object ("direction-source", stem_->self_scm ());
+        script->set_object ("direction-source", stem_->self_scm ());
 
       if (stem_ && to_boolean (script->get_property ("add-stem-support")))
-       Side_position_interface::add_support (script, stem_);
+        Side_position_interface::add_support (script, stem_);
     }
   articulations_.clear ();
 }
@@ -356,23 +355,23 @@ ADD_ACKNOWLEDGER (New_fingering_engraver, rhythmic_head);
 ADD_ACKNOWLEDGER (New_fingering_engraver, stem);
 
 ADD_TRANSLATOR (New_fingering_engraver,
-               /* doc */
-               "Create fingering scripts for notes in a new chord.  This"
-               " engraver is ill-named, since it also takes care of"
-               " articulations and harmonic note heads.",
-
-               /* create */
-               "Fingering "
-               "StringNumber "
-               "StrokeFinger "
-               "Script ",
-
-               /* read */
-               "fingeringOrientations "
-               "harmonicDots "
-               "strokeFingerOrientations "
-               "stringNumberOrientations ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Create fingering scripts for notes in a new chord.  This"
+                " engraver is ill-named, since it also takes care of"
+                " articulations and harmonic note heads.",
+
+                /* create */
+                "Fingering "
+                "StringNumber "
+                "StrokeFinger "
+                "Script ",
+
+                /* read */
+                "fingeringOrientations "
+                "harmonicDots "
+                "strokeFingerOrientations "
+                "stringNumberOrientations ",
+
+                /* write */
+                ""
+               );
index b0049c69ea40300d73427d1808324c94b8addb08..ef591c2b6dc17ed910d6359ab89ae30ee006b505 100644 (file)
 #include "stem.hh"
 #include "warn.hh"
 
-
 void
 check_meshing_chords (Grob *me,
-                     Drul_array<vector<Real> > *offsets,
-                     Drul_array<vector<Slice> > const &extents,
-                     Drul_array<vector<Grob*> > const &clash_groups)
+                      Drul_array<vector<Real> > *offsets,
+                      Drul_array<vector<Slice> > const &extents,
+                      Drul_array<vector<Grob *> > const &clash_groups)
 
 {
   if (!extents[UP].size () || !extents[DOWN].size ())
@@ -51,8 +50,8 @@ check_meshing_chords (Grob *me,
   if (!Note_column::get_stem (clash_up) || !Note_column::get_stem (clash_down))
     return;
 
-  Drul_array<Grob*> stems (Note_column::get_stem (clash_down),
-                          Note_column::get_stem (clash_up));
+  Drul_array<Grob *> stems (Note_column::get_stem (clash_down),
+                            Note_column::get_stem (clash_up));
 
   Grob *head_up = Note_column::first_head (clash_up);
   Grob *head_down = Note_column::first_head (clash_down);
@@ -70,7 +69,7 @@ check_meshing_chords (Grob *me,
 
   /* Do not merge notes typeset in different style. */
   if (!ly_is_equal (head_up->get_property ("style"),
-                   head_down->get_property ("style")))
+                    head_down->get_property ("style")))
     merge_possible = false;
 
   int up_ball_type = Rhythmic_head::duration_log (head_up);
@@ -95,9 +94,9 @@ check_meshing_chords (Grob *me,
      them indistinguishable.  */
   if (merge_possible
       && ((Stem::duration_log (stems[UP]) == 1
-          && Stem::duration_log (stems[DOWN]) == 2)
-         || (Stem::duration_log (stems[UP]) == 2
-             && Stem::duration_log (stems[DOWN]) == 1)))
+           && Stem::duration_log (stems[DOWN]) == 2)
+          || (Stem::duration_log (stems[UP]) == 2
+              && Stem::duration_log (stems[DOWN]) == 1)))
     merge_possible = false;
 
   /*
@@ -133,36 +132,36 @@ check_meshing_chords (Grob *me,
   bool distant_half_collide = false;
   bool full_collide = false;
 
-  for (vsize i = 0, j = 0; i < ups.size () && j < dps.size (); )
+  for (vsize i = 0, j = 0; i < ups.size () && j < dps.size ();)
     {
       if (abs (ups[i] - dps[j]) == 1)
-       {
-         merge_possible = false;
-         if (ups[i] > dps[j])
-           close_half_collide = true;
-         else
-           distant_half_collide = true;
-       }
+        {
+          merge_possible = false;
+          if (ups[i] > dps[j])
+            close_half_collide = true;
+          else
+            distant_half_collide = true;
+        }
       else if (ups[i] == dps[j])
-       full_collide = true;
+        full_collide = true;
       else if (ups[i] > dps[0] && ups[i] < dps.back ())
-       merge_possible = false;
+        merge_possible = false;
       else if (dps[j] > ups[0] && dps[j] < ups.back ())
-       merge_possible = false;
+        merge_possible = false;
 
       if (ups[i] < dps[j])
-       i++;
+        i++;
       else if (ups[i] > dps[j])
-       j++;
+        j++;
       else
-       {
-         i++;
-         j++;
-       }
+        {
+          i++;
+          j++;
+        }
     }
 
   full_collide = full_collide || (close_half_collide
-                                 && distant_half_collide);
+                                  && distant_half_collide);
 
   Real shift_amount = 1;
 
@@ -171,7 +170,7 @@ check_meshing_chords (Grob *me,
      the top note of which is the same pitch as the lowest upstem note, they
      shouldn't count as touching.
   */
-  if (dps.back () == ups[0] && dps.size () > 1 && dps[dps.size() - 2] == ups[0] - 1)
+  if (dps.back () == ups[0] && dps.size () > 1 && dps[dps.size () - 2] == ups[0] - 1)
     touch = false;
 
   if (touch)
@@ -183,9 +182,9 @@ check_meshing_chords (Grob *me,
   if (full_collide)
     {
       if (Rhythmic_head::dot_count (head_up) > Rhythmic_head::dot_count (head_down))
-       shift_amount = 1;
+        shift_amount = 1;
       else if (Rhythmic_head::dot_count (head_up) < Rhythmic_head::dot_count (head_down))
-       stem_to_stem = true;
+        stem_to_stem = true;
     }
 
   /* The solfa is a triangle, which is inverted depending on stem
@@ -209,54 +208,54 @@ check_meshing_chords (Grob *me,
       shift_amount = 0;
 
       /* If possible, don't wipe any heads.  Else, wipe shortest head,
-        or head with smallest amount of dots.  Note: when merging
-        different heads, dots on the smaller one disappear. */
+         or head with smallest amount of dots.  Note: when merging
+         different heads, dots on the smaller one disappear. */
       Grob *wipe_ball = 0;
       Grob *dot_wipe_head = head_up;
 
       if (up_ball_type == down_ball_type)
-       {
-         if (Rhythmic_head::dot_count (head_down) < Rhythmic_head::dot_count (head_up))
-           {
-             wipe_ball = head_down;
-             dot_wipe_head = head_down;
-           }
-         else if (Rhythmic_head::dot_count (head_down) > Rhythmic_head::dot_count (head_up))
-           {
-             dot_wipe_head = head_up;
-             wipe_ball = head_up;
-           }
-         else
-           dot_wipe_head = head_up;
-       }
+        {
+          if (Rhythmic_head::dot_count (head_down) < Rhythmic_head::dot_count (head_up))
+            {
+              wipe_ball = head_down;
+              dot_wipe_head = head_down;
+            }
+          else if (Rhythmic_head::dot_count (head_down) > Rhythmic_head::dot_count (head_up))
+            {
+              dot_wipe_head = head_up;
+              wipe_ball = head_up;
+            }
+          else
+            dot_wipe_head = head_up;
+        }
       else if (down_ball_type > up_ball_type)
-       {
-         wipe_ball = head_down;
-         dot_wipe_head = head_down;
-       }
+        {
+          wipe_ball = head_down;
+          dot_wipe_head = head_down;
+        }
       else if (down_ball_type < up_ball_type)
-       {
-         wipe_ball = head_up;
-         dot_wipe_head = head_up;
-         /*
-           If upper head is eighth note or shorter, and lower head is half note,
-           shift by the difference between the open and filled note head widths,
-           otherwise upper stem will be misaligned slightly.
-         */
-         if (Stem::duration_log (stems[DOWN]) == 1
-             && Stem::duration_log (stems[UP]) >= 3)
-           shift_amount = (1 - head_up->extent (head_up, X_AXIS).length () /
-                           head_down->extent (head_down, X_AXIS).length ()) * 0.5;
-       }
+        {
+          wipe_ball = head_up;
+          dot_wipe_head = head_up;
+          /*
+            If upper head is eighth note or shorter, and lower head is half note,
+            shift by the difference between the open and filled note head widths,
+            otherwise upper stem will be misaligned slightly.
+          */
+          if (Stem::duration_log (stems[DOWN]) == 1
+              && Stem::duration_log (stems[UP]) >= 3)
+            shift_amount = (1 - head_up->extent (head_up, X_AXIS).length ()
+                            / head_down->extent (head_down, X_AXIS).length ()) * 0.5;
+        }
 
       if (dot_wipe_head)
-       {
-         if (Grob *d = unsmob_grob (dot_wipe_head->get_object ("dot")))
-           d->suicide ();
-       }
+        {
+          if (Grob *d = unsmob_grob (dot_wipe_head->get_object ("dot")))
+            d->suicide ();
+        }
 
       if (wipe_ball && wipe_ball->is_live ())
-       wipe_ball->set_property ("transparent", SCM_BOOL_T);
+        wipe_ball->set_property ("transparent", SCM_BOOL_T);
     }
   /* TODO: these numbers are magic; should devise a set of grob props
      to tune this behavior. */
@@ -276,19 +275,18 @@ check_meshing_chords (Grob *me,
     shift_amount *= 0.17;
 
   /*
-
   */
   if (full_collide
-      && down_ball_type * up_ball_type == 0)
+      && down_ball_type *up_ball_type == 0)
     {
       if (up_ball_type == 0 && down_ball_type == 1)
-       shift_amount *= 1.25;
+        shift_amount *= 1.25;
       else if (up_ball_type == 0 && down_ball_type == 2)
-       shift_amount *= 1.35;
+        shift_amount *= 1.35;
       else if (down_ball_type == 0 && up_ball_type == 1)
-       shift_amount *= 0.7;
+        shift_amount *= 0.7;
       else if (down_ball_type == 0 && up_ball_type == 2)
-       shift_amount *= 0.75;
+        shift_amount *= 0.75;
     }
 
   /*
@@ -305,20 +303,20 @@ check_meshing_chords (Grob *me,
     {
       Grob *staff = Staff_symbol_referencer::get_staff_symbol (me);
       if (!Staff_symbol_referencer::on_line (staff, ups[0]))
-       {
-         /*
-           TODO: consider junking the else body.
-         */
-         if (to_boolean (me->get_property ("prefer-dotted-right")))
-           shift_amount = 0.5;
-         else
-           {
-             Grob *d = unsmob_grob (head_up->get_object ("dot"));
-             Grob *parent = d->get_parent (X_AXIS);
-             if (Dot_column::has_interface (parent))
-               Side_position_interface::add_support (parent, head_down);
-           }
-       }
+        {
+          /*
+            TODO: consider junking the else body.
+          */
+          if (to_boolean (me->get_property ("prefer-dotted-right")))
+            shift_amount = 0.5;
+          else
+            {
+              Grob *d = unsmob_grob (head_up->get_object ("dot"));
+              Grob *parent = d->get_parent (X_AXIS);
+              if (Dot_column::has_interface (parent))
+                Side_position_interface::add_support (parent, head_down);
+            }
+        }
     }
 
   /* For full or close half collisions, the right hand head may
@@ -331,35 +329,34 @@ check_meshing_chords (Grob *me,
       Grob *parent = d->get_parent (X_AXIS);
 
       /*
-       FIXME:
+        FIXME:
 
-       |
-       x . o
-       |
+        |
+        x . o
+        |
 
 
-       the . is put right of o which is erroneous o force-shifted
-       far to the right.
+        the . is put right of o which is erroneous o force-shifted
+        far to the right.
       */
       if (Dot_column::has_interface (parent))
-       {
-         Grob *stem = unsmob_grob (head_up->get_object ("stem"));
-         extract_grob_set (stem, "note-heads", heads);
-         for (vsize i = 0; i < heads.size (); i++)
-           Side_position_interface::add_support (parent, heads[i]);
-       }
+        {
+          Grob *stem = unsmob_grob (head_up->get_object ("stem"));
+          extract_grob_set (stem, "note-heads", heads);
+          for (vsize i = 0; i < heads.size (); i++)
+            Side_position_interface::add_support (parent, heads[i]);
+        }
     }
 
   Direction d = UP;
   do
     {
       for (vsize i = 0; i < clash_groups[d].size (); i++)
-       (*offsets)[d][i] += d * shift_amount;
+        (*offsets)[d][i] += d * shift_amount;
     }
   while ((flip (&d)) != UP);
 }
 
-
 MAKE_SCHEME_CALLBACK (Note_collision_interface, calc_positioning_done, 1)
 SCM
 Note_collision_interface::calc_positioning_done (SCM smob)
@@ -367,18 +364,18 @@ Note_collision_interface::calc_positioning_done (SCM smob)
   Grob *me = unsmob_grob (smob);
   me->set_property ("positioning-done", SCM_BOOL_T);
 
-  Drul_array<vector<Grob*> > clash_groups = get_clash_groups (me);
+  Drul_array<vector<Grob *> > clash_groups = get_clash_groups (me);
 
   Direction d = UP;
   do
     {
-      for (vsize i = clash_groups[d].size (); i--; )
-       {
-         /*
-           Trigger positioning
-         */
-         clash_groups[d][i]->extent (me, X_AXIS);
-       }
+      for (vsize i = clash_groups[d].size (); i--;)
+        {
+          /*
+            Trigger positioning
+          */
+          clash_groups[d][i]->extent (me, X_AXIS);
+        }
     }
   while (flip (&d) != UP);
 
@@ -389,16 +386,16 @@ Note_collision_interface::calc_positioning_done (SCM smob)
   do
     {
       if (clash_groups[d].size ())
-       {
-         Grob *h = clash_groups[d][0];
-         Grob *fh = Note_column::first_head (h);
-         if (fh)
-           wid = fh->extent (h, X_AXIS).length ();
-       }
+        {
+          Grob *h = clash_groups[d][0];
+          Grob *fh = Note_column::first_head (h);
+          if (fh)
+            wid = fh->extent (h, X_AXIS).length ();
+        }
     }
   while (flip (&d) != UP);
 
-  vector<Grob*> done;
+  vector<Grob *> done;
   Real left_most = 1e6;
 
   vector<Real> amounts;
@@ -410,7 +407,7 @@ Note_collision_interface::calc_positioning_done (SCM smob)
       done.push_back (s);
       amounts.push_back (amount);
       if (amount < left_most)
-       left_most = amount;
+        left_most = amount;
     }
   for (; scm_is_pair (autos); autos = scm_cdr (autos))
     {
@@ -419,12 +416,12 @@ Note_collision_interface::calc_positioning_done (SCM smob)
 
       vsize x = find (done, s) - done.begin ();
       if (x == VPOS || x >= done.size ())
-       {
-         done.push_back (s);
-         amounts.push_back (amount);
-         if (amount < left_most)
-           left_most = amount;
-       }
+        {
+          done.push_back (s);
+          amounts.push_back (amount);
+          if (amount < left_most)
+            left_most = amount;
+        }
     }
 
   for (vsize i = 0; i < amounts.size (); i++)
@@ -433,28 +430,28 @@ Note_collision_interface::calc_positioning_done (SCM smob)
   return SCM_BOOL_T;
 }
 
-Drul_array < vector<Grob*> >
+Drul_array < vector<Grob *> >
 Note_collision_interface::get_clash_groups (Grob *me)
 {
-  Drul_array<vector<Grob*> > clash_groups;
+  Drul_array<vector<Grob *> > clash_groups;
 
   extract_grob_set (me, "elements", elements);
   for (vsize i = 0; i < elements.size (); i++)
     {
       Grob *se = elements[i];
       if (Note_column::has_interface (se))
-       {
-         if (!Note_column::dir (se))
-           se->programming_error ("note-column has no direction");
-         else
-           clash_groups[Note_column::dir (se)].push_back (se);
-       }
+        {
+          if (!Note_column::dir (se))
+            se->programming_error ("note-column has no direction");
+          else
+            clash_groups[Note_column::dir (se)].push_back (se);
+        }
     }
 
   Direction d = UP;
   do
     {
-      vector<Grob*> &clashes (clash_groups[d]);
+      vector<Grob *> &clashes (clash_groups[d]);
       vector_sort (clashes, Note_column::shift_less);
     }
   while ((flip (&d)) != UP);
@@ -468,7 +465,7 @@ Note_collision_interface::get_clash_groups (Grob *me)
 */
 SCM
 Note_collision_interface::automatic_shift (Grob *me,
-                                          Drul_array<vector<Grob*> > clash_groups)
+                                           Drul_array<vector<Grob *> > clash_groups)
 {
   Drul_array < vector<int> > shifts;
   SCM tups = SCM_EOL;
@@ -477,27 +474,27 @@ Note_collision_interface::automatic_shift (Grob *me,
   do
     {
       vector<int> &shift (shifts[d]);
-      vector<Grob*> &clashes (clash_groups[d]);
+      vector<Grob *> &clashes (clash_groups[d]);
 
       for (vsize i = 0; i < clashes.size (); i++)
-       {
-         SCM sh
-           = clashes[i]->get_property ("horizontal-shift");
+        {
+          SCM sh
+            = clashes[i]->get_property ("horizontal-shift");
 
-         if (scm_is_number (sh))
-           shift.push_back (scm_to_int (sh));
-         else
-           shift.push_back (0);
-       }
+          if (scm_is_number (sh))
+            shift.push_back (scm_to_int (sh));
+          else
+            shift.push_back (0);
+        }
 
       for (vsize i = 1; i < shift.size (); i++)
-       {
-         if (shift[i - 1] == shift[i])
-           {
-             clashes[0]->warning (_ ("ignoring too many clashing note columns"));
-             return tups;
-           }
-       }
+        {
+          if (shift[i - 1] == shift[i])
+            {
+              clashes[0]->warning (_ ("ignoring too many clashing note columns"));
+              return tups;
+            }
+        }
     }
   while ((flip (&d)) != UP);
 
@@ -507,13 +504,13 @@ Note_collision_interface::automatic_shift (Grob *me,
   do
     {
       for (vsize i = 0; i < clash_groups[d].size (); i++)
-       {
-         Slice s (Note_column::head_positions_interval (clash_groups[d][i]));
-         s[LEFT]--;
-         s[RIGHT]++;
-         extents[d].push_back (s);
-         offsets[d].push_back (d * 0.5 * i);
-       }
+        {
+          Slice s (Note_column::head_positions_interval (clash_groups[d][i]));
+          s[LEFT]--;
+          s[RIGHT]++;
+          extents[d].push_back (s);
+          offsets[d].push_back (d * 0.5 * i);
+        }
     }
   while ((flip (&d)) != UP);
 
@@ -529,18 +526,17 @@ Note_collision_interface::automatic_shift (Grob *me,
   do
     {
       for (vsize i = 1; i < clash_groups[d].size (); i++)
-       {
-         Slice prev = extents[d][i - 1];
-         prev.intersect (extents[d][i]);
-         if (prev.length () > 0
-             || (extents[-d].size () && d * (extents[d][i][-d] - extents[-d][0][d]) < 0))
-           for (vsize j = i; j < clash_groups[d].size (); j++)
-             offsets[d][j] += d * 0.5;
-       }
+        {
+          Slice prev = extents[d][i - 1];
+          prev.intersect (extents[d][i]);
+          if (prev.length () > 0
+              || (extents[-d].size () && d * (extents[d][i][-d] - extents[-d][0][d]) < 0))
+            for (vsize j = i; j < clash_groups[d].size (); j++)
+              offsets[d][j] += d * 0.5;
+        }
     }
   while ((flip (&d)) != UP);
 
-
   /*
     see input/regression/dot-up-voice-collision.ly
   */
@@ -550,11 +546,11 @@ Note_collision_interface::automatic_shift (Grob *me,
       Grob *dc = Note_column::dot_column (g);
 
       if (dc)
-       for (vsize j = i + 1;  j < clash_groups[UP].size (); j++)
-         {
-           Grob *stem = Note_column::get_stem (clash_groups[UP][j]);
-           Side_position_interface::add_support (dc, stem);
-         }
+        for (vsize j = i + 1; j < clash_groups[UP].size (); j++)
+          {
+            Grob *stem = Note_column::get_stem (clash_groups[UP][j]);
+            Side_position_interface::add_support (dc, stem);
+          }
     }
 
   /*
@@ -566,9 +562,9 @@ Note_collision_interface::automatic_shift (Grob *me,
   do
     {
       for (vsize i = 0; i < clash_groups[d].size (); i++)
-       tups = scm_cons (scm_cons (clash_groups[d][i]->self_scm (),
-                                  scm_from_double (offsets[d][i])),
-                        tups);
+        tups = scm_cons (scm_cons (clash_groups[d][i]->self_scm (),
+                                   scm_from_double (offsets[d][i])),
+                         tups);
     }
   while (flip (&d) != UP);
 
@@ -587,8 +583,8 @@ Note_collision_interface::forced_shift (Grob *me)
 
       SCM force = se->get_property ("force-hshift");
       if (scm_is_number (force))
-       tups = scm_cons (scm_cons (se->self_scm (), force),
-                        tups);
+        tups = scm_cons (scm_cons (se->self_scm (), force),
+                         tups);
     }
   return tups;
 }
@@ -601,15 +597,15 @@ Note_collision_interface::add_column (Grob *me, Grob *ncol)
 }
 
 ADD_INTERFACE (Note_collision_interface,
-              "An object that handles collisions between notes with"
-              " different stem directions and horizontal shifts.  Most of"
-              " the interesting properties are to be set in"
-              " @ref{note-column-interface}: these are @code{force-hshift}"
-              " and @code{horizontal-shift}.",
-
-              /* properties */
-              "merge-differently-dotted "
-              "merge-differently-headed "
-              "positioning-done "
-              "prefer-dotted-right "
-              );
+               "An object that handles collisions between notes with"
+               " different stem directions and horizontal shifts.  Most of"
+               " the interesting properties are to be set in"
+               " @ref{note-column-interface}: these are @code{force-hshift}"
+               " and @code{horizontal-shift}.",
+
+               /* properties */
+               "merge-differently-dotted "
+               "merge-differently-headed "
+               "positioning-done "
+               "prefer-dotted-right "
+              );
index bf76ce9112862883e2c995d2e1aeae4f1470647b..136c9d3062989bfae154777e8048f42dd8168bd1 100644 (file)
 
   LilyPond is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "note-column.hh"
@@ -22,9 +22,9 @@
 #include "grob.hh"
 
 LY_DEFINE (ly_note_column_accidentals, "ly:note-column-accidentals",
-          1, 0, 0, (SCM note_column),
-          "Return the @code{AccidentalPlacement} grob from @var{note-column}"
-          " if any, or @code{SCM_EOL} otherwise.")
+           1, 0, 0, (SCM note_column),
+           "Return the @code{AccidentalPlacement} grob from @var{note-column}"
+           " if any, or @code{SCM_EOL} otherwise.")
 {
   Grob *grob = unsmob_grob (note_column);
   LY_ASSERT_SMOB (Grob, note_column, 1);
@@ -35,9 +35,9 @@ LY_DEFINE (ly_note_column_accidentals, "ly:note-column-accidentals",
 }
 
 LY_DEFINE (ly_note_column_dot_column, "ly:note-column-dot-column",
-          1, 0, 0, (SCM note_column),
-          "Return the @code{DotColumn} grob from @var{note-column}"
-          " if any, or @code{SCM_EOL} otherwise.")
+           1, 0, 0, (SCM note_column),
+           "Return the @code{DotColumn} grob from @var{note-column}"
+           " if any, or @code{SCM_EOL} otherwise.")
 {
   Grob *grob = unsmob_grob (note_column);
   LY_ASSERT_SMOB (Grob, note_column, 1);
index 2ba81c66c47b0349865a459ff3e12b630c72b1e2..a49c41b1346dc5ea0b8db014eac8ae1b5dd858fc 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "note-column.hh"
 
-#include <cmath>               // ceil
+#include <cmath>                // ceil
 using namespace std;
 
 #include "accidental-placement.hh"
@@ -92,7 +92,7 @@ Note_column::dir (Grob *me)
     {
       extract_grob_set (me, "note-heads", heads);
       if (heads.size ())
-       return (Direction)sign (head_positions_interval (me).center ());
+        return (Direction)sign (head_positions_interval (me).center ());
     }
 
   programming_error ("note column without heads and stem");
@@ -120,14 +120,14 @@ Note_column::add_head (Grob *me, Grob *h)
     {
       extract_grob_set (me, "note-heads", heads);
       if (heads.size ())
-       both = true;
+        both = true;
       else
-       me->set_object ("rest", h->self_scm ());
+        me->set_object ("rest", h->self_scm ());
     }
   else if (Note_head::has_interface (h))
     {
       if (unsmob_grob (me->get_object ("rest")))
-       both = true;
+        both = true;
       Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-heads"), h);
     }
 
@@ -157,7 +157,7 @@ Note_column::accidentals (Grob *me)
       Grob *h = heads[i];
       acc = h ? unsmob_grob (h->get_object ("accidental-grob")) : 0;
       if (acc)
-       break;
+        break;
     }
 
   if (!acc)
@@ -178,7 +178,7 @@ Note_column::dot_column (Grob *me)
     {
       Grob *dots = unsmob_grob (heads[i]->get_object ("dot"));
       if (dots)
-       return dots->get_parent (X_AXIS);
+        return dots->get_parent (X_AXIS);
     }
 
   return 0;
@@ -205,15 +205,15 @@ Note_column::cross_staff_extent (Grob *me, Grob *refp)
 }
 
 ADD_INTERFACE (Note_column,
-              "Stem and noteheads combined.",
-
-              /* properties */
-              "arpeggio "
-              "force-hshift "
-              "horizontal-shift "
-              "ignore-collision "
-              "note-heads "
-              "rest "
-              "rest-collision "
-              "stem "
-              );
+               "Stem and noteheads combined.",
+
+               /* properties */
+               "arpeggio "
+               "force-hshift "
+               "horizontal-shift "
+               "ignore-collision "
+               "note-heads "
+               "rest "
+               "rest-collision "
+               "stem "
+              );
index 2d41d107583357406947341d1ed5febdb9d8a912..9298b72db9581509efaeceff733417988fd35b89 100644 (file)
@@ -27,7 +27,6 @@
 #include "spanner.hh"
 #include "item.hh"
 
-
 /**
    Create line-spanner grobs for lines that connect note heads.
 
@@ -91,7 +90,7 @@ Note_head_line_engraver::process_acknowledged ()
       Should probably store follow_ in line_, and suicide at some
       later point */
       if (follow_)
-       line_ = make_spanner ("VoiceFollower", head_->self_scm ());
+        line_ = make_spanner ("VoiceFollower", head_->self_scm ());
 
       line_->set_bound (LEFT, last_head_);
       line_->set_bound (RIGHT, head_);
@@ -113,18 +112,18 @@ Note_head_line_engraver::stop_translation_timestep ()
 
 ADD_ACKNOWLEDGER (Note_head_line_engraver, rhythmic_head);
 ADD_TRANSLATOR (Note_head_line_engraver,
-               /* doc */
-               "Engrave a line between two note heads, for example a"
-               " glissando.  If @code{followVoice} is set, staff switches"
-               " also generate a line.",
+                /* doc */
+                "Engrave a line between two note heads, for example a"
+                " glissando.  If @code{followVoice} is set, staff switches"
+                " also generate a line.",
 
-               /* create */
-               "Glissando "
-               "VoiceFollower ",
+                /* create */
+                "Glissando "
+                "VoiceFollower ",
 
-               /* read */
-               "followVoice ",
+                /* read */
+                "followVoice ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 6698973339862204a3b1c04cc6f43162c211a98d..0277b65b2680d21bae1f269ec4449a619b56e6d4 100644 (file)
 #include "note-head.hh"
 #include "font-metric.hh"
 
-
 LY_DEFINE (ly_note_head__stem_attachment, "ly:note-head::stem-attachment",
-         2, 0, 0, (SCM font_metric, SCM glyph_name),
-         "Get attachment in @var{font-metric} for attaching a stem to"
-         " notehead @var{glyph-name}.")
+           2, 0, 0, (SCM font_metric, SCM glyph_name),
+           "Get attachment in @var{font-metric} for attaching a stem to"
+           " notehead @var{glyph-name}.")
 {
   LY_ASSERT_SMOB (Font_metric, font_metric, 1);
   Font_metric *fm = unsmob_metrics (font_metric);
   LY_ASSERT_TYPE (scm_is_string, glyph_name, 2);
-  
+
   return ly_offset2scm (Note_head::get_stem_attachment (fm, ly_scm2string (glyph_name)));
 }
 
index aeb7b4a19bd395bb730178820fcf5c8d150127df..614ba547ad42d27fd46622ca75084ac18a1f2c08 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <cmath>
 #include <cctype>
-#include <algorithm>           //  min, max
+#include <algorithm>            //  min, max
 
 using namespace std;
 
@@ -45,7 +45,7 @@ internal_print (Grob *me, string *font_char)
     {
       SCM gn = me->get_property ("glyph-name");
       if (scm_is_string (gn))
-       suffix = ly_scm2string (gn);
+        suffix = ly_scm2string (gn);
     }
 
   Font_metric *fm = Font_interface::get_default_font (me);
@@ -61,20 +61,19 @@ internal_print (Grob *me, string *font_char)
 
       Grob *stem = unsmob_grob (me->get_object ("stem"));
       Direction stem_dir = stem ? get_grob_direction (stem) : CENTER;
-      
+
       if (stem_dir == CENTER)
-       programming_error ("must have stem dir for note head");
-      
-      idx_directed = idx_either =
-       prefix + ((stem_dir == UP) ? "u" : "d") + suffix;
+        programming_error ("must have stem dir for note head");
+
+      idx_directed = idx_either
+                     = prefix + ((stem_dir == UP) ? "u" : "d") + suffix;
       out = fm->find_by_name (idx_directed);
     }
 
-
   if (out.is_empty ())
     {
       me->warning (_f ("none of note heads `%s' or `%s' found",
-                      idx_symmetric.c_str (), idx_directed.c_str ()));
+                       idx_symmetric.c_str (), idx_directed.c_str ()));
       out = Stencil (Box (Interval (0, 0), Interval (0, 0)), SCM_EOL);
     }
   else
@@ -84,7 +83,7 @@ internal_print (Grob *me, string *font_char)
 }
 
 /*
-  TODO: make stem X-parent of notehead. 
+  TODO: make stem X-parent of notehead.
  */
 MAKE_SCHEME_CALLBACK (Note_head, stem_x_shift, 1);
 SCM
@@ -126,7 +125,7 @@ Note_head::include_ledger_line_height (SCM smob)
       // the interval between the note and the first ledger line, not
       // the whole interval between the note and the staff.
       Interval iv (min (0.0, lines[UP] - my_ext[DOWN] + 1),
-                  max (0.0, lines[DOWN] - my_ext[UP] - 1));
+                   max (0.0, lines[DOWN] - my_ext[UP] - 1));
       return ly_interval2scm (iv);
     }
 
@@ -137,8 +136,8 @@ Real
 Note_head::stem_attachment_coordinate (Grob *me, Axis a)
 {
   Offset off = robust_scm2offset (me->get_property ("stem-attachment"),
-                                 Offset (0,0));
-  
+                                  Offset (0, 0));
+
   return off [a];
 }
 
@@ -146,22 +145,22 @@ Offset
 Note_head::get_stem_attachment (Font_metric *fm, string key)
 {
   Offset att;
-  
+
   int k = fm->name_to_index (key);
   if (k >= 0)
     {
       Box b = fm->get_indexed_char_dimensions (k);
       Offset wxwy = fm->attachment_point (key);
-      for (int i = X_AXIS ; i < NO_AXES; i++)
-       {
-         Axis a = Axis (i);
-         
-         Interval v = b[a];
-         if (!v.is_empty ())
-           {
-             att[a] = (2 * (wxwy[a] - v.center ()) / v.length ());
-           }
-       }
+      for (int i = X_AXIS; i < NO_AXES; i++)
+        {
+          Axis a = Axis (i);
+
+          Interval v = b[a];
+          if (!v.is_empty ())
+            {
+              att[a] = (2 * (wxwy[a] - v.center ()) / v.length ());
+            }
+        }
     }
 
   return att;
@@ -171,7 +170,7 @@ MAKE_SCHEME_CALLBACK (Note_head, calc_stem_attachment, 1);
 SCM
 Note_head::calc_stem_attachment (SCM smob)
 {
-  Grob *me  = unsmob_grob (smob);
+  Grob *me = unsmob_grob (smob);
   Font_metric *fm = Font_interface::get_default_font (me);
   string key;
   internal_print (me, &key);
@@ -179,17 +178,16 @@ Note_head::calc_stem_attachment (SCM smob)
   return ly_offset2scm (get_stem_attachment (fm, key));
 }
 
-
 ADD_INTERFACE (Note_head,
-              "A note head.  There are many possible values for"
-              " @code{style}.  For a complete list, see"
-              " @ruser{Note head styles}.",
-
-              /* properties */
-              "note-names "
-              "accidental-grob "
-              "glyph-name "
-              "stem-attachment "
-              "style "
-              );
+               "A note head.  There are many possible values for"
+               " @code{style}.  For a complete list, see"
+               " @ruser{Note head styles}.",
+
+               /* properties */
+               "note-names "
+               "accidental-grob "
+               "glyph-name "
+               "stem-attachment "
+               "style "
+              );
 
index 4aa97dd4b90c62666feb682274a967c38c536aa7..2e584539d6de149e951a56e6c70da48dd923f17e 100644 (file)
@@ -73,45 +73,45 @@ Note_heads_engraver::process_music ()
 #if 0 /* TODO: should have a mechanism to switch off these warnings. */
 
       if (!pit)
-       ev->origin ()->warning (_ ("NoteEvent without pitch"));
+        ev->origin ()->warning (_ ("NoteEvent without pitch"));
 #endif
 
       int pos;
       if (pit == 0)
-       pos = 0;
+        pos = 0;
       else if (ly_is_procedure (layout_proc))
-       {
-         SCM pitch = ev->get_property ("pitch");
-         pos = scm_to_int (scm_call_1 (layout_proc, pitch));
-       }
+        {
+          SCM pitch = ev->get_property ("pitch");
+          pos = scm_to_int (scm_call_1 (layout_proc, pitch));
+        }
       else
-       pos = pit->steps ();
+        pos = pit->steps ();
 
       if (scm_is_number (c0))
-       pos += scm_to_int (c0);
+        pos += scm_to_int (c0);
 
       note->set_property ("staff-position", scm_from_int (pos));
 
       /*
-       Shape note heads change on step of the scale.
+        Shape note heads change on step of the scale.
       */
       SCM shape_vector = get_property ("shapeNoteStyles");
       if (scm_is_vector (shape_vector))
-       {
-         SCM scm_tonic = get_property ("tonic");
-         Pitch tonic (0, 0, 0);
-         if (unsmob_pitch (scm_tonic))
-           tonic = *unsmob_pitch (scm_tonic);
-
-         unsigned int delta = (pit->get_notename () - tonic.get_notename () + 7) % 7;
-
-         SCM style = SCM_EOL;
-         if (scm_c_vector_length (shape_vector) > delta
-             && scm_is_symbol (scm_vector_ref (shape_vector, scm_from_int (delta))))
-           style = scm_vector_ref (shape_vector, scm_from_int (delta));
-         if (scm_is_symbol (style))
-           note->set_property ("style", style);
-       }
+        {
+          SCM scm_tonic = get_property ("tonic");
+          Pitch tonic (0, 0, 0);
+          if (unsmob_pitch (scm_tonic))
+            tonic = *unsmob_pitch (scm_tonic);
+
+          unsigned int delta = (pit->get_notename () - tonic.get_notename () + 7) % 7;
+
+          SCM style = SCM_EOL;
+          if (scm_c_vector_length (shape_vector) > delta
+              && scm_is_symbol (scm_vector_ref (shape_vector, scm_from_int (delta))))
+            style = scm_vector_ref (shape_vector, scm_from_int (delta));
+          if (scm_is_symbol (style))
+            note->set_property ("style", style);
+        }
     }
 }
 
@@ -122,16 +122,16 @@ Note_heads_engraver::stop_translation_timestep ()
 }
 
 ADD_TRANSLATOR (Note_heads_engraver,
-               /* doc */
-               "Generate note heads.",
+                /* doc */
+                "Generate note heads.",
 
-               /* create */
-               "NoteHead ",
+                /* create */
+                "NoteHead ",
 
-               /* read */
-               "middleCPosition "
-               "staffLineLayoutFunction ",
+                /* read */
+                "middleCPosition "
+                "staffLineLayoutFunction ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index d2a6b91535c58397d86b44223ffda6973418837a..e646d2ad29612b162c3e7ac75c9db6a1ccec7446 100644 (file)
@@ -49,11 +49,11 @@ Note_name_engraver::process_music ()
   for (vsize i = 0; i < events_.size (); i++)
     {
       if (i)
-       s += " ";
+        s += " ";
       Pitch p = *unsmob_pitch (events_[i]->get_property ("pitch"));
 
       if (!to_boolean (get_property ("printOctaveNames")))
-       p = Pitch (-1, p.get_notename (), p.get_alteration ());
+        p = Pitch (-1, p.get_notename (), p.get_alteration ());
 
       s += p.to_string ();
     }
@@ -75,15 +75,15 @@ Note_name_engraver::Note_name_engraver ()
 }
 
 ADD_TRANSLATOR (Note_name_engraver,
-               /* doc */
-               "Print pitches as words.",
+                /* doc */
+                "Print pitches as words.",
 
-               /* create */
-               "NoteName ",
+                /* create */
+                "NoteName ",
 
-               /* read */
-               "printOctaveNames ",
+                /* read */
+                "printOctaveNames ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index ff3f5b3f816a2212886c726e6a3a98c0b218e04c..ce5c822fb43140b208c4b49d2a0ab98f99faa4f7 100644 (file)
@@ -37,13 +37,12 @@ protected:
 
   DECLARE_TRANSLATOR_LISTENER (note);
 private:
-  vector<Stream_event*> note_evs_;
-  vector<Audio_note*> notes_;
+  vector<Stream_event *> note_evs_;
+  vector<Audio_note *> notes_;
 
-
-  vector<Audio_note*> last_notes_;
+  vector<Audio_note *> last_notes_;
   Moment last_start_;
-  
+
 };
 
 void
@@ -57,48 +56,48 @@ Note_performer::process_music ()
   if (unsmob_pitch (prop))
     transposing = *unsmob_pitch (prop);
 
-  for (vsize i = 0; i < note_evs_.size (); i ++)
+  for (vsize i = 0; i < note_evs_.size (); i++)
     {
       Stream_event *n = note_evs_[i];
       SCM pit = n->get_property ("pitch");
 
       if (Pitch *pitp = unsmob_pitch (pit))
-       {
-         SCM articulations = n->get_property ("articulations");
-         Stream_event *tie_event = 0;
-         for (SCM s = articulations;
-              !tie_event && scm_is_pair (s);
-              s = scm_cdr (s))
-           {
-             Stream_event *ev = unsmob_stream_event (scm_car (s));
-             if (!ev)
-               continue;
-         
-             if (ev->in_event_class ("tie-event"))
-               tie_event = ev;
-           }
-
-         Moment len = get_event_length (n, now_mom ());
-         
-         Audio_note *p = new Audio_note (*pitp, len, 
-                                         tie_event, transposing.negated ());
-         Audio_element_info info (p, n);
-         announce_element (info);
-         notes_.push_back (p);
-
-         /*
-           shorten previous note.
-          */
-         if (now_mom ().grace_part_)
-           {
-             if (last_start_.grace_part_ == Rational (0))
-               {
-                 for (vsize i = 0; i < last_notes_.size (); i++)
-                   last_notes_[i]->length_mom_ += Moment (0,
-                                                          now_mom().grace_part_);
-               }
-           }
-       }
+        {
+          SCM articulations = n->get_property ("articulations");
+          Stream_event *tie_event = 0;
+          for (SCM s = articulations;
+               !tie_event && scm_is_pair (s);
+               s = scm_cdr (s))
+            {
+              Stream_event *ev = unsmob_stream_event (scm_car (s));
+              if (!ev)
+                continue;
+
+              if (ev->in_event_class ("tie-event"))
+                tie_event = ev;
+            }
+
+          Moment len = get_event_length (n, now_mom ());
+
+          Audio_note *p = new Audio_note (*pitp, len,
+                                          tie_event, transposing.negated ());
+          Audio_element_info info (p, n);
+          announce_element (info);
+          notes_.push_back (p);
+
+          /*
+            shorten previous note.
+           */
+          if (now_mom ().grace_part_)
+            {
+              if (last_start_.grace_part_ == Rational (0))
+                {
+                  for (vsize i = 0; i < last_notes_.size (); i++)
+                    last_notes_[i]->length_mom_ += Moment (0,
+                                                           now_mom ().grace_part_);
+                }
+            }
+        }
     }
 }
 
@@ -123,18 +122,18 @@ Note_performer::listen_note (Stream_event *ev)
 }
 
 ADD_TRANSLATOR (Note_performer,
-               /* doc */
-               "",
+                /* doc */
+                "",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
 
 Note_performer::Note_performer ()
 {
index 761e01aa0b8d38816f3368f3f4dd05399ee4f5f1..3608a6b1eddbace400d2ef3e24d752f5a8522a95 100644 (file)
 
 class Note_spacing_engraver : public Engraver
 {
-  typedef map <Context*, Grob*> Last_spacing_map;
+  typedef map <Context *, Grob *> Last_spacing_map;
   Last_spacing_map last_spacings_;
   Grob *last_spacing_;
-  
+
   Grob *spacing_;
 
   void add_spacing_item (Grob *);
@@ -68,21 +68,20 @@ Note_spacing_engraver::add_spacing_item (Grob *g)
     {
       spacing_ = make_item ("NoteSpacing", g->self_scm ());
     }
-  
+
   if (spacing_)
     {
       Pointer_group_interface::add_grob (spacing_,
-                                        ly_symbol2scm ("left-items"),
-                                        g);
+                                         ly_symbol2scm ("left-items"),
+                                         g);
 
       if (last_spacing_)
-       Pointer_group_interface::add_grob (last_spacing_,
-                                          ly_symbol2scm ("right-items"),
-                                          g);
+        Pointer_group_interface::add_grob (last_spacing_,
+                                           ly_symbol2scm ("right-items"),
+                                           g);
     }
 }
 
-
 void
 Note_spacing_engraver::acknowledge_note_column (Grob_info gi)
 {
@@ -104,11 +103,11 @@ Note_spacing_engraver::finalize ()
   if (last_spacing
       && !unsmob_grob_array (last_spacing->get_object ("right-items")))
     {
-      Grob *col  = unsmob_grob (get_property ("currentCommandColumn"));
-      
+      Grob *col = unsmob_grob (get_property ("currentCommandColumn"));
+
       Pointer_group_interface::add_grob (last_spacing,
-                                        ly_symbol2scm ("right-items"),
-                                        col);
+                                         ly_symbol2scm ("right-items"),
+                                         col);
     }
 }
 
@@ -123,10 +122,10 @@ Note_spacing_engraver::stop_translation_timestep ()
     {
       Grob *col = unsmob_grob (get_property ("currentCommandColumn"));
       Pointer_group_interface::add_grob (last_spacing,
-                                        ly_symbol2scm ("right-items"),
-                                        col);
+                                         ly_symbol2scm ("right-items"),
+                                         col);
     }
-  
+
   if (spacing_)
     {
       last_spacings_[parent] = spacing_;
@@ -140,16 +139,16 @@ ADD_ACKNOWLEDGER (Note_spacing_engraver, note_column);
 ADD_ACKNOWLEDGER (Note_spacing_engraver, rhythmic_grob);
 
 ADD_TRANSLATOR (Note_spacing_engraver,
-               /* doc */
-               "Generate @code{NoteSpacing}, an object linking horizontal"
-               " lines for use in spacing.",
+                /* doc */
+                "Generate @code{NoteSpacing}, an object linking horizontal"
+                " lines for use in spacing.",
 
-               /* create */
-               "NoteSpacing ",
+                /* create */
+                "NoteSpacing ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 73faa02100bd0ea2782c2f4cc5e6e0a2c34ac8c2..8153af96358c37f99438cfb31fa31eb2d5a21fd2 100644 (file)
@@ -41,7 +41,7 @@
 
 Spring
 Note_spacing::get_spacing (Grob *me, Item *right_col,
-                          Real base_space, Real increment)
+                           Real base_space, Real increment)
 {
   vector<Item *> note_columns = Spacing_interface::left_note_columns (me);
   Real left_head_end = 0;
@@ -53,19 +53,19 @@ Note_spacing::get_spacing (Grob *me, Item *right_col,
       Grob *col = note_columns[i]->get_column ();
 
       if (!g)
-       g = Note_column::first_head (note_columns[i]);
+        g = Note_column::first_head (note_columns[i]);
 
       /*
-       Ugh. If Stem is switched off, we don't know what the
-       first note head will be.
+        Ugh. If Stem is switched off, we don't know what the
+        first note head will be.
       */
       if (g)
-       {
-         if (g->common_refpoint (col, X_AXIS) != col)
-           programming_error ("Note_spacing::get_spacing (): Common refpoint incorrect");
-         else
-           left_head_end = g->extent (col, X_AXIS)[RIGHT];
-       }
+        {
+          if (g->common_refpoint (col, X_AXIS) != col)
+            programming_error ("Note_spacing::get_spacing (): Common refpoint incorrect");
+          else
+            left_head_end = g->extent (col, X_AXIS)[RIGHT];
+        }
     }
 
   /*
@@ -90,17 +90,17 @@ Note_spacing::get_spacing (Grob *me, Item *right_col,
       && to_boolean (me->get_property ("space-to-barline")))
     {
       Grob *bar = Pointer_group_interface::find_grob (right_col,
-                                                     ly_symbol2scm ("elements"),
-                                                     Bar_line::non_empty_barline);
+                                                      ly_symbol2scm ("elements"),
+                                                      Bar_line::non_empty_barline);
 
       if (bar)
-       {
-         Real shift = bar->extent (right_col, X_AXIS)[LEFT];
-         ideal -= shift;
-         min_desired_space -= max (shift, 0.0);
-       }
+        {
+          Real shift = bar->extent (right_col, X_AXIS)[LEFT];
+          ideal -= shift;
+          min_desired_space -= max (shift, 0.0);
+        }
       else
-       ideal -= right_col->extent (right_col, X_AXIS)[RIGHT];
+        ideal -= right_col->extent (right_col, X_AXIS)[RIGHT];
     }
 
   ideal = max (ideal, min_desired_space);
@@ -127,19 +127,19 @@ knee_correction (Grob *note_spacing, Grob *right_stem, Real increment)
       head_extent = head->extent (rcolumn, X_AXIS);
 
       if (!head_extent.is_empty ())
-       note_head_width = head_extent[RIGHT];
+        note_head_width = head_extent[RIGHT];
 
       note_head_width -= Stem::thickness (right_stem);
     }
 
   return -note_head_width * get_grob_direction (right_stem)
-    * robust_scm2double (note_spacing->get_property ("knee-spacing-correction"), 0);
+         * robust_scm2double (note_spacing->get_property ("knee-spacing-correction"), 0);
 }
 
 static Real
 different_directions_correction (Grob *note_spacing,
-                                Drul_array<Interval> stem_posns,
-                                Direction left_stem_dir)
+                                 Drul_array<Interval> stem_posns,
+                                 Direction left_stem_dir)
 {
   Real ret = 0.0;
   Interval intersect = stem_posns[LEFT];
@@ -150,11 +150,11 @@ different_directions_correction (Grob *note_spacing,
       ret = abs (intersect.length ());
 
       /*
-       Ugh. 7 is hardcoded.
+        Ugh. 7 is hardcoded.
       */
       ret = min (ret / 7, 1.0)
-       * left_stem_dir
-       * robust_scm2double (note_spacing->get_property ("stem-spacing-correction"), 0);
+            * left_stem_dir
+            * robust_scm2double (note_spacing->get_property ("stem-spacing-correction"), 0);
     }
   return ret;
 }
@@ -204,14 +204,14 @@ same_direction_correction (Grob *note_spacing, Drul_array<Interval> head_posns)
 */
 void
 Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
-                                  Real increment,
-                                  Real *space, Real *fixed)
+                                   Real increment,
+                                   Real *space, Real *fixed)
 {
   Drul_array<Direction> stem_dirs (CENTER, CENTER);
   Drul_array<Interval> stem_posns;
   Drul_array<Interval> head_posns;
   Drul_array<SCM> props (me->get_object ("left-items"),
-                        me->get_object ("right-items"));
+                         me->get_object ("right-items"));
 
   Drul_array<Spanner *> beams_drul (0, 0);
   Drul_array<Grob *> stems_drul (0, 0);
@@ -226,8 +226,8 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
   bool acc_right = false;
 
   Grob *bar = Spacing_interface::extremal_break_aligned_grob (me, RIGHT,
-                                                             rcolumn->break_status_dir (),
-                                                             &bar_xextent);
+                                                              rcolumn->break_status_dir (),
+                                                              &bar_xextent);
   if (bar && dynamic_cast<Item *> (bar)->get_column () == rcolumn)
     bar_yextent = Staff_spacing::bar_y_positions (bar);
 
@@ -235,58 +235,58 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
     {
       vector<Grob *> const &items (ly_scm2link_array (props [d]));
       for (vsize i = 0; i < items.size (); i++)
-       {
-         Item *it = dynamic_cast<Item *> (items[i]);
-         if (!Note_column::has_interface (it))
-           continue;
-         if (d == RIGHT && it->get_column () != rcolumn)
-           continue;
-
-         /*
-           Find accidentals which are sticking out of the right side.
-         */
-         if (d == RIGHT)
-           acc_right = acc_right || Note_column::accidentals (it);
-
-         Grob *stem = Note_column::get_stem (it);
-
-         if (!stem || !stem->is_live () || Stem::is_invisible (stem))
-           return;
-
-         stems_drul[d] = stem;
-         beams_drul[d] = Stem::get_beam (stem);
-
-         Direction stem_dir = get_grob_direction (stem);
-         if (stem_dirs[d] && stem_dirs[d] != stem_dir)
-           return;
-
-         stem_dirs[d] = stem_dir;
-
-         /*
-           Correction doesn't seem appropriate  when there is a large flag
-           hanging from the note.
-         */
-         if (d == LEFT
-             && Stem::duration_log (stem) > 2 && !Stem::get_beam (stem))
-           return;
-
-         Interval hp = Stem::head_positions (stem);
-         if (!hp.is_empty ())
-           {
-             Real chord_start = hp[stem_dir];
-
-             /*
-               can't look at stem-end-position, since that triggers
-               beam slope computations.
-             */
-             Real stem_end = hp[stem_dir]
-               + stem_dir * robust_scm2double (stem->get_property ("length"), 7);
-
-             stem_posns[d] = Interval (min (chord_start, stem_end),
-                                       max (chord_start, stem_end));
-             head_posns[d].unite (hp);
-           }
-       }
+        {
+          Item *it = dynamic_cast<Item *> (items[i]);
+          if (!Note_column::has_interface (it))
+            continue;
+          if (d == RIGHT && it->get_column () != rcolumn)
+            continue;
+
+          /*
+            Find accidentals which are sticking out of the right side.
+          */
+          if (d == RIGHT)
+            acc_right = acc_right || Note_column::accidentals (it);
+
+          Grob *stem = Note_column::get_stem (it);
+
+          if (!stem || !stem->is_live () || Stem::is_invisible (stem))
+            return;
+
+          stems_drul[d] = stem;
+          beams_drul[d] = Stem::get_beam (stem);
+
+          Direction stem_dir = get_grob_direction (stem);
+          if (stem_dirs[d] && stem_dirs[d] != stem_dir)
+            return;
+
+          stem_dirs[d] = stem_dir;
+
+          /*
+            Correction doesn't seem appropriate  when there is a large flag
+            hanging from the note.
+          */
+          if (d == LEFT
+              && Stem::duration_log (stem) > 2 && !Stem::get_beam (stem))
+            return;
+
+          Interval hp = Stem::head_positions (stem);
+          if (!hp.is_empty ())
+            {
+              Real chord_start = hp[stem_dir];
+
+              /*
+                can't look at stem-end-position, since that triggers
+                beam slope computations.
+              */
+              Real stem_end = hp[stem_dir]
+                              + stem_dir * robust_scm2double (stem->get_property ("length"), 7);
+
+              stem_posns[d] = Interval (min (chord_start, stem_end),
+                                        max (chord_start, stem_end));
+              head_posns[d].unite (hp);
+            }
+        }
     }
   while (flip (&d) != LEFT);
 
@@ -302,24 +302,24 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
   if (stem_dirs[LEFT] * stem_dirs[RIGHT] == -1)
     {
       if (beams_drul[LEFT] && beams_drul[LEFT] == beams_drul[RIGHT])
-       {
-         correction = knee_correction (me, stems_drul[RIGHT], increment);
-         *fixed += correction;
-       }
+        {
+          correction = knee_correction (me, stems_drul[RIGHT], increment);
+          *fixed += correction;
+        }
       else
-       {
-         correction = different_directions_correction (me, stem_posns, stem_dirs[LEFT]);
+        {
+          correction = different_directions_correction (me, stem_posns, stem_dirs[LEFT]);
 
-         if (!bar_yextent.is_empty ())
-           correction *= 0.5;
-       }
+          if (!bar_yextent.is_empty ())
+            correction *= 0.5;
+        }
     }
   /*
     Only apply same direction correction if there are no
     accidentals sticking out of the right hand side.
   */
   else if (stem_dirs[LEFT] * stem_dirs[RIGHT] == 1
-          && !acc_right)
+           && !acc_right)
     correction = same_direction_correction (me, head_posns);
 
   *space += correction;
@@ -330,14 +330,14 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
 }
 
 ADD_INTERFACE (Note_spacing,
-              "This object calculates spacing wishes for individual voices.",
-
-              /* properties */
-              "knee-spacing-correction "
-              "left-items "
-              "right-items "
-              "same-direction-correction "
-              "stem-spacing-correction "
-              "space-to-barline "
-              );
+               "This object calculates spacing wishes for individual voices.",
+
+               /* properties */
+               "knee-spacing-correction "
+               "left-items "
+               "right-items "
+               "same-direction-correction "
+               "stem-spacing-correction "
+               "space-to-barline "
+              );
 
index fd48290aa000bf3ce958e2c5ea7a36fa9d840ca0..2afceda1196e062072004f3bd460eee18d6fb31a 100644 (file)
@@ -21,9 +21,9 @@
 #include "open-type-font.hh"
 
 LY_DEFINE (ly_font_sub_fonts, "ly:font-sub-fonts", 1, 0, 0,
-          (SCM font),
-          "Given the font metric @var{font} of an OpenType font, return the"
-          " names of the subfonts within @var{font}.")
+           (SCM font),
+           "Given the font metric @var{font} of an OpenType font, return the"
+           " names of the subfonts within @var{font}.")
 {
   LY_ASSERT_SMOB (Font_metric, font, 1);
 
@@ -32,15 +32,15 @@ LY_DEFINE (ly_font_sub_fonts, "ly:font-sub-fonts", 1, 0, 0,
 }
 
 LY_DEFINE (ly_otf_font_glyph_info, "ly:otf-font-glyph-info", 2, 0, 0,
-          (SCM font, SCM glyph),
-          "Given the font metric @var{font} of an OpenType font, return the"
-          " information about named glyph @var{glyph} (a string).")
+           (SCM font, SCM glyph),
+           "Given the font metric @var{font} of an OpenType font, return the"
+           " information about named glyph @var{glyph} (a string).")
 {
   Modified_font_metric *fm
     = dynamic_cast<Modified_font_metric *> (unsmob_metrics (font));
   Open_type_font *otf = fm
-    ? dynamic_cast<Open_type_font *> (fm->original_font ())
-    : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
+                        ? dynamic_cast<Open_type_font *> (fm->original_font ())
+                        : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
 
   SCM_ASSERT_TYPE (otf, font, SCM_ARG1, __FUNCTION__, "OpenType font");
   LY_ASSERT_TYPE (scm_is_string, glyph, 2);
@@ -50,15 +50,15 @@ LY_DEFINE (ly_otf_font_glyph_info, "ly:otf-font-glyph-info", 2, 0, 0,
 }
 
 LY_DEFINE (ly_otf_font_table_data, "ly:otf-font-table-data", 2, 0, 0,
-          (SCM font, SCM tag),
-          "Extract a table @var{tag} from @var{font}.  Return empty string"
-          " for non-existent @var{tag}.")
+           (SCM font, SCM tag),
+           "Extract a table @var{tag} from @var{font}.  Return empty string"
+           " for non-existent @var{tag}.")
 {
   Modified_font_metric *fm
     = dynamic_cast<Modified_font_metric *> (unsmob_metrics (font));
   Open_type_font *otf = fm
-    ? dynamic_cast<Open_type_font *> (fm->original_font ())
-    : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
+                        ? dynamic_cast<Open_type_font *> (fm->original_font ())
+                        : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
 
   SCM_ASSERT_TYPE (otf, font, SCM_ARG1, __FUNCTION__, "OpenType font");
   LY_ASSERT_TYPE (scm_is_string, tag, 2);
@@ -74,27 +74,27 @@ LY_DEFINE (ly_otf_font_table_data, "ly:otf-font-table-data", 2, 0, 0,
 }
 
 LY_DEFINE (ly_otf_font_p, "ly:otf-font?", 1, 0, 0,
-          (SCM font),
-          "Is @var{font} an OpenType font?")
+           (SCM font),
+           "Is @var{font} an OpenType font?")
 {
   Modified_font_metric *fm
     = dynamic_cast<Modified_font_metric *> (unsmob_metrics (font));
   Open_type_font *otf = fm
-    ? dynamic_cast<Open_type_font *> (fm->original_font ())
-    : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
+                        ? dynamic_cast<Open_type_font *> (fm->original_font ())
+                        : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
 
   return scm_from_bool (otf);
 }
 
 LY_DEFINE (ly_otf_glyph_count, "ly:otf-glyph-count", 1, 0, 0,
-          (SCM font),
-          "Return the number of glyphs in @var{font}.")
+           (SCM font),
+           "Return the number of glyphs in @var{font}.")
 {
   Modified_font_metric *fm
     = dynamic_cast<Modified_font_metric *> (unsmob_metrics (font));
   Open_type_font *otf = fm
-    ? dynamic_cast<Open_type_font *> (fm->original_font ())
-    : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
+                        ? dynamic_cast<Open_type_font *> (fm->original_font ())
+                        : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
 
   SCM_ASSERT_TYPE (otf, font, SCM_ARG1, __FUNCTION__, "OpenType font");
 
@@ -102,14 +102,14 @@ LY_DEFINE (ly_otf_glyph_count, "ly:otf-glyph-count", 1, 0, 0,
 }
 
 LY_DEFINE (ly_otf_glyph_list, "ly:otf-glyph-list", 1, 0, 0,
-          (SCM font),
-          "Return a list of glyph names for @var{font}.")
+           (SCM font),
+           "Return a list of glyph names for @var{font}.")
 {
   Modified_font_metric *fm
     = dynamic_cast<Modified_font_metric *> (unsmob_metrics (font));
   Open_type_font *otf = fm
-    ? dynamic_cast<Open_type_font *> (fm->original_font ())
-    : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
+                        ? dynamic_cast<Open_type_font *> (fm->original_font ())
+                        : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
 
   SCM_ASSERT_TYPE (otf, font, SCM_ARG1, __FUNCTION__, "OpenType font");
 
index 50c89a40650c67e164f61b5d68f9fb1314bb181d..05bb5edb15542f1bc2d24ef324b63c59bc4902b6 100644 (file)
@@ -41,18 +41,18 @@ load_table (char const *tag_str, FT_Face face, FT_ULong *length)
     {
       FT_Byte *buffer = (FT_Byte *) malloc (*length);
       if (buffer == NULL)
-       error (_f ("cannot allocate %lu bytes", *length));
+        error (_f ("cannot allocate %lu bytes", *length));
 
       error_code = FT_Load_Sfnt_Table (face, tag, 0, buffer, length);
       if (error_code)
-       error (_f ("cannot load font table: %s", tag_str));
+        error (_f ("cannot load font table: %s", tag_str));
 
       return buffer;
     }
   else
     programming_error (_f ("FreeType error: %s",
-                          freetype_error_string (error_code).c_str ()
-                          ));
+                           freetype_error_string (error_code).c_str ()
+                          ));
 
   return 0;
 }
@@ -72,7 +72,7 @@ load_scheme_table (char const *tag_str, FT_Face face)
   SCM tab = SCM_EOL;
   if (buffer)
     {
-      string contents ((char const*)buffer, length);
+      string contents ((char const *)buffer, length);
       contents = "(quote (" + contents + "))";
 
       tab = scm_c_eval_string (contents.c_str ());
@@ -81,7 +81,6 @@ load_scheme_table (char const *tag_str, FT_Face face)
   return tab;
 }
 
-
 Open_type_font::~Open_type_font ()
 {
   FT_Done_Face (face_);
@@ -95,7 +94,7 @@ get_otf_table (FT_Face face, string tag)
 {
   FT_ULong len;
   FT_Byte *tab = load_table (tag.c_str (), face, &len);
-  string ret ((char const*) tab, len);
+  string ret ((char const *) tab, len);
   free (tab);
 
   return ret;
@@ -110,9 +109,9 @@ open_ft_face (string str, FT_Long idx)
   if (error_code == FT_Err_Unknown_File_Format)
     error (_f ("unsupported font format: %s", str.c_str ()));
   else if (error_code)
-    error (_f ("error reading font file %s: %s", 
-              str.c_str (),
-              freetype_error_string (error_code).c_str ()));
+    error (_f ("error reading font file %s: %s",
+               str.c_str (),
+               freetype_error_string (error_code).c_str ()));
   return face;
 }
 
@@ -172,10 +171,10 @@ Open_type_font::get_indexed_char_dimensions (size_t signed_idx) const
   if (SCM_HASHTABLE_P (lily_index_to_bbox_table_))
     {
       SCM box = scm_hashq_ref (lily_index_to_bbox_table_,
-                              scm_from_unsigned_integer (signed_idx), SCM_BOOL_F);
+                               scm_from_unsigned_integer (signed_idx), SCM_BOOL_F);
       Box *box_ptr = Box::unsmob (box);
       if (box_ptr)
-       return *box_ptr;
+        return *box_ptr;
     }
 
   if (SCM_HASHTABLE_P (lily_character_table_))
@@ -183,35 +182,35 @@ Open_type_font::get_indexed_char_dimensions (size_t signed_idx) const
       const size_t len = 256;
       char name[len];
       FT_Error code = FT_Get_Glyph_Name (face_, FT_UInt (signed_idx),
-                                        name, FT_UInt (len));
+                                         name, FT_UInt (len));
       if (code)
-       warning (_f ("FT_Get_Glyph_Name () Freetype error: %s",
-                    freetype_error_string (code)));
+        warning (_f ("FT_Get_Glyph_Name () Freetype error: %s",
+                     freetype_error_string (code)));
 
       SCM sym = ly_symbol2scm (name);
       SCM alist = scm_hashq_ref (lily_character_table_, sym, SCM_BOOL_F);
 
       if (alist != SCM_BOOL_F)
-       {
-         SCM bbox = scm_cdr (scm_assq (ly_symbol2scm ("bbox"), alist));
-
-         Box b;
-         b[X_AXIS][LEFT] = scm_to_double (scm_car (bbox));
-         bbox = scm_cdr (bbox);
-         b[Y_AXIS][LEFT] = scm_to_double (scm_car (bbox));
-         bbox = scm_cdr (bbox);
-         b[X_AXIS][RIGHT] = scm_to_double (scm_car (bbox));
-         bbox = scm_cdr (bbox);
-         b[Y_AXIS][RIGHT] = scm_to_double (scm_car (bbox));
-         bbox = scm_cdr (bbox);
-
-         b.scale (point_constant);
-
-         scm_hashq_set_x (lily_index_to_bbox_table_,
-                          scm_from_unsigned_integer (signed_idx),
-                          b.smobbed_copy ());
-         return b;
-       }
+        {
+          SCM bbox = scm_cdr (scm_assq (ly_symbol2scm ("bbox"), alist));
+
+          Box b;
+          b[X_AXIS][LEFT] = scm_to_double (scm_car (bbox));
+          bbox = scm_cdr (bbox);
+          b[Y_AXIS][LEFT] = scm_to_double (scm_car (bbox));
+          bbox = scm_cdr (bbox);
+          b[X_AXIS][RIGHT] = scm_to_double (scm_car (bbox));
+          bbox = scm_cdr (bbox);
+          b[Y_AXIS][RIGHT] = scm_to_double (scm_car (bbox));
+          bbox = scm_cdr (bbox);
+
+          b.scale (point_constant);
+
+          scm_hashq_set_x (lily_index_to_bbox_table_,
+                           scm_from_unsigned_integer (signed_idx),
+                           b.smobbed_copy ());
+          return b;
+        }
     }
 
   FT_UInt idx = FT_UInt (signed_idx);
@@ -221,7 +220,7 @@ Open_type_font::get_indexed_char_dimensions (size_t signed_idx) const
   FT_Pos hb = m.horiBearingX;
   FT_Pos vb = m.horiBearingY;
   Box b (Interval (Real (-hb), Real (m.width - hb)),
-        Interval (Real (-vb), Real (m.height - vb)));
+         Interval (Real (-vb), Real (m.height - vb)));
 
   b.scale (design_size () / Real (face_->units_per_EM));
   return b;
@@ -233,8 +232,8 @@ Open_type_font::name_to_index (string nm) const
   char *nm_str = (char *) nm.c_str ();
   if (FT_UInt idx = FT_Get_Name_Index (face_, nm_str))
     return (size_t) idx;
-  
-  return (size_t) -1;
+
+  return (size_t) - 1;
 }
 
 size_t
@@ -262,15 +261,15 @@ Real
 Open_type_font::design_size () const
 {
   SCM entry = scm_hashq_ref (lily_global_table_,
-                            ly_symbol2scm ("design_size"),
-
-                            /*
-                              Hmm. Design size is arbitrary for
-                              non-design-size fonts. I vote for 1 -
-                              which will trip errors more
-                              quickly. --hwn.
-                            */
-                            scm_from_unsigned_integer (1));
+                             ly_symbol2scm ("design_size"),
+
+                             /*
+                               Hmm. Design size is arbitrary for
+                               non-design-size fonts. I vote for 1 -
+                               which will trip errors more
+                               quickly. --hwn.
+                             */
+                             scm_from_unsigned_integer (1));
   return scm_to_double (entry) * Real (point_constant);
 }
 
@@ -309,19 +308,19 @@ Open_type_font::glyph_list () const
 {
   SCM retval = SCM_EOL;
   SCM *tail = &retval;
-  
+
   for (int i = 0; i < face_->num_glyphs; i++)
     {
       const size_t len = 256;
       char name[len];
       FT_Error code = FT_Get_Glyph_Name (face_, i, name, len);
       if (code)
-       warning (_f ("FT_Get_Glyph_Name () error: %s",
-                    freetype_error_string (code).c_str ()));
+        warning (_f ("FT_Get_Glyph_Name () error: %s",
+                     freetype_error_string (code).c_str ()));
 
       *tail = scm_cons (scm_from_locale_string (name), SCM_EOL);
       tail = SCM_CDRLOC (*tail);
     }
-  
+
   return retval;
 }
index e404711b4b70066214846c83a5e34d2a6708c297..275adaeb4e689f4abd3bff95b43fcb9cea831f82 100644 (file)
@@ -55,49 +55,49 @@ Optimal_page_breaking::solve ()
 
   // Note that system_count () only counts non-title systems.
   vsize ideal_sys_count = system_count ();
-  
+
   if (!scm_is_integer (forced_page_count))
     {
       /* find out the ideal number of pages */
       message (_ ("Finding the ideal number of pages..."));
-  
+
       best = space_systems_on_best_pages (0, first_page_num);
 
       page_count = best.systems_per_page_.size ();
       min_sys_count = ideal_sys_count - best.systems_per_page_.back ();
-  
+
       if (page_count > 1 && best.systems_per_page_[page_count - 2] > 1)
-       min_sys_count -= best.systems_per_page_[page_count - 2];
+        min_sys_count -= best.systems_per_page_[page_count - 2];
 
       min_sys_count = max (min_sys_count, (vsize)1);
     }
   else
     {
       /* If systems-per-page and page-count are both specified, we know exactly
-        how many systems should be present. */
+         how many systems should be present. */
       if (systems_per_page () > 0)
-       {
-         ideal_sys_count = systems_per_page () * page_count;
-
-         if (ideal_sys_count > max_system_count (0, end)
-             || ideal_sys_count < min_system_count (0, end))
-           {
-             warning (_ ("could not satisfy systems-per-page and page-count at the same time, ignoring systems-per-page"));
-             ideal_sys_count = system_count ();
-             min_sys_count = page_count;
-           }
-         else
-           {
-             set_current_breakpoints (0, end, ideal_sys_count);
-             min_sys_count = max_sys_count = ideal_sys_count;
-             ideal_line_division = best_division = current_configuration (0);
-           }
-       }
+        {
+          ideal_sys_count = systems_per_page () * page_count;
+
+          if (ideal_sys_count > max_system_count (0, end)
+              || ideal_sys_count < min_system_count (0, end))
+            {
+              warning (_ ("could not satisfy systems-per-page and page-count at the same time, ignoring systems-per-page"));
+              ideal_sys_count = system_count ();
+              min_sys_count = page_count;
+            }
+          else
+            {
+              set_current_breakpoints (0, end, ideal_sys_count);
+              min_sys_count = max_sys_count = ideal_sys_count;
+              ideal_line_division = best_division = current_configuration (0);
+            }
+        }
       else
-       min_sys_count = page_count;
+        min_sys_count = page_count;
 
       /* TODO: the following line will spit out programming errors if the
-        ideal line spacing doesn't fit on PAGE_COUNT pages */
+         ideal line spacing doesn't fit on PAGE_COUNT pages */
       best = space_systems_on_n_pages (0, page_count, first_page_num);
     }
 
@@ -106,7 +106,7 @@ Optimal_page_breaking::solve ()
   else if (scm_is_integer (forced_page_count))
     message (_f ("Fitting music on %d pages...", (int)page_count));
   else
-    message (_f ("Fitting music on %d or %d pages...", (int)page_count-1, (int)page_count));
+    message (_f ("Fitting music on %d or %d pages...", (int)page_count - 1, (int)page_count));
 
   /* try a smaller number of systems than the ideal number for line breaking */
   Line_division bound = ideal_line_division;
@@ -116,93 +116,93 @@ Optimal_page_breaking::solve ()
       set_current_breakpoints (0, end, sys_count, Line_division (), bound);
 
       if (debug_page_breaking_scoring)
-       message (_f ("trying %d systems", (int)sys_count));
+        message (_f ("trying %d systems", (int)sys_count));
 
       for (vsize i = 0; i < current_configuration_count (); i++)
-       {
-         Page_spacing_result cur;
+        {
+          Page_spacing_result cur;
 
-         if (scm_is_integer (forced_page_count))
-           cur = space_systems_on_n_pages (i, page_count, first_page_num);
-         else
-           cur = space_systems_on_best_pages (i, first_page_num);
+          if (scm_is_integer (forced_page_count))
+            cur = space_systems_on_n_pages (i, page_count, first_page_num);
+          else
+            cur = space_systems_on_best_pages (i, first_page_num);
 
-         if (cur.demerits_ < best_for_this_sys_count.demerits_)
-           {
-             best_for_this_sys_count = cur;
-             bound = current_configuration (i);
-           }
-       }
+          if (cur.demerits_ < best_for_this_sys_count.demerits_)
+            {
+              best_for_this_sys_count = cur;
+              bound = current_configuration (i);
+            }
+        }
 
       if (debug_page_breaking_scoring)
-       message (_f ("best score for this sys-count: %f", best_for_this_sys_count.demerits_));
+        message (_f ("best score for this sys-count: %f", best_for_this_sys_count.demerits_));
 
       if (best_for_this_sys_count.demerits_ < best.demerits_)
-       {
-         best = best_for_this_sys_count;
-         best_division = bound;
-       }
+        {
+          best = best_for_this_sys_count;
+          best_division = bound;
+        }
 
       /* Check to see if we already have too few systems. There are two ways
-        we check this: if we are trying one less than the ideal number of pages
-        and the pages are stretched on average then we have too
-        few systems. If the spacing is worse than BAD_SPACING_PENALTY, then we
-        have too few systems. In either case, though, we need to continue reducing
-        the number of systems if max-systems-per-page requires it. */
+         we check this: if we are trying one less than the ideal number of pages
+         and the pages are stretched on average then we have too
+         few systems. If the spacing is worse than BAD_SPACING_PENALTY, then we
+         have too few systems. In either case, though, we need to continue reducing
+         the number of systems if max-systems-per-page requires it. */
       if (!(best.system_count_status_ & SYSTEM_COUNT_TOO_MANY))
-       {
-         if (best_for_this_sys_count.page_count () < page_count
-             && best_for_this_sys_count.average_force () > 0)
-           break;
-
-         if (best_for_this_sys_count.demerits_ >= BAD_SPACING_PENALTY)
-           break;
-       }
+        {
+          if (best_for_this_sys_count.page_count () < page_count
+              && best_for_this_sys_count.average_force () > 0)
+            break;
+
+          if (best_for_this_sys_count.demerits_ >= BAD_SPACING_PENALTY)
+            break;
+        }
     }
 
   /* try a larger number of systems than the ideal line breaking number. This
      is more or less C&P, but the loop bounds make it difficult to try something
      like do {...} while (flip(&d) != UP). */
   bound = ideal_line_division;
-  for (vsize sys_count = ideal_sys_count+1; sys_count <= max_sys_count; sys_count++)
+  for (vsize sys_count = ideal_sys_count + 1; sys_count <= max_sys_count; sys_count++)
     {
       Real best_demerits_for_this_sys_count = infinity_f;
       set_current_breakpoints (0, end, sys_count, bound);
 
       if (debug_page_breaking_scoring)
-       message (_f ("trying %d systems", (int)sys_count));
+        message (_f ("trying %d systems", (int)sys_count));
 
       for (vsize i = 0; i < current_configuration_count (); i++)
-       {
-         vsize min_p_count = min_page_count (i, first_page_num);
-         Page_spacing_result cur;
-
-         if (min_p_count > page_count)
-           continue;
-         else if (scm_is_integer (forced_page_count))
-           cur = space_systems_on_n_pages (i, page_count, first_page_num);
-         else
-           cur = space_systems_on_best_pages (i, first_page_num);
-
-         if (cur.demerits_ < best.demerits_)
-           {
-             best = cur;
-             best_division = current_configuration (i);
-           }
-
-         if (cur.demerits_ < best_demerits_for_this_sys_count)
-           {
-             best_demerits_for_this_sys_count = cur.demerits_;
-             bound = current_configuration (i);
-           }
-       }
+        {
+          vsize min_p_count = min_page_count (i, first_page_num);
+          Page_spacing_result cur;
+
+          if (min_p_count > page_count)
+            continue;
+          else if (scm_is_integer (forced_page_count))
+            cur = space_systems_on_n_pages (i, page_count, first_page_num);
+          else
+            cur = space_systems_on_best_pages (i, first_page_num);
+
+          if (cur.demerits_ < best.demerits_)
+            {
+              best = cur;
+              best_division = current_configuration (i);
+            }
+
+          if (cur.demerits_ < best_demerits_for_this_sys_count)
+            {
+              best_demerits_for_this_sys_count = cur.demerits_;
+              bound = current_configuration (i);
+            }
+        }
 
       if (debug_page_breaking_scoring)
-       message (_f ("best score for this sys-count: %f", best_demerits_for_this_sys_count));
+        message (_f ("best score for this sys-count: %f", best_demerits_for_this_sys_count));
 
       if (best_demerits_for_this_sys_count >= BAD_SPACING_PENALTY
-       && !(best.system_count_status_ & SYSTEM_COUNT_TOO_FEW))
-       break;
+          && !(best.system_count_status_ & SYSTEM_COUNT_TOO_FEW))
+        break;
     }
 
   message (_ ("Drawing systems..."));
index 1fa77ec799cf5db54d323ec5be4ea9f963a3d8c0..3aced1d37f26c614e304c9c1d55b67c25a89725e 100644 (file)
@@ -62,17 +62,17 @@ Ottava_bracket::print (SCM smob)
       broken[d] = (b->break_status_dir () != CENTER);
 
       if (Note_column::has_interface (b))
-       {
-         extract_grob_set (b, "note-heads", heads);
-         common = common_refpoint_of_array (heads, common, X_AXIS);
-         for (vsize i = 0; i < heads.size (); i++)
-           {
-             Grob *h = heads[i];
-             Grob *dots = Rhythmic_head::get_dots (h);
-             if (dots)
-               common = dots->common_refpoint (common, X_AXIS);
-           }
-       }
+        {
+          extract_grob_set (b, "note-heads", heads);
+          common = common_refpoint_of_array (heads, common, X_AXIS);
+          for (vsize i = 0; i < heads.size (); i++)
+            {
+              Grob *h = heads[i];
+              Grob *dots = Rhythmic_head::get_dots (h);
+              if (dots)
+                common = dots->common_refpoint (common, X_AXIS);
+            }
+        }
     }
   while (flip (&d) != LEFT);
 
@@ -81,10 +81,10 @@ Ottava_bracket::print (SCM smob)
   Stencil text;
   if (Text_interface::is_markup (markup))
     text = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (),
-                                                             properties, markup));
+                                                              properties, markup));
 
   Drul_array<Real> shorten = robust_scm2interval (me->get_property ("shorten-pair"),
-                                                 Interval (0, 0));
+                                                  Interval (0, 0));
 
   /*
     TODO: we should check if there are ledgers, and modify length of
@@ -96,30 +96,30 @@ Ottava_bracket::print (SCM smob)
 
       Interval ext;
       if (Note_column::has_interface (b))
-       {
-         extract_grob_set (b, "note-heads", heads);
-         for (vsize i = 0; i < heads.size (); i++)
-           {
-             Grob *h = heads[i];
-             ext.unite (h->extent (common, X_AXIS));
-             Grob *dots = Rhythmic_head::get_dots (h);
-
-             if (dots && d == RIGHT)
-               ext.unite (dots->extent (common, X_AXIS));
-           }
-       }
+        {
+          extract_grob_set (b, "note-heads", heads);
+          for (vsize i = 0; i < heads.size (); i++)
+            {
+              Grob *h = heads[i];
+              ext.unite (h->extent (common, X_AXIS));
+              Grob *dots = Rhythmic_head::get_dots (h);
+
+              if (dots && d == RIGHT)
+                ext.unite (dots->extent (common, X_AXIS));
+            }
+        }
 
       if (ext.is_empty ())
-       ext = robust_relative_extent (b, common, X_AXIS);
+        ext = robust_relative_extent (b, common, X_AXIS);
 
       if (broken[d])
-       {
-         span_points[d] = b->extent (common, X_AXIS)[RIGHT];
-         shorten[d] = 0.;
-       }
+        {
+          span_points[d] = b->extent (common, X_AXIS)[RIGHT];
+          shorten[d] = 0.;
+        }
 
       else
-       span_points[d] = ext[d];
+        span_points[d] = ext[d];
     }
   while (flip (&d) != LEFT);
 
@@ -127,38 +127,38 @@ Ottava_bracket::print (SCM smob)
     0.3 is ~ italic correction.
   */
   Real text_size = text.extent (X_AXIS).is_empty ()
-    ? 0.0 : text.extent (X_AXIS)[RIGHT] + 0.3;
+                   ? 0.0 : text.extent (X_AXIS)[RIGHT] + 0.3;
 
   span_points[LEFT]
     = min (span_points[LEFT],
-          (span_points[RIGHT] - text_size
-           - robust_scm2double (me->get_property ("minimum-length"), -1.0)));
+           (span_points[RIGHT] - text_size
+            - robust_scm2double (me->get_property ("minimum-length"), -1.0)));
 
   Interval bracket_span_points = span_points;
   bracket_span_points[LEFT] += text_size;
 
   Drul_array<Real> edge_height = robust_scm2interval (me->get_property ("edge-height"),
-                                                     Interval (1.0, 1.0));
+                                                      Interval (1.0, 1.0));
 
   Drul_array<Real> flare = robust_scm2interval (me->get_property ("bracket-flare"),
-                                               Interval (0, 0));
+                                                Interval (0, 0));
 
   do
     {
       edge_height[d] *= -get_grob_direction (me);
       if (broken[d])
-       edge_height[d] = 0.0;
+        edge_height[d] = 0.0;
     }
-  while (flip(&d) != LEFT);
+  while (flip (&d) != LEFT);
 
   Stencil b;
   Interval empty;
   if (!bracket_span_points.is_empty () && bracket_span_points.length () > 0.001)
     b = Tuplet_bracket::make_bracket (me,
-                                     Y_AXIS, Offset (bracket_span_points.length (), 0),
-                                     edge_height,
-                                     empty,
-                                     flare, shorten);
+                                      Y_AXIS, Offset (bracket_span_points.length (), 0),
+                                      edge_height,
+                                      empty,
+                                      flare, shorten);
 
   /*
     The vertical lines should not take space, for the following scenario:
@@ -176,8 +176,8 @@ Ottava_bracket::print (SCM smob)
   */
 
   b = Stencil (Box (b.extent (X_AXIS),
-                   Interval (0.1, 0.1)),
-              b.expr ());
+                    Interval (0.1, 0.1)),
+               b.expr ());
 
   b.translate_axis (bracket_span_points[LEFT], X_AXIS);
   text.translate_axis (span_points[LEFT], X_AXIS);
@@ -190,12 +190,12 @@ Ottava_bracket::print (SCM smob)
 }
 
 ADD_INTERFACE (Ottava_bracket,
-              "An ottava bracket.",
-
-              /* properties */
-              "edge-height "
-              "bracket-flare "
-              "shorten-pair "
-              "minimum-length "
-              );
+               "An ottava bracket.",
+
+               /* properties */
+               "edge-height "
+               "bracket-flare "
+               "shorten-pair "
+               "minimum-length "
+              );
 
index fd59b33b8e83a7e158d1420ff149342c58fad534..fb72fdf80f4697568ed20e05f6da02101016c5ed 100644 (file)
@@ -25,7 +25,6 @@
 #include "spanner.hh"
 #include "text-interface.hh"
 
-
 class Ottava_spanner_engraver : public Engraver
 {
 public:
@@ -69,14 +68,14 @@ Ottava_spanner_engraver::process_music ()
       finished_ = span_;
       span_ = 0;
       if (Text_interface::is_markup (ott))
-       {
-         span_ = make_spanner ("OttavaBracket", SCM_EOL);
-         span_->set_property ("text", ott);
-
-         SCM offset (get_property ("middleCOffset"));
-         if (robust_scm2double (offset, 0) > 0)
-           span_->set_property ("direction", scm_from_int (DOWN));
-       }
+        {
+          span_ = make_spanner ("OttavaBracket", SCM_EOL);
+          span_->set_property ("text", ott);
+
+          SCM offset (get_property ("middleCOffset"));
+          if (robust_scm2double (offset, 0) > 0)
+            span_->set_property ("direction", scm_from_int (DOWN));
+        }
     }
   last_ottavation_ = ott;
 }
@@ -90,7 +89,7 @@ Ottava_spanner_engraver::acknowledge_note_column (Grob_info info)
       Side_position_interface::add_support (span_, it);
 
       if (!span_->get_bound (LEFT))
-       span_->set_bound (LEFT, it);
+        span_->set_bound (LEFT, it);
       span_->set_bound (RIGHT, it);
     }
 }
@@ -102,13 +101,13 @@ Ottava_spanner_engraver::typeset_all ()
     {
       Direction d = LEFT;
       do
-       {
-         if (!finished_->get_bound (RIGHT))
-           {
-             Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
-             finished_->set_bound (d, e);
-           }
-       }
+        {
+          if (!finished_->get_bound (RIGHT))
+            {
+              Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
+              finished_->set_bound (d, e);
+            }
+        }
       while (flip (&d) != LEFT);
 
       finished_ = 0;
@@ -142,17 +141,17 @@ Ottava_spanner_engraver::finalize ()
 ADD_ACKNOWLEDGER (Ottava_spanner_engraver, note_column);
 
 ADD_TRANSLATOR (Ottava_spanner_engraver,
-               /* doc */
-               "Create a text spanner when the ottavation property changes.",
-
-               /* create */
-               "OttavaBracket ",
-
-               /* read */
-               "middleCOffset "
-               "ottavation "
-               "currentMusicalColumn ",
-               
-               /* write */
-               ""
-               );
+                /* doc */
+                "Create a text spanner when the ottavation property changes.",
+
+                /* create */
+                "OttavaBracket ",
+
+                /* read */
+                "middleCOffset "
+                "ottavation "
+                "currentMusicalColumn ",
+
+                /* write */
+                ""
+               );
index 653815dd3031a4af1d460e2db4feeb4249eabfcb..93ac8954de32c277c4bc7747fa11844463144005 100644 (file)
 #include "minimal-page-breaking.hh"
 
 LY_DEFINE (ly_page_turn_breaking, "ly:page-turn-breaking",
-          1, 0, 0, (SCM pb),
-          "Optimally break (pages and lines) the @code{Paper_book} object"
-          " @var{pb} such that page turns only happen in specified places,"
-          " returning its pages.")
+           1, 0, 0, (SCM pb),
+           "Optimally break (pages and lines) the @code{Paper_book} object"
+           " @var{pb} such that page turns only happen in specified places,"
+           " returning its pages.")
 {
   Page_turn_page_breaking b (unsmob_paper_book (pb));
   return b.solve ();
 }
 
 LY_DEFINE (ly_optimal_breaking, "ly:optimal-breaking",
-          1, 0, 0, (SCM pb),
-          "Optimally break (pages and lines) the @code{Paper_book} object"
-          " @var{pb} to minimize badness in bother vertical and horizontal"
-          " spacing.")
+           1, 0, 0, (SCM pb),
+           "Optimally break (pages and lines) the @code{Paper_book} object"
+           " @var{pb} to minimize badness in bother vertical and horizontal"
+           " spacing.")
 {
   Optimal_page_breaking b (unsmob_paper_book (pb));
   return b.solve ();
 }
 
 LY_DEFINE (ly_minimal_breaking, "ly:minimal-breaking",
-          1, 0, 0, (SCM pb),
-          "Break (pages and lines) the @code{Paper_book} object @var{pb}"
-          " without looking for optimal spacing: stack as many lines on"
-          " a page before moving to the next one.")
+           1, 0, 0, (SCM pb),
+           "Break (pages and lines) the @code{Paper_book} object @var{pb}"
+           " without looking for optimal spacing: stack as many lines on"
+           " a page before moving to the next one.")
 {
   Minimal_page_breaking b (unsmob_paper_book (pb));
   return b.solve ();
index 5d55c7a9f41e26114d796dd8e22fa0c84136afcc..2e5854885e02eb432458442628696f329fb844e2 100644 (file)
@@ -152,47 +152,47 @@ compress_lines (const vector<Line_details> &orig)
   for (vsize i = 0; i < orig.size (); i++)
     {
       if (ret.size () && !scm_is_symbol (ret.back ().page_permission_))
-       {
-         Line_details const &old = ret.back ();
-         Line_details compressed = orig[i];
-         /*
-           We must account for the padding between the lines that we are compressing.
-           The padding values come from "old," which is the upper system here. Note
-           the meaning of tight-spacing: if a system has tight-spacing, then the padding
-           _before_ it is ignored.
-         */
-         Real padding = 0;
-         if (!orig[i].tight_spacing_)
-           padding = orig[i].title_ ? old.title_padding_ : old.padding_;
-
-         // FIXME: double check these. Doesn't foo.piggyback (bar) mean
-         // that foo goes on top?
-         // TODO: break out a Line_details::piggyback from here?
-         compressed.shape_ = old.shape_.piggyback (orig[i].shape_, padding);
-         compressed.refpoint_extent_[UP] = old.refpoint_extent_[UP];
-         compressed.refpoint_extent_[DOWN] += compressed.shape_.rest_[UP] - old.shape_.rest_[UP];
-         compressed.space_ += old.space_;
-         compressed.inverse_hooke_ += old.inverse_hooke_;
-
-         compressed.compressed_lines_count_ = old.compressed_lines_count_ + 1;
-         compressed.compressed_nontitle_lines_count_ =
-           old.compressed_nontitle_lines_count_ + (compressed.title_ ? 0 : 1);
-
-         // compressed.title_ is true if and only if the first of its
-         // compressed lines was a title.
+        {
+          Line_details const &old = ret.back ();
+          Line_details compressed = orig[i];
+          /*
+            We must account for the padding between the lines that we are compressing.
+            The padding values come from "old," which is the upper system here. Note
+            the meaning of tight-spacing: if a system has tight-spacing, then the padding
+            _before_ it is ignored.
+          */
+          Real padding = 0;
+          if (!orig[i].tight_spacing_)
+            padding = orig[i].title_ ? old.title_padding_ : old.padding_;
+
+          // FIXME: double check these. Doesn't foo.piggyback (bar) mean
+          // that foo goes on top?
+          // TODO: break out a Line_details::piggyback from here?
+          compressed.shape_ = old.shape_.piggyback (orig[i].shape_, padding);
+          compressed.refpoint_extent_[UP] = old.refpoint_extent_[UP];
+          compressed.refpoint_extent_[DOWN] += compressed.shape_.rest_[UP] - old.shape_.rest_[UP];
+          compressed.space_ += old.space_;
+          compressed.inverse_hooke_ += old.inverse_hooke_;
+
+          compressed.compressed_lines_count_ = old.compressed_lines_count_ + 1;
+          compressed.compressed_nontitle_lines_count_
+            = old.compressed_nontitle_lines_count_ + (compressed.title_ ? 0 : 1);
+
+          // compressed.title_ is true if and only if the first of its
+          // compressed lines was a title.
           compressed.title_ = old.title_;
 
           // adds footnotes of one line to the footnotes of another
           compressed.footnotes_.insert (compressed.footnotes_.begin (),
-            old.footnotes_.begin (), old.footnotes_.end ());
-          
-         ret.back () = compressed;
-       }
+                                        old.footnotes_.begin (), old.footnotes_.end ());
+
+          ret.back () = compressed;
+        }
       else
-       {
-         ret.push_back (orig[i]);
-         ret.back ().force_ = 0;
-       }
+        {
+          ret.push_back (orig[i]);
+          ret.back ().force_ = 0;
+        }
     }
   return ret;
 }
@@ -202,7 +202,7 @@ compress_lines (const vector<Line_details> &orig)
 */
 static vector<vsize>
 uncompress_solution (vector<vsize> const &systems_per_page,
-                    vector<Line_details> const &compressed)
+                     vector<Line_details> const &compressed)
 {
   vector<vsize> ret;
   vsize start_sys = 0;
@@ -211,7 +211,7 @@ uncompress_solution (vector<vsize> const &systems_per_page,
     {
       int compressed_count = 0;
       for (vsize j = start_sys; j < start_sys + systems_per_page[i]; j++)
-       compressed_count += compressed[j].compressed_lines_count_ - 1;
+        compressed_count += compressed[j].compressed_lines_count_ - 1;
 
       ret.push_back (systems_per_page[i] + compressed_count);
       start_sys += systems_per_page[i];
@@ -268,7 +268,7 @@ Page_breaking::Page_breaking (Paper_book *pb, Break_predicate is_break, Prob_bre
   footnote_number_raise_ = (to_boolean (pb->paper_->c_variable ("footnote-auto-numbering"))
                             ? robust_scm2double (pb->paper_->c_variable ("footnote-number-raise"), 0.0)
                             : 0.0);
-  
+
   if (systems_per_page_ && (max_systems_per_page_ || min_systems_per_page_))
     {
       warning (_f ("ignoring min-systems-per-page and max-systems-per-page because systems-per-page was set"));
@@ -389,10 +389,10 @@ Page_breaking::line_count_status (int line_count) const
 /* translate indices into breaks_ into start-end parameters for the line breaker */
 void
 Page_breaking::line_breaker_args (vsize sys,
-                                 Break_position const &start,
-                                 Break_position const &end,
-                                 vsize *line_breaker_start,
-                                 vsize *line_breaker_end)
+                                  Break_position const &start,
+                                  Break_position const &end,
+                                  vsize *line_breaker_start,
+                                  vsize *line_breaker_end)
 {
   assert (system_specs_[sys].pscore_);
   assert (next_system (start) <= sys && sys <= end.system_spec_index_);
@@ -410,7 +410,7 @@ Page_breaking::line_breaker_args (vsize sys,
 
 void
 Page_breaking::break_into_pieces (vsize start_break, vsize end_break,
-                                 Line_division const &div)
+                                  Line_division const &div)
 {
   vector<Break_position> chunks = chunk_list (start_break, end_break);
   bool ignore_div = false;
@@ -424,16 +424,16 @@ Page_breaking::break_into_pieces (vsize start_break, vsize end_break,
     {
       vsize sys = next_system (chunks[i]);
       if (system_specs_[sys].pscore_)
-       {
-         vsize start;
-         vsize end;
-         line_breaker_args (sys, chunks[i], chunks[i+1], &start, &end);
-
-         vector<Column_x_positions> pos = ignore_div
-           ? line_breaking_[sys].best_solution (start, end)
-           : line_breaking_[sys].solve (start, end, div[i]);
-         system_specs_[sys].pscore_->root_system ()->break_into_pieces (pos);
-       }
+        {
+          vsize start;
+          vsize end;
+          line_breaker_args (sys, chunks[i], chunks[i + 1], &start, &end);
+
+          vector<Column_x_positions> pos = ignore_div
+                                           ? line_breaking_[sys].best_solution (start, end)
+                                           : line_breaking_[sys].solve (start, end, div[i]);
+          system_specs_[sys].pscore_->root_system ()->break_into_pieces (pos);
+        }
     }
 }
 
@@ -444,18 +444,18 @@ Page_breaking::systems ()
   for (vsize sys = 0; sys < system_specs_.size (); sys++)
     {
       if (system_specs_[sys].pscore_)
-       {
-         system_specs_[sys].pscore_->root_system ()
-           ->do_break_substitution_and_fixup_refpoints ();
-         SCM lines = system_specs_[sys].pscore_->root_system ()
-           ->get_broken_system_grobs ();
-         ret = scm_cons (lines, ret);
-       }
+        {
+          system_specs_[sys].pscore_->root_system ()
+          ->do_break_substitution_and_fixup_refpoints ();
+          SCM lines = system_specs_[sys].pscore_->root_system ()
+                      ->get_broken_system_grobs ();
+          ret = scm_cons (lines, ret);
+        }
       else if (Prob *pb = system_specs_[sys].prob_)
-       {
-         ret = scm_cons (scm_list_1 (pb->self_scm ()), ret);
-         pb->unprotect ();
-       }
+        {
+          ret = scm_cons (scm_list_1 (pb->self_scm ()), ret);
+          pb->unprotect ();
+        }
     }
   return scm_append (scm_reverse (ret));
 }
@@ -470,11 +470,11 @@ Page_breaking::make_page (int page_num, bool last) const
   make_page_scm = scm_variable_ref (make_page_scm);
 
   return scm_apply_0 (make_page_scm,
-                     scm_list_n (book_->self_scm (),
-                                 ly_symbol2scm ("page-number"), scm_from_int (page_num),
-                                 ly_symbol2scm ("is-last-bookpart"), scm_from_bool (last_part),
-                                 ly_symbol2scm ("is-bookpart-last-page"), scm_from_bool (last),
-                                 SCM_UNDEFINED));
+                      scm_list_n (book_->self_scm (),
+                                  ly_symbol2scm ("page-number"), scm_from_int (page_num),
+                                  ly_symbol2scm ("is-last-bookpart"), scm_from_bool (last_part),
+                                  ly_symbol2scm ("is-bookpart-last-page"), scm_from_bool (last),
+                                  SCM_UNDEFINED));
 }
 
 // Returns the total height of the paper, including margins and
@@ -509,11 +509,11 @@ Page_breaking::page_height (int page_num, bool last) const
       Real height = scm_to_double (height_scm);
 
       if (page_num >= 0)
-       {
-         if ((int) cache.size () <= page_num)
-           cache.resize (page_num + 1, -1);
-         cache[page_num] = height;
-       }
+        {
+          if ((int) cache.size () <= page_num)
+            cache.resize (page_num + 1, -1);
+          cache[page_num] = height;
+        }
       return height;
     }
 }
@@ -547,10 +547,10 @@ Page_breaking::draw_page (SCM systems, SCM configuration, int page_num, int foot
     {
       SCM paper_system = scm_car (s);
       if (Grob *g = unsmob_grob (scm_car (s)))
-       {
-         System *sys = dynamic_cast<System*> (g);
-         paper_system = sys->get_paper_system ();
-       }
+        {
+          System *sys = dynamic_cast<System *> (g);
+          paper_system = sys->get_paper_system ();
+        }
 
       paper_systems = scm_cons (paper_system, paper_systems);
     }
@@ -572,8 +572,8 @@ Page_breaking::draw_page (SCM systems, SCM configuration, int page_num, int foot
                   : footnote_num);
 
   SCM footnotes = Page_layout_problem::get_footnotes_from_lines (systems,
-                                                                 footnote_num,
-                                                                 book_);
+                  footnote_num,
+                  book_);
 
   Page_layout_problem::add_footnotes_to_footer (footnotes, foot, book_);
 
@@ -604,7 +604,7 @@ Page_breaking::make_pages (vector<vsize> lines_per_page, SCM systems)
   // Align_interface::align_to_ideal_distances might be called).
   SCM systems_configs_fncounts = SCM_EOL;
   vsize footnote_count = 0;
-    
+
   for (vsize i = 0; i < lines_per_page.size (); i++)
     {
       int page_num = i + first_page_number;
@@ -614,7 +614,7 @@ Page_breaking::make_pages (vector<vsize> lines_per_page, SCM systems)
       SCM lines = scm_list_head (systems, line_count);
       int fn_lines = Page_layout_problem::get_footnote_count (lines);
       SCM config = get_page_configuration (lines, page_num, footnote_count, rag, bookpart_last_page);
-      
+
       systems_configs_fncounts = scm_cons (scm_list_3 (lines, config, scm_from_int ((int)footnote_count)), systems_configs_fncounts);
       footnote_count += fn_lines;
       systems = scm_list_tail (systems, line_count);
@@ -632,21 +632,21 @@ Page_breaking::make_pages (vector<vsize> lines_per_page, SCM systems)
       SCM page = draw_page (lines, config, page_num, footnote_num, bookpart_last_page);
       /* collect labels */
       SCM page_num_scm = scm_from_int (page_num);
-      for (SCM l = lines ; scm_is_pair (l)  ; l = scm_cdr (l))
-       {
-         SCM labels = SCM_EOL;
-         if (Grob * line = unsmob_grob (scm_car (l)))
-           {
-             System *system = dynamic_cast<System*> (line);
-             labels = system->get_property ("labels");
-           }
-         else if (Prob *prob = unsmob_prob (scm_car (l)))
-           labels = prob->get_property ("labels");
-
-         for (SCM lbls = labels ; scm_is_pair (lbls) ; lbls = scm_cdr (lbls))
-           label_page_table = scm_cons (scm_cons (scm_car (lbls), page_num_scm),
-                                        label_page_table);
-       }
+      for (SCM l = lines; scm_is_pair (l); l = scm_cdr (l))
+        {
+          SCM labels = SCM_EOL;
+          if (Grob *line = unsmob_grob (scm_car (l)))
+            {
+              System *system = dynamic_cast<System *> (line);
+              labels = system->get_property ("labels");
+            }
+          else if (Prob *prob = unsmob_prob (scm_car (l)))
+            labels = prob->get_property ("labels");
+
+          for (SCM lbls = labels; scm_is_pair (lbls); lbls = scm_cdr (lbls))
+            label_page_table = scm_cons (scm_cons (scm_car (lbls), page_num_scm),
+                                         label_page_table);
+        }
 
       ret = scm_cons (page, ret);
       --page_num;
@@ -674,10 +674,10 @@ Page_breaking::create_system_list ()
   SCM specs = book_->get_system_specs ();
   for (SCM s = specs; scm_is_pair (s); s = scm_cdr (s))
     {
-      if (Paper_score *ps = dynamic_cast<Paper_score*> (unsmob_music_output (scm_car (s))))
-       {
-         system_specs_.push_back (System_spec (ps));
-       }
+      if (Paper_score *ps = dynamic_cast<Paper_score *> (unsmob_music_output (scm_car (s))))
+        {
+          system_specs_.push_back (System_spec (ps));
+        }
       else
         {
           Prob *pb = unsmob_prob (scm_car (s));
@@ -702,81 +702,81 @@ Page_breaking::find_chunks_and_breaks (Break_predicate is_break, Prob_break_pred
   for (vsize i = 0; i < system_specs_.size (); i++)
     {
       if (system_specs_[i].pscore_)
-       {
-         vector<Grob*> cols = system_specs_[i].pscore_->root_system ()->used_columns ();
-         vector<Grob*> forced_line_break_cols;
-
-         SCM system_count = system_specs_[i].pscore_->layout ()->c_variable ("system-count");
-         if (scm_is_number (system_count))
-           {
-             // With system-count given, the line configuration for
-             // this score is fixed.  We need to ensure that chunk
-             // boundaries only occur at line breaks.
-             Constrained_breaking breaking (system_specs_[i].pscore_);
-             vector<Line_details> details = breaking.line_details (0, VPOS, scm_to_int (system_count));
-
-             for (vsize j = 0; j < details.size (); j++)
-               forced_line_break_cols.push_back (details[j].last_column_);
-           }
-
-         int last_forced_line_break_idx = 0;
-         vsize forced_line_break_idx = 0;
-         vector<vsize> line_breaker_columns;
-         line_breaker_columns.push_back (0);
-
-         for (vsize j = 1; j < cols.size (); j++)
-           {
-             if (forced_line_break_cols.size ())
-               {
-                 if (forced_line_break_idx >= forced_line_break_cols.size ()
-                     || forced_line_break_cols[forced_line_break_idx] != cols[j])
-                   continue;
-                 else
-                   forced_line_break_idx++;
-               }
-
-             bool last = (j == cols.size () - 1);
-             bool break_point = is_break && is_break (cols[j]);
-             bool chunk_end = cols[j]->get_property ("page-break-permission") == force_sym;
-             Break_position cur_pos = Break_position (i,
-                                                      line_breaker_columns.size (),
-                                                      cols[j],
-                                                      last);
-
-             // NOTE: even in the breaks_ list, forced_line_count_
-             // refers to the number of lines between a
-             // Break_position and the start of that /chunk/.  This
-             // is needed for system_count_bounds to work correctly,
-             // since it mixes Break_positions from breaks_ and
-             // chunks_.
-             if (scm_is_number (system_count))
-               cur_pos.forced_line_count_ = forced_line_break_idx - last_forced_line_break_idx;
-
-             if (break_point || (i == system_specs_.size () - 1 && last))
-               breaks_.push_back (cur_pos);
-             if (chunk_end || last)
-               {
-                 chunks_.push_back (cur_pos);
-                 last_forced_line_break_idx = forced_line_break_idx;
-               }
-
-             if ((break_point || chunk_end) && !last)
-               line_breaker_columns.push_back (j);
-           }
-         line_breaking_.push_back (Constrained_breaking (system_specs_[i].pscore_, line_breaker_columns));
-       }
+        {
+          vector<Grob *> cols = system_specs_[i].pscore_->root_system ()->used_columns ();
+          vector<Grob *> forced_line_break_cols;
+
+          SCM system_count = system_specs_[i].pscore_->layout ()->c_variable ("system-count");
+          if (scm_is_number (system_count))
+            {
+              // With system-count given, the line configuration for
+              // this score is fixed.  We need to ensure that chunk
+              // boundaries only occur at line breaks.
+              Constrained_breaking breaking (system_specs_[i].pscore_);
+              vector<Line_details> details = breaking.line_details (0, VPOS, scm_to_int (system_count));
+
+              for (vsize j = 0; j < details.size (); j++)
+                forced_line_break_cols.push_back (details[j].last_column_);
+            }
+
+          int last_forced_line_break_idx = 0;
+          vsize forced_line_break_idx = 0;
+          vector<vsize> line_breaker_columns;
+          line_breaker_columns.push_back (0);
+
+          for (vsize j = 1; j < cols.size (); j++)
+            {
+              if (forced_line_break_cols.size ())
+                {
+                  if (forced_line_break_idx >= forced_line_break_cols.size ()
+                      || forced_line_break_cols[forced_line_break_idx] != cols[j])
+                    continue;
+                  else
+                    forced_line_break_idx++;
+                }
+
+              bool last = (j == cols.size () - 1);
+              bool break_point = is_break && is_break (cols[j]);
+              bool chunk_end = cols[j]->get_property ("page-break-permission") == force_sym;
+              Break_position cur_pos = Break_position (i,
+                                                       line_breaker_columns.size (),
+                                                       cols[j],
+                                                       last);
+
+              // NOTE: even in the breaks_ list, forced_line_count_
+              // refers to the number of lines between a
+              // Break_position and the start of that /chunk/.  This
+              // is needed for system_count_bounds to work correctly,
+              // since it mixes Break_positions from breaks_ and
+              // chunks_.
+              if (scm_is_number (system_count))
+                cur_pos.forced_line_count_ = forced_line_break_idx - last_forced_line_break_idx;
+
+              if (break_point || (i == system_specs_.size () - 1 && last))
+                breaks_.push_back (cur_pos);
+              if (chunk_end || last)
+                {
+                  chunks_.push_back (cur_pos);
+                  last_forced_line_break_idx = forced_line_break_idx;
+                }
+
+              if ((break_point || chunk_end) && !last)
+                line_breaker_columns.push_back (j);
+            }
+          line_breaking_.push_back (Constrained_breaking (system_specs_[i].pscore_, line_breaker_columns));
+        }
       else if (system_specs_[i].prob_)
-       {
-         bool break_point = prob_is_break && prob_is_break (system_specs_[i].prob_);
-         if (break_point || i == system_specs_.size () - 1)
-           breaks_.push_back (Break_position (i));
+        {
+          bool break_point = prob_is_break && prob_is_break (system_specs_[i].prob_);
+          if (break_point || i == system_specs_.size () - 1)
+            breaks_.push_back (Break_position (i));
 
-         chunks_.push_back (Break_position (i));
+          chunks_.push_back (Break_position (i));
 
-         /* FIXME: shouldn't we push a Null_breaker or similar dummy
-            class? --hwn */
-         line_breaking_.push_back (Constrained_breaking (NULL));
-       }
+          /* FIXME: shouldn't we push a Null_breaker or similar dummy
+             class? --hwn */
+          line_breaking_.push_back (Constrained_breaking (NULL));
+        }
     }
 }
 
@@ -829,7 +829,7 @@ Page_breaking::max_system_count (vsize start, vsize end)
 // per chunk.
 Page_breaking::Line_division
 Page_breaking::system_count_bounds (vector<Break_position> const &chunks,
-                                   bool min)
+                                    bool min)
 {
   assert (chunks.size () >= 2);
 
@@ -840,17 +840,17 @@ Page_breaking::system_count_bounds (vector<Break_position> const &chunks,
     {
       vsize sys = next_system (chunks[i]);
 
-      if (chunks[i+1].forced_line_count_)
-       ret[i] = chunks[i+1].forced_line_count_;
+      if (chunks[i + 1].forced_line_count_)
+        ret[i] = chunks[i + 1].forced_line_count_;
       else if (system_specs_[sys].pscore_)
-       {
-         vsize start;
-         vsize end;
-         line_breaker_args (sys, chunks[i], chunks[i+1], &start, &end);
-         ret[i] = min
-           ? line_breaking_[sys].min_system_count (start, end)
-           : line_breaking_[sys].max_system_count (start, end);
-       }
+        {
+          vsize start;
+          vsize end;
+          line_breaker_args (sys, chunks[i], chunks[i + 1], &start, &end);
+          ret[i] = min
+                   ? line_breaking_[sys].min_system_count (start, end)
+                   : line_breaking_[sys].max_system_count (start, end);
+        }
     }
 
   return ret;
@@ -858,10 +858,10 @@ Page_breaking::system_count_bounds (vector<Break_position> const &chunks,
 
 void
 Page_breaking::set_current_breakpoints (vsize start,
-                                       vsize end,
-                                       vsize system_count,
-                                       Line_division lower_bound,
-                                       Line_division upper_bound)
+                                        vsize end,
+                                        vsize system_count,
+                                        Line_division lower_bound,
+                                        Line_division upper_bound)
 {
   system_count_ = system_count;
   current_chunks_ = chunk_list (start, end);
@@ -880,32 +880,32 @@ Page_breaking::set_current_breakpoints (vsize start,
   Line_division work_in_progress;
   current_configurations_.clear ();
   line_divisions_rec (system_count,
-                     lower_bound,
-                     upper_bound,
-                     &work_in_progress);
+                      lower_bound,
+                      upper_bound,
+                      &work_in_progress);
 
   /* we only consider a constant number of configurations. Otherwise,
      this becomes slow when there are many small scores. The constant
      5 is somewhat arbitrary. */
   if (current_configurations_.size () > 5)
     {
-      vector<pair<Real,vsize> > dems_and_indices;
+      vector<pair<Real, vsize> > dems_and_indices;
 
       for (vsize i = 0; i < current_configurations_.size (); i++)
-       {
-         cache_line_details (i);
-         Real dem = 0;
-         for (vsize j = 0; j < cached_line_details_.size (); j++)
-           dem += cached_line_details_[j].force_ * cached_line_details_[j].force_
-             + cached_line_details_[j].break_penalty_;
+        {
+          cache_line_details (i);
+          Real dem = 0;
+          for (vsize j = 0; j < cached_line_details_.size (); j++)
+            dem += cached_line_details_[j].force_ * cached_line_details_[j].force_
+                   + cached_line_details_[j].break_penalty_;
 
-         dems_and_indices.push_back (pair<Real,vsize> (dem, i));
-       }
-      vector_sort (dems_and_indices, less<pair<Real,vsize> > ());
+          dems_and_indices.push_back (pair<Real, vsize> (dem, i));
+        }
+      vector_sort (dems_and_indices, less<pair<Real, vsize> > ());
 
       vector<Line_division> best_5_configurations;
       for (vsize i = 0; i < 5; i++)
-       best_5_configurations.push_back (current_configurations_[dems_and_indices[i].second]);
+        best_5_configurations.push_back (current_configurations_[dems_and_indices[i].second]);
 
       clear_line_details_cache ();
       current_configurations_ = best_5_configurations;
@@ -922,19 +922,19 @@ Page_breaking::set_to_ideal_line_configuration (vsize start, vsize end)
   system_count_ = 0;
 
   Line_division div;
-  for (vsize i = 0; i+1 < current_chunks_.size (); i++)
+  for (vsize i = 0; i + 1 < current_chunks_.size (); i++)
     {
       vsize sys = next_system (current_chunks_[i]);
 
-      if (current_chunks_[i+1].forced_line_count_)
-       div.push_back (current_chunks_[i+1].forced_line_count_);
+      if (current_chunks_[i + 1].forced_line_count_)
+        div.push_back (current_chunks_[i + 1].forced_line_count_);
       else if (system_specs_[sys].pscore_)
-       {
-         line_breaker_args (sys, current_chunks_[i], current_chunks_[i+1], &start, &end);
-         div.push_back (line_breaking_[sys].best_solution (start, end).size ());
-       }
+        {
+          line_breaker_args (sys, current_chunks_[i], current_chunks_[i + 1], &start, &end);
+          div.push_back (line_breaking_[sys].best_solution (start, end).size ());
+        }
       else
-       div.push_back (0);
+        div.push_back (0);
 
       system_count_ += div.back ();
     }
@@ -958,25 +958,25 @@ Page_breaking::cache_line_details (vsize configuration_index)
       Line_division &div = current_configurations_[configuration_index];
       uncompressed_line_details_.clear ();
       for (vsize i = 0; i + 1 < current_chunks_.size (); i++)
-       {
-         vsize sys = next_system (current_chunks_[i]);
-         if (system_specs_[sys].pscore_)
-           {
-             vsize start;
-             vsize end;
-             line_breaker_args (sys, current_chunks_[i], current_chunks_[i+1], &start, &end);
-
-             vector<Line_details> details = line_breaking_[sys].line_details (start, end, div[i]);
-             uncompressed_line_details_.insert (uncompressed_line_details_.end (), details.begin (), details.end ());
-           }
-         else
-           {
-             assert (div[i] == 0);
-             uncompressed_line_details_.push_back (system_specs_[sys].prob_
-                                                   ? Line_details (system_specs_[sys].prob_, book_->paper_)
-                                                   : Line_details ());
-           }
-       }
+        {
+          vsize sys = next_system (current_chunks_[i]);
+          if (system_specs_[sys].pscore_)
+            {
+              vsize start;
+              vsize end;
+              line_breaker_args (sys, current_chunks_[i], current_chunks_[i + 1], &start, &end);
+
+              vector<Line_details> details = line_breaking_[sys].line_details (start, end, div[i]);
+              uncompressed_line_details_.insert (uncompressed_line_details_.end (), details.begin (), details.end ());
+            }
+          else
+            {
+              assert (div[i] == 0);
+              uncompressed_line_details_.push_back (system_specs_[sys].prob_
+                                                    ? Line_details (system_specs_[sys].prob_, book_->paper_)
+                                                    : Line_details ());
+            }
+        }
       cached_line_details_ = compress_lines (uncompressed_line_details_);
       compute_line_heights ();
     }
@@ -992,9 +992,9 @@ Page_breaking::clear_line_details_cache ()
 
 void
 Page_breaking::line_divisions_rec (vsize system_count,
-                                  Line_division const &min_sys,
-                                  Line_division const &max_sys,
-                                  Line_division *cur_division)
+                                   Line_division const &min_sys,
+                                   Line_division const &max_sys,
+                                   Line_division *cur_division)
 {
   vsize my_index = cur_division->size ();
   int others_min = 0;
@@ -1012,8 +1012,8 @@ Page_breaking::line_divisions_rec (vsize system_count,
   if (real_min > real_max || real_min < 0)
     {
       /* this should never happen within a recursive call. If it happens
-        at all, it means that we were called with an unsolvable problem
-        and we should return an empty result */
+         at all, it means that we were called with an unsolvable problem
+         and we should return an empty result */
       assert (my_index == 0);
       return;
     }
@@ -1022,7 +1022,7 @@ Page_breaking::line_divisions_rec (vsize system_count,
     {
       cur_division->push_back (i);
       if (my_index == min_sys.size () - 1)
-       current_configurations_.push_back (*cur_division);
+        current_configurations_.push_back (*cur_division);
       else
         line_divisions_rec (system_count - i, min_sys, max_sys, cur_division);
       cur_division->pop_back ();
@@ -1042,7 +1042,7 @@ Page_breaking::compute_line_heights ()
   Real prev_refpoint_hanging = 0;
   for (vsize i = 0; i < cached_line_details_.size (); i++)
     {
-      Line_detailscur = cached_line_details_[i];
+      Line_details &cur = cached_line_details_[i];
       Line_shape shape = cur.shape_;
       Real a = shape.begin_[UP];
       Real b = shape.rest_[UP];
@@ -1050,20 +1050,20 @@ Page_breaking::compute_line_heights ()
       Real refpoint_hanging = max (prev_hanging_begin + a, prev_hanging_rest + b);
 
       if (i > 0)
-       {
-         Real padding = 0;
-         Line_details const& prev = cached_line_details_[i-1];
-         if (!cur.tight_spacing_)
-           padding = title
-             ? prev.title_padding_
-             : prev.padding_;
-         Real min_dist = title
-           ? prev.title_min_distance_
-           : prev.min_distance_;
-         refpoint_hanging = max (refpoint_hanging + padding,
-                                 prev_refpoint_hanging - prev.refpoint_extent_[DOWN]
-                                 + cur.refpoint_extent_[UP] + min_dist);
-       }
+        {
+          Real padding = 0;
+          Line_details const &prev = cached_line_details_[i - 1];
+          if (!cur.tight_spacing_)
+            padding = title
+                      ? prev.title_padding_
+                      : prev.padding_;
+          Real min_dist = title
+                          ? prev.title_min_distance_
+                          : prev.min_distance_;
+          refpoint_hanging = max (refpoint_hanging + padding,
+                                  prev_refpoint_hanging - prev.refpoint_extent_[DOWN]
+                                  + cur.refpoint_extent_[UP] + min_dist);
+        }
 
       Real hanging_begin = refpoint_hanging - shape.begin_[DOWN];
       Real hanging_rest = refpoint_hanging - shape.rest_[DOWN];
@@ -1094,40 +1094,40 @@ Page_breaking::min_page_count (vsize configuration, vsize first_page_num)
   for (vsize i = 0; i < cached_line_details_.size (); i++)
     {
       Line_details const &cur = cached_line_details_[i];
-      Line_details const *const prev = (i > 0) ? &cached_line_details_[i-1] : 0;
+      Line_details const *const prev = (i > 0) ? &cached_line_details_[i - 1] : 0;
       Real ext_len;
       if (cur_rod_height > 0)
-       ext_len = cur.tallness_;
+        ext_len = cur.tallness_;
       else
-       ext_len = cur.full_height();
+        ext_len = cur.full_height ();
 
       Real spring_len = (i > 0) ? prev->spring_length (cur) : 0;
       Real next_rod_height = cur_rod_height + ext_len;
       Real next_spring_height = cur_spring_height + spring_len;
       Real next_height = next_rod_height + (ragged () ? next_spring_height : 0)
-       + min_whitespace_at_bottom_of_page (cur);
+                         + min_whitespace_at_bottom_of_page (cur);
       int next_line_count = line_count + cur.compressed_nontitle_lines_count_;
 
       if ((!too_few_lines (line_count) && (next_height > cur_page_height && cur_rod_height > 0))
-         || too_many_lines (next_line_count)
-         || (prev && prev->page_permission_ == ly_symbol2scm ("force")))
-       {
-         line_count = cur.compressed_nontitle_lines_count_;
-         cur_rod_height = cur.full_height();
-         cur_spring_height = 0;
-         page_starter = i;
-
-         cur_page_height = page_height (first_page_num + ret, false);
-         cur_page_height -= min_whitespace_at_top_of_page (cur);
-
-         ret++;
-       }
+          || too_many_lines (next_line_count)
+          || (prev && prev->page_permission_ == ly_symbol2scm ("force")))
+        {
+          line_count = cur.compressed_nontitle_lines_count_;
+          cur_rod_height = cur.full_height ();
+          cur_spring_height = 0;
+          page_starter = i;
+
+          cur_page_height = page_height (first_page_num + ret, false);
+          cur_page_height -= min_whitespace_at_top_of_page (cur);
+
+          ret++;
+        }
       else
-       {
-         cur_rod_height = next_rod_height;
-         cur_spring_height = next_spring_height;
-         line_count = next_line_count;
-       }
+        {
+          cur_rod_height = next_rod_height;
+          cur_spring_height = next_spring_height;
+          line_count = next_line_count;
+        }
     }
 
   /* there are two potential problems with the last page (because we didn't know
@@ -1151,10 +1151,10 @@ Page_breaking::min_page_count (vsize configuration, vsize first_page_num)
 
       Real cur_height = cur_rod_height + ((ragged_last () || ragged ()) ? cur_spring_height : 0);
       if (!too_few_lines (line_count - cached_line_details_.back ().compressed_nontitle_lines_count_)
-         && cur_height > cur_page_height
-         /* don't increase the page count if the last page had only one system */
-         && cur_rod_height > cached_line_details_.back ().full_height ())
-       ret++;
+          && cur_height > cur_page_height
+          /* don't increase the page count if the last page had only one system */
+          && cur_rod_height > cached_line_details_.back ().full_height ())
+        ret++;
       assert (ret <= cached_line_details_.size ());
     }
 
@@ -1178,15 +1178,15 @@ Page_breaking::space_systems_on_n_pages (vsize configuration, vsize n, vsize fir
 
   cache_line_details (configuration);
   bool valid_n = (n >= min_page_count (configuration, first_page_num)
-                 && n <= cached_line_details_.size ());
+                  && n <= cached_line_details_.size ());
 
   if (!valid_n)
     programming_error ("number of pages is out of bounds");
 
   if (n == 1 && valid_n)
     ret = space_systems_on_1_page (cached_line_details_,
-                                  page_height (first_page_num, is_last ()),
-                                  ragged () || (is_last () && ragged_last ()));
+                                   page_height (first_page_num, is_last ()),
+                                   ragged () || (is_last () && ragged_last ()));
   else if (n == 2 && valid_n)
     ret = space_systems_on_2_pages (configuration, first_page_num);
   else
@@ -1221,7 +1221,7 @@ Page_breaking::blank_page_penalty () const
 // or N+1 pages; see the comment to space_systems_on_n_pages.
 Page_spacing_result
 Page_breaking::space_systems_on_n_or_one_more_pages (vsize configuration, vsize n, vsize first_page_num,
-                                                    Real penalty_for_fewer_pages)
+                                                     Real penalty_for_fewer_pages)
 {
   Page_spacing_result n_res;
   Page_spacing_result m_res;
@@ -1229,7 +1229,7 @@ Page_breaking::space_systems_on_n_or_one_more_pages (vsize configuration, vsize
   if (systems_per_page_ > 0)
     {
       Page_spacing_result ret = space_systems_with_fixed_number_per_page (configuration, first_page_num);
-      ret.demerits_ += (ret.force_.size () == n || ret.force_.size () == (n-1)) ? 0 : BAD_SPACING_PENALTY;
+      ret.demerits_ += (ret.force_.size () == n || ret.force_.size () == (n - 1)) ? 0 : BAD_SPACING_PENALTY;
       return ret;
     }
 
@@ -1246,18 +1246,18 @@ Page_breaking::space_systems_on_n_or_one_more_pages (vsize configuration, vsize
       Real height = page_height (first_page_num, is_last ());
 
       if (1 >= min_p_count)
-       n_res = space_systems_on_1_page (cached_line_details_, height, rag);
+        n_res = space_systems_on_1_page (cached_line_details_, height, rag);
       if (1 < cached_line_details_.size ())
-       m_res = space_systems_on_2_pages (configuration, first_page_num);
+        m_res = space_systems_on_2_pages (configuration, first_page_num);
     }
   else
     {
       Page_spacer ps (cached_line_details_, first_page_num, this);
-      
+
       if (n >= min_p_count || !valid_n)
-       n_res = ps.solve (n);
+        n_res = ps.solve (n);
       if (n < cached_line_details_.size () || !valid_n)
-       m_res = ps.solve (n+1);
+        m_res = ps.solve (n + 1);
     }
 
   m_res = finalize_spacing_result (configuration, m_res);
@@ -1286,7 +1286,7 @@ Page_breaking::space_systems_on_best_pages (vsize configuration, vsize first_pag
 
 Page_spacing_result
 Page_breaking::space_systems_with_fixed_number_per_page (vsize configuration,
-                                                        vsize first_page_num)
+                                                         vsize first_page_num)
 {
   Page_spacing_result res;
   Page_spacing space (page_height (first_page_num, false), this);
@@ -1303,27 +1303,27 @@ Page_breaking::space_systems_with_fixed_number_per_page (vsize configuration,
 
       int system_count_on_this_page = 0;
       while (system_count_on_this_page < systems_per_page_
-            && line < cached_line_details_.size ())
-       {
-         Line_details const &cur_line = cached_line_details_[line];
-         space.append_system (cur_line);
-         system_count_on_this_page += cur_line.compressed_nontitle_lines_count_;
-         line++;
+             && line < cached_line_details_.size ())
+        {
+          Line_details const &cur_line = cached_line_details_[line];
+          space.append_system (cur_line);
+          system_count_on_this_page += cur_line.compressed_nontitle_lines_count_;
+          line++;
 
-         if (cur_line.page_permission_ == ly_symbol2scm ("force"))
-           break;
-       }
+          if (cur_line.page_permission_ == ly_symbol2scm ("force"))
+            break;
+        }
 
       res.systems_per_page_.push_back (line - page_first_line);
 
       res.force_.push_back (space.force_);
-      res.penalty_ += cached_line_details_[line-1].page_penalty_;
+      res.penalty_ += cached_line_details_[line - 1].page_penalty_;
       if (system_count_on_this_page != systems_per_page_)
-       {
-         res.penalty_ += abs (system_count_on_this_page - systems_per_page_) * TERRIBLE_SPACING_PENALTY;
-         res.system_count_status_ |= ((system_count_on_this_page < systems_per_page_))
-           ? SYSTEM_COUNT_TOO_FEW : SYSTEM_COUNT_TOO_MANY;
-       }
+        {
+          res.penalty_ += abs (system_count_on_this_page - systems_per_page_) * TERRIBLE_SPACING_PENALTY;
+          res.system_count_status_ |= ((system_count_on_this_page < systems_per_page_))
+                                      ? SYSTEM_COUNT_TOO_FEW : SYSTEM_COUNT_TOO_MANY;
+        }
 
       page_first_line = line;
     }
@@ -1350,47 +1350,47 @@ Page_breaking::pack_systems_on_least_pages (vsize configuration, vsize first_pag
       Real prev_force = space.force_;
       space.append_system (cached_line_details_[line]);
       if ((line > page_first_line)
-         && (isinf (space.force_)
-             || ((line > 0)
-                  && (cached_line_details_[line-1].page_permission_ == ly_symbol2scm ("force")))))
-       {
-         res.systems_per_page_.push_back (line - page_first_line);
-         res.force_.push_back (prev_force);
-          res.penalty_ += cached_line_details_[line-1].page_penalty_;
-         page++;
-         space.resize (page_height (first_page_num + page, false));
-         space.clear ();
+          && (isinf (space.force_)
+              || ((line > 0)
+                  && (cached_line_details_[line - 1].page_permission_ == ly_symbol2scm ("force")))))
+        {
+          res.systems_per_page_.push_back (line - page_first_line);
+          res.force_.push_back (prev_force);
+          res.penalty_ += cached_line_details_[line - 1].page_penalty_;
+          page++;
+          space.resize (page_height (first_page_num + page, false));
+          space.clear ();
           space.append_system (cached_line_details_[line]);
-         page_first_line = line;
-       }
+          page_first_line = line;
+        }
 
       if (line == cached_line_details_.size () - 1)
-       {
-         /* This is the last line */
-         /* When the last page height was computed, we did not know yet that it
-          * was the last one. If the systems put on it don't fit anymore, the last
-          * system is moved to a new page */
-         space.resize (page_height (first_page_num + page, true));
-         if ((line > page_first_line) && (isinf (space.force_)))
-           {
-             res.systems_per_page_.push_back (line - page_first_line);
-             res.force_.push_back (prev_force);
-             /* the last page containing the last line */
-             space.resize (page_height (first_page_num + page + 1, true));
-             space.clear ();
-             space.append_system (cached_line_details_[line]);
-             res.systems_per_page_.push_back (1);
-             res.force_.push_back (space.force_);
-              res.penalty_ += cached_line_details_[line-1].page_penalty_;
+        {
+          /* This is the last line */
+          /* When the last page height was computed, we did not know yet that it
+           * was the last one. If the systems put on it don't fit anymore, the last
+           * system is moved to a new page */
+          space.resize (page_height (first_page_num + page, true));
+          if ((line > page_first_line) && (isinf (space.force_)))
+            {
+              res.systems_per_page_.push_back (line - page_first_line);
+              res.force_.push_back (prev_force);
+              /* the last page containing the last line */
+              space.resize (page_height (first_page_num + page + 1, true));
+              space.clear ();
+              space.append_system (cached_line_details_[line]);
+              res.systems_per_page_.push_back (1);
+              res.force_.push_back (space.force_);
+              res.penalty_ += cached_line_details_[line - 1].page_penalty_;
               res.penalty_ += cached_line_details_[line].page_penalty_;
-           }
-         else
-           {
-             res.systems_per_page_.push_back (line + 1 - page_first_line);
-             res.force_.push_back (space.force_);
+            }
+          else
+            {
+              res.systems_per_page_.push_back (line + 1 - page_first_line);
+              res.force_.push_back (space.force_);
               res.penalty_ += cached_line_details_[line].page_penalty_;
-           }
-       }
+            }
+        }
     }
   return finalize_spacing_result (configuration, res);
 }
@@ -1421,7 +1421,7 @@ Page_breaking::finalize_spacing_result (vsize configuration, Page_spacing_result
     {
       Real f = res.force_[i];
 
-      page_demerits += min(f*f, BAD_SPACING_PENALTY);
+      page_demerits += min (f * f, BAD_SPACING_PENALTY);
     }
 
   /* for a while we tried averaging page and line forces across pages instead
@@ -1476,16 +1476,16 @@ Page_breaking::space_systems_on_2_pages (vsize configuration, vsize first_page_n
   for (vsize i = 0; i + 1 < cached_line_details_.size (); i++)
     if (cached_line_details_[i].page_permission_ == ly_symbol2scm ("force"))
       {
-       vector<Line_details> lines1 (cached_line_details_.begin (), cached_line_details_.begin () + i + 1);
-       vector<Line_details> lines2 (cached_line_details_.begin () + i + 1, cached_line_details_.end ());
-       Page_spacing_result p1 = space_systems_on_1_page (lines1, page1_height, ragged1);
-       Page_spacing_result p2 = space_systems_on_1_page (lines2, page2_height, ragged2);
-
-       p1.systems_per_page_.push_back (p2.systems_per_page_[0]);
-       p1.force_.push_back (p2.force_[0]);
-       p1.penalty_ += p2.penalty_ - cached_line_details_[i].turn_penalty_;
-       p1.system_count_status_ |= p2.system_count_status_;
-       return p1;
+        vector<Line_details> lines1 (cached_line_details_.begin (), cached_line_details_.begin () + i + 1);
+        vector<Line_details> lines2 (cached_line_details_.begin () + i + 1, cached_line_details_.end ());
+        Page_spacing_result p1 = space_systems_on_1_page (lines1, page1_height, ragged1);
+        Page_spacing_result p2 = space_systems_on_1_page (lines2, page2_height, ragged2);
+
+        p1.systems_per_page_.push_back (p2.systems_per_page_[0]);
+        p1.force_.push_back (p2.force_[0]);
+        p1.penalty_ += p2.penalty_ - cached_line_details_[i].turn_penalty_;
+        p1.system_count_status_ |= p2.system_count_status_;
+        return p1;
       }
 
   vector<Real> page1_force;
@@ -1526,10 +1526,10 @@ Page_breaking::space_systems_on_2_pages (vsize configuration, vsize first_page_n
       page1_status[i] = line_count_status (page1_line_count);
 
       if (ragged2)
-       page2_force[page2_force.size () - 1 - i] =
-         (page2.force_ < 0 && i + 1 < page1_force.size ()) ? infinity_f : 0;
+        page2_force[page2_force.size () - 1 - i]
+          = (page2.force_ < 0 && i + 1 < page1_force.size ()) ? infinity_f : 0;
       else
-       page2_force[page2_force.size () - 1 - i] = page2.force_;
+        page2_force[page2_force.size () - 1 - i] = page2.force_;
       page2_penalty[page2_penalty.size () - 1 - i] = line_count_penalty (page2_line_count);
       page2_status[page2_penalty.size () - 1 - i] = line_count_status (page2_line_count);
     }
@@ -1545,26 +1545,26 @@ Page_breaking::space_systems_on_2_pages (vsize configuration, vsize first_page_n
       // constraints. That is, we penalize harshly when they don't happen
       // but we don't completely reject.
       Real dem = f
-       + page1_penalty[i] + page2_penalty[i]
-       + cached_line_details_[i+1].page_penalty_
-       + cached_line_details_.back ().page_penalty_ + cached_line_details_.back ().turn_penalty_;
+                 + page1_penalty[i] + page2_penalty[i]
+                 + cached_line_details_[i + 1].page_penalty_
+                 + cached_line_details_.back ().page_penalty_ + cached_line_details_.back ().turn_penalty_;
       if (dem < best_demerits)
-       {
-         best_demerits = dem;
-         best_sys_count = i+1;
-       }
+        {
+          best_demerits = dem;
+          best_sys_count = i + 1;
+        }
     }
 
   Page_spacing_result ret;
   ret.systems_per_page_.push_back (best_sys_count);
   ret.systems_per_page_.push_back (cached_line_details_.size () - best_sys_count);
-  ret.force_.push_back (page1_force[best_sys_count-1]);
-  ret.force_.push_back (page2_force[best_sys_count-1]);
-  ret.system_count_status_ = page1_status[best_sys_count-1] | page2_status[best_sys_count-1];
-  ret.penalty_ = cached_line_details_[best_sys_count-1].page_penalty_
-    + cached_line_details_.back ().page_penalty_
-    + cached_line_details_.back ().turn_penalty_
-    + page1_penalty[best_sys_count-1] + page2_penalty[best_sys_count-1];
+  ret.force_.push_back (page1_force[best_sys_count - 1]);
+  ret.force_.push_back (page2_force[best_sys_count - 1]);
+  ret.system_count_status_ = page1_status[best_sys_count - 1] | page2_status[best_sys_count - 1];
+  ret.penalty_ = cached_line_details_[best_sys_count - 1].page_penalty_
+                 + cached_line_details_.back ().page_penalty_
+                 + cached_line_details_.back ().turn_penalty_
+                 + page1_penalty[best_sys_count - 1] + page2_penalty[best_sys_count - 1];
 
   /* don't do finalize_spacing_result () because we are only an internal function */
   return ret;
@@ -1602,7 +1602,7 @@ Page_breaking::ends_score () const
 vsize
 Page_breaking::last_break_position () const
 {
-  return breaks_.size () - 1;  
+  return breaks_.size () - 1;
 }
 
 // This gives the minimum distance between the top of the
@@ -1619,11 +1619,11 @@ Page_breaking::min_whitespace_at_top_of_page (Line_details const &line) const
   Real padding = 0;
 
   Page_layout_problem::read_spacing_spec (first_system_spacing,
-                                         &min_distance,
-                                         ly_symbol2scm ("minimum-distance"));
+                                          &min_distance,
+                                          ly_symbol2scm ("minimum-distance"));
   Page_layout_problem::read_spacing_spec (first_system_spacing,
-                                         &padding,
-                                         ly_symbol2scm ("padding"));
+                                          &padding,
+                                          ly_symbol2scm ("padding"));
 
   // FIXME: take into account the height of the header
   Real translate = max (line.shape_.begin_[UP], line.shape_.rest_[UP]);
@@ -1638,11 +1638,11 @@ Page_breaking::min_whitespace_at_bottom_of_page (Line_details const &line) const
   Real padding = 0;
 
   Page_layout_problem::read_spacing_spec (last_system_spacing,
-                                         &min_distance,
-                                         ly_symbol2scm ("minimum-distance"));
+                                          &min_distance,
+                                          ly_symbol2scm ("minimum-distance"));
   Page_layout_problem::read_spacing_spec (last_system_spacing,
-                                         &padding,
-                                         ly_symbol2scm ("padding"));
+                                          &padding,
+                                          ly_symbol2scm ("padding"));
 
   // FIXME: take into account the height of the footer
   Real translate = min (line.shape_.begin_[DOWN], line.shape_.rest_[DOWN]);
index 17c2912e148b2c33b8d721c315df27303f24ae61..c9301ff3843f6812c1c39a129df9511c01817aca 100644 (file)
@@ -45,9 +45,9 @@ Page_layout_problem::get_footnote_count (SCM lines)
   for (SCM s = lines; scm_is_pair (s); s = scm_cdr (s))
     {
       if (Grob *g = unsmob_grob (scm_car (s)))
-       {
-         System *sys = dynamic_cast<System *> (g);
-         if (!sys)
+        {
+          System *sys = dynamic_cast<System *> (g);
+          if (!sys)
             {
               programming_error ("got a grob for footnotes that wasn't a System");
               continue;
@@ -112,7 +112,7 @@ Page_layout_problem::get_footnotes_from_lines (SCM lines, int counter, Paper_boo
     TODO: This recalculates numbering every time this function is called, including once
     after the balloon prints are called.  Although it is not a huge computational drain,
     it'd be more elegant to turn this calculation off when it is no longer needed.
-    
+
     In a separate commit, it'd be nice to streamline the way that page layout property
     is handled so that the process of building `config's in page-breaking does result
     in duplicated work, either by making this process less complicated or (preferably)
@@ -130,7 +130,7 @@ Page_layout_problem::get_footnotes_from_lines (SCM lines, int counter, Paper_boo
             {
               programming_error ("Your numbering function needs to return a stencil.");
               markup = SCM_EOL;
-              s = new Stencil (Box (Interval (0,0), Interval (0,0)), SCM_EOL);
+              s = new Stencil (Box (Interval (0, 0), Interval (0, 0)), SCM_EOL);
             }
           footnote_number_markups.push_back (markup);
           footnote_number_stencils.push_back (s);
@@ -166,54 +166,54 @@ Page_layout_problem::get_footnotes_from_lines (SCM lines, int counter, Paper_boo
     {
       // Take care of musical systems.
       if (Grob *g = unsmob_grob (scm_car (s)))
-       {
-         System *sys = dynamic_cast<System *> (g);
-         if (!sys)
+        {
+          System *sys = dynamic_cast<System *> (g);
+          if (!sys)
             {
               programming_error ("got a grob for footnotes that wasn't a System");
               continue;
             }
-            Stencil mol;
-
-            for (vsize i = 0; i < sys->footnote_grobs ()->size (); i++)
-              {
-                Grob *footnote = sys->footnote_grobs ()->at (i);
-                SCM footnote_markup = footnote->get_property ("footnote-text");
-                if (Spanner *orig = dynamic_cast<Spanner *>(footnote))
-                  if (orig->is_broken ())
-                    footnote_markup = orig->broken_intos_[0]->get_property ("footnote-text");
-
-                if (!Text_interface::is_markup (footnote_markup))
-                  continue;
-
-                SCM props = scm_call_1 (ly_lily_module_constant ("layout-extract-page-properties"),
-                                        paper->self_scm ());
-
-                SCM footnote_stl = Text_interface::interpret_markup (paper->self_scm (),
-                                                                     props, footnote_markup);
-
-                Stencil *footnote_stencil = unsmob_stencil (footnote_stl);
-                if (do_numbering)
-                  {
-                    SCM annotation_scm = scm_car (in_text_numbers);
-                    footnote->set_property ("text", annotation_scm);
-                    if (Spanner *orig = dynamic_cast<Spanner *>(footnote))
-                      {
-                        orig->set_property ("text", annotation_scm);
-                        if (orig->is_broken ())
-                          for (vsize i = 0; i < orig->broken_intos_.size (); i++)
-                              orig->broken_intos_[i]->set_property ("text", annotation_scm);
-                      }
-                    
-                    Stencil *annotation = unsmob_stencil (scm_car (numbers));
-                    annotation->translate_axis (footnote_stencil->extent (Y_AXIS)[UP] + number_raise - annotation->extent(Y_AXIS)[UP], Y_AXIS);
-                    footnote_stencil->add_at_edge (X_AXIS, LEFT, *annotation, 0.0);
-                    numbers = scm_cdr (numbers);
-                    in_text_numbers = scm_cdr (in_text_numbers);
-                  }
-                mol.add_at_edge (Y_AXIS, DOWN, *footnote_stencil, padding);
-              }
-            footnotes = scm_cons (mol.smobbed_copy (), footnotes);
+          Stencil mol;
+
+          for (vsize i = 0; i < sys->footnote_grobs ()->size (); i++)
+            {
+              Grob *footnote = sys->footnote_grobs ()->at (i);
+              SCM footnote_markup = footnote->get_property ("footnote-text");
+              if (Spanner *orig = dynamic_cast<Spanner *>(footnote))
+                if (orig->is_broken ())
+                  footnote_markup = orig->broken_intos_[0]->get_property ("footnote-text");
+
+              if (!Text_interface::is_markup (footnote_markup))
+                continue;
+
+              SCM props = scm_call_1 (ly_lily_module_constant ("layout-extract-page-properties"),
+                                      paper->self_scm ());
+
+              SCM footnote_stl = Text_interface::interpret_markup (paper->self_scm (),
+                                                                   props, footnote_markup);
+
+              Stencil *footnote_stencil = unsmob_stencil (footnote_stl);
+              if (do_numbering)
+                {
+                  SCM annotation_scm = scm_car (in_text_numbers);
+                  footnote->set_property ("text", annotation_scm);
+                  if (Spanner *orig = dynamic_cast<Spanner *>(footnote))
+                    {
+                      orig->set_property ("text", annotation_scm);
+                      if (orig->is_broken ())
+                        for (vsize i = 0; i < orig->broken_intos_.size (); i++)
+                          orig->broken_intos_[i]->set_property ("text", annotation_scm);
+                    }
+
+                  Stencil *annotation = unsmob_stencil (scm_car (numbers));
+                  annotation->translate_axis (footnote_stencil->extent (Y_AXIS)[UP] + number_raise - annotation->extent (Y_AXIS)[UP], Y_AXIS);
+                  footnote_stencil->add_at_edge (X_AXIS, LEFT, *annotation, 0.0);
+                  numbers = scm_cdr (numbers);
+                  in_text_numbers = scm_cdr (in_text_numbers);
+                }
+              mol.add_at_edge (Y_AXIS, DOWN, *footnote_stencil, padding);
+            }
+          footnotes = scm_cons (mol.smobbed_copy (), footnotes);
         }
       // Take care of top-level markups
       else if (Prob *p = unsmob_prob (scm_car (s)))
@@ -236,7 +236,7 @@ Page_layout_problem::get_footnotes_from_lines (SCM lines, int counter, Paper_boo
                   if (!unsmob_stencil (in_text_stencil))
                     in_text_stencil = SCM_EOL;
                   number_footnote_table = scm_cons (scm_cons (scm_caar (st), in_text_stencil), number_footnote_table);
-                  annotation->translate_axis (mol.extent (Y_AXIS)[UP] + number_raise - annotation->extent(Y_AXIS)[UP], Y_AXIS);
+                  annotation->translate_axis (mol.extent (Y_AXIS)[UP] + number_raise - annotation->extent (Y_AXIS)[UP], Y_AXIS);
                   mol.add_at_edge (X_AXIS, LEFT, *annotation, 0.0);
                   numbers = scm_cdr (numbers);
                   in_text_numbers = scm_cdr (in_text_numbers);
@@ -255,7 +255,7 @@ Page_layout_problem::get_footnotes_from_lines (SCM lines, int counter, Paper_boo
   return scm_reverse (footnotes);
 }
 
-Stencil*
+Stencil *
 Page_layout_problem::get_footnote_separator_stencil (Output_def *paper)
 {
   SCM props = scm_call_1 (ly_lily_module_constant ("layout-extract-page-properties"),
@@ -280,7 +280,7 @@ Page_layout_problem::add_footnotes_to_footer (SCM footnotes, Stencil *foot, Pape
   bool footnotes_found = false;
   Real footnote_padding = robust_scm2double (pb->paper_->c_variable ("footnote-padding"), 0.0);
   Real footnote_footer_padding = robust_scm2double (pb->paper_->c_variable ("footnote-footer-padding"), 0.0);
-  
+
   footnotes = scm_reverse (footnotes);
 
   for (SCM s = footnotes; scm_is_pair (s); s = scm_cdr (s))
@@ -363,64 +363,63 @@ Page_layout_problem::Page_layout_problem (Paper_book *pb, SCM page_scm, SCM syst
       last_bottom_spacing = paper->c_variable ("last-bottom-spacing");
       top_system_spacing = paper->c_variable ("top-system-spacing");
       if (scm_is_pair (systems) && unsmob_prob (scm_car (systems)))
-       top_system_spacing = paper->c_variable ("top-markup-spacing");
+        top_system_spacing = paper->c_variable ("top-markup-spacing");
 
       // Note: the page height here does _not_ reserve space for headers and
       // footers. This is because we want to anchor the top-system-spacing
       // spring at the _top_ of the header.
       page_height_ -= robust_scm2double (paper->c_variable ("top-margin"), 0)
-       + robust_scm2double (paper->c_variable ("bottom-margin"), 0);
+                      + robust_scm2double (paper->c_variable ("bottom-margin"), 0);
 
       read_spacing_spec (top_system_spacing, &header_padding_, ly_symbol2scm ("padding"));
       read_spacing_spec (last_bottom_spacing, &footer_padding_, ly_symbol2scm ("padding"));
     }
   bool last_system_was_title = false;
 
-
   for (SCM s = systems; scm_is_pair (s); s = scm_cdr (s))
     {
       bool first = (s == systems);
 
       if (Grob *g = unsmob_grob (scm_car (s)))
-       {
-         System *sys = dynamic_cast<System*> (g);
-         if (!sys)
-           {
-             programming_error ("got a grob for vertical spacing that wasn't a System");
-             continue;
-           }
-
-         SCM spec = system_system_spacing;
-         if (first)
-           spec = top_system_spacing;
-         else if (last_system_was_title)
-           spec = markup_system_spacing;
-         else if (0 == Paper_column::get_rank (sys->get_bound (LEFT)))
-           spec = score_system_spacing;
-
-         Spring spring (0, 0);
-         Real padding = 0.0;
-         Real indent = line_dimensions_int (sys->paper_score ()->layout (), sys->get_rank ())[LEFT];
-         alter_spring_from_spacing_spec (spec, &spring);
-         read_spacing_spec (spec, &padding, ly_symbol2scm ("padding"));
-
-         append_system (sys, spring, indent, padding);
-         last_system_was_title = false;
-       }
+        {
+          System *sys = dynamic_cast<System *> (g);
+          if (!sys)
+            {
+              programming_error ("got a grob for vertical spacing that wasn't a System");
+              continue;
+            }
+
+          SCM spec = system_system_spacing;
+          if (first)
+            spec = top_system_spacing;
+          else if (last_system_was_title)
+            spec = markup_system_spacing;
+          else if (0 == Paper_column::get_rank (sys->get_bound (LEFT)))
+            spec = score_system_spacing;
+
+          Spring spring (0, 0);
+          Real padding = 0.0;
+          Real indent = line_dimensions_int (sys->paper_score ()->layout (), sys->get_rank ())[LEFT];
+          alter_spring_from_spacing_spec (spec, &spring);
+          read_spacing_spec (spec, &padding, ly_symbol2scm ("padding"));
+
+          append_system (sys, spring, indent, padding);
+          last_system_was_title = false;
+        }
       else if (Prob *p = unsmob_prob (scm_car (s)))
-       {
-         SCM spec = first ? top_system_spacing
-           : (last_system_was_title ? markup_markup_spacing : score_markup_spacing);
-         Spring spring (0, 0);
-         Real padding = 0.0;
-         alter_spring_from_spacing_spec (spec, &spring);
-         read_spacing_spec (spec, &padding, ly_symbol2scm ("padding"));
-
-         append_prob (p, spring, padding);
-         last_system_was_title = true;
-       }
+        {
+          SCM spec = first ? top_system_spacing
+                     : (last_system_was_title ? markup_markup_spacing : score_markup_spacing);
+          Spring spring (0, 0);
+          Real padding = 0.0;
+          alter_spring_from_spacing_spec (spec, &spring);
+          read_spacing_spec (spec, &padding, ly_symbol2scm ("padding"));
+
+          append_prob (p, spring, padding);
+          last_system_was_title = true;
+        }
       else
-       programming_error ("got a system that was neither a Grob nor a Prob");
+        programming_error ("got a system that was neither a Grob nor a Prob");
     }
 
   Spring last_spring (0, 0);
@@ -438,15 +437,15 @@ Page_layout_problem::Page_layout_problem (Paper_book *pb, SCM page_scm, SCM syst
       // bottom-space has the flexibility that one can do it per-system.
       // NOTE: bottom-space is misnamed since it is not stretchable space.
       if (Prob *p = elements_.back ().prob)
-       bottom_padding = robust_scm2double (p->get_property ("bottom-space"), 0);
+        bottom_padding = robust_scm2double (p->get_property ("bottom-space"), 0);
       else if (elements_.back ().staves.size ())
-       {
-         SCM details = get_details (elements_.back ());
-         bottom_padding = robust_scm2double (ly_assoc_get (ly_symbol2scm ("bottom-space"),
-                                                           details,
-                                                           SCM_BOOL_F),
-                                             0.0);
-       }
+        {
+          SCM details = get_details (elements_.back ());
+          bottom_padding = robust_scm2double (ly_assoc_get (ly_symbol2scm ("bottom-space"),
+                                                            details,
+                                                            SCM_BOOL_F),
+                                              0.0);
+        }
       page_height_ -= bottom_padding;
     }
 }
@@ -464,7 +463,7 @@ Page_layout_problem::set_footer_height (Real height)
 }
 
 void
-Page_layout_problem::append_system (System *sys, Spring constspring, Real indent, Real padding)
+Page_layout_problem::append_system (System *sys, Spring const &spring, Real indent, Real padding)
 {
   Grob *align = sys->get_vertical_alignment ();
   if (!align)
@@ -473,7 +472,7 @@ Page_layout_problem::append_system (System *sys, Spring const& spring, Real inde
   align->set_property ("positioning-done", SCM_BOOL_T);
 
   extract_grob_set (align, "elements", all_elts);
-  vector<Grob*> elts = filter_dead_elements (all_elts);
+  vector<Grob *> elts = filter_dead_elements (all_elts);
   vector<Real> minimum_offsets = Align_interface::get_minimum_translations_without_min_dist (align, elts, Y_AXIS);
   vector<Real> minimum_offsets_with_min_dist = Align_interface::get_minimum_translations (align, elts, Y_AXIS);
 
@@ -509,38 +508,38 @@ Page_layout_problem::append_system (System *sys, Spring const& spring, Real inde
   for (vsize i = 0; i < elts.size (); ++i)
     {
       if (is_spaceable (elts[i]))
-       {
-         // We don't add a spring for the first staff, since
-         // we are only adding springs _between_ staves here.
-         if (!found_spaceable_staff)
-           {
-             found_spaceable_staff = true;
-             last_spaceable_staff = i;
-             continue;
-           }
-
-         Spring spring (0.5, 0.0);
-         SCM spec = elts[last_spaceable_staff]->get_property ("staff-staff-spacing");
-         alter_spring_from_spacing_spec (spec, &spring);
-
-         springs_.push_back (spring);
-         Real min_distance = (found_spaceable_staff ? minimum_offsets_with_min_dist[last_spaceable_staff] : 0) - minimum_offsets_with_min_dist[i];
-         springs_.back ().ensure_min_distance (min_distance);
-
-         if (scm_is_pair (manual_dists))
-           {
-             if (scm_is_number (scm_car (manual_dists)))
-               {
-                 Real dy = scm_to_double (scm_car (manual_dists));
-
-                 springs_.back ().set_distance (dy);
-                 springs_.back ().set_min_distance (dy);
-                 springs_.back ().set_inverse_stretch_strength (0);
-               }
-             manual_dists = scm_cdr (manual_dists);
-           }
-         last_spaceable_staff = i;
-       }
+        {
+          // We don't add a spring for the first staff, since
+          // we are only adding springs _between_ staves here.
+          if (!found_spaceable_staff)
+            {
+              found_spaceable_staff = true;
+              last_spaceable_staff = i;
+              continue;
+            }
+
+          Spring spring (0.5, 0.0);
+          SCM spec = elts[last_spaceable_staff]->get_property ("staff-staff-spacing");
+          alter_spring_from_spacing_spec (spec, &spring);
+
+          springs_.push_back (spring);
+          Real min_distance = (found_spaceable_staff ? minimum_offsets_with_min_dist[last_spaceable_staff] : 0) - minimum_offsets_with_min_dist[i];
+          springs_.back ().ensure_min_distance (min_distance);
+
+          if (scm_is_pair (manual_dists))
+            {
+              if (scm_is_number (scm_car (manual_dists)))
+                {
+                  Real dy = scm_to_double (scm_car (manual_dists));
+
+                  springs_.back ().set_distance (dy);
+                  springs_.back ().set_min_distance (dy);
+                  springs_.back ().set_inverse_stretch_strength (0);
+                }
+              manual_dists = scm_cdr (manual_dists);
+            }
+          last_spaceable_staff = i;
+        }
     }
 
   // Corner case: there was only one staff, and it wasn't spaceable.
@@ -551,7 +550,7 @@ Page_layout_problem::append_system (System *sys, Spring const& spring, Real inde
 }
 
 void
-Page_layout_problem::append_prob (Prob *prob, Spring constspring, Real padding)
+Page_layout_problem::append_prob (Prob *prob, Spring const &spring, Real padding)
 {
   Skyline_pair *sky = Skyline_pair::unsmob (prob->get_property ("vertical-skylines"));
   Real minimum_distance = 0;
@@ -599,19 +598,19 @@ Page_layout_problem::solve_rod_spring_problem (bool ragged)
   if (!spacer.fits ())
     {
       Real overflow = spacer.configuration_length (spacer.force ())
-                     - page_height_;
+                      - page_height_;
       if (ragged && overflow < 1e-6)
-       warning (_ ("cannot fit music on page: ragged-spacing was requested, but page was compressed"));
+        warning (_ ("cannot fit music on page: ragged-spacing was requested, but page was compressed"));
       else
-       {
-         warning (_f ("cannot fit music on page: overflow is %f",
-                      overflow));
-         warning (_ ("compressing music to fit"));
-         vsize space_count = solution_.size ();
-         Real spacing_increment = overflow / (space_count - 2);
-         for (vsize i = 2; i < space_count; i++)
-           solution_[i] -= (i-1) * spacing_increment;
-       }
+        {
+          warning (_f ("cannot fit music on page: overflow is %f",
+                       overflow));
+          warning (_ ("compressing music to fit"));
+          vsize space_count = solution_.size ();
+          Real spacing_increment = overflow / (space_count - 2);
+          for (vsize i = 2; i < space_count; i++)
+            solution_[i] -= (i - 1) * spacing_increment;
+        }
     }
 }
 
@@ -628,7 +627,7 @@ Page_layout_problem::find_system_offsets ()
 
   // spring_idx 0 is the top of the page. Interesting values start from 1.
   vsize spring_idx = 1;
-  vector<Grob*> loose_lines;
+  vector<Grob *> loose_lines;
   vector<Real> loose_line_min_distances;
   Grob *last_spaceable_line = 0;
   Real last_spaceable_line_translation = 0;
@@ -636,126 +635,127 @@ Page_layout_problem::find_system_offsets ()
   for (vsize i = 0; i < elements_.size (); ++i)
     {
       if (elements_[i].prob)
-       {
-         *tail = scm_cons (scm_from_double (solution_[spring_idx]), SCM_EOL);
-         tail = SCM_CDRLOC (*tail);
-         Interval prob_extent = unsmob_stencil (elements_[i].prob->get_property ("stencil"))->extent (Y_AXIS);
-
-         // Lay out any non-spaceable lines between this line and
-         // the last one.
-         if (loose_lines.size ())
-           {
-             Interval loose_extent = loose_lines.back ()->extent (loose_lines.back (), Y_AXIS);
-             Real min_distance = (-loose_extent[DOWN] + prob_extent[UP]
-                                  + elements_[i].padding);
-
-             loose_line_min_distances.push_back (min_distance);
-             loose_lines.push_back (0);
-
-             distribute_loose_lines (loose_lines, loose_line_min_distances,
-                                     last_spaceable_line_translation, -solution_[spring_idx]);
-             loose_lines.clear ();
-             loose_line_min_distances.clear ();
-           }
-
-         last_spaceable_line = 0;
-         last_spaceable_line_translation = -solution_[spring_idx];
-         last_title_extent = prob_extent;
-         spring_idx++;
-       }
+        {
+          *tail = scm_cons (scm_from_double (solution_[spring_idx]), SCM_EOL);
+          tail = SCM_CDRLOC (*tail);
+          Interval prob_extent = unsmob_stencil (elements_[i].prob->get_property ("stencil"))->extent (Y_AXIS);
+
+          // Lay out any non-spaceable lines between this line and
+          // the last one.
+          if (loose_lines.size ())
+            {
+              Interval loose_extent = loose_lines.back ()->extent (loose_lines.back (), Y_AXIS);
+              Real min_distance = (-loose_extent[DOWN] + prob_extent[UP]
+                                   + elements_[i].padding);
+
+              loose_line_min_distances.push_back (min_distance);
+              loose_lines.push_back (0);
+
+              distribute_loose_lines (loose_lines, loose_line_min_distances,
+                                      last_spaceable_line_translation, -solution_[spring_idx]);
+              loose_lines.clear ();
+              loose_line_min_distances.clear ();
+            }
+
+          last_spaceable_line = 0;
+          last_spaceable_line_translation = -solution_[spring_idx];
+          last_title_extent = prob_extent;
+          spring_idx++;
+        }
       else
-       {
-         // Getting this signs right here is a little tricky. The configuration
-         // we return has zero at the top of the page and positive numbers further
-         // down, as does the solution_ vector.  Within a staff, however, positive
-         // numbers are up.
-         // TODO: perhaps change the way the page 'configuration variable works so
-         // that it is consistent with the usual up/down sign conventions in
-         // Lilypond. Then this would be less confusing.
-
-         // These two positions are relative to the page (with positive numbers being
-         // down).
-         Real first_staff_position = solution_[spring_idx];
-         Real first_staff_min_translation = elements_[i].min_offsets.size () ? elements_[i].min_offsets[0] : 0;
-         Real system_position = first_staff_position + first_staff_min_translation;
-
-         // Position the staves within this system.
-         vector<Real> const& min_offsets = elements_[i].min_offsets;
-         bool found_spaceable_staff = false;
-         for (vsize staff_idx = 0; staff_idx < elements_[i].staves.size (); ++staff_idx)
-           {
-             Grob *staff = elements_[i].staves[staff_idx];
-             staff->set_property ("system-Y-offset", scm_from_double (-system_position));
-
-             if (is_spaceable (staff))
-               {
-                 // this is relative to the system: negative numbers are down.
-                 staff->translate_axis (system_position - solution_[spring_idx], Y_AXIS);
-
-                 // Lay out any non-spaceable lines between this line and
-                 // the last one.
-                 if (loose_lines.size ())
-                   {
-                     if (staff_idx)
-                       loose_line_min_distances.push_back (min_offsets[staff_idx-1] - min_offsets[staff_idx]);
-                     else
-                       loose_line_min_distances.push_back (elements_[i].padding - min_offsets[staff_idx]);
-                     loose_lines.push_back (staff);
-
-                     distribute_loose_lines (loose_lines, loose_line_min_distances,
-                                             last_spaceable_line_translation, -solution_[spring_idx]);
-                     loose_lines.clear ();
-                     loose_line_min_distances.clear ();
-                   }
-                 last_spaceable_line = staff;
-                 last_spaceable_line_translation = -solution_[spring_idx];
-                 found_spaceable_staff = true;
-                 spring_idx++;
-               }
-             else
-               {
-                 if (loose_lines.empty ())
-                   loose_lines.push_back (last_spaceable_line);
-
-                 if (staff_idx)
-                   // NOTE: the way we do distances between loose lines (and other lines too, actually)
-                   // is not the most accurate way possible: we only insert rods between adjacent
-                   // lines.  To be more accurate, we could insert rods between non-adjacent lines
-                   // using a scheme similar to the one in set_column_rods.
-                   loose_line_min_distances.push_back (min_offsets[staff_idx-1] - min_offsets[staff_idx]);
-                 else
-                   { // this is the first line in a system
-                     Real min_dist = 0;
-                     if (loose_lines.back ())
-                       // distance to the final line in the preceding system,
-                       // including 'system-system-spacing 'padding
-                       min_dist = (Axis_group_interface::minimum_distance (loose_lines.back (),
-                                                                           staff,
-                                                                           Y_AXIS)
-                                   + elements_[i].padding);
-                     else if (!last_title_extent.is_empty ())
-                       // distance to the preceding title,
-                       //  including 'markup-system-spacing 'padding
-                       min_dist = (staff->extent (staff, Y_AXIS)[UP] - last_title_extent[DOWN]
-                                   + elements_[i].padding);
-                     else // distance to the top margin
-                       min_dist = header_padding_ + header_height_ + staff->extent (staff, Y_AXIS)[UP];
-
-                     loose_line_min_distances.push_back (min_dist);
-                   }
-                 loose_lines.push_back (staff);
-               }
-           }
-
-         // Corner case: even if a system has no live staves, it still takes up
-         // one spring (a system with one live staff also takes up one spring),
-         // which we need to increment past.
-         if (!found_spaceable_staff)
-           spring_idx++;
-
-         *tail = scm_cons (scm_from_double (system_position), SCM_EOL);
-         tail = SCM_CDRLOC (*tail);
-       }
+        {
+          // Getting this signs right here is a little tricky. The configuration
+          // we return has zero at the top of the page and positive numbers further
+          // down, as does the solution_ vector.  Within a staff, however, positive
+          // numbers are up.
+          // TODO: perhaps change the way the page 'configuration variable works so
+          // that it is consistent with the usual up/down sign conventions in
+          // Lilypond. Then this would be less confusing.
+
+          // These two positions are relative to the page (with positive numbers being
+          // down).
+          Real first_staff_position = solution_[spring_idx];
+          Real first_staff_min_translation = elements_[i].min_offsets.size () ? elements_[i].min_offsets[0] : 0;
+          Real system_position = first_staff_position + first_staff_min_translation;
+
+          // Position the staves within this system.
+          vector<Real> const &min_offsets = elements_[i].min_offsets;
+          bool found_spaceable_staff = false;
+          for (vsize staff_idx = 0; staff_idx < elements_[i].staves.size (); ++staff_idx)
+            {
+              Grob *staff = elements_[i].staves[staff_idx];
+              staff->set_property ("system-Y-offset", scm_from_double (-system_position));
+
+              if (is_spaceable (staff))
+                {
+                  // this is relative to the system: negative numbers are down.
+                  staff->translate_axis (system_position - solution_[spring_idx], Y_AXIS);
+
+                  // Lay out any non-spaceable lines between this line and
+                  // the last one.
+                  if (loose_lines.size ())
+                    {
+                      if (staff_idx)
+                        loose_line_min_distances.push_back (min_offsets[staff_idx - 1] - min_offsets[staff_idx]);
+                      else
+                        loose_line_min_distances.push_back (elements_[i].padding - min_offsets[staff_idx]);
+                      loose_lines.push_back (staff);
+
+                      distribute_loose_lines (loose_lines, loose_line_min_distances,
+                                              last_spaceable_line_translation, -solution_[spring_idx]);
+                      loose_lines.clear ();
+                      loose_line_min_distances.clear ();
+                    }
+                  last_spaceable_line = staff;
+                  last_spaceable_line_translation = -solution_[spring_idx];
+                  found_spaceable_staff = true;
+                  spring_idx++;
+                }
+              else
+                {
+                  if (loose_lines.empty ())
+                    loose_lines.push_back (last_spaceable_line);
+
+                  if (staff_idx)
+                    // NOTE: the way we do distances between loose lines (and other lines too, actually)
+                    // is not the most accurate way possible: we only insert rods between adjacent
+                    // lines.  To be more accurate, we could insert rods between non-adjacent lines
+                    // using a scheme similar to the one in set_column_rods.
+                    loose_line_min_distances.push_back (min_offsets[staff_idx - 1] - min_offsets[staff_idx]);
+                  else
+                    {
+                      // this is the first line in a system
+                      Real min_dist = 0;
+                      if (loose_lines.back ())
+                        // distance to the final line in the preceding system,
+                        // including 'system-system-spacing 'padding
+                        min_dist = (Axis_group_interface::minimum_distance (loose_lines.back (),
+                                                                            staff,
+                                                                            Y_AXIS)
+                                    + elements_[i].padding);
+                      else if (!last_title_extent.is_empty ())
+                        // distance to the preceding title,
+                        //  including 'markup-system-spacing 'padding
+                        min_dist = (staff->extent (staff, Y_AXIS)[UP] - last_title_extent[DOWN]
+                                    + elements_[i].padding);
+                      else // distance to the top margin
+                        min_dist = header_padding_ + header_height_ + staff->extent (staff, Y_AXIS)[UP];
+
+                      loose_line_min_distances.push_back (min_dist);
+                    }
+                  loose_lines.push_back (staff);
+                }
+            }
+
+          // Corner case: even if a system has no live staves, it still takes up
+          // one spring (a system with one live staff also takes up one spring),
+          // which we need to increment past.
+          if (!found_spaceable_staff)
+            spring_idx++;
+
+          *tail = scm_cons (scm_from_double (system_position), SCM_EOL);
+          tail = SCM_CDRLOC (*tail);
+        }
     }
 
   if (loose_lines.size ())
@@ -766,7 +766,7 @@ Page_layout_problem::find_system_offsets ()
       loose_lines.push_back (0);
 
       distribute_loose_lines (loose_lines, loose_line_min_distances,
-                             last_spaceable_line_translation, -page_height_);
+                              last_spaceable_line_translation, -page_height_);
 
     }
 
@@ -779,14 +779,14 @@ Page_layout_problem::find_system_offsets ()
 // them.
 // first_translation and last_translation are relative to the page.
 void
-Page_layout_problem::distribute_loose_lines (vector<Grob*> const &loose_lines,
-                                            vector<Real> const &min_distances,
-                                            Real first_translation, Real last_translation)
+Page_layout_problem::distribute_loose_lines (vector<Grob *> const &loose_lines,
+                                             vector<Real> const &min_distances,
+                                             Real first_translation, Real last_translation)
 {
   Simple_spacer spacer;
   for (vsize i = 0; i + 1 < loose_lines.size (); ++i)
     {
-      SCM spec = get_spacing_spec (loose_lines[i], loose_lines[i+1], false, 0, INT_MAX);
+      SCM spec = get_spacing_spec (loose_lines[i], loose_lines[i + 1], false, 0, INT_MAX);
       Spring spring (1.0, 0.0);
       alter_spring_from_spacing_spec (spec, &spring);
       spring.ensure_min_distance (min_distances[i]);
@@ -821,10 +821,10 @@ Page_layout_problem::solution (bool ragged)
 // The upper skyline is relative to the top staff; the lower skyline is relative to
 // the bottom staff.
 void
-Page_layout_problem::build_system_skyline (vector<Grob*> const& staves,
-                                          vector<Real> const& minimum_translations,
-                                          Skyline *up,
-                                          Skyline *down)
+Page_layout_problem::build_system_skyline (vector<Grob *> const &staves,
+                                           vector<Real> const &minimum_translations,
+                                           Skyline *up,
+                                           Skyline *down)
 {
   if (minimum_translations.empty ())
     return;
@@ -841,24 +841,24 @@ Page_layout_problem::build_system_skyline (vector<Grob*> const& staves,
       Grob *g = staves[i];
       Skyline_pair *sky = Skyline_pair::unsmob (g->get_property ("vertical-skylines"));
       if (sky)
-       {
-         up->raise (-dy);
-         up->merge ((*sky)[UP]);
-         up->raise (dy);
-
-         down->raise (-dy);
-         down->merge ((*sky)[DOWN]);
-         down->raise (dy);
-       }
+        {
+          up->raise (-dy);
+          up->merge ((*sky)[UP]);
+          up->raise (dy);
+
+          down->raise (-dy);
+          down->merge ((*sky)[DOWN]);
+          down->raise (dy);
+        }
       if (is_spaceable (staves[i]))
-       {
-         if (!found_spaceable_staff)
-           {
-             found_spaceable_staff = true;
-             first_spaceable_dy = dy;
-           }
-         last_spaceable_dy = dy;
-       }
+        {
+          if (!found_spaceable_staff)
+            {
+              found_spaceable_staff = true;
+              first_spaceable_dy = dy;
+            }
+          last_spaceable_dy = dy;
+        }
     }
 
   // Leave the up skyline at a position relative
@@ -878,7 +878,7 @@ Page_layout_problem::prob_extent (Prob *p)
 }
 
 Interval
-Page_layout_problem::first_staff_extent (Element conste)
+Page_layout_problem::first_staff_extent (Element const &e)
 {
   if (e.prob)
     return prob_extent (e.prob);
@@ -889,7 +889,7 @@ Page_layout_problem::first_staff_extent (Element const& e)
 }
 
 Interval
-Page_layout_problem::last_staff_extent (Element conste)
+Page_layout_problem::last_staff_extent (Element const &e)
 {
   if (e.prob)
     return prob_extent (e.prob);
@@ -900,7 +900,7 @@ Page_layout_problem::last_staff_extent (Element const& e)
 }
 
 SCM
-Page_layout_problem::get_details (Element constelt)
+Page_layout_problem::get_details (Element const &elt)
 {
   if (elt.staves.empty ())
     return SCM_EOL;
@@ -911,7 +911,7 @@ Page_layout_problem::get_details (Element const& elt)
 SCM
 Page_layout_problem::get_details (Grob *g)
 {
-  Grob *left_bound = dynamic_cast<Spanner*> (g)->get_bound (LEFT);
+  Grob *left_bound = dynamic_cast<Spanner *> (g)->get_bound (LEFT);
   return left_bound->get_property ("line-break-system-details");
 }
 
@@ -928,7 +928,7 @@ Page_layout_problem::mark_as_spaceable (Grob *g)
 }
 
 bool
-Page_layout_problem::read_spacing_spec (SCM spec, Realdest, SCM sym)
+Page_layout_problem::read_spacing_spec (SCM spec, Real *dest, SCM sym)
 {
   SCM pair = scm_sloppy_assq (sym, spec);
   if (scm_is_pair (pair) && scm_is_number (scm_cdr (pair)))
@@ -946,17 +946,17 @@ Page_layout_problem::read_spacing_spec (SCM spec, Real* dest, SCM sym)
 Real
 Page_layout_problem::get_fixed_spacing (Grob *before, Grob *after, int spaceable_index, bool pure, int start, int end)
 {
-  Spanner *after_sp = dynamic_cast<Spanner*> (after);
+  Spanner *after_sp = dynamic_cast<Spanner *> (after);
   SCM cache_symbol = (is_spaceable (before) && is_spaceable (after))
-    ? ly_symbol2scm ("spaceable-fixed-spacing")
-    : ly_symbol2scm ("loose-fixed-spacing");
+                     ? ly_symbol2scm ("spaceable-fixed-spacing")
+                     : ly_symbol2scm ("loose-fixed-spacing");
   if (pure)
     {
       // The result of this function doesn't depend on "end," so we can reduce the
       // size of the cache by ignoring it.
       SCM cached = after_sp->get_cached_pure_property (cache_symbol, start, 0);
       if (scm_is_number (cached))
-       return robust_scm2double (cached, 0.0);
+        return robust_scm2double (cached, 0.0);
     }
 
   Real ret = -infinity_f;
@@ -971,11 +971,11 @@ Page_layout_problem::get_fixed_spacing (Grob *before, Grob *after, int spaceable
       SCM details = left_bound->get_property ("line-break-system-details");
       SCM manual_dists = ly_assoc_get (ly_symbol2scm ("alignment-distances"), details, SCM_EOL);
       if (scm_is_pair (manual_dists))
-       {
-         SCM forced = robust_list_ref (spaceable_index - 1, manual_dists);
-         if (scm_is_number (forced))
-           ret = max (ret, scm_to_double (forced));
-       }
+        {
+          SCM forced = robust_list_ref (spaceable_index - 1, manual_dists);
+          if (scm_is_number (forced))
+            ret = max (ret, scm_to_double (forced));
+        }
     }
 
   // Cache the result.  As above, we ignore "end."
@@ -1016,44 +1016,44 @@ Page_layout_problem::get_spacing_spec (Grob *before, Grob *after, bool pure, int
   if (is_spaceable (before))
     {
       if (is_spaceable (after))
-       return before->get_maybe_pure_property ("staff-staff-spacing", pure, start, end);
+        return before->get_maybe_pure_property ("staff-staff-spacing", pure, start, end);
       else
-       {
-         Direction affinity = to_dir (after->get_maybe_pure_property ("staff-affinity", pure, start, end));
-         return (affinity == DOWN)
-           ? add_stretchability (after->get_maybe_pure_property ("nonstaff-unrelatedstaff-spacing", pure, start, end),
-                                 LARGE_STRETCH)
-           : after->get_maybe_pure_property ("nonstaff-relatedstaff-spacing", pure, start, end);
-       }
+        {
+          Direction affinity = to_dir (after->get_maybe_pure_property ("staff-affinity", pure, start, end));
+          return (affinity == DOWN)
+                 ? add_stretchability (after->get_maybe_pure_property ("nonstaff-unrelatedstaff-spacing", pure, start, end),
+                                       LARGE_STRETCH)
+                 : after->get_maybe_pure_property ("nonstaff-relatedstaff-spacing", pure, start, end);
+        }
     }
   else
     {
       if (is_spaceable (after))
-       {
-         Direction affinity = to_dir (before->get_maybe_pure_property ("staff-affinity", pure, start, end));
-         return (affinity == UP)
-           ? add_stretchability (before->get_maybe_pure_property ("nonstaff-unrelatedstaff-spacing", pure, start, end),
-                                 LARGE_STRETCH)
-           : before->get_maybe_pure_property ("nonstaff-relatedstaff-spacing", pure, start, end);
-       }
+        {
+          Direction affinity = to_dir (before->get_maybe_pure_property ("staff-affinity", pure, start, end));
+          return (affinity == UP)
+                 ? add_stretchability (before->get_maybe_pure_property ("nonstaff-unrelatedstaff-spacing", pure, start, end),
+                                       LARGE_STRETCH)
+                 : before->get_maybe_pure_property ("nonstaff-relatedstaff-spacing", pure, start, end);
+        }
       else
-       {
-         Direction before_affinity = to_dir (before->get_maybe_pure_property ("staff-affinity", pure, start, end));
-         Direction after_affinity = to_dir (after->get_maybe_pure_property ("staff-affinity", pure, start, end));
-         static bool warned = false;
-         if (after_affinity > before_affinity
-             && !warned && !pure)
-           {
-             warning (_ ("staff-affinities should only decrease"));
-             warned = true;
-           }
-         if (before_affinity != UP)
-           return before->get_maybe_pure_property ("nonstaff-nonstaff-spacing", pure, start, end);
-         else if (after_affinity != DOWN)
-           return before->get_maybe_pure_property ("nonstaff-nonstaff-spacing", pure, start, end);
-         return add_stretchability (before->get_maybe_pure_property ("nonstaff-unrelatedstaff-spacing", pure, start, end),
-                                    LARGE_STRETCH);
-       }
+        {
+          Direction before_affinity = to_dir (before->get_maybe_pure_property ("staff-affinity", pure, start, end));
+          Direction after_affinity = to_dir (after->get_maybe_pure_property ("staff-affinity", pure, start, end));
+          static bool warned = false;
+          if (after_affinity > before_affinity
+              && !warned && !pure)
+            {
+              warning (_ ("staff-affinities should only decrease"));
+              warned = true;
+            }
+          if (before_affinity != UP)
+            return before->get_maybe_pure_property ("nonstaff-nonstaff-spacing", pure, start, end);
+          else if (after_affinity != DOWN)
+            return before->get_maybe_pure_property ("nonstaff-nonstaff-spacing", pure, start, end);
+          return add_stretchability (before->get_maybe_pure_property ("nonstaff-unrelatedstaff-spacing", pure, start, end),
+                                     LARGE_STRETCH);
+        }
     }
 
   assert (0);
@@ -1061,7 +1061,7 @@ Page_layout_problem::get_spacing_spec (Grob *before, Grob *after, bool pure, int
 }
 
 void
-Page_layout_problem::alter_spring_from_spacing_spec (SCM spec, Springspring)
+Page_layout_problem::alter_spring_from_spacing_spec (SCM spec, Spring *spring)
 {
   Real space;
   Real stretch;
@@ -1076,17 +1076,17 @@ Page_layout_problem::alter_spring_from_spacing_spec (SCM spec, Spring* spring)
     spring->set_inverse_stretch_strength (stretch);
 }
 
-vector<Grob*>
-Page_layout_problem::filter_dead_elements (vector<Grob*> const& input)
+vector<Grob *>
+Page_layout_problem::filter_dead_elements (vector<Grob *> const &input)
 {
-  vector<Grob*> output;
+  vector<Grob *> output;
   for (vsize i = 0; i < input.size (); ++i)
     {
       if (Hara_kiri_group_spanner::has_interface (input[i]))
-       Hara_kiri_group_spanner::consider_suicide (input[i]);
+        Hara_kiri_group_spanner::consider_suicide (input[i]);
 
       if (input[i]->is_live ())
-       output.push_back (input[i]);
+        output.push_back (input[i]);
     }
 
   return output;
index 09bb3abdfe12b819a7c9d61f17dad700ff41c442..4a63442147b3c6416e2ca6b934be2ddc76480664 100644 (file)
@@ -20,9 +20,9 @@
 #include "page-marker.hh"
 
 LY_DEFINE (ly_make_page_permission_marker, "ly:make-page-permission-marker",
-          2, 0, 0,
-          (SCM symbol, SCM permission),
-          "Return page marker with page breaking and turning permissions.")
+           2, 0, 0,
+           (SCM symbol, SCM permission),
+           "Return page marker with page breaking and turning permissions.")
 {
   LY_ASSERT_TYPE (ly_is_symbol, symbol, 1);
   Page_marker *page_marker = new Page_marker ();
@@ -31,9 +31,9 @@ LY_DEFINE (ly_make_page_permission_marker, "ly:make-page-permission-marker",
 }
 
 LY_DEFINE (ly_make_page_label_marker, "ly:make-page-label-marker",
-          1, 0, 0,
-          (SCM label),
-          "Return page marker with label @var{label}.")
+           1, 0, 0,
+           (SCM label),
+           "Return page marker with label @var{label}.")
 {
   LY_ASSERT_TYPE (ly_is_symbol, label, 1);
   Page_marker *page_marker = new Page_marker ();
index 827dbd44444fca9e450f58bd1820b53bda917499..6768310eb23d138fa73115ae33f249fb231a17aa 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2007--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
-  
+
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ Page_spacing_result::Page_spacing_result ()
 vsize
 Page_spacing_result::page_count () const
 {
-  return systems_per_page_.size();
+  return systems_per_page_.size ();
 }
 
 Real
@@ -48,8 +48,8 @@ Page_spacing_result::average_force () const
 void
 Page_spacing_result::print () const
 {
-  printf ("penalty %lf, demerits %lf\n" , penalty_, demerits_);
+  printf ("penalty %lf, demerits %lf\n", penalty_, demerits_);
   for (vsize i = 0; i < page_count (); i++)
     printf (" %d:  #sys=%d, force=%lf\n", int (i), int (systems_per_page_[i]),
-           force_[i]);
+            force_[i]);
 }
index bae7ae6fb773d861440184ccf9685d194305eebb..32550066334e33ce22ea42cb1ebf88c805e17de8 100644 (file)
@@ -28,14 +28,14 @@ void
 Page_spacing::calc_force ()
 {
   Real height = page_height_
-    - breaker_->min_whitespace_at_top_of_page (first_line_)
-    - breaker_->min_whitespace_at_bottom_of_page (last_line_);
+                - breaker_->min_whitespace_at_top_of_page (first_line_)
+                - breaker_->min_whitespace_at_bottom_of_page (last_line_);
 
   if (rod_height_ + last_line_.bottom_padding_ >= height)
     force_ = -infinity_f;
   else
     force_ = (height - rod_height_ - last_line_.bottom_padding_ - spring_len_)
-      / max (0.1, inverse_spring_k_);
+             / max (0.1, inverse_spring_k_);
 }
 
 void
@@ -87,9 +87,9 @@ Page_spacing::account_for_footnotes (Line_details const &line)
     }
 
   return (footnote_height
-         - (has_footnotes_
-           ? breaker_->footnote_padding () + breaker_->footnote_footer_padding ()
-           : 0.0));
+          - (has_footnotes_
+             ? breaker_->footnote_padding () + breaker_->footnote_footer_padding ()
+             : 0.0));
 }
 
 void
@@ -102,7 +102,7 @@ Page_spacing::prepend_system (const Line_details &line)
 
   rod_height_ -= first_line_.full_height ();
   rod_height_ += first_line_.tallness_;
-  rod_height_ += line.full_height();
+  rod_height_ += line.full_height ();
   rod_height_ += account_for_footnotes (line);
   inverse_spring_k_ += line.inverse_hooke_;
 
@@ -119,7 +119,6 @@ Page_spacing::clear ()
   has_footnotes_ = false;
 }
 
-
 Page_spacer::Page_spacer (vector<Line_details> const &lines, vsize first_page_num, Page_breaking const *breaker)
   : lines_ (lines)
 {
@@ -137,18 +136,18 @@ Page_spacer::solve ()
     {
       simple_state_.resize (lines_.size ());
       for (vsize i = 0; i < lines_.size (); ++i)
-       calc_subproblem (VPOS, i);
+        calc_subproblem (VPOS, i);
     }
 
   Page_spacing_result ret;
   ret.penalty_ = simple_state_.back ().penalty_
-    + lines_.back ().page_penalty_ + lines_.back ().turn_penalty_;
+                 + lines_.back ().page_penalty_ + lines_.back ().turn_penalty_;
   ret.system_count_status_ = simple_state_.back ().system_count_status_;
 
   vsize system = lines_.size () - 1;
   while (system != VPOS)
     {
-      Page_spacing_node constcur = simple_state_[system];
+      Page_spacing_node const &cur = simple_state_[system];
       vsize system_count = (cur.prev_ == VPOS) ? system + 1 : system - cur.prev_;
 
       ret.force_.push_back (cur.force_);
@@ -174,45 +173,45 @@ Page_spacer::solve (vsize page_count)
   vsize extra_systems = 0;
   vsize extra_pages = 0;
 
-  if (isinf (state_.at (system, page_count-1).demerits_))
+  if (isinf (state_.at (system, page_count - 1).demerits_))
     {
       programming_error ("tried to space systems on a bad number of pages");
       /* Usually, this means that we tried to cram too many systems into
-        to few pages. To avoid crashing, we look for the largest number of
-        systems that we can fit properly onto the right number of pages.
-        All the systems that don't fit get tacked onto the last page.
+         to few pages. To avoid crashing, we look for the largest number of
+         systems that we can fit properly onto the right number of pages.
+         All the systems that don't fit get tacked onto the last page.
       */
       vsize i;
-      for (i = system; isinf (state_.at (i, page_count-1).demerits_) && i; i--)
-       ;
+      for (i = system; isinf (state_.at (i, page_count - 1).demerits_) && i; i--)
+        ;
 
       if (i)
-       {
-         extra_systems = system - i;
-         system = i;
-       }
+        {
+          extra_systems = system - i;
+          system = i;
+        }
       else
-       {
-         /* try chopping off pages from the end */
-         vsize j;
-         for (j = page_count; j && isinf (state_.at (system, j-1).demerits_); j--)
-           ;
-
-         if (j)
-           {
-             extra_pages = page_count - j;
-             page_count = j;
-           }
-         else
-           return Page_spacing_result (); /* couldn't salvage it -- probably going to crash */
-       }
+        {
+          /* try chopping off pages from the end */
+          vsize j;
+          for (j = page_count; j && isinf (state_.at (system, j - 1).demerits_); j--)
+            ;
+
+          if (j)
+            {
+              extra_pages = page_count - j;
+              page_count = j;
+            }
+          else
+            return Page_spacing_result (); /* couldn't salvage it -- probably going to crash */
+        }
     }
 
   ret.force_.resize (page_count);
   ret.systems_per_page_.resize (page_count);
-  ret.system_count_status_ = state_.at (system, page_count-1).system_count_status_;
-  ret.penalty_ = state_.at (system, page_count-1).penalty_
-    + lines_.back ().page_penalty_ + lines_.back ().turn_penalty_;
+  ret.system_count_status_ = state_.at (system, page_count - 1).system_count_status_;
+  ret.penalty_ = state_.at (system, page_count - 1).penalty_
+                 + lines_.back ().page_penalty_ + lines_.back ().turn_penalty_;
 
   ret.demerits_ = 0;
   for (vsize p = page_count; p--;)
@@ -223,9 +222,9 @@ Page_spacer::solve (vsize page_count)
       ret.force_[p] = ps.force_;
       ret.demerits_ += ps.force_ * ps.force_;
       if (p == 0)
-       ret.systems_per_page_[p] = system + 1;
+        ret.systems_per_page_[p] = system + 1;
       else
-       ret.systems_per_page_[p] = system - ps.prev_;
+        ret.systems_per_page_[p] = system - ps.prev_;
       system = ps.prev_;
     }
 
@@ -255,7 +254,7 @@ Page_spacer::resize (vsize page_count)
   for (vsize page = max_page_count_; page < page_count; page++)
     for (vsize line = page; line < lines_.size (); line++)
       if (!calc_subproblem (page, line))
-       break;
+        break;
 
   max_page_count_ = page_count;
 }
@@ -287,92 +286,92 @@ Page_spacer::calc_subproblem (vsize page, vsize line)
   vsize page_num = page == VPOS ? 0 : page;
   Real paper_height = breaker_->paper_height ();
   Page_spacing space (breaker_->page_height (page_num + first_page_num_, last),
-                     breaker_);
+                      breaker_);
   Page_spacing_node &cur = page == VPOS ? simple_state_[line] : state_.at (line, page);
   bool ragged = ragged_ || (ragged_last_ && last);
   int line_count = 0;
 
-  for (vsize page_start = line+1; page_start > page_num && page_start--;)
+  for (vsize page_start = line + 1; page_start > page_num && page_start--;)
     {
       Page_spacing_node const *prev = 0;
 
       if (page == VPOS)
-       {
-         if (page_start > 0)
-           {
-             prev = &simple_state_[page_start-1];
-             space.resize (breaker_->page_height (prev->page_ + 1, last));
-           }
-         else
-           space.resize (breaker_->page_height (first_page_num_, last));
-       }
+        {
+          if (page_start > 0)
+            {
+              prev = &simple_state_[page_start - 1];
+              space.resize (breaker_->page_height (prev->page_ + 1, last));
+            }
+          else
+            space.resize (breaker_->page_height (first_page_num_, last));
+        }
       else if (page > 0)
-       prev = &state_.at (page_start-1, page-1);
+        prev = &state_.at (page_start - 1, page - 1);
 
       space.prepend_system (lines_[page_start]);
 
       bool overfull = (space.rod_height_ > paper_height
-                      || (ragged
-                          && (space.rod_height_ + space.spring_len_ > paper_height)));
+                       || (ragged
+                           && (space.rod_height_ + space.spring_len_ > paper_height)));
       // This 'if' statement is a little hard to parse. It won't consider this configuration
       // if it is overfull unless the current configuration is the first one with this start
       // point. We also make an exception (and consider this configuration) if the previous
       // configuration we tried had fewer lines than min-systems-per-page.
       if (!breaker_->too_few_lines (line_count)
-         && page_start < line
-         && overfull)
-       break;
+          && page_start < line
+          && overfull)
+        break;
 
       line_count += lines_[page_start].compressed_nontitle_lines_count_;
       if (page > 0 || page_start == 0)
-       {
-         // If the last page is ragged, set its force to zero. This way, we will leave
-         // the last page half-empty rather than trying to balance things out
-         // (which only makes sense in non-ragged situations).
-         if (line == lines_.size () - 1 && ragged && last && space.force_ > 0)
-           space.force_ = 0;
-
-         Real demerits = space.force_ * space.force_;
-
-         // Clamp the demerits at BAD_SPACING_PENALTY, even if the page
-         // is overfull.  This ensures that TERRIBLE_SPACING_PENALTY takes
-         // precedence over overfull pages.
-         demerits = min (demerits, BAD_SPACING_PENALTY);
-         demerits += (prev ? prev->demerits_ : 0);
-
-         Real penalty = breaker_->line_count_penalty (line_count);
-         if (page_start > 0)
-           penalty += lines_[page_start-1].page_penalty_
-             + (page % 2 == 0) ? lines_[page_start-1].turn_penalty_ : 0;
-
-         /* Deal with widow/orphan lines */
-         /* Last line of paragraph is first line on the new page */
-         if ((page_start > 0) &&
-             (page_start < lines_.size ()) &&
-             (lines_[page_start].last_markup_line_))
-                 penalty += breaker_->orphan_penalty ();
-         /* First line of paragraph is last line on the previous page */
-         if ((page_start > 0) &&
-             (page_start < lines_.size ()) &&
-             (lines_[page_start-1].first_markup_line_))
-                 penalty += breaker_->orphan_penalty ();
-
-         demerits += penalty;
-         if (demerits < cur.demerits_ || page_start == line)
-           {
-             cur.demerits_ = demerits;
-             cur.force_ = space.force_;
-             cur.penalty_ = penalty + (prev ? prev->penalty_ : 0);
-             cur.system_count_status_ = breaker_->line_count_status (line_count)
-               | (prev ? prev->system_count_status_ : 0);
-             cur.prev_ = page_start - 1;
-             cur.page_ = prev ? prev->page_ + 1 : first_page_num_;
-           }
-       }
+        {
+          // If the last page is ragged, set its force to zero. This way, we will leave
+          // the last page half-empty rather than trying to balance things out
+          // (which only makes sense in non-ragged situations).
+          if (line == lines_.size () - 1 && ragged && last && space.force_ > 0)
+            space.force_ = 0;
+
+          Real demerits = space.force_ * space.force_;
+
+          // Clamp the demerits at BAD_SPACING_PENALTY, even if the page
+          // is overfull.  This ensures that TERRIBLE_SPACING_PENALTY takes
+          // precedence over overfull pages.
+          demerits = min (demerits, BAD_SPACING_PENALTY);
+          demerits += (prev ? prev->demerits_ : 0);
+
+          Real penalty = breaker_->line_count_penalty (line_count);
+          if (page_start > 0)
+            penalty += lines_[page_start - 1].page_penalty_
+                       + (page % 2 == 0) ? lines_[page_start - 1].turn_penalty_ : 0;
+
+          /* Deal with widow/orphan lines */
+          /* Last line of paragraph is first line on the new page */
+          if ((page_start > 0)
+              && (page_start < lines_.size ())
+              && (lines_[page_start].last_markup_line_))
+            penalty += breaker_->orphan_penalty ();
+          /* First line of paragraph is last line on the previous page */
+          if ((page_start > 0)
+              && (page_start < lines_.size ())
+              && (lines_[page_start - 1].first_markup_line_))
+            penalty += breaker_->orphan_penalty ();
+
+          demerits += penalty;
+          if (demerits < cur.demerits_ || page_start == line)
+            {
+              cur.demerits_ = demerits;
+              cur.force_ = space.force_;
+              cur.penalty_ = penalty + (prev ? prev->penalty_ : 0);
+              cur.system_count_status_ = breaker_->line_count_status (line_count)
+                                         | (prev ? prev->system_count_status_ : 0);
+              cur.prev_ = page_start - 1;
+              cur.page_ = prev ? prev->page_ + 1 : first_page_num_;
+            }
+        }
 
       if (page_start > 0
-         && lines_[page_start-1].page_permission_ == ly_symbol2scm ("force"))
-       break;
+          && lines_[page_start - 1].page_permission_ == ly_symbol2scm ("force"))
+        break;
     }
   return !isinf (cur.demerits_);
 }
index 5d08a24b91b3116c03b0a8963ce9dc104eb4ae4e..925a57c2182139d79bf1c2b78f68dcbdae94baf2 100644 (file)
@@ -29,7 +29,8 @@
 
 #include "translator.icc"
 
-class Page_turn_event {
+class Page_turn_event
+{
 public:
   SCM permission_;
   Real penalty_;
@@ -56,8 +57,8 @@ public:
 
     if (intersect.is_empty ())
       {
-       ret.push_back (*this);
-       return ret;
+        ret.push_back (*this);
+        return ret;
       }
 
     Real new_pen = max (penalty_, penalty.penalty_);
@@ -88,7 +89,7 @@ class Page_turn_engraver : public Engraver
 
   /* the next 3 are in sync (ie. same number of elements, etc.) */
   vector<Rational> breakable_moments_;
-  vector<Grob*> breakable_columns_;
+  vector<Grob *> breakable_columns_;
   vector<bool> special_barlines_;
 
   SCM max_permission (SCM perm1, SCM perm2);
@@ -114,7 +115,7 @@ Page_turn_engraver::Page_turn_engraver ()
   note_end_ = 0;
 }
 
-Grob*
+Grob *
 Page_turn_engraver::breakable_column (Page_turn_event const &brk)
 {
   vsize start = lower_bound (breakable_moments_, brk.duration_[LEFT], less<Rational> ());
@@ -147,9 +148,9 @@ Page_turn_engraver::acknowledge_note_head (Grob_info gi)
   Stream_event *cause = gi.event_cause ();
 
   Duration *dur_ptr = cause
-    ? unsmob_duration (cause->get_property ("duration"))
-    : 0;
-  
+                      ? unsmob_duration (cause->get_property ("duration"))
+                      : 0;
+
   if (!dur_ptr)
     return;
 
@@ -157,9 +158,9 @@ Page_turn_engraver::acknowledge_note_head (Grob_info gi)
     {
       Real pen = penalty ((now_mom () - rest_begin_).main_part_);
       if (!isinf (pen))
-         automatic_breaks_.push_back (Page_turn_event (rest_begin_.main_part_,
-                                                       now_mom ().main_part_,
-                                                       ly_symbol2scm ("allow"), 0));
+        automatic_breaks_.push_back (Page_turn_event (rest_begin_.main_part_,
+                                                      now_mom ().main_part_,
+                                                      ly_symbol2scm ("allow"), 0));
     }
 
   if (rest_begin_ <= repeat_begin_)
@@ -229,9 +230,9 @@ Page_turn_engraver::stop_translation_timestep ()
     {
       SCM command = scm_car (cs);
       if (command == ly_symbol2scm ("start-repeat"))
-       start = true;
+        start = true;
       else if (command == ly_symbol2scm ("end-repeat"))
-       end = true;
+        end = true;
     }
 
   if (end && repeat_begin_.main_part_ >= Moment (0))
@@ -240,12 +241,12 @@ Page_turn_engraver::stop_translation_timestep ()
       Real pen = penalty ((now_mom () - rest_begin_).main_part_ + repeat_begin_rest_length_);
       Moment *m = unsmob_moment (get_property ("minimumRepeatLengthForPageTurn"));
       if (m && *m > (now_mom () - repeat_begin_))
-       pen = infinity_f;
+        pen = infinity_f;
 
       if (pen == infinity_f)
-       repeat_penalties_.push_back (Page_turn_event (repeat_begin_.main_part_, now, SCM_EOL, -infinity_f));
+        repeat_penalties_.push_back (Page_turn_event (repeat_begin_.main_part_, now, SCM_EOL, -infinity_f));
       else
-       repeat_penalties_.push_back (Page_turn_event (repeat_begin_.main_part_, now, ly_symbol2scm ("allow"), pen));
+        repeat_penalties_.push_back (Page_turn_event (repeat_begin_.main_part_, now, ly_symbol2scm ("allow"), pen));
 
       repeat_begin_ = Moment (-1);
     }
@@ -284,30 +285,30 @@ Page_turn_engraver::finalize ()
 
       /* find the next applicable repeat penalty */
       for (;
-          rep_index < repeat_penalties_.size ()
-            && repeat_penalties_[rep_index].duration_[RIGHT] <= brk.duration_[LEFT];
-          rep_index++)
-       ;
+           rep_index < repeat_penalties_.size ()
+           && repeat_penalties_[rep_index].duration_[RIGHT] <= brk.duration_[LEFT];
+           rep_index++)
+        ;
 
       if (rep_index >= repeat_penalties_.size ()
-         || brk.duration_[RIGHT] <= repeat_penalties_[rep_index].duration_[LEFT])
-       auto_breaks.push_back (brk);
+          || brk.duration_[RIGHT] <= repeat_penalties_[rep_index].duration_[LEFT])
+        auto_breaks.push_back (brk);
       else
-       {
-         vector<Page_turn_event> split = brk.penalize (repeat_penalties_[rep_index]);
-
-         /* it's possible that the last of my newly-split events overlaps the next repeat_penalty,
-            in which case we need to refilter that event */
-         if (rep_index + 1 < repeat_penalties_.size ()
-             && split.size ()
-             && split.back ().duration_[RIGHT] > repeat_penalties_[rep_index+1].duration_[LEFT])
-           {
-             automatic_breaks_[i] = split.back ();
-             split.pop_back ();
-             i--;
-           }
-         auto_breaks.insert (auto_breaks.end (), split.begin (), split.end ());
-       }
+        {
+          vector<Page_turn_event> split = brk.penalize (repeat_penalties_[rep_index]);
+
+          /* it's possible that the last of my newly-split events overlaps the next repeat_penalty,
+             in which case we need to refilter that event */
+          if (rep_index + 1 < repeat_penalties_.size ()
+              && split.size ()
+              && split.back ().duration_[RIGHT] > repeat_penalties_[rep_index + 1].duration_[LEFT])
+            {
+              automatic_breaks_[i] = split.back ();
+              split.pop_back ();
+              i--;
+            }
+          auto_breaks.insert (auto_breaks.end (), split.begin (), split.end ());
+        }
     }
 
   /* apply the automatic breaks */
@@ -316,12 +317,12 @@ Page_turn_engraver::finalize ()
       Page_turn_event const &brk = auto_breaks[i];
       Grob *pc = breakable_column (auto_breaks[i]);
       if (pc)
-       {
-         SCM perm = max_permission (pc->get_property ("page-turn-permission"), brk.permission_);
-         Real pen = min (robust_scm2double (pc->get_property ("page-turn-penalty"), infinity_f), brk.penalty_);
-         pc->set_property ("page-turn-permission", perm);
-         pc->set_property ("page-turn-penalty", scm_from_double (pen));
-       }
+        {
+          SCM perm = max_permission (pc->get_property ("page-turn-permission"), brk.permission_);
+          Real pen = min (robust_scm2double (pc->get_property ("page-turn-penalty"), infinity_f), brk.penalty_);
+          pc->set_property ("page-turn-permission", perm);
+          pc->set_property ("page-turn-penalty", scm_from_double (pen));
+        }
     }
 
   /* unless a manual break overrides it, allow a page turn at the end of the piece */
@@ -333,10 +334,10 @@ Page_turn_engraver::finalize ()
       Page_turn_event const &brk = forced_breaks_[i];
       Grob *pc = breakable_column (forced_breaks_[i]);
       if (pc)
-       {
-         pc->set_property ("page-turn-permission", brk.permission_);
-         pc->set_property ("page-turn-penalty", scm_from_double (brk.penalty_));
-       }
+        {
+          pc->set_property ("page-turn-permission", brk.permission_);
+          pc->set_property ("page-turn-penalty", scm_from_double (brk.penalty_));
+        }
     }
 }
 
@@ -350,9 +351,9 @@ ADD_TRANSLATOR (Page_turn_engraver,
                 "",
 
                 /* read */
-               "minimumPageTurnLength "
-               "minimumRepeatLengthForPageTurn ",
+                "minimumPageTurnLength "
+                "minimumRepeatLengthForPageTurn ",
 
                 /* write */
                 ""
-               );
+               );
index 07b61d92bf84bec98e0537a8ee8a5c66413f0e1e..3d9799cd7c32417eb11a5c4024f9936873d1d31a 100644 (file)
@@ -35,9 +35,9 @@ is_break (T *g)
 {
   bool turnable = scm_is_symbol (g->get_property ("page-turn-permission"));
 
-  if (turnable &&
-      (!scm_is_symbol (g->get_property ("page-break-permission"))
-       || !scm_is_symbol (g->get_property ("line-break-permission"))))
+  if (turnable
+      && (!scm_is_symbol (g->get_property ("page-break-permission"))
+          || !scm_is_symbol (g->get_property ("line-break-permission"))))
     {
       programming_error ("found a page-turnable place which was not breakable");
       turnable = false;
@@ -57,9 +57,9 @@ Page_turn_page_breaking::~Page_turn_page_breaking ()
 
 Page_turn_page_breaking::Break_node
 Page_turn_page_breaking::put_systems_on_pages (vsize start,
-                                              vsize end,
-                                              vsize configuration,
-                                              vsize page_number)
+                                               vsize end,
+                                               vsize configuration,
+                                               vsize page_number)
 {
   vsize min_p_count = min_page_count (configuration, page_number);
   bool auto_first = to_boolean (book_->paper_->c_variable ("auto-first-page-number"));
@@ -87,9 +87,9 @@ Page_turn_page_breaking::put_systems_on_pages (vsize start,
   if (start == 0 && auto_first)
     {
       if (min_p_count % 2)
-       result = space_systems_on_n_or_one_more_pages (configuration, min_p_count, page_number, 0);
+        result = space_systems_on_n_or_one_more_pages (configuration, min_p_count, page_number, 0);
       else
-       result = space_systems_on_n_pages (configuration, min_p_count, page_number);
+        result = space_systems_on_n_pages (configuration, min_p_count, page_number);
     }
   else if (page_number % 2 == min_p_count % 2)
     result = space_systems_on_n_pages (configuration, min_p_count, page_number);
@@ -110,7 +110,7 @@ Page_turn_page_breaking::put_systems_on_pages (vsize start,
   ret.too_many_lines_ = all_lines_stretched (configuration);
   ret.demerits_ = result.demerits_;
   if (start > 0)
-    ret.demerits_ += state_[start-1].demerits_;
+    ret.demerits_ += state_[start - 1].demerits_;
 
   return ret;
 }
@@ -137,22 +137,22 @@ Page_turn_page_breaking::calc_subproblem (vsize ending_breakpoint)
 
   for (vsize start = end; start--;)
     {
-      if (start < end-1
-         && breakpoint_property (start+1, "page-turn-permission") == ly_symbol2scm ("force"))
-       break;
+      if (start < end - 1
+          && breakpoint_property (start + 1, "page-turn-permission") == ly_symbol2scm ("force"))
+        break;
 
-      if (start > 0 && best.demerits_ < state_[start-1].demerits_)
+      if (start > 0 && best.demerits_ < state_[start - 1].demerits_)
         continue;
 
       int p_num = robust_scm2int (book_->paper_->c_variable ("first-page-number"), 1);
       if (start > 0)
         {
-         /* except possibly for the first page, enforce the fact that first_page_number_
-            should always be even (left hand page).
-            TODO: are there different conventions in right-to-left languages?
-         */
-         p_num = state_[start-1].first_page_number_ + state_[start-1].page_count_;
-         p_num += p_num % 2;
+          /* except possibly for the first page, enforce the fact that first_page_number_
+             should always be even (left hand page).
+             TODO: are there different conventions in right-to-left languages?
+          */
+          p_num = state_[start - 1].first_page_number_ + state_[start - 1].page_count_;
+          p_num += p_num % 2;
         }
 
       Line_division min_division;
@@ -165,14 +165,14 @@ Page_turn_page_breaking::calc_subproblem (vsize ending_breakpoint)
       bool ok_page = true;
 
       if (debug_page_breaking_scoring)
-       message (_f ("page-turn-page-breaking: breaking from %d to %d", (int) start, (int) end));
+        message (_f ("page-turn-page-breaking: breaking from %d to %d", (int) start, (int) end));
 
       /* heuristic: we've just added a breakpoint, we'll need at least as
          many systems as before */
       min_sys_count = max (min_sys_count, prev_best_system_count);
       for (vsize sys_count = min_sys_count; sys_count <= max_sys_count && ok_page; sys_count++)
         {
-         set_current_breakpoints (start, end, sys_count, min_division, max_division);
+          set_current_breakpoints (start, end, sys_count, min_division, max_division);
           bool found = false;
 
           for (vsize i = 0; i < current_configuration_count (); i++)
@@ -180,9 +180,9 @@ Page_turn_page_breaking::calc_subproblem (vsize ending_breakpoint)
               cur = put_systems_on_pages (start, end, i, p_num);
 
               if (isinf (cur.demerits_)
-                 || (cur.page_count_  + (p_num % 2) > 2
-                     && (!isinf (this_start_best.demerits_))
-                     && total_page_count (cur) > total_page_count (this_start_best)))
+                  || (cur.page_count_ + (p_num % 2) > 2
+                      && (!isinf (this_start_best.demerits_))
+                      && total_page_count (cur) > total_page_count (this_start_best)))
                 {
                   ok_page = false;
                   break;
@@ -190,16 +190,16 @@ Page_turn_page_breaking::calc_subproblem (vsize ending_breakpoint)
 
               if (cur.demerits_ < this_start_best.demerits_)
                 {
-                 if (debug_page_breaking_scoring)
-                   print_break_node (cur);
+                  if (debug_page_breaking_scoring)
+                    print_break_node (cur);
 
                   found = true;
                   this_start_best = cur;
                   prev_best_system_count = sys_count;
 
-                 /* heuristic: if we increase the number of systems, we can bound the
-                    division from below by our current best division */
-                 min_division = current_configuration (i);
+                  /* heuristic: if we increase the number of systems, we can bound the
+                     division from below by our current best division */
+                  min_division = current_configuration (i);
                 }
             }
           if (!found && this_start_best.too_many_lines_)
@@ -212,13 +212,13 @@ Page_turn_page_breaking::calc_subproblem (vsize ending_breakpoint)
         }
 
       if (start == 0 && end == 1
-         && this_start_best.first_page_number_ == 1
-         && this_start_best.page_count_ > 1)
-       warning (_ ("cannot fit the first page turn onto a single page."
-                   "  Consider setting first-page-number to an even number."));
+          && this_start_best.first_page_number_ == 1
+          && this_start_best.page_count_ > 1)
+        warning (_ ("cannot fit the first page turn onto a single page."
+                    "  Consider setting first-page-number to an even number."));
 
       if (this_start_best.demerits_ < best.demerits_)
-       best = this_start_best;
+        best = this_start_best;
     }
   state_.push_back (best);
 }
@@ -257,7 +257,7 @@ Page_turn_page_breaking::make_lines (vector<Break_node> *psoln)
   vector<Break_node> &soln = *psoln;
   for (vsize n = 0; n < soln.size (); n++)
     {
-      vsize start = n > 0 ? soln[n-1].break_pos_ : 0;
+      vsize start = n > 0 ? soln[n - 1].break_pos_ : 0;
       vsize end = soln[n].break_pos_;
 
       break_into_pieces (start, end, soln[n].div_);
@@ -276,17 +276,17 @@ Page_turn_page_breaking::make_pages (vector<Break_node> const &soln, SCM systems
   for (vsize i = 0; i < soln.size (); i++)
     {
       for (vsize j = 0; j < soln[i].page_count_; j++)
-       lines_per_page.push_back (soln[i].system_count_[j]);
+        lines_per_page.push_back (soln[i].system_count_[j]);
 
       if (i + 1 < soln.size () && (soln[i].first_page_number_ + soln[i].page_count_) % 2)
-       /* add a blank page */
-       lines_per_page.push_back (0);
+        /* add a blank page */
+        lines_per_page.push_back (0);
     }
 
   /* this should only actually modify first-page-number if
      auto-first-page-number was true. */
   book_->paper_->set_variable (ly_symbol2scm ("first-page-number"),
-                              scm_from_int (soln[0].first_page_number_));
+                               scm_from_int (soln[0].first_page_number_));
   return Page_breaking::make_pages (lines_per_page, systems);
 }
 
index f2ae0219129ac221780dd662f33525f4a6ca664d..7cde167aca0893d0c9f1125bcdb067a239853f7a 100644 (file)
 #include "stencil.hh"
 
 LY_DEFINE (ly_pango_font_p, "ly:pango-font?",
-          1, 0, 0,
-          (SCM f),
-          "Is @var{f} a pango font?")
+           1, 0, 0,
+           (SCM f),
+           "Is @var{f} a pango font?")
 {
   return scm_from_bool (dynamic_cast<Pango_font *> (unsmob_metrics (f)));
 }
 
 LY_DEFINE (ly_pango_font_physical_fonts, "ly:pango-font-physical-fonts",
-          1, 0, 0,
-          (SCM f),
-          "Return alist of @code{(ps-name file-name font-index)} lists"
-          " for Pango font@tie{}@var{f}.")
+           1, 0, 0,
+           (SCM f),
+           "Return alist of @code{(ps-name file-name font-index)} lists"
+           " for Pango font@tie{}@var{f}.")
 {
   Pango_font *pf = dynamic_cast<Pango_font *> (unsmob_metrics (f));
 
index 26f2e53fb4b5fce47b0294c5626cd3f9018cb733..1be0656f75dc360e1a8ddbf8fec32cc6f2efe718 100644 (file)
@@ -33,7 +33,7 @@
 #include "dimensions.hh"
 #include "file-name.hh"
 #include "international.hh"
-#include "lookup.hh"           // debugging
+#include "lookup.hh"            // debugging
 #include "main.hh"
 #include "string-convert.hh"
 #include "warn.hh"
@@ -44,8 +44,8 @@
 #include "stencil.hh"
 
 Pango_font::Pango_font (PangoFT2FontMap *fontmap,
-                       PangoFontDescription const *description,
-                       Real output_scale)
+                        PangoFontDescription const *description,
+                        Real output_scale)
 {
   // This line looks stupid, but if we don't initialize physical_font_tab_ before
   // we allocate memory in scm_c_make_hash_table, then that could trigger a garbage
@@ -65,7 +65,7 @@ Pango_font::Pango_font (PangoFT2FontMap *fontmap,
   //  --hwn
   output_scale_ = output_scale;
   scale_ = INCH_TO_BP
-          / (Real (PANGO_SCALE) * Real (PANGO_RESOLUTION) * output_scale);
+           / (Real (PANGO_SCALE) * Real (PANGO_RESOLUTION) * output_scale);
 
   // ugh. Should make this configurable.
   pango_context_set_language (context_, pango_language_from_string ("en_US"));
@@ -82,13 +82,13 @@ Pango_font::~Pango_font ()
 
 void
 Pango_font::register_font_file (string filename,
-                               string ps_name,
-                               int face_index)
+                                string ps_name,
+                                int face_index)
 {
   scm_hash_set_x (physical_font_tab_,
-                 ly_string2scm (ps_name),
-                 scm_list_2 (ly_string2scm (filename),
-                             scm_from_int (face_index)));
+                  ly_string2scm (ps_name),
+                  scm_list_2 (ly_string2scm (filename),
+                              scm_from_int (face_index)));
 }
 
 void
@@ -99,14 +99,14 @@ Pango_font::derived_mark () const
 
 void
 get_glyph_index_name (char *s,
-                     FT_ULong code)
+                      FT_ULong code)
 {
   sprintf (s, "glyphIndex%lX", code);
 }
 
 void
 get_unicode_name (char *s,
-                 FT_ULong code)
+                  FT_ULong code)
 {
   if (code > 0xFFFF)
     sprintf (s, "u%lX", code);
@@ -132,9 +132,9 @@ Pango_font::pango_item_string_stencil (PangoGlyphItem const *glyph_item) const
   FT_Face ftface = pango_fc_font_lock_face (fcfont);
 
   Box b (Interval (PANGO_LBEARING (logical_rect),
-                  PANGO_RBEARING (logical_rect)),
-        Interval (-PANGO_DESCENT (ink_rect),
-                  PANGO_ASCENT (ink_rect)));
+                   PANGO_RBEARING (logical_rect)),
+         Interval (-PANGO_DESCENT (ink_rect),
+                   PANGO_ASCENT (ink_rect)));
 
   b.scale (scale_);
 
@@ -161,8 +161,7 @@ Pango_font::pango_item_string_stencil (PangoGlyphItem const *glyph_item) const
   Index_to_charcode_map const *cmap = 0;
   bool has_glyph_names = ftface->face_flags & FT_FACE_FLAG_GLYPH_NAMES;
   if (!has_glyph_names)
-    cmap = all_fonts_global->get_index_to_charcode_map (
-            file_name, face_index, ftface);
+    cmap = all_fonts_global->get_index_to_charcode_map (file_name, face_index, ftface);
 
   bool is_ttf = string (FT_Get_X11_Font_Format (ftface)) == "TrueType";
   bool cid_keyed = false;
@@ -175,63 +174,61 @@ Pango_font::pango_item_string_stencil (PangoGlyphItem const *glyph_item) const
       PangoGlyphGeometry ggeo = pgi->geometry;
 
       /*
-       Zero-width characters are valid Unicode characters,
-       but glyph lookups need to be skipped.
+        Zero-width characters are valid Unicode characters,
+        but glyph lookups need to be skipped.
       */
       if (!(pg ^ PANGO_GLYPH_EMPTY))
-       continue;
+        continue;
 
       glyph_name[0] = '\0';
       if (has_glyph_names)
-       {
-         FT_Error errorcode = FT_Get_Glyph_Name (ftface, pg, glyph_name,
-                                                 GLYPH_NAME_LEN);
-         if (errorcode)
-           programming_error (
-             _f ("FT_Get_Glyph_Name () error: %s",
-                 freetype_error_string (errorcode).c_str ()));
-       }
+        {
+          FT_Error errorcode = FT_Get_Glyph_Name (ftface, pg, glyph_name,
+                                                  GLYPH_NAME_LEN);
+          if (errorcode)
+            programming_error (_f ("FT_Get_Glyph_Name () error: %s",
+                                   freetype_error_string (errorcode).c_str ()));
+        }
 
       SCM char_id = SCM_EOL;
       if (glyph_name[0] == '\0'
-         && cmap
-         && is_ttf
-         && cmap->find (pg) != cmap->end ())
-       {
-         FT_ULong char_code = cmap->find (pg)->second;
-         get_unicode_name (glyph_name, char_code);
-       }
+          && cmap
+          && is_ttf
+          && cmap->find (pg) != cmap->end ())
+        {
+          FT_ULong char_code = cmap->find (pg)->second;
+          get_unicode_name (glyph_name, char_code);
+        }
 
       if (glyph_name[0] == '\0' && has_glyph_names)
-       {
-         programming_error (
-           _f ("Glyph has no name, but font supports glyph naming.\n"
-               "Skipping glyph U+%0X, file %s",
-               pg, file_name.c_str ()));
-         continue;
-       }
+        {
+          programming_error (_f ("Glyph has no name, but font supports glyph naming.\n"
+                                 "Skipping glyph U+%0X, file %s",
+                                 pg, file_name.c_str ()));
+          continue;
+        }
 
       if (glyph_name == string (".notdef") && is_ttf)
-       glyph_name[0] = '\0';
+        glyph_name[0] = '\0';
 
       if (glyph_name[0] == '\0' && is_ttf)
-       // Access by glyph index directly.
-       get_glyph_index_name (glyph_name, pg);
+        // Access by glyph index directly.
+        get_glyph_index_name (glyph_name, pg);
 
       if (glyph_name[0] == '\0')
-       {
-         // CID entry
-         cid_keyed = true;
-         char_id = scm_from_uint32 (pg);
-       }
+        {
+          // CID entry
+          cid_keyed = true;
+          char_id = scm_from_uint32 (pg);
+        }
       else
-       char_id = scm_from_locale_string (glyph_name);
+        char_id = scm_from_locale_string (glyph_name);
 
       *tail = scm_cons (scm_list_4 (scm_from_double (ggeo.width * scale_),
-                                   scm_from_double (ggeo.x_offset * scale_),
-                                   scm_from_double (- ggeo.y_offset * scale_),
-                                   char_id),
-                       SCM_EOL);
+                                    scm_from_double (ggeo.x_offset * scale_),
+                                    scm_from_double (- ggeo.y_offset * scale_),
+                                    char_id),
+                        SCM_EOL);
       tail = SCM_CDRLOC (*tail);
     }
 
@@ -239,7 +236,7 @@ Pango_font::pango_item_string_stencil (PangoGlyphItem const *glyph_item) const
   pgs = 0;
   PangoFontDescription *descr = pango_font_describe (pa->font);
   Real size = pango_font_description_get_size (descr)
-             / (Real (PANGO_SCALE));
+              / (Real (PANGO_SCALE));
 
   if (!ps_name_str0)
     warning (_f ("no PostScript font name for font `%s'", file_name));
@@ -248,23 +245,23 @@ Pango_font::pango_item_string_stencil (PangoGlyphItem const *glyph_item) const
   if (!ps_name_str0
       && file_name != ""
       && (file_name.find (".otf") != NPOS
-         || file_name.find (".cff") != NPOS))
+          || file_name.find (".cff") != NPOS))
     {
       // UGH: kludge a PS name for OTF/CFF fonts.
       string name = file_name;
       ssize idx = file_name.find (".otf");
       if (idx == NPOS)
-       idx = file_name.find (".cff");
+        idx = file_name.find (".cff");
 
       name = name.substr (0, idx);
 
       ssize slash_idx = name.rfind ('/');
       if (slash_idx != NPOS)
-       {
-         slash_idx ++;
-         name = name.substr (slash_idx,
-                             name.length () - slash_idx);
-       }
+        {
+          slash_idx++;
+          name = name.substr (slash_idx,
+                              name.length () - slash_idx);
+        }
 
       string initial = name.substr (0, 1);
       initial = String_convert::to_upper (initial);
@@ -278,15 +275,15 @@ Pango_font::pango_item_string_stencil (PangoGlyphItem const *glyph_item) const
   if (ps_name.length ())
     {
       ((Pango_font *) this)->register_font_file (file_name,
-                                                ps_name,
-                                                face_index);
+                                                 ps_name,
+                                                 face_index);
       pango_fc_font_unlock_face (fcfont);
 
       SCM expr = scm_list_5 (ly_symbol2scm ("glyph-string"),
-                            ly_string2scm (ps_name),
-                            scm_from_double (size),
-                            scm_from_bool (cid_keyed),
-                            ly_quote_scm (glyph_exprs));
+                             ly_string2scm (ps_name),
+                             scm_from_double (size),
+                             scm_from_bool (cid_keyed),
+                             ly_quote_scm (glyph_exprs));
 
       return Stencil (b, expr);
     }
@@ -305,7 +302,7 @@ extern bool music_strings_to_paths;
 
 Stencil
 Pango_font::text_stencil (Output_def * /* state */,
-                         string str, bool music_string) const
+                          string str, bool music_string) const
 {
   /*
     The text assigned to a PangoLayout is automatically divided
@@ -325,26 +322,26 @@ Pango_font::text_stencil (Output_def * /* state */,
       GSList *layout_runs = line->runs;
 
       for (GSList *p = layout_runs; p; p = p->next)
-       {
-         PangoGlyphItem *item = (PangoGlyphItem *) p->data;
-         Stencil item_stencil = pango_item_string_stencil (item);
+        {
+          PangoGlyphItem *item = (PangoGlyphItem *) p->data;
+          Stencil item_stencil = pango_item_string_stencil (item);
 
-         item_stencil.translate_axis (last_x, X_AXIS);
-         last_x = item_stencil.extent (X_AXIS)[RIGHT];
+          item_stencil.translate_axis (last_x, X_AXIS);
+          last_x = item_stencil.extent (X_AXIS)[RIGHT];
 
 #if 0 // Check extents.
-         if (!item_stencil.extent_box ()[X_AXIS].is_empty ())
-           {
-             Stencil frame = Lookup::frame (item_stencil.extent_box (), 0.1, 0.1);
-             Box empty;
-             empty.set_empty ();
-             Stencil dimless_frame (empty, frame.expr ());
-             dest.add_stencil (frame);
-           }
+          if (!item_stencil.extent_box ()[X_AXIS].is_empty ())
+            {
+              Stencil frame = Lookup::frame (item_stencil.extent_box (), 0.1, 0.1);
+              Box empty;
+              empty.set_empty ();
+              Stencil dimless_frame (empty, frame.expr ());
+              dest.add_stencil (frame);
+            }
 #endif
 
-         dest.add_stencil (item_stencil);
-       }
+          dest.add_stencil (item_stencil);
+        }
     }
 
   string name = get_output_backend_name ();
@@ -357,13 +354,13 @@ Pango_font::text_stencil (Output_def * /* state */,
     {
       SCM utf8_string = ly_module_lookup (mod, ly_symbol2scm ("utf-8-string"));
       /*
-       has_utf8_string should only be true when utf8_string is a
-       variable that is bound to a *named* procedure, i.e. not a
-       lambda expression.
+        has_utf8_string should only be true when utf8_string is a
+        variable that is bound to a *named* procedure, i.e. not a
+        lambda expression.
       */
       if (utf8_string != SCM_BOOL_F
-         && scm_procedure_name (SCM_VARIABLE_REF (utf8_string)) != SCM_BOOL_F)
-       has_utf8_string = true;
+          && scm_procedure_name (SCM_VARIABLE_REF (utf8_string)) != SCM_BOOL_F)
+        has_utf8_string = true;
     }
 
   bool to_paths = music_strings_to_paths;
@@ -378,8 +375,8 @@ Pango_font::text_stencil (Output_def * /* state */,
     {
       // For Pango based backends, we take a shortcut.
       SCM exp = scm_list_3 (ly_symbol2scm ("utf-8-string"),
-                           ly_string2scm (description_string ()),
-                           ly_string2scm (str));
+                            ly_string2scm (description_string ()),
+                            ly_string2scm (str));
 
       Box b (Interval (0, 0), Interval (0, 0));
       b.unite (dest.extent_box ());
index 643d407820a13ba92f0b719181ee91c2ee749145..e5a33ad67f162abfe671c3863ff30399c9c22f00 100644 (file)
@@ -23,9 +23,9 @@
 #include "pango-font.hh"
 
 LY_DEFINE (ly_make_pango_description_string, "ly:make-pango-description-string",
-          2, 0, 0, (SCM chain, SCM size),
-          "Make a @code{PangoFontDescription} string for the property"
-          " alist @var{chain} at size @var{size}.")
+           2, 0, 0, (SCM chain, SCM size),
+           "Make a @code{PangoFontDescription} string for the property"
+           " alist @var{chain} at size @var{size}.")
 {
   LY_ASSERT_TYPE (scm_is_number, size, 1);
   PangoFontDescription *pfd = properties_to_pango_description (chain, scm_to_double (size));
index a0832d4369292e081e3f09df5ec133d2c6df55bb..486fdba629e3dae75a666ebc09e4dbc69328978a 100644 (file)
@@ -36,22 +36,22 @@ properties_to_pango_description (SCM chain, Real text_size)
   else
     {
       SCM family = ly_chain_assoc_get (ly_symbol2scm ("font-family"), chain,
-                                      SCM_BOOL_F);
+                                       SCM_BOOL_F);
       SCM variant = ly_chain_assoc_get (ly_symbol2scm ("font-shape"), chain,
-                                       SCM_BOOL_F);
+                                        SCM_BOOL_F);
 
       SCM style = ly_chain_assoc_get (ly_symbol2scm ("font-shape"), chain,
-                                     SCM_BOOL_F);
+                                      SCM_BOOL_F);
       SCM weight = ly_chain_assoc_get (ly_symbol2scm ("font-series"), chain,
-                                      SCM_BOOL_F);
+                                       SCM_BOOL_F);
 
       description
-       = symbols_to_pango_font_description (family, style, variant, weight,
-                                            SCM_BOOL_F);
+        = symbols_to_pango_font_description (family, style, variant, weight,
+                                             SCM_BOOL_F);
     }
 
   Real step = robust_scm2double (ly_chain_assoc_get (ly_symbol2scm ("font-size"), chain, SCM_BOOL_F),
-                                0.0);
+                                 0.0);
   Real size = text_size * pow (2.0, step / 6.0);
 
   pango_font_description_set_size (description, gint (size * PANGO_SCALE));
@@ -63,14 +63,14 @@ select_pango_font (Output_def *layout, SCM chain)
 {
   PangoFontDescription *pfd
     = properties_to_pango_description (chain,
-                                      point_constant
-                                      * layout->get_dimension (ly_symbol2scm ("text-font-size")));
+                                       point_constant
+                                       * layout->get_dimension (ly_symbol2scm ("text-font-size")));
 
   char *str = pango_font_description_to_string (pfd);
   SCM scm_str = scm_from_locale_string (str);
   g_free (str);
   pango_font_description_free (pfd);
-  
+
   return find_pango_font (layout, scm_str, 1.0);
 }
 
@@ -81,7 +81,7 @@ symbol_to_pango_style (SCM style)
   if (style == ly_symbol2scm ("italic"))
     pstyle = PANGO_STYLE_ITALIC;
   else if (style == ly_symbol2scm ("oblique")
-          || style == ly_symbol2scm ("slanted"))
+           || style == ly_symbol2scm ("slanted"))
     pstyle = PANGO_STYLE_OBLIQUE;
 
   return pstyle;
@@ -137,10 +137,10 @@ symbol_to_pango_stretch (SCM) //  stretch)
 
 PangoFontDescription *
 symbols_to_pango_font_description (SCM family,
-                                  SCM style,
-                                  SCM variant,
-                                  SCM weight,
-                                  SCM stretch)
+                                   SCM style,
+                                   SCM variant,
+                                   SCM weight,
+                                   SCM stretch)
 {
   PangoFontDescription *description = pango_font_description_new ();
 
@@ -151,15 +151,15 @@ symbols_to_pango_font_description (SCM family,
     family_str = ly_scm2string (family);
 
   pango_font_description_set_family (description,
-                                    family_str.c_str ());
+                                     family_str.c_str ());
   pango_font_description_set_style (description,
-                                   symbol_to_pango_style (style));
+                                    symbol_to_pango_style (style));
   pango_font_description_set_variant (description,
-                                     symbol_to_pango_variant (variant));
+                                      symbol_to_pango_variant (variant));
   pango_font_description_set_weight (description,
-                                    symbol_to_pango_weight (weight));
+                                     symbol_to_pango_weight (weight));
   pango_font_description_set_stretch (description,
-                                     symbol_to_pango_stretch (stretch));
+                                      symbol_to_pango_stretch (stretch));
 
   return description;
 }
index 915844453025ece1d1883a41db0a4cbb73c72baa..b28c7a898a58f997bd267fd0f7462f62a90e49b1 100644 (file)
 #include "output-def.hh"
 
 LY_DEFINE (ly_paper_book_pages, "ly:paper-book-pages",
-          1, 0, 0, (SCM pb),
-          "Return pages in @code{Paper_book} object @var{pb}.")
+           1, 0, 0, (SCM pb),
+           "Return pages in @code{Paper_book} object @var{pb}.")
 {
   LY_ASSERT_SMOB (Paper_book, pb, 1);
   return unsmob_paper_book (pb)->pages ();
 }
 
 LY_DEFINE (ly_paper_book_scopes, "ly:paper-book-scopes",
-          1, 0, 0, (SCM pb),
-          "Return scopes in @code{Paper_book} object @var{pb}.")
+           1, 0, 0, (SCM pb),
+           "Return scopes in @code{Paper_book} object @var{pb}.")
 {
   LY_ASSERT_SMOB (Paper_book, pb, 1);
   Paper_book *book = unsmob_paper_book (pb);
@@ -48,25 +48,25 @@ LY_DEFINE (ly_paper_book_scopes, "ly:paper-book-scopes",
 }
 
 LY_DEFINE (ly_paper_book_performances, "ly:paper-book-performances",
-          1, 0, 0, (SCM pb),
-          "Return performances in @code{Paper_book} object @var{pb}.")
+           1, 0, 0, (SCM pb),
+           "Return performances in @code{Paper_book} object @var{pb}.")
 {
   LY_ASSERT_SMOB (Paper_book, pb, 1);
   return unsmob_paper_book (pb)->performances ();
 }
 
 LY_DEFINE (ly_paper_book_systems, "ly:paper-book-systems",
-          1, 0, 0, (SCM pb),
-          "Return systems in @code{Paper_book} object @var{pb}.")
+           1, 0, 0, (SCM pb),
+           "Return systems in @code{Paper_book} object @var{pb}.")
 {
   LY_ASSERT_SMOB (Paper_book, pb, 1);
   return unsmob_paper_book (pb)->systems ();
 }
 
 LY_DEFINE (ly_paper_book_paper, "ly:paper-book-paper",
-          1, 0, 0, (SCM pb),
-          "Return the paper output definition (@code{\\paper})"
-          " in @code{Paper_book} object @var{pb}.")
+           1, 0, 0, (SCM pb),
+           "Return the paper output definition (@code{\\paper})"
+           " in @code{Paper_book} object @var{pb}.")
 {
   LY_ASSERT_SMOB (Paper_book, pb, 1);
   Paper_book *pbook = unsmob_paper_book (pb);
@@ -74,9 +74,9 @@ LY_DEFINE (ly_paper_book_paper, "ly:paper-book-paper",
 }
 
 LY_DEFINE (ly_paper_book_header, "ly:paper-book-header",
-          1, 0, 0, (SCM pb),
-          "Return the header definition (@code{\\header})"
-          " in @code{Paper_book} object @var{pb}.")
+           1, 0, 0, (SCM pb),
+           "Return the header definition (@code{\\header})"
+           " in @code{Paper_book} object @var{pb}.")
 {
   LY_ASSERT_SMOB (Paper_book, pb, 1);
   Paper_book *pbook = unsmob_paper_book (pb);
index 7fcea66c62d5831c898eb8c52a69a8d1ffe2a6a1..fc61386328b2ee43e1f335a114fa6091f0d45dd0 100644 (file)
@@ -98,7 +98,7 @@ dump_fields ()
   for (vsize i = dump_header_fieldnames_global.size (); i--;)
     fields
       = scm_cons (ly_symbol2scm (dump_header_fieldnames_global[i].c_str ()),
-                 fields);
+                  fields);
   return fields;
 }
 
@@ -122,42 +122,42 @@ Paper_book::add_performance (SCM s)
 
 int
 Paper_book::output_aux (SCM output_channel,
-                       bool is_last,
-                       int *first_page_number,
-                       int *first_performance_number)
+                        bool is_last,
+                        int *first_page_number,
+                        int *first_performance_number)
 {
   int page_nb = 0;
   if (scm_is_pair (performances_))
     {
       SCM proc = ly_lily_module_constant ("write-performances-midis");
+
       scm_call_3 (proc,
-                 performances (),
-                 output_channel,
-                 scm_from_long (*first_performance_number));
+                  performances (),
+                  output_channel,
+                  scm_from_long (*first_performance_number));
       *first_performance_number += scm_ilength (performances_);
     }
 
   if (scm_is_pair (bookparts_))
     {
       for (SCM p = bookparts_; scm_is_pair (p); p = scm_cdr (p))
-       if (Paper_book *pbookpart = unsmob_paper_book (scm_car (p)))
-         {
-           bool is_last_part = (is_last && !scm_is_pair (scm_cdr (p)));
-           page_nb += pbookpart->output_aux (output_channel,
-                                             is_last_part,
-                                             first_page_number,
-                                             first_performance_number);
-         }
+        if (Paper_book *pbookpart = unsmob_paper_book (scm_car (p)))
+          {
+            bool is_last_part = (is_last && !scm_is_pair (scm_cdr (p)));
+            page_nb += pbookpart->output_aux (output_channel,
+                                              is_last_part,
+                                              first_page_number,
+                                              first_performance_number);
+          }
     }
   else
     {
       if (scores_ == SCM_EOL)
-       return 0;
+        return 0;
       paper_->set_variable (ly_symbol2scm ("first-page-number"),
-                           scm_from_long (*first_page_number));
+                            scm_from_long (*first_page_number));
       paper_->set_variable (ly_symbol2scm ("is-last-bookpart"),
-                           ly_bool2scm (is_last));
+                            ly_bool2scm (is_last));
       /* Generate all stencils to trigger font loads.  */
       page_nb = scm_ilength (pages ());
       *first_page_number += page_nb;
@@ -180,12 +180,12 @@ Paper_book::output (SCM output_channel)
 
   if (paper_->c_variable ("line-width") == SCM_UNDEFINED)
     paper_->set_variable (ly_symbol2scm ("line-width"),
-                         paper_->c_variable ("paper-width"));
+                          paper_->c_variable ("paper-width"));
+
   if (!output_aux (output_channel,
-                  true,
-                  &first_page_number,
-                  &first_performance_number))
+                   true,
+                   &first_page_number,
+                   &first_performance_number))
     return;
 
   SCM scopes = SCM_EOL;
@@ -199,56 +199,56 @@ Paper_book::output (SCM output_channel)
   if (get_program_option ("print-pages"))
     {
       SCM framework = ly_module_lookup (mod,
-                                       ly_symbol2scm ("output-framework"));
+                                        ly_symbol2scm ("output-framework"));
 
       if (framework != SCM_BOOL_F)
-       {
-         SCM func = scm_variable_ref (framework);
-         scm_apply_0 (func, scm_list_n (output_channel,
-                                        self_scm (),
-                                        scopes,
-                                        dump_fields (),
-                                        SCM_UNDEFINED));
-       }
+        {
+          SCM func = scm_variable_ref (framework);
+          scm_apply_0 (func, scm_list_n (output_channel,
+                                         self_scm (),
+                                         scopes,
+                                         dump_fields (),
+                                         SCM_UNDEFINED));
+        }
       else
-       warning (_f ("program option -dprint-pages not supported by backend `%s'",
-                    get_output_backend_name ()));
+        warning (_f ("program option -dprint-pages not supported by backend `%s'",
+                     get_output_backend_name ()));
     }
 
   if (get_program_option ("preview"))
     {
       SCM framework
-       = ly_module_lookup (mod, ly_symbol2scm ("output-preview-framework"));
+        = ly_module_lookup (mod, ly_symbol2scm ("output-preview-framework"));
 
       if (framework != SCM_BOOL_F)
-       {
-         SCM func = scm_variable_ref (framework);
-         scm_apply_0 (func, scm_list_n (output_channel,
-                                        self_scm (),
-                                        scopes,
-                                        dump_fields (),
-                                        SCM_UNDEFINED));
-       }
+        {
+          SCM func = scm_variable_ref (framework);
+          scm_apply_0 (func, scm_list_n (output_channel,
+                                         self_scm (),
+                                         scopes,
+                                         dump_fields (),
+                                         SCM_UNDEFINED));
+        }
       else
-       warning (_f ("program option -dpreview not supported by backend `%s'",
-                    get_output_backend_name ()));
+        warning (_f ("program option -dpreview not supported by backend `%s'",
+                     get_output_backend_name ()));
     }
 }
 
 void
 Paper_book::classic_output_aux (SCM output,
-                               int *first_performance_number)
+                                int *first_performance_number)
 {
   if (scm_is_pair (performances_))
     {
       SCM proc = ly_lily_module_constant ("write-performances-midis");
       scm_call_3 (proc,
-                 performances (),
-                 output,
-                 scm_from_long (*first_performance_number));
+                  performances (),
+                  output,
+                  scm_from_long (*first_performance_number));
       *first_performance_number += scm_ilength (performances_);
     }
-  
+
   /* Generate all stencils to trigger font loads.  */
   systems ();
 }
@@ -274,10 +274,10 @@ Paper_book::classic_output (SCM output)
 
   func = scm_variable_ref (func);
   scm_apply_0 (func, scm_list_n (output,
-                                self_scm (),
-                                scopes,
-                                dump_fields (),
-                                SCM_UNDEFINED));
+                                 self_scm (),
+                                 scopes,
+                                 dump_fields (),
+                                 SCM_UNDEFINED));
 
   progress_indication ("\n");
 }
@@ -296,8 +296,8 @@ Paper_book::book_title ()
   SCM tit = SCM_EOL;
   if (ly_is_procedure (title_func))
     tit = scm_call_2 (title_func,
-                     paper_->self_scm (),
-                     scopes);
+                      paper_->self_scm (),
+                      scopes);
 
   if (unsmob_stencil (tit))
     title = *unsmob_stencil (tit);
@@ -325,8 +325,8 @@ Paper_book::score_title (SCM header)
   SCM tit = SCM_EOL;
   if (ly_is_procedure (title_func))
     tit = scm_call_2 (title_func,
-                     paper_->self_scm (),
-                     scopes);
+                      paper_->self_scm (),
+                      scopes);
 
   if (unsmob_stencil (tit))
     title = *unsmob_stencil (tit);
@@ -344,11 +344,11 @@ set_page_permission (SCM sys, SCM symbol, SCM permission)
     {
       vector<Grob *> cols = ps->get_columns ();
       if (cols.size ())
-       {
-         Paper_column *col = dynamic_cast<Paper_column *> (cols.back ());
-         col->set_property (symbol, permission);
-         col->find_prebroken_piece (LEFT)->set_property (symbol, permission);
-       }
+        {
+          Paper_column *col = dynamic_cast<Paper_column *> (cols.back ());
+          col->set_property (symbol, permission);
+          col->find_prebroken_piece (LEFT)->set_property (symbol, permission);
+        }
     }
   else if (Prob *pb = unsmob_prob (sys))
     pb->set_property (symbol, permission);
@@ -365,19 +365,19 @@ set_system_penalty (SCM sys, SCM header)
     {
       SCM force = ly_module_lookup (header, ly_symbol2scm ("breakbefore"));
       if (SCM_VARIABLEP (force)
-         && scm_is_bool (SCM_VARIABLE_REF (force)))
-       {
-         if (to_boolean (SCM_VARIABLE_REF (force)))
-           {
-             set_page_permission (sys, ly_symbol2scm ("page-break-permission"),
-                                  ly_symbol2scm ("force"));
-             set_page_permission (sys, ly_symbol2scm ("line-break-permission"),
-                                  ly_symbol2scm ("force"));
-           }
-         else
-           set_page_permission (sys, ly_symbol2scm ("page-break-permission"),
-                                SCM_EOL);
-       }
+          && scm_is_bool (SCM_VARIABLE_REF (force)))
+        {
+          if (to_boolean (SCM_VARIABLE_REF (force)))
+            {
+              set_page_permission (sys, ly_symbol2scm ("page-break-permission"),
+                                   ly_symbol2scm ("force"));
+              set_page_permission (sys, ly_symbol2scm ("line-break-permission"),
+                                   ly_symbol2scm ("force"));
+            }
+          else
+            set_page_permission (sys, ly_symbol2scm ("page-break-permission"),
+                                 SCM_EOL);
+        }
     }
 }
 
@@ -386,24 +386,24 @@ set_labels (SCM sys, SCM labels)
 {
   if (Paper_score *ps = dynamic_cast<Paper_score *> (unsmob_music_output (sys)))
     {
-      vector<Grob*> cols = ps->get_columns ();
+      vector<Grob *> cols = ps->get_columns ();
       if (cols.size ())
-       {
-         Paper_column *col = dynamic_cast<Paper_column *> (cols[0]);
-         col->set_property ("labels", 
-                            scm_append_x (scm_list_2 (col->get_property ("labels"),
-                                                      labels)));
-         Paper_column *col_right
-           = dynamic_cast<Paper_column *> (col->find_prebroken_piece (RIGHT));
-         col_right->set_property ("labels", 
-                                  scm_append_x (scm_list_2 (col_right->get_property ("labels"),
-                                                            labels)));
-       }
+        {
+          Paper_column *col = dynamic_cast<Paper_column *> (cols[0]);
+          col->set_property ("labels",
+                             scm_append_x (scm_list_2 (col->get_property ("labels"),
+                                                       labels)));
+          Paper_column *col_right
+            = dynamic_cast<Paper_column *> (col->find_prebroken_piece (RIGHT));
+          col_right->set_property ("labels",
+                                   scm_append_x (scm_list_2 (col_right->get_property ("labels"),
+                                                             labels)));
+        }
     }
   else if (Prob *pb = unsmob_prob (sys))
-    pb->set_property ("labels", 
-                     scm_append_x (scm_list_2 (pb->get_property ("labels"),
-                                               labels)));
+    pb->set_property ("labels",
+                      scm_append_x (scm_list_2 (pb->get_property ("labels"),
+                                                labels)));
 }
 
 SCM
@@ -415,11 +415,11 @@ Paper_book::get_score_title (SCM header)
   if (!title.is_empty ())
     {
       /*
-       TODO: this should come from the \layout {} block, which should
-       override settings from \paper {}
+        TODO: this should come from the \layout {} block, which should
+        override settings from \paper {}
       */
       SCM props
-       = paper_->lookup_variable (ly_symbol2scm ("score-title-properties"));
+        = paper_->lookup_variable (ly_symbol2scm ("score-title-properties"));
       Prob *ps = make_paper_system (props);
       paper_system_set_stencil (ps, title);
 
@@ -429,7 +429,6 @@ Paper_book::get_score_title (SCM header)
   return SCM_BOOL_F;
 }
 
-
 SCM
 Paper_book::get_system_specs ()
 {
@@ -439,7 +438,7 @@ Paper_book::get_system_specs ()
   if (!title.is_empty ())
     {
       SCM props
-       = paper_->lookup_variable (ly_symbol2scm ("book-title-properties"));
+        = paper_->lookup_variable (ly_symbol2scm ("book-title-properties"));
       Prob *ps = make_paper_system (props);
       paper_system_set_stencil (ps, title);
 
@@ -449,7 +448,7 @@ Paper_book::get_system_specs ()
 
   SCM page_properties
     = scm_call_1 (ly_lily_module_constant ("layout-extract-page-properties"),
-                 paper_->self_scm ());
+                  paper_->self_scm ());
 
   SCM interpret_markup_list = ly_lily_module_constant ("interpret-markup-list");
   SCM header = SCM_EOL;
@@ -457,115 +456,115 @@ Paper_book::get_system_specs ()
   for (SCM s = scm_reverse (scores_); scm_is_pair (s); s = scm_cdr (s))
     {
       if (ly_is_module (scm_car (s)))
-       {
-         header = scm_car (s);
-         if (header_0_ == SCM_EOL)
-           header_0_ = header;
-       }
+        {
+          header = scm_car (s);
+          if (header_0_ == SCM_EOL)
+            header_0_ = header;
+        }
       else if (Page_marker *page_marker = unsmob_page_marker (scm_car (s)))
-       {
-         /* page markers are used to set page breaking/turning permission,
-            or to place bookmarking labels */ 
-         if (scm_is_symbol (page_marker->permission_symbol ()))
-           {
-             /* set previous element page break or turn permission */
-             if (scm_is_pair (system_specs))
-               set_page_permission (scm_car (system_specs),
-                                    page_marker->permission_symbol (),
-                                    page_marker->permission_value ());
-           }
-         if (scm_is_symbol (page_marker->label ()))
-           {
-             /* The next element label is to be set */
-             labels = scm_cons (page_marker->label (), labels);
-           }
-       }
+        {
+          /* page markers are used to set page breaking/turning permission,
+             or to place bookmarking labels */
+          if (scm_is_symbol (page_marker->permission_symbol ()))
+            {
+              /* set previous element page break or turn permission */
+              if (scm_is_pair (system_specs))
+                set_page_permission (scm_car (system_specs),
+                                     page_marker->permission_symbol (),
+                                     page_marker->permission_value ());
+            }
+          if (scm_is_symbol (page_marker->label ()))
+            {
+              /* The next element label is to be set */
+              labels = scm_cons (page_marker->label (), labels);
+            }
+        }
       else if (Music_output *mop = unsmob_music_output (scm_car (s)))
-       {
-         if (Paper_score *pscore = dynamic_cast<Paper_score *> (mop))
-           {
-             SCM title = get_score_title (header);
-
-             if (scm_is_pair (system_specs))
-               set_system_penalty (scm_car (system_specs), header);
-
-             if (unsmob_prob (title))
-               {
-                 system_specs = scm_cons (title, system_specs);
-                 unsmob_prob (title)->unprotect ();
-               }
-
-             header = SCM_EOL;
-             system_specs = scm_cons (pscore->self_scm (), system_specs);
-             if (scm_is_pair (labels))
-               {
-                 set_labels (scm_car (system_specs), labels);
-                 labels = SCM_EOL;
-               }
-           }
-         else
-           {
-             /*
-               Ignore MIDI
-             */
-           }
-       }
+        {
+          if (Paper_score *pscore = dynamic_cast<Paper_score *> (mop))
+            {
+              SCM title = get_score_title (header);
+
+              if (scm_is_pair (system_specs))
+                set_system_penalty (scm_car (system_specs), header);
+
+              if (unsmob_prob (title))
+                {
+                  system_specs = scm_cons (title, system_specs);
+                  unsmob_prob (title)->unprotect ();
+                }
+
+              header = SCM_EOL;
+              system_specs = scm_cons (pscore->self_scm (), system_specs);
+              if (scm_is_pair (labels))
+                {
+                  set_labels (scm_car (system_specs), labels);
+                  labels = SCM_EOL;
+                }
+            }
+          else
+            {
+              /*
+                Ignore MIDI
+              */
+            }
+        }
       else if (Text_interface::is_markup_list (scm_car (s)))
-       {
-         SCM texts = scm_call_3 (interpret_markup_list,
-                                 paper_->self_scm (),
-                                 page_properties,
-                                 scm_car (s));
-         Prob *first = 0;
-         Prob *last = 0;
-         for (SCM list = texts; scm_is_pair (list); list = scm_cdr (list))
-           {
-             SCM t = scm_car (list);
-             // TODO: init props
-             Prob *ps = make_paper_system (SCM_EOL);
-             ps->set_property ("page-break-permission",
-                               ly_symbol2scm ("allow"));
-             ps->set_property ("page-turn-permission",
-                               ly_symbol2scm ("allow"));
-             ps->set_property ("last-markup-line",  SCM_BOOL_F);
-             ps->set_property ("first-markup-line", SCM_BOOL_F);
-
-             paper_system_set_stencil (ps, *unsmob_stencil (t));
-
-             SCM footnotes = get_footnotes (unsmob_stencil (t)->expr ());
-             ps->set_property ("footnotes", footnotes);
-             ps->set_property ("is-title", SCM_BOOL_T);
-             if (list == texts)
-               first = ps;
-             else
-               {
-                 // last line so far, in a multi-line paragraph
-                 last = ps;
-                 //Place closely to previous line, no stretching.
-                 ps->set_property ("tight-spacing", SCM_BOOL_T);
-               }
-             system_specs = scm_cons (ps->self_scm (), system_specs);
-             ps->unprotect ();
-
-             if (scm_is_pair (labels))
-               {
-                 set_labels (scm_car (system_specs), labels);
-                 labels = SCM_EOL;
-               }
-             // FIXME: figure out penalty.
-             //set_system_penalty (ps, scores_[i].header_);
-           }
-         /* Set properties to avoid widowed/orphaned lines.
-            Single-line markup_lists are excluded, but in future
-            we may want to add the case of a very short, single line. */
-         if (first && last)
-           {
-             last->set_property ("last-markup-line", SCM_BOOL_T);
-             first->set_property ("first-markup-line", SCM_BOOL_T);
-           }
-       }
+        {
+          SCM texts = scm_call_3 (interpret_markup_list,
+                                  paper_->self_scm (),
+                                  page_properties,
+                                  scm_car (s));
+          Prob *first = 0;
+          Prob *last = 0;
+          for (SCM list = texts; scm_is_pair (list); list = scm_cdr (list))
+            {
+              SCM t = scm_car (list);
+              // TODO: init props
+              Prob *ps = make_paper_system (SCM_EOL);
+              ps->set_property ("page-break-permission",
+                                ly_symbol2scm ("allow"));
+              ps->set_property ("page-turn-permission",
+                                ly_symbol2scm ("allow"));
+              ps->set_property ("last-markup-line", SCM_BOOL_F);
+              ps->set_property ("first-markup-line", SCM_BOOL_F);
+
+              paper_system_set_stencil (ps, *unsmob_stencil (t));
+
+              SCM footnotes = get_footnotes (unsmob_stencil (t)->expr ());
+              ps->set_property ("footnotes", footnotes);
+              ps->set_property ("is-title", SCM_BOOL_T);
+              if (list == texts)
+                first = ps;
+              else
+                {
+                  // last line so far, in a multi-line paragraph
+                  last = ps;
+                  //Place closely to previous line, no stretching.
+                  ps->set_property ("tight-spacing", SCM_BOOL_T);
+                }
+              system_specs = scm_cons (ps->self_scm (), system_specs);
+              ps->unprotect ();
+
+              if (scm_is_pair (labels))
+                {
+                  set_labels (scm_car (system_specs), labels);
+                  labels = SCM_EOL;
+                }
+              // FIXME: figure out penalty.
+              //set_system_penalty (ps, scores_[i].header_);
+            }
+          /* Set properties to avoid widowed/orphaned lines.
+             Single-line markup_lists are excluded, but in future
+             we may want to add the case of a very short, single line. */
+          if (first && last)
+            {
+              last->set_property ("last-markup-line", SCM_BOOL_T);
+              first->set_property ("first-markup-line", SCM_BOOL_T);
+            }
+        }
       else
-       assert (0);
+        assert (0);
     }
 
   system_specs = scm_reverse_x (system_specs, SCM_EOL);
@@ -582,55 +581,55 @@ Paper_book::systems ()
   if (scm_is_pair (bookparts_))
     {
       for (SCM p = bookparts_; scm_is_pair (p); p = scm_cdr (p))
-       if (Paper_book *pbookpart = unsmob_paper_book (scm_car (p)))
-         systems_ = scm_append_x (scm_list_2 (systems_,
-                                              pbookpart->systems ()));
+        if (Paper_book *pbookpart = unsmob_paper_book (scm_car (p)))
+          systems_ = scm_append_x (scm_list_2 (systems_,
+                                               pbookpart->systems ()));
     }
   else
     {
       SCM specs = get_system_specs ();
       for (SCM s = specs; scm_is_pair (s); s = scm_cdr (s))
-       {
-         if (Paper_score *pscore
-             = dynamic_cast<Paper_score *> (unsmob_music_output (scm_car (s))))
-           {
-             SCM system_list
-               = scm_vector_to_list (pscore->get_paper_systems ());
-
-             system_list = scm_reverse (system_list);
-             systems_ = scm_append (scm_list_2 (system_list, systems_));
-           }
-         else
-           {
-             systems_ = scm_cons (scm_car (s), systems_);
-           }
-       }
+        {
+          if (Paper_score * pscore
+              = dynamic_cast<Paper_score *> (unsmob_music_output (scm_car (s))))
+            {
+              SCM system_list
+                = scm_vector_to_list (pscore->get_paper_systems ());
+
+              system_list = scm_reverse (system_list);
+              systems_ = scm_append (scm_list_2 (system_list, systems_));
+            }
+          else
+            {
+              systems_ = scm_cons (scm_car (s), systems_);
+            }
+        }
       systems_ = scm_reverse (systems_);
 
       /* backwards compatibility for the old page breaker */
       int i = 0;
       Prob *last = 0;
       for (SCM s = systems_; scm_is_pair (s); s = scm_cdr (s))
-       {
-         Prob *ps = unsmob_prob (scm_car (s));
-         ps->set_property ("number", scm_from_int (++i));
-
-         if (last
-             && to_boolean (last->get_property ("is-title"))
-             && !scm_is_number (ps->get_property ("penalty")))
-           ps->set_property ("penalty", scm_from_int (10000));
-         last = ps;
-         
-         if (scm_is_pair (scm_cdr (s)))
-           {
-             SCM perm = ps->get_property ("page-break-permission");
-             Prob *next = unsmob_prob (scm_cadr (s));
-             if (perm == SCM_EOL)
-               next->set_property ("penalty", scm_from_int (10001));
-             else if (perm == ly_symbol2scm ("force"))
-               next->set_property ("penalty", scm_from_int (-10001));
-           }
-       }
+        {
+          Prob *ps = unsmob_prob (scm_car (s));
+          ps->set_property ("number", scm_from_int (++i));
+
+          if (last
+              && to_boolean (last->get_property ("is-title"))
+              && !scm_is_number (ps->get_property ("penalty")))
+            ps->set_property ("penalty", scm_from_int (10000));
+          last = ps;
+
+          if (scm_is_pair (scm_cdr (s)))
+            {
+              SCM perm = ps->get_property ("page-break-permission");
+              Prob *next = unsmob_prob (scm_cadr (s));
+              if (perm == SCM_EOL)
+                next->set_property ("penalty", scm_from_int (10001));
+              else if (perm == ly_symbol2scm ("force"))
+                next->set_property ("penalty", scm_from_int (-10001));
+            }
+        }
     }
 
   return systems_;
@@ -646,8 +645,8 @@ Paper_book::pages ()
   if (scm_is_pair (bookparts_))
     {
       for (SCM p = bookparts_; scm_is_pair (p); p = scm_cdr (p))
-       if (Paper_book *pbookpart = unsmob_paper_book (scm_car (p)))
-         pages_ = scm_append_x (scm_list_2 (pages_, pbookpart->pages ()));
+        if (Paper_book *pbookpart = unsmob_paper_book (scm_car (p)))
+          pages_ = scm_append_x (scm_list_2 (pages_, pbookpart->pages ()));
     }
   else if (scm_is_pair (scores_))
     {
@@ -655,19 +654,19 @@ Paper_book::pages ()
       pages_ = scm_apply_0 (page_breaking, scm_list_1 (self_scm ()));
       SCM post_process = paper_->c_variable ("page-post-process");
       if (ly_is_procedure (post_process))
-       scm_apply_2 (post_process, paper_->self_scm (), pages_, SCM_EOL);
+        scm_apply_2 (post_process, paper_->self_scm (), pages_, SCM_EOL);
 
       /* set systems_ from the pages */
       if (systems_ == SCM_BOOL_F)
-       {
-         systems_ = SCM_EOL;
-         for (SCM p = pages_; scm_is_pair (p); p = scm_cdr (p))
-           {
-             Prob *page = unsmob_prob (scm_car (p));
-             SCM systems = page->get_property ("lines");
-             systems_ = scm_append (scm_list_2 (systems_, systems));
-           }
-       }
+        {
+          systems_ = SCM_EOL;
+          for (SCM p = pages_; scm_is_pair (p); p = scm_cdr (p))
+            {
+              Prob *page = unsmob_prob (scm_car (p));
+              SCM systems = page->get_property ("lines");
+              systems_ = scm_append (scm_list_2 (systems_, systems));
+            }
+        }
     }
   return pages_;
 }
index 8b2b550f2f460891acb13dc46d2a36d3a1e15d14..31b8023bef734caac6f4c4bfb3ee8281091b922a 100644 (file)
@@ -36,7 +36,7 @@
 
 Paper_column_engraver::Paper_column_engraver ()
 {
-  last_moment_.main_part_ = Rational (-1,1); 
+  last_moment_.main_part_ = Rational (-1, 1);
   command_column_ = 0;
   musical_column_ = 0;
   breaks_ = 0;
@@ -62,7 +62,7 @@ Paper_column_engraver::finalize ()
   if (command_column_)
     {
       if (!scm_is_symbol (command_column_->get_property ("line-break-permission")))
-       command_column_->set_property ("line-break-permission", ly_symbol2scm ("allow"));
+        command_column_->set_property ("line-break-permission", ly_symbol2scm ("allow"));
       system_->set_bound (RIGHT, command_column_);
     }
 }
@@ -75,7 +75,7 @@ Paper_column_engraver::make_columns ()
   */
   Paper_column *p1 = make_paper_column ("NonMusicalPaperColumn");
   Paper_column *p2 = make_paper_column ("PaperColumn");
-  /* 
+  /*
      The columns are timestamped with now_mom () in
      stop_translation_timestep. Cannot happen now, because the
      first column is sometimes created before now_mom is initialised.
@@ -104,21 +104,21 @@ void
 Paper_column_engraver::acknowledge_staff_spacing (Grob_info gi)
 {
   Pointer_group_interface::add_grob (command_column_,
-                                    ly_symbol2scm ("spacing-wishes"),
-                                    gi.grob ());
+                                     ly_symbol2scm ("spacing-wishes"),
+                                     gi.grob ());
 }
 
 void
 Paper_column_engraver::acknowledge_note_spacing (Grob_info gi)
 {
   Pointer_group_interface::add_grob (musical_column_,
-                                    ly_symbol2scm ("spacing-wishes"),
-                                    gi.grob ());
+                                     ly_symbol2scm ("spacing-wishes"),
+                                     gi.grob ());
 }
 
 void
 Paper_column_engraver::set_columns (Paper_column *new_command,
-                                   Paper_column *new_musical)
+                                    Paper_column *new_musical)
 {
   command_column_ = new_command;
   musical_column_ = new_musical;
@@ -156,12 +156,12 @@ Paper_column_engraver::process_music ()
       string name = ly_scm2string (scm_symbol_to_string (name_sym));
       size_t end = name.rfind ("-event");
       if (end)
-       prefix = name.substr (0, end);
+        prefix = name.substr (0, end);
       else
-       {
-         programming_error ("Paper_column_engraver doesn't know about this break-event");
-         return;
-       }
+        {
+          programming_error ("Paper_column_engraver doesn't know about this break-event");
+          return;
+        }
 
       string perm_str = prefix + "-permission";
       string pen_str = prefix + "-penalty";
@@ -171,16 +171,16 @@ Paper_column_engraver::process_music ()
       SCM perm = break_events_[i]->get_property ("break-permission");
 
       if (scm_is_number (pen))
-       {
-         Real new_pen = robust_scm2double (cur_pen, 0.0) + scm_to_double (pen);
-         command_column_->set_property (pen_str.c_str (), scm_from_double (new_pen));
-         command_column_->set_property (perm_str.c_str (), ly_symbol2scm ("allow"));
-       }
+        {
+          Real new_pen = robust_scm2double (cur_pen, 0.0) + scm_to_double (pen);
+          command_column_->set_property (pen_str.c_str (), scm_from_double (new_pen));
+          command_column_->set_property (perm_str.c_str (), ly_symbol2scm ("allow"));
+        }
       else
-       command_column_->set_property (perm_str.c_str (), perm);
+        command_column_->set_property (perm_str.c_str (), perm);
     }
 
-  for (vsize i = 0 ; i < label_events_.size () ; i ++)
+  for (vsize i = 0; i < label_events_.size (); i++)
     {
       SCM label = label_events_[i]->get_property ("page-label");
       SCM labels = command_column_->get_property ("labels");
@@ -188,7 +188,7 @@ Paper_column_engraver::process_music ()
     }
 
   bool start_of_measure = (last_moment_.main_part_ != now_mom ().main_part_
-                          && !measure_position (context ()).main_part_);
+                           && !measure_position (context ()).main_part_);
 
   /*
     We can't do this in start_translation_timestep (), since time sig
@@ -199,9 +199,9 @@ Paper_column_engraver::process_music ()
       Moment mlen = Moment (measure_length (context ()));
       Grob *column = unsmob_grob (get_property ("currentCommandColumn"));
       if (column)
-       column->set_property ("measure-length", mlen.smobbed_copy ());
+        column->set_property ("measure-length", mlen.smobbed_copy ());
       else
-       programming_error ("No command column?");
+        programming_error ("No command column?");
     }
 }
 
@@ -221,37 +221,37 @@ Paper_column_engraver::stop_translation_timestep ()
       Grob *col = Item::is_non_musical (elem) ? command_column_ : musical_column_;
 
       if (!elem->get_parent (X_AXIS))
-       elem->set_parent (col, X_AXIS);
+        elem->set_parent (col, X_AXIS);
       if (!unsmob_grob (elem->get_object ("axis-group-parent-X")))
-       elem->set_object ("axis-group-parent-X", col->self_scm ());
+        elem->set_object ("axis-group-parent-X", col->self_scm ());
 
       if (Accidental_placement::has_interface (elem))
-       Separation_item::add_conditional_item (col, elem);
+        Separation_item::add_conditional_item (col, elem);
       else if (!Accidental_interface::has_interface (elem))
-       Separation_item::add_item (col, elem);
+        Separation_item::add_item (col, elem);
     }
   items_.clear ();
 
   if (to_boolean (get_property ("forbidBreak"))
-     && breaks_) /* don't honour forbidBreak if it occurs on the first moment of a score */
+      && breaks_) /* don't honour forbidBreak if it occurs on the first moment of a score */
     {
       command_column_->set_property ("page-turn-permission", SCM_EOL);
       command_column_->set_property ("page-break-permission", SCM_EOL);
       command_column_->set_property ("line-break-permission", SCM_EOL);
       for (vsize i = 0; i < break_events_.size (); i++)
-       {
-         SCM perm = break_events_[i]->get_property ("break-permission");
-         if (perm == ly_symbol2scm ("force") || perm == ly_symbol2scm ("allow"))
-           warning (_ ("forced break was overridden by some other event, "
-                       "should you be using bar checks?"));
-       }
+        {
+          SCM perm = break_events_[i]->get_property ("break-permission");
+          if (perm == ly_symbol2scm ("force") || perm == ly_symbol2scm ("allow"))
+            warning (_ ("forced break was overridden by some other event, "
+                        "should you be using bar checks?"));
+        }
     }
   else if (Paper_column::is_breakable (command_column_))
     {
       breaks_++;
 
-      if (! (breaks_%8))
-       progress_indication ("[" + to_string (breaks_) + "]");
+      if (! (breaks_ % 8))
+        progress_indication ("[" + to_string (breaks_) + "]");
     }
 
   context ()->get_score_context ()->unset_property (ly_symbol2scm ("forbidBreak"));
@@ -266,7 +266,7 @@ Paper_column_engraver::stop_translation_timestep ()
       && scm_is_integer (barnum))
     {
       SCM where = scm_cons (barnum,
-                           mpos);
+                            mpos);
 
       command_column_->set_property ("rhythmic-location", where);
       musical_column_->set_property ("rhythmic-location", where);
@@ -288,27 +288,27 @@ ADD_ACKNOWLEDGER (Paper_column_engraver, note_spacing);
 ADD_ACKNOWLEDGER (Paper_column_engraver, staff_spacing);
 
 ADD_TRANSLATOR (Paper_column_engraver,
-               /* doc */
-               "Take care of generating columns.\n"
-               "\n"
-               "This engraver decides whether a column is breakable.  The"
-               " default is that a column is always breakable.  However,"
-               " every @code{Bar_engraver} that does not have a barline at a"
-               " certain point will set @code{forbidBreaks} in the score"
-               " context to stop line breaks.  In practice, this means that"
-               " you can make a break point by creating a bar line (assuming"
-               " that there are no beams or notes that prevent a break"
-               " point).",
-               
-               /* create */
-               "PaperColumn "
-               "NonMusicalPaperColumn ",
-
-               /* read */
+                /* doc */
+                "Take care of generating columns.\n"
+                "\n"
+                "This engraver decides whether a column is breakable.  The"
+                " default is that a column is always breakable.  However,"
+                " every @code{Bar_engraver} that does not have a barline at a"
+                " certain point will set @code{forbidBreaks} in the score"
+                " context to stop line breaks.  In practice, this means that"
+                " you can make a break point by creating a bar line (assuming"
+                " that there are no beams or notes that prevent a break"
+                " point).",
+
+                /* create */
+                "PaperColumn "
+                "NonMusicalPaperColumn ",
+
+                /* read */
                 "forbidBreak ",
 
-               /* write */
+                /* write */
                 "forbidBreak "
-               "currentCommandColumn "
-               "currentMusicalColumn "
-               );
+                "currentCommandColumn "
+                "currentMusicalColumn "
+               );
index f81818ea6853d2827fee411c9a467e0ad3904d9d..271a752a26f0d0ee0aad1a31f93302025d32bf70 100644 (file)
@@ -98,15 +98,15 @@ Paper_column::Paper_column (Paper_column const &src)
 
 int
 Paper_column::compare (Grob *const &a,
-                      Grob *const &b)
+                       Grob *const &b)
 {
   return sign (dynamic_cast<Paper_column *> (a)->rank_
-              - dynamic_cast<Paper_column *> (b)->rank_);
+               - dynamic_cast<Paper_column *> (b)->rank_);
 }
 
 bool
 Paper_column::less_than (Grob *const &a,
-                        Grob *const &b)
+                         Grob *const &b)
 {
   Paper_column *pa = dynamic_cast<Paper_column *> (a);
   Paper_column *pb = dynamic_cast<Paper_column *> (b);
@@ -173,7 +173,7 @@ Paper_column::minimum_distance (Grob *left, Grob *right)
     {
       Skyline_pair *sp = Skyline_pair::unsmob (cols[d]->get_property ("horizontal-skylines"));
       if (sp)
-       skys[d] = (*sp)[-d];
+        skys[d] = (*sp)[-d];
     }
   while (flip (&d) != LEFT);
 
@@ -198,20 +198,20 @@ Paper_column::break_align_width (Grob *me, SCM align_sym)
       || align_sym == ly_symbol2scm ("break-alignment"))
     align
       = Pointer_group_interface::find_grob (me, ly_symbol2scm ("elements"),
-                                           (align_sym == ly_symbol2scm ("staff-bar")
-                                            ? Bar_line::non_empty_barline
-                                            : Break_alignment_interface::has_interface));
+                                            (align_sym == ly_symbol2scm ("staff-bar")
+                                             ? Bar_line::non_empty_barline
+                                             : Break_alignment_interface::has_interface));
   else
     {
       extract_grob_set (me, "elements", elts);
       for (vsize i = 0; i < elts.size (); i++)
-       {
-         if (elts[i]->get_property ("break-align-symbol") == align_sym)
-           {
-             align = elts[i];
-             break;
-           }
-       }
+        {
+          if (elts[i]->get_property ("break-align-symbol") == align_sym)
+            {
+              align = elts[i];
+              break;
+            }
+        }
     }
 
   if (!align)
@@ -238,22 +238,22 @@ Paper_column::print (SCM p)
   SCM properties = Font_interface::text_font_alist_chain (me);
 
   SCM scm_mol = Text_interface::interpret_markup (me->layout ()->self_scm (),
-                                                 properties,
-                                                 ly_string2scm (r));
+                                                  properties,
+                                                  ly_string2scm (r));
   SCM when_mol = Text_interface::interpret_markup (me->layout ()->self_scm (),
-                                                  properties,
-                                                  ly_string2scm (when));
+                                                   properties,
+                                                   ly_string2scm (when));
   Stencil t = *unsmob_stencil (scm_mol);
   t.add_at_edge (Y_AXIS, DOWN, *unsmob_stencil (when_mol), 0.1);
   t.align_to (X_AXIS, CENTER);
   t.align_to (Y_AXIS, DOWN);
 
   Stencil l = Lookup::filled_box (Box (Interval (-0.01, 0.01),
-                                      Interval (-2, -1)));
+                                       Interval (-2, -1)));
 
   SCM small_letters = scm_cons (scm_acons (ly_symbol2scm ("font-size"),
-                                          scm_from_int (-6), SCM_EOL),
-                               properties);
+                                           scm_from_int (-6), SCM_EOL),
+                                properties);
 
   int j = 0;
   for (SCM s = me->get_object ("ideal-distances");
@@ -261,11 +261,11 @@ Paper_column::print (SCM p)
     {
       Spring *sp = unsmob_spring (scm_caar (s));
       if (!unsmob_grob (scm_cdar (s))
-         || !unsmob_grob (scm_cdar (s))->get_system ())
-       continue;
+          || !unsmob_grob (scm_cdar (s))->get_system ())
+        continue;
 
       j++;
-      Real y = -j * 1 -3;
+      Real y = -j * 1 - 3;
       vector<Offset> pts;
       pts.push_back (Offset (0, y));
 
@@ -276,12 +276,12 @@ Paper_column::print (SCM p)
       Stencil head (musfont->find_by_name ("arrowheads.open.01"));
 
       SCM distance_stc = Text_interface::interpret_markup (me->layout ()->self_scm (),
-                                                          small_letters,
-                                                          ly_string2scm (String_convert::form_string ("%5.2lf", sp->distance ())));
+                                                           small_letters,
+                                                           ly_string2scm (String_convert::form_string ("%5.2lf", sp->distance ())));
 
       id_stencil.add_stencil (unsmob_stencil (distance_stc)->translated (Offset (sp->distance () / 3, y + 1)));
       id_stencil.add_stencil (head.translated (p2));
-      id_stencil = id_stencil.in_color (0,0,1);
+      id_stencil = id_stencil.in_color (0, 0, 1);
       l.add_stencil (id_stencil);
     }
 
@@ -291,11 +291,11 @@ Paper_column::print (SCM p)
       Real dist = scm_to_double (scm_cdar (s));
       Grob *other = unsmob_grob (scm_caar (s));
       if (!other || other->get_system () != me->get_system ())
-       continue;
+        continue;
 
       j++;
 
-      Real y = -j * 1.0 -3.5;
+      Real y = -j * 1.0 - 3.5;
       vector<Offset> pts;
       pts.push_back (Offset (0, y));
 
@@ -308,13 +308,13 @@ Paper_column::print (SCM p)
       id_stencil.add_stencil (head);
 
       SCM distance_stc = Text_interface::interpret_markup (me->layout ()->self_scm (),
-                                                          small_letters,
-                                                          ly_string2scm (String_convert::form_string ("%5.2lf",
-                                                                                                      dist)));
+                                                           small_letters,
+                                                           ly_string2scm (String_convert::form_string ("%5.2lf",
+                                                               dist)));
 
       id_stencil.add_stencil (unsmob_stencil (distance_stc)->translated (Offset (dist / 3, y - 1)));
 
-      id_stencil = id_stencil.in_color (1,0,0);
+      id_stencil = id_stencil.in_color (1, 0, 0);
       l.add_stencil (id_stencil);
     }
   t.add_stencil (l);
@@ -347,8 +347,8 @@ Paper_column::before_line_breaking (SCM grob)
       Grob *g = array[i];
 
       if (!g || !g->is_live ())
-       /* UGH . potentially quadratic. */
-       array.erase (array.begin () + i);
+        /* UGH . potentially quadratic. */
+        array.erase (array.begin () + i);
     }
 
   return SCM_UNSPECIFIED;
@@ -372,47 +372,47 @@ Paper_column::is_extraneous_column_from_ligature (Grob *me)
   for (vsize i = 0; i < elts.size (); i++)
     {
       if (Rhythmic_head::has_interface (elts[i]))
-       {
-         has_notehead = true;
-         if (dynamic_cast<Item *> (elts[i])->get_column () == me)
-           return false;
-       }
+        {
+          has_notehead = true;
+          if (dynamic_cast<Item *> (elts[i])->get_column () == me)
+            return false;
+        }
     }
   return has_notehead;
 }
 
 ADD_INTERFACE (Paper_column,
-              "@code{Paper_column} objects form the top-most X@tie{}parents"
-              " for items.  There are two types of columns: musical and"
-              " non-musical, to which musical and non-musical objects are"
-              " attached respectively.  The spacing engine determines the"
-              " X@tie{}positions of these objects.\n"
-              "\n"
-              "They are numbered, the first (leftmost) is column@tie{}0."
-              "  Numbering happens before line breaking, and columns are not"
-              " renumbered after line breaking.  Since many columns go"
-              " unused, you should only use the rank field to get ordering"
-              " information.  Two adjacent columns may have non-adjacent"
-              " numbers.",
-
-              /* properties */
-              "between-cols "
-              "bounded-by-me "
-              "full-measure-extra-space "
-              "grace-spacing "
-              "labels "
-              "line-break-system-details "
-              "line-break-penalty "
-              "line-break-permission "
-              "maybe-loose "
-              "page-break-penalty "
-              "page-break-permission "
-              "page-turn-penalty "
-              "page-turn-permission "
-              "rhythmic-location "
-              "shortest-playing-duration "
-              "shortest-starter-duration "
-              "spacing "
-              "used "
-              "when ");
+               "@code{Paper_column} objects form the top-most X@tie{}parents"
+               " for items.  There are two types of columns: musical and"
+               " non-musical, to which musical and non-musical objects are"
+               " attached respectively.  The spacing engine determines the"
+               " X@tie{}positions of these objects.\n"
+               "\n"
+               "They are numbered, the first (leftmost) is column@tie{}0."
+               "  Numbering happens before line breaking, and columns are not"
+               " renumbered after line breaking.  Since many columns go"
+               " unused, you should only use the rank field to get ordering"
+               " information.  Two adjacent columns may have non-adjacent"
+               " numbers.",
+
+               /* properties */
+               "between-cols "
+               "bounded-by-me "
+               "full-measure-extra-space "
+               "grace-spacing "
+               "labels "
+               "line-break-system-details "
+               "line-break-penalty "
+               "line-break-permission "
+               "maybe-loose "
+               "page-break-penalty "
+               "page-break-permission "
+               "page-turn-penalty "
+               "page-turn-permission "
+               "rhythmic-location "
+               "shortest-playing-duration "
+               "shortest-starter-duration "
+               "spacing "
+               "used "
+               "when ");
 
index 14f1546d60f5c3e48fb47383c376e2aa9770b023..f45939ad4636d7409109787756cd8738478ddcf5 100644 (file)
@@ -93,15 +93,14 @@ find_pango_font (Output_def *layout, SCM descr, Real factor)
     = pango_font_description_from_string (scm_i_string_chars (descr));
 
   pango_font_description_set_size (description,
-                                  gint (factor *
-                                        pango_font_description_get_size (description)));
+                                   gint (factor *
+                                         pango_font_description_get_size (description)));
 
-  
   Font_metric *fm = all_fonts_global->find_pango_font (description,
-                                                      output_scale (layout));
+                                                       output_scale (layout));
 
   pango_font_description_free (description);
+
   sizes = scm_acons (size_key, fm->self_scm (), sizes);
   scm_hash_set_x (table, descr, sizes);
 
index be3d315cf1c81b0b4f7470fb6ca369a3b7e944d2..652b8a6033cb41d95492eb0e79c5a0d73ca750ef 100644 (file)
@@ -24,9 +24,9 @@
 #include "warn.hh"
 
 LY_DEFINE (ly_make_paper_outputter, "ly:make-paper-outputter",
-          2, 0, 0, (SCM port, SCM format),
-          "Create an outputter that evaluates within"
-          " @code{output-}@var{format}, writing to @var{port}.")
+           2, 0, 0, (SCM port, SCM format),
+           "Create an outputter that evaluates within"
+           " @code{output-}@var{format}, writing to @var{port}.")
 {
   LY_ASSERT_TYPE (ly_is_port, port, 1);
   LY_ASSERT_TYPE (ly_is_symbol, format, 2);
@@ -39,7 +39,7 @@ LY_DEFINE (ly_make_paper_outputter, "ly:make-paper-outputter",
     output_name = ly_scm2string (port_name);
 
   message (_f ("Layout output to `%s'...",
-              output_name.c_str ()));
+               output_name.c_str ()));
 
   progress_indication ("\n");
   Paper_outputter *po = new Paper_outputter (port, f);
@@ -50,10 +50,10 @@ LY_DEFINE (ly_make_paper_outputter, "ly:make-paper-outputter",
 
 /* FIXME: why is output_* wrapper called dump?  */
 LY_DEFINE (ly_outputter_dump_stencil, "ly:outputter-dump-stencil",
-          2, 0, 0, (SCM outputter, SCM stencil),
-          "Dump stencil @var{expr} onto @var{outputter}.")
+           2, 0, 0, (SCM outputter, SCM stencil),
+           "Dump stencil @var{expr} onto @var{outputter}.")
 {
-  
+
   LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
   LY_ASSERT_SMOB (Stencil, stencil, 2);
 
@@ -65,8 +65,8 @@ LY_DEFINE (ly_outputter_dump_stencil, "ly:outputter-dump-stencil",
 }
 
 LY_DEFINE (ly_outputter_dump_string, "ly:outputter-dump-string",
-          2, 0, 0, (SCM outputter, SCM str),
-          "Dump @var{str} onto @var{outputter}.")
+           2, 0, 0, (SCM outputter, SCM str),
+           "Dump @var{str} onto @var{outputter}.")
 {
   LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
   LY_ASSERT_TYPE (scm_is_string, str, 2);
@@ -77,8 +77,8 @@ LY_DEFINE (ly_outputter_dump_string, "ly:outputter-dump-string",
 }
 
 LY_DEFINE (ly_outputter_port, "ly:outputter-port",
-          1, 0, 0, (SCM outputter),
-          "Return output port for @var{outputter}.")
+           1, 0, 0, (SCM outputter),
+           "Return output port for @var{outputter}.")
 {
   LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
   Paper_outputter *po = unsmob_outputter (outputter);
@@ -87,8 +87,8 @@ LY_DEFINE (ly_outputter_port, "ly:outputter-port",
 }
 
 LY_DEFINE (ly_outputter_close, "ly:outputter-close",
-          1, 0, 0, (SCM outputter),
-          "Close port of @var{outputter}.")
+           1, 0, 0, (SCM outputter),
+           "Close port of @var{outputter}.")
 {
   LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
   Paper_outputter *po = unsmob_outputter (outputter);
@@ -98,8 +98,8 @@ LY_DEFINE (ly_outputter_close, "ly:outputter-close",
 }
 
 LY_DEFINE (ly_outputter_output_scheme, "ly:outputter-output-scheme",
-          2, 0, 0, (SCM outputter, SCM expr),
-          "Eval @var{expr} in module of @var{outputter}.")
+           2, 0, 0, (SCM outputter, SCM expr),
+           "Eval @var{expr} in module of @var{outputter}.")
 {
   LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
   Paper_outputter *po = unsmob_outputter (outputter);
@@ -110,8 +110,8 @@ LY_DEFINE (ly_outputter_output_scheme, "ly:outputter-output-scheme",
 }
 
 LY_DEFINE (ly_outputter_module, "ly:outputter-module",
-          1, 0, 0, (SCM outputter),
-          "Return output module of @var{outputter}.")
+           1, 0, 0, (SCM outputter),
+           "Return output module of @var{outputter}.")
 {
   LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
 
index e08cbd6590ea870c2e357b16943490a45f5fa25f..33657d60cb6f844cb50bbc505a63021d23cb5365 100644 (file)
@@ -74,8 +74,8 @@ Paper_outputter::mark_smob (SCM x)
 
 int
 Paper_outputter::print_smob (SCM /* x */,
-                            SCM p,
-                            scm_print_state *)
+                             SCM p,
+                             scm_print_state *)
 {
   scm_puts ("#<Paper_outputter>", p);
   return 1;
@@ -122,7 +122,7 @@ void
 Paper_outputter::output_stencil (Stencil stil)
 {
   interpret_stencil_expression (stil.expr (), paper_outputter_dump,
-                               (void *) this, Offset (0, 0));
+                                (void *) this, Offset (0, 0));
 }
 
 void
@@ -132,9 +132,9 @@ Paper_outputter::close ()
     {
       scm_close_port (file_);
       /*
-       Remove the "warning" definitions for missing stencil
-       expressions so that we start fresh with the next \book
-       block.  --pmccarty
+        Remove the "warning" definitions for missing stencil
+        expressions so that we start fresh with the next \book
+        block.  --pmccarty
       */
       SCM proc = ly_lily_module_constant ("remove-stencil-warnings");
       scm_call_1 (proc, output_module_);
index 033f1b6477af382b10862a43236c6f1c55681cfc..713393cca7643a61b28d342139808deacd236e5c 100644 (file)
 #include "paper-score.hh"
 
 LY_DEFINE (ly_paper_score_paper_systems, "ly:paper-score-paper-systems",
-          1, 0, 0,
-          (SCM paper_score),
-          "Return vector of @code{paper_system} objects from"
-          " @var{paper-score}.")
+           1, 0, 0,
+           (SCM paper_score),
+           "Return vector of @code{paper_system} objects from"
+           " @var{paper-score}.")
 {
   LY_ASSERT_TYPE (unsmob_paper_score, paper_score, 1);
 
index 9b5e8aa7dfb26c936c88ae212938829414bc134c..c9c316026093054e88f4b9249ccbcda246135da3 100644 (file)
@@ -78,14 +78,14 @@ Paper_score::find_break_indices () const
 
   for (vsize i = 0; i < cols_.size (); i++)
     {
-      Item *it = dynamic_cast<Item*> (cols_[i]);
+      Item *it = dynamic_cast<Item *> (cols_[i]);
       if (Paper_column::is_breakable (cols_[i])
-         && (i == 0 || it->find_prebroken_piece (LEFT))
-         && (i == cols_.size () - 1 || it->find_prebroken_piece (RIGHT)))
-       {
-         break_indices_.push_back (i);
-         break_ranks_.push_back (it->get_column ()->get_rank ());
-       }
+          && (i == 0 || it->find_prebroken_piece (LEFT))
+          && (i == cols_.size () - 1 || it->find_prebroken_piece (RIGHT)))
+        {
+          break_indices_.push_back (i);
+          break_ranks_.push_back (it->get_column ()->get_rank ());
+        }
     }
 }
 
@@ -97,7 +97,7 @@ Paper_score::get_break_indices () const
   return break_indices_;
 }
 
-vector<Grob*>
+vector<Grob *>
 Paper_score::get_columns () const
 {
   if (cols_.empty ())
@@ -133,8 +133,8 @@ Paper_score::process ()
 {
   if (be_verbose_global)
     message (_f ("Element count %d (spanners %d) ",
-                system_->element_count (),
-                system_->spanner_count ()));
+                 system_->element_count (),
+                 system_->spanner_count ()));
 
   message (_ ("Preprocessing graphical objects..."));
 
@@ -167,9 +167,8 @@ Paper_score::get_paper_systems ()
   return paper_systems_;
 }
 
-
 Paper_score *
 unsmob_paper_score (SCM x)
 {
-  return dynamic_cast<Paper_score*> (unsmob_music_output (x));
+  return dynamic_cast<Paper_score *> (unsmob_music_output (x));
 }
index 4187cfa3dbdf2dedea0af0cc96bad81025597619..7c4dc88d095b0f7985e6eee575ae60429bfdf1f3 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2008--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
-  
+
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
 #include "prob.hh"
 
 #include "skyline-pair.hh"
-  
+
 LY_DEFINE (ly_paper_system_p, "ly:paper-system?",
-         1, 0, 0, (SCM obj),
-         "Is @var{obj} a C++ @code{Prob} object of type"
-         " @code{paper-system}?")
+           1, 0, 0, (SCM obj),
+           "Is @var{obj} a C++ @code{Prob} object of type"
+           " @code{paper-system}?")
 {
   return ly_prob_type_p (obj, ly_symbol2scm ("paper-system"));
 }
 
 LY_DEFINE (ly_paper_system_minimum_distance, "ly:paper-system-minimum-distance",
-          2, 0, 0, (SCM sys1, SCM sys2),
-          "Measure the minimum distance between these two paper-systems,"
-          " using their stored skylines if possible and falling back to"
-          " their extents otherwise.")
+           2, 0, 0, (SCM sys1, SCM sys2),
+           "Measure the minimum distance between these two paper-systems,"
+           " using their stored skylines if possible and falling back to"
+           " their extents otherwise.")
 {
   Real ret = 0;
   Prob *p1 = unsmob_prob (sys1);
index 437a0eb450d32e165536e693f1fa63fdf92f9f7f..ba2583a009bf2dc85710e2b37170af52fd9c1fee 100644 (file)
@@ -31,9 +31,9 @@ make_paper_system (SCM immutable_init)
 /*
   TODO
   it might be interesting to split off the footnotes as well, ie.
-  
-  get_footnotes(SCM expr, SCM* footnotes, SCM* cleaned) 
-    
+
+  get_footnotes(SCM expr, SCM* footnotes, SCM* cleaned)
+
   by doing it this way and overwriting the old expr in the caller,
   you can make sure nobody tries to handle footnotes differently
   downstream.
@@ -51,7 +51,7 @@ get_footnotes (SCM expr)
       // we likely need to do something here...just don't know what...
       return SCM_EOL;
     }
-  
+
   if (head == ly_symbol2scm ("combine-stencil"))
     {
       SCM out = SCM_EOL;
@@ -77,7 +77,6 @@ get_footnotes (SCM expr)
   return SCM_EOL;
 }
 
-
 void
 paper_system_set_stencil (Prob *prob, Stencil s)
 {
index 1fe8005e4d1d93c504eca919ae2c8138087b51ec..7c17c7504b7d9d7b215e6e5fce24983fa5190d69 100644 (file)
@@ -46,45 +46,45 @@ Parenthesis_engraver::acknowledge_grob (Grob_info info)
   if (Stream_event *ev = info.event_cause ())
     {
       if (to_boolean (ev->get_property ("parenthesize")))
-       {
-         if (Item *victim = dynamic_cast<Item*> (info.grob ()))
-           {
-             Engraver *eng = dynamic_cast<Engraver*> (info.origin_translator ());
-             Item *paren = eng->make_item ("ParenthesesItem", victim->self_scm ());
-             Pointer_group_interface::add_grob (paren, ly_symbol2scm ("elements"), victim);
-
-             paren->set_parent (victim, Y_AXIS);
-             
-             Real size = robust_scm2double (paren->get_property ("font-size"), 0.0)
-               + robust_scm2double (victim->get_property ("font-size"), 0.0);
-             paren->set_property ("font-size", scm_from_double (size));
-             
-             /*
-               TODO?
-
-               enlarge victim to allow for parentheses space? 
-             */
-           }
-         else
-           {
-             programming_error ("Don't know how to parenthesize spanners.");
-           }
-       }
+        {
+          if (Item *victim = dynamic_cast<Item *> (info.grob ()))
+            {
+              Engraver *eng = dynamic_cast<Engraver *> (info.origin_translator ());
+              Item *paren = eng->make_item ("ParenthesesItem", victim->self_scm ());
+              Pointer_group_interface::add_grob (paren, ly_symbol2scm ("elements"), victim);
+
+              paren->set_parent (victim, Y_AXIS);
+
+              Real size = robust_scm2double (paren->get_property ("font-size"), 0.0)
+                          + robust_scm2double (victim->get_property ("font-size"), 0.0);
+              paren->set_property ("font-size", scm_from_double (size));
+
+              /*
+                TODO?
+
+                enlarge victim to allow for parentheses space?
+              */
+            }
+          else
+            {
+              programming_error ("Don't know how to parenthesize spanners.");
+            }
+        }
     }
 }
 
 ADD_ACKNOWLEDGER (Parenthesis_engraver, grob);
 ADD_TRANSLATOR (Parenthesis_engraver,
-               /* doc */
-               "Parenthesize objects whose music cause has the"
-               " @code{parenthesize} property.",
-               
-               /* create */
-               "ParenthesesItem ",
-
-               /* read */
-               "",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Parenthesize objects whose music cause has the"
+                " @code{parenthesize} property.",
+
+                /* create */
+                "ParenthesesItem ",
+
+                /* read */
+                "",
+
+                /* write */
+                ""
+               );
index b51dcb296a6c7a9998db6d7e70f61d7b1f76153e..f5092675b3cc124fc730f7e90f00861dfea44b62 100644 (file)
@@ -43,37 +43,36 @@ internal_ly_parse_scm (Parse_start *ps)
   scm_seek (port, scm_from_long (off), scm_from_long (SEEK_SET));
   SCM from = scm_ftell (port);
 
-  scm_set_port_line_x (port,  scm_from_int (ps->start_location_.line_number () -1));
-  scm_set_port_column_x (port,  scm_from_int (ps->start_location_.column_number () -1));
-  
+  scm_set_port_line_x (port, scm_from_int (ps->start_location_.line_number () - 1));
+  scm_set_port_column_x (port, scm_from_int (ps->start_location_.column_number () - 1));
+
   SCM answer = SCM_UNSPECIFIED;
   SCM form = scm_read (port);
 
   SCM to = scm_ftell (port);
   ps->nchars = scm_to_int (to) - scm_to_int (from);
-  
 
   /* Read expression from port.  */
   if (!SCM_EOF_OBJECT_P (form))
     {
       if (ps->safe_)
-       {
-         static SCM module = SCM_BOOL_F;
-         if (module == SCM_BOOL_F)
-           {
-             SCM function = ly_lily_module_constant ("make-safe-lilypond-module");
-             module = scm_call_0 (function);
-           }
-         
-         // We define the parser so trusted Scheme functions can
-         // access the real namespace underlying the parser.
-         if (ps->parser_)
-           scm_module_define (module, ly_symbol2scm ("parser"),
-                              ps->parser_->self_scm());
-         answer = scm_eval (form, module);
-       }
+        {
+          static SCM module = SCM_BOOL_F;
+          if (module == SCM_BOOL_F)
+            {
+              SCM function = ly_lily_module_constant ("make-safe-lilypond-module");
+              module = scm_call_0 (function);
+            }
+
+          // We define the parser so trusted Scheme functions can
+          // access the real namespace underlying the parser.
+          if (ps->parser_)
+            scm_module_define (module, ly_symbol2scm ("parser"),
+                               ps->parser_->self_scm ());
+          answer = scm_eval (form, module);
+        }
       else
-       answer = scm_primitive_eval (form);
+        answer = scm_primitive_eval (form);
     }
 
   /* Don't close the port here; if we re-enter this function via a
@@ -115,10 +114,10 @@ protected_ly_parse_scm (Parse_start *ps)
   /*
     Catch #t : catch all Scheme level errors.
    */
-  return scm_internal_catch (SCM_BOOL_T, 
-                            &catch_protected_parse_body,
-                            (void *) ps,
-                            &parse_handler, (void *) ps);
+  return scm_internal_catch (SCM_BOOL_T,
+                             &catch_protected_parse_body,
+                             (void *) ps,
+                             &parse_handler, (void *) ps);
 }
 
 bool parse_protect_global = true;
@@ -136,7 +135,7 @@ ly_parse_scm (char const *s, int *n, Input i, bool safe, Lily_parser *parser)
   ps.parser_ = parser;
 
   SCM ans = parse_protect_global ? protected_ly_parse_scm (&ps)
-    : internal_ly_parse_scm (&ps);
+            : internal_ly_parse_scm (&ps);
   *n = ps.nchars;
 
   return ans;
index 6c45e5950717b12c093bc339aaad79985718052f..201f04f1d036da86de78c491f81333c8a8dd99a0 100644 (file)
@@ -328,6 +328,7 @@ If we give names, Bison complains.
 %type <scm> composite_music
 %type <scm> grouped_music_list
 %type <scm> closed_music
+%type <scm> open_music
 %type <scm> music
 %type <scm> prefix_composite_music
 %type <scm> repeated_music
@@ -391,9 +392,9 @@ If we give names, Bison complains.
 %type <scm> full_markup_list
 %type <scm> function_scm_argument
 %type <scm> function_arglist
-%type <scm> function_arglist_music_last
 %type <scm> function_arglist_nonmusic_last
-%type <scm> function_arglist_nonmusic
+%type <scm> closed_function_arglist
+%type <scm> open_function_arglist
 %type <scm> identifier_init
 %type <scm> lilypond_header
 %type <scm> lilypond_header_body
@@ -413,9 +414,10 @@ If we give names, Bison complains.
 %type <scm> mode_changing_head
 %type <scm> mode_changing_head_with_context
 %type <scm> multiplied_duration
-%type <scm> music_function_identifier_musicless_prefix
 %type <scm> music_function_event
+%type <scm> music_function_event_arglist
 %type <scm> music_function_chord_body
+%type <scm> music_function_chord_body_arglist
 %type <scm> new_chord
 %type <scm> new_lyrics
 %type <scm> number_expression
@@ -926,25 +928,14 @@ tempo_event:
        ;
 
 /*
-The representation of a  list is the
-
-  (LIST . LAST-CONS)
-
- to have efficient append.  */
+The representation of a  list is reversed to have efficient append.  */
 
 music_list:
        /* empty */ {
-               $$ = scm_cons (SCM_EOL, SCM_EOL);
+               $$ = SCM_EOL;
        }
        | music_list music {
-               SCM s = $$;
-               SCM c = scm_cons ($2, SCM_EOL);
-
-               if (scm_is_pair (scm_cdr (s)))
-                       scm_set_cdr_x (scm_cdr (s), c); /* append */
-               else
-                       scm_set_car_x (s, c); /* set first cons */
-               scm_set_cdr_x (s, c);  /* remember last cell */
+               $$ = scm_cons ($2, $1);
        }
        | music_list embedded_scm {
 
@@ -953,21 +944,15 @@ music_list:
                Music *m = MY_MAKE_MUSIC("Music", @$);
                // ugh. code dup
                m->set_property ("error-found", SCM_BOOL_T);
-               SCM s = $$;
-               SCM c = scm_cons (m->self_scm (), SCM_EOL);
+               $$ = scm_cons (m->self_scm (), $1);
                m->unprotect (); /* UGH */
-
-               if (scm_is_pair (scm_cdr (s)))
-                       scm_set_cdr_x (scm_cdr (s), c); /* append */
-               else
-                       scm_set_car_x (s, c); /* set first cons */
-               scm_set_cdr_x (s, c);  /* remember last cell */
        }
        ;
 
 music:
        simple_music
        | composite_music
+       | MUSIC_IDENTIFIER
        ;
 
 alternative_music:
@@ -975,7 +960,7 @@ alternative_music:
                $$ = SCM_EOL;
        }
        | ALTERNATIVE '{' music_list '}' {
-               $$ = scm_car ($3);
+               $$ = scm_reverse_x ($3, SCM_EOL);
        }
        ;
 
@@ -989,25 +974,24 @@ repeated_music:
 
 sequential_music:
        SEQUENTIAL '{' music_list '}'           {
-               $$ = MAKE_SYNTAX ("sequential-music", @$, scm_car ($3));
+               $$ = MAKE_SYNTAX ("sequential-music", @$, scm_reverse_x ($3, SCM_EOL));
        }
        | '{' music_list '}'            {
-               $$ = MAKE_SYNTAX ("sequential-music", @$, scm_car ($2));
+               $$ = MAKE_SYNTAX ("sequential-music", @$, scm_reverse_x ($2, SCM_EOL));
        }
        ;
 
 simultaneous_music:
        SIMULTANEOUS '{' music_list '}'{
-               $$ = MAKE_SYNTAX ("simultaneous-music", @$, scm_car ($3));
+               $$ = MAKE_SYNTAX ("simultaneous-music", @$, scm_reverse_x ($3, SCM_EOL));
        }
        | DOUBLE_ANGLE_OPEN music_list DOUBLE_ANGLE_CLOSE       {
-               $$ = MAKE_SYNTAX ("simultaneous-music", @$, scm_car ($2));
+               $$ = MAKE_SYNTAX ("simultaneous-music", @$, scm_reverse_x ($2, SCM_EOL));
        }
        ;
 
 simple_music:
        event_chord
-       | MUSIC_IDENTIFIER
        | music_property_def
        | context_change
        ;
@@ -1063,6 +1047,12 @@ closed_music:
        | grouped_music_list
        ;
 
+/* Music that potentially accepts additional events or durations */
+open_music:
+       simple_music
+       | prefix_composite_music
+       ;
 grouped_music_list:
        simultaneous_music              { $$ = $1; }
        | sequential_music              { $$ = $1; }
@@ -1077,12 +1067,28 @@ function_scm_argument:
  MUSIC_FUNCTION EXPECT_MUSIC EXPECT_SCM EXPECT_SCM EXPECT_NO_MORE_ARGS
 and this rule returns the reversed list of arguments. */
 
-function_arglist_music_last:
-       EXPECT_MUSIC function_arglist music {
+
+function_arglist:
+       closed_function_arglist
+       | open_function_arglist
+       ;
+
+open_function_arglist:
+       EXPECT_MUSIC function_arglist open_music {
                $$ = scm_cons ($3, $2);
        }
        ;
 
+/* a closed argument list is one that does not end in a music
+   expression that could still take a duration or event */
+
+closed_function_arglist:
+       function_arglist_nonmusic_last
+       | EXPECT_MUSIC function_arglist closed_music {
+               $$ = scm_cons ($3, $2);
+               }
+       ;
+
 function_arglist_nonmusic_last:
        EXPECT_NO_MORE_ARGS {
                /* This is for 0-ary functions, so they don't need to
@@ -1098,7 +1104,7 @@ function_arglist_nonmusic_last:
        | EXPECT_PITCH function_arglist pitch {
                $$ = scm_cons ($3, $2);
        }
-       | EXPECT_DURATION function_arglist_nonmusic_last duration_length {
+       | EXPECT_DURATION closed_function_arglist duration_length {
                $$ = scm_cons ($3, $2);
        }
        | EXPECT_SCM function_arglist function_scm_argument {
@@ -1106,34 +1112,9 @@ function_arglist_nonmusic_last:
        }
        ;
 
-function_arglist_nonmusic: EXPECT_NO_MORE_ARGS {
-               $$ = SCM_EOL;
-       }
-       | EXPECT_MARKUP function_arglist_nonmusic full_markup {
-               $$ = scm_cons ($3, $2);
-       }
-       | EXPECT_MARKUP function_arglist_nonmusic simple_string {
-               $$ = scm_cons ($3, $2);
-       }
-       | EXPECT_PITCH function_arglist_nonmusic pitch {
-               $$ = scm_cons ($3, $2);
-       }
-       | EXPECT_DURATION function_arglist_nonmusic duration_length {
-               $$ = scm_cons ($3, $2);
-       }
-       | EXPECT_SCM function_arglist_nonmusic function_scm_argument {
-               $$ = scm_cons ($3, $2);
-       }
-       ;
-
-function_arglist:
-       function_arglist_music_last
-       | function_arglist_nonmusic_last
-       ;
-
 generic_prefix_music_scm:
        MUSIC_FUNCTION function_arglist {
-               $$ = scm_cons ($1, scm_cons (make_input (@$), scm_reverse_x ($2, SCM_EOL)));
+               $$ = scm_cons2 ($1, make_input (@$), scm_reverse_x ($2, SCM_EOL));
        }
        ;
 
@@ -1583,36 +1564,43 @@ chord_body_element:
        }
        ;
 
-music_function_identifier_musicless_prefix: MUSIC_FUNCTION {
-               SCM sig = scm_object_property (yylval.scm, ly_symbol2scm ("music-function-signature"));
-               if (scm_is_pair (sig) && to_boolean (scm_memq (ly_music_p_proc, scm_cdr (scm_reverse (sig)))))
-               {
-                       PARSER->parser_error (@$, "Music function applied to event may not have a Music argument, except as the last argument.");
-               }
+/* We can't accept a music argument, not even a closed one,
+ * immediately before chord_body_elements, otherwise a function \fun
+ * with a signature of two music arguments can't be sorted out
+ * properly in a construct like
+ * <\fun { c } \fun { c } c>
+ * The second call could be interpreted either as a chord constituent
+ * or a music expression.
+ */
+
+music_function_chord_body_arglist:
+       function_arglist_nonmusic_last
+       | EXPECT_MUSIC music_function_chord_body_arglist chord_body_element {
+               $$ = scm_cons ($3, $2);
        }
        ;
 
 music_function_chord_body:
-       /* We could allow chord functions to have multiple music arguments,
-          but it's more consistent with music_function_event if we
-          prohibit it here too */
-       music_function_identifier_musicless_prefix EXPECT_MUSIC function_arglist_nonmusic chord_body_element {
-               $$ = scm_cons ($1, scm_cons (make_input (@$), scm_reverse_x ($3, scm_list_1 ($4))));
+       MUSIC_FUNCTION music_function_chord_body_arglist {
+               $$ = scm_cons2 ($1, make_input (@$), scm_reverse_x ($2, SCM_EOL));
        }
-       | music_function_identifier_musicless_prefix function_arglist_nonmusic {
-               $$ = scm_cons ($1, scm_cons (make_input (@$), scm_reverse_x ($2, SCM_EOL)));
+       ;
+
+/* We could accept a closed music argument before the post events
+ * indicated by a trailing argument list.  For symmetry with chord
+ * bodies and in order to avoid too tricky and complex behavior, we
+ * refrain from doing so.
+ */
+music_function_event_arglist:
+       function_arglist_nonmusic_last
+       | EXPECT_MUSIC music_function_event_arglist post_event {
+               $$ = scm_cons ($3, $2);
        }
        ;
 
 music_function_event:
-       /* Post-events can only have the last argument as music, without this
-          restriction we get a shift/reduce conflict from e.g.
-          c8-\partcombine c8 -. */
-       music_function_identifier_musicless_prefix EXPECT_MUSIC function_arglist_nonmusic post_event {
-               $$ = scm_cons ($1, scm_cons (make_input (@$), scm_reverse_x ($3, scm_list_1 ($4))));
-       }
-       | music_function_identifier_musicless_prefix function_arglist_nonmusic {
-               $$ = scm_cons ($1, scm_cons (make_input (@$), scm_reverse_x ($2, SCM_EOL)));
+       MUSIC_FUNCTION music_function_event_arglist {
+               $$ = scm_cons2 ($1, make_input (@$), scm_reverse_x ($2, SCM_EOL));
        }
        ;
 
index f12cfbad95de5324622307e5c0f4cff712076e6f..c6a3176f4711feec3b537607034d73f84ca967b4 100644 (file)
@@ -117,8 +117,8 @@ Part_combine_engraver::acknowledge_note_head (Grob_info i)
       Grob *t = text_;
       Side_position_interface::add_support (t, i.grob ());
       if (Side_position_interface::get_axis (t) == X_AXIS
-         && !t->get_parent (Y_AXIS))
-       t->set_parent (i.grob (), Y_AXIS);
+          && !t->get_parent (Y_AXIS))
+        t->set_parent (i.grob (), Y_AXIS);
     }
 }
 
@@ -140,20 +140,20 @@ Part_combine_engraver::stop_translation_timestep ()
 ADD_ACKNOWLEDGER (Part_combine_engraver, note_head);
 ADD_ACKNOWLEDGER (Part_combine_engraver, stem);
 ADD_TRANSLATOR (Part_combine_engraver,
-               /* doc */
-               "Part combine engraver for orchestral scores: Print markings"
-               " @q{a2}, @q{Solo}, @q{Solo II}, and @q{unisono}.",
-
-               /* create */
-               "CombineTextScript ",
-
-               /* read */
-               "printPartCombineTexts "
-               "partCombineTextsOnNote "
-               "soloText "
-               "soloIIText "
-               "aDueText ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Part combine engraver for orchestral scores: Print markings"
+                " @q{a2}, @q{Solo}, @q{Solo II}, and @q{unisono}.",
+
+                /* create */
+                "CombineTextScript ",
+
+                /* read */
+                "printPartCombineTexts "
+                "partCombineTextsOnNote "
+                "soloText "
+                "soloIIText "
+                "aDueText ",
+
+                /* write */
+                ""
+               );
index adbc2beb32d18f1e01848c3400d79939eaacc9df..5bd85b05b372fb4c8aad6934f0b5f857dfbd7dfa 100644 (file)
 #include "warn.hh"
 
 enum Outlet_type
-  {
-    CONTEXT_ONE, CONTEXT_TWO,
-    CONTEXT_SHARED, CONTEXT_SOLO,
-    CONTEXT_NULL, NUM_OUTLETS
-  };
+{
+  CONTEXT_ONE, CONTEXT_TWO,
+  CONTEXT_SHARED, CONTEXT_SOLO,
+  CONTEXT_NULL, NUM_OUTLETS
+};
 
-static const char *outlet_names_[NUM_OUTLETS] =
-  {"one", "two", "shared", "solo", "null"};
+static const char *outlet_names_[NUM_OUTLETS]
+  {"one", "two", "shared", "solo", "null"};
 
 class Part_combine_iterator : public Music_iterator
 {
@@ -72,14 +72,14 @@ private:
   Stream_event *mmrest_event_;
 
   enum Status
-    {
-      APART,
-      TOGETHER,
-      SOLO1,
-      SOLO2,
-      UNISONO,
-      UNISILENCE,
-    };
+  {
+    APART,
+    TOGETHER,
+    SOLO1,
+    SOLO2,
+    UNISONO,
+    UNISILENCE,
+  };
   Status state_;
   Status playing_state_;
 
@@ -94,7 +94,7 @@ private:
   Context_handle handles_[NUM_OUTLETS];
 
   void substitute_both (Outlet_type to1,
-                       Outlet_type to2);
+                        Outlet_type to2);
 
   /* parameter is really Outlet_type */
   void kill_mmrest (int in);
@@ -118,7 +118,7 @@ Part_combine_iterator::do_quit ()
     {
       Context *c = handles_[i].get_outlet ();
       if (c->is_alias (ly_symbol2scm ("Voice")))
-       c->event_source ()->remove_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event"));
+        c->event_source ()->remove_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event"));
       handles_[i].set_context (0);
     }
 }
@@ -128,7 +128,7 @@ Part_combine_iterator::Part_combine_iterator ()
   mmrest_event_ = 0;
   unisono_event_ = 0;
   solo_two_event_ = 0;
-  solo_one_event_= 0;
+  solo_one_event_ = 0;
 
   first_iter_ = 0;
   second_iter_ = 0;
@@ -148,7 +148,8 @@ Part_combine_iterator::derived_mark () const
   if (second_iter_)
     scm_gc_mark (second_iter_->self_scm ());
 
-  Stream_event *ptrs[] = {
+  Stream_event *ptrs[] =
+  {
     unisono_event_,
     mmrest_event_,
     solo_two_event_,
@@ -162,7 +163,7 @@ Part_combine_iterator::derived_mark () const
 
 void
 Part_combine_iterator::derived_substitute (Context *f,
-                                          Context *t)
+                                           Context *t)
 {
   if (first_iter_)
     first_iter_->substitute_outlet (f, t);
@@ -189,7 +190,7 @@ Part_combine_iterator::ok () const
 
 void
 Part_combine_iterator::substitute_both (Outlet_type to1,
-                                       Outlet_type to2)
+                                        Outlet_type to2)
 {
   Outlet_type tos[] = {to1, to2};
 
@@ -198,14 +199,14 @@ Part_combine_iterator::substitute_both (Outlet_type to1,
   for (int i = 0; i < 2; i++)
     {
       for (int j = 0; j < NUM_OUTLETS; j++)
-       if (j != tos[i])
-         mis[i]->substitute_outlet (handles_[j].get_outlet (), handles_[tos[i]].get_outlet ());
+        if (j != tos[i])
+          mis[i]->substitute_outlet (handles_[j].get_outlet (), handles_[tos[i]].get_outlet ());
     }
 
   for (int j = 0; j < NUM_OUTLETS; j++)
     {
       if (j != to1 && j != to2)
-       kill_mmrest (j);
+        kill_mmrest (j);
     }
 }
 
@@ -233,32 +234,31 @@ Part_combine_iterator::unisono (bool silent)
   else
     {
       /*
-       If we're coming from SOLO2 state, we might have kill mmrests
-       in the 1st voice, so in that case, we use the second voice
-       as a basis for events.
+        If we're coming from SOLO2 state, we might have kill mmrests
+        in the 1st voice, so in that case, we use the second voice
+        as a basis for events.
       */
       Outlet_type c1 = (last_playing_ == SOLO2) ? CONTEXT_NULL : CONTEXT_SHARED;
       Outlet_type c2 = (last_playing_ == SOLO2) ? CONTEXT_SHARED : CONTEXT_NULL;
       substitute_both (c1, c2);
       kill_mmrest ((last_playing_ == SOLO2)
-                  ? CONTEXT_ONE : CONTEXT_TWO);
+                   ? CONTEXT_ONE : CONTEXT_TWO);
       kill_mmrest (CONTEXT_SHARED);
 
       if (playing_state_ != UNISONO
-         && newstate == UNISONO)
-       {
-         if (!unisono_event_)
-           {
-             unisono_event_ = new Stream_event (ly_symbol2scm ("unisono-event"));
-             unisono_event_->unprotect ();
-           }
-
-
-         Context *out = (last_playing_ == SOLO2 ? second_iter_ : first_iter_)
-           ->get_outlet ();
-         out->event_source ()->broadcast (unisono_event_);
-         playing_state_ = UNISONO;
-       }
+          && newstate == UNISONO)
+        {
+          if (!unisono_event_)
+            {
+              unisono_event_ = new Stream_event (ly_symbol2scm ("unisono-event"));
+              unisono_event_->unprotect ();
+            }
+
+          Context *out = (last_playing_ == SOLO2 ? second_iter_ : first_iter_)
+                         ->get_outlet ();
+          out->event_source ()->broadcast (unisono_event_);
+          playing_state_ = UNISONO;
+        }
       state_ = newstate;
     }
 }
@@ -277,15 +277,15 @@ Part_combine_iterator::solo1 ()
       kill_mmrest (CONTEXT_SHARED);
 
       if (playing_state_ != SOLO1)
-       {
-         if (!solo_one_event_)
-           {
-             solo_one_event_ = new Stream_event (ly_symbol2scm ("solo-one-event"));
-             solo_one_event_->unprotect ();
-           }
-
-         first_iter_->get_outlet ()->event_source ()->broadcast (solo_one_event_);
-       }
+        {
+          if (!solo_one_event_)
+            {
+              solo_one_event_ = new Stream_event (ly_symbol2scm ("solo-one-event"));
+              solo_one_event_->unprotect ();
+            }
+
+          first_iter_->get_outlet ()->event_source ()->broadcast (solo_one_event_);
+        }
       playing_state_ = SOLO1;
     }
 }
@@ -302,16 +302,16 @@ Part_combine_iterator::solo2 ()
       substitute_both (CONTEXT_NULL, CONTEXT_SOLO);
 
       if (playing_state_ != SOLO2)
-       {
-         if (!solo_two_event_)
-           {
-             solo_two_event_ = new Stream_event (ly_symbol2scm ("solo-two-event"));
-             solo_two_event_->unprotect ();
-           }
-
-         second_iter_->get_outlet ()->event_source ()->broadcast (solo_two_event_);
-         playing_state_ = SOLO2;
-       }
+        {
+          if (!solo_two_event_)
+            {
+              solo_two_event_ = new Stream_event (ly_symbol2scm ("solo-two-event"));
+              solo_two_event_->unprotect ();
+            }
+
+          second_iter_->get_outlet ()->event_source ()->broadcast (solo_two_event_);
+          playing_state_ = SOLO2;
+        }
     }
 }
 
@@ -359,7 +359,7 @@ Part_combine_iterator::construct_children ()
       c = c->find_create_context (type, outlet_names_[i], SCM_EOL);
       handles_[i].set_context (c);
       if (c->is_alias (ly_symbol2scm ("Voice")))
-       c->event_source ()->add_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event"));
+        c->event_source ()->add_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event"));
     }
 
   SCM lst = get_music ()->get_property ("elements");
@@ -370,12 +370,12 @@ Part_combine_iterator::construct_children ()
   set_context (two);
   second_iter_ = unsmob_iterator (get_iterator (unsmob_music (scm_cadr (lst))));
 
-
   /* Mimic all settings of voiceOne/voiceTwo for the two separate voices...*/
   /* FIXME: Is there any way to use the definition of \voiceOne/\voiceTwo
             directly??? */
   char const *syms[]
-    = {
+  =
+  {
     "Stem",
     "DynamicLineSpanner",
     "Tie",
@@ -391,21 +391,21 @@ Part_combine_iterator::construct_children ()
     {
       SCM sym = ly_symbol2scm (*p);
       execute_pushpop_property (one, sym,
-                               ly_symbol2scm ("direction"), scm_from_int (1));
+                                ly_symbol2scm ("direction"), scm_from_int (1));
 
       execute_pushpop_property (two, sym,
-                               ly_symbol2scm ("direction"), scm_from_int (-1));
+                                ly_symbol2scm ("direction"), scm_from_int (-1));
     }
-   /* Handle horizontal shifts for crossing notes */
+  /* Handle horizontal shifts for crossing notes */
   execute_pushpop_property (one, ly_symbol2scm ("NoteColumn"),
-                                ly_symbol2scm ("horizontal-shift"), scm_from_int (0));
+                            ly_symbol2scm ("horizontal-shift"), scm_from_int (0));
   execute_pushpop_property (two, ly_symbol2scm ("NoteColumn"),
-                                ly_symbol2scm ("horizontal-shift"), scm_from_int (1));
-   /* Also handle MultiMeasureRest positions for voice 1/2 */
+                            ly_symbol2scm ("horizontal-shift"), scm_from_int (1));
+  /* Also handle MultiMeasureRest positions for voice 1/2 */
   execute_pushpop_property (one, ly_symbol2scm ("MultiMeasureRest"),
-                                ly_symbol2scm ("staff-position"), scm_from_int (4));
+                            ly_symbol2scm ("staff-position"), scm_from_int (4));
   execute_pushpop_property (two, ly_symbol2scm ("MultiMeasureRest"),
-                                ly_symbol2scm ("staff-position"), scm_from_int (-4));
+                            ly_symbol2scm ("staff-position"), scm_from_int (-4));
 
 }
 
@@ -453,30 +453,30 @@ Part_combine_iterator::process (Moment m)
     {
       splitm = unsmob_moment (scm_caar (split_list_));
       if (splitm && *splitm + start_moment_ > now)
-       break;
+        break;
 
       SCM tag = scm_cdar (split_list_);
 
       if (tag == ly_symbol2scm ("chords"))
-       chords_together ();
+        chords_together ();
       else if (tag == ly_symbol2scm ("apart")
-              || tag == ly_symbol2scm ("apart-silence")
-              || tag == ly_symbol2scm ("apart-spanner"))
-       apart (tag == ly_symbol2scm ("apart-silence"));
+               || tag == ly_symbol2scm ("apart-silence")
+               || tag == ly_symbol2scm ("apart-spanner"))
+        apart (tag == ly_symbol2scm ("apart-silence"));
       else if (tag == ly_symbol2scm ("unisono"))
-       unisono (false);
+        unisono (false);
       else if (tag == ly_symbol2scm ("unisilence"))
-       unisono (true);
+        unisono (true);
       else if (tag == ly_symbol2scm ("solo1"))
-       solo1 ();
+        solo1 ();
       else if (tag == ly_symbol2scm ("solo2"))
-       solo2 ();
+        solo2 ();
       else if (scm_is_symbol (tag))
-       {
-         string s = "Unknown split directive: "
-           + (scm_is_symbol (tag) ? ly_symbol2string (tag) : string ("not a symbol"));
-         programming_error (s);
-       }
+        {
+          string s = "Unknown split directive: "
+                     + (scm_is_symbol (tag) ? ly_symbol2string (tag) : string ("not a symbol"));
+          programming_error (s);
+        }
     }
 
   if (first_iter_->ok ())
@@ -488,7 +488,7 @@ Part_combine_iterator::process (Moment m)
   if (second_iter_->ok ())
     {
       if (try_process (second_iter_, m))
-       last_playing_ = SOLO2;
+        last_playing_ = SOLO2;
     }
 }
 
index d38a9514659131be55e000a6441e91d564ff1e78..bec4a358c2120a4561fbddcbc4e3fdbbcf28825a 100644 (file)
@@ -28,21 +28,21 @@ class Partial_iterator : public Simple_music_iterator
 {
 public:
   DECLARE_SCHEME_CALLBACK (constructor, ());
- protected:
+protected:
   virtual void process (Moment);
 };
 
 void
 Partial_iterator::process (Moment m)
 {
-  if (Duration *dur
+  if (Duration * dur
       = unsmob_duration (get_music ()->get_property ("partial-duration")))
     {
       Context *ctx = get_outlet ();
       Moment now = ctx->now_mom ();
       if (now.main_part_ > Rational (0))
-       get_music ()->origin ()->
-         warning (_ ("trying to use \\partial after the start of a piece"));
+        get_music ()->origin ()->
+        warning (_ ("trying to use \\partial after the start of a piece"));
       Moment length = Moment (dur->get_length ());
       now = Moment (0, now.grace_part_);
       ctx->set_property ("measurePosition", (now - length).smobbed_copy ());
index e813e08ec327c25713bdccbb85f94778378238d1..ecfe5c4f01d2e973cfedf9648a9274031957ebb9 100644 (file)
@@ -24,17 +24,16 @@ using namespace std;
 #include "warn.hh"
 #include "lily-guile.hh"
 
-
 LY_DEFINE (ly_encode_string_for_pdf, "ly:encode-string-for-pdf",
-          1, 0, 0, (SCM str),
-          "Encode the given string to either Latin1 (which is a subset of"
-          " the PDFDocEncoding) or if that's not possible to full UTF-16BE"
-          " with Byte-Order-Mark (BOM).")
+           1, 0, 0, (SCM str),
+           "Encode the given string to either Latin1 (which is a subset of"
+           " the PDFDocEncoding) or if that's not possible to full UTF-16BE"
+           " with Byte-Order-Mark (BOM).")
 {
   LY_ASSERT_TYPE (scm_is_string, str, 1);
   char *p = ly_scm2str0 (str);
   char *g = NULL;
-  char const *charset="UTF-8"; // Input is ALWAYS UTF-8!
+  char const *charset = "UTF-8"; // Input is ALWAYS UTF-8!
   gsize bytes_written = 0;
 
   /* First, try to convert to ISO-8859-1 (no encodings required). This will
@@ -42,27 +41,27 @@ LY_DEFINE (ly_encode_string_for_pdf, "ly:encode-string-for-pdf",
    * for errors. */
   g = g_convert (p, -1, "ISO-8859-1", charset, 0, &bytes_written, 0);
   /* If that fails, we have to resolve to full UTF-16BE */
-  if (!g) 
+  if (!g)
     {
       GError *e = NULL;
-      char *g_without_BOM = g_convert (p, -1,  "UTF-16BE", charset, 0, &bytes_written, &e);
-      if (e != NULL) 
+      char *g_without_BOM = g_convert (p, -1, "UTF-16BE", charset, 0, &bytes_written, &e);
+      if (e != NULL)
         {
-          warning (_f("Conversion of string `%s' to UTF-16be failed: %s", p, e->message));
+          warning (_f ("Conversion of string `%s' to UTF-16be failed: %s", p, e->message));
           g_error_free (e);
         }
-      /* UTF-16BE allows/recommends a byte-order-mark (BOM) of two bytes 
-       * \xFE\xFF at the begin of the string. The pdfmark specification 
+      /* UTF-16BE allows/recommends a byte-order-mark (BOM) of two bytes
+       * \xFE\xFF at the begin of the string. The pdfmark specification
        * requires it and depends on it to distinguish PdfDocEncoding from
-       * UTF-16BE. As g_convert does not automatically prepend this BOM 
-       * for UTF-16BE (only for UTF-16, which uses lower endian by default, 
+       * UTF-16BE. As g_convert does not automatically prepend this BOM
+       * for UTF-16BE (only for UTF-16, which uses lower endian by default,
        * though), we have to prepend it manually. */
       if (g_without_BOM) // conversion to UTF-16be might have failed (shouldn't!)
-        { 
-          g = new char[bytes_written+3];
+        {
+          g = new char[bytes_written + 3];
           char const *BOM = "\xFE\xFF";
           strcpy (g, BOM);
-          memcpy (&g[2], g_without_BOM, bytes_written+1); // Copy string + \0
+          memcpy (&g[2], g_without_BOM, bytes_written + 1); // Copy string + \0
           free (g_without_BOM);
           bytes_written += 2;
         }
@@ -71,12 +70,12 @@ LY_DEFINE (ly_encode_string_for_pdf, "ly:encode-string-for-pdf",
 
   /* Convert back to SCM object and return it */
   /* FIXME guile-2.0: With guile 2.0 the internal representation of a string
-   *                  has changed (char vector rather than binary bytes in 
+   *                  has changed (char vector rather than binary bytes in
    *                  UTF-8). However, with guile 2.0, ly:encode-string-for-pdf
-   *                  is no longer needed and can be replaced by the new 
+   *                  is no longer needed and can be replaced by the new
    *                  (string->utf16 str 'big)
    */
-  if (g) 
+  if (g)
     return scm_take_str (g, bytes_written); // scm_take_str eventually frees g!
   else
     return str;
index 1b437b28224b302d60ade8126f28b6e395101354..1e69064051b19fb06bd9deadd3f58ed193ca9aa6 100644 (file)
@@ -17,7 +17,6 @@
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include "engraver.hh"
 #include "global-context.hh"
 #include "international.hh"
@@ -35,7 +34,7 @@ class Percent_repeat_engraver : public Engraver
 
 public:
   TRANSLATOR_DECLARATIONS (Percent_repeat_engraver);
-  
+
 protected:
   Stream_event *percent_event_;
 
@@ -74,14 +73,14 @@ Percent_repeat_engraver::start_translation_timestep ()
   if (now_mom ().main_part_ != command_moment_.main_part_)
     {
       first_command_column_
-       = unsmob_grob (get_property ("currentCommandColumn"));
+        = unsmob_grob (get_property ("currentCommandColumn"));
       command_moment_ = now_mom ();
     }
 
   if (stop_mom_.main_part_ == now_mom ().main_part_)
     {
       if (percent_)
-       typeset_perc ();
+        typeset_perc ();
       percent_event_ = 0;
     }
 }
@@ -101,8 +100,8 @@ Percent_repeat_engraver::listen_percent (Stream_event *ev)
   else
     {
       /*
-       print a warning: no assignment happens because
-       percent_event_ != 0
+        print a warning: no assignment happens because
+        percent_event_ != 0
       */
       ASSIGN_EVENT_ONCE (percent_event_, ev);
     }
@@ -115,7 +114,7 @@ Percent_repeat_engraver::process_music ()
       && now_mom ().main_part_ == start_mom_.main_part_)
     {
       if (percent_)
-       typeset_perc ();
+        typeset_perc ();
 
       percent_ = make_spanner ("PercentRepeat", percent_event_->self_scm ());
 
@@ -124,19 +123,19 @@ Percent_repeat_engraver::process_music ()
 
       SCM count = percent_event_->get_property ("repeat-count");
       if (count != SCM_EOL && to_boolean (get_property ("countPercentRepeats"))
-         && check_repeat_count_visibility (context (), count))
-       {
-         percent_counter_ = make_spanner ("PercentRepeatCounter",
-                                          percent_event_->self_scm ());
-
-         SCM text = scm_number_to_string (count, scm_from_int (10));
-         percent_counter_->set_property ("text", text);
-         percent_counter_->set_bound (LEFT, col);
-         Side_position_interface::add_support (percent_counter_, percent_);
-         percent_counter_->set_parent (percent_, Y_AXIS);
-       }
+          && check_repeat_count_visibility (context (), count))
+        {
+          percent_counter_ = make_spanner ("PercentRepeatCounter",
+                                           percent_event_->self_scm ());
+
+          SCM text = scm_number_to_string (count, scm_from_int (10));
+          percent_counter_->set_property ("text", text);
+          percent_counter_->set_bound (LEFT, col);
+          Side_position_interface::add_support (percent_counter_, percent_);
+          percent_counter_->set_parent (percent_, Y_AXIS);
+        }
       else
-       percent_counter_ = 0;
+        percent_counter_ = 0;
     }
 }
 
@@ -170,18 +169,18 @@ Percent_repeat_engraver::stop_translation_timestep ()
 }
 
 ADD_TRANSLATOR (Percent_repeat_engraver,
-               /* doc */
-               "Make whole measure repeats.",
-               
-               /* create */
-               "PercentRepeat "
-               "PercentRepeatCounter ",
-
-               /* read */
-               "countPercentRepeats "
-               "currentCommandColumn "
-               "repeatCountVisibility ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Make whole measure repeats.",
+
+                /* create */
+                "PercentRepeat "
+                "PercentRepeatCounter ",
+
+                /* read */
+                "countPercentRepeats "
+                "currentCommandColumn "
+                "repeatCountVisibility ",
+
+                /* write */
+                ""
+               );
index 1e97753feecd95414538f4847f9613aac0d41b92..09c06fe7e98d61c9bb392b2d9f57857f0a5f56c6 100644 (file)
@@ -37,8 +37,8 @@ Percent_repeat_item_interface::brew_slash (Grob *me, int count)
   Stencil slash = Lookup::repeat_slash (wid, slope, thick);
   Stencil m = slash;
 
-  Real slash_neg_kern =
-    robust_scm2double (me->get_property ("slash-negative-kern"), 1.6);
+  Real slash_neg_kern
+    robust_scm2double (me->get_property ("slash-negative-kern"), 1.6);
   for (int i = count - 1; i--;)
     m.add_at_edge (X_AXIS, RIGHT, slash, -slash_neg_kern);
 
@@ -51,8 +51,8 @@ Percent_repeat_item_interface::x_percent (Grob *me, int count)
 {
   Stencil m = brew_slash (me, count);
 
-  Real dot_neg_kern =
-    robust_scm2double (me->get_property ("dot-negative-kern"), 0.75);
+  Real dot_neg_kern
+    robust_scm2double (me->get_property ("dot-negative-kern"), 0.75);
 
   Stencil d1 = Font_interface::get_default_font (me)->find_by_name ("dots.dot");
   Stencil d2 = d1;
@@ -93,11 +93,11 @@ Percent_repeat_item_interface::beat_slash (SCM grob)
 }
 
 ADD_INTERFACE (Percent_repeat_item_interface,
-              "Repeats that look like percent signs.",
-
-              /* properties */
-              "dot-negative-kern "
-              "slash-negative-kern "
-              "slope "
-              "thickness "
-              );
+               "Repeats that look like percent signs.",
+
+               /* properties */
+               "dot-negative-kern "
+               "slash-negative-kern "
+               "slope "
+               "thickness "
+              );
index d8295535575535d0e05cd9b4ff47cc39f45d2e4e..5bf7bf2197bdcbac039073c732dec6df6e72b0bf 100644 (file)
@@ -59,26 +59,26 @@ Percent_repeat_iterator::get_music_list () const
   else
     {
       slash_count
-       = scm_call_1 (ly_lily_module_constant ("calc-repeat-slash-count"),
-                     child->self_scm ());
+        = scm_call_1 (ly_lily_module_constant ("calc-repeat-slash-count"),
+                      child->self_scm ());
       event_type = "RepeatSlashEvent";
     }
 
   int repeats = scm_to_int (mus->get_property ("repeat-count"));
   for (int i = repeats; i > 1; i--)
-  {
-    Music *percent = make_music_by_name (ly_symbol2scm (event_type.c_str ()));
-    percent->set_spot (*mus->origin ());
-    percent->set_property ("length", length);
-    if (repeats > 1)
-      {
-       percent->set_property ("repeat-count", scm_from_int (i));
-       if (event_type == "RepeatSlashEvent")
-         percent->set_property ("slash-count", slash_count);
-      }
+    {
+      Music *percent = make_music_by_name (ly_symbol2scm (event_type.c_str ()));
+      percent->set_spot (*mus->origin ());
+      percent->set_property ("length", length);
+      if (repeats > 1)
+        {
+          percent->set_property ("repeat-count", scm_from_int (i));
+          if (event_type == "RepeatSlashEvent")
+            percent->set_property ("slash-count", slash_count);
+        }
 
-    child_list = scm_cons (percent->unprotect (), child_list);
-  }
+      child_list = scm_cons (percent->unprotect (), child_list);
+    }
 
   child_list = scm_cons (child->self_scm (), child_list);
 
index 10a1de6659a9aad31a7c1f929f37817582a60196..be1dc156478fd3b2d2cead6411af68b0a6f278c8 100644 (file)
@@ -20,8 +20,8 @@
 #include "performance.hh"
 
 LY_DEFINE (ly_performance_write, "ly:performance-write",
-          2, 0, 0, (SCM performance, SCM filename),
-          "Write @var{performance} to @var{filename}.")
+           2, 0, 0, (SCM performance, SCM filename),
+           "Write @var{performance} to @var{filename}.")
 {
   LY_ASSERT_TYPE (unsmob_performance, performance, 1);
   LY_ASSERT_TYPE (scm_is_string, filename, 2);
index bcd8b42c50f12eb54574fa5443829f9a33b98e6f..1bc547a5a8b9e987464fa6c5a70b7b76051f2d15 100644 (file)
@@ -35,8 +35,8 @@ using namespace std;
 #include "warn.hh"
 
 Performance::Performance (bool ports)
-  : midi_ (0)
-  , ports_ (ports)
+  : midi_ (0),
+    ports_ (ports)
 {
 }
 
@@ -53,15 +53,15 @@ Performance::output (Midi_stream &midi_stream) const
   midi_stream.write (Midi_header (1, tracks_, 384));
   if (be_verbose_global)
     progress_indication (_ ("Track...") + " ");
-  
+
   for (vsize i = 0; i < audio_staffs_.size (); i++)
     {
       Audio_staff *s = audio_staffs_[i];
       if (be_verbose_global)
-       progress_indication ("[" + to_string (i));
+        progress_indication ("[" + to_string (i));
       s->output (midi_stream, i, ports_);
       if (be_verbose_global)
-       progress_indication ("]");
+        progress_indication ("]");
     }
 }
 
@@ -88,7 +88,6 @@ Performance::write_output (string out) const
   progress_indication ("\n");
 }
 
-
 void
 Performance::process ()
 {
@@ -97,5 +96,5 @@ Performance::process ()
 Performance *
 unsmob_performance (SCM x)
 {
-  return dynamic_cast<Performance*> (unsmob_music_output (x));
+  return dynamic_cast<Performance *> (unsmob_music_output (x));
 }
index 70a3f844843271de1ce73d519aee34f04c9d1739..1fe99758b55eb8bd4f6610c72f103030f41217ac 100644 (file)
 #include "warn.hh"
 
 ADD_TRANSLATOR_GROUP (Performer_group,
-                     /* doc */
-                     "",
+                      /* doc */
+                      "",
 
-                     /* create */
-                     "",
+                      /* create */
+                      "",
 
-                     /* read */
-                     "",
+                      /* read */
+                      "",
 
-                     /* write */
-                     ""
-                     );
+                      /* write */
+                      ""
+                     );
 
 void
 Performer_group::announce_element (Audio_element_info info)
@@ -57,12 +57,12 @@ Performer_group::acknowledge_audio_elements ()
       Audio_element_info info = announce_infos_[j];
 
       for (SCM p = get_simple_trans_list (); scm_is_pair (p); p = scm_cdr (p))
-       {
-         Translator *t = unsmob_translator (scm_car (p));
-         Performer *eng = dynamic_cast<Performer *> (t);
-         if (eng && eng != info.origin_trans_)
-           eng->acknowledge_audio_element (info);
-       }
+        {
+          Translator *t = unsmob_translator (scm_car (p));
+          Performer *eng = dynamic_cast<Performer *> (t);
+          if (eng && eng != info.origin_trans_)
+            eng->acknowledge_audio_element (info);
+        }
     }
 }
 
@@ -73,7 +73,7 @@ performer_each (SCM list, Performer_method method)
     {
       Performer *e = dynamic_cast<Performer *> (unsmob_translator (scm_car (p)));
       if (e)
-       (e->*method) ();
+        (e->*method) ();
     }
 }
 
@@ -85,18 +85,18 @@ Performer_group::do_announces ()
     {
       Context *c = unsmob_context (scm_car (s));
       Performer_group *group
-       = dynamic_cast<Performer_group *> (c->implementation ());
+        = dynamic_cast<Performer_group *> (c->implementation ());
       if (group)
-       group->do_announces ();
+        group->do_announces ();
     }
 
   while (1)
     {
       performer_each (get_simple_trans_list (),
-                     &Performer::create_audio_elements);
+                      &Performer::create_audio_elements);
 
       if (!announce_infos_.size ())
-       break;
+        break;
 
       acknowledge_audio_elements ();
       announce_infos_.clear ();
index 871367af158673b72d5ad22f0ab99c77128ee8e2..58a88cd29759762f49f7c04350cd22e863a30f53 100644 (file)
@@ -23,7 +23,6 @@
 #include "performer-group.hh"
 #include "warn.hh"
 
-
 Performer_group *
 Performer::get_daddy_performer () const
 {
index 89666192a30d4a4bdcd75aa1aa990a82a31ef4c1..34d159cf044cc55dab725c2cc9418827822c0205 100644 (file)
@@ -7,9 +7,9 @@
 #include "warn.hh"
 
 LY_DEFINE (ly_pfb_2_pfa, "ly:pfb->pfa",
-          1, 0, 0, (SCM pfb_file_name),
-          "Convert the contents of a Type@tie{}1 font in PFB format"
-          " to PFA format.")
+           1, 0, 0, (SCM pfb_file_name),
+           "Convert the contents of a Type@tie{}1 font in PFB format"
+           " to PFA format.")
 {
   LY_ASSERT_TYPE (scm_is_string, pfb_file_name, 1);
 
@@ -17,10 +17,10 @@ LY_DEFINE (ly_pfb_2_pfa, "ly:pfb->pfa",
 
   if (be_verbose_global)
     progress_indication ("\n[" + file_name);
-  
+
   vector<char> pfb_string = gulp_file (file_name, 0);
   char *pfa = pfb2pfa ((Byte *) &pfb_string[0], pfb_string.size ());
-  
+
   SCM pfa_scm = scm_from_locale_string (pfa);
   free (pfa);
 
@@ -31,9 +31,9 @@ LY_DEFINE (ly_pfb_2_pfa, "ly:pfb->pfa",
 }
 
 LY_DEFINE (ly_otf_2_cff, "ly:otf->cff",
-          1, 0, 0, (SCM otf_file_name),
-          "Convert the contents of an OTF file to a CFF file,"
-          " returning it as a string.")
+           1, 0, 0, (SCM otf_file_name),
+           "Convert the contents of an OTF file to a CFF file,"
+           " returning it as a string.")
 {
   LY_ASSERT_TYPE (scm_is_string, otf_file_name, 1);
 
@@ -45,7 +45,7 @@ LY_DEFINE (ly_otf_2_cff, "ly:otf->cff",
   string table = get_otf_table (face, "CFF ");
 
   SCM asscm = scm_from_locale_stringn ((char *) table.data (),
-                                      table.length ());
+                                       table.length ());
 
   if (be_verbose_global)
     progress_indication ("]");
index ba31e175138abc8b5051d7d339fc4e5f7c229b2f..54e72b1ab35df5c27c6eee14888599f7c0f7bf8a 100644 (file)
@@ -32,49 +32,49 @@ using namespace std;
 char *
 pfb2pfa (Byte const *pfb, int length)
 {
-  char *out = (char*) malloc(sizeof(char));
+  char *out = (char *) malloc (sizeof (char));
   int olen = 0;
 
   Byte const *p = pfb;
   while (p < pfb + length)
     {
       if (*p++ != 128)
-       break;
+        break;
 
       Byte type = *p++;
       if (type == 3)
-       break;
+        break;
 
       unsigned seglen
-       = p[0] | (p[1] << 8)
-       | (p[2] << 16) | (p[3] << 24);
+        = p[0] | (p[1] << 8)
+          | (p[2] << 16) | (p[3] << 24);
 
       p += 4;
       if (type == 1)
-       {
-         out = (char *)realloc (out, olen + seglen + 1);
-         char *outp = out + olen;
-         memcpy (outp, p, seglen);
-         olen += seglen;
-         p += seglen;
-       }
+        {
+          out = (char *)realloc (out, olen + seglen + 1);
+          char *outp = out + olen;
+          memcpy (outp, p, seglen);
+          olen += seglen;
+          p += seglen;
+        }
       else if (type == 2)
-       {
-         unsigned outlength = (seglen * 2) + (seglen / 32) + 2;
-
-         out = (char *)realloc (out, olen + outlength + 1);
-
-         char *outp = out + olen;
-         for (int i = seglen; i--;)
-           {
-             sprintf (outp, "%02x", *p++);
-             outp += 2;
-             if (! (i % 32))
-               *outp++ = '\n';
-           }
-
-         olen = outp - out;
-       }
+        {
+          unsigned outlength = (seglen * 2) + (seglen / 32) + 2;
+
+          out = (char *)realloc (out, olen + outlength + 1);
+
+          char *outp = out + olen;
+          for (int i = seglen; i--;)
+            {
+              sprintf (outp, "%02x", *p++);
+              outp += 2;
+              if (! (i % 32))
+                *outp++ = '\n';
+            }
+
+          olen = outp - out;
+        }
     }
   out[olen] = 0;
 
index 839554f7e9af9a1d7f3c174503e4bad58e34a73c..4805960042b8317e1f45ba9ed86ab8598a5cba3b 100644 (file)
 
 #include "translator.icc"
 
-
 /*
   NOTE NOTE NOTE
 
   This is largely similar to Slur_engraver. Check if fixes
-  apply there too.  
+  apply there too.
 
   (on principle, engravers don't use inheritance for code sharing)
-  
+
  */
 
 /*
   It is possible that a slur starts and ends on the same note.  At
   least, it is for phrasing slurs: a note can be both beginning and
   ending of a phrase.
-
 */
 class Phrasing_slur_engraver : public Engraver
 {
   vector<Stream_event *> start_events_;
   vector<Stream_event *> stop_events_;
-  vector<Grob*> slurs_;
-  vector<Grob*> end_slurs_;
+  vector<Grob *> slurs_;
+  vector<Grob *> end_slurs_;
 
 protected:
   DECLARE_TRANSLATOR_LISTENER (phrasing_slur);
@@ -71,7 +69,6 @@ protected:
 
   virtual void finalize ();
 
-
 public:
   TRANSLATOR_DECLARATIONS (Phrasing_slur_engraver);
 };
@@ -86,11 +83,11 @@ Phrasing_slur_engraver::listen_phrasing_slur (Stream_event *ev)
 {
   Direction d = to_dir (ev->get_property ("span-direction"));
   if (d == START)
-    start_events_.push_back(ev);
+    start_events_.push_back (ev);
   else if (d == STOP)
-    stop_events_.push_back(ev);
+    stop_events_.push_back (ev);
   else ev->origin ()->warning (_f ("direction of %s invalid: %d",
-                                  "phrasing-slur-event", int (d)));
+                                     "phrasing-slur-event", int (d)));
 }
 
 void
@@ -193,11 +190,11 @@ Phrasing_slur_engraver::process_music ()
       // Check if we already have a slur with the same spanner-id.
       // In that case, don't create a new slur, but print a warning
       for (vsize i = 0; i < slurs_.size (); i++)
-          have_slur = have_slur || (id == robust_scm2string (slurs_[i]->get_property ("spanner-id"), ""));
-      
+        have_slur = have_slur || (id == robust_scm2string (slurs_[i]->get_property ("spanner-id"), ""));
+
       if (have_slur)
-          ev->origin ()->warning(_ ("already have phrasing slur"));
-      else 
+        ev->origin ()->warning (_ ("already have phrasing slur"));
+      else
         {
           Grob *slur = make_spanner ("PhrasingSlur", ev->self_scm ());
           Direction updown = to_dir (ev->get_property ("direction"));
@@ -227,15 +224,15 @@ ADD_ACKNOWLEDGER (Phrasing_slur_engraver, tie);
 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, tuplet_number);
 
 ADD_TRANSLATOR (Phrasing_slur_engraver,
-               /* doc */
-               "Print phrasing slurs.  Similar to @ref{Slur_engraver}.",
+                /* doc */
+                "Print phrasing slurs.  Similar to @ref{Slur_engraver}.",
 
-               /* create */
-               "PhrasingSlur ",
+                /* create */
+                "PhrasingSlur ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index f5aa652a4a7ac5d174bd5a9b267c4cecd78e4f10..3080393e4866676dedf4867454f9800bdfaa3d53 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2006--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
-  
+
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -18,7 +18,6 @@
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include "engraver.hh"
 
 #include "spanner.hh"
 #include "warn.hh"
 #include "axis-group-interface.hh"
 
-
 /*
   TODO:
 
 
   * Detach from pedal specifics,
-  
+
   * Also use this engraver for dynamics.
-  
 */
 
-
 struct Pedal_align_info
 {
   Spanner *line_spanner_;
@@ -77,7 +73,7 @@ public:
 
 protected:
   virtual void finalize ();
-  
+
   DECLARE_ACKNOWLEDGER (piano_pedal_script);
   DECLARE_ACKNOWLEDGER (piano_pedal_bracket);
   DECLARE_ACKNOWLEDGER (note_column);
@@ -86,9 +82,10 @@ protected:
 
   void stop_translation_timestep ();
   void start_translation_timestep ();
-  
+
 private:
-  enum Pedal_type {
+  enum Pedal_type
+  {
     SOSTENUTO,
     SUSTAIN,
     UNA_CORDA,
@@ -114,46 +111,45 @@ Piano_pedal_align_engraver::start_translation_timestep ()
 void
 Piano_pedal_align_engraver::stop_translation_timestep ()
 {
-  for (int i = 0; i < NUM_PEDAL_TYPES; i ++)
+  for (int i = 0; i < NUM_PEDAL_TYPES; i++)
     {
       if (pedal_info_[i].line_spanner_)
-       {
-         
-         if (pedal_info_[i].carrying_item_)
-           {
-             if (!pedal_info_[i].line_spanner_->get_bound (LEFT))
-               pedal_info_[i].line_spanner_->set_bound (LEFT,
-                                                        pedal_info_[i].carrying_item_);
-
-             pedal_info_[i].line_spanner_->set_bound (RIGHT,
-                                                      pedal_info_[i].carrying_item_);
-           }
-         else if (pedal_info_[i].carrying_spanner_
-                  || pedal_info_[i].finished_carrying_spanner_
-                  )
-           {
-             if (!pedal_info_[i].line_spanner_->get_bound (LEFT)
-                 && pedal_info_[i].carrying_spanner_->get_bound (LEFT))
-               pedal_info_[i].line_spanner_->set_bound (LEFT,
-                                                        pedal_info_[i].carrying_spanner_->get_bound (LEFT));
-             
-
-             if (pedal_info_[i].finished_carrying_spanner_)
-               pedal_info_[i].line_spanner_->set_bound (RIGHT,
-                                                        pedal_info_[i].finished_carrying_spanner_->get_bound (RIGHT));
-           }
-         
-         for (vsize j = 0; j < supports_.size (); j++)
-           {
-             Side_position_interface::add_support (pedal_info_[i].line_spanner_, supports_[j]);
-           }
-
-         if (pedal_info_[i].is_finished ())
-           {
-             announce_end_grob (pedal_info_[i].line_spanner_, SCM_EOL);
-             pedal_info_[i].clear ();
-           }
-       }
+        {
+
+          if (pedal_info_[i].carrying_item_)
+            {
+              if (!pedal_info_[i].line_spanner_->get_bound (LEFT))
+                pedal_info_[i].line_spanner_->set_bound (LEFT,
+                                                         pedal_info_[i].carrying_item_);
+
+              pedal_info_[i].line_spanner_->set_bound (RIGHT,
+                                                       pedal_info_[i].carrying_item_);
+            }
+          else if (pedal_info_[i].carrying_spanner_
+                   || pedal_info_[i].finished_carrying_spanner_
+                  )
+            {
+              if (!pedal_info_[i].line_spanner_->get_bound (LEFT)
+                  && pedal_info_[i].carrying_spanner_->get_bound (LEFT))
+                pedal_info_[i].line_spanner_->set_bound (LEFT,
+                                                         pedal_info_[i].carrying_spanner_->get_bound (LEFT));
+
+              if (pedal_info_[i].finished_carrying_spanner_)
+                pedal_info_[i].line_spanner_->set_bound (RIGHT,
+                                                         pedal_info_[i].finished_carrying_spanner_->get_bound (RIGHT));
+            }
+
+          for (vsize j = 0; j < supports_.size (); j++)
+            {
+              Side_position_interface::add_support (pedal_info_[i].line_spanner_, supports_[j]);
+            }
+
+          if (pedal_info_[i].is_finished ())
+            {
+              announce_end_grob (pedal_info_[i].line_spanner_, SCM_EOL);
+              pedal_info_[i].clear ();
+            }
+        }
 
       pedal_info_[i].carrying_item_ = 0;
     }
@@ -173,7 +169,6 @@ Piano_pedal_align_engraver::get_grob_pedal_type (Grob_info g)
   return SUSTAIN;
 }
 
-
 Spanner *
 Piano_pedal_align_engraver::make_line_spanner (Pedal_type t, SCM cause)
 {
@@ -181,24 +176,24 @@ Piano_pedal_align_engraver::make_line_spanner (Pedal_type t, SCM cause)
   if (!sp)
     {
       switch (t)
-       {
-       case (SOSTENUTO):
-         sp = make_spanner ("SostenutoPedalLineSpanner", cause);
-         break;
-       case (SUSTAIN):
-         sp = make_spanner ("SustainPedalLineSpanner", cause);
-         break;
-       case (UNA_CORDA):
-         sp = make_spanner ("UnaCordaPedalLineSpanner", cause);
-         break;
-       default:
-         programming_error ("No pedal type fonud!") ;
-         return sp;
-       }
-  
+        {
+        case (SOSTENUTO):
+          sp = make_spanner ("SostenutoPedalLineSpanner", cause);
+          break;
+        case (SUSTAIN):
+          sp = make_spanner ("SustainPedalLineSpanner", cause);
+          break;
+        case (UNA_CORDA):
+          sp = make_spanner ("UnaCordaPedalLineSpanner", cause);
+          break;
+        default:
+          programming_error ("No pedal type fonud!");
+          return sp;
+        }
+
       pedal_info_[t].line_spanner_ = sp;
     }
-  
+
   return sp;
 }
 
@@ -229,26 +224,25 @@ void
 Piano_pedal_align_engraver::acknowledge_piano_pedal_script (Grob_info gi)
 {
   Pedal_type type = get_grob_pedal_type (gi);
-  
+
   Grob *sp = make_line_spanner (type, gi.grob ()->self_scm ());
   Axis_group_interface::add_element (sp, gi.grob ());
   pedal_info_[type].carrying_item_ = gi.grob ();
 }
 
-
 void
 Piano_pedal_align_engraver::finalize ()
 {
for (int i = 0; i < NUM_PEDAL_TYPES; i ++)
 for (int i = 0; i < NUM_PEDAL_TYPES; i++)
     {
       if (pedal_info_[i].line_spanner_)
-       {
-         SCM cc = get_property ("currentCommandColumn");
-         Item *c = unsmob_item (cc);
-         pedal_info_[i].line_spanner_->set_bound (RIGHT, c);
+        {
+          SCM cc = get_property ("currentCommandColumn");
+          Item *c = unsmob_item (cc);
+          pedal_info_[i].line_spanner_->set_bound (RIGHT, c);
 
-         pedal_info_[i].clear ();
-       }
+          pedal_info_[i].clear ();
+        }
     }
 }
 
@@ -260,19 +254,18 @@ ADD_ACKNOWLEDGER (Piano_pedal_align_engraver, piano_pedal_script);
 
 ADD_END_ACKNOWLEDGER (Piano_pedal_align_engraver, piano_pedal_bracket);
 
-
 ADD_TRANSLATOR (Piano_pedal_align_engraver,
-               /* doc */
-               "Align piano pedal symbols and brackets.",
+                /* doc */
+                "Align piano pedal symbols and brackets.",
 
-               /* create */
-               "SostenutoPedalLineSpanner "
-               "SustainPedalLineSpanner "
-               "UnaCordaPedalLineSpanner ",
+                /* create */
+                "SostenutoPedalLineSpanner "
+                "SustainPedalLineSpanner "
+                "UnaCordaPedalLineSpanner ",
 
-               /* read */
-               "currentCommandColumn ",
+                /* read */
+                "currentCommandColumn ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 40ebbaef7df5a7b638286cff96f2b10a8c654086..fee4c4b762637bf0b417de7880df1be1e96485f8 100644 (file)
@@ -37,14 +37,14 @@ Piano_pedal_bracket::print (SCM smob)
 
   Drul_array<bool> broken (false, false);
   Drul_array<Real> height = robust_scm2drul
-    (me->get_property ("edge-height"), Interval (0, 0));
+                            (me->get_property ("edge-height"), Interval (0, 0));
   Drul_array<Real> shorten = robust_scm2drul
-    (me->get_property ("shorten-pair"), Interval (0, 0));
+                             (me->get_property ("shorten-pair"), Interval (0, 0));
   Drul_array<Real> flare = robust_scm2drul
-    (me->get_property ("bracket-flare"), Interval (0, 0));
+                           (me->get_property ("bracket-flare"), Interval (0, 0));
 
   Grob *common = me->get_bound (LEFT)
-    ->common_refpoint (me->get_bound (RIGHT), X_AXIS);
+                 ->common_refpoint (me->get_bound (RIGHT), X_AXIS);
   Grob *textbit = unsmob_grob (me->get_object ("pedal-text"));
 
   if (textbit)
@@ -57,15 +57,15 @@ Piano_pedal_bracket::print (SCM smob)
       Item *b = me->get_bound (d);
       broken[d] = b->break_status_dir () != CENTER;
       if (broken[d])
-       {
-         if (orig
-             && ((d == RIGHT
-                  && me->get_break_index () != orig->broken_intos_.size () - 1)
-                 || (d == LEFT && me->get_break_index ())))
-           height[d] = 0.0;
-         else
-           flare[d] = 0.0;
-       }
+        {
+          if (orig
+              && ((d == RIGHT
+                   && me->get_break_index () != orig->broken_intos_.size () - 1)
+                  || (d == LEFT && me->get_break_index ())))
+            height[d] = 0.0;
+          else
+            flare[d] = 0.0;
+        }
 
       Interval ext = robust_relative_extent (b, common, X_AXIS);
       span_points[d] = ext [broken[d] ? RIGHT : LEFT];
@@ -82,7 +82,7 @@ Piano_pedal_bracket::print (SCM smob)
       Real padding = robust_scm2double (me->get_property ("bound-padding"), 0);
 
       span_points[LEFT] = padding
-       + robust_relative_extent (textbit, common, X_AXIS)[RIGHT];
+                          + robust_relative_extent (textbit, common, X_AXIS)[RIGHT];
     }
 
   Stencil m;
@@ -90,24 +90,24 @@ Piano_pedal_bracket::print (SCM smob)
       && span_points.length () > 0.001)
     {
       m = Tuplet_bracket::make_bracket (me, Y_AXIS,
-                                       Offset (span_points.length (), 0),
-                                       height,
-                                       Interval (),
-                                       flare, shorten);
+                                        Offset (span_points.length (), 0),
+                                        height,
+                                        Interval (),
+                                        flare, shorten);
     }
   m.translate_axis (span_points[LEFT]
-                   - me->relative_coordinate (common, X_AXIS), X_AXIS);
+                    - me->relative_coordinate (common, X_AXIS), X_AXIS);
   return m.smobbed_copy ();
 }
 
 ADD_INTERFACE (Piano_pedal_bracket,
-              "The bracket of the piano pedal.  It can be tuned through"
-              " the regular bracket properties.",
-
-              /* properties */
-              "bound-padding "
-              "edge-height "
-              "shorten-pair "
-              "bracket-flare "
-              "pedal-text "
-              );
+               "The bracket of the piano pedal.  It can be tuned through"
+               " the regular bracket properties.",
+
+               /* properties */
+               "bound-padding "
+               "edge-height "
+               "shorten-pair "
+               "bracket-flare "
+               "pedal-text "
+              );
index 43666efbdd9346b0f18e3eabed675bbe68867227..4cbc7adbd320abd22cd789ac0b584bfa8b30b9bf 100644 (file)
     Softcode using (list (sustain-event SustainPedal PianoPedalBracket) ... )
 
   * Try to use same engraver for dynamics.
-  
 */
 
 /* Ugh: This declaration is duplicated in piano-pedal-performer */
-enum Pedal_type {
+enum Pedal_type
+{
   SOSTENUTO,
   SUSTAIN,
   UNA_CORDA,
@@ -69,7 +69,7 @@ struct Pedal_type_info
   SCM event_class_sym_;
   SCM style_sym_;
   SCM strings_sym_;
-  
+
   const char *pedal_c_str_;
 
   Pedal_type_info ()
@@ -138,7 +138,6 @@ private:
   void typeset_all (Pedal_info *p);
 };
 
-
 static void
 init_pedal_types ()
 {
@@ -154,29 +153,29 @@ init_pedal_types ()
       string base_name = name;
       /* foo-bar */
       string base_ident = "";
-      int prev_pos=0;
+      int prev_pos = 0;
       int cur_pos;
       for (cur_pos = 1; name[cur_pos]; cur_pos++)
-       if (isupper (name[cur_pos]))
-         {
-           base_ident = base_ident + String_convert::to_lower (string (name, prev_pos, cur_pos - prev_pos)) + "-";
-           prev_pos = cur_pos;
-         }
+        if (isupper (name[cur_pos]))
+          {
+            base_ident = base_ident + String_convert::to_lower (string (name, prev_pos, cur_pos - prev_pos)) + "-";
+            prev_pos = cur_pos;
+          }
       base_ident += String_convert::to_lower (string (name, prev_pos, cur_pos - prev_pos));
 
       /*
-       be careful, as we don't want to loose references to the _sym_ members.
+        be careful, as we don't want to loose references to the _sym_ members.
        */
       Pedal_type_info info;
       info.event_class_sym_ = scm_from_locale_symbol ((base_ident + "-event").c_str ());
       info.style_sym_ = scm_from_locale_symbol (("pedal" + base_name + "Style").c_str ());
       info.strings_sym_ = scm_from_locale_symbol (("pedal" + base_name + "Strings").c_str ());
-      
+
       info.base_name_ = name;
       info.pedal_c_str_ = strdup ((base_name + "Pedal").c_str ());
 
       info.protect ();
-      
+
       pedal_types_[i] = info;
     }
 }
@@ -207,7 +206,6 @@ Piano_pedal_engraver::initialize ()
   info_list_[NUM_PEDAL_TYPES].type_ = 0;
 }
 
-
 /*
   Urg: Code dup
   I'm a script
@@ -218,9 +216,9 @@ Piano_pedal_engraver::acknowledge_note_column (Grob_info info)
   for (Pedal_info *p = info_list_; p->type_; p++)
     {
       if (p->bracket_)
-       add_bound_item (p->bracket_, info.grob ());
+        add_bound_item (p->bracket_, info.grob ());
       if (p->finished_bracket_)
-       add_bound_item (p->finished_bracket_, info.grob ());
+        add_bound_item (p->finished_bracket_, info.grob ());
     }
 }
 
@@ -254,33 +252,33 @@ Piano_pedal_engraver::process_music ()
   for (Pedal_info *p = info_list_; p->type_; p++)
     {
       if (p->event_drul_[STOP] || p->event_drul_[START])
-       {
-         /* Choose the appropriate grobs to add to the line spanner
-            These can be text items or text-spanners
-         */
-
-         /*
-           ugh, code dup, should read grob to create from other
-           property.
-
-           bracket: |_________/\____|
-           text:    Ped.     *Ped.  *
-           mixed:   Ped. _____/\____|
-         */
-
-         SCM style = internal_get_property (p->type_->style_sym_);
-
-         bool mixed = style == ly_symbol2scm ("mixed");
-         bool bracket = (mixed
-                         || style == ly_symbol2scm ("bracket"));
-         bool text = (style == ly_symbol2scm ("text")
-                      || mixed);
-
-         if (text && !p->item_)
-           create_text_grobs (p, mixed);
-         if (bracket)
-           create_bracket_grobs (p, mixed);
-       }
+        {
+          /* Choose the appropriate grobs to add to the line spanner
+             These can be text items or text-spanners
+          */
+
+          /*
+            ugh, code dup, should read grob to create from other
+            property.
+
+            bracket: |_________/\____|
+            text:    Ped.     *Ped.  *
+            mixed:   Ped. _____/\____|
+          */
+
+          SCM style = internal_get_property (p->type_->style_sym_);
+
+          bool mixed = style == ly_symbol2scm ("mixed");
+          bool bracket = (mixed
+                          || style == ly_symbol2scm ("bracket"));
+          bool text = (style == ly_symbol2scm ("text")
+                       || mixed);
+
+          if (text && !p->item_)
+            create_text_grobs (p, mixed);
+          if (bracket)
+            create_bracket_grobs (p, mixed);
+        }
     }
 }
 
@@ -296,11 +294,11 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
       if (!m) m = p->event_drul_ [STOP];
 
       string msg = _f ("expect 3 strings for piano pedals, found: %ld",
-                      scm_ilength (strings));
+                       scm_ilength (strings));
       if (m)
-       m->origin ()->warning (msg);
+        m->origin ()->warning (msg);
       else
-       warning (msg);
+        warning (msg);
 
       return;
     }
@@ -308,38 +306,38 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
   if (p->event_drul_[STOP] && p->event_drul_[START])
     {
       if (!mixed)
-       {
-         if (!p->start_ev_)
-           p->event_drul_[STOP]->origin ()->warning (_f ("cannot find start of piano pedal: `%s'", p->type_->base_name_.c_str ()));
-         else
-           s = scm_cadr (strings);
-         p->start_ev_ = p->event_drul_[START];
-       }
+        {
+          if (!p->start_ev_)
+            p->event_drul_[STOP]->origin ()->warning (_f ("cannot find start of piano pedal: `%s'", p->type_->base_name_.c_str ()));
+          else
+            s = scm_cadr (strings);
+          p->start_ev_ = p->event_drul_[START];
+        }
     }
   else if (p->event_drul_[STOP])
     {
       if (!mixed)
-       {
-         if (!p->start_ev_)
-           p->event_drul_[STOP]->origin ()->warning (_f ("cannot find start of piano pedal: `%s'", p->type_->base_name_.c_str ()));
-         else
-           s = scm_caddr (strings);
-         p->start_ev_ = 0;
-       }
+        {
+          if (!p->start_ev_)
+            p->event_drul_[STOP]->origin ()->warning (_f ("cannot find start of piano pedal: `%s'", p->type_->base_name_.c_str ()));
+          else
+            s = scm_caddr (strings);
+          p->start_ev_ = 0;
+        }
     }
   else if (p->event_drul_[START])
     {
       p->start_ev_ = p->event_drul_[START];
       s = scm_car (strings);
-      }
+    }
 
   if (scm_is_string (s))
     {
       const char *propname = p->type_->pedal_c_str_;
 
       p->item_ = make_item (propname, (p->event_drul_[START]
-                                      ? p->event_drul_[START]
-                                      : p->event_drul_[STOP])->self_scm ());
+                                       ? p->event_drul_[START]
+                                       : p->event_drul_[STOP])->self_scm ());
 
       p->item_->set_property ("text", s);
     }
@@ -368,26 +366,26 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
       Grob *cmc = unsmob_grob (get_property ("currentMusicalColumn"));
 
       if (!p->bracket_->get_bound (RIGHT))
-       p->bracket_->set_bound (RIGHT, cmc);
+        p->bracket_->set_bound (RIGHT, cmc);
 
       /*
-       Set properties so that the stencil-creating function will
-       know whether the right edge should be flared ___/
+        Set properties so that the stencil-creating function will
+        know whether the right edge should be flared ___/
       */
 
       if (!p->event_drul_[START])
-       {
-         SCM flare = p->bracket_->get_property ("bracket-flare");
-         if (scm_is_pair (flare))
-           p->bracket_->set_property ("bracket-flare", scm_cons (scm_car (flare),
-                                                                 scm_from_double (0)));
-       }
+        {
+          SCM flare = p->bracket_->get_property ("bracket-flare");
+          if (scm_is_pair (flare))
+            p->bracket_->set_property ("bracket-flare", scm_cons (scm_car (flare),
+                                                                  scm_from_double (0)));
+        }
 
       p->finished_bracket_ = p->bracket_;
       p->bracket_ = 0;
 
       announce_end_grob (p->finished_bracket_, p->event_drul_[STOP]->self_scm ());
-      
+
       p->current_bracket_ev_ = 0;
     }
 
@@ -399,34 +397,34 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
       p->bracket_ = make_spanner ("PianoPedalBracket", p->event_drul_[START]->self_scm ());
 
       /*
-       Set properties so that the stencil-creating function will
-       know whether the left edge should be flared \___
+        Set properties so that the stencil-creating function will
+        know whether the left edge should be flared \___
       */
 
       if (!p->finished_bracket_)
-       {
-         SCM flare = p->bracket_->get_property ("bracket-flare");
-         p->bracket_->set_property ("bracket-flare", scm_cons (scm_from_double (0), scm_cdr (flare)));
-       }
+        {
+          SCM flare = p->bracket_->get_property ("bracket-flare");
+          p->bracket_->set_property ("bracket-flare", scm_cons (scm_from_double (0), scm_cdr (flare)));
+        }
 
       /* Set this property for 'mixed style' pedals,    Ped._______/\ ,
-        so the stencil function will shorten the ____ line by the length of the Ped. text.
+         so the stencil function will shorten the ____ line by the length of the Ped. text.
       */
 
       if (mixed)
-       {
-         /*
-           Mixed style: Store a pointer to the preceding text for use in
-           calculating the length of the line
+        {
+          /*
+            Mixed style: Store a pointer to the preceding text for use in
+            calculating the length of the line
 
 
-           TODO:
+            TODO:
 
-           WTF is pedal-text not the bound of the object? --hwn
-         */
-         if (p->item_)
-           p->bracket_->set_object ("pedal-text", p->item_->self_scm ());
-       }
+            WTF is pedal-text not the bound of the object? --hwn
+          */
+          if (p->item_)
+            p->bracket_->set_object ("pedal-text", p->item_->self_scm ());
+        }
     }
 
   p->event_drul_[START] = 0;
@@ -439,19 +437,19 @@ Piano_pedal_engraver::finalize ()
   for (Pedal_info *p = info_list_; p->type_; p++)
     {
       if (p->bracket_
-         && !p->bracket_->is_live ())
-       p->bracket_ = 0;
+          && !p->bracket_->is_live ())
+        p->bracket_ = 0;
 
       if (p->bracket_)
-       {
-         SCM cc = get_property ("currentCommandColumn");
-         Item *c = unsmob_item (cc);
-         p->bracket_->set_bound (RIGHT, c);
+        {
+          SCM cc = get_property ("currentCommandColumn");
+          Item *c = unsmob_item (cc);
+          p->bracket_->set_bound (RIGHT, c);
 
-         p->finished_bracket_ = p->bracket_;
-         p->bracket_ = 0;
-         typeset_all (p);
-       }
+          p->finished_bracket_ = p->bracket_;
+          p->bracket_ = 0;
+          typeset_all (p);
+        }
 
     }
 }
@@ -461,15 +459,15 @@ Piano_pedal_engraver::stop_translation_timestep ()
 {
   for (Pedal_info *p = info_list_; p->type_; p++)
     {
-      
+
       typeset_all (p);
       if (p->bracket_ && !p->bracket_->get_bound (LEFT))
-       {
-         Grob *cmc = unsmob_grob (get_property ("currentMusicalColumn"));
+        {
+          Grob *cmc = unsmob_grob (get_property ("currentMusicalColumn"));
 
-         if (!p->bracket_->get_bound (LEFT))
-           p->bracket_->set_bound (LEFT, cmc);
-       }
+          if (!p->bracket_->get_bound (LEFT))
+            p->bracket_->set_bound (LEFT, cmc);
+        }
     }
 
   for (Pedal_info *p = info_list_; p->type_; p++)
@@ -496,7 +494,7 @@ Piano_pedal_engraver::typeset_all (Pedal_info *p)
     {
       Grob *r = p->finished_bracket_->get_bound (RIGHT);
       if (!r)
-       p->finished_bracket_->set_bound (RIGHT, unsmob_grob (get_property ("currentMusicalColumn")));
+        p->finished_bracket_->set_bound (RIGHT, unsmob_grob (get_property ("currentMusicalColumn")));
 
       p->finished_bracket_ = 0;
     }
@@ -505,24 +503,24 @@ Piano_pedal_engraver::typeset_all (Pedal_info *p)
 ADD_ACKNOWLEDGER (Piano_pedal_engraver, note_column);
 
 ADD_TRANSLATOR (Piano_pedal_engraver,
-               /* doc */
-               "Engrave piano pedal symbols and brackets.",
-
-               /* create */
-               "PianoPedalBracket "
-               "SostenutoPedal "
-               "SustainPedal "
-               "UnaCordaPedal ",
-
-               /* read */
-               "currentCommandColumn "
-               "pedalSostenutoStrings "
-               "pedalSostenutoStyle "
-               "pedalSustainStrings "
-               "pedalSustainStyle "
-               "pedalUnaCordaStrings "
-               "pedalUnaCordaStyle ",
-               
-               /* write */
-               ""
-               );
+                /* doc */
+                "Engrave piano pedal symbols and brackets.",
+
+                /* create */
+                "PianoPedalBracket "
+                "SostenutoPedal "
+                "SustainPedal "
+                "UnaCordaPedal ",
+
+                /* read */
+                "currentCommandColumn "
+                "pedalSostenutoStrings "
+                "pedalSostenutoStyle "
+                "pedalSustainStrings "
+                "pedalSustainStyle "
+                "pedalUnaCordaStrings "
+                "pedalUnaCordaStyle ",
+
+                /* write */
+                ""
+               );
index cd191d3ea03c2129207d771f380d9eb58b4385ee..e31787272471d02934c44190b7a5c9b60d222977 100644 (file)
@@ -52,7 +52,7 @@ protected:
   DECLARE_TRANSLATOR_LISTENER (una_corda);
   DECLARE_TRANSLATOR_LISTENER (sostenuto);
 private:
-  vector<Audio_piano_pedal*> audios_;
+  vector<Audio_piano_pedal *> audios_;
   Pedal_info info_alist_[NUM_PEDAL_TYPES];
 };
 
@@ -65,11 +65,11 @@ Piano_pedal_performer::pedal_type_str (int t)
 {
   switch (t)
     {
-    case SOSTENUTO: 
+    case SOSTENUTO:
       return "Sostenuto";
     case SUSTAIN:
       return "Sustain";
-    case UNA_CORDA: 
+    case UNA_CORDA:
       return "UnaCorda";
     default:
       programming_error ("Unknown pedal type");
@@ -99,31 +99,31 @@ Piano_pedal_performer::process_music ()
     {
       string pedal_type = pedal_type_str (i);
       if (p->event_drul_[STOP])
-       {
-         if (!p->start_event_)
-           p->event_drul_[STOP]->origin ()->warning (_f ("cannot find start of piano pedal: `%s'", pedal_type));
-         else
-           {
-             Audio_piano_pedal *a = new Audio_piano_pedal;
-             a->type_string_ = pedal_type;
-             a->dir_ = STOP;
-             audios_.push_back (a);
+        {
+          if (!p->start_event_)
+            p->event_drul_[STOP]->origin ()->warning (_f ("cannot find start of piano pedal: `%s'", pedal_type));
+          else
+            {
+              Audio_piano_pedal *a = new Audio_piano_pedal;
+              a->type_string_ = pedal_type;
+              a->dir_ = STOP;
+              audios_.push_back (a);
               Audio_element_info info (a, p->event_drul_[STOP]);
               announce_element (info);
-           }
-         p->start_event_ = 0;
-       }
+            }
+          p->start_event_ = 0;
+        }
 
       if (p->event_drul_[START])
-       {
-         p->start_event_ = p->event_drul_[START];
-         Audio_piano_pedal *a = new Audio_piano_pedal;
-         a->type_string_ = pedal_type;
-         a->dir_ = START;
-         audios_.push_back (a);
+        {
+          p->start_event_ = p->event_drul_[START];
+          Audio_piano_pedal *a = new Audio_piano_pedal;
+          a->type_string_ = pedal_type;
+          a->dir_ = START;
+          audios_.push_back (a);
           Audio_element_info info (a, p->event_drul_[START]);
           announce_element (info);
-       }
+        }
       p->event_drul_[START] = 0;
       p->event_drul_[STOP] = 0;
     }
@@ -171,15 +171,15 @@ Piano_pedal_performer::listen_una_corda (Stream_event *r)
 }
 
 ADD_TRANSLATOR (Piano_pedal_performer,
-               /* doc */
-               "",
+                /* doc */
+                "",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index e92a721ae004ab214a656e4da78ea1adaca5e451..a6be0faeb680e8e1e1d0a2b4c3818a1af93cfda7 100644 (file)
@@ -42,7 +42,7 @@ Pitch_interval::is_empty () const
 Drul_array<bool>
 Pitch_interval::add_point (Pitch p)
 {
-  Drul_array<bool> expansions(false,false);
+  Drul_array<bool> expansions (false, false);
   if (at (LEFT).tone_pitch () > p.tone_pitch ())
     {
       at (LEFT) = p;
@@ -56,7 +56,6 @@ Pitch_interval::add_point (Pitch p)
   return expansions;
 }
 
-
 Pitch_lexicographic_interval::Pitch_lexicographic_interval (Pitch p1, Pitch p2)
 {
   at (LEFT) = p1;
@@ -78,7 +77,7 @@ Pitch_lexicographic_interval::is_empty () const
 Drul_array<bool>
 Pitch_lexicographic_interval::add_point (Pitch p)
 {
-  Drul_array<bool> expansions(false,false);
+  Drul_array<bool> expansions (false, false);
   if (at (LEFT) > p)
     {
       at (LEFT) = p;
index bc69b633a780dd3cb995e26ff40a91affd88719f..4461ce4a32d9920ecbb88885846f553f8dafb9d4 100644 (file)
@@ -20,9 +20,9 @@
 #include "pitch.hh"
 
 LY_DEFINE (ly_pitch_transpose, "ly:pitch-transpose",
-          2, 0, 0, (SCM p, SCM delta),
-          "Transpose @var{p} by the amount @var{delta},"
-          " where @var{delta} is relative to middle@tie{}C.")
+           2, 0, 0, (SCM p, SCM delta),
+           "Transpose @var{p} by the amount @var{delta},"
+           " where @var{delta} is relative to middle@tie{}C.")
 {
   LY_ASSERT_SMOB (Pitch, p, 1);
   LY_ASSERT_SMOB (Pitch, delta, 2);
@@ -34,27 +34,27 @@ LY_DEFINE (ly_pitch_transpose, "ly:pitch-transpose",
 
 /* Should add optional args.  */
 LY_DEFINE (ly_make_pitch, "ly:make-pitch",
-          2, 1, 0, (SCM octave, SCM note, SCM alter),
-          "@var{octave} is specified by an integer, zero for the octave"
-          " containing middle@tie{}C. @var{note} is a number indexing the"
-          " global default scale, with 0 corresponding to pitch@tie{}C"
-          " and 6 usually corresponding to pitch@tie{}B. @var{alter} is" 
-          " a rational number of 200-cent whole tones for alteration.")
+           2, 1, 0, (SCM octave, SCM note, SCM alter),
+           "@var{octave} is specified by an integer, zero for the octave"
+           " containing middle@tie{}C. @var{note} is a number indexing the"
+           " global default scale, with 0 corresponding to pitch@tie{}C"
+           " and 6 usually corresponding to pitch@tie{}B. @var{alter} is"
+           " a rational number of 200-cent whole tones for alteration.")
 
 {
   LY_ASSERT_TYPE (scm_is_integer, octave, 1);
   LY_ASSERT_TYPE (scm_is_integer, note, 2);
   LY_ASSERT_TYPE (scm_is_rational, alter, 3);
-  
+
   Pitch p (scm_to_int (octave), scm_to_int (note),
-          ly_scm2rational (alter));
-  
+           ly_scm2rational (alter));
+
   return p.smobbed_copy ();
 }
 
 LY_DEFINE (ly_pitch_negate, "ly:pitch-negate", 1, 0, 0,
-          (SCM p),
-          "Negate @var{p}.")
+           (SCM p),
+           "Negate @var{p}.")
 {
   LY_ASSERT_SMOB (Pitch, p, 1);
   Pitch *pp = unsmob_pitch (p);
@@ -62,9 +62,9 @@ LY_DEFINE (ly_pitch_negate, "ly:pitch-negate", 1, 0, 0,
 }
 
 LY_DEFINE (ly_pitch_steps, "ly:pitch-steps", 1, 0, 0,
-          (SCM p),
-          "Number of steps counted from middle@tie{}C of the"
-          " pitch@tie{}@var{p}.")
+           (SCM p),
+           "Number of steps counted from middle@tie{}C of the"
+           " pitch@tie{}@var{p}.")
 {
   LY_ASSERT_SMOB (Pitch, p, 1);
   Pitch *pp = unsmob_pitch (p);
@@ -72,8 +72,8 @@ LY_DEFINE (ly_pitch_steps, "ly:pitch-steps", 1, 0, 0,
 }
 
 LY_DEFINE (ly_pitch_octave, "ly:pitch-octave",
-          1, 0, 0, (SCM pp),
-          "Extract the octave from pitch@tie{}@var{pp}.")
+           1, 0, 0, (SCM pp),
+           "Extract the octave from pitch@tie{}@var{pp}.")
 {
   LY_ASSERT_SMOB (Pitch, pp, 1);
   Pitch *p = unsmob_pitch (pp);
@@ -82,8 +82,8 @@ LY_DEFINE (ly_pitch_octave, "ly:pitch-octave",
 }
 
 LY_DEFINE (ly_pitch_alteration, "ly:pitch-alteration",
-          1, 0, 0, (SCM pp),
-          "Extract the alteration from pitch@tie{}@var{pp}.")
+           1, 0, 0, (SCM pp),
+           "Extract the alteration from pitch@tie{}@var{pp}.")
 {
   LY_ASSERT_SMOB (Pitch, pp, 1);
   Pitch *p = unsmob_pitch (pp);
@@ -93,8 +93,8 @@ LY_DEFINE (ly_pitch_alteration, "ly:pitch-alteration",
 }
 
 LY_DEFINE (pitch_notename, "ly:pitch-notename",
-          1, 0, 0, (SCM pp),
-          "Extract the note name from pitch @var{pp}.")
+           1, 0, 0, (SCM pp),
+           "Extract the note name from pitch @var{pp}.")
 {
   LY_ASSERT_SMOB (Pitch, pp, 1);
   Pitch *p = unsmob_pitch (pp);
@@ -103,9 +103,9 @@ LY_DEFINE (pitch_notename, "ly:pitch-notename",
 }
 
 LY_DEFINE (ly_pitch_quartertones, "ly:pitch-quartertones",
-          1, 0, 0, (SCM pp),
-          "Calculate the number of quarter tones of@tie{}@var{pp} from"
-          " middle@tie{}C.")
+           1, 0, 0, (SCM pp),
+           "Calculate the number of quarter tones of@tie{}@var{pp} from"
+           " middle@tie{}C.")
 {
   LY_ASSERT_SMOB (Pitch, pp, 1);
   Pitch *p = unsmob_pitch (pp);
@@ -114,9 +114,9 @@ LY_DEFINE (ly_pitch_quartertones, "ly:pitch-quartertones",
 }
 
 LY_DEFINE (ly_pitch_semitones, "ly:pitch-semitones",
-          1, 0, 0, (SCM pp),
-          "Calculate the number of semitones of@tie{}@var{pp} from"
-          " middle@tie{}C.")
+           1, 0, 0, (SCM pp),
+           "Calculate the number of semitones of@tie{}@var{pp} from"
+           " middle@tie{}C.")
 {
   LY_ASSERT_SMOB (Pitch, pp, 1);
   Pitch *p = unsmob_pitch (pp);
@@ -125,8 +125,8 @@ LY_DEFINE (ly_pitch_semitones, "ly:pitch-semitones",
 }
 
 LY_DEFINE (ly_pitch_less_p, "ly:pitch<?",
-          2, 0, 0, (SCM p1, SCM p2),
-          "Is @var{p1} lexicographically smaller than @var{p2}?")
+           2, 0, 0, (SCM p1, SCM p2),
+           "Is @var{p1} lexicographically smaller than @var{p2}?")
 {
   LY_ASSERT_SMOB (Pitch, p1, 1);
   LY_ASSERT_SMOB (Pitch, p2, 2);
@@ -141,11 +141,11 @@ LY_DEFINE (ly_pitch_less_p, "ly:pitch<?",
 }
 
 LY_DEFINE (ly_pitch_diff, "ly:pitch-diff",
-          2, 0, 0, (SCM pitch, SCM root),
-          "Return pitch @var{delta} such that @var{pitch} transposed by"
-          " @var{delta} equals @var{root}.")
+           2, 0, 0, (SCM pitch, SCM root),
+           "Return pitch @var{delta} such that @var{pitch} transposed by"
+           " @var{delta} equals @var{root}.")
 {
+
   LY_ASSERT_SMOB (Pitch, pitch, 1);
   LY_ASSERT_SMOB (Pitch, root, 2);
 
@@ -158,10 +158,10 @@ LY_DEFINE (ly_pitch_diff, "ly:pitch-diff",
 /* FIXME: probably isn't the right place for this function */
 #include "context.hh"
 LY_DEFINE (ly_set_middle_C_x, "ly:set-middle-C!",
-          1, 0, 0, (SCM context),
-          "Set the @code{middleCPosition} variable in @var{context}"
-          " based on the variables @code{middleCClefPosition} and"
-          " middleCOffset.")
+           1, 0, 0, (SCM context),
+           "Set the @code{middleCPosition} variable in @var{context}"
+           " based on the variables @code{middleCClefPosition} and"
+           " middleCOffset.")
 {
   LY_ASSERT_SMOB (Context, context, 1);
 
index 1ad824ee079d24f5e17d1b9f4cb53699f758d426..60f213338c67f61ab6fe89e179b966904cdcf177 100644 (file)
@@ -46,18 +46,18 @@ Pitch_squash_engraver::Pitch_squash_engraver ()
 #include "translator.icc"
 ADD_ACKNOWLEDGER (Pitch_squash_engraver, note_head);
 ADD_TRANSLATOR (Pitch_squash_engraver,
-               /* doc */
-               "Set the vertical position of note heads to"
-               " @code{squashedPosition}, if that property is set.  This can"
-               " be used to make a single-line staff demonstrating the"
-               " rhythm of a melody.",
+                /* doc */
+                "Set the vertical position of note heads to"
+                " @code{squashedPosition}, if that property is set.  This can"
+                " be used to make a single-line staff demonstrating the"
+                " rhythm of a melody.",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "squashedPosition ",
+                /* read */
+                "squashedPosition ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index fbd785f9cd05c31119755cf3d91eea29f35b904c..97664e6530e103e7672c91cc494f56d8be5cf859 100644 (file)
@@ -26,7 +26,6 @@
 
 #include "ly-smobs.icc"
 
-
 Pitch::Pitch (int o, int n, Rational a)
 {
   notename_ = n;
@@ -138,9 +137,9 @@ pitch_interval (Pitch const &from, Pitch const &to)
 {
   Rational sound = to.tone_pitch () - from.tone_pitch ();
   Pitch pt (to.get_octave () - from.get_octave (),
-           to.get_notename () - from.get_notename (),
+            to.get_notename () - from.get_notename (),
 
-           to.get_alteration () - from.get_alteration ());
+            to.get_alteration () - from.get_alteration ());
 
   return pt.transposed (Pitch (0, 0, sound - pt.tone_pitch ()));
 }
@@ -148,14 +147,15 @@ pitch_interval (Pitch const &from, Pitch const &to)
 /* FIXME
    Merge with *pitch->text* funcs in chord-name.scm  */
 char const *accname[] = {"eses", "eseh", "es", "eh", "",
-                        "ih", "is", "isih", "isis"};
+                         "ih", "is", "isih", "isis"
+                        };
 
 string
 Pitch::to_string () const
 {
   int n = (notename_ + 2) % scale_->step_count ();
   string s = ::to_string (char (n + 'a'));
-  Rational qtones = alteration_ * Rational (4,1);
+  Rational qtones = alteration_ * Rational (4, 1);
   int qt = int (rint (Real (qtones)));
 
   s += string (accname[qt + 4]);
@@ -163,13 +163,13 @@ Pitch::to_string () const
     {
       int o = octave_ + 1;
       while (o--)
-       s += "'";
+        s += "'";
     }
   else if (octave_ < 0)
     {
       int o = (-octave_) - 1;
       while (o--)
-       s += ::to_string (',');
+        s += ::to_string (',');
     }
 
   return s;
@@ -222,7 +222,7 @@ IMPLEMENT_TYPE_P (Pitch, "ly:pitch?");
 SCM
 Pitch::mark_smob (SCM x)
 {
-  Pitch *p = (Pitch*) SCM_CELL_WORD_1 (x);
+  Pitch *p = (Pitch *) SCM_CELL_WORD_1 (x);
   return p->scale_->self_scm ();
 }
 
@@ -244,8 +244,8 @@ Pitch::equal_p (SCM a, SCM b)
   Pitch *q = (Pitch *) SCM_CELL_WORD_1 (b);
 
   bool eq = p->notename_ == q->notename_
-    && p->octave_ == q->octave_
-    && p->alteration_ == q->alteration_;
+            && p->octave_ == q->octave_
+            && p->alteration_ == q->alteration_;
 
   return eq ? SCM_BOOL_T : SCM_BOOL_F;
 }
index 6960d3e2dd1883d390daff87f982aefa7483da2f..658354ff6e738f67e52d7fc482b07dad799b771c 100644 (file)
@@ -46,7 +46,7 @@ private:
   Item *trill_group_;
   Item *trill_accidental_;
 
-  vector<Grob*> heads_;
+  vector<Grob *> heads_;
 
   void make_trill (Stream_event *);
 };
@@ -89,24 +89,24 @@ Pitched_trill_engraver::make_trill (Stream_event *ev)
   SCM keysig = get_property ("localKeySignature");
 
   SCM key = scm_cons (scm_from_int (p->get_octave ()),
-                     scm_from_int (p->get_notename ()));
+                      scm_from_int (p->get_notename ()));
 
-  int bn = measure_number (context());
+  int bn = measure_number (context ());
 
   SCM handle = scm_assoc (key, keysig);
   if (handle != SCM_BOOL_F)
     {
       bool same_bar = (bn == robust_scm2int (scm_caddr (handle), 0));
       bool same_alt
-       = (p->get_alteration () == robust_scm2rational (scm_cadr (handle), 0));
+        = (p->get_alteration () == robust_scm2rational (scm_cadr (handle), 0));
 
       if (!same_bar || (same_bar && !same_alt))
-       handle = SCM_BOOL_F;
+        handle = SCM_BOOL_F;
     }
 
   bool print_acc
     = (handle == SCM_BOOL_F) || p->get_alteration () == Rational (0)
-    || (ev->get_property ("force-accidental") == SCM_BOOL_T);
+      || (ev->get_property ("force-accidental") == SCM_BOOL_T);
 
   if (trill_head_)
     {
@@ -120,8 +120,8 @@ Pitched_trill_engraver::make_trill (Stream_event *ev)
   int c0 = scm_is_number (c0scm) ? scm_to_int (c0scm) : 0;
 
   trill_head_->set_property ("staff-position",
-                            scm_from_int (unsmob_pitch (scm_pitch)->steps ()
-                                          + c0));
+                             scm_from_int (unsmob_pitch (scm_pitch)->steps ()
+                                           + c0));
 
   trill_group_ = make_item ("TrillPitchGroup", ev->self_scm ());
   trill_group_->set_parent (trill_head_, Y_AXIS);
@@ -135,7 +135,7 @@ Pitched_trill_engraver::make_trill (Stream_event *ev)
       // fixme: naming -> alterations
       trill_accidental_->set_property ("alteration", ly_rational2scm (p->get_alteration ()));
       Side_position_interface::add_support (trill_accidental_, trill_head_);
-      
+
       trill_head_->set_object ("accidental-grob", trill_accidental_->self_scm ());
       trill_accidental_->set_parent (trill_head_, Y_AXIS);
       Axis_group_interface::add_element (trill_group_, trill_accidental_);
@@ -155,7 +155,6 @@ Pitched_trill_engraver::stop_translation_timestep ()
   trill_accidental_ = 0;
 }
 
-
 #include "translator.icc"
 
 ADD_ACKNOWLEDGER (Pitched_trill_engraver, note_head);
@@ -163,17 +162,17 @@ ADD_ACKNOWLEDGER (Pitched_trill_engraver, dots);
 ADD_ACKNOWLEDGER (Pitched_trill_engraver, trill_spanner);
 
 ADD_TRANSLATOR (Pitched_trill_engraver,
-               /* doc */
-               "Print the bracketed note head after a note head with trill.",
+                /* doc */
+                "Print the bracketed note head after a note head with trill.",
 
-               /* create */
-               "TrillPitchHead "
-               "TrillPitchAccidental "
-               "TrillPitchGroup ",
+                /* create */
+                "TrillPitchHead "
+                "TrillPitchAccidental "
+                "TrillPitchGroup ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 53fe7b20971f2cea645f33f0e99ac962a94db99d..d9fe6ebe7c3bd1e11e59ccce0f8bfd307205a1f6 100644 (file)
 #include "grob.hh"
 
 LY_DEFINE (ly_pointer_group_interface__add_grob, "ly:pointer-group-interface::add-grob",
-          3, 0, 0, (SCM grob, SCM sym, SCM grob_element),
-          "Add @var{grob-element} to @var{grob}'s @var{sym} grob array.")
+           3, 0, 0, (SCM grob, SCM sym, SCM grob_element),
+           "Add @var{grob-element} to @var{grob}'s @var{sym} grob array.")
 {
   LY_ASSERT_TYPE (unsmob_grob, grob, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
   LY_ASSERT_TYPE (unsmob_grob, grob_element, 3);
 
   Pointer_group_interface::add_grob (unsmob_grob (grob),
-                                    sym,
-                                    unsmob_grob (grob_element));
+                                     sym,
+                                     unsmob_grob (grob_element));
   return SCM_UNSPECIFIED;
 }
 
index 78c4166d73042557a3c0992bdbdc8312e0e1cca3..ff7bce3014fc0d146a7687493c401de454189248 100644 (file)
@@ -57,7 +57,7 @@ Pointer_group_interface::get_grob_array (Grob *me, SCM sym)
 }
 
 Grob *
-Pointer_group_interface::find_grob (Grob *me, SCM sym, bool (*pred) (Grob*))
+Pointer_group_interface::find_grob (Grob *me, SCM sym, bool (*pred) (Grob *))
 {
   Grob_array *arr = get_grob_array (me, sym);
 
@@ -83,28 +83,28 @@ Pointer_group_interface::add_unordered_grob (Grob *me, SCM sym, Grob *p)
   arr->set_ordered (false);
 }
 
-static vector<Grob*> empty_array;
+static vector<Grob *> empty_array;
 
-vector<Grob*> const &
+vector<Grob *> const &
 ly_scm2link_array (SCM x)
 {
   Grob_array *arr = unsmob_grob_array (x);
   return arr ? arr->array () : empty_array;
 }
 
-vector<Grob*> const &
+vector<Grob *> const &
 internal_extract_grob_array (Grob const *elt, SCM symbol)
 {
   return elt
-    ? ly_scm2link_array (elt->internal_get_object (symbol))
-    : empty_array;
+         ? ly_scm2link_array (elt->internal_get_object (symbol))
+         : empty_array;
 }
 
-vector<Item*>
+vector<Item *>
 internal_extract_item_array (Grob const *elt, SCM symbol)
 {
   Grob_array *arr = unsmob_grob_array (elt->internal_get_object (symbol));
-  vector<Item*> items;
+  vector<Item *> items;
   for (vsize i = 0; arr && i < arr->size (); i++)
     items.push_back (arr->item (i));
 
index 57881112d4b657aba078b80bc6bfe4da4a4990b5..4fafc71fcfe7567ae9cfb90c9c1bcbcaf557569d 100644 (file)
@@ -20,8 +20,8 @@
 #include "prob.hh"
 
 LY_DEFINE (ly_prob_set_property_x, "ly:prob-set-property!",
-          2, 1, 0, (SCM obj, SCM sym, SCM value),
-          "Set property @var{sym} of @var{obj} to @var{value}.")
+           2, 1, 0, (SCM obj, SCM sym, SCM value),
+           "Set property @var{sym} of @var{obj} to @var{value}.")
 {
   LY_ASSERT_SMOB (Prob, obj, 1);
   Prob *ps = unsmob_prob (obj);
@@ -35,17 +35,17 @@ LY_DEFINE (ly_prob_set_property_x, "ly:prob-set-property!",
   Hmm, this is not orthogonal.
 */
 LY_DEFINE (ly_prob_property_p, "ly:prob-property?",
-          2, 1, 0, (SCM obj, SCM sym),
-          "Is boolean prop @var{sym} of @var{sym} set?")
+           2, 1, 0, (SCM obj, SCM sym),
+           "Is boolean prop @var{sym} of @var{sym} set?")
 {
   return scm_equal_p (SCM_BOOL_T, ly_prob_property (obj, sym, SCM_BOOL_F));
 }
 
 LY_DEFINE (ly_prob_property, "ly:prob-property",
-          2, 1, 0, (SCM prob, SCM sym, SCM val),
-          "Return the value for property @var{sym} of Prob object"
-          " @var{prob}.  If no value is found, return @var{val} or"
-          " @code{'()} if @var{val} is not specified.")
+           2, 1, 0, (SCM prob, SCM sym, SCM val),
+           "Return the value for property @var{sym} of Prob object"
+           " @var{prob}.  If no value is found, return @var{val} or"
+           " @code{'()} if @var{val} is not specified.")
 {
   LY_ASSERT_SMOB (Prob, prob, 1);
   Prob *ps = unsmob_prob (prob);
@@ -62,18 +62,18 @@ LY_DEFINE (ly_prob_property, "ly:prob-property",
 }
 
 LY_DEFINE (ly_prob_type_p, "ly:prob-type?",
-          2, 0, 0,
-          (SCM obj, SCM type),
-          "Is @var{obj} the specified prob-type?")
+           2, 0, 0,
+           (SCM obj, SCM type),
+           "Is @var{obj} the specified prob-type?")
 {
-  Prob*prob = unsmob_prob (obj);
+  Prob *prob = unsmob_prob (obj);
   return scm_from_bool (prob && prob->type () == type);
 }
 
 LY_DEFINE (ly_make_prob, "ly:make-prob",
-          2, 0, 1,
-          (SCM type, SCM init, SCM rest),
-          "Create a @code{Prob} object.")
+           2, 0, 1,
+           (SCM type, SCM init, SCM rest),
+           "Create a @code{Prob} object.")
 {
   Prob *pr = new Prob (type, init);
 
@@ -85,15 +85,14 @@ LY_DEFINE (ly_make_prob, "ly:make-prob",
 
       pr->set_property (sym, val);
     }
-  
+
   return pr->unprotect ();
 }
 
-
 LY_DEFINE (ly_prob_mutable_properties, "ly:prob-mutable-properties",
-          1, 0, 0,
-          (SCM prob),
-          "Retrieve an alist of mutable properties.")
+           1, 0, 0,
+           (SCM prob),
+           "Retrieve an alist of mutable properties.")
 {
   LY_ASSERT_SMOB (Prob, prob, 1);
   Prob *ps = unsmob_prob (prob);
@@ -101,9 +100,9 @@ LY_DEFINE (ly_prob_mutable_properties, "ly:prob-mutable-properties",
 }
 
 LY_DEFINE (ly_prob_immutable_properties, "ly:prob-immutable-properties",
-          1, 0, 0,
-          (SCM prob),
-          "Retrieve an alist of immutable properties.")
+           1, 0, 0,
+           (SCM prob),
+           "Retrieve an alist of immutable properties.")
 {
   LY_ASSERT_SMOB (Prob, prob, 1);
   Prob *ps = unsmob_prob (prob);
index 233c5b6d5f0a604e5ff19d1805328114a4ee28f4..7050c1294991145f447b1c022e0c18c953695631 100644 (file)
@@ -58,22 +58,21 @@ Prob::equal_p (SCM sa, SCM sb)
       SCM bprop = props[1][i];
 
       for (;
-          scm_is_pair (aprop) && scm_is_pair (bprop);
-          aprop = scm_cdr (aprop), bprop = scm_cdr (bprop))
-       {
-         SCM aval = scm_cdar (aprop);
-         SCM bval = scm_cdar (bprop);
-         if (scm_caar (aprop) != scm_caar (bprop) ||
-             (
-              !(unsmob_input (aval) && unsmob_input (bval))
-              &&
-              !to_boolean (scm_equal_p (aval, bval))))
-           return SCM_BOOL_F;
-       }
+           scm_is_pair (aprop) && scm_is_pair (bprop);
+           aprop = scm_cdr (aprop), bprop = scm_cdr (bprop))
+        {
+          SCM aval = scm_cdar (aprop);
+          SCM bval = scm_cdar (bprop);
+          if (scm_caar (aprop) != scm_caar (bprop)
+              || (!(unsmob_input (aval) && unsmob_input (bval))
+                  &&
+                  !to_boolean (scm_equal_p (aval, bval))))
+            return SCM_BOOL_F;
+        }
 
       /* is one list shorter? */
       if (aprop != SCM_EOL || bprop != SCM_EOL)
-       return SCM_BOOL_F;
+        return SCM_BOOL_F;
     }
 
   return SCM_BOOL_T;
@@ -88,7 +87,6 @@ Prob::Prob (SCM type, SCM immutable_init)
   smobify_self ();
 }
 
-
 Prob::~Prob ()
 {
 }
@@ -107,7 +105,6 @@ Prob::Prob (Prob const &src)
   mutable_property_alist_ = src.copy_mutable_properties ();
 }
 
-
 SCM
 Prob::copy_mutable_properties () const
 {
@@ -132,7 +129,7 @@ Prob::mark_smob (SCM smob)
 }
 
 int
-Prob::print_smob (SCM smob, SCM port, scm_print_state*)
+Prob::print_smob (SCM smob, SCM port, scm_print_state *)
 {
   Prob *p = (Prob *) SCM_CELL_WORD_1 (smob);
   scm_puts ("#<", port);
@@ -147,8 +144,6 @@ Prob::print_smob (SCM smob, SCM port, scm_print_state*)
   return 1;
 }
 
-
-
 SCM
 Prob::internal_get_property (SCM sym) const
 {
@@ -170,7 +165,7 @@ Prob::internal_get_property (SCM sym) const
 
 /* We don't (yet) instrument probs */
 void
-Prob::instrumented_set_property (SCM sym, SCM val, const char*, int, const char*)
+Prob::instrumented_set_property (SCM sym, SCM val, const char *, int, const char *)
 {
   internal_set_property (sym, val);
 }
index 4a1c0b08f9b834a2bde0a24be9f6fc5e07957c6d..73dead73916afbcd048187803dad36c59c327f1f 100644 (file)
@@ -26,24 +26,23 @@ SCM grob_property_lookup_table;
 SCM prob_property_lookup_table;
 
 LY_DEFINE (ly_property_lookup_stats, "ly:property-lookup-stats",
-          1, 0, 0, (SCM sym),
-          "Return hash table with a property access corresponding to"
-          " @var{sym}.  Choices are @code{prob}, @code{grob}, and"
-          " @code{context}.")
+           1, 0, 0, (SCM sym),
+           "Return hash table with a property access corresponding to"
+           " @var{sym}.  Choices are @code{prob}, @code{grob}, and"
+           " @code{context}.")
 {
   if (sym == ly_symbol2scm ("context"))
     return context_property_lookup_table ? context_property_lookup_table
-      : scm_c_make_hash_table (1);
+           : scm_c_make_hash_table (1);
   if (sym == ly_symbol2scm ("prob"))
     return prob_property_lookup_table ? prob_property_lookup_table
-      : scm_c_make_hash_table (1);
+           : scm_c_make_hash_table (1);
   if (sym == ly_symbol2scm ("grob"))
     return grob_property_lookup_table ? grob_property_lookup_table
-      : scm_c_make_hash_table (1);
+           : scm_c_make_hash_table (1);
   return scm_c_make_hash_table (1);
 }
 
-
 void
 note_property_access (SCM *table, SCM sym)
 {
index 63266566aca22d3ab9a0a221bcdba4e9405ff579..976d51062c2169eb872b307f363cd195edc2398b 100644 (file)
@@ -51,10 +51,9 @@ bool strict_infinity_checking = false;
 
 static SCM option_hash;
 
-
 void
 internal_set_option (SCM var,
-                    SCM val)
+                     SCM val)
 {
   if (0)
     ;
@@ -136,7 +135,6 @@ internal_set_option (SCM var,
   scm_hashq_set_x (option_hash, var, val);
 }
 
-
 ssize const HELP_INDENT = 30;
 ssize const INDENT = 2;
 ssize const SEPARATION = 5;
@@ -157,25 +155,25 @@ get_help_string ()
       SCM sym = scm_caar (s);
       SCM val = scm_cdar (s);
       string opt_spec = String_convert::char_string (' ', INDENT)
-                       + ly_symbol2string (sym)
-                       + " ("
-                       + ly_scm2string (scm_call_1 (converter, val))
-                       + ")";
+                        + ly_symbol2string (sym)
+                        + " ("
+                        + ly_scm2string (scm_call_1 (converter, val))
+                        + ")";
 
       if (opt_spec.length () + SEPARATION > HELP_INDENT)
-       opt_spec += "\n" + String_convert::char_string (' ', HELP_INDENT);
+        opt_spec += "\n" + String_convert::char_string (' ', HELP_INDENT);
       else
-       opt_spec += String_convert::char_string (' ', HELP_INDENT
-                                                     - opt_spec.length ());
+        opt_spec += String_convert::char_string (' ', HELP_INDENT
+                                                 - opt_spec.length ());
 
       SCM opt_help_scm
-       = scm_object_property (sym,
-                              ly_symbol2scm ("program-option-documentation"));
+        = scm_object_property (sym,
+                               ly_symbol2scm ("program-option-documentation"));
       string opt_help = ly_scm2string (opt_help_scm);
       replace_all (&opt_help,
-                  string ("\n"),
-                  string ("\n")
-                  + String_convert::char_string (' ', HELP_INDENT));
+                   string ("\n"),
+                   string ("\n")
+                   + String_convert::char_string (' ', HELP_INDENT));
 
       opts.push_back (opt_spec + opt_help + "\n");
     }
@@ -187,21 +185,19 @@ get_help_string ()
   return help;
 }
 
-
 LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 0, 0, (),
-          "Print @code{ly:set-option} usage.")
+           "Print @code{ly:set-option} usage.")
 {
   string help = get_help_string ();
-  puts (help.c_str());
+  puts (help.c_str ());
 
   return SCM_UNSPECIFIED;
 }
 
-
 LY_DEFINE (ly_add_option, "ly:add-option", 3, 0, 0,
-          (SCM sym, SCM val, SCM description),
-          "Add a program option @var{sym}.  @var{val} is the default"
-          " value and @var{description} is a string description.")
+           (SCM sym, SCM val, SCM description),
+           "Add a program option @var{sym}.  @var{val} is the default"
+           " value and @var{description} is a string description.")
 {
   if (!option_hash)
     option_hash = scm_permanent_object (scm_c_make_hash_table (11));
@@ -211,14 +207,13 @@ LY_DEFINE (ly_add_option, "ly:add-option", 3, 0, 0,
   internal_set_option (sym, val);
 
   scm_set_object_property_x (sym, ly_symbol2scm ("program-option-documentation"),
-                            description);
+                             description);
 
   return SCM_UNSPECIFIED;
 }
 
-
 LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val),
-          "Set a program option.")
+           "Set a program option.")
 {
   LY_ASSERT_TYPE (ly_is_symbol, var, 1);
 
@@ -240,38 +235,33 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val),
   return SCM_UNSPECIFIED;
 }
 
-
 LY_DEFINE (ly_command_line_options, "ly:command-line-options", 0, 0, 0, (),
-          "The Scheme options specified on command-line with @option{-d}.")
+           "The Scheme options specified on command-line with @option{-d}.")
 {
   return ly_string2scm (init_scheme_variables_global);
 }
 
-
 LY_DEFINE (ly_command_line_code, "ly:command-line-code", 0, 0, 0, (),
-          "The Scheme code specified on command-line with @option{-e}.")
+           "The Scheme code specified on command-line with @option{-e}.")
 {
   return ly_string2scm (init_scheme_code_global);
 }
 
-
 LY_DEFINE (ly_command_line_verbose_p, "ly:command-line-verbose?", 0, 0, 0, (),
-          "Was @code{be_verbose_global} set?")
+           "Was @code{be_verbose_global} set?")
 {
   return scm_from_bool (be_verbose_global);
 }
 
-
 LY_DEFINE (ly_all_options, "ly:all-options",
-          0, 0, 0, (),
-          "Get all option settings in an alist.")
+           0, 0, 0, (),
+           "Get all option settings in an alist.")
 {
   return ly_hash2alist (option_hash);
 }
 
-
 LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var),
-          "Get a global option setting.")
+           "Get a global option setting.")
 {
   LY_ASSERT_TYPE (ly_is_symbol, var, 1);
   return scm_hashq_ref (option_hash, var, SCM_BOOL_F);
index 8155025ee4d4859e86eb0dec39f75e7d6348dd98..06fa3e11dcd5a32fb9168fdbd24d14802343bbd8 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2007--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
-  
+
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
index 2cb8b486800b2f502a4760e08967370479633fc9..5f8b8c408e6e5e8e23e6bb263136800a03e22c14 100644 (file)
@@ -37,8 +37,8 @@ Property_iterator::process (Moment mom)
   Music *m = get_music ();
   SCM previous_value = o->get_property (m->get_property ("symbol"));
   send_stream_event (o, "SetProperty", m->origin (),
-                    ly_symbol2scm ("symbol"), m->get_property ("symbol"),
-                    ly_symbol2scm ("value"), m->get_property ("value"));
+                     ly_symbol2scm ("symbol"), m->get_property ("symbol"),
+                     ly_symbol2scm ("value"), m->get_property ("value"));
 
   /* For \once \set install a finalization hook to reset the property to the
    * previous value after the timestep */
@@ -46,10 +46,10 @@ Property_iterator::process (Moment mom)
     {
       Global_context *tg = get_outlet ()->get_global_context ();
       tg->add_finalization (scm_list_n (once_finalization_proc,
-                                       o->self_scm (), m->self_scm (),
-                                       ly_quote_scm (previous_value), SCM_UNDEFINED));
+                                        o->self_scm (), m->self_scm (),
+                                        ly_quote_scm (previous_value), SCM_UNDEFINED));
     }
-  
+
   Simple_music_iterator::process (mom);
 }
 
@@ -58,7 +58,7 @@ Property_unset_iterator::process (Moment m)
 {
   SCM sym = get_music ()->get_property ("symbol");
   send_stream_event (get_outlet (), "UnsetProperty", get_music ()->origin (),
-                    ly_symbol2scm ("symbol"), sym);
+                     ly_symbol2scm ("symbol"), sym);
 
   Simple_music_iterator::process (m);
 }
@@ -73,8 +73,8 @@ Property_iterator::once_finalization (SCM ctx, SCM music, SCM previous_value)
   // Do not use UnsetProperty, which sets the default, but rather
   // cache the value before the \once \set command and restore it now
   send_stream_event (c, "SetProperty", m->origin (),
-                    ly_symbol2scm ("symbol"), m->get_property ("symbol"),
-                    ly_symbol2scm ("value"), previous_value);
+                     ly_symbol2scm ("symbol"), m->get_property ("symbol"),
+                     ly_symbol2scm ("value"), previous_value);
 
   return SCM_UNSPECIFIED;
 }
@@ -91,7 +91,7 @@ check_grob (Music *mus, SCM sym)
 
   if (!g)
     mus->origin ()->warning (_f ("not a grob name, `%s'",
-                                ly_symbol2string (sym)));
+                                 ly_symbol2string (sym)));
 
   return g;
 }
@@ -120,15 +120,15 @@ Push_property_iterator::process (Moment m)
       SCM val = get_music ()->get_property ("grob-value");
 
       if (to_boolean (get_music ()->get_property ("pop-first"))
-         && !to_boolean (get_music ()->get_property ("once")))
-       send_stream_event (get_outlet (), "Revert", get_music ()->origin (),
-                          ly_symbol2scm ("symbol"), sym,
-                          ly_symbol2scm ("property-path"), grob_property_path);
-                       
+          && !to_boolean (get_music ()->get_property ("once")))
+        send_stream_event (get_outlet (), "Revert", get_music ()->origin (),
+                           ly_symbol2scm ("symbol"), sym,
+                           ly_symbol2scm ("property-path"), grob_property_path);
+
       send_stream_event (get_outlet (), "Override", get_music ()->origin (),
-                        ly_symbol2scm ("symbol"), sym,
-                        ly_symbol2scm ("property-path"), grob_property_path,
-                        ly_symbol2scm ("value"), val);
+                         ly_symbol2scm ("symbol"), sym,
+                         ly_symbol2scm ("property-path"), grob_property_path,
+                         ly_symbol2scm ("value"), val);
     }
   Simple_music_iterator::process (m);
 }
@@ -146,8 +146,8 @@ Push_property_iterator::once_finalization (SCM ctx, SCM music)
       SCM grob_property_path = get_property_path (mus);
 
       send_stream_event (c, "Revert", mus->origin (),
-                        ly_symbol2scm ("symbol"), sym,
-                        ly_symbol2scm ("property-path"), grob_property_path);
+                         ly_symbol2scm ("symbol"), sym,
+                         ly_symbol2scm ("property-path"), grob_property_path);
     }
   return SCM_UNSPECIFIED;
 }
@@ -162,7 +162,7 @@ Push_property_iterator::do_quit ()
 
       Global_context *tg = get_outlet ()->get_global_context ();
       tg->add_finalization (scm_list_n (once_finalization_proc,
-                                       trans, music, SCM_UNDEFINED));
+                                        trans, music, SCM_UNDEFINED));
     }
 }
 
@@ -176,8 +176,8 @@ Pop_property_iterator::process (Moment m)
       SCM grob_property_path = get_property_path (get_music ());
 
       send_stream_event (get_outlet (), "Revert", get_music ()->origin (),
-                        ly_symbol2scm ("symbol"), sym,
-                        ly_symbol2scm ("property-path"), grob_property_path);
+                         ly_symbol2scm ("symbol"), sym,
+                         ly_symbol2scm ("property-path"), grob_property_path);
     }
   Simple_music_iterator::process (m);
 }
index 4447371a8318336d909cb4e10cc59e518423cf5a..13afb6b29685392d5f000f43f95ac757d89ff10f 100644 (file)
@@ -32,7 +32,7 @@ Protected_scm::Protected_scm (SCM s)
 Protected_scm::Protected_scm (Protected_scm const &s)
 {
   object_ = (SCM_NIMP (s.object_) ? scm_gc_protect_object (s.object_)
-            : s.object_);
+             : s.object_);
 }
 
 Protected_scm::~Protected_scm ()
index 749bc13407befb65449969c75e92190e248bcc6d..b13d5e1cd5bee4f09008834a741825815a816d9c 100644 (file)
@@ -40,7 +40,7 @@ public:
   SCM event_vector_;
   int event_idx_;
   int end_idx_;
-  
+
   SCM transposed_musics_;
 
   DECLARE_SCHEME_CALLBACK (constructor, ());
@@ -77,7 +77,7 @@ Quote_iterator::accept_music_type (Stream_event *ev, bool is_cue) const
   for (; scm_is_pair (accept); accept = scm_cdr (accept))
     {
       if (ev->internal_in_event_class (scm_car (accept)))
-       return true;
+        return true;
     }
   return false;
 }
@@ -111,9 +111,9 @@ binsearch_scm_vector (SCM vec, SCM key, bool (*is_less) (SCM a, SCM b))
       SCM when = scm_caar (scm_c_vector_ref (vec, cmp));
       bool result = (*is_less) (key, when);
       if (result)
-       hi = cmp;
+        hi = cmp;
       else
-       lo = cmp;
+        lo = cmp;
     }
   while (hi - lo > 1);
 
@@ -124,7 +124,7 @@ void
 Quote_iterator::construct_children ()
 {
   Music_wrapper_iterator::construct_children ();
-      
+
   SCM name = get_music ()->get_property ("quoted-context-type");
   SCM id = get_music ()->get_property ("quoted-context-id");
 
@@ -132,7 +132,7 @@ Quote_iterator::construct_children ()
       && scm_is_symbol (name))
     {
       Context *cue_context = get_outlet ()->find_create_context (name,
-                                                                ly_scm2string (id), SCM_EOL);
+                                                                 ly_scm2string (id), SCM_EOL);
       quote_outlet_.set_context (cue_context);
     }
   else
@@ -160,13 +160,13 @@ bool
 Quote_iterator::quote_ok () const
 {
   return (event_idx_ >= 0
-         && scm_is_vector (event_vector_)
-         && event_idx_ <= end_idx_
+          && scm_is_vector (event_vector_)
+          && event_idx_ <= end_idx_
 
-         /*
-           Don't quote the grace notes leading to an unquoted note.
-         */
-         && vector_moment (event_idx_).main_part_ < stop_moment_.main_part_);
+          /*
+            Don't quote the grace notes leading to an unquoted note.
+          */
+          && vector_moment (event_idx_).main_part_ < stop_moment_.main_part_);
 }
 
 Moment
@@ -208,14 +208,14 @@ Quote_iterator::process (Moment m)
   if (event_idx_ < 0)
     {
       event_idx_ = binsearch_scm_vector (event_vector_,
-                                        get_outlet ()->now_mom ().smobbed_copy (),
-                                        &moment_less);
+                                         get_outlet ()->now_mom ().smobbed_copy (),
+                                         &moment_less);
       start_moment_ = get_outlet ()->now_mom () - music_start_mom ();
       stop_moment_ = start_moment_ + get_music ()->get_length ();
 
       end_idx_ = binsearch_scm_vector (event_vector_,
-                                      stop_moment_.smobbed_copy (),
-                                      &moment_less);
+                                       stop_moment_.smobbed_copy (),
+                                       &moment_less);
     }
 
   m += start_moment_;
@@ -223,10 +223,10 @@ Quote_iterator::process (Moment m)
     {
       Moment em = vector_moment (event_idx_);
       if (em > m)
-       return;
+        return;
 
       if (em == m)
-       break;
+        break;
 
       event_idx_++;
     }
@@ -237,41 +237,41 @@ Quote_iterator::process (Moment m)
       Pitch *quote_pitch = unsmob_pitch (scm_cdar (entry));
 
       /*
-       The pitch that sounds like central C
+        The pitch that sounds like central C
       */
       Pitch *me_pitch = unsmob_pitch (get_music ()->get_property ("quoted-transposition"));
       if (!me_pitch)
-       me_pitch = unsmob_pitch (get_outlet ()->get_property ("instrumentTransposition"));
+        me_pitch = unsmob_pitch (get_outlet ()->get_property ("instrumentTransposition"));
       SCM cid = get_music ()->get_property ("quoted-context-id");
       bool is_cue = scm_is_string (cid) && (ly_scm2string (cid) == "cue");
 
       for (SCM s = scm_cdr (entry); scm_is_pair (s); s = scm_cdr (s))
-       {
-         SCM ev_acc = scm_car (s);
-
-         Stream_event *ev = unsmob_stream_event (scm_car (ev_acc));
-         if (!ev)
-           programming_error ("no music found in quote");
-         else if (accept_music_type (ev, is_cue))
-           {
-             /* create a transposed copy if necessary */
-             if (quote_pitch || me_pitch)
-               {
-                 Pitch qp, mp;
-                 if (quote_pitch)
-                   qp = *quote_pitch;
-                 if (me_pitch)
-                   mp = *me_pitch;
-
-                 Pitch diff = pitch_interval (qp, mp);
-                 ev = ev->clone ();
-                 
-                 transpose_mutable (ev->get_property_alist (true), diff);
-                 transposed_musics_ = scm_cons (ev->unprotect (), transposed_musics_);
-               }
-             quote_outlet_.get_outlet ()->event_source ()->broadcast (ev);
-           }
-       }
+        {
+          SCM ev_acc = scm_car (s);
+
+          Stream_event *ev = unsmob_stream_event (scm_car (ev_acc));
+          if (!ev)
+            programming_error ("no music found in quote");
+          else if (accept_music_type (ev, is_cue))
+            {
+              /* create a transposed copy if necessary */
+              if (quote_pitch || me_pitch)
+                {
+                  Pitch qp, mp;
+                  if (quote_pitch)
+                    qp = *quote_pitch;
+                  if (me_pitch)
+                    mp = *me_pitch;
+
+                  Pitch diff = pitch_interval (qp, mp);
+                  ev = ev->clone ();
+
+                  transpose_mutable (ev->get_property_alist (true), diff);
+                  transposed_musics_ = scm_cons (ev->unprotect (), transposed_musics_);
+                }
+              quote_outlet_.get_outlet ()->event_source ()->broadcast (ev);
+            }
+        }
 
       event_idx_++;
     }
index bb597f97cb5b2da65cae30a0a4fed57c1c8c323e..9a2a9bebcbc7ee7ae1aa89b101e4e2cbc3e6bf2a 100644 (file)
@@ -28,7 +28,7 @@ public:
 };
 
 MAKE_SCHEME_CALLBACK (Relative_octave_check, relative_callback, 2)
-  SCM
+SCM
 Relative_octave_check::relative_callback (SCM music, SCM last_pitch)
 {
   Pitch p = *unsmob_pitch (last_pitch);
@@ -39,23 +39,23 @@ Relative_octave_check::relative_callback (SCM music, SCM last_pitch)
   if (check_p)
     {
       Pitch no_octave (-1,
-                      check_p->get_notename (),
-                      check_p->get_alteration ());
+                       check_p->get_notename (),
+                       check_p->get_alteration ());
 
       Pitch result = no_octave.to_relative_octave (p);
 
       if (result != *check_p)
-       {
-         string s = _ ("Failed octave check, got: ");
-         s += result.to_string ();
+        {
+          string s = _ ("Failed octave check, got: ");
+          s += result.to_string ();
 
-         m->origin ()->warning (s);
+          m->origin ()->warning (s);
 
-         delta_oct = check_p->get_octave () - result.get_octave ();
-       }
+          delta_oct = check_p->get_octave () - result.get_octave ();
+        }
     }
 
   return Pitch (p.get_octave () + delta_oct,
-               p.get_notename (),
-               p.get_alteration ()).smobbed_copy ();
+                p.get_notename (),
+                p.get_alteration ()).smobbed_copy ();
 }
index 6c23ac3ed7755428cf7a86ed577e9f702d304755..73b340d0fe9023b10d99155f279144cc7cef96ad 100644 (file)
@@ -29,15 +29,15 @@ public:
 };
 
 MAKE_SCHEME_CALLBACK (Relative_octave_music, no_relative_callback, 2)
-  SCM
+SCM
 Relative_octave_music::no_relative_callback (SCM /* music */,
-                                            SCM pitch)
+                                             SCM pitch)
 {
   return pitch;
 }
 
 MAKE_SCHEME_CALLBACK (Relative_octave_music, relative_callback, 2)
-  SCM
+SCM
 Relative_octave_music::relative_callback (SCM music, SCM pitch)
 {
   Music *me = unsmob_music (music);
@@ -45,11 +45,11 @@ Relative_octave_music::relative_callback (SCM music, SCM pitch)
     {
       lily_1_8_compatibility_used = true;
       /*  last-pitch should be junked some time, when
-         we ditch 1.8 compat too.
+          we ditch 1.8 compat too.
 
-         When you do, B should start where A left off.
+          When you do, B should start where A left off.
 
-         \relative { A \relative { ...} B }  */
+          \relative { A \relative { ...} B }  */
       SCM last_pitch = me->get_property ("last-pitch");
       Pitch *ptr = unsmob_pitch (last_pitch);
       return (ptr) ? last_pitch : pitch;
index 628187363bd39aa8417064146bf779189f5cbfdd..964e02941db88d54fb7e1771fa8a2578395f8113 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "config.hh"
 
-
 /* TODO: autoconf support */
 
 #include <sys/types.h>
@@ -51,17 +50,17 @@ sane_putenv (char const *key, string value, bool overwrite)
       char *s = strdup (combine.c_str ());
 
       if (be_verbose_global)
-       progress_indication (_f ("Setting %s to %s" , key, value.c_str ())
-                            + "\n");
-                            
-      int retval =  putenv (s);
+        progress_indication (_f ("Setting %s to %s", key, value.c_str ())
+                             + "\n");
+
+      int retval = putenv (s);
       /*
-       unfortunately, we can't portably free S here,
-       due to various bugs in glibc prior to 2.1.1
-      */ 
+        unfortunately, we can't portably free S here,
+        due to various bugs in glibc prior to 2.1.1
+      */
       return retval;
     }
-  
+
   return -1;
 }
 
@@ -91,10 +90,10 @@ prepend_env_path (char const *key, string value)
   if (is_dir (value))
     {
       if (be_verbose_global)
-       progress_indication (_f ("%s=%s (prepend)\n", key, value.c_str ())); 
+        progress_indication (_f ("%s=%s (prepend)\n", key, value.c_str ()));
 
       if (char const *cur = getenv (key))
-       value += to_string (PATHSEP) + cur;
+        value += to_string (PATHSEP) + cur;
 
       return sane_putenv (key, value.c_str (), true);
     }
@@ -122,8 +121,8 @@ prefix_relocation (string prefix)
     lilypond_datadir = package_datadir + "/current";
   else
     warning (_f ("not relocating, no %s/ or current/ found under %s",
-                TOPLEVEL_VERSION, package_datadir.c_str ()));
-  
+                 TOPLEVEL_VERSION, package_datadir.c_str ()));
+
 #if HAVE_GETTEXT
   if (is_dir (localedir))
     bindtextdomain ("lilypond", localedir.c_str ());
@@ -133,8 +132,8 @@ prefix_relocation (string prefix)
 
   if (be_verbose_global)
     warning (_f ("Relocation: compile datadir=%s, new datadir=%s",
-                old_lilypond_datadir.c_str (),
-                lilypond_datadir.c_str ()));
+                 old_lilypond_datadir.c_str (),
+                 lilypond_datadir.c_str ()));
 }
 
 /*
@@ -148,11 +147,11 @@ framework_relocation (string prefix)
     warning (_f ("Relocation: framework_prefix=%s", prefix));
 
   sane_putenv ("INSTALLER_PREFIX", prefix, true);
-              
+
   read_relocation_dir (prefix + "/etc/relocate/");
 
   string bindir = prefix + "/bin";
-  
+
   prepend_env_path ("PATH", bindir);
 }
 
@@ -163,77 +162,77 @@ void
 setup_paths (char const *argv0_ptr)
 {
   File_name argv0_filename (argv0_ptr);
-  
+
   if (relocate_binary)
     {
       string prefix_directory;
       if (getenv ("LILYPOND_RELOCATE_PREFIX"))
-       {
-         prefix_directory = getenv ("LILYPOND_RELOCATE_PREFIX");
+        {
+          prefix_directory = getenv ("LILYPOND_RELOCATE_PREFIX");
 #ifdef __MINGW32__
-         /* Normalize file name.  */
-         prefix_directory = File_name (prefix_directory).to_string ();
+          /* Normalize file name.  */
+          prefix_directory = File_name (prefix_directory).to_string ();
 #endif /* __MINGW32__ */
-      
-         prefix_relocation (prefix_directory);
-         string bindir = prefix_directory + "/bin";
-         framework_relocation (bindir);
-       }
+
+          prefix_relocation (prefix_directory);
+          string bindir = prefix_directory + "/bin";
+          framework_relocation (bindir);
+        }
       else if (relocate_binary)
-       {
-         string argv0_abs;
-         if (argv0_filename.is_absolute ())
-           {
-             argv0_abs = argv0_filename.to_string ();
-             if (be_verbose_global)
-               warning (_f ("Relocation: is absolute: argv0=%s", argv0_ptr));
-           }
-         else if (argv0_filename.dir_.length ())
-           {
-             argv0_abs = get_working_directory ()
-               + "/" + string (argv0_filename.to_string ());
-             if (be_verbose_global)
-               warning (_f ("Relocation: from cwd: argv0=%s", argv0_ptr));
-           }
-         else
-           {
-             /* Find absolute ARGV0 name, using PATH.  */
-             File_path path;
-             path.parse_path (getenv ("PATH"));
+        {
+          string argv0_abs;
+          if (argv0_filename.is_absolute ())
+            {
+              argv0_abs = argv0_filename.to_string ();
+              if (be_verbose_global)
+                warning (_f ("Relocation: is absolute: argv0=%s", argv0_ptr));
+            }
+          else if (argv0_filename.dir_.length ())
+            {
+              argv0_abs = get_working_directory ()
+                          + "/" + string (argv0_filename.to_string ());
+              if (be_verbose_global)
+                warning (_f ("Relocation: from cwd: argv0=%s", argv0_ptr));
+            }
+          else
+            {
+              /* Find absolute ARGV0 name, using PATH.  */
+              File_path path;
+              path.parse_path (getenv ("PATH"));
 
 #ifndef __MINGW32__
-             argv0_abs = path.find (argv0_filename.to_string ());
+              argv0_abs = path.find (argv0_filename.to_string ());
 #else /* __MINGW32__ */
-             path.prepend (get_working_directory ());
-             char const *ext[] = {"exe", "", 0 };
-             argv0_abs = path.find (argv0_filename.to_string (), ext);
+              path.prepend (get_working_directory ());
+              char const *ext[] = {"exe", "", 0 };
+              argv0_abs = path.find (argv0_filename.to_string (), ext);
 #endif /* __MINGW32__ */
 
-             if (be_verbose_global)
-               warning (_f ("Relocation: from PATH=%s\nargv0=%s",
-                            path.to_string ().c_str (), argv0_ptr));
-
-             if (argv0_abs.empty ())
-               programming_error ("cannot find absolute argv0");
-           }
-
-         string bindir = dir_name (argv0_abs);
-         string argv0_prefix = dir_name (bindir);
-         string compile_prefix = dir_name (dir_name (dir_name (lilypond_datadir)));
-         if (argv0_prefix != compile_prefix)
-           {
-             prefix_relocation (argv0_prefix);
-             prefix_directory = argv0_prefix;
-           }
-         if (argv0_prefix != compile_prefix || string (FRAMEWORKDIR) != "..")
-           {
-             framework_relocation (bindir + "/" + FRAMEWORKDIR);
-             prefix_directory = bindir + "/" + FRAMEWORKDIR;
-           }
-       }
+              if (be_verbose_global)
+                warning (_f ("Relocation: from PATH=%s\nargv0=%s",
+                             path.to_string ().c_str (), argv0_ptr));
+
+              if (argv0_abs.empty ())
+                programming_error ("cannot find absolute argv0");
+            }
+
+          string bindir = dir_name (argv0_abs);
+          string argv0_prefix = dir_name (bindir);
+          string compile_prefix = dir_name (dir_name (dir_name (lilypond_datadir)));
+          if (argv0_prefix != compile_prefix)
+            {
+              prefix_relocation (argv0_prefix);
+              prefix_directory = argv0_prefix;
+            }
+          if (argv0_prefix != compile_prefix || string (FRAMEWORKDIR) != "..")
+            {
+              framework_relocation (bindir + "/" + FRAMEWORKDIR);
+              prefix_directory = bindir + "/" + FRAMEWORKDIR;
+            }
+        }
 
       lilypond_datadir = prefix_directory
-       + "/share/lilypond/" TOPLEVEL_VERSION;
+                         + "/share/lilypond/" TOPLEVEL_VERSION;
     }
 
   if (getenv ("LILYPONDPREFIX"))
@@ -253,26 +252,25 @@ setup_paths (char const *argv0_ptr)
       && is_dir (build_datadir_current.c_str ()))
     lilypond_datadir = build_datadir_current;
 
+  lilypond_datadir = File_name (lilypond_datadir).canonicalized ().to_string ();
 
-  lilypond_datadir = File_name (lilypond_datadir).canonicalized().to_string();
-  
   global_path.append ("");
 
   /* Adding mf/out make lilypond unchanged source directory, when setting
      LILYPONDPREFIX to lilypond-x.y.z */
   char const *suffixes[] = {"ly", "ps", "scm", 0 };
-  
+
   vector<string> dirs;
   for (char const **s = suffixes; *s; s++)
     {
       string path = lilypond_datadir + to_string ('/') + string (*s);
       dirs.push_back (path);
     }
-  
+
   dirs.push_back (lilypond_datadir + "/fonts/otf/");
   dirs.push_back (lilypond_datadir + "/fonts/type1/");
   dirs.push_back (lilypond_datadir + "/fonts/svg/");
-  
+
   for (vsize i = 0; i < dirs.size (); i++)
     global_path.prepend (dirs[i]);
 }
@@ -288,57 +286,57 @@ expand_environment_variables (string orig)
   while (ptr < start_ptr + len)
     {
       char const *dollar = strchr (ptr, '$');
-      
+
       if (dollar != NULL)
-       {
-         char const *start_var = dollar + 1;
-         char const *end_var = start_var;
-         char const *start_next = end_var;
-         
-         out += string (ptr, dollar - ptr);
-         ptr = dollar;
-
-         if (*start_var == '{')
-           {
-             start_var ++;
-             
-             end_var = strchr (start_var, '}');
-             
-             if (end_var == NULL)
-               {
-                 end_var = start_var + len;
-                 start_next = end_var;
-               }
-             else
-               {
-                 start_next = end_var + 1; 
-               }
-           }
-         else 
-           {
-             /*
-               Hmm. what to do for $1 , $~ etc.?
-             */
-             do
-               {
-                 end_var ++;
-               }
-             while (isalnum (*end_var) || *end_var == '_');
-             start_next = end_var;
-           }
-
-         if (start_var < end_var)
-           {
-             string var_name (start_var, end_var - start_var);
-             char const *value = getenv (var_name.c_str ());
-             if (value != NULL)
-               out += string (value);
-
-             ptr = start_next;
-           }
-       }
+        {
+          char const *start_var = dollar + 1;
+          char const *end_var = start_var;
+          char const *start_next = end_var;
+
+          out += string (ptr, dollar - ptr);
+          ptr = dollar;
+
+          if (*start_var == '{')
+            {
+              start_var++;
+
+              end_var = strchr (start_var, '}');
+
+              if (end_var == NULL)
+                {
+                  end_var = start_var + len;
+                  start_next = end_var;
+                }
+              else
+                {
+                  start_next = end_var + 1;
+                }
+            }
+          else
+            {
+              /*
+                Hmm. what to do for $1 , $~ etc.?
+              */
+              do
+                {
+                  end_var++;
+                }
+              while (isalnum (*end_var) || *end_var == '_');
+              start_next = end_var;
+            }
+
+          if (start_var < end_var)
+            {
+              string var_name (start_var, end_var - start_var);
+              char const *value = getenv (var_name.c_str ());
+              if (value != NULL)
+                out += string (value);
+
+              ptr = start_next;
+            }
+        }
       else
-       break;
+        break;
 
     }
 
@@ -352,10 +350,10 @@ static string
 read_line (FILE *f)
 {
   string out;
-  
+
   int c = 0;
   while ((c = fgetc (f)) != EOF && c != '\n')
-    out += char(c);
+    out += char (c);
 
   return out;
 }
@@ -365,8 +363,8 @@ read_relocation_file (string filename)
 {
   if (be_verbose_global)
     progress_indication (_f ("Relocation file: %s", filename.c_str ())
-                        + "\n");
-      
+                         + "\n");
+
   char const *cname = filename.c_str ();
   FILE *f = fopen (cname, "r");
   if (!f)
@@ -377,13 +375,13 @@ read_relocation_file (string filename)
       string line = read_line (f);
       size_t idx = line.find (' ');
       if (idx == NPOS)
-       continue;
-      
+        continue;
+
       string command = line.substr (0, idx);
       line = line.substr (idx + 1);
-      
+
       if (idx == NPOS)
-       continue;
+        continue;
       idx = line.find ('=');
 
       string variable = line.substr (0, idx);
@@ -392,15 +390,15 @@ read_relocation_file (string filename)
       value = expand_environment_variables (value);
 
       if (command == "set")
-       sane_putenv (variable.c_str (), value, true);
+        sane_putenv (variable.c_str (), value, true);
       else if (command == "setdir")
-       set_env_dir (variable.c_str (), value);
+        set_env_dir (variable.c_str (), value);
       else if (command == "setfile")
-       set_env_file (variable.c_str (), value);
+        set_env_file (variable.c_str (), value);
       else if (command == "prependdir")
-       prepend_env_path (variable.c_str (), value);
+        prepend_env_path (variable.c_str (), value);
       else
-       error (_f ("Unknown relocation command %s", command));
+        error (_f ("Unknown relocation command %s", command));
     }
 
   fclose (f);
@@ -412,8 +410,8 @@ read_relocation_dir (string dirname)
   if (DIR *dir = opendir (dirname.c_str ()))
     while (struct dirent *ent = readdir (dir))
       {
-       File_name name (ent->d_name);
-       if (name.ext_ == "reloc")
-         read_relocation_file (dirname + "/" + name.to_string ());
+        File_name name (ent->d_name);
+        if (name.ext_ == "reloc")
+          read_relocation_file (dirname + "/" + name.to_string ());
       }
 }
index ed2f41fcf02524dfa3b5bd79f5545c773639a530..b4ec8ff09c7e5ad772a48c083e5d95e3624b10a8 100644 (file)
@@ -85,11 +85,11 @@ Repeat_acknowledge_engraver::process_music ()
     {
       SCM command = scm_car (cs);
       if (command == ly_symbol2scm ("start-repeat"))
-       start = true;
+        start = true;
       else if (command == ly_symbol2scm ("end-repeat"))
-       end = true;
+        end = true;
       else if (scm_is_pair (command) && scm_car (command) == ly_symbol2scm ("volta"))
-       volta_found = true;
+        volta_found = true;
       cs = scm_cdr (cs);
     }
 
@@ -113,24 +113,24 @@ Repeat_acknowledge_engraver::process_music ()
   if (!scm_is_string (wb) || ly_is_equal (db, wb))
     {
       if (s != "" || (volta_found && !scm_is_string (wb)))
-       context ()->set_property ("whichBar", ly_string2scm (s));
+        context ()->set_property ("whichBar", ly_string2scm (s));
     }
 }
 
 ADD_TRANSLATOR (Repeat_acknowledge_engraver,
-               /* doc */
-               "Acknowledge repeated music, and convert the contents of"
-               " @code{repeatCommands} into an appropriate setting for"
-               " @code{whichBar}.",
-
-               /* create */
-               "",
-
-               /* read */
-               "doubleRepeatType "
-               "repeatCommands "
-               "whichBar ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Acknowledge repeated music, and convert the contents of"
+                " @code{repeatCommands} into an appropriate setting for"
+                " @code{whichBar}.",
+
+                /* create */
+                "",
+
+                /* read */
+                "doubleRepeatType "
+                "repeatCommands "
+                "whichBar ",
+
+                /* write */
+                ""
+               );
index b2d5d6134e6fa1f23304dfcd0e33f7153ac7522e..a1d9c9a803ff2bf8cce709d6d426fb7e866d618a 100644 (file)
@@ -18,7 +18,6 @@
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include "engraver.hh"
 #include "item.hh"
 #include "pointer-group-interface.hh"
@@ -30,12 +29,12 @@ class Repeat_tie_engraver : public Engraver
 {
   Stream_event *event_;
   Grob *semi_tie_column_;
-  vector<Grob*> semi_ties_;
-  
-  void stop_translation_timestep (); 
+  vector<Grob *> semi_ties_;
+
+  void stop_translation_timestep ();
   DECLARE_ACKNOWLEDGER (note_head);
   DECLARE_TRANSLATOR_LISTENER (repeat_tie);
-  
+
 public:
   TRANSLATOR_DECLARATIONS (Repeat_tie_engraver);
 };
@@ -75,33 +74,32 @@ Repeat_tie_engraver::acknowledge_note_head (Grob_info inf)
   SCM cause = event_->self_scm ();
   Grob *semi_tie = make_item ("RepeatTie", cause);
   semi_tie->set_object ("note-head", inf.grob ()->self_scm ());
-  
+
   Pointer_group_interface::add_grob (semi_tie_column_, ly_symbol2scm ("ties"),
-                                    semi_tie);
+                                     semi_tie);
   semi_tie->set_parent (semi_tie_column_, Y_AXIS);
   semi_ties_.push_back (semi_tie);
 
-
   if (is_direction (unsmob_stream_event (cause)->get_property ("direction")))
     {
       Direction d = to_dir (unsmob_stream_event (cause)->get_property ("direction"));
-      semi_tie->set_property ("direction", scm_from_int (d)); 
+      semi_tie->set_property ("direction", scm_from_int (d));
     }
 
 }
 
 ADD_ACKNOWLEDGER (Repeat_tie_engraver, note_head);
-ADD_TRANSLATOR (Repeat_tie_engraver, 
-               /* doc */
-               "Create repeat ties.",
-               
-               /* create */
-               "RepeatTie "
-               "RepeatTieColumn ",
-
-               /* read */
-               "",
-
-               /* write */
-               ""
-               );
+ADD_TRANSLATOR (Repeat_tie_engraver,
+                /* doc */
+                "Create repeat ties.",
+
+                /* create */
+                "RepeatTie "
+                "RepeatTieColumn ",
+
+                /* read */
+                "",
+
+                /* write */
+                ""
+               );
index 581b1ac17a850f1b62f471fbf2d4f46fce45fb33..2560391a08c8ce07ebb210f76402ff4913f92e9f 100644 (file)
@@ -45,16 +45,16 @@ Repeated_music::relative_callback (SCM music, SCM pitch)
     {
       Music *body = unsmob_music (me->get_property ("element"));
       if (body)
-       p = body->to_relative_octave (p);
+        p = body->to_relative_octave (p);
 
       Pitch last = p;
       SCM alternatives = me->get_property ("elements");
 
       for (SCM s = alternatives; scm_is_pair (s); s = scm_cdr (s))
-       {
-         lily_1_8_compatibility_used = true;
-         unsmob_music (scm_car (s))->to_relative_octave (p);
-       }
+        {
+          lily_1_8_compatibility_used = true;
+          unsmob_music (scm_car (s))->to_relative_octave (p);
+        }
 
       return last.smobbed_copy ();
     }
@@ -83,7 +83,7 @@ Repeated_music::alternatives_get_length (Music *me, bool fold)
       m = m + unsmob_music (scm_car (p))->get_length ();
       done++;
       if (count - done < len)
-       p = scm_cdr (p);
+        p = scm_cdr (p);
     }
   return m;
 }
@@ -167,7 +167,7 @@ Repeated_music::first_start (SCM m)
   Music *body = unsmob_music (me->get_property ("element"));
 
   Moment rv = (body) ? body->start_mom ()
-    : Music_sequence::first_start (me->get_property ("elements"));
+              : Music_sequence::first_start (me->get_property ("elements"));
 
   return rv.smobbed_copy ();
 }
index d1f1640cf3bcfd926c772411055296733755275f..816234135586a105cd36dc9ff47396ea54d9fc7a 100644 (file)
@@ -52,7 +52,7 @@ void
 Rest_collision_engraver::process_acknowledged ()
 {
   vsize rest_count = 0;
-  set<Grob*> columns;
+  set<Grob *> columns;
   Moment now = now_mom ();
 
   for (SCM s = get_property ("busyGrobs"); scm_is_pair (s); s = scm_cdr (s))
@@ -60,32 +60,32 @@ Rest_collision_engraver::process_acknowledged ()
       Grob *g = unsmob_grob (scm_cdar (s));
       Moment *m = unsmob_moment (scm_caar (s));
       if (!g || !m)
-       continue;
+        continue;
 
       if (Rhythmic_head::has_interface (g) && (*m) > now)
-       {
-         Grob *column = g->get_parent (X_AXIS);
-         if (!column)
-           {
-             g->warning (_ ("rhythmic head is not part of a rhythmic column"));
-             continue;
-           }
-
-         // Only include rests that start now. Include notes that started any time.
-         Paper_column *paper_column = dynamic_cast<Item*> (column)->get_column ();
-         if (!Rest::has_interface (g) || !paper_column || Paper_column::when_mom (paper_column) == now)
-           {
-             columns.insert (column);
-             rest_count += Note_column::has_rests (column);
-           }
-       }
+        {
+          Grob *column = g->get_parent (X_AXIS);
+          if (!column)
+            {
+              g->warning (_ ("rhythmic head is not part of a rhythmic column"));
+              continue;
+            }
+
+          // Only include rests that start now. Include notes that started any time.
+          Paper_column *paper_column = dynamic_cast<Item *> (column)->get_column ();
+          if (!Rest::has_interface (g) || !paper_column || Paper_column::when_mom (paper_column) == now)
+            {
+              columns.insert (column);
+              rest_count += Note_column::has_rests (column);
+            }
+        }
     }
 
   if (!rest_collision_ && rest_count && columns.size () > 1)
     {
       rest_collision_ = make_item ("RestCollision", SCM_EOL);
-      for (set<Grob*>::iterator i = columns.begin (); i != columns.end (); ++i)
-       Rest_collision::add_column (rest_collision_, *i);
+      for (set<Grob *>::iterator i = columns.begin (); i != columns.end (); ++i)
+        Rest_collision::add_column (rest_collision_, *i);
     }
 }
 
@@ -98,15 +98,15 @@ Rest_collision_engraver::stop_translation_timestep ()
 #include "translator.icc"
 
 ADD_TRANSLATOR (Rest_collision_engraver,
-               /* doc */
-               "Handle collisions of rests.",
+                /* doc */
+                "Handle collisions of rests.",
 
-               /* create */
-               "RestCollision ",
+                /* create */
+                "RestCollision ",
 
-               /* read */
-               "busyGrobs ",
+                /* read */
+                "busyGrobs ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 8be91e3f231e435fc06105c12f7db5c5bb6e70dc..fc8a4b401d2880347f687c2b908d62f0d5140f3b 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "rest-collision.hh"
 
-#include <cmath>               // ceil.
+#include <cmath>                // ceil.
 using namespace std;
 
 #include "directional-element-interface.hh"
@@ -49,13 +49,13 @@ Rest_collision::force_shift_callback_rest (SCM rest, SCM offset)
    */
   if (scm_is_number (offset))
     rest_grob->translate_axis (scm_to_double (offset), Y_AXIS);
-  
+
   if (Note_column::has_interface (parent) && Note_column::has_rests (parent))
     {
       Grob *collision = unsmob_grob (parent->get_object ("rest-collision"));
 
       if (collision)
-       (void) collision->get_property ("positioning-done");
+        (void) collision->get_property ("positioning-done");
     }
 
   return scm_from_double (0.0);
@@ -72,7 +72,7 @@ Rest_collision::add_column (Grob *me, Grob *p)
   if (rest)
     {
       chain_offset_callback (rest,
-                            Rest_collision::force_shift_callback_rest_proc, Y_AXIS);
+                             Rest_collision::force_shift_callback_rest_proc, Y_AXIS);
     }
 }
 
@@ -98,16 +98,16 @@ Rest_collision::calc_positioning_done (SCM smob)
 
   extract_grob_set (me, "elements", elts);
 
-  vector<Grob*> rests;
-  vector<Grob*> notes;
+  vector<Grob *> rests;
+  vector<Grob *> notes;
 
   for (vsize i = 0; i < elts.size (); i++)
     {
       Grob *e = elts[i];
       if (unsmob_grob (e->get_object ("rest")))
-       rests.push_back (e);
+        rests.push_back (e);
       else
-       notes.push_back (e);
+        notes.push_back (e);
     }
 
   /*
@@ -131,160 +131,160 @@ Rest_collision::calc_positioning_done (SCM smob)
     {
 
       /*
-       This is incomplete: in case of an uneven number of rests, the
-       center one should be centered on the staff.
+        This is incomplete: in case of an uneven number of rests, the
+        center one should be centered on the staff.
       */
-      Drul_array<vector<Grob*> > ordered_rests;
+      Drul_array<vector<Grob *> > ordered_rests;
       for (vsize i = 0; i < rests.size (); i++)
-       {
-         Grob *r = Note_column::get_rest (rests[i]);
+        {
+          Grob *r = Note_column::get_rest (rests[i]);
 
-         Direction d = get_grob_direction (r);
-         if (d)
-           ordered_rests[d].push_back (r);
-         else
-           rests[d]->warning (_ ("cannot resolve rest collision: rest direction not set"));
-       }
+          Direction d = get_grob_direction (r);
+          if (d)
+            ordered_rests[d].push_back (r);
+          else
+            rests[d]->warning (_ ("cannot resolve rest collision: rest direction not set"));
+        }
 
       Direction d = LEFT;
       do
-       vector_sort (ordered_rests[d], rest_shift_less);
+        vector_sort (ordered_rests[d], rest_shift_less);
       while (flip (&d) != LEFT)
-       ;
+        ;
 
       do
-       {
-         if (ordered_rests[d].size () < 1)
-           {
-             if (ordered_rests[-d].size () > 1)
-               ordered_rests[-d][0]->warning (_ ("too many colliding rests"));
-
-             return SCM_BOOL_T;
-           }
-       }
+        {
+          if (ordered_rests[d].size () < 1)
+            {
+              if (ordered_rests[-d].size () > 1)
+                ordered_rests[-d][0]->warning (_ ("too many colliding rests"));
+
+              return SCM_BOOL_T;
+            }
+        }
       while (flip (&d) != LEFT);
 
       Grob *common = common_refpoint_of_array (ordered_rests[DOWN], me, Y_AXIS);
       common = common_refpoint_of_array (ordered_rests[UP], common, Y_AXIS);
 
       Real diff
-       = (ordered_rests[DOWN].back ()->extent (common, Y_AXIS)[UP]
-          - ordered_rests[UP].back ()->extent (common, Y_AXIS)[DOWN]) / staff_space;
+        = (ordered_rests[DOWN].back ()->extent (common, Y_AXIS)[UP]
+           - ordered_rests[UP].back ()->extent (common, Y_AXIS)[DOWN]) / staff_space;
 
       if (diff > 0)
-       {
-         int amount_down = (int) ceil (diff / 2);
-         diff -= amount_down;
-         Rest::translate (ordered_rests[DOWN].back (),
-                          -2 * amount_down);
-         if (diff > 0)
-           Rest::translate (ordered_rests[UP].back (),
-                            2 * int (ceil (diff)));
-       }
+        {
+          int amount_down = (int) ceil (diff / 2);
+          diff -= amount_down;
+          Rest::translate (ordered_rests[DOWN].back (),
+                           -2 * amount_down);
+          if (diff > 0)
+            Rest::translate (ordered_rests[UP].back (),
+                             2 * int (ceil (diff)));
+        }
 
       do
-       {
-         for (vsize i = ordered_rests[d].size () - 1; i-- > 0;)
-           {
-             Real last_y = ordered_rests[d][i + 1]->extent (common, Y_AXIS)[d];
-             Real y = ordered_rests[d][i]->extent (common, Y_AXIS)[-d];
-
-             Real diff = d * ((last_y - y) / staff_space);
-             if (diff > 0)
-               Rest::translate (ordered_rests[d][i], d * (int) ceil (diff) * 2);
-           }
-       }
+        {
+          for (vsize i = ordered_rests[d].size () - 1; i-- > 0;)
+            {
+              Real last_y = ordered_rests[d][i + 1]->extent (common, Y_AXIS)[d];
+              Real y = ordered_rests[d][i]->extent (common, Y_AXIS)[-d];
+
+              Real diff = d * ((last_y - y) / staff_space);
+              if (diff > 0)
+                Rest::translate (ordered_rests[d][i], d * (int) ceil (diff) * 2);
+            }
+        }
       while (flip (&d) != LEFT);
     }
   else
     {
       /*
-       Rests and notes.
+        Rests and notes.
       */
       // Count how many rests we move
       Drul_array<int> rcount (0, 0);
 
       for (vsize i = 0; i < rests.size (); i++)
-       {
-         Grob *rcol = rests[i];
-         Direction dir = Note_column::dir (rcol);
-         if (!dir)
-           continue;
-
-         Grob *rest = Note_column::get_rest (rcol);
-         // Do not compute a translation for pre-positioned rests,
-         //  nor count them for the "too many colliding rests" warning
-         if (scm_is_number (rest->get_property ("staff-position")))
-           continue;
-
-         Grob *common = common_refpoint_of_array (notes, rcol, Y_AXIS);
-         Interval restdim = rest->extent (common, Y_AXIS);
-         if (restdim.is_empty ())
-           continue;
-
-         Real staff_space = Staff_symbol_referencer::staff_space (rcol);
-         Real minimum_dist = robust_scm2double (me->get_property ("minimum-distance"), 1.0) * staff_space;
-
-         Interval notedim;
-         for (vsize i = 0; i < notes.size (); i++)
-           {
-             if (Note_column::dir (notes[i]) == -dir
-                 // If the note has already happened (but it has a long
-                 // duration, so there is a collision), don't look at the stem.
-                 // If we do, the rest gets shifted down a lot and it looks bad.
-                 || dynamic_cast<Item*> (notes[i])->get_column () != dynamic_cast<Item*> (rest)->get_column ())
-               {
-                 /* try not to look at the stem, as looking at a beamed
-                    note may trigger beam positioning prematurely.
-
-                    This happens with dotted rests, which need Y
-                    positioning to compute X-positioning.
-                 */
-                 Grob *head = Note_column::first_head (notes[i]);
-                 if (head)
-                   notedim.unite (head->extent (common, Y_AXIS));
-                 else
-                   programming_error ("Note_column without first_head()");
-               }
-             else
-               notedim.unite (notes[i]->extent (common, Y_AXIS));
-           }
-
-         Real y = dir * max (0.0,
-                             -dir * restdim[-dir] + dir * notedim[dir]  + minimum_dist);
-
-         int stafflines = Staff_symbol_referencer::line_count (me);
-         if (!stafflines)
-           {
-             programming_error ("no staff line count");
-             stafflines = 5;
-           }
-
-         // move discretely by half spaces.
-         int discrete_y = dir * int (ceil (y / (0.5 * dir * staff_space)));
-
-         // move by whole spaces inside the staff.
-         if (fabs (Staff_symbol_referencer::get_position (rest)
-                   + discrete_y) < stafflines + 1)
-           {
-             discrete_y = dir * int (ceil (dir * discrete_y / 2.0) * 2.0);
-           }
-
-         Rest::translate (rest, discrete_y);
-         if (rcount[dir]++)
-           rest->warning (_ ("too many colliding rests"));
-       }
+        {
+          Grob *rcol = rests[i];
+          Direction dir = Note_column::dir (rcol);
+          if (!dir)
+            continue;
+
+          Grob *rest = Note_column::get_rest (rcol);
+          // Do not compute a translation for pre-positioned rests,
+          //  nor count them for the "too many colliding rests" warning
+          if (scm_is_number (rest->get_property ("staff-position")))
+            continue;
+
+          Grob *common = common_refpoint_of_array (notes, rcol, Y_AXIS);
+          Interval restdim = rest->extent (common, Y_AXIS);
+          if (restdim.is_empty ())
+            continue;
+
+          Real staff_space = Staff_symbol_referencer::staff_space (rcol);
+          Real minimum_dist = robust_scm2double (me->get_property ("minimum-distance"), 1.0) * staff_space;
+
+          Interval notedim;
+          for (vsize i = 0; i < notes.size (); i++)
+            {
+              if (Note_column::dir (notes[i]) == -dir
+                  // If the note has already happened (but it has a long
+                  // duration, so there is a collision), don't look at the stem.
+                  // If we do, the rest gets shifted down a lot and it looks bad.
+                  || dynamic_cast<Item *> (notes[i])->get_column () != dynamic_cast<Item *> (rest)->get_column ())
+                {
+                  /* try not to look at the stem, as looking at a beamed
+                     note may trigger beam positioning prematurely.
+
+                     This happens with dotted rests, which need Y
+                     positioning to compute X-positioning.
+                  */
+                  Grob *head = Note_column::first_head (notes[i]);
+                  if (head)
+                    notedim.unite (head->extent (common, Y_AXIS));
+                  else
+                    programming_error ("Note_column without first_head()");
+                }
+              else
+                notedim.unite (notes[i]->extent (common, Y_AXIS));
+            }
+
+          Real y = dir * max (0.0,
+                              -dir * restdim[-dir] + dir * notedim[dir] + minimum_dist);
+
+          int stafflines = Staff_symbol_referencer::line_count (me);
+          if (!stafflines)
+            {
+              programming_error ("no staff line count");
+              stafflines = 5;
+            }
+
+          // move discretely by half spaces.
+          int discrete_y = dir * int (ceil (y / (0.5 * dir * staff_space)));
+
+          // move by whole spaces inside the staff.
+          if (fabs (Staff_symbol_referencer::get_position (rest)
+                    + discrete_y) < stafflines + 1)
+            {
+              discrete_y = dir * int (ceil (dir * discrete_y / 2.0) * 2.0);
+            }
+
+          Rest::translate (rest, discrete_y);
+          if (rcount[dir]++)
+            rest->warning (_ ("too many colliding rests"));
+        }
     }
   return SCM_BOOL_T;
 }
 
 ADD_INTERFACE (Rest_collision,
-              "Move ordinary rests (not multi-measure nor pitched rests)"
-              " to avoid conflicts.",
-
-              /* properties */
-              "minimum-distance "
-              "positioning-done "
-              "elements "
-              );
+               "Move ordinary rests (not multi-measure nor pitched rests)"
+               " to avoid conflicts.",
+
+               /* properties */
+               "minimum-distance "
+               "positioning-done "
+               "elements "
+              );
 
index 8a5622ce468d1db15a8dc27d41e48b3339012d91..ab4384e859b5cb0cccde4266fe51e0dce3966dce 100644 (file)
@@ -69,14 +69,14 @@ Rest_engraver::process_music ()
       Pitch *p = unsmob_pitch (rest_event_->get_property ("pitch"));
 
       if (p)
-       {
-         int pos = p->steps ();
-         SCM c0 = get_property ("middleCPosition");
-         if (scm_is_number (c0))
-           pos += scm_to_int (c0);
-
-         rest_->set_property ("staff-position", scm_from_int (pos));
-       }
+        {
+          int pos = p->steps ();
+          SCM c0 = get_property ("middleCPosition");
+          if (scm_is_number (c0))
+            pos += scm_to_int (c0);
+
+          rest_->set_property ("staff-position", scm_from_int (pos));
+        }
     }
 }
 
@@ -88,15 +88,15 @@ Rest_engraver::listen_rest (Stream_event *ev)
 }
 
 ADD_TRANSLATOR (Rest_engraver,
-               /* doc */
-               "Engrave rests.",
+                /* doc */
+                "Engrave rests.",
 
-               /* create */
-               "Rest ",
+                /* create */
+                "Rest ",
 
-               /* read */
-               "middleCPosition ",
+                /* read */
+                "middleCPosition ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index c064e5a98025ba0abae43292e27a1dda8294fc44..97deba3f8fc93b41cce9767f0a17b851bcafe301 100644 (file)
@@ -41,19 +41,19 @@ Rest::y_offset_callback (SCM smob)
 
   bool position_override = scm_is_number (me->get_property ("staff-position"));
   Real amount = robust_scm2double (me->get_property ("staff-position"), 0)
-    * 0.5 * ss;
-  
+                * 0.5 * ss;
+
   if (line_count % 2)
     {
       if (duration_log == 0 && line_count > 1)
-       amount += ss;
+        amount += ss;
     }
   else
     amount += ss / 2;
 
   if (!position_override)
-    amount += 2 * ss * get_grob_direction (me);; 
-  
+    amount += 2 * ss * get_grob_direction (me);;
+
   return scm_from_double (amount);
 }
 
@@ -86,9 +86,9 @@ Rest::glyph_name (Grob *me, int balltype, string style, bool try_ledgers)
       Real pos = Staff_symbol_referencer::get_position (me);
 
       /*
-       Figure out when the rest is far enough outside the staff. This
-       could bemore generic, but hey, we understand this even after
-       dinner.
+        Figure out when the rest is far enough outside the staff. This
+        could bemore generic, but hey, we understand this even after
+        dinner.
       */
       is_ledgered |= (balltype == -1) && (pos <= -rad - 3 || pos >= +rad + 1);
       is_ledgered |= (balltype == 0) && (pos >= +rad + 2 || pos < -rad);
@@ -101,26 +101,26 @@ Rest::glyph_name (Grob *me, int balltype, string style, bool try_ledgers)
     {
 
       /*
-       FIXME: Currently, ancient font does not provide ledgered rests;
-       hence the "o" suffix in the glyph name is bogus.  But do we need
-       ledgered rests at all now that we can draw ledger lines with
-       variable width, length and blotdiameter? -- jr
+        FIXME: Currently, ancient font does not provide ledgered rests;
+        hence the "o" suffix in the glyph name is bogus.  But do we need
+        ledgered rests at all now that we can draw ledger lines with
+        variable width, length and blotdiameter? -- jr
       */
       is_ledgered = 0;
 
       /*
-       There are no 32th/64th/128th mensural/neomensural rests.  In
-       these cases, revert back to default style.
+        There are no 32th/64th/128th mensural/neomensural rests.  In
+        these cases, revert back to default style.
       */
       if (balltype > 4)
-       actual_style = "";
+        actual_style = "";
     }
 
   if ((style == "classical") && (balltype != 2))
     {
       /*
-       classical style: revert back to default style for any rest other
-       than quarter rest
+        classical style: revert back to default style for any rest other
+        than quarter rest
       */
       actual_style = "";
     }
@@ -128,14 +128,14 @@ Rest::glyph_name (Grob *me, int balltype, string style, bool try_ledgers)
   if (style == "default")
     {
       /*
-       Some parts of lily still prefer style "default" over "".
-       Correct this here. -- jr
+        Some parts of lily still prefer style "default" over "".
+        Correct this here. -- jr
       */
       actual_style = "";
     }
 
   return ("rests." + to_string (balltype) + (is_ledgered ? "o" : "")
-         + actual_style);
+          + actual_style);
 }
 
 MAKE_SCHEME_CALLBACK (Rest, print, 1);
@@ -221,8 +221,8 @@ Rest::generic_extent_callback (Grob *me, Axis a)
 MAKE_SCHEME_CALLBACK (Rest, pure_height, 3);
 SCM
 Rest::pure_height (SCM smob,
-                  SCM /* start */,
-                  SCM /* end */)
+                   SCM /* start */,
+                   SCM /* end */)
 {
   Grob *me = unsmob_grob (smob);
   SCM m = brew_internal_stencil (me, false);
@@ -230,13 +230,13 @@ Rest::pure_height (SCM smob,
 }
 
 ADD_INTERFACE (Rest,
-              "A rest symbol.  The property @code{style} can be"
-              " @code{default}, @code{mensural}, @code{neomensural} or"
-              " @code{classical}.",
-
-              /* properties */
-              "direction "
-              "minimum-distance "
-              "style "
-              );
+               "A rest symbol.  The property @code{style} can be"
+               " @code{default}, @code{mensural}, @code{neomensural} or"
+               " @code{classical}.",
+
+               /* properties */
+               "direction "
+               "minimum-distance "
+               "style "
+              );
 
index 9768cafcabaf9b97c2d7f20023f50732de0adaa4..d02a985cf23b88b72f0d0929ba9e6013ad4b4910 100644 (file)
@@ -53,7 +53,7 @@
 
 class Rhythmic_column_engraver : public Engraver
 {
-  vector<Grob*> rheads_;
+  vector<Grob *> rheads_;
   Grob *stem_;
   Grob *note_column_;
   Grob *dotcol_;
@@ -77,18 +77,17 @@ Rhythmic_column_engraver::Rhythmic_column_engraver ()
   arpeggio_ = 0;
 }
 
-
 void
 Rhythmic_column_engraver::process_acknowledged ()
 {
   if (rheads_.size ())
     {
       if (!note_column_)
-       note_column_ = make_item ("NoteColumn", rheads_[0]->self_scm ());
+        note_column_ = make_item ("NoteColumn", rheads_[0]->self_scm ());
 
       for (vsize i = 0; i < rheads_.size (); i++)
-       if (!rheads_[i]->get_parent (X_AXIS))
-         Note_column::add_head (note_column_, rheads_[i]);
+        if (!rheads_[i]->get_parent (X_AXIS))
+          Note_column::add_head (note_column_, rheads_[i]);
 
       rheads_.resize (0);
     }
@@ -96,14 +95,14 @@ Rhythmic_column_engraver::process_acknowledged ()
   if (note_column_)
     {
       if (stem_
-         && !stem_->get_parent (X_AXIS))
-       {
-         Note_column::set_stem (note_column_, stem_);
-         stem_ = 0;
-       }
+          && !stem_->get_parent (X_AXIS))
+        {
+          Note_column::set_stem (note_column_, stem_);
+          stem_ = 0;
+        }
 
       if (arpeggio_)
-       note_column_->set_object ("arpeggio", arpeggio_->self_scm ());
+        note_column_->set_object ("arpeggio", arpeggio_->self_scm ());
     }
 }
 
@@ -138,16 +137,16 @@ ADD_ACKNOWLEDGER (Rhythmic_column_engraver, rhythmic_head);
 ADD_ACKNOWLEDGER (Rhythmic_column_engraver, arpeggio);
 
 ADD_TRANSLATOR (Rhythmic_column_engraver,
-               /* doc */
-               "Generate @code{NoteColumn}, an object that groups stems,"
-               " note heads, and rests.",
+                /* doc */
+                "Generate @code{NoteColumn}, an object that groups stems,"
+                " note heads, and rests.",
 
-               /* create */
-               "NoteColumn ",
+                /* create */
+                "NoteColumn ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index adeb4a871ccab82d2516dd5076aa238e78d49e6e..77993275ff4c6a045af09b6af9b98d73d8b24ed8 100644 (file)
@@ -43,7 +43,7 @@ int
 Rhythmic_head::dot_count (Grob *me)
 {
   return get_dots (me)
-    ? robust_scm2int (get_dots (me)->get_property ("dot-count"), 0) : 0;
+         ? robust_scm2int (get_dots (me)->get_property ("dot-count"), 0) : 0;
 }
 
 void
@@ -60,10 +60,10 @@ Rhythmic_head::duration_log (Grob *me)
 }
 
 ADD_INTERFACE (Rhythmic_head,
-              "Note head or rest.",
+               "Note head or rest.",
 
-              /* properties */
-              "dot "
-              "duration-log "
-              "stem "
-              );
+               /* properties */
+               "dot "
+               "duration-log "
+               "stem "
+              );
index 1198dee36fd13022aaaf9cdd50395a6c60943352..014296a32c70f385256cf98e21ea8f2534fd7f0d 100644 (file)
@@ -54,7 +54,7 @@ Rod::add_to_cols ()
   if (item_drul_[LEFT] != item_drul_[RIGHT]
       && item_drul_[LEFT] && item_drul_[RIGHT])
     Spaceable_grob::add_rod (item_drul_[LEFT],
-                            item_drul_[RIGHT],
-                            distance_);
+                             item_drul_[RIGHT],
+                             distance_);
 }
 
index 5de25f5c43c3df00f09fe9750146e91d3640890e..eeea8f8a42956ebef98411fdeb7ba7c579d5448e 100644 (file)
 
 /*
   todo: put string <-> pitch here too.
-
 */
 LY_DEFINE (ly_make_scale, "ly:make-scale",
-          1, 0, 0, (SCM steps),
-          "Create a scale."
-          "  The argument is a vector of rational numbers, each of which"
-          " represents the number of 200 cent tones of a pitch above the"
-          " tonic.")
+           1, 0, 0, (SCM steps),
+           "Create a scale."
+           "  The argument is a vector of rational numbers, each of which"
+           " represents the number of 200 cent tones of a pitch above the"
+           " tonic.")
 {
   bool type_ok = scm_is_vector (steps);
 
-  vector<Rational> tones; 
+  vector<Rational> tones;
   if (type_ok)
     {
       int len = scm_c_vector_length (steps);
-      for (int i = 0 ; i < len; i++)
-       {
-         SCM step = scm_c_vector_ref (steps, i);
-         type_ok = type_ok && scm_is_rational (step);
-         if (type_ok)
-           {
-             Rational from_c (scm_to_int (scm_numerator (step)),
-                              scm_to_int (scm_denominator (step)));
-             tones.push_back (from_c);
-           }
-       }
+      for (int i = 0; i < len; i++)
+        {
+          SCM step = scm_c_vector_ref (steps, i);
+          type_ok = type_ok && scm_is_rational (step);
+          if (type_ok)
+            {
+              Rational from_c (scm_to_int (scm_numerator (step)),
+                               scm_to_int (scm_denominator (step)));
+              tones.push_back (from_c);
+            }
+        }
     }
-  
-  
+
   SCM_ASSERT_TYPE (type_ok, steps, SCM_ARG1, __FUNCTION__, "vector of rational");
 
   Scale *s = new Scale (tones);
 
-  SCM retval =  s->self_scm ();
+  SCM retval = s->self_scm ();
   s->unprotect ();
-  
+
   return retval;
 }
 
 LY_DEFINE (ly_default_scale, "ly:default-scale",
-          0, 0, 0, (),
-          "Get the global default scale.")
+           0, 0, 0, (),
+           "Get the global default scale.")
 {
   return default_global_scale
-    ? default_global_scale->self_scm ()
-    : SCM_BOOL_F;
+         ? default_global_scale->self_scm ()
+         : SCM_BOOL_F;
 }
 
-
-Scale * default_global_scale = 0;
+Scale *default_global_scale = 0;
 
 LY_DEFINE (ly_set_default_scale, "ly:set-default-scale",
-          1, 0, 0, (SCM scale),
-          "Set the global default scale. This determines the tuning of"
-          " pitches with no accidentals or key signatures.  The first"
-          " pitch is C. Alterations are calculated relative to this"
-          " scale.  The number of pitches in this scale determines the"
-          " number of scale steps that make up an octave.  Usually the"
-          " 7-note major scale.")
+           1, 0, 0, (SCM scale),
+           "Set the global default scale. This determines the tuning of"
+           " pitches with no accidentals or key signatures.  The first"
+           " pitch is C. Alterations are calculated relative to this"
+           " scale.  The number of pitches in this scale determines the"
+           " number of scale steps that make up an octave.  Usually the"
+           " 7-note major scale.")
 {
   LY_ASSERT_SMOB (Scale, scale, 1);
 
@@ -92,7 +89,7 @@ LY_DEFINE (ly_set_default_scale, "ly:set-default-scale",
     default_global_scale->unprotect ();
   default_global_scale = s;
   s->protect ();
-  
+
   return SCM_UNSPECIFIED;
 }
 
@@ -110,7 +107,7 @@ Scale::tones_at_step (int step, int octave) const
   octave += (step - normalized_step) / step_count ();
 
   // There are 6 tones in an octave.
-  return step_tones_[normalized_step] + Rational (octave*6);
+  return step_tones_[normalized_step] + Rational (octave * 6);
 }
 
 Rational
@@ -122,7 +119,7 @@ Scale::step_size (int step) const
   // scale (6 is the number of tones of the octave above the
   // first note).
   if (normalized_step + 1 == step_count ())
-    return Rational(6) - step_tones_[normalized_step];
+    return Rational (6) - step_tones_[normalized_step];
 
   return step_tones_[normalized_step + 1] - step_tones_[normalized_step];
 }
@@ -139,10 +136,10 @@ Scale::normalize_step (int step) const
 
 int
 Scale::print_smob (SCM /* x */,
-                  SCM port,
-                  scm_print_state *)
+                   SCM port,
+                   scm_print_state *)
 {
-  scm_puts ("#<Scale>", port); 
+  scm_puts ("#<Scale>", port);
   return 1;
 }
 
@@ -165,7 +162,6 @@ Scale::Scale (Scale const &src)
   smobify_self ();
 }
 
-
 Scale::~Scale ()
 {
 }
index 22774f3952da871976b84b29d5bfd5ee31ae8d95..e59903086ac750fa225e4af7c88ed412a0de5a1d 100644 (file)
@@ -1,8 +1,8 @@
-/* 
+/*
   scheme-engraver.cc -- implement Scheme_engraver
-  
+
   source file of the GNU LilyPond music typesetter
-  
+
   Copyright (c) 2009--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
 
   LilyPond is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
-  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.  
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "scheme-engraver.hh"
@@ -71,12 +71,12 @@ void
 Scheme_engraver::init_from_scheme (SCM definition)
 {
   start_translation_timestep_function_ = callable (ly_symbol2scm ("start-translation-timestep"),
-                                                  definition);
+                                                   definition);
   stop_translation_timestep_function_ = callable (ly_symbol2scm ("stop-translation-timestep"),
-                                                 definition);
+                                                  definition);
   process_music_function_ = callable (ly_symbol2scm ("process-music"), definition);
   process_acknowledged_function_ = callable (ly_symbol2scm ("process-acknowledged"),
-                                            definition);
+                                             definition);
   initialize_function_ = callable (ly_symbol2scm ("initialize"), definition);
   finalize_function_ = callable (ly_symbol2scm ("finalize"), definition);
 
@@ -85,9 +85,9 @@ Scheme_engraver::init_from_scheme (SCM definition)
   listeners_alist_ = SCM_EOL;
 
   must_be_last_ = to_boolean (ly_assoc_get (ly_symbol2scm ("must-be-last"),
-                                           definition,
-                                           SCM_BOOL_F));
-                               
+                                            definition,
+                                            SCM_BOOL_F));
+
   translator_listener_record **tail = &per_instance_listeners_;
   for (SCM p = listeners; scm_is_pair (p); p = scm_cdr (p))
     {
@@ -95,10 +95,10 @@ Scheme_engraver::init_from_scheme (SCM definition)
       SCM proc = scm_cdar (p);
 
       if (!(ly_is_procedure (proc) && ly_is_symbol (event_class)))
-       continue;
+        continue;
 
       // We should check the arity of the function?
-      
+
       // Record for later lookup.
       listeners_alist_ = scm_acons (event_class, proc, listeners_alist_);
 
@@ -109,13 +109,13 @@ Scheme_engraver::init_from_scheme (SCM definition)
       tail = &rec->next_;
     }
 
-  init_acknowledgers (ly_assoc_get(ly_symbol2scm ("acknowledgers"),
-                                  definition, SCM_EOL),
-                     &interface_acknowledger_hash_);
-  
-  init_acknowledgers (ly_assoc_get(ly_symbol2scm ("end-acknowledgers"),
-                                  definition, SCM_EOL),
-                     &interface_end_acknowledger_hash_);
+  init_acknowledgers (ly_assoc_get (ly_symbol2scm ("acknowledgers"),
+                                    definition, SCM_EOL),
+                      &interface_acknowledger_hash_);
+
+  init_acknowledgers (ly_assoc_get (ly_symbol2scm ("end-acknowledgers"),
+                                    definition, SCM_EOL),
+                      &interface_end_acknowledger_hash_);
 
   // TODO: hook up description, props read/written, grobs created
   // etc. to provide automatic documentation.
@@ -123,16 +123,16 @@ Scheme_engraver::init_from_scheme (SCM definition)
 
 void
 Scheme_engraver::init_acknowledgers (SCM alist,
-                                    SCM *hash)
-{  
-  *hash = scm_c_make_hash_table(7);
+                                     SCM *hash)
+{
+  *hash = scm_c_make_hash_table (7);
   for (SCM p = alist; scm_is_pair (p); p = scm_cdr (p))
     {
       SCM iface = scm_caar (p);
       SCM proc = scm_cdar (p);
 
       if (!(ly_is_procedure (proc) && ly_is_symbol (iface)))
-       continue;
+        continue;
 
       scm_hashq_set_x (*hash, iface, proc);
     }
@@ -141,7 +141,7 @@ Scheme_engraver::init_acknowledgers (SCM alist,
 // This is the easy way to do it, at the cost of too many invocations
 // of Scheme_engraver::acknowledge_grob.  The clever dispatching of
 // acknowledgers is hardwired to have 1 method per engraver per
-// grob-type, which doesn't work for this case. 
+// grob-type, which doesn't work for this case.
 void
 Scheme_engraver::acknowledge_grob (Grob_info info)
 {
@@ -156,18 +156,18 @@ Scheme_engraver::acknowledge_end_grob (Grob_info info)
 
 void
 Scheme_engraver::acknowledge_grob_by_hash (Grob_info info,
-                                          SCM iface_function_hash)
+                                           SCM iface_function_hash)
 {
   SCM meta = info.grob ()->internal_get_property (ly_symbol2scm ("meta"));
   SCM ifaces = scm_cdr (scm_assoc (ly_symbol2scm ("interfaces"), meta));
   for (SCM s = ifaces; scm_is_pair (s); s = scm_cdr (s))
     {
       SCM func = scm_hashq_ref (iface_function_hash,
-                               scm_car (s), SCM_BOOL_F);
+                                scm_car (s), SCM_BOOL_F);
 
       if (ly_is_procedure (func))
-       scm_call_3 (func, self_scm (), info.grob ()->self_scm (),
-                   info.origin_translator ()->self_scm ());
+        scm_call_3 (func, self_scm (), info.grob ()->self_scm (),
+                    info.origin_translator ()->self_scm ());
     }
 }
 
@@ -186,7 +186,8 @@ void mark_listen_closure (void *target)
   scm_gc_mark ((SCM)target);
 }
 
-Listener_function_table listen_closure = {
+Listener_function_table listen_closure =
+{
   call_listen_closure, mark_listen_closure
 };
 
@@ -194,34 +195,34 @@ Listener_function_table listen_closure = {
 Listener
 Scheme_engraver::get_listener (void *arg, SCM name)
 {
-  Scheme_engraver *me = (Scheme_engraver*) arg;
+  Scheme_engraver *me = (Scheme_engraver *) arg;
   SCM func = ly_assoc_get (name, me->listeners_alist_, SCM_BOOL_F);
   assert (ly_is_procedure (func));
 
-  SCM closure = scm_cons (func, me->self_scm());
-  return Listener((void*)closure, &listen_closure);
+  SCM closure = scm_cons (func, me->self_scm ());
+  return Listener ((void *)closure, &listen_closure);
 }
 
 translator_listener_record *
-Scheme_engraver::get_listener_list () const                            
-{                                                                      
+Scheme_engraver::get_listener_list () const
+{
   return per_instance_listeners_;
 }
 
-#define DISPATCH(what)                                 \
-  void                                                 \
-  Scheme_engraver::what ()                             \
-  {                                                    \
-    if (what ## _function_ != SCM_BOOL_F)              \
-      scm_call_1 (what ## _function_, self_scm ());    \
+#define DISPATCH(what)                                  \
+  void                                                  \
+  Scheme_engraver::what ()                              \
+  {                                                     \
+    if (what ## _function_ != SCM_BOOL_F)               \
+      scm_call_1 (what ## _function_, self_scm ());     \
   }
 
-DISPATCH(start_translation_timestep);
-DISPATCH(stop_translation_timestep);
-DISPATCH(initialize);
-DISPATCH(finalize);
-DISPATCH(process_music);
-DISPATCH(process_acknowledged);
+DISPATCH (start_translation_timestep);
+DISPATCH (stop_translation_timestep);
+DISPATCH (initialize);
+DISPATCH (finalize);
+DISPATCH (process_music);
+DISPATCH (process_acknowledged);
 
 void
 Scheme_engraver::derived_mark () const
@@ -232,25 +233,25 @@ Scheme_engraver::derived_mark () const
   scm_gc_mark (finalize_function_);
   scm_gc_mark (process_music_function_);
   scm_gc_mark (process_acknowledged_function_);
-  scm_gc_mark (listeners_alist_);    
-  scm_gc_mark (interface_acknowledger_hash_);    
-  scm_gc_mark (interface_end_acknowledger_hash_);    
-} 
+  scm_gc_mark (listeners_alist_);
+  scm_gc_mark (interface_acknowledger_hash_);
+  scm_gc_mark (interface_end_acknowledger_hash_);
+}
 
 ADD_ACKNOWLEDGER (Scheme_engraver, grob);
 ADD_END_ACKNOWLEDGER (Scheme_engraver, grob);
 
 ADD_TRANSLATOR (Scheme_engraver,
-               /* doc */
-               "Implement engravers in Scheme.  Interprets arguments to"
-               " @code{\\consists} as callbacks.",
+                /* doc */
+                "Implement engravers in Scheme.  Interprets arguments to"
+                " @code{\\consists} as callbacks.",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 436d595ed0d8733b2177d788d0ae7c57ca7c6b29..c5a55ecb55855c4bcb0686cff137bb9bd5e74e14 100644 (file)
 #include "scheme-listener.hh"
 
 LY_DEFINE (ly_make_listener, "ly:make-listener",
-          1, 0, 0, (SCM callback),
-          "Create a listener.  Any time the listener hears an object,"
-          " it will call @var{callback} with that object.\n"
-          "\n"
-          "@var{callback} should take exactly one argument.")
+           1, 0, 0, (SCM callback),
+           "Create a listener.  Any time the listener hears an object,"
+           " it will call @var{callback} with that object.\n"
+           "\n"
+           "@var{callback} should take exactly one argument.")
 {
   LY_ASSERT_TYPE (ly_is_procedure, callback, 1);
   Scheme_listener *l = new Scheme_listener (callback);
index 52efdbe541ec61ff7ac30b4fc402e551c4b39253..178c8ad7f52b09030f1e22bfc4368ad973b975d8 100644 (file)
@@ -34,7 +34,7 @@ Scheme_listener::Scheme_listener (SCM c)
   callback_ = SCM_EOL;
   self_scm_ = SCM_EOL;
   smobify_self ();
-  callback_ = c; 
+  callback_ = c;
 }
 
 SCM
@@ -45,7 +45,7 @@ Scheme_listener::mark_smob (SCM obj)
 }
 
 int
-Scheme_listener::print_smob (SCM obj, SCM p, scm_print_state*)
+Scheme_listener::print_smob (SCM obj, SCM p, scm_print_state *)
 {
   Scheme_listener *me = (Scheme_listener *) SCM_CELL_WORD_1 (obj);
   scm_puts ("#<Scheme_listener ", p);
index 858aff52edc38a86eb97a130ba1fdb66c1c88ea0..d6dadd03ca4a4dd4e958d212f6985cf2d2a76e79 100644 (file)
@@ -40,7 +40,7 @@ static void
 copy_scm_hashes (SCM dest, SCM src)
 {
   scm_internal_hash_for_each_handle ((scm_t_hash_handle_fn) &copy_handle,
-                                    dest, src);
+                                     dest, src);
 }
 
 Scheme_hash_table::Scheme_hash_table ()
@@ -63,7 +63,7 @@ Scheme_hash_table::copy (Scheme_hash_table const &src)
   if (&src == this)
     return;
 
-  hash_tab_ = scm_c_make_hash_table (SCM_HASHTABLE_N_ITEMS(src.hash_tab_));
+  hash_tab_ = scm_c_make_hash_table (SCM_HASHTABLE_N_ITEMS (src.hash_tab_));
   copy_scm_hashes (hash_tab_, src.hash_tab_);
 }
 
@@ -80,7 +80,7 @@ Scheme_hash_table::mark_smob (SCM s)
 }
 
 int
-Scheme_hash_table::print_smob (SCM s, SCM p, scm_print_state*)
+Scheme_hash_table::print_smob (SCM s, SCM p, scm_print_state *)
 {
   assert (unsmob (s));
   scm_puts ("#<Scheme_hash_table  ", p);
@@ -91,7 +91,8 @@ Scheme_hash_table::print_smob (SCM s, SCM p, scm_print_state*)
 }
 
 bool
-Scheme_hash_table::try_retrieve (SCM k, SCM *v){
+Scheme_hash_table::try_retrieve (SCM k, SCM *v)
+{
 
   SCM handle = scm_hashq_get_handle (hash_tab_, k);
   if (scm_is_pair (handle))
@@ -133,18 +134,18 @@ Scheme_hash_table::remove (SCM k)
 
 static SCM
 collect_handles (void * /* closure */,
-                SCM key,
-                SCM value,
-                SCM result)
+                 SCM key,
+                 SCM value,
+                 SCM result)
 {
-  return scm_acons(key, value, result);
+  return scm_acons (key, value, result);
 }
 
 SCM
 Scheme_hash_table::to_alist () const
 {
   return scm_internal_hash_fold ((scm_t_hash_fold_fn) &collect_handles,
-                                NULL, SCM_EOL, hash_tab_);
+                                 NULL, SCM_EOL, hash_tab_);
 }
 
 IMPLEMENT_SMOBS (Scheme_hash_table);
index ade345e6d0b2ba7f13793b8be9d3cfba3b3f994d..227c86c41e29753a842f9260ca66e1ee34f67ffb 100644 (file)
@@ -60,8 +60,8 @@ void
 Score_engraver::finish (SCM)
 {
   recurse_over_translators (context (), &Translator::finalize,
-                           &Translator_group::finalize,
-                           UP);
+                            &Translator_group::finalize,
+                            UP);
 }
 
 #define MUSIC_FONT "emmentaler-20"
@@ -76,12 +76,12 @@ Score_engraver::initialize ()
   if (!fm)
     {
       error (_f ("cannot find `%s'", MUSIC_FONT ".otf")
-            + "\n"
-            + _ ("Music font has not been installed properly.")
-            + "\n"
-            + _f ("Search path `%s'", global_path.to_string ().c_str ())
-            + "\n"
-            + _ ("Aborting"));
+             + "\n"
+             + _ ("Music font has not been installed properly.")
+             + "\n"
+             + _f ("Search path `%s'", global_path.to_string ().c_str ())
+             + "\n"
+             + _ ("Aborting"));
     }
 
   pscore_ = new Paper_score (dynamic_cast<Output_def *> (context ()->get_output_def ()));
@@ -91,7 +91,7 @@ Score_engraver::initialize ()
   SCM props = updated_grob_properties (context (), ly_symbol2scm ("System"));
 
   pscore_->typeset_system (new System (props));
-  
+
   system_ = pscore_->root_system ();
   context ()->set_property ("rootSystem", system_->self_scm ());
 
@@ -102,7 +102,7 @@ void
 Score_engraver::connect_to_context (Context *c)
 {
   Engraver_group::connect_to_context (c);
-  
+
   Dispatcher *d = c->get_global_context ()->event_source ();
   d->add_listener (GET_LISTENER (one_time_step), ly_symbol2scm ("OneTimeStep"));
   d->add_listener (GET_LISTENER (prepare), ly_symbol2scm ("Prepare"));
@@ -111,16 +111,16 @@ Score_engraver::connect_to_context (Context *c)
 
 /*
   uncovered:
-  
-  check_removal always returns false for Score contexts, it has been that way 
-since I joined the project. There is a reason for this: The typeset score is 
-stored in the Score_engraver, which in turn is accessed through the 
-Global_context returned by ly:run-translator. So the score-translator must be 
+
+  check_removal always returns false for Score contexts, it has been that way
+since I joined the project. There is a reason for this: The typeset score is
+stored in the Score_engraver, which in turn is accessed through the
+Global_context returned by ly:run-translator. So the score-translator must be
 connected to the score-context after run-translator finishes.
 
-I plan to change this: we should junk run-translator, and instead keep track 
-of both context and translator in the SCM code, and access the typeset score 
-directly via the created global-translator. Then it would be possible to 
+I plan to change this: we should junk run-translator, and instead keep track
+of both context and translator in the SCM code, and access the typeset score
+directly via the created global-translator. Then it would be possible to
 disconnect score-translators at iteration time. -es
  */
 void
@@ -175,33 +175,33 @@ Score_engraver::typeset_all ()
       Grob *elem = elems_[i];
 
       if (!elem->get_parent (Y_AXIS))
-       Axis_group_interface::add_element (system_, elem);
+        Axis_group_interface::add_element (system_, elem);
     }
   elems_.clear ();
 }
 
 ADD_TRANSLATOR_GROUP (Score_engraver,
-                     /* doc */
-                     "The top-level engraver.  Takes care of generating"
-                     " columns and the complete system (i.e.,"
-                     " @code{System}).\n"
-                     "\n"
-                     "This engraver decides whether a column is breakable."
-                     "  The default is that a column is always breakable."
-                     "  However, every @code{Bar_engraver} that does not have"
-                     " a bar line at a certain point sets @code{forbidBreaks}"
-                     " to stop line breaks.  In practice, this means that you"
-                     " can make a break point by creating a bar line"
-                     " (assuming that there are no beams or notes that"
-                     " prevent a break point).",
-
-                     /* create */
-                     "System ",
-                     
-                     /* read */
-                     "currentMusicalColumn "
-                     "currentCommandColumn ",
-
-                     /* write */
-                     ""
-                     );
+                      /* doc */
+                      "The top-level engraver.  Takes care of generating"
+                      " columns and the complete system (i.e.,"
+                      " @code{System}).\n"
+                      "\n"
+                      "This engraver decides whether a column is breakable."
+                      "  The default is that a column is always breakable."
+                      "  However, every @code{Bar_engraver} that does not have"
+                      " a bar line at a certain point sets @code{forbidBreaks}"
+                      " to stop line breaks.  In practice, this means that you"
+                      " can make a break point by creating a bar line"
+                      " (assuming that there are no beams or notes that"
+                      " prevent a break point).",
+
+                      /* create */
+                      "System ",
+
+                      /* read */
+                      "currentMusicalColumn "
+                      "currentCommandColumn ",
+
+                      /* write */
+                      ""
+                     );
index 5257788df6b7969ad07ec12925bf5ea0beab0695..f47963f5e9ae43405dbb7b4ef4baf5fc92cf7113 100644 (file)
 #include "audio-item.hh"
 
 ADD_TRANSLATOR_GROUP (Score_performer,
-                     /* doc */
-                     "",
+                      /* doc */
+                      "",
 
-                     /* create */
-                     "",
+                      /* create */
+                      "",
 
-                     /* read */
-                     "",
+                      /* read */
+                      "",
 
-                     /* write */
-                     ""
-                     );
+                      /* write */
+                      ""
+                     );
 
 Score_performer::Score_performer ()
 {
@@ -61,7 +61,7 @@ void
 Score_performer::announce_element (Audio_element_info info)
 {
   announce_infos_.push_back (info);
-  if (Audio_staff *s = dynamic_cast<Audio_staff*> (info.elem_))
+  if (Audio_staff *s = dynamic_cast<Audio_staff *> (info.elem_))
     {
       performance_->audio_staffs_.push_back (s);
     }
@@ -75,17 +75,16 @@ Score_performer::acknowledge_audio_elements ()
   for (vsize i = 0; i < announce_infos_.size (); i++)
     {
       if (Audio_item *ai = dynamic_cast<Audio_item *> (announce_infos_[i].elem_))
-       audio_column_->add_audio_item (ai);
+        audio_column_->add_audio_item (ai);
     }
   Performer_group::acknowledge_audio_elements ();
 }
 
-
 void
 Score_performer::connect_to_context (Context *c)
 {
   Performer_group::connect_to_context (c);
-  
+
   Dispatcher *d = c->get_global_context ()->event_source ();
   d->add_listener (GET_LISTENER (one_time_step), ly_symbol2scm ("OneTimeStep"));
   d->add_listener (GET_LISTENER (prepare), ly_symbol2scm ("Prepare"));
@@ -123,9 +122,9 @@ Score_performer::finish (SCM)
   bool use_ports = channel_mapping == ly_symbol2scm ("voice");
   performance_->ports_ = use_ports;
   recurse_over_translators (context (),
-                           &Translator::finalize,
-                           &Translator_group::finalize,
-                           UP);
+                            &Translator::finalize,
+                            &Translator_group::finalize,
+                            UP);
 }
 
 IMPLEMENT_LISTENER (Score_performer, one_time_step);
@@ -136,17 +135,17 @@ Score_performer::one_time_step (SCM)
     {
       if (!skipping_)
         {
-         skip_start_mom_ = audio_column_->when ();
-         skipping_ = true;
+          skip_start_mom_ = audio_column_->when ();
+          skipping_ = true;
         }
     }
   else
     {
       if (skipping_)
         {
-         offset_mom_ -= audio_column_->when () - skip_start_mom_;
-         skipping_ = false;
-       }
+          offset_mom_ -= audio_column_->when () - skip_start_mom_;
+          skipping_ = false;
+        }
 
       audio_column_->offset_when (offset_mom_);
       precomputed_recurse_over_translators (context (), PROCESS_MUSIC, UP);
@@ -170,11 +169,9 @@ Score_performer::initialize ()
 {
   performance_ = new Performance;
   performance_->unprotect ();
-  context ()->set_property ("output", performance_->self_scm ()); 
+  context ()->set_property ("output", performance_->self_scm ());
   performance_->midi_ = context ()->get_output_def ();
 
-
   Translator_group::initialize ();
 }
 
-
index f3afd1429bd69157c2b287a7e890526ec0aa67b8..5331e3583e73a8838d844671b5feaca545e9ed1c 100644 (file)
@@ -27,9 +27,9 @@
 #include "paper-book.hh"
 
 LY_DEFINE (ly_make_score, "ly:make-score",
-          1, 0, 0,
-          (SCM music),
-          "Return score with @var{music} encapsulated in it.")
+           1, 0, 0,
+           (SCM music),
+           "Return score with @var{music} encapsulated in it.")
 {
   LY_ASSERT_SMOB (Music, music, 1);
 
@@ -40,8 +40,8 @@ LY_DEFINE (ly_make_score, "ly:make-score",
 }
 
 LY_DEFINE (ly_score_output_defs, "ly:score-output-defs",
-          1, 0, 0, (SCM score),
-          "All output definitions in a score.")
+           1, 0, 0, (SCM score),
+           "All output definitions in a score.")
 {
   LY_ASSERT_SMOB (Score, score, 1);
   Score *sc = unsmob_score (score);
@@ -53,8 +53,8 @@ LY_DEFINE (ly_score_output_defs, "ly:score-output-defs",
 }
 
 LY_DEFINE (ly_score_add_output_def_x, "ly:score-add-output-def!",
-          2, 0, 0, (SCM score, SCM def),
-          "Add an output definition @var{def} to @var{score}.")
+           2, 0, 0, (SCM score, SCM def),
+           "Add an output definition @var{def} to @var{score}.")
 {
   LY_ASSERT_SMOB (Score, score, 1);
   LY_ASSERT_SMOB (Output_def, def, 2);
@@ -65,8 +65,8 @@ LY_DEFINE (ly_score_add_output_def_x, "ly:score-add-output-def!",
 }
 
 LY_DEFINE (ly_score_header, "ly:score-header",
-          1, 0, 0, (SCM score),
-          "Return score header.")
+           1, 0, 0, (SCM score),
+           "Return score header.")
 {
   LY_ASSERT_SMOB (Score, score, 1);
   Score *sc = unsmob_score (score);
@@ -74,12 +74,12 @@ LY_DEFINE (ly_score_header, "ly:score-header",
 }
 
 LY_DEFINE (ly_score_set_header_x, "ly:score-set-header!",
-          2, 0, 0, (SCM score, SCM module),
-          "Set the score header.")
+           2, 0, 0, (SCM score, SCM module),
+           "Set the score header.")
 {
   LY_ASSERT_SMOB (Score, score, 1);
   SCM_ASSERT_TYPE (ly_is_module (module), module, SCM_ARG2, __FUNCTION__,
-                  "module");
+                   "module");
 
   Score *sc = unsmob_score (score);
   sc->set_header (module);
@@ -87,8 +87,8 @@ LY_DEFINE (ly_score_set_header_x, "ly:score-set-header!",
 }
 
 LY_DEFINE (ly_score_music, "ly:score-music",
-          1, 0, 0, (SCM score),
-          "Return score music.")
+           1, 0, 0, (SCM score),
+           "Return score music.")
 {
   LY_ASSERT_SMOB (Score, score, 1);
   Score *sc = unsmob_score (score);
@@ -96,8 +96,8 @@ LY_DEFINE (ly_score_music, "ly:score-music",
 }
 
 LY_DEFINE (ly_score_error_p, "ly:score-error?",
-          1, 0, 0, (SCM score),
-          "Was there an error in the score?")
+           1, 0, 0, (SCM score),
+           "Was there an error in the score?")
 {
   LY_ASSERT_SMOB (Score, score, 1);
   Score *sc = unsmob_score (score);
@@ -105,10 +105,10 @@ LY_DEFINE (ly_score_error_p, "ly:score-error?",
 }
 
 LY_DEFINE (ly_score_embedded_format, "ly:score-embedded-format",
-          2, 0, 0, (SCM score, SCM layout),
-          "Run @var{score} through @var{layout} (an output definition)"
-          " scaled to correct output-scale already, returning a list of"
-          " layout-lines.")
+           2, 0, 0, (SCM score, SCM layout),
+           "Run @var{score} through @var{layout} (an output definition)"
+           " scaled to correct output-scale already, returning a list of"
+           " layout-lines.")
 {
   LY_ASSERT_SMOB (Score, score, 1);
   LY_ASSERT_SMOB (Output_def, layout, 2);
index c3125df5ad860e251546c3b4f3e417b80ea5c43a..84f236864d4b07869eb6aa024c03424a155dab6d 100644 (file)
@@ -44,7 +44,6 @@ Score::origin () const
   return unsmob_input (input_location_);
 }
 
-
 Score::Score ()
 {
   header_ = SCM_EOL;
@@ -79,7 +78,7 @@ Score::mark_smob (SCM s)
 }
 
 int
-Score::print_smob (SCM, SCM p, scm_print_state*)
+Score::print_smob (SCM, SCM p, scm_print_state *)
 {
   scm_puts ("#<Score>", p);
 
@@ -116,7 +115,6 @@ Score::Score (Score const &s)
     ly_module_copy (header_, s.header_);
 }
 
-
 /*
   Format score, return list of Music_output objects.
 
@@ -124,7 +122,7 @@ Score::Score (Score const &s)
 */
 SCM
 Score::book_rendering (Output_def *layoutbook,
-                      Output_def *default_def)
+                       Output_def *default_def)
 {
   if (error_found_)
     return SCM_EOL;
@@ -146,22 +144,22 @@ Score::book_rendering (Output_def *layoutbook,
       SCM scaled = SCM_EOL;
 
       if (def->c_variable ("is-layout") == SCM_BOOL_T)
-       {
-         def = scale_output_def (def, scale);
-         def->parent_ = layoutbook;
+        {
+          def = scale_output_def (def, scale);
+          def->parent_ = layoutbook;
 
-         scaled = def->unprotect ();
-       }
+          scaled = def->unprotect ();
+        }
 
       /* TODO: fix or junk --no-layout.  */
       SCM context = ly_run_translator (music_, def->self_scm ());
       if (dynamic_cast<Global_context *> (unsmob_context (context)))
-       {
-         SCM s = ly_format_output (context);
+        {
+          SCM s = ly_format_output (context);
 
-         *tail = scm_cons (s, SCM_EOL);
-         tail = SCM_CDRLOC (*tail);
-       }
+          *tail = scm_cons (s, SCM_EOL);
+          tail = SCM_CDRLOC (*tail);
+        }
 
       scm_remember_upto_here_1 (scaled);
     }
@@ -184,7 +182,7 @@ Score::set_music (SCM music)
       m->origin ()->error (_ ("errors found, ignoring music expression"));
 
       this->error_found_ = this->error_found_
-       || to_boolean (m->get_property ("error-found"));
+                           || to_boolean (m->get_property ("error-found"));
     }
 
   if (this->error_found_)
index a5be1ef6602d2a1b6c821f62c2c8becd4edff6ae..c9f4a302baa7cff2aca2081584141be95fd3fe8a 100644 (file)
@@ -30,7 +30,7 @@
 class Script_column_engraver : public Engraver
 {
   Grob *script_column_;
-  vector<Grob*> scripts_;
+  vector<Grob *> scripts_;
 
 public:
   TRANSLATOR_DECLARATIONS (Script_column_engraver);
@@ -51,8 +51,8 @@ Script_column_engraver::stop_translation_timestep ()
   if (script_column_)
     {
       for (vsize i = 0; i < scripts_.size (); i++)
-       if (Side_position_interface::get_axis (scripts_[i]) == Y_AXIS)
-         Script_column::add_side_positioned (script_column_, scripts_[i]);
+        if (Side_position_interface::get_axis (scripts_[i]) == Y_AXIS)
+          Script_column::add_side_positioned (script_column_, scripts_[i]);
     }
 
   script_column_ = 0;
@@ -66,7 +66,7 @@ Script_column_engraver::acknowledge_side_position (Grob_info inf)
   if (thing)
     {
       if (!Item::is_non_musical (thing))
-       scripts_.push_back (thing);
+        scripts_.push_back (thing);
     }
 }
 
@@ -79,16 +79,16 @@ Script_column_engraver::process_acknowledged ()
 
 ADD_ACKNOWLEDGER (Script_column_engraver, side_position);
 ADD_TRANSLATOR (Script_column_engraver,
-               /* doc */
-               "Find potentially colliding scripts and put them into a"
-               " @code{ScriptColumn} object; that will fix the collisions.",
+                /* doc */
+                "Find potentially colliding scripts and put them into a"
+                " @code{ScriptColumn} object; that will fix the collisions.",
 
-               /* create */
-               "ScriptColumn ",
+                /* create */
+                "ScriptColumn ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index b9c9e178f4bc65ddf3e28d3a9ceb76fd0d694bda..4e2dd3edc487a4c27e6d8b4bdd34b916611044d3 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <map>
 
-typedef map<Grob*, vector <Grob*> > Grob_scripts_map;
+typedef map<Grob *, vector <Grob *> > Grob_scripts_map;
 
 void
 Script_column::add_side_positioned (Grob *me, Grob *script)
@@ -42,8 +42,8 @@ Script_column::add_side_positioned (Grob *me, Grob *script)
 }
 
 LY_DEFINE (ly_grob_script_priority_less, "ly:grob-script-priority-less",
-          2, 0, 0, (SCM a, SCM b),
-          "Compare two grobs by script priority.  For internal use.")
+           2, 0, 0, (SCM a, SCM b),
+           "Compare two grobs by script priority.  For internal use.")
 {
   Grob *i1 = unsmob_grob (a);
   Grob *i2 = unsmob_grob (b);
@@ -59,7 +59,7 @@ SCM
 Script_column::row_before_line_breaking (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
-  vector<Grob*> horizontal_grobs;
+  vector<Grob *> horizontal_grobs;
   extract_grob_set (me, "scripts", scripts);
 
   Grob_scripts_map head_scripts_map;
@@ -69,25 +69,25 @@ Script_column::row_before_line_breaking (SCM smob)
       Grob *sc = scripts[i];
 
       /*
-       Don't want to consider scripts horizontally next to notes.
+        Don't want to consider scripts horizontally next to notes.
       */
       if (Accidental_placement::has_interface (sc)
-         || Arpeggio::has_interface (sc))
-       {
-         affect_all_grobs.push_back (sc);
-       }
-      else if (sc->get_property_data ("Y-offset") !=
-              Side_position_interface::y_aligned_side_proc)
-       {
-         head_scripts_map[sc->get_parent (Y_AXIS)].push_back (sc);
-       }
+          || Arpeggio::has_interface (sc))
+        {
+          affect_all_grobs.push_back (sc);
+        }
+      else if (sc->get_property_data ("Y-offset")
+               != Side_position_interface::y_aligned_side_proc)
+        {
+          head_scripts_map[sc->get_parent (Y_AXIS)].push_back (sc);
+        }
     }
 
   for (Grob_scripts_map::const_iterator i (head_scripts_map.begin ());
        i != head_scripts_map.end ();
        i++)
     {
-      vector<Grob*> grobs  = (*i).second;
+      vector<Grob *> grobs = (*i).second;
 
       // this isn't right in all cases, but in general a safe assumption.
       concat (grobs, affect_all_grobs);
@@ -97,24 +97,23 @@ Script_column::row_before_line_breaking (SCM smob)
   return SCM_UNSPECIFIED;
 }
 
-
 MAKE_SCHEME_CALLBACK (Script_column, before_line_breaking, 1);
 SCM
 Script_column::before_line_breaking (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
-  vector<Grob*> staff_sided;
+  vector<Grob *> staff_sided;
 
   extract_grob_set (me, "scripts", scripts);
   for (vsize i = 0; i < scripts.size (); i++)
     {
       Grob *sc = scripts[i];
       /*
-       Don't want to consider scripts horizontally next to notes.
+        Don't want to consider scripts horizontally next to notes.
       */
-      if (sc->get_property_data ("X-offset") !=
-         Side_position_interface::x_aligned_side_proc)
-       staff_sided.push_back (sc);
+      if (sc->get_property_data ("X-offset")
+          != Side_position_interface::x_aligned_side_proc)
+        staff_sided.push_back (sc);
     }
 
   order_grobs (staff_sided);
@@ -122,7 +121,7 @@ Script_column::before_line_breaking (SCM smob)
 }
 
 void
-Script_column::order_grobs (vector<Grob*> grobs)
+Script_column::order_grobs (vector<Grob *> grobs)
 {
   Drul_array<SCM> scripts_drul (SCM_EOL, SCM_EOL);
   for (vsize i = 0; i < grobs.size (); i++)
@@ -147,40 +146,39 @@ Script_column::order_grobs (vector<Grob*> grobs)
       //  loop over all grobs in script column (already sorted by script_priority)
       for (SCM s = ss; scm_is_pair (s);
            s = scm_cdr (s), last = g, last_initial_outside_staff = initial_outside_staff)
-       {
-         g = unsmob_grob (scm_car (s));
+        {
+          g = unsmob_grob (scm_car (s));
           initial_outside_staff = g->get_property ("outside-staff-priority");
           if (last)    //not the first grob in the list
             {
-             SCM last_outside_staff = last->get_property ("outside-staff-priority");
+              SCM last_outside_staff = last->get_property ("outside-staff-priority");
               /*
                 if outside_staff_priority is missing for previous grob, just
                 use it as a support for the current grob
               */
-             if (!scm_is_number (last_outside_staff))
-               Side_position_interface::add_support (g, last);
+              if (!scm_is_number (last_outside_staff))
+                Side_position_interface::add_support (g, last);
               /*
                 if outside_staff_priority is missing or is equal to original
                 outside_staff_priority of previous grob, set new
                 outside_staff_priority to just higher than outside_staff_priority
                 of previous grob in order to preserve ordering.
               */
-              else if ((!scm_is_number (initial_outside_staff)) ||
-                       (fabs (scm_to_double (initial_outside_staff) -
-                             robust_scm2double (last_initial_outside_staff, 0)) < 0.001))
+              else if ((!scm_is_number (initial_outside_staff))
+                       || (fabs (scm_to_double (initial_outside_staff)
+                                 - robust_scm2double (last_initial_outside_staff, 0)) < 0.001))
                 g->set_property ("outside-staff-priority",
-                                    scm_from_double (
-                                       scm_to_double (last_outside_staff) + 0.1));
-           }
-       }
+                                 scm_from_double (scm_to_double (last_outside_staff) + 0.1));
+            }
+        }
     }
   while (flip (&d) != DOWN);
 }
 
 ADD_INTERFACE (Script_column,
-              "An interface that sorts scripts according to their"
-              " @code{script-priority} and @code{outside-staff-priority}.",
+               "An interface that sorts scripts according to their"
+               " @code{script-priority} and @code{outside-staff-priority}.",
 
-              /* properties */
-              ""
-              );
+               /* properties */
+               ""
+              );
index f10f29da8a12fd9a8c0ba6ffa96e526dc43f62e3..dee15b9cd14c79345021a925b4a9b6adfa752fac 100644 (file)
@@ -76,8 +76,8 @@ Script_engraver::listen_articulation (Stream_event *ev)
   int script_count = scripts_.size ();
   for (int i = 0; i < script_count; i++)
     if (ly_is_equal (scripts_[i].event_
-                    ->get_property ("articulation-type"),
-                    ev->get_property ("articulation-type")))
+                     ->get_property ("articulation-type"),
+                     ev->get_property ("articulation-type")))
       return;
 
   Script_tuple t;
@@ -92,7 +92,7 @@ copy_property (Grob *g, SCM sym, SCM alist)
     {
       SCM entry = scm_assoc (sym, alist);
       if (scm_is_pair (entry))
-       g->set_property (sym, scm_cdr (entry));
+        g->set_property (sym, scm_cdr (entry));
     }
 }
 
@@ -101,8 +101,8 @@ copy_property (Grob *g, SCM sym, SCM alist)
    ScriptStaccato , ScriptMarcato, etc. ).
 */
 void
-make_script_from_event (Grob *p,  Context *tg,
-                       SCM art_type, int index)
+make_script_from_event (Grob *p, Context *tg,
+                        SCM art_type, int index)
 {
   SCM alist = tg->get_property ("scriptDefinitions");
   SCM art = scm_assoc (art_type, alist);
@@ -126,31 +126,31 @@ make_script_from_event (Grob *p,  Context *tg,
       SCM sym = scm_caar (s);
       SCM type = scm_object_property (sym, ly_symbol2scm ("backend-type?"));
       if (!ly_is_procedure (type))
-       continue;
+        continue;
 
       SCM val = scm_cdar (s);
 
       if (sym == ly_symbol2scm ("script-priority"))
-       {
-         priority_found = true;
-         /* Make sure they're in order of user input by adding index i.
-            Don't use the direction in this priority. Smaller means closer
-            to the head.  */
-         int prio = scm_to_int (val) + index;
+        {
+          priority_found = true;
+          /* Make sure they're in order of user input by adding index i.
+             Don't use the direction in this priority. Smaller means closer
+             to the head.  */
+          int prio = scm_to_int (val) + index;
 
-         val = scm_from_int (prio);
-       }
+          val = scm_from_int (prio);
+        }
 
       SCM preset = p->get_property_data (sym);
       if (val == SCM_EOL
-         || scm_call_1 (type, preset) == SCM_BOOL_F)
-       p->set_property (sym, val);
+          || scm_call_1 (type, preset) == SCM_BOOL_F)
+        p->set_property (sym, val);
     }
 
   if (!priority_found)
     {
       p->set_property ("script-priority",
-                      scm_from_int (index));
+                       scm_from_int (index));
     }
 }
 
@@ -164,14 +164,14 @@ Script_engraver::process_music ()
       Grob *p = make_item ("Script", ev->self_scm ());
 
       make_script_from_event (p, context (),
-                             ev->get_property ("articulation-type"),
-                             i);
+                              ev->get_property ("articulation-type"),
+                              i);
 
       scripts_[i].script_ = p;
 
       SCM force_dir = ev->get_property ("direction");
       if (is_direction (force_dir) && to_dir (force_dir))
-       p->set_property ("direction", force_dir);
+        p->set_property ("direction", force_dir);
     }
 }
 
@@ -184,7 +184,7 @@ Script_engraver::acknowledge_stem (Grob_info info)
       Grob *e = scripts_[i].script_;
 
       if (to_dir (e->get_property ("side-relative-direction")))
-       e->set_object ("direction-source", info.grob ()->self_scm ());
+        e->set_object ("direction-source", info.grob ()->self_scm ());
 
       Side_position_interface::add_support (e, info.grob ());
     }
@@ -201,23 +201,22 @@ Script_engraver::acknowledge_stem_tremolo (Grob_info info)
     }
 }
 
-
 void
 Script_engraver::acknowledge_rhythmic_head (Grob_info info)
 {
   if (info.event_cause ())
     {
       for (vsize i = 0; i < scripts_.size (); i++)
-       {
-         Grob *e = scripts_[i].script_;
-
-         if (Side_position_interface::get_axis (e) == X_AXIS
-             && !e->get_parent (Y_AXIS))
-           {
-             e->set_parent (info.grob (), Y_AXIS);
-           }
-         Side_position_interface::add_support (e, info.grob ());
-       }
+        {
+          Grob *e = scripts_[i].script_;
+
+          if (Side_position_interface::get_axis (e) == X_AXIS
+              && !e->get_parent (Y_AXIS))
+            {
+              e->set_parent (info.grob (), Y_AXIS);
+            }
+          Side_position_interface::add_support (e, info.grob ());
+        }
     }
 }
 
@@ -235,8 +234,8 @@ Script_engraver::acknowledge_note_column (Grob_info info)
       Grob *e = scripts_[i].script_;
 
       if (!e->get_parent (X_AXIS)
-         && Side_position_interface::get_axis (e) == Y_AXIS)
-       e->set_parent (info.grob (), X_AXIS);
+          && Side_position_interface::get_axis (e) == Y_AXIS)
+        e->set_parent (info.grob (), X_AXIS);
     }
 }
 
@@ -252,15 +251,15 @@ ADD_ACKNOWLEDGER (Script_engraver, note_column);
 ADD_ACKNOWLEDGER (Script_engraver, stem_tremolo);
 
 ADD_TRANSLATOR (Script_engraver,
-               /* doc */
-               "Handle note scripted articulations.",
+                /* doc */
+                "Handle note scripted articulations.",
 
-               /* create */
-               "Script ",
+                /* create */
+                "Script ",
 
-               /* read */
-               "scriptDefinitions ",
+                /* read */
+                "scriptDefinitions ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index a1dfd85dc6e5afdf9fab6bb6f67555c300914f0a..c1603f95397f73f64cce92950df5455c6997922d 100644 (file)
@@ -40,9 +40,9 @@ Script_interface::get_stencil (Grob *me, Direction d)
     {
       SCM name_entry = scm_cdr (s);
       SCM str = ((scm_is_pair (name_entry)) ? index_get_cell (name_entry, d)
-                : name_entry);
+                 : name_entry);
       return Font_interface::get_default_font (me)
-       ->find_by_name ("scripts." + ly_scm2string (str));
+             ->find_by_name ("scripts." + ly_scm2string (str));
     }
   else
     assert (false);
@@ -59,7 +59,7 @@ Script_interface::calc_positioning_done (SCM smob)
     {
       Grob *stem = Note_column::get_stem (par);
       if (stem && Stem::first_head (stem))
-       me->set_parent (Stem::first_head (stem), X_AXIS);
+        me->set_parent (Stem::first_head (stem), X_AXIS);
     }
   return SCM_BOOL_T;
 }
@@ -111,7 +111,7 @@ Script_interface::calc_cross_staff (SCM smob)
   SCM avoid_slur = me->get_property ("avoid-slur");
   if (slur && to_boolean (slur->get_property ("cross-staff"))
       && (avoid_slur == ly_symbol2scm ("outside")
-         || avoid_slur == ly_symbol2scm ("around")))
+          || avoid_slur == ly_symbol2scm ("around")))
     return SCM_BOOL_T;
 
   return SCM_BOOL_F;
@@ -135,31 +135,31 @@ struct Text_script
 };
 
 ADD_INTERFACE (Text_script,
-              "An object that is put above or below a note.",
+               "An object that is put above or below a note.",
 
-              /* properties */
-              "add-stem-support "
-              "avoid-slur "
-              "script-priority "
-              "slur "
-              );
+               /* properties */
+               "add-stem-support "
+               "avoid-slur "
+               "script-priority "
+               "slur "
+              );
 
 /*
   Hmm. Where should we put add-stem-support ?
 */
 ADD_INTERFACE (Script_interface,
-              "An object that is put above or below a note.",
-
-              /* properties */
-              "add-stem-support "
-              "avoid-slur "
-              "direction-source "
-              "positioning-done "
-              "script-priority "
-              "script-stencil "
-              "side-relative-direction "
-              "slur "
-              "slur-padding "
-              "toward-stem-shift "
-              );
+               "An object that is put above or below a note.",
+
+               /* properties */
+               "add-stem-support "
+               "avoid-slur "
+               "direction-source "
+               "positioning-done "
+               "script-priority "
+               "script-stencil "
+               "side-relative-direction "
+               "slur "
+               "slur-padding "
+               "toward-stem-shift "
+              );
 
index 430c2c9dc3f1b08073024ed9486d61c68f5c1247..ccbdb7853f63fa6b56172851d1be8ecfdaf9aa8a 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2006--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
-  
+
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -27,7 +27,6 @@
 
 #include "translator.icc"
 
-
 /**
    Find potentially colliding scripts, and put them in a
    Script_row
@@ -35,8 +34,8 @@
 class Script_row_engraver : public Engraver
 {
   Grob *script_row_;
-  vector<Grob*> scripts_;
-  
+  vector<Grob *> scripts_;
+
 public:
   TRANSLATOR_DECLARATIONS (Script_row_engraver);
 protected:
@@ -57,9 +56,9 @@ Script_row_engraver::stop_translation_timestep ()
   if (script_row_)
     {
       for (vsize i = 0; i < scripts_.size (); i++)
-       if (Accidental_placement::has_interface (scripts_[i])
-           || Side_position_interface::get_axis (scripts_[i]) == X_AXIS)
-         Script_column::add_side_positioned (script_row_, scripts_[i]);
+        if (Accidental_placement::has_interface (scripts_[i])
+            || Side_position_interface::get_axis (scripts_[i]) == X_AXIS)
+          Script_column::add_side_positioned (script_row_, scripts_[i]);
     }
 
   scripts_.clear ();
@@ -73,18 +72,16 @@ Script_row_engraver::acknowledge_side_position (Grob_info inf)
   if (thing)
     {
       if (!Item::is_non_musical (thing))
-       scripts_.push_back (thing);
+        scripts_.push_back (thing);
     }
 }
 
-
 void
 Script_row_engraver::acknowledge_accidental_placement (Grob_info inf)
 {
   scripts_.push_back (inf.grob ());
 }
 
-
 void
 Script_row_engraver::process_acknowledged ()
 {
@@ -92,19 +89,18 @@ Script_row_engraver::process_acknowledged ()
     script_row_ = make_item ("ScriptRow", SCM_EOL);
 }
 
-
 ADD_ACKNOWLEDGER (Script_row_engraver, accidental_placement);
 ADD_ACKNOWLEDGER (Script_row_engraver, side_position);
 ADD_TRANSLATOR (Script_row_engraver,
-               /* doc */
-               "Determine order in horizontal side position elements.",
+                /* doc */
+                "Determine order in horizontal side position elements.",
 
-               /* create */
-               "ScriptRow ",
+                /* create */
+                "ScriptRow ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 637ce675216779368f129f97822f536b22046d65..0c7215233338ebb32c277e2af1a2c88ec154c216 100644 (file)
@@ -48,21 +48,20 @@ SCM
 Self_alignment_interface::aligned_on_self (Grob *me, Axis a, bool pure, int start, int end)
 {
   SCM sym = (a == X_AXIS) ? ly_symbol2scm ("self-alignment-X")
-    : ly_symbol2scm ("self-alignment-Y");
+            : ly_symbol2scm ("self-alignment-Y");
 
   SCM align (me->internal_get_property (sym));
   if (scm_is_number (align))
     {
       Interval ext (me->maybe_pure_extent (me, a, pure, start, end));
       if (ext.is_empty ())
-       programming_error ("cannot align on self: empty element");
+        programming_error ("cannot align on self: empty element");
       else
-       return scm_from_double (- ext.linear_combination (scm_to_double (align)));
+        return scm_from_double (- ext.linear_combination (scm_to_double (align)));
     }
   return scm_from_double (0.0);
 }
 
-
 SCM
 Self_alignment_interface::centered_on_object (Grob *him, Axis a)
 {
@@ -90,14 +89,14 @@ Self_alignment_interface::x_centered_on_y_parent (SCM smob)
   return centered_on_object (unsmob_grob (smob)->get_parent (Y_AXIS), X_AXIS);
 }
 
-MAKE_SCHEME_CALLBACK (Self_alignment_interface, aligned_on_x_parent,1);
+MAKE_SCHEME_CALLBACK (Self_alignment_interface, aligned_on_x_parent, 1);
 SCM
 Self_alignment_interface::aligned_on_x_parent (SCM smob)
 {
   return aligned_on_parent (unsmob_grob (smob), X_AXIS);
 }
 
-MAKE_SCHEME_CALLBACK (Self_alignment_interface, aligned_on_y_parent,1);
+MAKE_SCHEME_CALLBACK (Self_alignment_interface, aligned_on_y_parent, 1);
 SCM
 Self_alignment_interface::aligned_on_y_parent (SCM smob)
 {
@@ -114,7 +113,7 @@ Self_alignment_interface::aligned_on_parent (Grob *me, Axis a)
   Interval he = him->extent (him, a);
 
   SCM sym = (a == X_AXIS) ? ly_symbol2scm ("self-alignment-X")
-    : ly_symbol2scm ("self-alignment-Y");
+            : ly_symbol2scm ("self-alignment-Y");
   SCM align_prop (me->internal_get_property (sym));
 
   if (!scm_is_number (align_prop))
@@ -139,33 +138,33 @@ void
 Self_alignment_interface::set_center_parent (Grob *me, Axis a)
 {
   add_offset_callback (me,
-                      (a == X_AXIS) ? centered_on_x_parent_proc : centered_on_y_parent_proc,
-                      a);
+                       (a == X_AXIS) ? centered_on_x_parent_proc : centered_on_y_parent_proc,
+                       a);
 }
 
 void
 Self_alignment_interface::set_align_self (Grob *me, Axis a)
 {
   add_offset_callback (me,
-                      (a == X_AXIS) ? x_aligned_on_self_proc : y_aligned_on_self_proc,
-                      a);
+                       (a == X_AXIS) ? x_aligned_on_self_proc : y_aligned_on_self_proc,
+                       a);
 }
 
 ADD_INTERFACE (Self_alignment_interface,
-              "Position this object on itself and/or on its parent.  To this"
-              " end, the following functions are provided:\n"
-              "\n"
-              "@table @code\n"
-              "@item Self_alignment_interface::[xy]_aligned_on_self\n"
-              "Align self on reference point, using"
-              " @code{self-alignment-X} and @code{self-alignment-Y}."
-              "@item Self_alignment_interface::aligned_on_[xy]_parent\n"
-              "@item Self_alignment_interface::centered_on_[xy]_parent\n"
-              "Shift the object so its own reference point is centered on"
-              " the extent of the parent\n"
-              "@end table\n",
-
-              /* properties */
-              "self-alignment-X "
-              "self-alignment-Y "
-              );
+               "Position this object on itself and/or on its parent.  To this"
+               " end, the following functions are provided:\n"
+               "\n"
+               "@table @code\n"
+               "@item Self_alignment_interface::[xy]_aligned_on_self\n"
+               "Align self on reference point, using"
+               " @code{self-alignment-X} and @code{self-alignment-Y}."
+               "@item Self_alignment_interface::aligned_on_[xy]_parent\n"
+               "@item Self_alignment_interface::centered_on_[xy]_parent\n"
+               "Shift the object so its own reference point is centered on"
+               " the extent of the parent\n"
+               "@end table\n",
+
+               /* properties */
+               "self-alignment-X "
+               "self-alignment-Y "
+              );
index f31e23050a1baef803339a827440d473fda9abdb..c2910d5cd1b8772f127258dea214d338711fc979 100644 (file)
 #include "tie-formatting-problem.hh"
 #include "tie-column-format.hh"
 
-
 ADD_INTERFACE (Semi_tie_column,
-             "The interface for a column of l.v. (laissez vibrer) ties.",
-
-             /* properties */
-             "positioning-done "
-             "head-direction "
-             "tie-configuration "
-             );
-                          
+               "The interface for a column of l.v. (laissez vibrer) ties.",
 
+               /* properties */
+               "positioning-done "
+               "head-direction "
+               "tie-configuration "
+              );
 
 /*
   Cut & paste from tie-column.cc
- */   
+ */
 MAKE_SCHEME_CALLBACK (Semi_tie_column, calc_positioning_done, 1);
 SCM
 Semi_tie_column::calc_positioning_done (SCM smob)
@@ -52,17 +49,16 @@ Semi_tie_column::calc_positioning_done (SCM smob)
   Grob *me = unsmob_grob (smob);
 
   me->set_property ("positioning-done", SCM_BOOL_T);
-    
+
   extract_grob_set (me, "ties", lv_ro_ties);
-  vector<Grob*> lv_ties (lv_ro_ties);
+  vector<Grob *> lv_ties (lv_ro_ties);
 
   vector_sort (lv_ties, Semi_tie::less);
 
   Ties_configuration ties_config;
-  
 
   Tie_formatting_problem problem;
-  
+
   problem.from_semi_ties (lv_ties, to_dir (me->get_property ("head-direction")));
 
   SCM manual_configs = me->get_property ("tie-configuration");
@@ -72,17 +68,17 @@ Semi_tie_column::calc_positioning_done (SCM smob)
   for (vsize i = 0; i < lv_ties.size (); i++)
     {
       SCM cp = Tie::get_control_points (lv_ties[i], problem.common_x_refpoint (), base[i],
-                                       problem.details_);
+                                        problem.details_);
 
       lv_ties[i]->set_property ("control-points", cp);
       set_grob_direction (lv_ties[i], base[i].dir_);
 
       problem.set_debug_scoring (base);
     }
-  
+
   return SCM_BOOL_T;
 }
-  
+
 MAKE_SCHEME_CALLBACK (Semi_tie_column, calc_head_direction, 1);
 SCM
 Semi_tie_column::calc_head_direction (SCM smob)
@@ -95,10 +91,10 @@ Semi_tie_column::calc_head_direction (SCM smob)
     {
       Direction this_d = to_dir (ties[i]->get_property ("head-direction"));
       if (i > 0 && d != this_d)
-       {
-         programming_error ("all semi-ties in a semi-tie-column should have the same head-direction");
-         return scm_from_int (d);
-       }
+        {
+          programming_error ("all semi-ties in a semi-tie-column should have the same head-direction");
+          return scm_from_int (d);
+        }
       d = this_d;
     }
   return scm_from_int (d);
index 91d50a44be2fe5e0072c136e16a677514b44c0e0..10e2d43d5343e02835d462829614caf22cabd54b 100644 (file)
 #include "staff-symbol-referencer.hh"
 
 ADD_INTERFACE (Semi_tie,
-             "A tie which is only on one side connected to a note head.",
+               "A tie which is only on one side connected to a note head.",
 
-             /* properties */
-             "control-points "
-             "direction "
-             "details "
-             "head-direction "
-             "note-head "
-             "thickness "
-             );
+               /* properties */
+               "control-points "
+               "direction "
+               "details "
+               "head-direction "
+               "note-head "
+               "thickness "
+              );
 
 MAKE_SCHEME_CALLBACK (Semi_tie, calc_control_points, 1)
 SCM
@@ -44,15 +44,15 @@ Semi_tie::calc_control_points (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   (void) me->get_property ("direction");
-  
+
   if (Semi_tie_column::has_interface (me->get_parent (Y_AXIS)))
     {
       me->get_parent (Y_AXIS)->get_property ("positioning-done");
     }
   else
     {
-      programming_error ("lv tie without Semi_tie_column. Killing lv tie."); 
-      me->suicide (); 
+      programming_error ("lv tie without Semi_tie_column. Killing lv tie.");
+      me->suicide ();
     }
 
   return me->get_property_data ("control-points");
@@ -67,8 +67,8 @@ Semi_tie::get_position (Grob *me)
 
 bool
 Semi_tie::less (Grob *const &s1,
-               Grob *const &s2)
+                Grob *const &s2)
 {
   return get_position (s1) < get_position (s2);
 }
-                                
+
index 86c45fb55a0bc1fe4792f7d56d1516b147e8f668..8b40bd1644a93f087fe9f05c329f74f7867682c7 100644 (file)
@@ -35,7 +35,7 @@
 struct Spacings
 {
   Item *staff_spacing_;
-  vector<Item*> note_spacings_;
+  vector<Item *> note_spacings_;
 
   Spacings ()
   {
@@ -64,7 +64,7 @@ protected:
   void stop_translation_timestep ();
   void start_translation_timestep ();
 
-  vector<Grob*> break_aligned_;
+  vector<Grob *> break_aligned_;
 public:
   TRANSLATOR_DECLARATIONS (Separating_line_group_engraver);
 };
@@ -94,24 +94,24 @@ Separating_line_group_engraver::acknowledge_item (Grob_info i)
       context ()->set_property ("hasStaffSpacing", SCM_BOOL_T);
 
       Pointer_group_interface::add_grob (current_spacings_.staff_spacing_,
-                                        ly_symbol2scm ("left-items"),
-                                        col);
-      
+                                         ly_symbol2scm ("left-items"),
+                                         col);
+
       if (!last_spacings_.note_spacings_.size ()
-         && last_spacings_.staff_spacing_)
-       {
-         SCM ri = last_spacings_.staff_spacing_->get_object ("right-items");
-         Grob_array *ga = unsmob_grob_array (ri);
-         if (!ga)
-           {
-             SCM ga_scm = Grob_array::make_array ();
-             last_spacings_.staff_spacing_->set_object ("right-items", ga_scm);
-             ga = unsmob_grob_array (ga_scm);
-           }
-         
-         ga->clear ();
-         ga->add (col);
-       }
+          && last_spacings_.staff_spacing_)
+        {
+          SCM ri = last_spacings_.staff_spacing_->get_object ("right-items");
+          Grob_array *ga = unsmob_grob_array (ri);
+          if (!ga)
+            {
+              SCM ga_scm = Grob_array::make_array ();
+              last_spacings_.staff_spacing_->set_object ("right-items", ga_scm);
+              ga = unsmob_grob_array (ga_scm);
+            }
+
+          ga->clear ();
+          ga->add (col);
+        }
     }
 }
 
@@ -135,11 +135,11 @@ Separating_line_group_engraver::stop_translation_timestep ()
       SCM smob = break_aligned_[i]->self_scm ();
 
       if (Item *sp = current_spacings_.staff_spacing_)
-       Pointer_group_interface::add_grob (sp, ly_symbol2scm ("left-break-aligned"), smob);
+        Pointer_group_interface::add_grob (sp, ly_symbol2scm ("left-break-aligned"), smob);
 
       for (vsize j = 0; j < last_spacings_.note_spacings_.size (); j++)
-       Pointer_group_interface::add_grob (last_spacings_.note_spacings_[j],
-                                          ly_symbol2scm ("right-break-aligned"), smob);
+        Pointer_group_interface::add_grob (last_spacings_.note_spacings_[j],
+                                           ly_symbol2scm ("right-break-aligned"), smob);
     }
 
   if (!current_spacings_.is_empty ())
@@ -157,15 +157,15 @@ ADD_ACKNOWLEDGER (Separating_line_group_engraver, item);
 ADD_ACKNOWLEDGER (Separating_line_group_engraver, break_aligned);
 
 ADD_TRANSLATOR (Separating_line_group_engraver,
-               /* doc */
-               "Generate objects for computing spacing parameters.",
+                /* doc */
+                "Generate objects for computing spacing parameters.",
 
-               /* create */
-               "StaffSpacing ",
+                /* create */
+                "StaffSpacing ",
 
-               /* read */
-               "createSpacing ",
+                /* read */
+                "createSpacing ",
 
-               /* write */
-               "hasStaffSpacing "
-               );
+                /* write */
+                "hasStaffSpacing "
+               );
index 013e457034bea442ae397211d431178888f0357c..fc22dd50f2fd2fe2c8b9132262c6dd67fc2c8597 100644 (file)
@@ -46,17 +46,17 @@ Separation_item::add_conditional_item (Grob *me, Grob *e)
 Real
 Separation_item::set_distance (Item *l, Item *r, Real padding)
 {
-  Drul_array<Skyline_pair*> lines (Skyline_pair::unsmob (l->get_property ("horizontal-skylines")),
-                                  Skyline_pair::unsmob (r->get_property ("horizontal-skylines")));
+  Drul_array<Skyline_pair *> lines (Skyline_pair::unsmob (l->get_property ("horizontal-skylines")),
+                                    Skyline_pair::unsmob (r->get_property ("horizontal-skylines")));
   Skyline right = conditional_skyline (r, l);
   right.merge ((*lines[RIGHT])[LEFT]);
-  
+
   Real dist = padding + (*lines[LEFT])[RIGHT].distance (right);
   if (dist > 0)
     {
       Rod rod;
 
-      rod.item_drul_ = Drul_array<Item*> (l, r);
+      rod.item_drul_ = Drul_array<Item *> (l, r);
 
       rod.distance_ = dist;
       rod.add_to_cols ();
@@ -84,8 +84,7 @@ Separation_item::conditional_skyline (Grob *me, Grob *left)
   return Skyline (bs, horizon_padding, Y_AXIS, LEFT);
 }
 
-
-MAKE_SCHEME_CALLBACK (Separation_item, calc_skylines,1);
+MAKE_SCHEME_CALLBACK (Separation_item, calc_skylines, 1);
 SCM
 Separation_item::calc_skylines (SCM smob)
 {
@@ -109,7 +108,7 @@ Separation_item::boxes (Grob *me, Grob *left)
   Paper_column *pc = item->get_column ();
   vector<Box> out;
   extract_grob_set (me, left ? "conditional-elements" : "elements", read_only_elts);
-  vector<Grob*> elts;
+  vector<Grob *> elts;
 
   if (left)
     elts = Accidental_placement::get_relevant_accidentals (read_only_elts, left);
@@ -118,39 +117,40 @@ Separation_item::boxes (Grob *me, Grob *left)
       elts = read_only_elts;
 
       /* This is a special-case for NoteColumn: we want to include arpeggio in its
-        skyline (so spacing takes it into account) but we don't want to include it
-        in the NoteColumn's extent because some spanners (eg. Hairpin) bound themselves
-        on the NoteColumn and we don't want them to include arpeggios in their bounds.
+         skyline (so spacing takes it into account) but we don't want to include it
+         in the NoteColumn's extent because some spanners (eg. Hairpin) bound themselves
+         on the NoteColumn and we don't want them to include arpeggios in their bounds.
       */
-      if (Grob *a = Note_column::arpeggio (me)) {
-       elts.push_back (a);
-      }
+      if (Grob *a = Note_column::arpeggio (me))
+        {
+          elts.push_back (a);
+        }
     }
 
   Grob *ycommon = common_refpoint_of_array (elts, me, Y_AXIS);
-  
+
   for (vsize i = 0; i < elts.size (); i++)
     {
       Item *il = dynamic_cast<Item *> (elts[i]);
       if (pc != il->get_column ())
-       continue;
+        continue;
 
       /* ugh. We want to exclude groups of grobs (so that we insert each grob
-        individually into the skyline instead of adding a single box that
-        bounds all of them). However, we can't exclude an axis-group that
-        adds to its childrens' stencil. Currently, this is just TrillPitchGroup;
-        hence the check for note-head-interface. */
+         individually into the skyline instead of adding a single box that
+         bounds all of them). However, we can't exclude an axis-group that
+         adds to its childrens' stencil. Currently, this is just TrillPitchGroup;
+         hence the check for note-head-interface. */
       if (Axis_group_interface::has_interface (il)
-         && !Note_head::has_interface (il))
-       continue;
+          && !Note_head::has_interface (il))
+        continue;
 
       Interval y (il->pure_height (ycommon, 0, very_large));
       Interval x (il->extent (pc, X_AXIS));
 
       Interval extra_width = robust_scm2interval (elts[i]->get_property ("extra-spacing-width"),
-                                                 Interval (-0.1, 0.1));
+                                                  Interval (-0.1, 0.1));
       Interval extra_height = robust_scm2interval (elts[i]->get_property ("extra-spacing-height"),
-                                                  Interval (0.0, 0.0));
+                                                   Interval (0.0, 0.0));
 
       x[LEFT] += extra_width[LEFT];
       x[RIGHT] += extra_width[RIGHT];
@@ -158,10 +158,10 @@ Separation_item::boxes (Grob *me, Grob *left)
       y[UP] += extra_height[UP];
 
       if (!x.is_empty () && !y.is_empty ())
-       out.push_back (Box (x, y));
+        out.push_back (Box (x, y));
     }
 
-  return out;      
+  return out;
 }
 
 MAKE_SCHEME_CALLBACK (Separation_item, print, 1)
@@ -182,13 +182,13 @@ Separation_item::print (SCM smob)
 }
 
 ADD_INTERFACE (Separation_item,
-              "Item that computes widths to generate spacing rods.",
-
-              /* properties */
-              "X-extent "
-              "conditional-elements "
-              "elements "
-              "padding "
-              "horizontal-skylines "
-              "skyline-vertical-padding "
-              );
+               "Item that computes widths to generate spacing rods.",
+
+               /* properties */
+               "X-extent "
+               "conditional-elements "
+               "elements "
+               "padding "
+               "horizontal-skylines "
+               "skyline-vertical-padding "
+              );
index 84d677df00e1ce07c9ebdf8d37a18deb0b0715d3..2f0dd5187607254d8aa527aa595e60912229352b 100644 (file)
@@ -101,26 +101,26 @@ create_grace_fixup_list (SCM cursor)
       Moment l = mus->get_length () - s;
 
       if (s.grace_part_)
-       {
-         if (last != Moment (-1))
-           {
-             Grace_fixup *p = new Grace_fixup;
-             p->start_ = last;
-             p->length_ = here - last;
-             p->grace_start_ = s.grace_part_;
-             p->next_ = 0;
-             *tail = p;
-             tail = &(*tail)->next_;
-           }
-
-         here.grace_part_ = s.grace_part_;
-       }
+        {
+          if (last != Moment (-1))
+            {
+              Grace_fixup *p = new Grace_fixup;
+              p->start_ = last;
+              p->length_ = here - last;
+              p->grace_start_ = s.grace_part_;
+              p->next_ = 0;
+              *tail = p;
+              tail = &(*tail)->next_;
+            }
+
+          here.grace_part_ = s.grace_part_;
+        }
 
       if (l.to_bool ())
-       {
-         last = here;
-         here += l;
-       }
+        {
+          last = here;
+          here += l;
+        }
     }
 
   return head;
@@ -181,10 +181,10 @@ Sequential_iterator::next_element (bool)
   else
     {
       /*
-       !len.grace_part_ || len.main_part_
+        !len.grace_part_ || len.main_part_
 
-       We skip over a big chunk (mainpart != 0). Any starting graces
-       in that chunk should be in len.grace_part_
+        We skip over a big chunk (mainpart != 0). Any starting graces
+        in that chunk should be in len.grace_part_
 
       */
       last_mom_ = here_mom_;
@@ -207,28 +207,28 @@ Sequential_iterator::process (Moment until)
     {
       Grace_fixup *gf = get_grace_fixup ();
       if (gf
-         && gf->start_ + gf->length_
-         + Moment (Rational (0), gf->grace_start_) == until)
-       {
-         /*
-           do the stuff/note/rest preceding a grace.
-         */
-         iter_->process (iter_->music_get_length ());
-       }
+          && gf->start_ + gf->length_
+          + Moment (Rational (0), gf->grace_start_) == until)
+        {
+          /*
+            do the stuff/note/rest preceding a grace.
+          */
+          iter_->process (iter_->music_get_length ());
+        }
       else
-       {
-         Moment w = until - here_mom_ + iter_->music_start_mom ();
-         iter_->process (w);
-       }
+        {
+          Moment w = until - here_mom_ + iter_->music_start_mom ();
+          iter_->process (w);
+        }
 
       /*
-       if the iter is still OK, there must be events left that have
+        if the iter is still OK, there must be events left that have
 
-       TIME > LEFT
+        TIME > LEFT
 
       */
       if (iter_->ok ())
-       return;
+        return;
 
       descend_to_child (iter_->get_outlet ());
       next_element (true);
index 9e8c71f6e6f05d0402533417062f0543a0e5eb30..5befccfccb9c97ac1200fa23838761e5e2b93df8 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "side-position-interface.hh"
 
-#include <cmath>               // ceil.
+#include <cmath>                // ceil.
 #include <algorithm>
 
 using namespace std;
@@ -52,9 +52,9 @@ Side_position_interface::add_support (Grob *me, Grob *e)
 */
 SCM
 Side_position_interface::general_side_position (Grob *me, Axis a, bool use_extents,
-                                               bool include_my_extent,
-                                               bool pure, int start, int end,
-                                               Real *current_offset)
+                                                bool include_my_extent,
+                                                bool pure, int start, int end,
+                                                Real *current_offset)
 {
   Real ss = Staff_symbol_referencer::staff_space (me);
 
@@ -62,11 +62,11 @@ Side_position_interface::general_side_position (Grob *me, Axis a, bool use_exten
 
   Grob *common = common_refpoint_of_array (support, me->get_parent (a), a);
   Grob *staff_symbol = Staff_symbol_referencer::get_staff_symbol (me);
-  bool include_staff =
-    staff_symbol
-    && a == Y_AXIS
-    && scm_is_number (me->get_property ("staff-padding"))
-    && !to_boolean (me->get_property ("quantize-position"));
+  bool include_staff
+    staff_symbol
+      && a == Y_AXIS
+      && scm_is_number (me->get_property ("staff-padding"))
+      && !to_boolean (me->get_property ("quantize-position"));
 
   Interval dim;
   Interval staff_extents;
@@ -76,7 +76,7 @@ Side_position_interface::general_side_position (Grob *me, Axis a, bool use_exten
       staff_extents = staff_symbol->maybe_pure_extent (common, Y_AXIS, pure, start, end);
 
       if (include_staff)
-       dim.unite (staff_extents);
+        dim.unite (staff_extents);
     }
 
   Direction dir = get_grob_direction (me);
@@ -89,20 +89,20 @@ Side_position_interface::general_side_position (Grob *me, Axis a, bool use_exten
       // ignoring the stem solves cyclic dependencies if the stem is
       // attached to a cross-staff beam.
       if (a == Y_AXIS
-         && Stem::has_interface (e)
-         && dir == - get_grob_direction (e))
-       continue;
+          && Stem::has_interface (e)
+          && dir == - get_grob_direction (e))
+        continue;
 
       if (e)
-       {
-         if (use_extents)
-           dim.unite (e->maybe_pure_extent (common, a, pure, start, end));
-         else
-           {
-             Real x = e->maybe_pure_coordinate (common, a, pure, start, end);
-             dim.unite (Interval (x, x));
-           }
-       }
+        {
+          if (use_extents)
+            dim.unite (e->maybe_pure_extent (common, a, pure, start, end));
+          else
+            {
+              Real x = e->maybe_pure_coordinate (common, a, pure, start, end);
+              dim.unite (Interval (x, x));
+            }
+        }
     }
 
   if (dim.is_empty ())
@@ -123,37 +123,35 @@ Side_position_interface::general_side_position (Grob *me, Axis a, bool use_exten
     {
       Interval iv = me->maybe_pure_extent (me, a, pure, start, end);
       if (!iv.is_empty ())
-       {
-         if (!dir)
-           {
-             programming_error ("direction unknown, but aligned-side wanted");
-             dir = DOWN;
-           }
-         total_off += -iv[-dir];
-       }
+        {
+          if (!dir)
+            {
+              programming_error ("direction unknown, but aligned-side wanted");
+              dir = DOWN;
+            }
+          total_off += -iv[-dir];
+        }
     }
 
   if (current_offset)
     total_off = dir * max (dir * total_off,
-                          dir * (*current_offset));
-
+                           dir * (*current_offset));
 
   /* FIXME: 1000 should relate to paper size.  */
   if (fabs (total_off) > 1000)
     {
       string msg
-       = String_convert::form_string ("Improbable offset for grob %s: %f",
-                                      me->name ().c_str (), total_off);
+        = String_convert::form_string ("Improbable offset for grob %s: %f",
+                                       me->name ().c_str (), total_off);
 
       programming_error (msg);
       if (strict_infinity_checking)
-       scm_misc_error (__FUNCTION__, "Improbable offset.", SCM_EOL);
+        scm_misc_error (__FUNCTION__, "Improbable offset.", SCM_EOL);
     }
 
   return scm_from_double (total_off);
 }
 
-
 MAKE_SCHEME_CALLBACK (Side_position_interface, y_aligned_on_support_refpoints, 1);
 SCM
 Side_position_interface::y_aligned_on_support_refpoints (SCM smob)
@@ -166,10 +164,9 @@ SCM
 Side_position_interface::pure_y_aligned_on_support_refpoints (SCM smob, SCM start, SCM end)
 {
   return general_side_position (unsmob_grob (smob), Y_AXIS, false, false,
-                               true, scm_to_int (start), scm_to_int (end), 0);
+                                true, scm_to_int (start), scm_to_int (end), 0);
 }
 
-
 /*
   Position next to support, taking into account my own dimensions and padding.
 */
@@ -187,7 +184,6 @@ axis_aligned_side_helper (SCM smob, Axis a, bool pure, int start, int end, SCM c
   return Side_position_interface::aligned_side (unsmob_grob (smob), a, pure, start, end, current_off_ptr);
 }
 
-
 MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Side_position_interface, x_aligned_side, 2, 1, "");
 SCM
 Side_position_interface::x_aligned_side (SCM smob, SCM current_off)
@@ -207,9 +203,9 @@ SCM
 Side_position_interface::pure_y_aligned_side (SCM smob, SCM start, SCM end, SCM cur_off)
 {
   return axis_aligned_side_helper (smob, Y_AXIS, true,
-                                  scm_to_int (start),
-                                  scm_to_int (end),
-                                  cur_off);
+                                   scm_to_int (start),
+                                   scm_to_int (end),
+                                   cur_off);
 }
 
 MAKE_SCHEME_CALLBACK (Side_position_interface, calc_cross_staff, 1)
@@ -229,7 +225,7 @@ Side_position_interface::calc_cross_staff (SCM smob)
 
 SCM
 Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, int end,
-                                      Real *current_off)
+                                       Real *current_off)
 {
   Direction dir = get_grob_direction (me);
 
@@ -244,33 +240,33 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
   if (staff && a == Y_AXIS)
     {
       if (to_boolean (me->get_property ("quantize-position")))
-       {
-         Grob *common = me->common_refpoint (staff, Y_AXIS);
-         Real my_off = me->get_parent (Y_AXIS)->maybe_pure_coordinate (common, Y_AXIS, pure, start, end);
-         Real staff_off = staff->maybe_pure_coordinate (common, Y_AXIS, pure, start, end);
-         Real ss = Staff_symbol::staff_space (staff);
-         Real position = 2 * (my_off + o - staff_off) / ss;
-         Real rounded = directed_round (position, dir);
-         Grob *head = me->get_parent (X_AXIS);
-
-         if (fabs (position) <= 2 * Staff_symbol_referencer::staff_radius (me) + 1
-             /* In case of a ledger lines, quantize even if we're outside the staff. */
-             || (Note_head::has_interface (head)
-
-                 && abs (Staff_symbol_referencer::get_position (head)) > abs (position)))
-           {
-             o += (rounded - position) * 0.5 * ss;
-             if (Staff_symbol_referencer::on_line (me, int (rounded)))
-               o += dir * 0.5 * ss;
-           }
-       }
+        {
+          Grob *common = me->common_refpoint (staff, Y_AXIS);
+          Real my_off = me->get_parent (Y_AXIS)->maybe_pure_coordinate (common, Y_AXIS, pure, start, end);
+          Real staff_off = staff->maybe_pure_coordinate (common, Y_AXIS, pure, start, end);
+          Real ss = Staff_symbol::staff_space (staff);
+          Real position = 2 * (my_off + o - staff_off) / ss;
+          Real rounded = directed_round (position, dir);
+          Grob *head = me->get_parent (X_AXIS);
+
+          if (fabs (position) <= 2 * Staff_symbol_referencer::staff_radius (me) + 1
+              /* In case of a ledger lines, quantize even if we're outside the staff. */
+              || (Note_head::has_interface (head)
+
+                  && abs (Staff_symbol_referencer::get_position (head)) > abs (position)))
+            {
+              o += (rounded - position) * 0.5 * ss;
+              if (Staff_symbol_referencer::on_line (me, int (rounded)))
+                o += dir * 0.5 * ss;
+            }
+        }
       else if (scm_is_number (me->get_property ("staff-padding")) && dir)
-       {
-         Interval iv = me->maybe_pure_extent (me, a, pure, start, end);
+        {
+          Interval iv = me->maybe_pure_extent (me, a, pure, start, end);
 
-         Real staff_padding
-           = Staff_symbol_referencer::staff_space (me)
-           * scm_to_double (me->get_property ("staff-padding"));
+          Real staff_padding
+            = Staff_symbol_referencer::staff_space (me)
+              * scm_to_double (me->get_property ("staff-padding"));
 
           Grob *parent = me->get_parent (Y_AXIS);
           Grob *common = me->common_refpoint (staff, Y_AXIS);
@@ -281,7 +277,7 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
                        - dir * (o + iv[-dir])
                        + dir * (staff_position - parent_position));
           o += dir * max (diff, 0.0);
-       }
+        }
     }
   return scm_from_double (o);
 }
@@ -293,10 +289,10 @@ Side_position_interface::set_axis (Grob *me, Axis a)
     {
       me->set_property ("side-axis", scm_from_int (a));
       chain_offset_callback (me,
-                            (a==X_AXIS)
-                            ? x_aligned_side_proc
-                            : y_aligned_side_proc,
-                            a);
+                             (a == X_AXIS)
+                             ? x_aligned_side_proc
+                             : y_aligned_side_proc,
+                             a);
     }
 }
 
@@ -307,7 +303,7 @@ Side_position_interface::get_axis (Grob *me)
     return Axis (scm_to_int (me->get_property ("side-axis")));
 
   string msg = String_convert::form_string ("side-axis not set for grob %s.",
-                                           me->name ().c_str ());
+                                            me->name ().c_str ());
   me->programming_error (msg);
   return NO_AXES;
 }
@@ -317,7 +313,7 @@ SCM
 Side_position_interface::move_to_extremal_staff (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
-  System *sys = dynamic_cast<System*> (me->get_system ());
+  System *sys = dynamic_cast<System *> (me->get_system ());
   Direction dir = get_grob_direction (me);
   if (dir != DOWN)
     dir = UP;
@@ -344,36 +340,35 @@ Side_position_interface::move_to_extremal_staff (SCM smob)
   Grob_array *ga = unsmob_grob_array (me->get_object ("side-support-elements"));
   if (ga)
     {
-      vector<Grob*> const& elts = ga->array ();
-      vector<Grob*> new_elts;
+      vector<Grob *> const &elts = ga->array ();
+      vector<Grob *> new_elts;
       for (vsize i = 0; i < elts.size (); ++i)
-       {
-         if (me->common_refpoint (elts[i], Y_AXIS) == top_staff)
-           new_elts.push_back (elts[i]);
-       }
+        {
+          if (me->common_refpoint (elts[i], Y_AXIS) == top_staff)
+            new_elts.push_back (elts[i]);
+        }
       ga->set_array (new_elts);
     }
   return SCM_BOOL_T;
 }
 
-
 ADD_INTERFACE (Side_position_interface,
-              "Position a victim object (this one) next to other objects"
-              " (the support).  The property @code{direction} signifies where"
-              " to put the victim object relative to the support (left or"
-              " right, up or down?)\n"
-              "\n"
-              "The routine also takes the size of the staff into account if"
-              " @code{staff-padding} is set.  If undefined, the staff symbol"
-              " is ignored.",
-
-              /* properties */
-              "direction "
-              "minimum-space "
-              "padding "
-              "quantize-position "
-              "side-axis "
-              "side-support-elements "
-              "slur-padding "
-              "staff-padding "
-              );
+               "Position a victim object (this one) next to other objects"
+               " (the support).  The property @code{direction} signifies where"
+               " to put the victim object relative to the support (left or"
+               " right, up or down?)\n"
+               "\n"
+               "The routine also takes the size of the staff into account if"
+               " @code{staff-padding} is set.  If undefined, the staff symbol"
+               " is ignored.",
+
+               /* properties */
+               "direction "
+               "minimum-space "
+               "padding "
+               "quantize-position "
+               "side-axis "
+               "side-support-elements "
+               "slur-padding "
+               "staff-padding "
+              );
index 7c46c0198b728fbbdd83c7cd226f43885def37e7..6f82f11f563ff85e16580b69d6c9a3099a53eb46 100644 (file)
@@ -33,7 +33,7 @@ SCM
 simple_closure_expression (SCM smob)
 {
   assert (is_simple_closure (smob));
-  return (SCM) SCM_CELL_WORD_1(smob);
+  return (SCM) SCM_CELL_WORD_1 (smob);
 }
 
 SCM
@@ -44,33 +44,33 @@ evaluate_args (SCM delayed_argument, SCM args, bool pure, int start, int end)
   for (SCM s = args; scm_is_pair (s); s = scm_cdr (s))
     {
       *tail = scm_cons (evaluate_with_simple_closure (delayed_argument, scm_car (s),
-                                                     pure, start, end),
-                       SCM_EOL);
+                                                      pure, start, end),
+                        SCM_EOL);
       if (scm_car (*tail) == SCM_UNSPECIFIED)
-       return SCM_UNSPECIFIED;
+        return SCM_UNSPECIFIED;
       tail = SCM_CDRLOC (*tail);
     }
-  
+
   return new_args;
 }
 
 SCM
 evaluate_with_simple_closure (SCM delayed_argument,
-                             SCM expr,
-                             bool pure,
-                             int start,
-                             int end)
+                              SCM expr,
+                              bool pure,
+                              int start,
+                              int end)
 {
   if (is_simple_closure (expr))
     {
       SCM inside = simple_closure_expression (expr);
       SCM args = scm_cons (delayed_argument,
-                          evaluate_args (delayed_argument, scm_cdr (inside),
-                                         pure, start, end));
+                           evaluate_args (delayed_argument, scm_cdr (inside),
+                                          pure, start, end));
       if (scm_cdr (args) == SCM_UNSPECIFIED)
-       return SCM_UNSPECIFIED;
+        return SCM_UNSPECIFIED;
       if (pure)
-       return call_pure_function (scm_car (inside), args, start, end);
+        return call_pure_function (scm_car (inside), args, start, end);
       return scm_apply_0 (scm_car (inside), args);
     }
   else if (!scm_is_pair (expr))
@@ -81,32 +81,32 @@ evaluate_with_simple_closure (SCM delayed_argument,
     {
       SCM args = evaluate_args (delayed_argument, scm_cdr (expr), pure, start, end);
       if (args == SCM_UNSPECIFIED)
-       return SCM_UNSPECIFIED;
+        return SCM_UNSPECIFIED;
       if (pure)
-       return call_pure_function (scm_car (expr), args, start, end);
+        return call_pure_function (scm_car (expr), args, start, end);
       return scm_apply_0 (scm_car (expr), args);
     }
   else
-    // ugh. deviation from standard. Should print error? 
-    return evaluate_args (delayed_argument, scm_cdr (expr), pure, start, end); 
-  
+    // ugh. deviation from standard. Should print error?
+    return evaluate_args (delayed_argument, scm_cdr (expr), pure, start, end);
+
   assert (false);
   return SCM_EOL;
 }
 
 LY_DEFINE (ly_simple_closure_p, "ly:simple-closure?",
-         1, 0, 0, (SCM clos),
-         "Is @var{clos} a simple closure?")
+           1, 0, 0, (SCM clos),
+           "Is @var{clos} a simple closure?")
 {
   return scm_from_bool (is_simple_closure (clos));
 }
 
 LY_DEFINE (ly_make_simple_closure, "ly:make-simple-closure",
-         1, 0, 0, (SCM expr),
-         "Make a simple closure.  @var{expr} should be form of"
-         " @code{(@var{func} @var{a1} @var{a2} @dots{})}, and will be"
-         " invoked as @code{(@var{func} @var{delayed-arg} @var{a1}"
-         " @var{a2} @dots{})}.")
+           1, 0, 0, (SCM expr),
+           "Make a simple closure.  @var{expr} should be form of"
+           " @code{(@var{func} @var{a1} @var{a2} @dots{})}, and will be"
+           " invoked as @code{(@var{func} @var{delayed-arg} @var{a1}"
+           " @var{a2} @dots{})}.")
 {
   SCM z;
 
@@ -115,10 +115,10 @@ LY_DEFINE (ly_make_simple_closure, "ly:make-simple-closure",
 }
 
 LY_DEFINE (ly_eval_simple_closure, "ly:eval-simple-closure",
-         2, 2, 0, (SCM delayed, SCM closure, SCM scm_start, SCM scm_end),
-         "Evaluate a simple @var{closure} with the given @var{delayed}"
-         " argument.  If @var{scm-start} and @var{scm-end} are defined,"
-         " evaluate it purely with those start and end points.")
+           2, 2, 0, (SCM delayed, SCM closure, SCM scm_start, SCM scm_end),
+           "Evaluate a simple @var{closure} with the given @var{delayed}"
+           " argument.  If @var{scm-start} and @var{scm-end} are defined,"
+           " evaluate it purely with those start and end points.")
 {
   bool pure = (scm_is_number (scm_start) && scm_is_number (scm_end));
   int start = robust_scm2int (scm_start, 0);
@@ -126,7 +126,7 @@ LY_DEFINE (ly_eval_simple_closure, "ly:eval-simple-closure",
   SCM expr = simple_closure_expression (closure);
   return evaluate_with_simple_closure (delayed, expr, pure, start, end);
 }
+
 int
 print_simple_closure (SCM s, SCM port, scm_print_state *)
 {
@@ -136,7 +136,6 @@ print_simple_closure (SCM s, SCM port, scm_print_state *)
   return 1;
 }
 
-
 void init_simple_closure ()
 {
   simple_closure_tag = scm_make_smob_type ("simple-closure", 0);
@@ -144,6 +143,4 @@ void init_simple_closure ()
   scm_set_smob_print (simple_closure_tag, print_simple_closure);
 };
 
-
-
 ADD_SCM_INIT_FUNC (simple_closure, init_simple_closure);
index 3df7d2f7dddb41c60ce1a4d501f44ff6d36c93b3..2456e966110710dcdbe9456ba76783bed2043edb 100644 (file)
 #include "simple-spacer.hh"
 
 LY_DEFINE (ly_solve_spring_rod_problem, "ly:solve-spring-rod-problem",
-          4, 1, 0, (SCM springs, SCM rods, SCM length, SCM ragged),
-          "Solve a spring and rod problem for @var{count} objects, that"
-          " are connected by @var{count}-1 @var{springs}, and an arbitrary"
-          " number of @var{rods}.  @var{count} is implicitly given by"
-          " @var{springs} and @var{rods}.  The @var{springs} argument has"
-          " the format @code{(ideal, inverse_hook)} and @var{rods} is of"
-          " the form @code{(idx1, idx2, distance)}.\n"
-          "\n"
-          "@var{length} is a number, @var{ragged} a boolean.\n"
-          "\n"
-          "The function returns a list containing the force (positive for"
-          " stretching, negative for compressing and @code{#f} for"
-          " non-satisfied constraints) followed by @var{spring-count}+1"
-          " positions of the objects.")
+           4, 1, 0, (SCM springs, SCM rods, SCM length, SCM ragged),
+           "Solve a spring and rod problem for @var{count} objects, that"
+           " are connected by @var{count}-1 @var{springs}, and an arbitrary"
+           " number of @var{rods}.  @var{count} is implicitly given by"
+           " @var{springs} and @var{rods}.  The @var{springs} argument has"
+           " the format @code{(ideal, inverse_hook)} and @var{rods} is of"
+           " the form @code{(idx1, idx2, distance)}.\n"
+           "\n"
+           "@var{length} is a number, @var{ragged} a boolean.\n"
+           "\n"
+           "The function returns a list containing the force (positive for"
+           " stretching, negative for compressing and @code{#f} for"
+           " non-satisfied constraints) followed by @var{spring-count}+1"
+           " positions of the objects.")
 {
   int len = scm_ilength (springs);
   if (len == 0)
     return scm_list_2 (scm_from_double (0.0), scm_from_double (0.0));
 
   SCM_ASSERT_TYPE (len >= 0, springs, SCM_ARG1, __FUNCTION__, "list of springs");
-  SCM_ASSERT_TYPE (scm_ilength (rods)  > 0, rods, SCM_ARG1, __FUNCTION__, "list of rods");
+  SCM_ASSERT_TYPE (scm_ilength (rods) > 0, rods, SCM_ARG1, __FUNCTION__, "list of rods");
   LY_ASSERT_TYPE (scm_is_number, length, 3);
 
   bool is_ragged = ragged == SCM_BOOL_T;
index 4376b0133c2d47942884acb8cce9686311ff8db3..4644ad7c4b952a98b7d17c567b7eae321ef09c45 100644 (file)
@@ -25,7 +25,7 @@
 #include "column-x-positions.hh"
 #include "dimensions.hh"
 #include "international.hh"
-#include "libc-extension.hh"   // isinf
+#include "libc-extension.hh"    // isinf
 #include "paper-column.hh"
 #include "simple-spacer.hh"
 #include "spaceable-grob.hh"
@@ -115,13 +115,13 @@ Simple_spacer::add_rod (int l, int r, Real dist)
     {
       Real spring_dist = range_ideal_len (l, r);
       if (spring_dist < dist)
-       for (int i = l; i < r; i++)
-         {
-           if (spring_dist)
-             springs_[i].set_distance (springs_[i].distance () * dist / spring_dist);
-           else
-             springs_[i].set_distance (dist / (r - l));
-         }
+        for (int i = l; i < r; i++)
+          {
+            if (spring_dist)
+              springs_[i].set_distance (springs_[i].distance () * dist / spring_dist);
+            else
+              springs_[i].set_distance (dist / (r - l));
+          }
 
       return;
     }
@@ -145,7 +145,7 @@ Simple_spacer::range_stiffness (int l, int r, bool stretch) const
   Real den = 0.0;
   for (int i = l; i < r; i++)
     den += stretch ? springs_[i].inverse_stretch_strength ()
-      : springs_[i].inverse_compress_strength ();
+           : springs_[i].inverse_compress_strength ();
 
   return 1 / den;
 }
@@ -183,7 +183,7 @@ Simple_spacer::expand_line ()
   double cur_len = configuration_length (force_);
 
   fits_ = true;
-  for (vsize i=0; i < springs_.size (); i++)
+  for (vsize i = 0; i < springs_.size (); i++)
     inv_hooke += springs_[i].inverse_stretch_strength ();
 
   if (inv_hooke == 0.0) /* avoid division by zero. If springs are infinitely stiff */
@@ -221,31 +221,31 @@ Simple_spacer::compress_line ()
   /* inv_hooke is the total flexibility of currently-active springs */
   double inv_hooke = 0;
   vsize i = sorted_springs.size ();
-  for ( ; i && sorted_springs[i - 1].blocking_force () < cur_force; i--)
+  for (; i && sorted_springs[i - 1].blocking_force () < cur_force; i--)
     inv_hooke += compressed
-      ? sorted_springs[i - 1].inverse_compress_strength ()
-      : sorted_springs[i - 1].inverse_stretch_strength ();
+                 ? sorted_springs[i - 1].inverse_compress_strength ()
+                 : sorted_springs[i - 1].inverse_stretch_strength ();
   /* i now indexes the first active spring, so */
-  for ( ; i < sorted_springs.size (); i++)
+  for (; i < sorted_springs.size (); i++)
     {
       Spring sp = sorted_springs[i];
 
       if (isinf (sp.blocking_force ()))
-       break;
+        break;
 
       double block_dist = (cur_force - sp.blocking_force ()) * inv_hooke;
       if (cur_len - block_dist < line_len_)
-       {
-         cur_force += (line_len_ - cur_len) / inv_hooke;
-         cur_len = line_len_;
-
-         /*
-           Paranoia check.
-         */
-         assert (fabs (configuration_length (cur_force) - cur_len) < 1e-6);
-         return cur_force;
-       }
-      
+        {
+          cur_force += (line_len_ - cur_len) / inv_hooke;
+          cur_len = line_len_;
+
+          /*
+            Paranoia check.
+          */
+          assert (fabs (configuration_length (cur_force) - cur_len) < 1e-6);
+          return cur_force;
+        }
+
       cur_len -= block_dist;
       inv_hooke -= compressed ? sp.inverse_compress_strength () : sp.inverse_stretch_strength ();
       cur_force = sp.blocking_force ();
@@ -284,7 +284,7 @@ Simple_spacer::force_penalty (bool ragged) const
 
   /* Use a convex compression penalty. */
   Real f = force_;
-  return f - (f < 0 ? f*f*f*f*2 : 0);
+  return f - (f < 0 ? f * f * f * f * 2 : 0);
 }
 
 /****************************************************************/
@@ -294,7 +294,7 @@ struct Rod_description
   vsize r_;
   Real dist_;
 
-  bool operator< (const Rod_description r)
+  bool operator < (const Rod_description r)
   {
     return r_ < r.r_;
   }
@@ -334,26 +334,26 @@ is_loose (Grob *g)
   return (scm_is_pair (g->get_object ("between-cols")));
 }
 
-static Grob*
+static Grob *
 maybe_find_prebroken_piece (Grob *g, Direction d)
 {
-  Grob *ret = dynamic_cast<Item*> (g)->find_prebroken_piece (d);
+  Grob *ret = dynamic_cast<Item *> (g)->find_prebroken_piece (d);
   if (ret)
     return ret;
   return g;
 }
 
-static Grob*
-next_spaceable_column (vector<Grob*> const &list, vsize starting)
+static Grob *
+next_spaceable_column (vector<Grob *> const &list, vsize starting)
 {
-  for (vsize i = starting+1; i < list.size (); i++)
+  for (vsize i = starting + 1; i < list.size (); i++)
     if (!is_loose (list[i]))
       return list[i];
   return 0;
 }
 
 static Column_description
-get_column_description (vector<Grob*> const &cols, vsize col_index, bool line_starter)
+get_column_description (vector<Grob *> const &cols, vsize col_index, bool line_starter)
 {
   Grob *col = cols[col_index];
   if (line_starter)
@@ -364,7 +364,7 @@ get_column_description (vector<Grob*> const &cols, vsize col_index, bool line_st
   if (next_col)
     description.spring_ = Spaceable_grob::get_spring (col, next_col);
 
-  Grob *end_col = dynamic_cast<Item*> (cols[col_index+1])->find_prebroken_piece (LEFT);
+  Grob *end_col = dynamic_cast<Item *> (cols[col_index + 1])->find_prebroken_piece (LEFT);
   if (end_col)
     description.end_spring_ = Spaceable_grob::get_spring (col, end_col);
 
@@ -374,14 +374,14 @@ get_column_description (vector<Grob*> const &cols, vsize col_index, bool line_st
       Grob *other = unsmob_grob (scm_caar (s));
       vsize j = binary_search (cols, other, Paper_column::less_than, col_index);
       if (j != VPOS)
-       {
-         if (cols[j] == other)
-           description.rods_.push_back (Rod_description (j, scm_to_double (scm_cdar (s))));
-         else /* it must end at the LEFT prebroken_piece */
-           description.end_rods_.push_back (Rod_description (j, scm_to_double (scm_cdar (s))));
-       }
+        {
+          if (cols[j] == other)
+            description.rods_.push_back (Rod_description (j, scm_to_double (scm_cdar (s))));
+          else /* it must end at the LEFT prebroken_piece */
+            description.end_rods_.push_back (Rod_description (j, scm_to_double (scm_cdar (s))));
+        }
     }
-  
+
   if (!line_starter && to_boolean (col->get_property ("keep-inside-line")))
     description.keep_inside_line_ = col->extent (col, X_AXIS);
 
@@ -390,12 +390,12 @@ get_column_description (vector<Grob*> const &cols, vsize col_index, bool line_st
 }
 
 vector<Real>
-get_line_forces (vector<Grob*> const &columns,
-                Real line_len, Real indent, bool ragged)
+get_line_forces (vector<Grob *> const &columns,
+                 Real line_len, Real indent, bool ragged)
 {
   vector<vsize> breaks;
   vector<Real> force;
-  vector<Grob*> non_loose;
+  vector<Grob *> non_loose;
   vector<Column_description> cols;
   SCM force_break = ly_symbol2scm ("force");
 
@@ -409,7 +409,7 @@ get_line_forces (vector<Grob*> const &columns,
   for (vsize i = 1; i + 1 < non_loose.size (); i++)
     {
       if (Paper_column::is_breakable (non_loose[i]))
-       breaks.push_back (cols.size ());
+        breaks.push_back (cols.size ());
 
       cols.push_back (get_column_description (non_loose, i, false));
     }
@@ -421,67 +421,66 @@ get_line_forces (vector<Grob*> const &columns,
       cols[breaks[b]] = get_column_description (non_loose, breaks[b], true);
       vsize st = breaks[b];
 
-      for (vsize c = b+1; c < breaks.size (); c++)
-       {
-         vsize end = breaks[c];
-         Simple_spacer spacer;
-
-         for (vsize i = breaks[b]; i < end - 1; i++)
-           spacer.add_spring (cols[i].spring_);
-         spacer.add_spring (cols[end-1].end_spring_);
-
-
-         for (vsize i = breaks[b]; i < end; i++)
-           {
-             for (vsize r = 0; r < cols[i].rods_.size (); r++)
-               if (cols[i].rods_[r].r_ < end)
-                 spacer.add_rod (i - st, cols[i].rods_[r].r_ - st, cols[i].rods_[r].dist_);
-             for (vsize r = 0; r < cols[i].end_rods_.size (); r++)
-               if (cols[i].end_rods_[r].r_ == end)
-                 spacer.add_rod (i - st, end - st, cols[i].end_rods_[r].dist_);
-             if (!cols[i].keep_inside_line_.is_empty ())
-               {
-                 spacer.add_rod (i - st, end - st, cols[i].keep_inside_line_[RIGHT]);
-                 spacer.add_rod (0, i - st, -cols[i].keep_inside_line_[LEFT]);
-               }
-           }
-         spacer.solve ((b == 0) ? line_len - indent : line_len, ragged);
-         force[b * breaks.size () + c] = spacer.force_penalty (ragged);
-
-         if (!spacer.fits ())
-           {
-             if (c == b + 1)
-               force[b * breaks.size () + c] = -200000;
-             else
-               force[b * breaks.size () + c] = infinity_f;
-             break;
-           }
-         if (end < cols.size () && cols[end].break_permission_ == force_break)
-           break;
-       }
+      for (vsize c = b + 1; c < breaks.size (); c++)
+        {
+          vsize end = breaks[c];
+          Simple_spacer spacer;
+
+          for (vsize i = breaks[b]; i < end - 1; i++)
+            spacer.add_spring (cols[i].spring_);
+          spacer.add_spring (cols[end - 1].end_spring_);
+
+          for (vsize i = breaks[b]; i < end; i++)
+            {
+              for (vsize r = 0; r < cols[i].rods_.size (); r++)
+                if (cols[i].rods_[r].r_ < end)
+                  spacer.add_rod (i - st, cols[i].rods_[r].r_ - st, cols[i].rods_[r].dist_);
+              for (vsize r = 0; r < cols[i].end_rods_.size (); r++)
+                if (cols[i].end_rods_[r].r_ == end)
+                  spacer.add_rod (i - st, end - st, cols[i].end_rods_[r].dist_);
+              if (!cols[i].keep_inside_line_.is_empty ())
+                {
+                  spacer.add_rod (i - st, end - st, cols[i].keep_inside_line_[RIGHT]);
+                  spacer.add_rod (0, i - st, -cols[i].keep_inside_line_[LEFT]);
+                }
+            }
+          spacer.solve ((b == 0) ? line_len - indent : line_len, ragged);
+          force[b * breaks.size () + c] = spacer.force_penalty (ragged);
+
+          if (!spacer.fits ())
+            {
+              if (c == b + 1)
+                force[b * breaks.size () + c] = -200000;
+              else
+                force[b * breaks.size () + c] = infinity_f;
+              break;
+            }
+          if (end < cols.size () && cols[end].break_permission_ == force_break)
+            break;
+        }
     }
   return force;
 }
 
 Column_x_positions
-get_line_configuration (vector<Grob*> const &columns,
-                       Real line_len,
-                       Real indent,
-                       bool ragged)
+get_line_configuration (vector<Grob *> const &columns,
+                        Real line_len,
+                        Real indent,
+                        bool ragged)
 {
   vector<Column_description> cols;
   Simple_spacer spacer;
   Column_x_positions ret;
 
-  ret.cols_.push_back (dynamic_cast<Item*> (columns[0])->find_prebroken_piece (RIGHT));
+  ret.cols_.push_back (dynamic_cast<Item *> (columns[0])->find_prebroken_piece (RIGHT));
   for (vsize i = 1; i + 1 < columns.size (); i++)
     {
       if (is_loose (columns[i]))
-       ret.loose_cols_.push_back (columns[i]);
+        ret.loose_cols_.push_back (columns[i]);
       else
-       ret.cols_.push_back (columns[i]);
+        ret.cols_.push_back (columns[i]);
     }
-  ret.cols_.push_back (dynamic_cast<Item*> (columns.back ())->find_prebroken_piece (LEFT));
+  ret.cols_.push_back (dynamic_cast<Item *> (columns.back ())->find_prebroken_piece (LEFT));
 
   /* since we've already put our line-ending column in the column list, we can ignore
      the end_XXX_ fields of our column_description */
@@ -493,13 +492,13 @@ get_line_configuration (vector<Grob*> const &columns,
   for (vsize i = 0; i < cols.size (); i++)
     {
       for (vsize r = 0; r < cols[i].rods_.size (); r++)
-       spacer.add_rod (i, cols[i].rods_[r].r_, cols[i].rods_[r].dist_);
+        spacer.add_rod (i, cols[i].rods_[r].r_, cols[i].rods_[r].dist_);
 
       if (!cols[i].keep_inside_line_.is_empty ())
-       {
-         spacer.add_rod (i, cols.size (), cols[i].keep_inside_line_[RIGHT]);
-         spacer.add_rod (0, i, -cols[i].keep_inside_line_[LEFT]);
-       }
+        {
+          spacer.add_rod (i, cols.size (), cols[i].keep_inside_line_[RIGHT]);
+          spacer.add_rod (0, i, -cols[i].keep_inside_line_[LEFT]);
+        }
     }
 
   spacer.solve (line_len, ragged);
@@ -518,9 +517,28 @@ get_line_configuration (vector<Grob*> const &columns,
     {
       SCM p = ret.cols_[i]->get_property ("line-break-permission");
       if (p == ly_symbol2scm ("force"))
-       ret.satisfies_constraints_ = false;
+        ret.satisfies_constraints_ = false;
     }
 
   return ret;
 }
 
+
+#include "ly-smobs.icc"
+
+IMPLEMENT_SIMPLE_SMOBS (Simple_spacer);
+IMPLEMENT_DEFAULT_EQUAL_P (Simple_spacer);
+
+SCM
+Simple_spacer::mark_smob (SCM /* x */)
+{
+  return SCM_EOL;
+}
+
+int
+Simple_spacer::print_smob (SCM /* x */, SCM p, scm_print_state *)
+{
+  scm_puts ("#<Simple spacer>", p);
+  return 1;
+}
+
index 3723c2695fe238ecf31a8d2f00e35df621e8d7e5..36e0fb817e8a56a9d5fe69a142b8d7a17ff29068 100644 (file)
@@ -59,26 +59,26 @@ Simultaneous_music_iterator::construct_children ()
       Music_iterator *mi = unsmob_iterator (scm_iter);
 
       /* if create_separate_contexts_ is set, create a new context with the
-        number number as name */
+         number number as name */
 
       SCM name = ly_symbol2scm (get_outlet ()->context_name ().c_str ());
       Context *c = (j && create_separate_contexts_)
-       ? get_outlet ()->find_create_context (name, to_string (j), SCM_EOL)
-       : get_outlet ();
+                   ? get_outlet ()->find_create_context (name, to_string (j), SCM_EOL)
+                   : get_outlet ();
 
       if (!c)
-       c = get_outlet ();
+        c = get_outlet ();
 
       mi->init_context (mus, c);
       mi->construct_children ();
 
       if (mi->ok ())
-       {
-         *tail = scm_cons (scm_iter, *tail);
-         tail = SCM_CDRLOC (*tail);
-       }
+        {
+          *tail = scm_cons (scm_iter, *tail);
+          tail = SCM_CDRLOC (*tail);
+        }
       else
-       mi->quit ();
+        mi->quit ();
     }
 }
 
@@ -90,15 +90,15 @@ Simultaneous_music_iterator::process (Moment until)
     {
       Music_iterator *i = unsmob_iterator (scm_car (*proc));
       if (i->run_always ()
-         || i->pending_moment () == until)
-       i->process (until);
+          || i->pending_moment () == until)
+        i->process (until);
       if (!i->ok ())
-       {
-         i->quit ();
-         *proc = scm_cdr (*proc);
-       }
+        {
+          i->quit ();
+          *proc = scm_cdr (*proc);
+        }
       else
-       proc = SCM_CDRLOC (*proc);
+        proc = SCM_CDRLOC (*proc);
     }
 }
 
@@ -125,9 +125,9 @@ Simultaneous_music_iterator::ok () const
     {
       Music_iterator *it = unsmob_iterator (scm_car (s));
       if (!it->run_always ())
-       return true;
+        return true;
       else
-       run_always_ok = run_always_ok || it->ok ();
+        run_always_ok = run_always_ok || it->ok ();
     }
   return run_always_ok;
 }
@@ -139,7 +139,7 @@ Simultaneous_music_iterator::run_always () const
     {
       Music_iterator *it = unsmob_iterator (scm_car (s));
       if (it->run_always ())
-       return true;
+        return true;
     }
   return false;
 }
index 2f7ea73575a7e70347de237308d1c44a3e25a20c..2a3b26ff9e81a0512268b639c2a236d547fdcf70 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2008--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
-  
+
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -79,21 +79,20 @@ Skyline_pair::print_points () const
   skylines_[DOWN].print ();
 }
 
-
 bool
 Skyline_pair::is_empty () const
 {
   return skylines_[UP].is_empty ()
-    && skylines_[DOWN].is_empty ();
+         && skylines_[DOWN].is_empty ();
 }
 
-Skyline&
+Skyline &
 Skyline_pair::operator [] (Direction d)
 {
   return skylines_[d];
 }
 
-Skyline const&
+Skyline const &
 Skyline_pair::operator [] (Direction d) const
 {
   return skylines_[d];
index fe30291f78812d90aa07494414972639241aaef4..b5288e2526816ac5a002f37f4426aff6b3b0c5f2 100644 (file)
@@ -78,8 +78,8 @@ Skyline::print_points () const
   vector<Offset> ps (to_points (X_AXIS));
 
   for (vsize i = 0; i < ps.size (); i++)
-    printf ("(%f,%f)%s" , ps[i][X_AXIS], ps[i][Y_AXIS],
-           (i%2)==1 ? "\n" : " ");
+    printf ("(%f,%f)%s", ps[i][X_AXIS], ps[i][Y_AXIS],
+            (i % 2) == 1 ? "\n" : " ");
 }
 
 Building::Building (Real start, Real start_height, Real end_height, Real end)
@@ -122,7 +122,7 @@ Building::precompute (Real start, Real start_height, Real end_height, Real end)
 Real
 Building::height (Real x) const
 {
-  return isinf (x) ? y_intercept_ : slope_*x + y_intercept_;
+  return isinf (x) ? y_intercept_ : slope_ * x + y_intercept_;
 }
 
 void
@@ -168,15 +168,15 @@ first_intersection (Building const &b, list<Building> *const s, Real start_x)
     {
       Building c = s->front ();
       if (c.conceals (b, start_x))
-       return start_x;
+        return start_x;
 
       Real i = b.intersection_x (c);
       if (i > start_x && i <= b.end_ && i <= c.end_)
-       return i;
+        return i;
 
       start_x = c.end_;
       if (b.end_ > c.end_)
-       s->pop_front ();
+        s->pop_front ();
     }
   return b.end_;
 }
@@ -190,12 +190,12 @@ Building::conceals (Building const &other, Real x) const
   /* their slopes were not equal, so there is an intersection point */
   Real i = intersection_x (other);
   return (i <= x && slope_ > other.slope_)
-    || (i > x && slope_ < other.slope_);
+         || (i > x && slope_ < other.slope_);
 }
 
 void
 Skyline::internal_merge_skyline (list<Building> *s1, list<Building> *s2,
-                                list<Building> *const result)
+                                 list<Building> *const result)
 {
   if (s1->empty () || s2->empty ())
     {
@@ -207,26 +207,26 @@ Skyline::internal_merge_skyline (list<Building> *s1, list<Building> *s2,
   while (!s1->empty ())
     {
       if (s2->front ().conceals (s1->front (), x))
-       swap (s1, s2);
+        swap (s1, s2);
 
       Building b = s1->front ();
       Real end = first_intersection (b, s2, x);
 
       if (s2->empty ())
-       {
-         result->push_front (b);
-         break;
-       }
+        {
+          result->push_front (b);
+          break;
+        }
 
       /* only include buildings wider than epsilon */
       if (end > x + EPS)
-       {
-         b.leading_part (end);
-         result->push_front (b);
-       }
+        {
+          b.leading_part (end);
+          result->push_front (b);
+        }
 
       if (end >= s1->front ().end_)
-       s1->pop_front ();
+        s1->pop_front ();
 
       x = end;
     }
@@ -249,7 +249,7 @@ single_skyline (Building b, Real start, Real horizon_padding, list<Building> *co
   bool sloped_neighbours = horizon_padding > 0 && !isinf (start) && !isinf (b.end_);
   if (!isinf (b.end_))
     ret->push_front (Building (b.end_ + horizon_padding, -infinity_f,
-                              -infinity_f, infinity_f));
+                               -infinity_f, infinity_f));
   if (sloped_neighbours)
     ret->push_front (b.sloped_neighbour (start, horizon_padding, RIGHT));
 
@@ -261,7 +261,7 @@ single_skyline (Building b, Real start, Real horizon_padding, list<Building> *co
 
   if (!isinf (start))
     ret->push_front (Building (-infinity_f, -infinity_f,
-                              -infinity_f, start - horizon_padding));
+                               -infinity_f, start - horizon_padding));
 }
 
 /* remove a non-overlapping set of boxes from BOXES and build a skyline
@@ -277,21 +277,21 @@ non_overlapping_skyline (list<Box> *const boxes, Real horizon_padding, Axis hori
       Interval iv = (*i)[horizon_axis];
 
       if (iv[LEFT] - horizon_padding < last_end)
-       {
-         i++;
-         continue;
-       }
+        {
+          i++;
+          continue;
+        }
 
       if (iv[LEFT] - horizon_padding > last_end + EPS)
-       result.push_front (Building (last_end, -infinity_f, -infinity_f, iv[LEFT] - 2*horizon_padding));
+        result.push_front (Building (last_end, -infinity_f, -infinity_f, iv[LEFT] - 2 * horizon_padding));
 
       Building b (*i, horizon_padding, horizon_axis, sky);
       bool sloped_neighbours = horizon_padding > 0 && !isinf (iv.length ());
       if (sloped_neighbours)
-       result.push_front (b.sloped_neighbour (iv[LEFT] - horizon_padding, horizon_padding, LEFT));
+        result.push_front (b.sloped_neighbour (iv[LEFT] - horizon_padding, horizon_padding, LEFT));
       result.push_front (b);
       if (sloped_neighbours)
-       result.push_front (b.sloped_neighbour (iv[LEFT] - horizon_padding, horizon_padding, RIGHT));
+        result.push_front (b.sloped_neighbour (iv[LEFT] - horizon_padding, horizon_padding, RIGHT));
 
       list<Box>::iterator j = i++;
       boxes->erase (j);
@@ -313,7 +313,7 @@ public:
     a_ = a;
   }
 
-  bool operator() (Box const &b1, Box const &b2)
+  bool operator () (Box const &b1, Box const &b2)
   {
     return b1[a_][LEFT] < b2[a_][LEFT];
   }
@@ -334,8 +334,8 @@ Skyline::internal_build_skyline (list<Box> *boxes, Real horizon_padding, Axis ho
     {
       list<Building> result;
       single_skyline (Building (boxes->front (), horizon_padding, horizon_axis, sky),
-                     boxes->front ()[horizon_axis][LEFT] - horizon_padding,
-                     horizon_padding, &result);
+                      boxes->front ()[horizon_axis][LEFT] - horizon_padding,
+                      horizon_padding, &result);
       return result;
     }
 
@@ -352,7 +352,7 @@ Skyline::internal_build_skyline (list<Box> *boxes, Real horizon_padding, Axis ho
       list<Building> one = partials.front ();
       partials.pop_front ();
       if (partials.empty ())
-       return one;
+        return one;
 
       list<Building> two = partials.front ();
       partials.pop_front ();
@@ -407,17 +407,16 @@ Skyline::Skyline (Skyline const &src, Real horizon_padding, Axis a)
 
   // establish a baseline box
   boxes.push_back (Box (Interval (-infinity_f, infinity_f),
-                       Interval (0, 0)));
+                        Interval (0, 0)));
   list<Building>::const_iterator end = src.buildings_.end ();
-  for (list<Building>::const_iterator i = src.buildings_.begin (); i != end; start=i->end_, i++ )
+  for (list<Building>::const_iterator i = src.buildings_.begin (); i != end; start = i->end_, i++)
     if ((i->slope_ == 0) && !isinf (i->y_intercept_))
       boxes.push_back (Box (Interval (start, i->end_),
-                           Interval (-infinity_f , i->y_intercept_)));
+                            Interval (-infinity_f, i->y_intercept_)));
   buildings_ = internal_build_skyline (&boxes, horizon_padding, X_AXIS, UP);
   sky_ = src.sky_;
 }
 
-
 /*
   build skyline from a set of boxes. If horizon_padding > 0, expand all the boxes
   by that amount and add 45-degree sloped boxes to the edges of each box (of
@@ -438,7 +437,7 @@ Skyline::Skyline (vector<Box> const &boxes, Real horizon_padding, Axis horizon_a
       Interval iv = boxes[i][horizon_axis];
       iv.widen (horizon_padding);
       if (iv.length () > EPS && !boxes[i][vert_axis].is_empty ())
-       filtered_boxes.push_front (boxes[i]);
+        filtered_boxes.push_front (boxes[i]);
     }
 
   buildings_ = internal_build_skyline (&filtered_boxes, horizon_padding, horizon_axis, sky);
@@ -449,7 +448,7 @@ Skyline::Skyline (Box const &b, Real horizon_padding, Axis horizon_axis, Directi
   sky_ = sky;
   Building front (b, horizon_padding, horizon_axis, sky);
   single_skyline (front, b[horizon_axis][LEFT] - horizon_padding,
-                 horizon_padding, &buildings_);
+                  horizon_padding, &buildings_);
 }
 
 void
@@ -484,7 +483,7 @@ Skyline::insert (Box const &b, Real horizon_padding, Axis a)
 
   my_bld.splice (my_bld.begin (), buildings_);
   single_skyline (Building (b, horizon_padding, a, sky_), b[a][LEFT] - horizon_padding,
-                 horizon_padding, &other_bld);
+                  horizon_padding, &other_bld);
   internal_merge_skyline (&other_bld, &my_bld, &buildings_);
 }
 
@@ -539,9 +538,9 @@ Skyline::distance (Skyline const &other, Real horizon_padding) const
       Real end_dist = i->height (end) + j->height (end);
       dist = max (dist, max (start_dist, end_dist));
       if (i->end_ <= j->end_)
-       i++;
+        i++;
       else
-       j++;
+        j++;
       start = end;
     }
   return dist;
@@ -556,7 +555,7 @@ Skyline::height (Real airplane) const
   for (i = buildings_.begin (); i != buildings_.end (); i++)
     {
       if (i->end_ >= airplane)
-       return sky_ * i->height (airplane);
+        return sky_ * i->height (airplane);
     }
 
   assert (0);
@@ -579,7 +578,6 @@ Skyline::set_minimum_height (Real h)
   merge (s);
 }
 
-
 vector<Offset>
 Skyline::to_points (Axis horizon_axis) const
 {
@@ -617,7 +615,6 @@ Skyline::clear ()
 
 /****************************************************************/
 
-
 IMPLEMENT_SIMPLE_SMOBS (Skyline);
 IMPLEMENT_TYPE_P (Skyline, "ly:skyline?");
 IMPLEMENT_DEFAULT_EQUAL_P (Skyline);
index 0db3ceffb3c334a7ba1ba5fd57f162e0151ae46f..4f974fe7c6ec35a32daaa83744795eee8993e72b 100644 (file)
@@ -48,7 +48,7 @@ IMPLEMENT_TRANSLATOR_LISTENER (Slash_repeat_engraver, repeat_slash);
 void
 Slash_repeat_engraver::listen_repeat_slash (Stream_event *ev)
 {
-    ASSIGN_EVENT_ONCE (slash_, ev);
+  ASSIGN_EVENT_ONCE (slash_, ev);
 }
 
 void
@@ -58,24 +58,24 @@ Slash_repeat_engraver::process_music ()
     {
       SCM count = slash_->get_property ("slash-count");
       if (scm_to_int (count) == 0)
-       make_item ("DoubleRepeatSlash", slash_->self_scm ());
+        make_item ("DoubleRepeatSlash", slash_->self_scm ());
       else
-       make_item ("RepeatSlash", slash_->self_scm ());
+        make_item ("RepeatSlash", slash_->self_scm ());
       slash_ = 0;
     }
 }
 
 ADD_TRANSLATOR (Slash_repeat_engraver,
-               /* doc */
-               "Make beat repeats.",
+                /* doc */
+                "Make beat repeats.",
 
-               /* create */
-               "DoubleRepeatSlash "
-               "RepeatSlash ",
+                /* create */
+                "DoubleRepeatSlash "
+                "RepeatSlash ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index e83856364db6dbb3a4f2e111915d5a55f44fafdf..8fdea86edb73b0a1fb4829e0a4fcf39932828a8f 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "slur-configuration.hh"
 
-
 #include "item.hh"
 #include "libc-extension.hh"
 #include "misc.hh"
@@ -33,7 +32,7 @@
 
 Bezier
 avoid_staff_line (Slur_score_state const &state,
-                 Bezier bez)
+                  Bezier bez)
 {
   Offset horiz (1, 0);
   vector<Real> ts = bez.solve_derivative (horiz);
@@ -48,34 +47,34 @@ avoid_staff_line (Slur_score_state const &state,
       Grob *staff = state.extremes_[LEFT].staff_;
 
       Real p = 2 * (y - staff->relative_coordinate (state.common_[Y_AXIS], Y_AXIS))
-       / state.staff_space_;
+               / state.staff_space_;
 
-      Real distance = fabs (my_round (p) - p); //  in halfspaces
+      Real distance = fabs (my_round (p) - p);  //  in halfspaces
       if (distance < 4 * state.thickness_
-         && (int) fabs (my_round (p))
-         <= 2 * Staff_symbol_referencer::staff_radius (staff) + 0.1
-         && (int (fabs (my_round (p))) % 2
-             != Staff_symbol_referencer::line_count (staff) % 2))
-       {
-         Direction resolution_dir
-           = (distance ? state.dir_ : Direction (sign (p - my_round (p))));
-
-         // TODO: parameter
-         Real newp = my_round (p) + resolution_dir
-           * 5 * state.thickness_;
-
-         Real dy = (newp - p) * state.staff_space_ / 2.0;
-
-         bez.control_[1][Y_AXIS] += dy;
-         bez.control_[2][Y_AXIS] += dy;
-       }
+          && (int) fabs (my_round (p))
+          <= 2 * Staff_symbol_referencer::staff_radius (staff) + 0.1
+          && (int (fabs (my_round (p))) % 2
+              != Staff_symbol_referencer::line_count (staff) % 2))
+        {
+          Direction resolution_dir
+            = (distance ? state.dir_ : Direction (sign (p - my_round (p))));
+
+          // TODO: parameter
+          Real newp = my_round (p) + resolution_dir
+                      * 5 * state.thickness_;
+
+          Real dy = (newp - p) * state.staff_space_ / 2.0;
+
+          bez.control_[1][Y_AXIS] += dy;
+          bez.control_[2][Y_AXIS] += dy;
+        }
     }
   return bez;
 }
 
 Real
 fit_factor (Offset dz_unit, Offset dz_perp,
-           Bezier curve, Direction d, vector<Offset> const &avoid)
+            Bezier curve, Direction d, vector<Offset> const &avoid)
 {
   Real fit_factor = 0.0;
   Offset x0 = curve.control_[0];
@@ -91,27 +90,27 @@ fit_factor (Offset dz_unit, Offset dz_perp,
     {
       Offset z = (avoid[i] - x0);
       Offset p (dot_product (z, dz_unit),
-               d * dot_product (z, dz_perp));
+                d * dot_product (z, dz_perp));
 
       Real eps = 0.01;
-      Interval pext = eps * Interval (-1,1) + p[X_AXIS];
+      Interval pext = eps * Interval (-1, 1) + p[X_AXIS];
       pext.intersect (curve_xext);
       if (pext.is_empty () || pext.length () <= 1.999 * eps)
-       continue;
+        continue;
 
       Real y = curve.get_other_coordinate (X_AXIS, p[X_AXIS]);
       if (y)
-       fit_factor = max (fit_factor, (p[Y_AXIS] / y));
+        fit_factor = max (fit_factor, (p[Y_AXIS] / y));
     }
   return fit_factor;
 }
 
 void
 Slur_configuration::generate_curve (Slur_score_state const &state,
-                                   Real r_0, Real h_inf,
-                                   vector<Offset> const &avoid)
+                                    Real r_0, Real h_inf,
+                                    vector<Offset> const &avoid)
 {
-  Offset dz = attachment_[RIGHT]- attachment_[LEFT];;
+  Offset dz = attachment_[RIGHT] - attachment_[LEFT];;
   Offset dz_unit = dz;
   dz_unit *= 1 / dz.length ();
   Offset dz_perp = dz_unit * Offset (0, 1);
@@ -155,9 +154,9 @@ Slur_configuration::generate_curve (Slur_score_state const &state,
   Bezier curve;
   curve.control_[0] = attachment_[LEFT];
   curve.control_[1] = attachment_[LEFT] + dz_perp * height * state.dir_
-    + dz_unit * x1;
+                      + dz_unit * x1;
   curve.control_[2] = attachment_[RIGHT] + dz_perp * height * state.dir_
-    + dz_unit * x2;
+                      + dz_unit * x2;
   curve.control_[3] = attachment_[RIGHT];
 
   Real ff = fit_factor (dz_unit, dz_perp, curve, state.dir_, avoid);
@@ -166,9 +165,9 @@ Slur_configuration::generate_curve (Slur_score_state const &state,
 
   curve.control_[0] = attachment_[LEFT];
   curve.control_[1] = attachment_[LEFT] + dz_perp * height * state.dir_
-    + dz_unit * x1;
+                      + dz_unit * x1;
   curve.control_[2] = attachment_[RIGHT] + dz_perp * height * state.dir_
-    + dz_unit * x2;
+                      + dz_unit * x2;
   curve.control_[3] = attachment_[RIGHT];
 
   curve_ = avoid_staff_line (state, curve);
@@ -189,11 +188,11 @@ Slur_configuration::add_score (Real s, string desc)
       programming_error ("Negative demerits found for slur. Ignoring");
       s = 0.0;
     }
-  
+
   if (s)
     {
       if (score_card_.length () > 0)
-       score_card_ += ", ";
+        score_card_ += ", ";
       score_card_ += to_string ("%s=%.2f", desc.c_str (), s);
       score_ += s;
     }
@@ -219,100 +218,100 @@ Slur_configuration::score_encompass (Slur_score_state const &state)
       bool edge = l_edge || r_edge;
 
       if (! (x < attachment_[RIGHT][X_AXIS]
-            && x > attachment_[LEFT][X_AXIS]))
-       continue;
+             && x > attachment_[LEFT][X_AXIS]))
+        continue;
 
       Real y = bez.get_other_coordinate (X_AXIS, x);
       if (!edge)
-       {
-         Real head_dy = (y - state.encompass_infos_[j].head_);
-         if (state.dir_ * head_dy < 0)
-           {
-             demerit += state.parameters_.head_encompass_penalty_;
-             convex_head_distances.push_back (0.0);
-           }
-         else
-           {
-             Real hd = (head_dy)
-               ? (1 / fabs (head_dy) - 1 / state.parameters_.free_head_distance_)
-               : state.parameters_.head_encompass_penalty_;
-             hd = min (max (hd, 0.0), state.parameters_.head_encompass_penalty_);
-
-             demerit += hd;
-           }
-
-         Real line_y = linear_interpolate (x,
-                                           attachment_[RIGHT][X_AXIS],
-                                           attachment_[LEFT][X_AXIS],
-                                           attachment_[RIGHT][Y_AXIS],
-                                           attachment_[LEFT][Y_AXIS]);
-
-         if (1) // state.dir_ * state.encompass_infos_[j].get_point (state.dir_) > state.dir_ *line_y )
-           {
-
-             Real closest
-               = state.dir_ * max (state.dir_ * state.encompass_infos_[j].get_point (state.dir_), state.dir_ * line_y);
-             Real d = fabs (closest - y);
-
-             convex_head_distances.push_back (d);
-           }
-       }
+        {
+          Real head_dy = (y - state.encompass_infos_[j].head_);
+          if (state.dir_ * head_dy < 0)
+            {
+              demerit += state.parameters_.head_encompass_penalty_;
+              convex_head_distances.push_back (0.0);
+            }
+          else
+            {
+              Real hd = (head_dy)
+                        ? (1 / fabs (head_dy) - 1 / state.parameters_.free_head_distance_)
+                        : state.parameters_.head_encompass_penalty_;
+              hd = min (max (hd, 0.0), state.parameters_.head_encompass_penalty_);
+
+              demerit += hd;
+            }
+
+          Real line_y = linear_interpolate (x,
+                                            attachment_[RIGHT][X_AXIS],
+                                            attachment_[LEFT][X_AXIS],
+                                            attachment_[RIGHT][Y_AXIS],
+                                            attachment_[LEFT][Y_AXIS]);
+
+          if (1) // state.dir_ * state.encompass_infos_[j].get_point (state.dir_) > state.dir_ *line_y )
+            {
+
+              Real closest
+                = state.dir_ * max (state.dir_ * state.encompass_infos_[j].get_point (state.dir_), state.dir_ * line_y);
+              Real d = fabs (closest - y);
+
+              convex_head_distances.push_back (d);
+            }
+        }
 
       if (state.dir_ * (y - state.encompass_infos_[j].stem_) < 0)
-       {
-         Real stem_dem = state.parameters_.stem_encompass_penalty_;
-         if ((l_edge && state.dir_ == UP)
-             || (r_edge && state.dir_ == DOWN))
-           stem_dem /= 5;
-
-         demerit += stem_dem;
-       }
+        {
+          Real stem_dem = state.parameters_.stem_encompass_penalty_;
+          if ((l_edge && state.dir_ == UP)
+              || (r_edge && state.dir_ == DOWN))
+            stem_dem /= 5;
+
+          demerit += stem_dem;
+        }
       else if (!edge)
-       {
-         Interval ext;
-         ext.add_point (state.encompass_infos_[j].stem_);
-         ext.add_point (state.encompass_infos_[j].head_);
-
-         // ?
-         demerit += -state.parameters_.closeness_factor_
-           * min (state.dir_
-                  * (y - (ext[state.dir_] + state.dir_ * state.parameters_.free_head_distance_)), 0.0)
-           / state.encompass_infos_.size ();
-       }
+        {
+          Interval ext;
+          ext.add_point (state.encompass_infos_[j].stem_);
+          ext.add_point (state.encompass_infos_[j].head_);
+
+          // ?
+          demerit += -state.parameters_.closeness_factor_
+                     * min (state.dir_
+                            * (y - (ext[state.dir_] + state.dir_ * state.parameters_.free_head_distance_)), 0.0)
+                     / state.encompass_infos_.size ();
+        }
     }
   add_score (demerit, "encompass");
-  
+
   if (convex_head_distances.size ())
     {
       Real avg_distance = 0.0;
       Real min_dist = infinity_f;
       for (vsize j = 0; j < convex_head_distances.size (); j++)
-       {
-         min_dist = min (min_dist, convex_head_distances[j]);
-         avg_distance += convex_head_distances[j];
-       }
+        {
+          min_dist = min (min_dist, convex_head_distances[j]);
+          avg_distance += convex_head_distances[j];
+        }
 
       /*
-       For slurs over 3 or 4 heads, the average distance is not a
-       good normalizer.
+        For slurs over 3 or 4 heads, the average distance is not a
+        good normalizer.
       */
       Real n = convex_head_distances.size ();
       if (n <= 2)
-       {
-         Real fact = 1.0;
-         avg_distance += height_ * fact;
-         n += fact;
-       }
+        {
+          Real fact = 1.0;
+          avg_distance += height_ * fact;
+          n += fact;
+        }
 
       /*
-       TODO: maybe it's better to use (avgdist - mindist)*factor
-       as penalty.
+        TODO: maybe it's better to use (avgdist - mindist)*factor
+        as penalty.
       */
       avg_distance /= n;
       Real variance_penalty = state.parameters_.head_slur_distance_max_ratio_;
       if (min_dist > 0.0)
-       variance_penalty
-         = min ((avg_distance / (min_dist + state.parameters_.absolute_closeness_measure_) - 1.0), variance_penalty);
+        variance_penalty
+          = min ((avg_distance / (min_dist + state.parameters_.absolute_closeness_measure_) - 1.0), variance_penalty);
 
       variance_penalty = max (variance_penalty, 0.0);
       variance_penalty *= state.parameters_.head_slur_distance_factor_;
@@ -328,69 +327,69 @@ Slur_configuration::score_extra_encompass (Slur_score_state const &state)
     {
       Drul_array<Offset> attachment = attachment_;
       Extra_collision_info const &info (state.extra_encompass_infos_[j]);
-      
+
       Interval slur_wid (attachment[LEFT][X_AXIS], attachment[RIGHT][X_AXIS]);
 
       /*
-       to prevent numerical inaccuracies in
-       Bezier::get_other_coordinate ().
+        to prevent numerical inaccuracies in
+        Bezier::get_other_coordinate ().
       */
       Direction d = LEFT;
       bool found = false;
       Real y = 0.0;
 
       do
-       {
-         /*
-           We need to check for the bound explicitly, since the
-           slur-ending can be almost vertical, making the Y
-           coordinate a bad approximation of the object-slur
-           distance.
-         */
-         Item *as_item = dynamic_cast<Item *> (state.extra_encompass_infos_[j].grob_);
-         if (!as_item)
-           continue;
-         
-         Interval item_x = as_item->extent (state.common_[X_AXIS], X_AXIS);
-         item_x.intersect (state.extremes_[d].slur_head_x_extent_);
-         if (!item_x.is_empty ())
-           {
-             y = attachment[d][Y_AXIS];
-             found = true;
-           }
-             
-       }
+        {
+          /*
+            We need to check for the bound explicitly, since the
+            slur-ending can be almost vertical, making the Y
+            coordinate a bad approximation of the object-slur
+            distance.
+          */
+          Item *as_item = dynamic_cast<Item *> (state.extra_encompass_infos_[j].grob_);
+          if (!as_item)
+            continue;
+
+          Interval item_x = as_item->extent (state.common_[X_AXIS], X_AXIS);
+          item_x.intersect (state.extremes_[d].slur_head_x_extent_);
+          if (!item_x.is_empty ())
+            {
+              y = attachment[d][Y_AXIS];
+              found = true;
+            }
+
+        }
       while (flip (&d) != LEFT);
 
       if (!found)
-       {
-         Real x = info.extents_[X_AXIS].linear_combination (info.idx_);
+        {
+          Real x = info.extents_[X_AXIS].linear_combination (info.idx_);
 
-         if (!slur_wid.contains (x))
-           continue;
+          if (!slur_wid.contains (x))
+            continue;
 
-         y = curve_.get_other_coordinate (X_AXIS, x);
-       }
+          y = curve_.get_other_coordinate (X_AXIS, x);
+        }
 
       Real dist = 0.0;
       if (info.type_ == ly_symbol2scm ("around"))
-       dist = info.extents_[Y_AXIS].distance (y);
+        dist = info.extents_[Y_AXIS].distance (y);
 
       /*
-       Have to score too: the curve enumeration is limited in its
-       shape, and may produce curves which collide anyway.
+        Have to score too: the curve enumeration is limited in its
+        shape, and may produce curves which collide anyway.
        */
       else if (info.type_ == ly_symbol2scm ("inside"))
-       dist = state.dir_ * (y - info.extents_[Y_AXIS][state.dir_]);
+        dist = state.dir_ * (y - info.extents_[Y_AXIS][state.dir_]);
       else
-       programming_error ("unknown avoidance type");
+        programming_error ("unknown avoidance type");
 
       dist = max (dist, 0.0);
-      
+
       Real penalty = info.penalty_ * peak_around (0.1 * state.parameters_.extra_encompass_free_distance_,
-                                                 state.parameters_.extra_encompass_free_distance_,
-                                                 dist);
-      
+                                                  state.parameters_.extra_encompass_free_distance_,
+                                                  dist);
+
       add_score (penalty, "extra");
     }
 }
@@ -400,7 +399,7 @@ Slur_configuration::score_edges (Slur_score_state const &state)
 {
   Direction d = LEFT;
   Offset dz = attachment_[RIGHT]
-    - attachment_[LEFT];
+              - attachment_[LEFT];
   Real slope = dz[Y_AXIS] / dz[X_AXIS];
   do
     {
@@ -410,14 +409,13 @@ Slur_configuration::score_edges (Slur_score_state const &state)
       Real factor = state.parameters_.edge_attraction_factor_;
       Real demerit = factor * dy;
       if (state.extremes_[d].stem_
-         && state.extremes_[d].stem_dir_ == state.dir_
+          && state.extremes_[d].stem_dir_ == state.dir_
           // TODO - Stem::get_beaming() should be precomputed.
-         && !Stem::get_beaming (state.extremes_[d].stem_, -d))
-       demerit /= 5;
+          && !Stem::get_beaming (state.extremes_[d].stem_, -d))
+        demerit /= 5;
 
       demerit *= exp (state.dir_ * d * slope
-                     * state.parameters_.edge_slope_exponent_);
-
+                      * state.parameters_.edge_slope_exponent_);
 
       string dir_str = d == LEFT ? "L" : "R";
       add_score (demerit, dir_str + " edge");
@@ -434,8 +432,8 @@ Slur_configuration::score_slopes (Slur_score_state const &state)
   Real demerit = 0.0;
 
   demerit += max ((fabs (slur_dy / slur_dz[X_AXIS])
-                  - state.parameters_.max_slope_), 0.0)
-    * state.parameters_.max_slope_factor_;
+                   - state.parameters_.max_slope_), 0.0)
+             * state.parameters_.max_slope_factor_;
 
   /* 0.2: account for staffline offset. */
   Real max_dy = (fabs (dy) + 0.2);
@@ -444,11 +442,11 @@ Slur_configuration::score_slopes (Slur_score_state const &state)
 
   if (!state.is_broken_)
     demerit += state.parameters_.steeper_slope_factor_
-      * (max (fabs (slur_dy) -max_dy, 0.0));
+               * (max (fabs (slur_dy) - max_dy, 0.0));
 
   demerit += max ((fabs (slur_dy / slur_dz[X_AXIS])
-                  - state.parameters_.max_slope_), 0.0)
-    * state.parameters_.max_slope_factor_;
+                   - state.parameters_.max_slope_), 0.0)
+             * state.parameters_.max_slope_factor_;
 
   if (sign (dy) == 0
       && sign (slur_dy) != 0
@@ -460,41 +458,42 @@ Slur_configuration::score_slopes (Slur_score_state const &state)
       && sign (slur_dy)
       && sign (slur_dy) != sign (dy))
     demerit += state.edge_has_beams_
-      ? state.parameters_.same_slope_penalty_ / 10
-      : state.parameters_.same_slope_penalty_;
+               ? state.parameters_.same_slope_penalty_ / 10
+               : state.parameters_.same_slope_penalty_;
 
   add_score (demerit, "slope");
 }
 
-
 // This is a temporary hack to see how much we can gain by using a
 // priority queue on the beams to score.
 static int score_count = 0;
 LY_DEFINE (ly_slur_score_count, "ly:slur-score-count", 0, 0, 0,
-          (),
-          "count number of slur scores.") {
+           (),
+           "count number of slur scores.")
+{
   return scm_from_int (score_count);
 }
 
 void
 Slur_configuration::run_next_scorer (Slur_score_state const &state)
 {
-  switch (next_scorer_todo) {
-  case EXTRA_ENCOMPASS:
-    score_extra_encompass (state);
-    break;
-  case SLOPE:
-    score_slopes (state);
-    break;
-  case EDGES:
-    score_edges (state);
-    break;
-  case ENCOMPASS:
-    score_encompass (state);
-    break;
-  default:
-    assert (false);
-  }
+  switch (next_scorer_todo)
+    {
+    case EXTRA_ENCOMPASS:
+      score_extra_encompass (state);
+      break;
+    case SLOPE:
+      score_slopes (state);
+      break;
+    case EDGES:
+      score_edges (state);
+      break;
+    case ENCOMPASS:
+      score_encompass (state);
+      break;
+    default:
+      assert (false);
+    }
   next_scorer_todo++;
   score_count++;
 }
index 45aa121a71eebd00cf0580fbf6d33ed42febd13d..98f0bbf336fcf779559b49a1c9c9e018b32d2d9c 100644 (file)
@@ -30,7 +30,6 @@
 
 #include "translator.icc"
 
-
 /*
   NOTE NOTE NOTE
 
@@ -38,7 +37,7 @@
   apply there too.
 
   (on principle, engravers don't use inheritance for code sharing)
-  
+
  */
 
 /*
@@ -50,8 +49,8 @@ class Slur_engraver : public Engraver
 {
   vector<Stream_event *> start_events_;
   vector<Stream_event *> stop_events_;
-  vector<Grob*> slurs_;
-  vector<Grob*> end_slurs_;
+  vector<Grob *> slurs_;
+  vector<Grob *> end_slurs_;
 
   void set_melisma (bool);
 
@@ -71,7 +70,6 @@ protected:
 
   virtual void finalize ();
 
-
 public:
   TRANSLATOR_DECLARATIONS (Slur_engraver);
 };
@@ -86,11 +84,11 @@ Slur_engraver::listen_slur (Stream_event *ev)
 {
   Direction d = to_dir (ev->get_property ("span-direction"));
   if (d == START)
-    start_events_.push_back(ev);
+    start_events_.push_back (ev);
   else if (d == STOP)
-    stop_events_.push_back(ev);
+    stop_events_.push_back (ev);
   else ev->origin ()->warning (_f ("direction of %s invalid: %d",
-                                  "slur-event", int (d)));
+                                     "slur-event", int (d)));
 }
 
 void
@@ -193,16 +191,16 @@ Slur_engraver::process_music ()
       // Check if we already have a slur with the same spanner-id.
       // In that case, don't create a new slur, but print a warning
       for (vsize j = 0; j < slurs_.size (); j++)
-          have_slur = have_slur || (id == robust_scm2string (slurs_[j]->get_property ("spanner-id"), ""));
-      
+        have_slur = have_slur || (id == robust_scm2string (slurs_[j]->get_property ("spanner-id"), ""));
+
       if (have_slur)
         {
           // We already have a slur, so give a warning and completely ignore
           // the new slur.
-          ev->origin ()->warning(_ ("already have slur"));
+          ev->origin ()->warning (_ ("already have slur"));
           start_events_.erase (start_events_.begin () + i);
         }
-      else 
+      else
         {
           Grob *slur = make_spanner ("Slur", ev->self_scm ());
           Direction updown = to_dir (ev->get_property ("direction"));
@@ -230,19 +228,18 @@ Slur_engraver::stop_translation_timestep ()
   if (Grob *g = unsmob_grob (get_property ("currentCommandColumn")))
     {
       for (vsize i = 0; i < end_slurs_.size (); i++)
-       Slur::add_extra_encompass (end_slurs_[i], g);
+        Slur::add_extra_encompass (end_slurs_[i], g);
 
       if (!start_events_.size ())
-       for (vsize i = 0; i < slurs_.size (); i++)
-         Slur::add_extra_encompass (slurs_[i], g);
+        for (vsize i = 0; i < slurs_.size (); i++)
+          Slur::add_extra_encompass (slurs_[i], g);
     }
-  
-  
+
   for (vsize i = 0; i < end_slurs_.size (); i++)
     {
-      Spanner * s = dynamic_cast<Spanner*> (end_slurs_[i]);
+      Spanner *s = dynamic_cast<Spanner *> (end_slurs_[i]);
       if (!s->get_bound (RIGHT))
-       s->set_bound (RIGHT, unsmob_grob (get_property ("currentMusicalColumn")));
+        s->set_bound (RIGHT, unsmob_grob (get_property ("currentMusicalColumn")));
       announce_end_grob (s, SCM_EOL);
     }
   end_slurs_.clear ();
@@ -258,16 +255,16 @@ ADD_ACKNOWLEDGER (Slur_engraver, text_script);
 ADD_ACKNOWLEDGER (Slur_engraver, tie);
 ADD_ACKNOWLEDGER (Slur_engraver, tuplet_number);
 ADD_TRANSLATOR (Slur_engraver,
-               /* doc */
-               "Build slur grobs from slur events.",
+                /* doc */
+                "Build slur grobs from slur events.",
 
-               /* create */
-               "Slur ",
+                /* create */
+                "Slur ",
 
-               /* read */
-               "slurMelismaBusy "
-               "doubleSlurs ",
+                /* read */
+                "slurMelismaBusy "
+                "doubleSlurs ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index bd466fe8c2860deb7cdc45467d2f60d668e65063..bcf537bc45147f3f1594d01e26c926c43faa0b0c 100644 (file)
@@ -39,7 +39,7 @@ protected:
   void start_translation_timestep ();
   void process_music ();
   void set_melisma (bool);
-  
+
   DECLARE_TRANSLATOR_LISTENER (slur);
 private:
   Stream_event *start_ev_;
@@ -96,15 +96,15 @@ Slur_performer::listen_slur (Stream_event *ev)
 }
 
 ADD_TRANSLATOR (Slur_performer,
-               /* doc */
-               "",
+                /* doc */
+                "",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 1683aeea2feace61a84496e7247cecb57fd81e6d..00f2d60312e2c2b74439164b4e064e9dad7615fa 100644 (file)
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include "slur-score-parameters.hh"
 #include "grob.hh"
 
-
 Real
 get_detail (SCM alist, SCM sym)
 {
   SCM entry = scm_assq (sym, alist);
   return robust_scm2double (scm_is_pair (entry)
-                           ? scm_cdr (entry)
-                           : SCM_EOL,
-                           0.0);
+                            ? scm_cdr (entry)
+                            : SCM_EOL,
+                            0.0);
 }
 
 void
index 63160a99171872556acb773a43bc046b773ebdce..5413c047c2cc219f71773a211aa426d0385d4198 100644 (file)
@@ -18,7 +18,6 @@
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include "slur-scoring.hh"
 
 #include <queue>
@@ -111,7 +110,7 @@ Slur_score_state::get_encompass_info (Grob *col) const
       programming_error ("no stem for note column");
       ei.x_ = col->relative_coordinate (common_[X_AXIS], X_AXIS);
       ei.head_ = ei.stem_ = col->extent (common_[Y_AXIS],
-                                        Y_AXIS)[dir_];
+                                         Y_AXIS)[dir_];
       return ei;
     }
   Direction stem_dir = get_grob_direction (stem);
@@ -135,12 +134,12 @@ Slur_score_state::get_encompass_info (Grob *col) const
     {
       ei.stem_ = stem->extent (common_[Y_AXIS], Y_AXIS)[dir_];
       if (Grob *b = Stem::get_beam (stem))
-       ei.stem_ += stem_dir * 0.5 * Beam::get_beam_thickness (b);
+        ei.stem_ += stem_dir * 0.5 * Beam::get_beam_thickness (b);
 
       Interval x = stem->extent (common_[X_AXIS], X_AXIS);
       ei.x_ = x.is_empty ()
-       ? stem->relative_coordinate (common_[X_AXIS], X_AXIS)
-       : x.center ();
+              ? stem->relative_coordinate (common_[X_AXIS], X_AXIS)
+              : x.center ();
     }
   else
     ei.stem_ = ei.head_;
@@ -160,45 +159,45 @@ Slur_score_state::get_bound_info () const
     {
       extremes[d].bound_ = slur_->get_bound (d);
       if (Note_column::has_interface (extremes[d].bound_))
-       {
-         extremes[d].note_column_ = extremes[d].bound_;
-         extremes[d].stem_ = Note_column::get_stem (extremes[d].note_column_);
-         if (extremes[d].stem_)
-           {
-             extremes[d].stem_dir_ = get_grob_direction (extremes[d].stem_);
-
-             for (int a = X_AXIS; a < NO_AXES; a++)
-               {
-                 Axis ax = Axis (a);
-                 Interval s = extremes[d].stem_->extent (common_[ax], ax);
-                 if (s.is_empty ())
-                   {
-                     /*
-                       do not issue warning. This happens for rests and
-                       whole notes.
-                     */
-                     s = Interval (0, 0)
-                       + extremes[d].stem_->relative_coordinate (common_[ax], ax);
-                   }
-                 extremes[d].stem_extent_[ax] = s;
-               }
-
-             extremes[d].slur_head_
-               = Stem::extremal_heads (extremes[d].stem_)[dir];
-             if (!extremes[d].slur_head_
-                 && Note_column::has_rests (extremes[d].bound_))
-               extremes[d].slur_head_ = Note_column::get_rest (extremes[d].bound_);
-             extremes[d].staff_ = Staff_symbol_referencer
-               ::get_staff_symbol (extremes[d].stem_);
-             extremes[d].staff_space_ = Staff_symbol_referencer
-               ::staff_space (extremes[d].stem_);
-           }
-
-         if (extremes[d].slur_head_)
-           extremes[d].slur_head_x_extent_
-             = extremes[d].slur_head_->extent (common_[X_AXIS], X_AXIS);
-
-       }
+        {
+          extremes[d].note_column_ = extremes[d].bound_;
+          extremes[d].stem_ = Note_column::get_stem (extremes[d].note_column_);
+          if (extremes[d].stem_)
+            {
+              extremes[d].stem_dir_ = get_grob_direction (extremes[d].stem_);
+
+              for (int a = X_AXIS; a < NO_AXES; a++)
+                {
+                  Axis ax = Axis (a);
+                  Interval s = extremes[d].stem_->extent (common_[ax], ax);
+                  if (s.is_empty ())
+                    {
+                      /*
+                        do not issue warning. This happens for rests and
+                        whole notes.
+                      */
+                      s = Interval (0, 0)
+                          + extremes[d].stem_->relative_coordinate (common_[ax], ax);
+                    }
+                  extremes[d].stem_extent_[ax] = s;
+                }
+
+              extremes[d].slur_head_
+                = Stem::extremal_heads (extremes[d].stem_)[dir];
+              if (!extremes[d].slur_head_
+                  && Note_column::has_rests (extremes[d].bound_))
+                extremes[d].slur_head_ = Note_column::get_rest (extremes[d].bound_);
+              extremes[d].staff_ = Staff_symbol_referencer
+                                   ::get_staff_symbol (extremes[d].stem_);
+              extremes[d].staff_space_ = Staff_symbol_referencer
+                                         ::staff_space (extremes[d].stem_);
+            }
+
+          if (extremes[d].slur_head_)
+            extremes[d].slur_head_x_extent_
+              = extremes[d].slur_head_->extent (common_[X_AXIS], X_AXIS);
+
+        }
     }
   while (flip (&d) != LEFT);
 
@@ -211,7 +210,7 @@ Slur_score_state::fill (Grob *me)
   slur_ = dynamic_cast<Spanner *> (me);
   columns_
     = internal_extract_grob_array (me, ly_symbol2scm ("note-columns"));
-  
+
   if (columns_.empty ())
     {
       me->suicide ();
@@ -239,20 +238,20 @@ Slur_score_state::fill (Grob *me)
 
       Direction d = LEFT;
       do
-       {
-         /*
-           If bound is not in note-columns, we don't want to know about
-           its Y-position
-         */
-         if (a != Y_AXIS)
-           common_[a] = common_[a]->common_refpoint (sp->get_bound (d), a);
-       }
+        {
+          /*
+            If bound is not in note-columns, we don't want to know about
+            its Y-position
+          */
+          if (a != Y_AXIS)
+            common_[a] = common_[a]->common_refpoint (sp->get_bound (d), a);
+        }
       while (flip (&d) != LEFT);
     }
 
   extremes_ = get_bound_info ();
   is_broken_ = (!extremes_[LEFT].note_column_
-               || !extremes_[RIGHT].note_column_);
+                || !extremes_[RIGHT].note_column_);
 
   has_same_beam_
     = (extremes_[LEFT].stem_ && extremes_[RIGHT].stem_
@@ -275,21 +274,20 @@ Slur_score_state::fill (Grob *me)
   do
     {
       if (!is_broken_
-         && extremes_[d].slur_head_)
-       musical_dy_ += d
-         * extremes_[d].slur_head_->relative_coordinate (common_[Y_AXIS], Y_AXIS);
+          && extremes_[d].slur_head_)
+        musical_dy_ += d
+                       * extremes_[d].slur_head_->relative_coordinate (common_[Y_AXIS], Y_AXIS);
     }
   while (flip (&d) != LEFT);
 
   edge_has_beams_
     = (extremes_[LEFT].stem_ && Stem::get_beam (extremes_[LEFT].stem_))
-    || (extremes_[RIGHT].stem_ && Stem::get_beam (extremes_[RIGHT].stem_));
+      || (extremes_[RIGHT].stem_ && Stem::get_beam (extremes_[RIGHT].stem_));
 
   if (is_broken_)
     musical_dy_ = 0.0;
 }
 
-
 MAKE_SCHEME_CALLBACK (Slur, calc_control_points, 1)
 SCM
 Slur::calc_control_points (SCM smob)
@@ -307,17 +305,17 @@ Slur::calc_control_points (SCM smob)
   SCM end_ys = me->get_property ("positions");
   SCM inspect_quants = me->get_property ("inspect-quants");
   bool debug_slurs = to_boolean (me->layout ()
-                                ->lookup_variable (ly_symbol2scm ("debug-slur-scoring")));
+                                 ->lookup_variable (ly_symbol2scm ("debug-slur-scoring")));
 
   if (is_number_pair (inspect_quants))
     {
       debug_slurs = true;
       end_ys = inspect_quants;
     }
-  
+
   Slur_configuration *best = NULL;
   if (is_number_pair (end_ys))
-    best = state.get_forced_configuration (ly_scm2interval(end_ys));
+    best = state.get_forced_configuration (ly_scm2interval (end_ys));
   else
     best = state.get_best_curve ();
 
@@ -325,24 +323,24 @@ Slur::calc_control_points (SCM smob)
   if (debug_slurs)
     {
       string total = best->card ();
-      total += to_string (" TOTAL=%.2f idx=%d", best->score (), best->index_); 
+      total += to_string (" TOTAL=%.2f idx=%d", best->score (), best->index_);
       me->set_property ("annotation", ly_string2scm (total));
     }
 #endif
-  
+
   SCM controls = SCM_EOL;
   for (int i = 4; i--;)
     {
       Offset o = best->curve_.control_[i]
-       - Offset (me->relative_coordinate (state.common_[X_AXIS], X_AXIS),
-                 me->relative_coordinate (state.common_[Y_AXIS], Y_AXIS));
+                 - Offset (me->relative_coordinate (state.common_[X_AXIS], X_AXIS),
+                           me->relative_coordinate (state.common_[Y_AXIS], Y_AXIS));
       controls = scm_cons (ly_offset2scm (o), controls);
     }
 
   return controls;
 }
 
-Slur_configuration*
+Slur_configuration *
 Slur_score_state::get_forced_configuration (Interval ys) const
 {
   Slur_configuration *best = NULL;
@@ -350,42 +348,42 @@ Slur_score_state::get_forced_configuration (Interval ys) const
   for (vsize i = 0; i < configurations_.size (); i++)
     {
       Real d = fabs (configurations_[i]->attachment_[LEFT][Y_AXIS] - ys[LEFT])
-       + fabs (configurations_[i]->attachment_[RIGHT][Y_AXIS] - ys[RIGHT]);
+               + fabs (configurations_[i]->attachment_[RIGHT][Y_AXIS] - ys[RIGHT]);
       if (d < mindist)
-       {
-         best = configurations_[i];
-         mindist = d;
-       }
+        {
+          best = configurations_[i];
+          mindist = d;
+        }
     }
 
   while (!best->done ())
     best->run_next_scorer (*this);
-  
+
   if (mindist > 1e5)
     programming_error ("cannot find quant");
 
   return best;
 }
 
-
 Slur_configuration *
 Slur_score_state::get_best_curve () const
 {
-  std::priority_queue<Slur_configuration*, std::vector<Slur_configuration*>,
-                      Slur_configuration_less> queue;
+  std::priority_queue < Slur_configuration *, std::vector<Slur_configuration *>,
+      Slur_configuration_less > queue;
   for (vsize i = 0; i < configurations_.size (); i++)
     queue.push (configurations_[i]);
 
   Slur_configuration *best = NULL;
-  while (true) {
-    best = queue.top ();
-    if (best->done ())
-      break;
-    
-    queue.pop ();
-    best->run_next_scorer (*this);
-    queue.push (best);
-  }
+  while (true)
+    {
+      best = queue.top ();
+      if (best->done ())
+        break;
+
+      queue.pop ();
+      best->run_next_scorer (*this);
+      queue.push (best);
+    }
 
   return best;
 }
@@ -399,9 +397,9 @@ Slur_score_state::breakable_bound_item (Direction d) const
 
   for (vsize i = 0; i < extra_encompasses.size (); i++)
     {
-      Item *item = dynamic_cast<Item*> (extra_encompasses[i]);
+      Item *item = dynamic_cast<Item *> (extra_encompasses[i]);
       if (item && col == item->get_column ())
-       return item;
+        return item;
     }
 
   return 0;
@@ -420,15 +418,15 @@ Slur_score_state::get_y_attachment_range () const
   do
     {
       if (extremes_[d].note_column_)
-       {
-         end_ys[d] = dir_
-           * max (max (dir_ * (base_attachments_[d][Y_AXIS]
-                               + parameters_.region_size_ * dir_),
-                       dir_ * (dir_ + extremes_[d].note_column_->extent (common_[Y_AXIS], Y_AXIS)[dir_])),
-                  dir_ * base_attachments_[-d][Y_AXIS]);
-       }
+        {
+          end_ys[d] = dir_
+                      * max (max (dir_ * (base_attachments_[d][Y_AXIS]
+                                          + parameters_.region_size_ * dir_),
+                                  dir_ * (dir_ + extremes_[d].note_column_->extent (common_[Y_AXIS], Y_AXIS)[dir_])),
+                             dir_ * base_attachments_[-d][Y_AXIS]);
+        }
       else
-       end_ys[d] = base_attachments_[d][Y_AXIS] + parameters_.region_size_ * dir_;
+        end_ys[d] = base_attachments_[d][Y_AXIS] + parameters_.region_size_ * dir_;
     }
   while (flip (&d) != LEFT);
 
@@ -448,7 +446,7 @@ spanner_less (Spanner *s1, Spanner *s2)
   while (flip (&d) != LEFT);
 
   return b2[LEFT] <= b1[LEFT] && b2[RIGHT] >= b1[RIGHT]
-    && (b2[LEFT] != b1[LEFT] || b2[RIGHT] != b1[RIGHT]);
+         && (b2[LEFT] != b1[LEFT] || b2[RIGHT] != b1[RIGHT]);
 }
 
 Drul_array<Offset>
@@ -464,31 +462,31 @@ Slur_score_state::get_base_attachments () const
       Real x = 0.0;
       Real y = 0.0;
       if (extremes_[d].note_column_)
-       {
-
-         /*
-           fixme: X coord should also be set in this case.
-         */
-         if (stem
-             && !Stem::is_invisible (stem)
-             && extremes_[d].stem_dir_ == dir_
-             && Stem::get_beaming (stem, -d)
-             && Stem::get_beam (stem)
-             && (!spanner_less (slur_, Stem::get_beam (stem))
-                 || has_same_beam_))
-           y = extremes_[d].stem_extent_[Y_AXIS][dir_];
-         else if (head)
-           y = head->extent (common_[Y_AXIS], Y_AXIS)[dir_];
-         y += dir_ * 0.5 * staff_space_;
-
-         y = move_away_from_staffline (y, head);
-
-         Grob *fh = Note_column::first_head (extremes_[d].note_column_);
-         x
-           = (fh ? fh->extent (common_[X_AXIS], X_AXIS)
-              : extremes_[d].bound_->extent (common_[X_AXIS], X_AXIS))
-           .linear_combination (CENTER);
-       }
+        {
+
+          /*
+            fixme: X coord should also be set in this case.
+          */
+          if (stem
+              && !Stem::is_invisible (stem)
+              && extremes_[d].stem_dir_ == dir_
+              && Stem::get_beaming (stem, -d)
+              && Stem::get_beam (stem)
+              && (!spanner_less (slur_, Stem::get_beam (stem))
+                  || has_same_beam_))
+            y = extremes_[d].stem_extent_[Y_AXIS][dir_];
+          else if (head)
+            y = head->extent (common_[Y_AXIS], Y_AXIS)[dir_];
+          y += dir_ * 0.5 * staff_space_;
+
+          y = move_away_from_staffline (y, head);
+
+          Grob *fh = Note_column::first_head (extremes_[d].note_column_);
+          x
+            = (fh ? fh->extent (common_[X_AXIS], X_AXIS)
+               : extremes_[d].bound_->extent (common_[X_AXIS], X_AXIS))
+              .linear_combination (CENTER);
+        }
       base_attachment[d] = Offset (x, y);
     }
   while (flip (&d) != LEFT);
@@ -496,53 +494,53 @@ Slur_score_state::get_base_attachments () const
   do
     {
       if (!extremes_[d].note_column_)
-       {
-         Real x = 0;
-         Real y = 0;
-
-         if (Grob *g = breakable_bound_item (d))
-           {
-             x = robust_relative_extent (g, common_[X_AXIS], X_AXIS)[RIGHT];
-           }
-         else if (d == RIGHT)
-           x = robust_relative_extent (extremes_[d].bound_, common_[X_AXIS], X_AXIS)[d];
-         else
-           x = slur_->get_broken_left_end_align ();
-         
-         Grob *col = (d == LEFT) ? columns_[0] : columns_.back ();
-
-         if (extremes_[-d].bound_ != col)
-           {
-             y = robust_relative_extent (col, common_[Y_AXIS], Y_AXIS)[dir_];
-             y += dir_ * 0.5 * staff_space_;
-
-             if (get_grob_direction (col) == dir_
-                 && Note_column::get_stem (col)
-                 && !Stem::is_invisible (Note_column::get_stem (col)))
-               y -= dir_ * 1.5 * staff_space_;
-           }
-         else
-           y = base_attachment[-d][Y_AXIS];
-
-         y = move_away_from_staffline (y, col);
-
-         base_attachment[d] = Offset (x, y);
-       }
+        {
+          Real x = 0;
+          Real y = 0;
+
+          if (Grob *g = breakable_bound_item (d))
+            {
+              x = robust_relative_extent (g, common_[X_AXIS], X_AXIS)[RIGHT];
+            }
+          else if (d == RIGHT)
+            x = robust_relative_extent (extremes_[d].bound_, common_[X_AXIS], X_AXIS)[d];
+          else
+            x = slur_->get_broken_left_end_align ();
+
+          Grob *col = (d == LEFT) ? columns_[0] : columns_.back ();
+
+          if (extremes_[-d].bound_ != col)
+            {
+              y = robust_relative_extent (col, common_[Y_AXIS], Y_AXIS)[dir_];
+              y += dir_ * 0.5 * staff_space_;
+
+              if (get_grob_direction (col) == dir_
+                  && Note_column::get_stem (col)
+                  && !Stem::is_invisible (Note_column::get_stem (col)))
+                y -= dir_ * 1.5 * staff_space_;
+            }
+          else
+            y = base_attachment[-d][Y_AXIS];
+
+          y = move_away_from_staffline (y, col);
+
+          base_attachment[d] = Offset (x, y);
+        }
     }
   while (flip (&d) != LEFT);
 
   do
     {
       for (int a = X_AXIS; a < NO_AXES; a++)
-       {
-         Real &b = base_attachment[d][Axis (a)];
-
-         if (isinf (b) || isnan (b))
-           {
-             programming_error ("slur attachment is inf/nan");
-             b = 0.0;
-           }
-       }
+        {
+          Real &b = base_attachment[d][Axis (a)];
+
+          if (isinf (b) || isnan (b))
+            {
+              programming_error ("slur attachment is inf/nan");
+              b = 0.0;
+            }
+        }
     }
   while (flip (&d) != LEFT);
 
@@ -551,19 +549,19 @@ Slur_score_state::get_base_attachments () const
 
 Real
 Slur_score_state::move_away_from_staffline (Real y,
-                                           Grob *on_staff) const
+                                            Grob *on_staff) const
 {
   if (!on_staff)
     return y;
-  
+
   Grob *staff_symbol = Staff_symbol_referencer::get_staff_symbol (on_staff);
   if (!staff_symbol)
     return y;
 
   Real pos
     = (y - staff_symbol->relative_coordinate (common_[Y_AXIS],
-                                             Y_AXIS))
-    * 2.0 / staff_space_;
+                                              Y_AXIS))
+      * 2.0 / staff_space_;
 
   if (fabs (pos - my_round (pos)) < 0.2
       && Staff_symbol_referencer::on_line (on_staff, (int) rint (pos))
@@ -577,13 +575,13 @@ vector<Offset>
 Slur_score_state::generate_avoid_offsets () const
 {
   vector<Offset> avoid;
-  vector<Grob*> encompasses = columns_;
+  vector<Grob *> encompasses = columns_;
 
   for (vsize i = 0; i < encompasses.size (); i++)
     {
       if (extremes_[LEFT].note_column_ == encompasses[i]
-         || extremes_[RIGHT].note_column_ == encompasses[i])
-       continue;
+          || extremes_[RIGHT].note_column_ == encompasses[i])
+        continue;
 
       Encompass_info inf (get_encompass_info (encompasses[i]));
       Real y = dir_ * (max (dir_ * inf.head_, dir_ * inf.stem_));
@@ -595,28 +593,28 @@ Slur_score_state::generate_avoid_offsets () const
   for (vsize i = 0; i < extra_encompasses.size (); i++)
     {
       if (Slur::has_interface (extra_encompasses[i]))
-       {
-         Grob *small_slur = extra_encompasses[i];
-         Bezier b = Slur::get_curve (small_slur);
+        {
+          Grob *small_slur = extra_encompasses[i];
+          Bezier b = Slur::get_curve (small_slur);
 
-         Offset z = b.curve_point (0.5);
-         z += Offset (small_slur->relative_coordinate (common_[X_AXIS], X_AXIS),
-                      small_slur->relative_coordinate (common_[Y_AXIS], Y_AXIS));
+          Offset z = b.curve_point (0.5);
+          z += Offset (small_slur->relative_coordinate (common_[X_AXIS], X_AXIS),
+                       small_slur->relative_coordinate (common_[Y_AXIS], Y_AXIS));
 
-         z[Y_AXIS] += dir_ * parameters_.free_slur_distance_;
-         avoid.push_back (z);
-       }
+          z[Y_AXIS] += dir_ * parameters_.free_slur_distance_;
+          avoid.push_back (z);
+        }
       else if (extra_encompasses[i]->get_property ("avoid-slur") == ly_symbol2scm ("inside"))
-       {
-         Grob *g = extra_encompasses [i];
-         Interval xe = g->extent (common_[X_AXIS], X_AXIS);
-         Interval ye = g->extent (common_[Y_AXIS], Y_AXIS);
-
-         if (!xe.is_empty ()
-             && !ye.is_empty ())
-           avoid.push_back (Offset (xe.center (), ye[dir_]));
-       }
-    }  
+        {
+          Grob *g = extra_encompasses [i];
+          Interval xe = g->extent (common_[X_AXIS], X_AXIS);
+          Interval ye = g->extent (common_[Y_AXIS], Y_AXIS);
+
+          if (!xe.is_empty ()
+              && !ye.is_empty ())
+            avoid.push_back (Offset (xe.center (), ye[dir_]));
+        }
+    }
   return avoid;
 }
 
@@ -631,85 +629,85 @@ Slur_score_state::generate_curves () const
     configurations_[i]->generate_curve (*this, r_0, h_inf, avoid);
 }
 
-vector<Slur_configuration*>
+vector<Slur_configuration *>
 Slur_score_state::enumerate_attachments (Drul_array<Real> end_ys) const
 {
-  vector<Slur_configuration*> scores;
+  vector<Slur_configuration *> scores;
 
   Drul_array<Offset> os;
   os[LEFT] = base_attachments_[LEFT];
   Real minimum_length = staff_space_
-    * robust_scm2double (slur_->get_property ("minimum-length"), 2.0);
+                        * robust_scm2double (slur_->get_property ("minimum-length"), 2.0);
 
   for (int i = 0; dir_ * os[LEFT][Y_AXIS] <= dir_ * end_ys[LEFT]; i++)
     {
       os[RIGHT] = base_attachments_[RIGHT];
       for (int j = 0; dir_ * os[RIGHT][Y_AXIS] <= dir_ * end_ys[RIGHT]; j++)
-       {
-         Direction d = LEFT;
-         Drul_array<bool> attach_to_stem (false, false);
-         do
-           {
-             os[d][X_AXIS] = base_attachments_[d][X_AXIS];
-             if (extremes_[d].stem_
-                 && !Stem::is_invisible (extremes_[d].stem_)
-                 && extremes_[d].stem_dir_ == dir_)
-               {
-                 Interval stem_y = extremes_[d].stem_extent_[Y_AXIS];
-                 stem_y.widen (0.25 * staff_space_);
-                 if (stem_y.contains (os[d][Y_AXIS]))
-                   {
-                     os[d][X_AXIS] = extremes_[d].stem_extent_[X_AXIS][-d]
-                       - d * 0.3;
-                     attach_to_stem[d] = true;
-                   }
-                 else if (dir_ * extremes_[d].stem_extent_[Y_AXIS][dir_]
-                          < dir_ * os[d][Y_AXIS]
-                          && !extremes_[d].stem_extent_[X_AXIS].is_empty ())
-
-                   os[d][X_AXIS] = extremes_[d].stem_extent_[X_AXIS].center ();
-               }
-           }
-         while (flip (&d) != LEFT);
-
-         Offset dz;
-         dz = os[RIGHT] - os[LEFT];
-         if (dz[X_AXIS] < minimum_length
-             || fabs (dz[Y_AXIS] / dz[X_AXIS]) > parameters_.max_slope_)
-           {
-             do
-               {
-                 if (extremes_[d].slur_head_
-                     && !extremes_[d].slur_head_x_extent_.is_empty ())
-                   {
-                     os[d][X_AXIS] = extremes_[d].slur_head_x_extent_.center ();
-                     attach_to_stem[d] = false;
-                   }
-               }
-             while (flip (&d) != LEFT);
-           }
-
-         dz = os[RIGHT] - os[LEFT];
-         do
-           {
-             if (extremes_[d].slur_head_
-                 && !attach_to_stem[d])
-               {
-                 /* Horizontally move tilted slurs a little.  Move
-                    more for bigger tilts.
-
-                    TODO: parameter */
-                 os[d][X_AXIS]
-                   -= dir_ * extremes_[d].slur_head_x_extent_.length ()
-                   * sin (dz.arg ()) / 3;
-               }
-           }
-         while (flip (&d) != LEFT);
-
-         scores.push_back (Slur_configuration::new_config (os, scores.size ()));
-
-         os[RIGHT][Y_AXIS] += dir_ * staff_space_ / 2;
-       }
+        {
+          Direction d = LEFT;
+          Drul_array<bool> attach_to_stem (false, false);
+          do
+            {
+              os[d][X_AXIS] = base_attachments_[d][X_AXIS];
+              if (extremes_[d].stem_
+                  && !Stem::is_invisible (extremes_[d].stem_)
+                  && extremes_[d].stem_dir_ == dir_)
+                {
+                  Interval stem_y = extremes_[d].stem_extent_[Y_AXIS];
+                  stem_y.widen (0.25 * staff_space_);
+                  if (stem_y.contains (os[d][Y_AXIS]))
+                    {
+                      os[d][X_AXIS] = extremes_[d].stem_extent_[X_AXIS][-d]
+                                      - d * 0.3;
+                      attach_to_stem[d] = true;
+                    }
+                  else if (dir_ * extremes_[d].stem_extent_[Y_AXIS][dir_]
+                           < dir_ * os[d][Y_AXIS]
+                           && !extremes_[d].stem_extent_[X_AXIS].is_empty ())
+
+                    os[d][X_AXIS] = extremes_[d].stem_extent_[X_AXIS].center ();
+                }
+            }
+          while (flip (&d) != LEFT);
+
+          Offset dz;
+          dz = os[RIGHT] - os[LEFT];
+          if (dz[X_AXIS] < minimum_length
+              || fabs (dz[Y_AXIS] / dz[X_AXIS]) > parameters_.max_slope_)
+            {
+              do
+                {
+                  if (extremes_[d].slur_head_
+                      && !extremes_[d].slur_head_x_extent_.is_empty ())
+                    {
+                      os[d][X_AXIS] = extremes_[d].slur_head_x_extent_.center ();
+                      attach_to_stem[d] = false;
+                    }
+                }
+              while (flip (&d) != LEFT);
+            }
+
+          dz = os[RIGHT] - os[LEFT];
+          do
+            {
+              if (extremes_[d].slur_head_
+                  && !attach_to_stem[d])
+                {
+                  /* Horizontally move tilted slurs a little.  Move
+                     more for bigger tilts.
+
+                     TODO: parameter */
+                  os[d][X_AXIS]
+                  -= dir_ * extremes_[d].slur_head_x_extent_.length ()
+                     * sin (dz.arg ()) / 3;
+                }
+            }
+          while (flip (&d) != LEFT);
+
+          scores.push_back (Slur_configuration::new_config (os, scores.size ()));
+
+          os[RIGHT][Y_AXIS] += dir_ * staff_space_ / 2;
+        }
 
       os[LEFT][Y_AXIS] += dir_ * staff_space_ / 2;
     }
@@ -726,80 +724,80 @@ Slur_score_state::get_extra_encompass_infos () const
   for (vsize i = encompasses.size (); i--;)
     {
       if (Slur::has_interface (encompasses[i]))
-       {
-         Spanner *small_slur = dynamic_cast<Spanner *> (encompasses[i]);
-         Bezier b = Slur::get_curve (small_slur);
-
-         Offset relative (small_slur->relative_coordinate (common_[X_AXIS], X_AXIS),
-                          small_slur->relative_coordinate (common_[Y_AXIS], Y_AXIS));
-
-         for (int k = 0; k < 3; k++)
-           {
-             Direction hdir = Direction (k - 1);
-
-             /*
-               Only take bound into account if small slur starts
-               together with big slur.
-             */
-             if (hdir && small_slur->get_bound (hdir) != slur_->get_bound (hdir))
-               continue;
-
-             Offset z = b.curve_point (k / 2.0);
-             z += relative;
-
-             Interval yext;
-             yext.set_full ();
-             yext[dir_] = z[Y_AXIS] + dir_ * thickness_ * 1.0;
-
-             Interval xext (-1, 1);
-             xext = xext * (thickness_ * 2) + z[X_AXIS];
-             Extra_collision_info info (small_slur,
-                                        hdir,
-                                        xext,
-                                        yext,
-                                        parameters_.extra_object_collision_penalty_);
-             collision_infos.push_back (info);
-           }
-       }
+        {
+          Spanner *small_slur = dynamic_cast<Spanner *> (encompasses[i]);
+          Bezier b = Slur::get_curve (small_slur);
+
+          Offset relative (small_slur->relative_coordinate (common_[X_AXIS], X_AXIS),
+                           small_slur->relative_coordinate (common_[Y_AXIS], Y_AXIS));
+
+          for (int k = 0; k < 3; k++)
+            {
+              Direction hdir = Direction (k - 1);
+
+              /*
+                Only take bound into account if small slur starts
+                together with big slur.
+              */
+              if (hdir && small_slur->get_bound (hdir) != slur_->get_bound (hdir))
+                continue;
+
+              Offset z = b.curve_point (k / 2.0);
+              z += relative;
+
+              Interval yext;
+              yext.set_full ();
+              yext[dir_] = z[Y_AXIS] + dir_ * thickness_ * 1.0;
+
+              Interval xext (-1, 1);
+              xext = xext * (thickness_ * 2) + z[X_AXIS];
+              Extra_collision_info info (small_slur,
+                                         hdir,
+                                         xext,
+                                         yext,
+                                         parameters_.extra_object_collision_penalty_);
+              collision_infos.push_back (info);
+            }
+        }
       else
-       {
-         Grob *g = encompasses [i];
-         Interval xe = g->extent (common_[X_AXIS], X_AXIS);
-         Interval ye = g->extent (common_[Y_AXIS], Y_AXIS);
-
-         Real xp = 0.0;
-         Real penalty = parameters_.extra_object_collision_penalty_;
-         if (Accidental_interface::has_interface (g))
-           {
-             penalty = parameters_.accidental_collision_;
-
-             Rational alt = ly_scm2rational (g->get_property ("alteration"));
-             SCM scm_style = g->get_property ("style");
-             if (!scm_is_symbol (scm_style)
-                 && !to_boolean (g->get_property ("parenthesized"))
-                 && !to_boolean (g->get_property ("restore-first")))
-               {
-                 /* End copy accidental.cc */
-                 if (alt == FLAT_ALTERATION
-                     || alt == DOUBLE_FLAT_ALTERATION)
-                   xp = LEFT;
-                 else if (alt == SHARP_ALTERATION)
-                   xp = 0.5 * dir_;
-                 else if (alt == NATURAL_ALTERATION)
-                   xp = -dir_;
-               }
-           }
-
-         ye.widen (thickness_ * 0.5);
-         xe.widen (thickness_ * 1.0);
-         Extra_collision_info info (g, xp, xe, ye, penalty);
-         collision_infos.push_back (info);
-       }
+        {
+          Grob *g = encompasses [i];
+          Interval xe = g->extent (common_[X_AXIS], X_AXIS);
+          Interval ye = g->extent (common_[Y_AXIS], Y_AXIS);
+
+          Real xp = 0.0;
+          Real penalty = parameters_.extra_object_collision_penalty_;
+          if (Accidental_interface::has_interface (g))
+            {
+              penalty = parameters_.accidental_collision_;
+
+              Rational alt = ly_scm2rational (g->get_property ("alteration"));
+              SCM scm_style = g->get_property ("style");
+              if (!scm_is_symbol (scm_style)
+                  && !to_boolean (g->get_property ("parenthesized"))
+                  && !to_boolean (g->get_property ("restore-first")))
+                {
+                  /* End copy accidental.cc */
+                  if (alt == FLAT_ALTERATION
+                      || alt == DOUBLE_FLAT_ALTERATION)
+                    xp = LEFT;
+                  else if (alt == SHARP_ALTERATION)
+                    xp = 0.5 * dir_;
+                  else if (alt == NATURAL_ALTERATION)
+                    xp = -dir_;
+                }
+            }
+
+          ye.widen (thickness_ * 0.5);
+          xe.widen (thickness_ * 1.0);
+          Extra_collision_info info (g, xp, xe, ye, penalty);
+          collision_infos.push_back (info);
+        }
     }
 
   return collision_infos;
 }
+
 Extra_collision_info::Extra_collision_info (Grob *g, Real idx, Interval x, Interval y, Real p)
 {
   idx_ = idx;
@@ -815,5 +813,5 @@ Extra_collision_info::Extra_collision_info ()
   idx_ = 0.0;
   penalty_ = 0.;
   grob_ = 0;
-  type_ = SCM_EOL; 
+  type_ = SCM_EOL;
 }
index 433406c92a57d9471daab3524cf5c32091af7ebe..32149e8412c8be7f71c43f9168b8379fd4eb342e 100644 (file)
@@ -28,7 +28,7 @@
 #include "item.hh"
 #include "pointer-group-interface.hh"
 #include "lookup.hh"
-#include "main.hh"             // DEBUG_SLUR_SCORING
+#include "main.hh"              // DEBUG_SLUR_SCORING
 #include "note-column.hh"
 #include "output-def.hh"
 #include "spanner.hh"
@@ -41,8 +41,6 @@
 #include "separation-item.hh"
 #include "international.hh"
 
-
-
 MAKE_SCHEME_CALLBACK (Slur, calc_direction, 1)
 SCM
 Slur::calc_direction (SCM smob)
@@ -60,10 +58,10 @@ Slur::calc_direction (SCM smob)
   for (vsize i = 0; i < encompasses.size (); i++)
     {
       if (Note_column::dir (encompasses[i]) < 0)
-       {
-         d = UP;
-         break;
-       }
+        {
+          d = UP;
+          break;
+        }
     }
   return scm_from_int (d);
 }
@@ -90,7 +88,7 @@ Slur::pure_height (SCM smob, SCM start_scm, SCM end_scm)
     {
       Interval d = encompasses[i]->pure_height (parent, start, end);
       if (!d.is_empty ())
-       ret.unite (d);
+        ret.unite (d);
     }
 
   // The +0.5 comes from the fact that we try to place a slur
@@ -109,7 +107,7 @@ Slur::height (SCM smob)
   // FIXME uncached
   Stencil *m = me->get_stencil ();
   return m ? ly_interval2scm (m->extent (Y_AXIS))
-    : ly_interval2scm (Interval ());
+         : ly_interval2scm (Interval ());
 }
 
 MAKE_SCHEME_CALLBACK (Slur, print, 1);
@@ -126,9 +124,9 @@ Slur::print (SCM smob)
 
   Real staff_thick = Staff_symbol_referencer::line_thickness (me);
   Real base_thick = staff_thick
-    * robust_scm2double (me->get_property ("thickness"), 1);
+                    * robust_scm2double (me->get_property ("thickness"), 1);
   Real line_thick = staff_thick
-    * robust_scm2double (me->get_property ("line-thickness"), 1);
+                    * robust_scm2double (me->get_property ("line-thickness"), 1);
 
   Bezier one = get_curve (me);
   Stencil a;
@@ -136,7 +134,7 @@ Slur::print (SCM smob)
   SCM dash_definition = me->get_property ("dash-definition");
   a = Lookup::slur (one,
                     get_grob_direction (me) * base_thick,
-                   line_thick,
+                    line_thick,
                     dash_definition);
 
 #if DEBUG_SLUR_SCORING
@@ -147,12 +145,12 @@ Slur::print (SCM smob)
       SCM properties = Font_interface::text_font_alist_chain (me);
 
       if (!scm_is_number (me->get_property ("font-size")))
-       properties = scm_cons (scm_acons (ly_symbol2scm ("font-size"), scm_from_int (-6), SCM_EOL),
-                            properties);
-      
+        properties = scm_cons (scm_acons (ly_symbol2scm ("font-size"), scm_from_int (-6), SCM_EOL),
+                               properties);
+
       Stencil tm = *unsmob_stencil (Text_interface::interpret_markup
-                                   (me->layout ()->self_scm (), properties,
-                                    annotation));
+                                    (me->layout ()->self_scm (), properties,
+                                     annotation));
       a.add_at_edge (Y_AXIS, get_grob_direction (me), tm, 1.0);
     }
 #endif
@@ -160,7 +158,6 @@ Slur::print (SCM smob)
   return a.smobbed_copy ();
 }
 
-
 /*
   it would be better to do this at engraver level, but that is
   fragile, as the breakable items are generated on staff level, at
@@ -175,26 +172,26 @@ Slur::replace_breakable_encompass_objects (Grob *me)
   for (vsize i = 0; i < extra_objects.size (); i++)
     {
       Grob *g = extra_objects[i];
-      
+
       if (Separation_item::has_interface (g))
-       {
-         extract_grob_set (g, "elements", breakables);
-         for (vsize j = 0; j < breakables.size (); j++)
-           /* if we encompass a separation-item that spans multiple staves,
-              we filter out the grobs that don't belong to our staff */
-           if (me->common_refpoint (breakables[j], Y_AXIS) == me->get_parent (Y_AXIS)
-               && breakables[j]->get_property ("avoid-slur") == ly_symbol2scm ("inside"))
-             new_encompasses.push_back (breakables[j]);
-       }
+        {
+          extract_grob_set (g, "elements", breakables);
+          for (vsize j = 0; j < breakables.size (); j++)
+            /* if we encompass a separation-item that spans multiple staves,
+               we filter out the grobs that don't belong to our staff */
+            if (me->common_refpoint (breakables[j], Y_AXIS) == me->get_parent (Y_AXIS)
+                && breakables[j]->get_property ("avoid-slur") == ly_symbol2scm ("inside"))
+              new_encompasses.push_back (breakables[j]);
+        }
       else
-       new_encompasses.push_back (g);
+        new_encompasses.push_back (g);
     }
 
   SCM encompass_scm = me->get_object ("encompass-objects");
   if (Grob_array::unsmob (encompass_scm))
     {
-      vector<Grob *> &arr =
-       unsmob_grob_array (encompass_scm)->array_reference ();
+      vector<Grob *> &arr
+        = unsmob_grob_array (encompass_scm)->array_reference ();
       arr = new_encompasses;
     }
 }
@@ -249,7 +246,7 @@ SCM
 Slur::outside_slur_callback (SCM grob, SCM offset_scm)
 {
   Grob *script = unsmob_grob (grob);
-  Grob *slur = unsmob_grob (script->get_object ("slur")); 
+  Grob *slur = unsmob_grob (script->get_object ("slur"));
 
   if (!slur)
     return offset_scm;
@@ -258,7 +255,7 @@ Slur::outside_slur_callback (SCM grob, SCM offset_scm)
   if (avoid != ly_symbol2scm ("outside")
       && avoid != ly_symbol2scm ("around"))
     return offset_scm;
-  
+
   Direction dir = get_grob_direction (script);
   if (dir == CENTER)
     return offset_scm;
@@ -269,17 +266,17 @@ Slur::outside_slur_callback (SCM grob, SCM offset_scm)
   Bezier curve = Slur::get_curve (slur);
 
   curve.translate (Offset (slur->relative_coordinate (cx, X_AXIS),
-                          slur->relative_coordinate (cy, Y_AXIS)));
+                           slur->relative_coordinate (cy, Y_AXIS)));
 
   Interval yext = robust_relative_extent (script, cy, Y_AXIS);
   Interval xext = robust_relative_extent (script, cx, X_AXIS);
 
   Real offset = robust_scm2double (offset_scm, 0);
   yext.translate (offset);
-  
+
   /* FIXME: slur property, script property?  */
   Real slur_padding = robust_scm2double (script->get_property ("slur-padding"),
-                                        0.0);
+                                         0.0);
   yext.widen (slur_padding);
 
   const Real EPS = 1e-3;
@@ -287,36 +284,36 @@ Slur::outside_slur_callback (SCM grob, SCM offset_scm)
   bool consider[] = {false, false, false};
   Real ys[] = {0, 0, 0};
   bool do_shift = false;
-  
+
   for (int d = LEFT, k = 0; d <= RIGHT; d++, k++)
     {
       Real x = xext.linear_combination ((Direction) d);
       consider[k] = bezext.contains (x);
 
       if (consider[k])
-       {
-         ys[k]
-           = (fabs (bezext[LEFT] - x) < EPS)
-           ? curve.control_[0][Y_AXIS]
-           : ((fabs (bezext[RIGHT] - x) < EPS)
-              ? curve.control_[3][Y_AXIS]
-              : curve.get_other_coordinate (X_AXIS, x));
-
-         /* Request shift if slur is contained script's Y, or if
-            script is inside slur and avoid == outside.  */
-         if (yext.contains (ys[k])
-             || (dir * ys[k] > dir * yext[-dir] && avoid == ly_symbol2scm ("outside")))
-           do_shift = true;
-       }
+        {
+          ys[k]
+            = (fabs (bezext[LEFT] - x) < EPS)
+              ? curve.control_[0][Y_AXIS]
+              : ((fabs (bezext[RIGHT] - x) < EPS)
+                 ? curve.control_[3][Y_AXIS]
+                 : curve.get_other_coordinate (X_AXIS, x));
+
+          /* Request shift if slur is contained script's Y, or if
+             script is inside slur and avoid == outside.  */
+          if (yext.contains (ys[k])
+              || (dir * ys[k] > dir * yext[-dir] && avoid == ly_symbol2scm ("outside")))
+            do_shift = true;
+        }
     }
 
   Real avoidance_offset = 0.0;
   if (do_shift)
     {
       for (int d = LEFT, k = 0; d <= RIGHT; d++, k++)
-       if (consider[k])
-         avoidance_offset = dir * (max (dir * avoidance_offset,
-                                        dir * (ys[k] - yext[-dir] + dir * slur_padding)));
+        if (consider[k])
+          avoidance_offset = dir * (max (dir * avoidance_offset,
+                                         dir * (ys[k] - yext[-dir] + dir * slur_padding)));
     }
   return scm_from_double (offset + avoidance_offset);
 }
@@ -326,41 +323,41 @@ Slur::outside_slur_callback (SCM grob, SCM offset_scm)
  */
 void
 Slur::auxiliary_acknowledge_extra_object (Grob_info const &info,
-                                         vector<Grob*> &slurs,
-                                         vector<Grob*> &end_slurs)
+                                          vector<Grob *> &slurs,
+                                          vector<Grob *> &end_slurs)
 {
   if (slurs.empty () && end_slurs.empty ())
     return;
-  
+
   Grob *e = info.grob ();
   SCM avoid = e->get_property ("avoid-slur");
   if (Tie::has_interface (e)
       || avoid == ly_symbol2scm ("inside"))
     {
       for (vsize i = slurs.size (); i--;)
-       add_extra_encompass (slurs[i], e);
+        add_extra_encompass (slurs[i], e);
       for (vsize i = end_slurs.size (); i--;)
-       add_extra_encompass (end_slurs[i], e);
+        add_extra_encompass (end_slurs[i], e);
     }
   else if (avoid == ly_symbol2scm ("outside")
-          || avoid == ly_symbol2scm ("around"))
+           || avoid == ly_symbol2scm ("around"))
     {
       Grob *slur;
       if (end_slurs.size () && !slurs.size ())
-       slur = end_slurs[0];
+        slur = end_slurs[0];
       else
-       slur = slurs[0];
+        slur = slurs[0];
 
       if (slur)
-       {
-         chain_offset_callback (e, outside_slur_callback_proc, Y_AXIS);
-         chain_callback (e, outside_slur_cross_staff_proc, ly_symbol2scm("cross-staff"));
-         e->set_object ("slur", slur->self_scm ());
-       }
+        {
+          chain_offset_callback (e, outside_slur_callback_proc, Y_AXIS);
+          chain_callback (e, outside_slur_cross_staff_proc, ly_symbol2scm ("cross-staff"));
+          e->set_object ("slur", slur->self_scm ());
+        }
     }
   else if (avoid != ly_symbol2scm ("ignore"))
     e->warning (_f ("Ignoring grob for slur: %s. avoid-slur not set?",
-                   e->name().c_str ()));
+                    e->name ().c_str ()));
 }
 
 /*
@@ -396,13 +393,13 @@ Slur::calc_cross_staff (SCM smob)
   for (vsize i = 0; i < cols.size (); i++)
     {
       if (Grob *s = Note_column::get_stem (cols[i]))
-       if (to_boolean (s->get_property ("cross-staff")))
-         return SCM_BOOL_T;
+        if (to_boolean (s->get_property ("cross-staff")))
+          return SCM_BOOL_T;
     }
 
   /* the separation items are dealt with in replace_breakable_encompass_objects
      so we can ignore them here */
-  vector<Grob*> non_sep_extras;
+  vector<Grob *> non_sep_extras;
   for (vsize i = 0; i < extras.size (); i++)
     if (!Separation_item::has_interface (extras[i]))
       non_sep_extras.push_back (extras[i]);
@@ -414,90 +411,90 @@ Slur::calc_cross_staff (SCM smob)
 }
 
 ADD_INTERFACE (Slur,
-              "A slur."
-              "\n"
-              "The following properties may be set in the @code{details}"
-              " list.\n"
-              "\n"
-              "@table @code\n"
-              "@item region-size\n"
-              "Size of region (in staff spaces) for determining"
-              " potential endpoints in the Y direction.\n"
-              "@item head-encompass-penalty\n"
-              "Demerit to apply when note heads collide with a slur.\n"
-              "@item stem-encompass-penalty\n"
-              "Demerit to apply when stems collide with a slur.\n"
-              "@item closeness-factor\n"
-              "Additional demerit used when scoring encompasses.\n"
-              "@item edge-attraction-factor\n"
-              "Factor used to calculate the demerit for distances"
-              " between slur endpoints and their corresponding base"
-              " attachments.\n"
-              "@item same-slope-penalty\n"
-              "Demerit for slurs with attachment points that are"
-              " horizontally aligned.\n"
-              "@item steeper-slope-factor\n"
-              "Factor used to calculate demerit only if this slur is"
-              " not broken.\n"
-              "@item non-horizontal-penalty\n"
-              "Demerit for slurs with attachment points that are not"
-              " horizontally aligned.\n"
-              "@item max-slope\n"
-              "The maximum slope allowed for this slur.\n"
-              "@item max-slope-factor\n"
-              "Factor that calculates demerit based on the max slope.\n"
-              "@item free-head-distance\n"
-              "The amount of vertical free space that must exist"
-              " between a slur and note heads.\n"
-              "@item absolute-closeness-measure\n"
-              "Factor to calculate demerit for variance between a note"
-              " head and slur.\n"
-              "@item extra-object-collision-penalty\n"
-              "Factor to calculate demerit for extra objects that the"
-              " slur encompasses, including accidentals, fingerings, and"
-              " tuplet numbers.\n"
-              "@item accidental-collision\n"
-              "Factor to calculate demerit for @code{Accidental} objects"
-              " that the slur encompasses.  This property value replaces"
-              " the value of @code{extra-object-collision-penalty}.\n"
-              "@item extra-encompass-free-distance\n"
-              "The amount of vertical free space that must exist"
-              " between a slur and various objects it encompasses,"
-              " including accidentals, fingerings, and tuplet numbers.\n"
-              "@item extra-encompass-collision-distance\n"
-              "This detail is currently unused.\n"
-              "@item head-slur-distance-factor\n"
-              "Factor to calculate demerit for variance between a note"
-              " head and slur.\n"
-              "@item head-slur-distance-max-ratio\n"
-              "The maximum value for the ratio of distance between a"
-              " note head and slur.\n"
-              "@item free-slur-distance\n"
-              "The amount of vertical free space that must exist"
-              " between adjacent slurs.  This subproperty only works"
-              " for @code{PhrasingSlur}.\n"
-              "@item edge-slope-exponent\n"
-              "Factor used to calculate the demerit for the slope of"
-              " a slur near its endpoints; a larger value yields a"
-              " larger demerit.\n"
-              "@end table\n",
-              
-              /* properties */
-              "annotation "
-              "avoid-slur "    /* UGH. */
-              "control-points "
+               "A slur."
+               "\n"
+               "The following properties may be set in the @code{details}"
+               " list.\n"
+               "\n"
+               "@table @code\n"
+               "@item region-size\n"
+               "Size of region (in staff spaces) for determining"
+               " potential endpoints in the Y direction.\n"
+               "@item head-encompass-penalty\n"
+               "Demerit to apply when note heads collide with a slur.\n"
+               "@item stem-encompass-penalty\n"
+               "Demerit to apply when stems collide with a slur.\n"
+               "@item closeness-factor\n"
+               "Additional demerit used when scoring encompasses.\n"
+               "@item edge-attraction-factor\n"
+               "Factor used to calculate the demerit for distances"
+               " between slur endpoints and their corresponding base"
+               " attachments.\n"
+               "@item same-slope-penalty\n"
+               "Demerit for slurs with attachment points that are"
+               " horizontally aligned.\n"
+               "@item steeper-slope-factor\n"
+               "Factor used to calculate demerit only if this slur is"
+               " not broken.\n"
+               "@item non-horizontal-penalty\n"
+               "Demerit for slurs with attachment points that are not"
+               " horizontally aligned.\n"
+               "@item max-slope\n"
+               "The maximum slope allowed for this slur.\n"
+               "@item max-slope-factor\n"
+               "Factor that calculates demerit based on the max slope.\n"
+               "@item free-head-distance\n"
+               "The amount of vertical free space that must exist"
+               " between a slur and note heads.\n"
+               "@item absolute-closeness-measure\n"
+               "Factor to calculate demerit for variance between a note"
+               " head and slur.\n"
+               "@item extra-object-collision-penalty\n"
+               "Factor to calculate demerit for extra objects that the"
+               " slur encompasses, including accidentals, fingerings, and"
+               " tuplet numbers.\n"
+               "@item accidental-collision\n"
+               "Factor to calculate demerit for @code{Accidental} objects"
+               " that the slur encompasses.  This property value replaces"
+               " the value of @code{extra-object-collision-penalty}.\n"
+               "@item extra-encompass-free-distance\n"
+               "The amount of vertical free space that must exist"
+               " between a slur and various objects it encompasses,"
+               " including accidentals, fingerings, and tuplet numbers.\n"
+               "@item extra-encompass-collision-distance\n"
+               "This detail is currently unused.\n"
+               "@item head-slur-distance-factor\n"
+               "Factor to calculate demerit for variance between a note"
+               " head and slur.\n"
+               "@item head-slur-distance-max-ratio\n"
+               "The maximum value for the ratio of distance between a"
+               " note head and slur.\n"
+               "@item free-slur-distance\n"
+               "The amount of vertical free space that must exist"
+               " between adjacent slurs.  This subproperty only works"
+               " for @code{PhrasingSlur}.\n"
+               "@item edge-slope-exponent\n"
+               "Factor used to calculate the demerit for the slope of"
+               " a slur near its endpoints; a larger value yields a"
+               " larger demerit.\n"
+               "@end table\n",
+
+               /* properties */
+               "annotation "
+               "avoid-slur "    /* UGH. */
+               "control-points "
                "dash-definition "
-              "details "
-              "direction "
-              "eccentricity "
-              "encompass-objects "
-              "height-limit "
-              "inspect-quants "
-              "inspect-index "
-              "line-thickness "
-              "note-columns "
-              "positions "
-              "ratio "
-              "thickness "
-              );
+               "details "
+               "direction "
+               "eccentricity "
+               "encompass-objects "
+               "height-limit "
+               "inspect-quants "
+               "inspect-index "
+               "line-thickness "
+               "note-columns "
+               "positions "
+               "ratio "
+               "thickness "
+              );
 
index 5544d95d7b08d8fbdae5ffc1f151323265f8121f..e09fd6035db90ffc319c6cdd68a1f8d660de985d 100644 (file)
@@ -33,12 +33,12 @@ init_smob_protection ()
 ADD_SCM_INIT_FUNC (init_smob_protection, init_smob_protection);
 
 LY_DEFINE (ly_smob_protects, "ly:smob-protects",
-         0, 0, 0, (),
-         "Return LilyPond's internal smob protection list.")
+           0, 0, 0, (),
+           "Return LilyPond's internal smob protection list.")
 {
   return scm_is_pair (smob_protection_list)
-    ? scm_cdr (smob_protection_list)
-    : SCM_EOL;
+         ? scm_cdr (smob_protection_list)
+         : SCM_EOL;
 }
 
 void
@@ -52,10 +52,10 @@ protect_smob (SCM smob, SCM *prot_cons)
     }
   SCM prot = scm_cons (smob, s);
   scm_set_cdr_x (smob_protection_list,
-                prot);
+                 prot);
   *prot_cons = prot;
 #else
-  (void) prot_cons; 
+  (void) prot_cons;
   scm_gc_protect_object (smob);
 #endif
 }
@@ -64,7 +64,7 @@ void
 unprotect_smob (SCM smob, SCM *prot_cons)
 {
 #if 1
-  (void) prot_cons; 
+  (void) prot_cons;
   scm_gc_unprotect_object (smob);
 #else
   SCM next = scm_cdr (*prot_cons);
@@ -75,9 +75,9 @@ unprotect_smob (SCM smob, SCM *prot_cons)
     {
       scm_set_car_x (*prot_cons, SCM_BOOL_F);
       while (scm_is_pair (next)
-            && scm_car (next) == SCM_BOOL_F)
+             && scm_car (next) == SCM_BOOL_F)
 
-       next = scm_cdr (next);
+        next = scm_cdr (next);
 
       scm_set_cdr_x (*prot_cons, next);
     }
index b01676355840a1877bacc3b9439809cb195ce496..b42fb7a5b37a508f69ce8d31925ae9478e7972c4 100644 (file)
@@ -52,7 +52,7 @@ Source_file::load_stdin ()
 }
 
 /*
-  return contents of FILENAME. *Not 0-terminated!* 
+  return contents of FILENAME. *Not 0-terminated!*
  */
 vector<char>
 gulp_file (string filename, int desired_size)
@@ -74,7 +74,7 @@ gulp_file (string filename, int desired_size)
 
   if (desired_size > 0)
     read_count = min (read_count, desired_size);
-  
+
   rewind (f);
 
   char *str = new char[read_count + 1];
@@ -83,7 +83,7 @@ gulp_file (string filename, int desired_size)
   int bytes_read = fread (str, sizeof (char), read_count, f);
   if (bytes_read != read_count)
     warning (_f ("expected to read %d characters, got %d", bytes_read,
-                read_count));
+                 read_count));
   fclose (f);
   int filesize = bytes_read;
 
@@ -91,7 +91,7 @@ gulp_file (string filename, int desired_size)
   cxx_arr.resize (filesize);
 
   copy (str, str + filesize, cxx_arr.begin ());
-  
+
   delete[] str;
   return cxx_arr;
 }
@@ -109,14 +109,14 @@ Source_file::init ()
 Source_file::Source_file (string filename, string data)
 {
   init ();
-  
+
   name_ = filename;
 
   characters_.resize (data.length ());
   copy (data.begin (), data.end (), characters_.begin ());
 
   characters_.push_back (0);
-  
+
   init_port ();
 
   for (vsize i = 0; i < characters_.size (); i++)
@@ -127,7 +127,7 @@ Source_file::Source_file (string filename, string data)
 Source_file::Source_file (string filename_string)
 {
   init ();
-  
+
   name_ = filename_string;
 
   if (filename_string == "-")
@@ -154,20 +154,19 @@ Source_file::init_port ()
   scm_set_port_filename_x (str_port_, ly_string2scm (name_));
 }
 
-
 istream *
 Source_file::get_istream ()
 {
   if (!istream_)
     {
       if (length ()) // can-t this be done without such a hack?
-       istream_ = new istringstream (c_str ());
+        istream_ = new istringstream (c_str ());
       else
-       {
-         istream_ = new istringstream ("");
-         istream_->setstate (ios::eofbit);
-         //      istream_->set (ios::eofbit);
-       }
+        {
+          istream_ = new istringstream ("");
+          istream_->setstate (ios::eofbit);
+          //      istream_->set (ios::eofbit);
+        }
     }
   return istream_;
 }
@@ -183,7 +182,7 @@ Source_file::file_line_column_string (char const *context_str0) const
       get_counts (context_str0, &l, &ch, &col, &offset);
 
       return name_string () + ":" + to_string (l)
-       + ":" + to_string (col);
+             + ":" + to_string (col);
     }
 }
 
@@ -197,9 +196,9 @@ Source_file::quote_input (char const *pos_str0) const
   get_counts (pos_str0, &l, &ch, &col, &offset);
   string line = line_string (pos_str0);
   string context = line.substr (0, offset)
-    + to_string ('\n')
-    + to_string (' ', col)
-    + line.substr (offset, line.length () - offset);
+                   + to_string ('\n')
+                   + to_string (' ', col)
+                   + line.substr (offset, line.length () - offset);
   return context;
 }
 
@@ -229,16 +228,16 @@ Source_file::line_slice (char const *pos_str0) const
   while (begin_str0 > data_str0)
     if (*--begin_str0 == '\n')
       {
-       begin_str0++;
-       break;
+        begin_str0++;
+        break;
       }
 
   char const *end_str0 = pos_str0;
   while (end_str0 < eof_C_)
     if (*end_str0++ == '\n')
       {
-       end_str0--;
-       break;
+        end_str0--;
+        break;
       }
 
   return Slice (begin_str0 - data_str0, end_str0 - data_str0);
@@ -257,13 +256,13 @@ Source_file::line_string (char const *pos_str0) const
 
 void
 Source_file::get_counts (char const *pos_str0,
-                        int *line_number,
-                        int *line_char,
-                        int *column,
-                        int *byte_offset) const
+                         int *line_number,
+                         int *line_char,
+                         int *column,
+                         int *byte_offset) const
 {
   *line_number = 0;
-    
+
   if (!contains (pos_str0))
     return;
 
@@ -286,16 +285,16 @@ Source_file::get_counts (char const *pos_str0,
       size_t thislen = utf8_char_len (*line_chars);
 
       if (thislen == 1 && line_chars[0] == '\t')
-       (*column) = (*column / 8 + 1) * 8;
+        (*column) = (*column / 8 + 1) * 8;
       else
-       (*column)++;
+        (*column)++;
 
       (*line_char)++;
 
       /*
-       To have decent output in UTF-8 aware terminals,
-       we must keep track of the number of bytes from
-       the left edge of the terminal.
+        To have decent output in UTF-8 aware terminals,
+        we must keep track of the number of bytes from
+        the left edge of the terminal.
       */
       *byte_offset += thislen;
 
@@ -322,8 +321,8 @@ Source_file::get_line (char const *pos_str0) const
 
   /* this will find the '\n' character at the end of our line */
   vsize lo = lower_bound (newline_locations_,
-                         pos_str0,
-                         less<char const*> ());
+                          pos_str0,
+                          less<char const *> ());
 
   /* the return value will be indexed from 1 */
   return lo + 1 + line_offset_;
@@ -372,7 +371,6 @@ Source_file::mark_smob (SCM smob)
   return sc->str_port_;
 }
 
-
 int
 Source_file::print_smob (SCM smob, SCM port, scm_print_state *)
 {
index 0b33c92f9ed89da3952bfdf78fe9d34c50e41007..0379e66d83852034f4286675fecdf634e94a42a8 100644 (file)
@@ -29,13 +29,11 @@ Sources::Sources ()
   path_ = 0;
 }
 
-
 Sources::Sources (Sources const &)
 {
   assert (false);
 }
 
-
 void
 Sources::set_path (File_path *f)
 {
@@ -51,27 +49,27 @@ Sources::set_path (File_path *f)
      working directory.
 */
 Source_file *
-Sources::get_file (string file_string, string constcurrent_dir)
-{  
+Sources::get_file (string file_string, string const &current_dir)
+{
   if (file_string != "-")
     {
       // First, check for a path relative to the directory of the
       // file currently being parsed.
       if (current_dir.length ()
-         && file_string.length ()
-         && !File_name (file_string).is_absolute ()
-         && is_file (current_dir + DIRSEP + file_string))
-       file_string = current_dir + DIRSEP + file_string;
+          && file_string.length ()
+          && !File_name (file_string).is_absolute ()
+          && is_file (current_dir + DIRSEP + file_string))
+        file_string = current_dir + DIRSEP + file_string;
 
       // Otherwise, check the rest of the path.
       else if (path_)
-       {
-         string file_string_o = path_->find (file_string);
-         if ((file_string_o == "") && (file_string != ""))
-           return 0;
+        {
+          string file_string_o = path_->find (file_string);
+          if ((file_string_o == "") && (file_string != ""))
+            return 0;
 
-         file_string = file_string_o;
-       }
+          file_string = file_string_o;
+        }
     }
 
   Source_file *f = new Source_file (file_string);
index 268259b0882b4976c3d51bba77c07ea4c39b1483..2bf5ff9fe61ab392da3de51ac30cb399e6bbad1d 100644 (file)
@@ -52,11 +52,11 @@ Spaceable_grob::add_rod (Grob *me, Grob *p, Real d)
     {
       SCM dist = scm_car (s);
       if (scm_car (dist) == p->self_scm ())
-       {
-         scm_set_cdr_x (dist, scm_max (scm_cdr (dist),
-                                       newdist));
-         return;
-       }
+        {
+          scm_set_cdr_x (dist, scm_max (scm_cdr (dist),
+                                        newdist));
+          return;
+        }
     }
 
   if (Paper_column::get_rank (p) < Paper_column::get_rank (me))
@@ -85,31 +85,29 @@ Spaceable_grob::get_spring (Grob *this_col, Grob *next_col)
        s = scm_cdr (s))
     {
       if (scm_is_pair (scm_car (s))
-         && unsmob_grob (scm_cdar (s)) == next_col
-         && unsmob_spring (scm_caar (s)))
-       spring = unsmob_spring (scm_caar (s));
+          && unsmob_grob (scm_cdar (s)) == next_col
+          && unsmob_spring (scm_caar (s)))
+        spring = unsmob_spring (scm_caar (s));
     }
 
   if (!spring)
     programming_error (_f ("No spring between column %d and next one",
-                          Paper_column::get_rank (this_col)));
+                           Paper_column::get_rank (this_col)));
 
   return spring ? *spring : Spring ();
 }
 
-
-
 ADD_INTERFACE (Spaceable_grob,
-              "A layout object that takes part in the spacing problem.",
-
-              /* properties */
-              "allow-loose-spacing "
-              "ideal-distances "
-              "keep-inside-line "
-              "left-neighbor "
-              "measure-length "
-              "minimum-distances "
-              "right-neighbor "
-              "spacing-wishes "
-              );
+               "A layout object that takes part in the spacing problem.",
+
+               /* properties */
+               "allow-loose-spacing "
+               "ideal-distances "
+               "keep-inside-line "
+               "left-neighbor "
+               "measure-length "
+               "minimum-distances "
+               "right-neighbor "
+               "spacing-wishes "
+              );
 
index 6b7773f8de31d475ff8026f49e40f6717575437b..d85cae667997bdee39285349e4aff0aaa056b607 100644 (file)
@@ -47,17 +47,17 @@ Spacing_spanner::standard_breakable_column_spacing (Grob *me, Item *l, Item *r,
       Moment *dt = unsmob_moment (l->get_property ("measure-length"));
       Moment mlen (1);
       if (dt)
-       mlen = *dt;
+        mlen = *dt;
 
       Real incr = robust_scm2double (me->get_property ("spacing-increment"), 1);
       Real space = incr * double (mlen.main_part_ / options->global_shortest_) * 0.8;
       Spring spring = Spring (min_dist + space, min_dist);
 
       /*
-       By default, the spring will have an inverse_stretch_strength of space+min_dist.
-       However, we don't want stretchability to scale with min_dist or else an
-       empty first measure on a line (which has a large min_dist because of the clef)
-       will stretch much more than an empty measure later in the line.
+        By default, the spring will have an inverse_stretch_strength of space+min_dist.
+        However, we don't want stretchability to scale with min_dist or else an
+        empty first measure on a line (which has a large min_dist because of the clef)
+        will stretch much more than an empty measure later in the line.
       */
       spring.set_inverse_stretch_strength (space);
       return spring;
@@ -69,8 +69,8 @@ Spacing_spanner::standard_breakable_column_spacing (Grob *me, Item *l, Item *r,
   if (dt == Moment (0, 0))
     {
       /*
-       In this case, Staff_spacing should handle the job,
-       using dt when it is 0 is silly.
+        In this case, Staff_spacing should handle the job,
+        using dt when it is 0 is silly.
       */
       ideal = min_dist + 0.5;
     }
@@ -83,29 +83,29 @@ Spacing_spanner::standard_breakable_column_spacing (Grob *me, Item *l, Item *r,
 Moment *
 get_measure_length (Grob *column)
 {
-  Grob * sys = column->get_parent (X_AXIS);
+  Grob *sys = column->get_parent (X_AXIS);
 
   extract_grob_set (sys, "columns", cols);
 
   vsize col_idx = Paper_column::get_rank (column);
-  
+
   do
     {
       if (Moment *len = unsmob_moment (cols[col_idx]->get_property ("measure-length")))
-       {
-         return len;
-       }
+        {
+          return len;
+        }
     }
   while (col_idx-- != 0);
-  
+
   return 0;
 }
 
 Real
 Spacing_spanner::note_spacing (Grob * /* me */,
-                              Grob *lc,
-                              Grob *rc,
-                              Spacing_options const *options)
+                               Grob *lc,
+                               Grob *rc,
+                               Spacing_options const *options)
 {
   Moment shortest_playing_len = 0;
   SCM s = lc->get_property ("shortest-playing-duration");
@@ -138,8 +138,8 @@ Spacing_spanner::note_spacing (Grob * /* me */,
       delta_t = min (delta_t, *measure_len);
 
       /*
-       The following is an extra safety measure, such that
-       the length of a mmrest event doesn't cause havoc.
+        The following is an extra safety measure, such that
+        the length of a mmrest event doesn't cause havoc.
       */
       shortest_playing_len = min (shortest_playing_len, *measure_len);
     }
@@ -153,19 +153,19 @@ Spacing_spanner::note_spacing (Grob * /* me */,
   else if (delta_t.grace_part_)
     {
       /*
-       Crude hack for spacing graces: we take the shortest space
-       available (namely the space for the global shortest note), and
-       multiply that by grace-space-factor
+        Crude hack for spacing graces: we take the shortest space
+        available (namely the space for the global shortest note), and
+        multiply that by grace-space-factor
       */
       dist = options->get_duration_space (options->global_shortest_) / 2.0;
       Grob *grace_spacing = unsmob_grob (lc->get_object ("grace-spacing"));
       if (grace_spacing)
-       {
-         Spacing_options grace_opts;
-         grace_opts.init_from_grob (grace_spacing);
-         dist = grace_opts.get_duration_space (delta_t.grace_part_);
-       }
-      
+        {
+          Spacing_options grace_opts;
+          grace_opts.init_from_grob (grace_spacing);
+          dist = grace_opts.get_duration_space (delta_t.grace_part_);
+        }
+
     }
 
   return dist;
index 5a2411b3226a04bdb8450eaee9d17c8e7b4acf00..79551ecac37d5d06aaed4ea40175c413179a1ae2 100644 (file)
@@ -47,7 +47,6 @@ is_loose_column (Grob *l, Grob *col, Grob *r, Spacing_options const *options)
 {
   if (!to_boolean (col->get_property ("allow-loose-spacing")))
     return false;
-  
 
   if ((options->float_nonmusical_columns_
        || options->float_grace_columns_)
@@ -56,7 +55,6 @@ is_loose_column (Grob *l, Grob *col, Grob *r, Spacing_options const *options)
       return true;
     }
 
-  
   if (Paper_column::is_musical (col))
     return false;
 
@@ -92,7 +90,7 @@ is_loose_column (Grob *l, Grob *col, Grob *r, Spacing_options const *options)
      its neighbor (ie. no funny polyphonic stuff), don't make it loose.
   */
   if (l == l_neighbor && r == r_neighbor && col->extent (col, X_AXIS).length () > 0)
-     return false;
+    return false;
 
   /*
     Only declare loose if the bounds make a little sense.  This means
@@ -100,7 +98,7 @@ is_loose_column (Grob *l, Grob *col, Grob *r, Spacing_options const *options)
     nicely folded, but hey, then don't do that.
   */
   if (! ((Paper_column::is_musical (l_neighbor) || Paper_column::is_breakable (l_neighbor))
-        && (Paper_column::is_musical (r_neighbor) || Paper_column::is_breakable (r_neighbor))))
+         && (Paper_column::is_musical (r_neighbor) || Paper_column::is_breakable (r_neighbor))))
     return false;
 
   /*
@@ -111,21 +109,21 @@ is_loose_column (Grob *l, Grob *col, Grob *r, Spacing_options const *options)
     {
       Grob *g = elts[i];
       if (g && Break_alignment_interface::has_interface (g))
-       {
-         extract_grob_set (g, "elements", gelts);
-         for (vsize j = gelts.size (); j--;)
-           {
-             Grob *h = gelts[j];
-
-             if (h && h->get_property ("break-align-symbol") == ly_symbol2scm ("staff-bar"))
-               {
-                 extract_grob_set (h, "elements", helts);
-                 for (vsize k = helts.size (); k--;)
-                   if ("" != robust_scm2string (helts[k]->get_property ("glyph-name"), ""))
-                     return false;
-               }
-           }
-       }
+        {
+          extract_grob_set (g, "elements", gelts);
+          for (vsize j = gelts.size (); j--;)
+            {
+              Grob *h = gelts[j];
+
+              if (h && h->get_property ("break-align-symbol") == ly_symbol2scm ("staff-bar"))
+                {
+                  extract_grob_set (h, "elements", helts);
+                  for (vsize k = helts.size (); k--;)
+                    if ("" != robust_scm2string (helts[k]->get_property ("glyph-name"), ""))
+                      return false;
+                }
+            }
+        }
     }
 
   return true;
@@ -133,8 +131,8 @@ is_loose_column (Grob *l, Grob *col, Grob *r, Spacing_options const *options)
 
 void
 Spacing_spanner::set_distances_for_loose_col (Grob *me, Grob *c,
-                                             Drul_array<Item *> next_door,
-                                             Spacing_options const *options)
+                                              Drul_array<Item *> next_door,
+                                              Spacing_options const *options)
 {
   Direction d = LEFT;
   Drul_array<Real> dists (0, 0);
@@ -146,42 +144,41 @@ Spacing_spanner::set_distances_for_loose_col (Grob *me, Grob *c,
 
       extract_grob_set (lc, "spacing-wishes", wishes);
       for (vsize k = wishes.size (); k--;)
-       {
-         Grob *sp = wishes[k];
-         if (Spacing_interface::left_column (sp) != lc
-             || Spacing_interface::right_column (sp) != rc)
-           continue;
-
-         if (Note_spacing::has_interface (sp))
-           {
-             /*
-               The note spacing should be taken from the musical
-               columns.
-             */
-             Real base = note_spacing (me, lc, rc, options);
-             Spring spring = Note_spacing::get_spacing (sp, rc, base, options->increment_);
-
-             dists[d] = max (dists[d], spring.min_distance ());
-           }
-         else if (Staff_spacing::has_interface (sp))
-           {
-             Spring spring = Staff_spacing::get_spacing (sp, rc);
-
-             dists[d] = max (dists[d], spring.min_distance ());
-           }
-         else
-           programming_error ("Subversive spacing wish");
-       }
+        {
+          Grob *sp = wishes[k];
+          if (Spacing_interface::left_column (sp) != lc
+              || Spacing_interface::right_column (sp) != rc)
+            continue;
+
+          if (Note_spacing::has_interface (sp))
+            {
+              /*
+                The note spacing should be taken from the musical
+                columns.
+              */
+              Real base = note_spacing (me, lc, rc, options);
+              Spring spring = Note_spacing::get_spacing (sp, rc, base, options->increment_);
+
+              dists[d] = max (dists[d], spring.min_distance ());
+            }
+          else if (Staff_spacing::has_interface (sp))
+            {
+              Spring spring = Staff_spacing::get_spacing (sp, rc);
+
+              dists[d] = max (dists[d], spring.min_distance ());
+            }
+          else
+            programming_error ("Subversive spacing wish");
+        }
     }
   while (flip (&d) != LEFT);
 
   Rod r;
   r.distance_ = dists[LEFT] + dists[RIGHT];
   r.item_drul_ = next_door;
-  r.add_to_cols (); 
-}
 
+  r.add_to_cols ();
+}
 
 /*
   Remove columns that are not tightly fitting from COLS. In the
@@ -190,72 +187,71 @@ Spacing_spanner::set_distances_for_loose_col (Grob *me, Grob *c,
 */
 void
 Spacing_spanner::prune_loose_columns (Grob *me,
-                                     vector<Grob*> *cols,
-                                     Spacing_options *options)
+                                      vector<Grob *> *cols,
+                                      Spacing_options *options)
 {
-  vector<Grob*> newcols;
+  vector<Grob *> newcols;
 
   for (vsize i = 0; i < cols->size (); i++)
     {
       Grob *c = cols->at (i);
 
       bool loose = (i > 0 && i + 1 < cols->size ())
-       && is_loose_column (cols->at (i - 1), c, cols->at (i + 1), options);
+                   && is_loose_column (cols->at (i - 1), c, cols->at (i + 1), options);
 
       /* Breakable columns never get pruned; even if they are loose,
         their broken pieces are not.  However, we mark them so that
         the spacing can take their mid-line looseness into account. */
       if (loose && Paper_column::is_breakable (c))
-       {
-         loose = false;
-         c->set_property ("maybe-loose", SCM_BOOL_T);
-       }
+        {
+          loose = false;
+          c->set_property ("maybe-loose", SCM_BOOL_T);
+        }
       /*
-       Unbreakable columns which only contain page-labels also
-       never get pruned, otherwise the labels are lost before they can
-       be collected by the System: so we mark these columns too.
+        Unbreakable columns which only contain page-labels also
+        never get pruned, otherwise the labels are lost before they can
+        be collected by the System: so we mark these columns too.
       */
       if (!loose && !Paper_column::is_breakable (c)
-         && scm_is_pair (c->get_property ("labels")))
-       {
-         extract_grob_set (c, "elements", elts);
-         if (elts.empty ())
-           c->set_property ("maybe-loose", SCM_BOOL_T);
-       }
+          && scm_is_pair (c->get_property ("labels")))
+        {
+          extract_grob_set (c, "elements", elts);
+          if (elts.empty ())
+            c->set_property ("maybe-loose", SCM_BOOL_T);
+        }
 
       if (loose)
-       {
-         Grob *right_neighbor = unsmob_grob (c->get_object ("right-neighbor"));
-         Grob *left_neighbor = unsmob_grob (c->get_object ("left-neighbor"));
-
-         /*
-           Either object can be non existent, if the score ends
-           prematurely.
-         */
-         if (!right_neighbor || !left_neighbor)
-           {
-             c->programming_error ("Cannot determine neighbors for floating column. ");
-             c->set_object ("between-cols", scm_cons (cols->at (i-1)->self_scm (),
-                                                      cols->at (i+1)->self_scm ()));
-           }
-         else
-           {
-             c->set_object ("between-cols", scm_cons (left_neighbor->self_scm (),
-                                                      right_neighbor->self_scm ()));
-
-
-             /*
-               Set distance constraints for loose columns
-             */
-             Drul_array<Item *> next_door (dynamic_cast<Item*> (cols->at (i - 1)),
-                                           dynamic_cast<Item*> (cols->at (i + 1)));
-
-             set_distances_for_loose_col (me, c, next_door, options);
-           }
-       }
+        {
+          Grob *right_neighbor = unsmob_grob (c->get_object ("right-neighbor"));
+          Grob *left_neighbor = unsmob_grob (c->get_object ("left-neighbor"));
+
+          /*
+            Either object can be non existent, if the score ends
+            prematurely.
+          */
+          if (!right_neighbor || !left_neighbor)
+            {
+              c->programming_error ("Cannot determine neighbors for floating column. ");
+              c->set_object ("between-cols", scm_cons (cols->at (i - 1)->self_scm (),
+                                                       cols->at (i + 1)->self_scm ()));
+            }
+          else
+            {
+              c->set_object ("between-cols", scm_cons (left_neighbor->self_scm (),
+                                                       right_neighbor->self_scm ()));
+
+              /*
+                Set distance constraints for loose columns
+              */
+              Drul_array<Item *> next_door (dynamic_cast<Item *> (cols->at (i - 1)),
+                                            dynamic_cast<Item *> (cols->at (i + 1)));
+
+              set_distances_for_loose_col (me, c, next_door, options);
+            }
+        }
 
       if (!loose)
-       newcols.push_back (c);
+        newcols.push_back (c);
     }
 
   *cols = newcols;
@@ -265,35 +261,35 @@ Spacing_spanner::prune_loose_columns (Grob *me,
   Set neighboring columns determined by the spacing-wishes grob property.
 */
 void
-Spacing_spanner::set_explicit_neighbor_columns (vector<Grob*> const &cols)
+Spacing_spanner::set_explicit_neighbor_columns (vector<Grob *> const &cols)
 {
   for (vsize i = 0; i < cols.size (); i++)
     {
       extract_grob_set (cols[i], "spacing-wishes", wishes);
       for (vsize j = wishes.size (); j--;)
-       {
-         Item *wish = dynamic_cast<Item*> (wishes[j]);
-         Item *left_col = wish->get_column ();
-         int left_rank = Paper_column::get_rank (left_col);
-         int min_right_rank = INT_MAX;
-
-         extract_grob_set (wish, "right-items", right_items);
-         for (vsize k = right_items.size (); k--;)
-           {
-             Item *right_col = dynamic_cast<Item*> (right_items[k])->get_column ();
-             int right_rank = Paper_column::get_rank (right_col);
-
-             if (right_rank < min_right_rank)
-               {
-                 left_col->set_object ("right-neighbor", right_col->self_scm ());
-                 min_right_rank = right_rank;
-               }
-
-             Grob *old_left_neighbor = unsmob_grob (right_col->get_object ("left-neighbor"));
-             if (!old_left_neighbor || left_rank > Paper_column::get_rank (old_left_neighbor))
-               right_col->set_object ("left-neighbor", left_col->self_scm ());
-           }
-       }
+        {
+          Item *wish = dynamic_cast<Item *> (wishes[j]);
+          Item *left_col = wish->get_column ();
+          int left_rank = Paper_column::get_rank (left_col);
+          int min_right_rank = INT_MAX;
+
+          extract_grob_set (wish, "right-items", right_items);
+          for (vsize k = right_items.size (); k--;)
+            {
+              Item *right_col = dynamic_cast<Item *> (right_items[k])->get_column ();
+              int right_rank = Paper_column::get_rank (right_col);
+
+              if (right_rank < min_right_rank)
+                {
+                  left_col->set_object ("right-neighbor", right_col->self_scm ());
+                  min_right_rank = right_rank;
+                }
+
+              Grob *old_left_neighbor = unsmob_grob (right_col->get_object ("left-neighbor"));
+              if (!old_left_neighbor || left_rank > Paper_column::get_rank (old_left_neighbor))
+                right_col->set_object ("left-neighbor", left_col->self_scm ());
+            }
+        }
     }
 }
 
@@ -303,17 +299,17 @@ Spacing_spanner::set_explicit_neighbor_columns (vector<Grob*> const &cols)
   Why only these? --jneem
 */
 void
-Spacing_spanner::set_implicit_neighbor_columns (vector<Grob*> const &cols)
+Spacing_spanner::set_implicit_neighbor_columns (vector<Grob *> const &cols)
 {
   for (vsize i = 0; i < cols.size (); i++)
     {
       Item *it = dynamic_cast<Item *> (cols[i]);
       if (!Paper_column::is_breakable (it) && !Paper_column::is_musical (it))
-       continue;
+        continue;
 
       if (i && !unsmob_grob (cols[i]->get_object ("left-neighbor")))
-       cols[i]->set_object ("left-neighbor", cols[i-1]->self_scm ());
+        cols[i]->set_object ("left-neighbor", cols[i - 1]->self_scm ());
       if (i + 1 < cols.size () && !unsmob_grob (cols[i]->get_object ("right-neighbor")))
-       cols[i]->set_object ("right-neighbor", cols[i+1]->self_scm ());
+        cols[i]->set_object ("right-neighbor", cols[i + 1]->self_scm ());
     }
 }
index 65cea5cbeca7cc2bb8e180db0fa58fc0aff3f92b..c9049f3398e9498cc4e28495637c26def8dfa34f 100644 (file)
@@ -53,7 +53,7 @@ compare (Rhythmic_tuple const &a, Rhythmic_tuple const &b)
 
 int
 Rhythmic_tuple::time_compare (Rhythmic_tuple const &h1,
-                             Rhythmic_tuple const &h2)
+                              Rhythmic_tuple const &h2)
 {
   return (h1.end_ - h2.end_).main_part_.sign ();
 }
@@ -72,7 +72,7 @@ class Spacing_engraver : public Engraver
   Moment now_;
   Spanner *spacing_;
   Stream_event *start_section_;
-  
+
   TRANSLATOR_DECLARATIONS (Spacing_engraver);
 
 protected:
@@ -111,7 +111,7 @@ Spacing_engraver::process_music ()
 {
   if (start_section_ && spacing_)
     stop_spanner ();
-  
+
   if (!spacing_)
     start_spanner ();
 }
@@ -121,10 +121,9 @@ Spacing_engraver::start_spanner ()
 {
   assert (!spacing_);
 
-
   spacing_ = make_spanner ("SpacingSpanner", SCM_EOL);
   spacing_->set_bound (LEFT,
-                      unsmob_grob (get_property ("currentCommandColumn")));
+                       unsmob_grob (get_property ("currentCommandColumn")));
 }
 
 void
@@ -160,7 +159,7 @@ Spacing_engraver::acknowledge_staff_spacing (Grob_info i)
 void
 Spacing_engraver::acknowledge_rhythmic_grob (Grob_info i)
 {
- add_starter_duration (i);  
+  add_starter_duration (i);
 }
 
 void
@@ -169,7 +168,6 @@ Spacing_engraver::acknowledge_rhythmic_head (Grob_info i)
   add_starter_duration (i);
 }
 
-
 void
 Spacing_engraver::add_starter_duration (Grob_info i)
 {
@@ -184,11 +182,11 @@ Spacing_engraver::add_starter_duration (Grob_info i)
     {
       Stream_event *r = i.event_cause ();
       if (r && r->in_event_class ("rhythmic-event"))
-       {
-         Moment len = get_event_length (r, now_);
-         Rhythmic_tuple t (i, now_mom () + len);
-         now_durations_.push_back (t);
-       }
+        {
+          Moment len = get_event_length (r, now_);
+          Rhythmic_tuple t (i, now_mom () + len);
+          now_durations_.push_back (t);
+        }
     }
 }
 
@@ -198,14 +196,13 @@ Spacing_engraver::stop_translation_timestep ()
   Paper_column *musical_column
     = dynamic_cast<Paper_column *> (unsmob_grob (get_property ("currentMusicalColumn")));
 
-
   if (!spacing_)
     start_spanner ();
 
   musical_column->set_object ("spacing", spacing_->self_scm ());
   unsmob_grob (get_property ("currentCommandColumn"))
-    ->set_object ("spacing", spacing_->self_scm ());
-  
+  ->set_object ("spacing", spacing_->self_scm ());
+
   SCM proportional = get_property ("proportionalNotationDuration");
   if (unsmob_moment (proportional))
     {
@@ -221,11 +218,11 @@ Spacing_engraver::stop_translation_timestep ()
     {
       Stream_event *ev = playing_durations_[i].info_.event_cause ();
       if (ev)
-       {
-         Moment now = now_mom ();
-         Moment m = get_event_length (ev);
-         shortest_playing = min (shortest_playing, m);
-       }
+        {
+          Moment now = now_mom ();
+          Moment m = get_event_length (ev);
+          shortest_playing = min (shortest_playing, m);
+        }
     }
   Moment starter;
   starter.set_infinite (1);
@@ -234,10 +231,10 @@ Spacing_engraver::stop_translation_timestep ()
     {
       Moment m = get_event_length (now_durations_[i].info_.event_cause ());
       if (m.to_bool ())
-       {
-         starter = min (starter, m);
-         playing_durations_.insert (now_durations_[i]);
-       }
+        {
+          starter = min (starter, m);
+          playing_durations_.insert (now_durations_[i]);
+        }
     }
   now_durations_.clear ();
 
@@ -251,8 +248,6 @@ Spacing_engraver::stop_translation_timestep ()
   musical_column->set_property ("shortest-starter-duration", st);
 }
 
-
-
 void
 Spacing_engraver::start_translation_timestep ()
 {
@@ -260,7 +255,7 @@ Spacing_engraver::start_translation_timestep ()
 
   now_ = now_mom ();
   stopped_durations_.clear ();
-  
+
   while (playing_durations_.size () && playing_durations_.front ().end_ < now_)
     playing_durations_.delmin ();
   while (playing_durations_.size () && playing_durations_.front ().end_ == now_)
@@ -273,18 +268,18 @@ ADD_ACKNOWLEDGER (Spacing_engraver, rhythmic_head);
 ADD_ACKNOWLEDGER (Spacing_engraver, rhythmic_grob);
 
 ADD_TRANSLATOR (Spacing_engraver,
-               /* doc */
-               "Make a @code{SpacingSpanner} and do bookkeeping of shortest"
-               " starting and playing notes.",
-
-               /* create */
-               "SpacingSpanner ",
-
-               /* read */
-               "currentMusicalColumn "
-               "currentCommandColumn "
-               "proportionalNotationDuration ",
-               
-               /* write */
-               ""
-               );
+                /* doc */
+                "Make a @code{SpacingSpanner} and do bookkeeping of shortest"
+                " starting and playing notes.",
+
+                /* create */
+                "SpacingSpanner ",
+
+                /* read */
+                "currentMusicalColumn "
+                "currentCommandColumn "
+                "proportionalNotationDuration ",
+
+                /* write */
+                ""
+               );
index f9d3287cb0cf45f1b20846332a7adb59be29e02f..944618bf5b48a6414c54f6f965e887832715647e 100644 (file)
@@ -44,49 +44,49 @@ Spacing_interface::skylines (Grob *me, Grob *right_col)
   */
 
   Grob *orig = me->original () ? me->original () : me;
-  Drul_array<Direction> break_dirs (dynamic_cast<Item*> (me)->break_status_dir (),
-                                   dynamic_cast<Item*> (right_col)->break_status_dir ());
+  Drul_array<Direction> break_dirs (dynamic_cast<Item *> (me)->break_status_dir (),
+                                    dynamic_cast<Item *> (right_col)->break_status_dir ());
   Drul_array<Skyline> skylines = Drul_array<Skyline> (Skyline (RIGHT), Skyline (LEFT));
-  Drul_array<vector<Grob*> > items (ly_scm2link_array (orig->get_object ("left-items")),
-                                   ly_scm2link_array (orig->get_object ("right-items")));
+  Drul_array<vector<Grob *> > items (ly_scm2link_array (orig->get_object ("left-items")),
+                                     ly_scm2link_array (orig->get_object ("right-items")));
 
   Grob *system = me->get_system ();
-  Grob *left_col = dynamic_cast<Item*> (me)->get_column ();
+  Grob *left_col = dynamic_cast<Item *> (me)->get_column ();
 
-  Drul_array<Grob*> columns (left_col, right_col);
+  Drul_array<Grob *> columns (left_col, right_col);
 
   Direction d = LEFT;
   do
     {
       for (vsize i = 0; i < items[d].size (); i++)
-       {
-         Item *g = dynamic_cast<Item*> (items[d][i]);
-         if (g)
-           if (Item *piece = g->find_prebroken_piece (break_dirs[d]))
-             g = piece;
-
-         if (g && Separation_item::has_interface (g) && g->get_column () == columns[d])
-           {
-             SCM sky_scm = g->get_property ("horizontal-skylines");
-             Skyline_pair *sky = Skyline_pair::unsmob (sky_scm);
-
-             extract_grob_set (g, "elements", elts);
-             Grob *ycommon = common_refpoint_of_array (elts, g, Y_AXIS);
-             Real shift = ycommon->pure_relative_y_coordinate (system, 0, INT_MAX);
-
-             skylines[d].shift (-shift);
-
-             if (sky)
-               skylines[d].merge ((*sky)[-d]);
-             else
-               programming_error ("separation item has no skyline");
-
-             if (d == RIGHT && items[LEFT].size ())
-               skylines[d].merge (Separation_item::conditional_skyline (items[d][i], items[LEFT][0]));
-
-             skylines[d].shift (shift);
-           }
-       }
+        {
+          Item *g = dynamic_cast<Item *> (items[d][i]);
+          if (g)
+            if (Item *piece = g->find_prebroken_piece (break_dirs[d]))
+              g = piece;
+
+          if (g && Separation_item::has_interface (g) && g->get_column () == columns[d])
+            {
+              SCM sky_scm = g->get_property ("horizontal-skylines");
+              Skyline_pair *sky = Skyline_pair::unsmob (sky_scm);
+
+              extract_grob_set (g, "elements", elts);
+              Grob *ycommon = common_refpoint_of_array (elts, g, Y_AXIS);
+              Real shift = ycommon->pure_relative_y_coordinate (system, 0, INT_MAX);
+
+              skylines[d].shift (-shift);
+
+              if (sky)
+                skylines[d].merge ((*sky)[-d]);
+              else
+                programming_error ("separation item has no skyline");
+
+              if (d == RIGHT && items[LEFT].size ())
+                skylines[d].merge (Separation_item::conditional_skyline (items[d][i], items[LEFT][0]));
+
+              skylines[d].shift (shift);
+            }
+        }
     }
   while (flip (&d) != LEFT);
 
@@ -121,10 +121,10 @@ Spacing_interface::right_column (Grob *me)
       int rank = Paper_column::get_rank (col);
 
       if (rank < min_rank)
-       {
-         min_rank = rank;
-         mincol = col;
-       }
+        {
+          min_rank = rank;
+          mincol = col;
+        }
     }
 
   return mincol;
@@ -139,35 +139,35 @@ Spacing_interface::left_column (Grob *me)
   return dynamic_cast<Item *> (me)->get_column ();
 }
 
-static vector<Item*>
-get_note_columns (vector<Grob*> const &elts)
+static vector<Item *>
+get_note_columns (vector<Grob *> const &elts)
 {
-  vector<Item*> ret;
+  vector<Item *> ret;
 
   for (vsize i = 0; i < elts.size (); i++)
     {
       if (Note_column::has_interface (elts[i]))
-       ret.push_back (dynamic_cast<Item*> (elts[i]));
+        ret.push_back (dynamic_cast<Item *> (elts[i]));
       else if (Separation_item::has_interface (elts[i]))
-       {
-         extract_grob_set (elts[i], "elements", more_elts);
-         vector<Item*> ncs = get_note_columns (more_elts);
+        {
+          extract_grob_set (elts[i], "elements", more_elts);
+          vector<Item *> ncs = get_note_columns (more_elts);
 
-         ret.insert (ret.end (), ncs.begin (), ncs.end ());
-       }
+          ret.insert (ret.end (), ncs.begin (), ncs.end ());
+        }
     }
 
   return ret;
 }
 
-vector<Item*>
+vector<Item *>
 Spacing_interface::right_note_columns (Grob *me)
 {
   extract_grob_set (me, "right-items", elts);
   return get_note_columns (elts);
 }
 
-vector<Item*>
+vector<Item *>
 Spacing_interface::left_note_columns (Grob *me)
 {
   extract_grob_set (me, "left-items", elts);
@@ -180,9 +180,9 @@ Spacing_interface::left_note_columns (Grob *me)
 */
 Grob *
 Spacing_interface::extremal_break_aligned_grob (Grob *me,
-                                               Direction d,
-                                               Direction break_dir,
-                                               Interval *last_ext)
+                                                Direction d,
+                                                Direction break_dir,
+                                                Interval *last_ext)
 {
   Grob *col = 0;
   last_ext->set_empty ();
@@ -192,39 +192,38 @@ Spacing_interface::extremal_break_aligned_grob (Grob *me,
 
   for (vsize i = elts.size (); i--;)
     {
-      Item *break_item = dynamic_cast<Item*> (elts[i]);
+      Item *break_item = dynamic_cast<Item *> (elts[i]);
 
       if (break_item->break_status_dir () != break_dir)
-       break_item = break_item->find_prebroken_piece (break_dir);
+        break_item = break_item->find_prebroken_piece (break_dir);
 
       if (!break_item || !scm_is_pair (break_item->get_property ("space-alist")))
-       continue;
+        continue;
 
       if (!col)
-       col = dynamic_cast<Item*> (elts[0])->get_column ()->find_prebroken_piece (break_dir);
+        col = dynamic_cast<Item *> (elts[0])->get_column ()->find_prebroken_piece (break_dir);
 
       Interval ext = break_item->extent (col, X_AXIS);
 
       if (ext.is_empty ())
-       continue;
+        continue;
 
       if (!last_grob
-         || (last_grob && d * (ext[-d]- (*last_ext)[-d]) < 0))
-       {
-         *last_ext = ext;
-         last_grob = break_item;
-       }
+          || (last_grob && d * (ext[-d] - (*last_ext)[-d]) < 0))
+        {
+          *last_ext = ext;
+          last_grob = break_item;
+        }
     }
 
   return last_grob;
 }
 
-
 ADD_INTERFACE (Spacing_interface,
-              "This object calculates the desired and minimum distances"
-              " between two columns.",
+               "This object calculates the desired and minimum distances"
+               " between two columns.",
 
-              /* properties */
-              "left-items "
-              "right-items "
-              );
+               /* properties */
+               "left-items "
+               "right-items "
+              );
index 03cac8431c0b26858eedd1286c3539ff5e980ed9..fb5e326369e5caaf79c6e19a4d5ff95ca793126b 100644 (file)
@@ -48,135 +48,134 @@ set_loose_columns (System *which, Column_x_positions const *posns)
       Item *left = 0;
       Item *right = 0;
 
-      vector<Item*> clique;
+      vector<Item *> clique;
       while (1)
-       {
-         SCM between = loose->get_object ("between-cols");
-         if (!scm_is_pair (between))
-           break;
+        {
+          SCM between = loose->get_object ("between-cols");
+          if (!scm_is_pair (between))
+            break;
 
-         /* If the line was broken at one of the loose columns, split
-            the clique at that column. */
-         if (!loose->get_system ())
-           break;
+          /* If the line was broken at one of the loose columns, split
+             the clique at that column. */
+          if (!loose->get_system ())
+            break;
 
-         Paper_column *le = dynamic_cast<Paper_column *> (unsmob_grob (scm_car (between)));
-         Paper_column *re = dynamic_cast<Paper_column *> (unsmob_grob (scm_cdr (between)));
+          Paper_column *le = dynamic_cast<Paper_column *> (unsmob_grob (scm_car (between)));
+          Paper_column *re = dynamic_cast<Paper_column *> (unsmob_grob (scm_cdr (between)));
 
-         if (! (le && re))
-           break;
+          if (! (le && re))
+            break;
 
-         if (!left && le)
-           {
-             left = le->get_column ();
-             if (!left->get_system ())
-               left = left->find_prebroken_piece (RIGHT);
+          if (!left && le)
+            {
+              left = le->get_column ();
+              if (!left->get_system ())
+                left = left->find_prebroken_piece (RIGHT);
 
-             clique.push_back (left);
-           }
+              clique.push_back (left);
+            }
 
-         clique.push_back (loose);
+          clique.push_back (loose);
 
-         divide_over++;
-         loose = right = re->get_column ();
-       }
+          divide_over++;
+          loose = right = re->get_column ();
+        }
 
       if (!right)
-       {
-         programming_error ("Can't attach loose column sensibly. Attaching to end of system.");
-         right = which->get_bound (RIGHT);
-       }
+        {
+          programming_error ("Can't attach loose column sensibly. Attaching to end of system.");
+          right = which->get_bound (RIGHT);
+        }
 
       if (right->get_system ())
-       ; /* do nothing */
+        ; /* do nothing */
       else if (right->find_prebroken_piece (LEFT)
-              && right->find_prebroken_piece (LEFT)->get_system () == which)
-       right = right->find_prebroken_piece (LEFT);
+               && right->find_prebroken_piece (LEFT)->get_system () == which)
+        right = right->find_prebroken_piece (LEFT);
       else if (Paper_column::get_rank (which->get_bound (RIGHT)) < Paper_column::get_rank (right))
-       right = which->get_bound (RIGHT);
+        right = which->get_bound (RIGHT);
       else
-       {
-         clique.back ()->programming_error ("Loose column does not have right side to attach to.");
-         System *base_system = dynamic_cast<System*> (which->original ());
-         int j = Paper_column::get_rank (clique.back ()) + 1;
-         int end_rank = Paper_column::get_rank (which->get_bound (RIGHT));
-         extract_grob_set (base_system, "columns", base_cols);
-         for (; j < end_rank; j++)
-           {
-             if (base_cols[j]->get_system () == which)
-               right = dynamic_cast<Item*> ((Grob*)base_cols[j]);
-           }
-       }
-      
+        {
+          clique.back ()->programming_error ("Loose column does not have right side to attach to.");
+          System *base_system = dynamic_cast<System *> (which->original ());
+          int j = Paper_column::get_rank (clique.back ()) + 1;
+          int end_rank = Paper_column::get_rank (which->get_bound (RIGHT));
+          extract_grob_set (base_system, "columns", base_cols);
+          for (; j < end_rank; j++)
+            {
+              if (base_cols[j]->get_system () == which)
+                right = dynamic_cast<Item *> ((Grob *)base_cols[j]);
+            }
+        }
+
       Grob *common = right->common_refpoint (left, X_AXIS);
 
       clique.push_back (right);
 
       vector<Real> clique_spacing;
       clique_spacing.push_back (0.0);
-      for (vsize j = 1; j + 1 < clique.size (); j ++)
-       {
-         Grob *clique_col = clique[j];
-
-         Paper_column *loose_col = dynamic_cast<Paper_column *> (clique[j]);
-         Paper_column *next_col = dynamic_cast<Paper_column *> (clique[j + 1]);
-
-         Grob *spacing = unsmob_grob (clique_col->get_object ("spacing"));
-         if (Grob *grace_spacing = unsmob_grob (clique_col->get_object ("grace-spacing")))
-           {
-             spacing = grace_spacing;
-           }
-         
-         Spacing_options options;
-         if (spacing)
-           options.init_from_grob (spacing);
-         else
-           programming_error ("Column without spacing object");
-
-         Real base_note_space = 0.0;
-
-         if (Paper_column::is_musical (next_col)
-             && Paper_column::is_musical (loose_col))
-           base_note_space = Spacing_spanner::note_spacing (spacing, loose_col, next_col,
-                                                            &options);
-         else
-           {
-             Spring spring = Spacing_spanner::standard_breakable_column_spacing (spacing,
-                                                                                 loose_col, next_col,
-                                                                                 &options);
-
-             base_note_space = spring.distance ();
-           }
-
-         base_note_space = max (base_note_space,
-                                robust_relative_extent (loose_col, loose_col, X_AXIS)[RIGHT]
-                                - robust_relative_extent (next_col, next_col, X_AXIS)[LEFT]);
-         
-         clique_spacing.push_back (base_note_space);
-       }
+      for (vsize j = 1; j + 1 < clique.size (); j++)
+        {
+          Grob *clique_col = clique[j];
+
+          Paper_column *loose_col = dynamic_cast<Paper_column *> (clique[j]);
+          Paper_column *next_col = dynamic_cast<Paper_column *> (clique[j + 1]);
+
+          Grob *spacing = unsmob_grob (clique_col->get_object ("spacing"));
+          if (Grob *grace_spacing = unsmob_grob (clique_col->get_object ("grace-spacing")))
+            {
+              spacing = grace_spacing;
+            }
+
+          Spacing_options options;
+          if (spacing)
+            options.init_from_grob (spacing);
+          else
+            programming_error ("Column without spacing object");
+
+          Real base_note_space = 0.0;
+
+          if (Paper_column::is_musical (next_col)
+              && Paper_column::is_musical (loose_col))
+            base_note_space = Spacing_spanner::note_spacing (spacing, loose_col, next_col,
+                                                             &options);
+          else
+            {
+              Spring spring = Spacing_spanner::standard_breakable_column_spacing (spacing,
+                              loose_col, next_col,
+                              &options);
+
+              base_note_space = spring.distance ();
+            }
+
+          base_note_space = max (base_note_space,
+                                 robust_relative_extent (loose_col, loose_col, X_AXIS)[RIGHT]
+                                 - robust_relative_extent (next_col, next_col, X_AXIS)[LEFT]);
+
+          clique_spacing.push_back (base_note_space);
+        }
 
       Real default_padding = 1.0;
       clique_spacing.push_back (default_padding);
 
       Real right_point = robust_relative_extent (clique.back (), common, X_AXIS)[LEFT];
-      
-         
+
       Grob *finished_right_column = clique.back ();
-      
+
       for (vsize j = clique.size () - 2; j > 0; j--)
-       {
-         Paper_column *clique_col = dynamic_cast<Paper_column *> (clique[j]);
-         
-         right_point = finished_right_column->relative_coordinate (common, X_AXIS);
+        {
+          Paper_column *clique_col = dynamic_cast<Paper_column *> (clique[j]);
+
+          right_point = finished_right_column->relative_coordinate (common, X_AXIS);
+
+          Real distance_to_next = clique_spacing[j];
 
-         Real distance_to_next = clique_spacing[j];
-         
-         Real my_offset = right_point - distance_to_next;
+          Real my_offset = right_point - distance_to_next;
 
-         clique_col->translate_axis (my_offset - clique_col->relative_coordinate (common, X_AXIS), X_AXIS);      
+          clique_col->translate_axis (my_offset - clique_col->relative_coordinate (common, X_AXIS), X_AXIS);
 
-         finished_right_column = clique_col;
-       }
+          finished_right_column = clique_col;
+        }
     }
 }
 
index 934acb20cc2bf0a803ccecaf910000755197254a..8719e4cc6b067f21218b512e59a4e3966c92f787 100644 (file)
@@ -38,9 +38,8 @@ Spacing_options::init_from_grob (Grob *me)
     = to_boolean (me->get_property ("strict-grace-spacing"));
   shortest_duration_space_ = robust_scm2double (me->get_property ("shortest-duration-space"), 1);
 
-
   Moment shortest_dur = robust_scm2moment (me->get_property ("common-shortest-duration"),
-                                          Moment (Rational (1,8), Rational (1,16)));
+                                           Moment (Rational (1, 8), Rational (1, 16)));
 
   if (shortest_dur.main_part_)
     global_shortest_ = shortest_dur.main_part_;
@@ -61,8 +60,6 @@ Spacing_options::Spacing_options ()
   global_shortest_ = Rational (1, 8);
 }
 
-
-
 /*
   Get the measure wide ant for arithmetic spacing.
 */
@@ -74,18 +71,18 @@ Spacing_options::get_duration_space (Rational d) const
   if (d < global_shortest_)
     {
       /*
-       We don't space really short notes using the log of the
-       duration, since it would disproportionally stretches the long
-       notes in a piece. In stead, we use geometric spacing with constant 0.5
-       (i.e. linear.)
+        We don't space really short notes using the log of the
+        duration, since it would disproportionally stretches the long
+        notes in a piece. In stead, we use geometric spacing with constant 0.5
+        (i.e. linear.)
 
-       This should probably be tunable, to use other base numbers.
+        This should probably be tunable, to use other base numbers.
 
-       In Mozart hrn3 by EB., we have 8th note = 3.9 mm (total), 16th note =
-       3.6 mm (total).  head-width = 2.4, so we 1.2mm for 16th, 1.5
-       mm for 8th. (white space), suggesting that we use
+        In Mozart hrn3 by EB., we have 8th note = 3.9 mm (total), 16th note =
+        3.6 mm (total).  head-width = 2.4, so we 1.2mm for 16th, 1.5
+        mm for 8th. (white space), suggesting that we use
 
-       (1.2 / 1.5)^{-log2(duration ratio)}
+        (1.2 / 1.5)^{-log2(duration ratio)}
 
 
       */
@@ -96,9 +93,9 @@ Spacing_options::get_duration_space (Rational d) const
   else
     {
       /*
-       John S. Gourlay. ``Spacing a Line of Music, '' Technical
-       Report OSU-CISRC-10/87-TR35, Department of Computer and
-       Information Science, The Ohio State University, 1987.
+        John S. Gourlay. ``Spacing a Line of Music, '' Technical
+        Report OSU-CISRC-10/87-TR35, Department of Computer and
+        Information Science, The Ohio State University, 1987.
       */
       Real log = log_2 (global_shortest_);
       k -= log;
index 0395506bbcb79dbecc9e1423e08bcee9d821bdc0..75dc166925eb5a2e6ab1d9057688eb277548c4d8 100644 (file)
 #include "system.hh"
 #include "warn.hh"
 
-vector<Grob*>
+vector<Grob *>
 Spacing_spanner::get_columns (Grob *me_grob)
 {
-  Spanner *me = dynamic_cast<Spanner*> (me_grob);
-  vector<Grob*> all (get_root_system (me)->used_columns ());
-  vsize start = binary_search (all, (Grob*)me->get_bound (LEFT),
-                              &Paper_column::less_than);
-  vsize end = binary_search (all, (Grob*) me->get_bound (RIGHT),
-                            &Paper_column::less_than);  
-  
-  all = vector<Grob*> (all.begin () + start,
-                      all.begin () + end + 1);
+  Spanner *me = dynamic_cast<Spanner *> (me_grob);
+  vector<Grob *> all (get_root_system (me)->used_columns ());
+  vsize start = binary_search (all, (Grob *)me->get_bound (LEFT),
+                               &Paper_column::less_than);
+  vsize end = binary_search (all, (Grob *) me->get_bound (RIGHT),
+                             &Paper_column::less_than);
+
+  all = vector<Grob *> (all.begin () + start,
+                        all.begin () + end + 1);
   return all;
 }
 
@@ -65,7 +65,7 @@ Spacing_spanner::set_springs (SCM smob)
   */
   Spacing_options options;
   options.init_from_grob (me);
-  vector<Grob*> cols = Spacing_spanner::get_columns (me);
+  vector<Grob *> cols = Spacing_spanner::get_columns (me);
   set_explicit_neighbor_columns (cols);
 
   prune_loose_columns (me, &cols, &options);
@@ -86,13 +86,13 @@ Spacing_spanner::set_springs (SCM smob)
 */
 
 MAKE_SCHEME_CALLBACK (Spacing_spanner, calc_common_shortest_duration, 1);
-SCM 
+SCM
 Spacing_spanner::calc_common_shortest_duration (SCM grob)
 {
   Spanner *me = unsmob_spanner (grob);
 
-  vector<Grob*> cols (get_columns (me));
-  
+  vector<Grob *> cols (get_columns (me));
+
   /*
     ascending in duration
   */
@@ -105,47 +105,47 @@ Spacing_spanner::calc_common_shortest_duration (SCM grob)
   for (vsize i = 0; i < cols.size (); i++)
     {
       if (Paper_column::is_musical (cols[i]))
-       {
-         Moment *when = unsmob_moment (cols[i]->get_property ("when"));
-
-         /*
-           ignore grace notes for shortest notes.
-         */
-         if (when && when->grace_part_)
-           continue;
-
-         SCM st = cols[i]->get_property ("shortest-starter-duration");
-         Moment this_shortest = *unsmob_moment (st);
-         assert (this_shortest.to_bool ());
-         shortest_in_measure = min (shortest_in_measure, this_shortest.main_part_);
-       }
+        {
+          Moment *when = unsmob_moment (cols[i]->get_property ("when"));
+
+          /*
+            ignore grace notes for shortest notes.
+          */
+          if (when && when->grace_part_)
+            continue;
+
+          SCM st = cols[i]->get_property ("shortest-starter-duration");
+          Moment this_shortest = *unsmob_moment (st);
+          assert (this_shortest.to_bool ());
+          shortest_in_measure = min (shortest_in_measure, this_shortest.main_part_);
+        }
       else if (!shortest_in_measure.is_infinity ()
-              && Paper_column::is_breakable (cols[i]))
-       {
-         vsize j = 0;
-         for (; j < durations.size (); j++)
-           {
-             if (durations[j] > shortest_in_measure)
-               {
-                 counts.insert (counts.begin () + j, 1);
-                 durations.insert (durations.begin () + j, shortest_in_measure);
-                 break;
-               }
-             else if (durations[j] == shortest_in_measure)
-               {
-                 counts[j]++;
-                 break;
-               }
-           }
-
-         if (durations.size () == j)
-           {
-             durations.push_back (shortest_in_measure);
-             counts.push_back (1);
-           }
-
-         shortest_in_measure.set_infinite (1);
-       }
+               && Paper_column::is_breakable (cols[i]))
+        {
+          vsize j = 0;
+          for (; j < durations.size (); j++)
+            {
+              if (durations[j] > shortest_in_measure)
+                {
+                  counts.insert (counts.begin () + j, 1);
+                  durations.insert (durations.begin () + j, shortest_in_measure);
+                  break;
+                }
+              else if (durations[j] == shortest_in_measure)
+                {
+                  counts[j]++;
+                  break;
+                }
+            }
+
+          if (durations.size () == j)
+            {
+              durations.push_back (shortest_in_measure);
+              counts.push_back (1);
+            }
+
+          shortest_in_measure.set_infinite (1);
+        }
     }
 
   vsize max_idx = VPOS;
@@ -153,10 +153,10 @@ Spacing_spanner::calc_common_shortest_duration (SCM grob)
   for (vsize i = durations.size (); i--;)
     {
       if (counts[i] >= max_count)
-       {
-         max_idx = i;
-         max_count = counts[i];
-       }
+        {
+          max_idx = i;
+          max_count = counts[i];
+        }
     }
 
   SCM bsd = me->get_property ("base-shortest-duration");
@@ -172,144 +172,143 @@ Spacing_spanner::calc_common_shortest_duration (SCM grob)
 
 void
 Spacing_spanner::generate_pair_spacing (Grob *me,
-                                       Paper_column *left_col, Paper_column *right_col,
-                                       Paper_column *after_right_col,
-                                       Spacing_options const *options)
+                                        Paper_column *left_col, Paper_column *right_col,
+                                        Paper_column *after_right_col,
+                                        Spacing_options const *options)
 {
   if (Paper_column::is_musical (left_col))
     {
       if (!Paper_column::is_musical (right_col)
-         && (options->float_nonmusical_columns_ || to_boolean (right_col->get_property ("maybe-loose")))
-         && after_right_col
-         && Paper_column::is_musical (after_right_col))
-       {
-         /*
-           TODO: should generate rods to prevent collisions.
-         */
-         musical_column_spacing (me, left_col, after_right_col, options);
-         right_col->set_object ("between-cols", scm_cons (left_col->self_scm (),
-                                                          after_right_col->self_scm ()));
-       }
+          && (options->float_nonmusical_columns_ || to_boolean (right_col->get_property ("maybe-loose")))
+          && after_right_col
+          && Paper_column::is_musical (after_right_col))
+        {
+          /*
+            TODO: should generate rods to prevent collisions.
+          */
+          musical_column_spacing (me, left_col, after_right_col, options);
+          right_col->set_object ("between-cols", scm_cons (left_col->self_scm (),
+                                                           after_right_col->self_scm ()));
+        }
       else
-       musical_column_spacing (me, left_col, right_col, options);
+        musical_column_spacing (me, left_col, right_col, options);
 
       if (Item *rb = right_col->find_prebroken_piece (LEFT))
-       musical_column_spacing (me, left_col, rb, options);
+        musical_column_spacing (me, left_col, rb, options);
     }
   else
     {
       /*
-       The case that the right part is broken as well is rather
-       rare, but it is possible, eg. with a single empty measure,
-       or if one staff finishes a tad earlier than the rest.
+        The case that the right part is broken as well is rather
+        rare, but it is possible, eg. with a single empty measure,
+        or if one staff finishes a tad earlier than the rest.
       */
       Item *lb = left_col->find_prebroken_piece (RIGHT);
       Item *rb = right_col->find_prebroken_piece (LEFT);
 
       if (left_col && right_col)
-       breakable_column_spacing (me, left_col, right_col, options);
+        breakable_column_spacing (me, left_col, right_col, options);
 
       if (lb && right_col)
-       breakable_column_spacing (me, lb, right_col, options);
+        breakable_column_spacing (me, lb, right_col, options);
 
       if (left_col && rb)
-       breakable_column_spacing (me, left_col, rb, options);
+        breakable_column_spacing (me, left_col, rb, options);
 
       if (lb && rb)
-       breakable_column_spacing (me, lb, rb, options);
+        breakable_column_spacing (me, lb, rb, options);
     }
 }
 
 static void
-set_column_rods (vector<Grob*> const &cols, Real padding)
+set_column_rods (vector<Grob *> const &cols, Real padding)
 {
   /* distances[i] will be the minimum distance between column i and column i+1 */
   vector<Real> distances;
 
   for (vsize i = 1; i < cols.size (); i++)
     {
-      assert (distances.size () == i-1);
+      assert (distances.size () == i - 1);
 
-      Item *r = dynamic_cast<Item*> (cols[i]);
+      Item *r = dynamic_cast<Item *> (cols[i]);
       Item *rb = r->find_prebroken_piece (LEFT);
 
       if (Separation_item::is_empty (r) && (!rb || Separation_item::is_empty (rb)))
-       {
-         distances.push_back (0);
-         continue;
-       }
+        {
+          distances.push_back (0);
+          continue;
+        }
 
       Skyline_pair *skys = Skyline_pair::unsmob (r->get_property ("horizontal-skylines"));
       Real right_stickout = skys ? (*skys)[LEFT].max_height () : 0.0;
 
       /* min rather than max because right-stickout will be negative if the right-hand column
-        sticks out a lot to the left */
+         sticks out a lot to the left */
       right_stickout = min (right_stickout,
-                           Separation_item::conditional_skyline (r, cols[i-1]).max_height ());
+                            Separation_item::conditional_skyline (r, cols[i - 1]).max_height ());
 
-      Drul_array<Item*> r_cols (r, rb);
+      Drul_array<Item *> r_cols (r, rb);
       Drul_array<Real> cur_dist (0.0, 0.0);
 
       /* This is an inner loop and hence it is potentially quadratic. However, we only continue
-        as long as there is a rod to insert. Therefore, this loop will usually only execute
-        a constant number of times per iteration of the outer loop. */
+         as long as there is a rod to insert. Therefore, this loop will usually only execute
+         a constant number of times per iteration of the outer loop. */
       for (vsize j = i; j--;)
-       {
-         Item *l = dynamic_cast<Item*> (cols[j]);
-         Item *lb = l->find_prebroken_piece (RIGHT);
-         Skyline_pair *skys = Skyline_pair::unsmob (l->get_property ("horizontal-skylines"));
-         Real left_stickout = skys ? (*skys)[RIGHT].max_height () : 0.0;
-         bool done = true;
-
-         Direction d = LEFT;
-         do
-           {
-             if (j < i-1)
-               cur_dist[d] += distances[j];
-
-             Item *r_col = r_cols[d];
-             bool touches = right_stickout - left_stickout + cur_dist[d] < 0.0;
-             Real dist = 0.0;
-
-             /* we set a distance for the line-starter column even if its non-broken counterpart
-                doesn't touch the right column. */
-             if (lb)
-               Separation_item::set_distance (lb, r_col, padding);
-
-             if (touches || j == i-1)
-               dist = Separation_item::set_distance (l, r_col, padding);
-
-             if (j == i-1 && d == LEFT)
-               distances.push_back (dist);
-
-             if (j == i-1)
-               cur_dist[d] = distances[j];
-
-             cur_dist[d] = max (cur_dist[d], dist);
-             done = done && !touches;
-           }
-         while (flip (&d) != LEFT && rb);
-
-         /* we need the empty check for gregorian notation, where there are a lot of
-            extraneous paper-columns that we need to skip over */
-         if (done && !Separation_item::is_empty (l))
-           break;
-       }
+        {
+          Item *l = dynamic_cast<Item *> (cols[j]);
+          Item *lb = l->find_prebroken_piece (RIGHT);
+          Skyline_pair *skys = Skyline_pair::unsmob (l->get_property ("horizontal-skylines"));
+          Real left_stickout = skys ? (*skys)[RIGHT].max_height () : 0.0;
+          bool done = true;
+
+          Direction d = LEFT;
+          do
+            {
+              if (j < i - 1)
+                cur_dist[d] += distances[j];
+
+              Item *r_col = r_cols[d];
+              bool touches = right_stickout - left_stickout + cur_dist[d] < 0.0;
+              Real dist = 0.0;
+
+              /* we set a distance for the line-starter column even if its non-broken counterpart
+                 doesn't touch the right column. */
+              if (lb)
+                Separation_item::set_distance (lb, r_col, padding);
+
+              if (touches || j == i - 1)
+                dist = Separation_item::set_distance (l, r_col, padding);
+
+              if (j == i - 1 && d == LEFT)
+                distances.push_back (dist);
+
+              if (j == i - 1)
+                cur_dist[d] = distances[j];
+
+              cur_dist[d] = max (cur_dist[d], dist);
+              done = done && !touches;
+            }
+          while (flip (&d) != LEFT && rb);
+
+          /* we need the empty check for gregorian notation, where there are a lot of
+             extraneous paper-columns that we need to skip over */
+          if (done && !Separation_item::is_empty (l))
+            break;
+        }
     }
 }
 
-
 void
 Spacing_spanner::generate_springs (Grob *me,
-                                  vector<Grob*> const &cols,
-                                  Spacing_options const *options)
+                                   vector<Grob *> const &cols,
+                                   Spacing_options const *options)
 {
-  Paper_column *prev = dynamic_cast<Paper_column*> (cols[0]);
+  Paper_column *prev = dynamic_cast<Paper_column *> (cols[0]);
   for (vsize i = 1; i < cols.size (); i++)
     {
       Paper_column *col = dynamic_cast<Paper_column *> (cols[i]);
-      Paper_column *next = (i + 1 < cols.size ()) ? dynamic_cast<Paper_column *> (cols[i+1]) : 0;
-      
+      Paper_column *next = (i + 1 < cols.size ()) ? dynamic_cast<Paper_column *> (cols[i + 1]) : 0;
+
       generate_pair_spacing (me, prev, col, next, options);
 
       prev = col;
@@ -324,9 +323,9 @@ Spacing_spanner::generate_springs (Grob *me,
 */
 void
 Spacing_spanner::musical_column_spacing (Grob *me,
-                                        Item *left_col,
-                                        Item *right_col,
-                                        Spacing_options const *options)
+                                         Item *left_col,
+                                         Item *right_col,
+                                         Spacing_options const *options)
 {
   Real base_note_space = note_spacing (me, left_col, right_col, options);
   Spring spring;
@@ -339,76 +338,76 @@ Spacing_spanner::musical_column_spacing (Grob *me,
       extract_grob_set (left_col, "spacing-wishes", wishes);
 
       for (vsize i = 0; i < wishes.size (); i++)
-       {
-         Grob *wish = wishes[i];
-         if (Spacing_interface::left_column (wish) != left_col)
-           {
-             /* This shouldn't really happen, but the ancient music
-                stuff really messes up the spacing code, grrr
-             */
-             continue;
-           }
-
-         extract_grob_set (wish, "right-items", right_items);
-         bool found_matching_column = false;
-         for (vsize j = 0; j < right_items.size (); j++)
-           {
-             Item *it = dynamic_cast<Item*> (right_items[j]);
-             if (it && (right_col == it->get_column ()
-                        || right_col->original () == it->get_column ()))
-               found_matching_column = true;
-           }
-
-         /*
-           This is probably a waste of time in the case of polyphonic
-           music.  */
-         if (found_matching_column && Note_spacing::has_interface (wish))
-           {
-             Real inc = options->increment_;
-             Grob *gsp = unsmob_grob (left_col->get_object ("grace-spacing"));
-             if (gsp && Paper_column::when_mom (left_col).grace_part_)
-               {
-                 Spacing_options grace_opts;
-                 grace_opts.init_from_grob (gsp);
-                 inc = grace_opts.increment_;
-               }
-             springs.push_back (Note_spacing::get_spacing (wish, right_col, base_note_space, inc));
-           }
-       }
+        {
+          Grob *wish = wishes[i];
+          if (Spacing_interface::left_column (wish) != left_col)
+            {
+              /* This shouldn't really happen, but the ancient music
+                 stuff really messes up the spacing code, grrr
+              */
+              continue;
+            }
+
+          extract_grob_set (wish, "right-items", right_items);
+          bool found_matching_column = false;
+          for (vsize j = 0; j < right_items.size (); j++)
+            {
+              Item *it = dynamic_cast<Item *> (right_items[j]);
+              if (it && (right_col == it->get_column ()
+                         || right_col->original () == it->get_column ()))
+                found_matching_column = true;
+            }
+
+          /*
+            This is probably a waste of time in the case of polyphonic
+            music.  */
+          if (found_matching_column && Note_spacing::has_interface (wish))
+            {
+              Real inc = options->increment_;
+              Grob *gsp = unsmob_grob (left_col->get_object ("grace-spacing"));
+              if (gsp && Paper_column::when_mom (left_col).grace_part_)
+                {
+                  Spacing_options grace_opts;
+                  grace_opts.init_from_grob (gsp);
+                  inc = grace_opts.increment_;
+                }
+              springs.push_back (Note_spacing::get_spacing (wish, right_col, base_note_space, inc));
+            }
+        }
 
       if (springs.empty ())
-       {
-
-         if (!Paper_column::is_musical (right_col))
-           {
-             /*
-               There used to be code that examined left_col->extent
-               (X_AXIS), but this is resulted in unexpected wide
-               spacing, because the width of s^"text" output is also
-               taken into account here.
-              */
-             spring = Spring (max (base_note_space, options->increment_),
-                              options->increment_);
-           }
-         else
-           {
-             /*
-               Min distance should be 0.0. If there are no spacing
-               wishes, we're probably dealing with polyphonic spacing
-               of hemiolas.      
-             */
-             spring = Spring (base_note_space, 0.0);
-           }
-       }
+        {
+
+          if (!Paper_column::is_musical (right_col))
+            {
+              /*
+                There used to be code that examined left_col->extent
+                (X_AXIS), but this is resulted in unexpected wide
+                spacing, because the width of s^"text" output is also
+                taken into account here.
+               */
+              spring = Spring (max (base_note_space, options->increment_),
+                               options->increment_);
+            }
+          else
+            {
+              /*
+                Min distance should be 0.0. If there are no spacing
+                wishes, we're probably dealing with polyphonic spacing
+                of hemiolas.
+              */
+              spring = Spring (base_note_space, 0.0);
+            }
+        }
       else
-       spring = merge_springs (springs);
+        spring = merge_springs (springs);
     }
 
   if (Paper_column::when_mom (right_col).grace_part_
       && !Paper_column::when_mom (left_col).grace_part_)
     {
       /*
-       Ugh. 0.8 is arbitrary.
+        Ugh. 0.8 is arbitrary.
       */
       spring *= 0.8;
     }
@@ -419,30 +418,30 @@ Spacing_spanner::musical_column_spacing (Grob *me,
   if (options->packed_)
     {
       /*
-       In packed mode, pack notes as tight as possible.  This makes
-       sense mostly in combination with ragged-right mode: the notes
-       are then printed at minimum distance.  This is mostly useful
-       for ancient notation, but may also be useful for some flavours
-       of contemporary music.  If not in ragged-right mode, lily will
-       pack as many bars of music as possible into a line, but the
-       line will then be stretched to fill the whole linewidth.
-
-       Note that we don't actually pack things as tightly as possible:
-       we don't allow the next column to begin before this one ends.
+        In packed mode, pack notes as tight as possible.  This makes
+        sense mostly in combination with ragged-right mode: the notes
+        are then printed at minimum distance.  This is mostly useful
+        for ancient notation, but may also be useful for some flavours
+        of contemporary music.  If not in ragged-right mode, lily will
+        pack as many bars of music as possible into a line, but the
+        line will then be stretched to fill the whole linewidth.
+
+        Note that we don't actually pack things as tightly as possible:
+        we don't allow the next column to begin before this one ends.
       */
       /* FIXME: the else clause below is the "right" thing to do,
-        but we can't do it because of all the empty columns that the
-        ligature-engravers leave lying around. In that case, the extent of
-        the column is incorrect because it includes note-heads that aren't
-        there. We get around this by only including the column extent if
-        the left-hand column is "genuine". This is a dirty hack and it
-        should be fixed in the ligature-engravers. --jneem
+         but we can't do it because of all the empty columns that the
+         ligature-engravers leave lying around. In that case, the extent of
+         the column is incorrect because it includes note-heads that aren't
+         there. We get around this by only including the column extent if
+         the left-hand column is "genuine". This is a dirty hack and it
+         should be fixed in the ligature-engravers. --jneem
       */
       if (Paper_column::is_extraneous_column_from_ligature (left_col))
-       spring.set_distance (spring.min_distance ());
+        spring.set_distance (spring.min_distance ());
       else
-       spring.set_distance (max (left_col->extent (left_col, X_AXIS)[RIGHT],
-                                 spring.min_distance ()));
+        spring.set_distance (max (left_col->extent (left_col, X_AXIS)[RIGHT],
+                                  spring.min_distance ()));
 
       spring.set_inverse_stretch_strength (1.0);
     }
@@ -466,21 +465,21 @@ Spacing_spanner::fills_measure (Grob *me, Item *left, Item *col)
       || !Paper_column::is_musical (col)
       || !Paper_column::is_used (next))
     return false;
-  
-  Moment dt =
-    Paper_column::when_mom (next) - Paper_column::when_mom (col);
-  
+
+  Moment dt
+    Paper_column::when_mom (next) - Paper_column::when_mom (col);
+
   Moment *len = unsmob_moment (left->get_property ("measure-length"));
   if (!len)
     return false;
-  
+
   /*
     Don't check for exact measure length, since ending measures are
     often shortened due to pickups.
    */
   if (dt.main_part_ > len->main_part_ / Rational (2)
       && (next->is_broken ()
-         || next->break_status_dir ()))
+          || next->break_status_dir ()))
     return true;
 
   return false;
@@ -491,7 +490,7 @@ Spacing_spanner::fills_measure (Grob *me, Item *left, Item *col)
 */
 void
 Spacing_spanner::breakable_column_spacing (Grob *me, Item *l, Item *r,
-                                          Spacing_options const *options)
+                                           Spacing_options const *options)
 {
   vector<Spring> springs;
   Spring spring;
@@ -503,20 +502,20 @@ Spacing_spanner::breakable_column_spacing (Grob *me, Item *l, Item *r,
       extract_grob_set (l, "spacing-wishes", wishes);
 
       for (vsize i = 0; i < wishes.size (); i++)
-       {
-         Item *spacing_grob = dynamic_cast<Item *> (wishes[i]);
+        {
+          Item *spacing_grob = dynamic_cast<Item *> (wishes[i]);
 
-         if (!spacing_grob || !Staff_spacing::has_interface (spacing_grob))
-           continue;
+          if (!spacing_grob || !Staff_spacing::has_interface (spacing_grob))
+            continue;
 
-         /*
-           column for the left one settings should be ok due automatic
-           pointer munging.
-         */
-         assert (spacing_grob->get_column () == l);
+          /*
+            column for the left one settings should be ok due automatic
+            pointer munging.
+          */
+          assert (spacing_grob->get_column () == l);
 
-         springs.push_back (Staff_spacing::get_spacing (spacing_grob, r));
-       }
+          springs.push_back (Staff_spacing::get_spacing (spacing_grob, r));
+        }
     }
 
   if (springs.empty ())
@@ -527,9 +526,9 @@ Spacing_spanner::breakable_column_spacing (Grob *me, Item *l, Item *r,
   if (Paper_column::when_mom (r).grace_part_)
     {
       /*
-       Correct for grace notes.
-       
-       Ugh. The 0.8 is arbitrary.
+        Correct for grace notes.
+
+        Ugh. The 0.8 is arbitrary.
       */
       spring *= 0.8;
     }
@@ -542,7 +541,7 @@ Spacing_spanner::breakable_column_spacing (Grob *me, Item *l, Item *r,
       spring.set_distance (spring.distance () + full_measure_extra_space);
       spring.set_default_compress_strength ();
     }
-  
+
   if (options->stretch_uniformly_ && l->break_status_dir () != RIGHT)
     {
       spring.set_min_distance (0.0);
@@ -553,28 +552,28 @@ Spacing_spanner::breakable_column_spacing (Grob *me, Item *l, Item *r,
 }
 
 ADD_INTERFACE (Spacing_spanner,
-              "The space taken by a note is dependent on its duration."
-              "  Doubling a duration adds @code{spacing-increment} to the"
-              " space.  The most common shortest note gets"
-              " @code{shortest-duration-space}.  Notes that are even shorter"
-              " are spaced proportonial to their duration.\n"
-              "\n"
-              "Typically, the increment is the width of a black note head."
-              "  In a piece with lots of 8th notes, and some 16th notes, the"
-              " eighth note gets a 2@tie{}note heads width (i.e., the space"
-              " following a note is a 1@tie{}note head width).  A 16th note"
-              " is followed by 0.5 note head width.  The quarter note is"
-              " followed by 3@tie{}NHW, the half by 4@tie{}NHW, etc.",
-
-              /* properties */
-              "average-spacing-wishes "
-              "base-shortest-duration "
-              "common-shortest-duration "
-              "packed-spacing "
-              "shortest-duration-space "
-              "spacing-increment "
-              "strict-grace-spacing "
-              "strict-note-spacing "
-              "uniform-stretching "
-              );
+               "The space taken by a note is dependent on its duration."
+               "  Doubling a duration adds @code{spacing-increment} to the"
+               " space.  The most common shortest note gets"
+               " @code{shortest-duration-space}.  Notes that are even shorter"
+               " are spaced proportonial to their duration.\n"
+               "\n"
+               "Typically, the increment is the width of a black note head."
+               "  In a piece with lots of 8th notes, and some 16th notes, the"
+               " eighth note gets a 2@tie{}note heads width (i.e., the space"
+               " following a note is a 1@tie{}note head width).  A 16th note"
+               " is followed by 0.5 note head width.  The quarter note is"
+               " followed by 3@tie{}NHW, the half by 4@tie{}NHW, etc.",
+
+               /* properties */
+               "average-spacing-wishes "
+               "base-shortest-duration "
+               "common-shortest-duration "
+               "packed-spacing "
+               "shortest-duration-space "
+               "spacing-increment "
+               "strict-grace-spacing "
+               "strict-note-spacing "
+               "uniform-stretching "
+              );
 
index adb465b382f2426f1cfcdaa1005f9c49ecd71934..38df515034ca50fe1def5e7e8a3e236ba617c665 100644 (file)
@@ -42,7 +42,7 @@ protected:
 
 private:
   Item *span_arpeggio_;
-  vector<Grob*> arpeggios_;
+  vector<Grob *> arpeggios_;
 };
 
 Span_arpeggio_engraver::Span_arpeggio_engraver ()
@@ -53,7 +53,7 @@ Span_arpeggio_engraver::Span_arpeggio_engraver ()
 void
 Span_arpeggio_engraver::acknowledge_arpeggio (Grob_info info)
 {
-  if (info.origin_contexts (this).size ()) // huh? what's this test for? 
+  if (info.origin_contexts (this).size ()) // huh? what's this test for?
     arpeggios_.push_back (info.grob ());
 }
 
@@ -81,28 +81,27 @@ Span_arpeggio_engraver::stop_translation_timestep ()
   if (span_arpeggio_)
     {
       /*
-       we do this very late, to make sure we also catch `extra'
-       side-pos support like accidentals.
+        we do this very late, to make sure we also catch `extra'
+        side-pos support like accidentals.
       */
       for (vsize j = 0; j < arpeggios_.size (); j++)
-       {
-         extract_grob_set (arpeggios_[j], "stems", stems);
-         for (vsize i = 0; i < stems.size (); i++)
-           Pointer_group_interface::add_grob (span_arpeggio_, ly_symbol2scm ("stems"),
-                                              stems[i]);
-
-         extract_grob_set (arpeggios_[j], "side-support-elements", sses);
-         for (vsize i = 0; i < sses.size (); i++)
-           Pointer_group_interface::add_grob (span_arpeggio_, ly_symbol2scm ("side-support-elements"),
-                                              sses[i]);
-
-         /*
-           we can't kill the children, since we don't want to the
-           previous note to bump into the span arpeggio; so we make
-           it transparent.  */
-         arpeggios_[j]->set_property ("transparent", SCM_BOOL_T);
-       }
-
+        {
+          extract_grob_set (arpeggios_[j], "stems", stems);
+          for (vsize i = 0; i < stems.size (); i++)
+            Pointer_group_interface::add_grob (span_arpeggio_, ly_symbol2scm ("stems"),
+                                               stems[i]);
+
+          extract_grob_set (arpeggios_[j], "side-support-elements", sses);
+          for (vsize i = 0; i < sses.size (); i++)
+            Pointer_group_interface::add_grob (span_arpeggio_, ly_symbol2scm ("side-support-elements"),
+                                               sses[i]);
+
+          /*
+            we can't kill the children, since we don't want to the
+            previous note to bump into the span arpeggio; so we make
+            it transparent.  */
+          arpeggios_[j]->set_property ("transparent", SCM_BOOL_T);
+        }
 
       span_arpeggio_->set_parent (arpeggios_[0]->get_parent (Y_AXIS), Y_AXIS);
       span_arpeggio_ = 0;
@@ -114,15 +113,15 @@ Span_arpeggio_engraver::stop_translation_timestep ()
 
 ADD_ACKNOWLEDGER (Span_arpeggio_engraver, arpeggio);
 ADD_TRANSLATOR (Span_arpeggio_engraver,
-               /* doc */
-               "Make arpeggios that span multiple staves.",
+                /* doc */
+                "Make arpeggios that span multiple staves.",
 
-               /* create */
-               "Arpeggio ",
+                /* create */
+                "Arpeggio ",
 
-               /* read */
-               "connectArpeggios ",
+                /* read */
+                "connectArpeggios ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 5378eab765cdfee0569dbfccf868b7f1f7a8f64d..6d145898f382ee63f21e92bdb81797c1e77d6653 100644 (file)
@@ -33,7 +33,7 @@ dependencies to the spanbars.
 class Span_bar_engraver : public Engraver
 {
   Item *spanbar_;
-  vector<Item*> bars_;
+  vector<Item *> bars_;
 
 public:
   TRANSLATOR_DECLARATIONS (Span_bar_engraver);
@@ -57,11 +57,11 @@ Span_bar_engraver::acknowledge_bar_line (Grob_info i)
       bars_.push_back (it);
 
       if (bars_.size () >= 2 && !spanbar_)
-       {
-         spanbar_ = make_item ("SpanBar", SCM_EOL);
+        {
+          spanbar_ = make_item ("SpanBar", SCM_EOL);
 
-         spanbar_->set_parent (bars_[0], X_AXIS);
-       }
+          spanbar_->set_parent (bars_[0], X_AXIS);
+        }
     }
 }
 
@@ -71,12 +71,12 @@ Span_bar_engraver::stop_translation_timestep ()
   if (spanbar_)
     {
       for (vsize i = 0; i < bars_.size (); i++)
-       Span_bar::add_bar (spanbar_, bars_[i]);
+        Span_bar::add_bar (spanbar_, bars_[i]);
 
       SCM vissym = ly_symbol2scm ("break-visibility");
       SCM vis = bars_[0]->internal_get_property (vissym);
       if (ly_is_equal (spanbar_->internal_get_property (vissym), vis))
-       spanbar_->set_property (vissym, vis);
+        spanbar_->set_property (vissym, vis);
 
       spanbar_ = 0;
     }
@@ -87,16 +87,16 @@ Span_bar_engraver::stop_translation_timestep ()
 
 ADD_ACKNOWLEDGER (Span_bar_engraver, bar_line);
 ADD_TRANSLATOR (Span_bar_engraver,
-               /* doc */
-               "Make cross-staff bar lines: It catches all normal bar lines"
-               " and draws a single span bar across them.",
+                /* doc */
+                "Make cross-staff bar lines: It catches all normal bar lines"
+                " and draws a single span bar across them.",
 
-               /* create */
-               "SpanBar ",
+                /* create */
+                "SpanBar ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 00e22fb0855e016d3f1750369a26e64634fc5df9..4cc9971d5da80fc3550f077a53cdad6014da9182 100644 (file)
@@ -30,7 +30,6 @@
 #include "pointer-group-interface.hh"
 #include "staff-symbol-referencer.hh"
 
-
 void
 Span_bar::add_bar (Grob *me, Grob *b)
 {
@@ -77,9 +76,9 @@ Span_bar::print (SCM smobbed_me)
       Grob *bar = elements[i];
       Interval ext = Bar_line::bar_y_extent (bar, refp);
       if (Grob *staff = Staff_symbol_referencer::get_staff_symbol (bar))
-       ext.unite (staff->extent (refp, Y_AXIS));
+        ext.unite (staff->extent (refp, Y_AXIS));
       if (ext.is_empty ())
-       continue;
+        continue;
 
       extents.push_back (ext);
       make_span_bar.push_back (to_boolean (bar->get_property ("allow-span-bar")));
@@ -97,28 +96,28 @@ Span_bar::print (SCM smobbed_me)
       Interval prev_extent = extents[i - 1];
       Interval ext = extents[i];
       if (!prev_extent.is_empty ())
-       {
-         Interval l (prev_extent [UP],
-                     ext[DOWN]);
-
-         if (l.is_empty () || !make_span_bar[i])
-           {
-             /* There is overlap between the bar lines.  Do nothing. */
-           }
-         else
-           {
-             Stencil interbar = Bar_line::compound_barline (model_bar,
-                                                            glyph_string,
-                                                            l,
-                                                            false);
-             span_bar.add_stencil (interbar);
-           }
-       }
+        {
+          Interval l (prev_extent [UP],
+                      ext[DOWN]);
+
+          if (l.is_empty () || !make_span_bar[i])
+            {
+              /* There is overlap between the bar lines.  Do nothing. */
+            }
+          else
+            {
+              Stencil interbar = Bar_line::compound_barline (model_bar,
+                                                             glyph_string,
+                                                             l,
+                                                             false);
+              span_bar.add_stencil (interbar);
+            }
+        }
       prev_extent = ext;
     }
 
   span_bar.translate_axis (- me->relative_coordinate (refp, Y_AXIS),
-                          Y_AXIS);
+                           Y_AXIS);
 
   return span_bar.smobbed_copy ();
 }
@@ -137,8 +136,8 @@ Span_bar::width (SCM smob)
   /*
     urg.
   */
-  Stencil m =
-    Bar_line::compound_barline (me, gl, Interval (-20 PT, 20 PT), false);
+  Stencil m
+    Bar_line::compound_barline (me, gl, Interval (-20 PT, 20 PT), false);
 
   return ly_interval2scm (m.extent (X_AXIS));
 }
@@ -175,9 +174,7 @@ Span_bar::center_on_spanned_callback (SCM smob)
   return scm_from_double (i.center ());
 }
 
-
-
-MAKE_SCHEME_CALLBACK(Span_bar, calc_glyph_name, 1);
+MAKE_SCHEME_CALLBACK (Span_bar, calc_glyph_name, 1);
 SCM
 Span_bar::calc_glyph_name (SCM smob)
 {
@@ -211,7 +208,7 @@ Span_bar::calc_glyph_name (SCM smob)
     type = ".|";
   else if (type == ":|S" || type == ":|S.")
     type = "|.";
-    else if (type == ":|S|:" || type == ":|S.|:")
+  else if (type == ":|S|:" || type == ":|S.|:")
     type = "|._.|";
   else if (type == "'")
     type = "";
@@ -226,16 +223,16 @@ Span_bar::get_spanned_interval (Grob *me)
 }
 
 ADD_INTERFACE (Span_bar,
-              "A bar line that is spanned between other barlines.  This"
-              " interface is used for bar lines that connect different"
-              " staves.",
-
-              /* properties */
-              "glyph-name "
-              "elements "
-              "pure-Y-common "
-              "pure-relevant-grobs "
-              "pure-relevant-items "
-              "pure-relevant-spanners "
-              );
+               "A bar line that is spanned between other barlines.  This"
+               " interface is used for bar lines that connect different"
+               " staves.",
+
+               /* properties */
+               "glyph-name "
+               "elements "
+               "pure-Y-common "
+               "pure-relevant-grobs "
+               "pure-relevant-items "
+               "pure-relevant-spanners "
+              );
 
index a37056ba8df38288032fc2c1c43309665a9117d6..319361bd588150bf231fb4caf25670a217b522f7 100644 (file)
@@ -17,8 +17,6 @@
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
-
 #include "engraver.hh"
 #include "international.hh"
 #include "spanner.hh"
@@ -31,7 +29,7 @@
 class Spanner_break_forbid_engraver : public Engraver
 {
   TRANSLATOR_DECLARATIONS (Spanner_break_forbid_engraver);
-  vector<Spanner*> running_spanners_;
+  vector<Spanner *> running_spanners_;
 protected:
   DECLARE_ACKNOWLEDGER (unbreakable_spanner);
   DECLARE_END_ACKNOWLEDGER (unbreakable_spanner);
@@ -39,7 +37,6 @@ protected:
   void process_music ();
 };
 
-
 void
 Spanner_break_forbid_engraver::process_music ()
 {
@@ -52,8 +49,8 @@ Spanner_break_forbid_engraver::process_music ()
 void
 Spanner_break_forbid_engraver::acknowledge_end_unbreakable_spanner (Grob_info gi)
 {
-  vector<Spanner*>::iterator i = find (running_spanners_.begin (), running_spanners_.end (),
-                                      gi.spanner ());
+  vector<Spanner *>::iterator i = find (running_spanners_.begin (), running_spanners_.end (),
+                                        gi.spanner ());
   if (i != running_spanners_.end ())
     running_spanners_.erase (i);
 }
@@ -69,19 +66,18 @@ Spanner_break_forbid_engraver::Spanner_break_forbid_engraver ()
 {
 }
 
-
 ADD_END_ACKNOWLEDGER (Spanner_break_forbid_engraver, unbreakable_spanner);
 ADD_ACKNOWLEDGER (Spanner_break_forbid_engraver, unbreakable_spanner);
 ADD_TRANSLATOR (Spanner_break_forbid_engraver,
-               /* doc */
-               "Forbid breaks in certain spanners.",
+                /* doc */
+                "Forbid breaks in certain spanners.",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index f2a9f0f939afd41b66b0218eb53fe348f35536ee..65c1c261cdc80a34f7e1e4153806113da9c5b344 100644 (file)
@@ -2,7 +2,7 @@
   This file is part of LilyPond, the GNU music typesetter.
 
   Copyright (C) 2007--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
-  
+
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -22,9 +22,9 @@
 #include "item.hh"
 
 LY_DEFINE (ly_spanner_bound, "ly:spanner-bound",
-          2, 0, 0, (SCM spanner, SCM dir),
-          "Get one of the bounds of @var{spanner}.  @var{dir} is @code{-1}"
-          " for left, and @code{1} for right.")
+           2, 0, 0, (SCM spanner, SCM dir),
+           "Get one of the bounds of @var{spanner}.  @var{dir} is @code{-1}"
+           " for left, and @code{1} for right.")
 {
   LY_ASSERT_TYPE (unsmob_spanner, spanner, 1);
   LY_ASSERT_TYPE (is_direction, dir, 2);
@@ -33,9 +33,9 @@ LY_DEFINE (ly_spanner_bound, "ly:spanner-bound",
 }
 
 LY_DEFINE (ly_spanner_set_bound_x, "ly:spanner-set-bound!",
-          3, 0, 0, (SCM spanner, SCM dir, SCM item),
-          "Set grob @var{item} as bound in direction @var{dir} for"
-          " @var{spanner}.")
+           3, 0, 0, (SCM spanner, SCM dir, SCM item),
+           "Set grob @var{item} as bound in direction @var{dir} for"
+           " @var{spanner}.")
 {
   LY_ASSERT_TYPE (unsmob_spanner, spanner, 1);
   LY_ASSERT_TYPE (is_direction, dir, 2);
@@ -48,8 +48,8 @@ LY_DEFINE (ly_spanner_set_bound_x, "ly:spanner-set-bound!",
 /* TODO: maybe we should return a vector -- random access is more
    logical for this list? */
 LY_DEFINE (ly_spanner_broken_into, "ly:spanner-broken-into",
-          1, 0, 0, (SCM spanner),
-          "Return broken-into list for @var{spanner}.")
+           1, 0, 0, (SCM spanner),
+           "Return broken-into list for @var{spanner}.")
 {
   LY_ASSERT_TYPE (unsmob_spanner, spanner, 1);
   Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (spanner));
@@ -61,8 +61,8 @@ LY_DEFINE (ly_spanner_broken_into, "ly:spanner-broken-into",
 }
 
 LY_DEFINE (ly_spanner_p, "ly:spanner?",
-          1, 0, 0, (SCM g),
-          "Is @var{g} a spanner object?")
+           1, 0, 0, (SCM g),
+           "Is @var{g} a spanner object?")
 {
   Grob *me = unsmob_grob (g);
   bool b = dynamic_cast<Spanner *> (me);
index 18a7e645f524bffc80adb2a2fab35709161c927b..822a7203aa427d62d92cdc93e66497a7dd4a2746 100644 (file)
@@ -42,38 +42,37 @@ Spanner::do_break_processing ()
   if (!left || !right)
     return;
 
-
   if (get_system () || is_broken ())
     return;
 
   if (left == right)
     {
       /*
-       If we have a spanner spanning one column, we must break it
-       anyway because it might provide a parent for another item.  */
+        If we have a spanner spanning one column, we must break it
+        anyway because it might provide a parent for another item.  */
       Direction d = LEFT;
       do
-       {
-         Item *bound = left->find_prebroken_piece (d);
-         if (!bound)
-           programming_error ("no broken bound");
-         else if (bound->get_system ())
-           {
-             Spanner *span = dynamic_cast<Spanner *> (clone ());
-             span->set_bound (LEFT, bound);
-             span->set_bound (RIGHT, bound);
-
-             assert (span->get_system ());
-             span->get_system ()->typeset_grob (span);
-             broken_intos_.push_back (span);
-           }
-       }
+        {
+          Item *bound = left->find_prebroken_piece (d);
+          if (!bound)
+            programming_error ("no broken bound");
+          else if (bound->get_system ())
+            {
+              Spanner *span = dynamic_cast<Spanner *> (clone ());
+              span->set_bound (LEFT, bound);
+              span->set_bound (RIGHT, bound);
+
+              assert (span->get_system ());
+              span->get_system ()->typeset_grob (span);
+              broken_intos_.push_back (span);
+            }
+        }
       while ((flip (&d)) != LEFT);
     }
   else
     {
-      System *root  = get_root_system (this);
-      vector<Item*> break_points = root->broken_col_range (left, right);
+      System *root = get_root_system (this);
+      vector<Item *> break_points = root->broken_col_range (left, right);
 
       break_points.insert (break_points.begin () + 0, left);
       break_points.push_back (right);
@@ -82,62 +81,61 @@ Spanner::do_break_processing ()
       parent_rank_slice.set_full ();
 
       /*
-       Check if our parent in X-direction spans equally wide
-       or wider than we do.
+        Check if our parent in X-direction spans equally wide
+        or wider than we do.
       */
       for (int a = X_AXIS; a < NO_AXES; a++)
-       {
-         if (Spanner *parent = dynamic_cast<Spanner *> (get_parent ((Axis)a)))
-           parent_rank_slice.intersect (parent->spanned_rank_interval ());
-       }
+        {
+          if (Spanner *parent = dynamic_cast<Spanner *> (get_parent ((Axis)a)))
+            parent_rank_slice.intersect (parent->spanned_rank_interval ());
+        }
 
       for (vsize i = 1; i < break_points.size (); i++)
-       {
-         Drul_array<Item *> bounds;
-         bounds[LEFT] = break_points[i - 1];
-         bounds[RIGHT] = break_points[i];
-         Direction d = LEFT;
-         do
-           {
-             if (!bounds[d]->get_system ())
-               bounds[d] = bounds[d]->find_prebroken_piece (- d);
-           }
-         while ((flip (&d)) != LEFT);
-
-         if (!bounds[LEFT] || ! bounds[RIGHT])
-           {
-             programming_error ("bounds of this piece aren't breakable. ");
-             continue;
-           }
-
-         bool ok = parent_rank_slice.contains (bounds[LEFT]->get_column ()->get_rank ());
-         ok = ok && parent_rank_slice.contains (bounds[RIGHT]->get_column ()->get_rank ());
-
-         if (!ok)
-           {
-             programming_error (to_string ("Spanner `%s' is not fully contained in parent spanner. Ignoring orphaned part",
-                                           name ().c_str ()));
-             continue;
-           }
-
-
-         Spanner *span = dynamic_cast<Spanner *> (clone ());
-         span->set_bound (LEFT, bounds[LEFT]);
-         span->set_bound (RIGHT, bounds[RIGHT]);
-
-         if (!bounds[LEFT]->get_system ()
-             || !bounds[RIGHT]->get_system ()
-             || bounds[LEFT]->get_system () != bounds[RIGHT]->get_system ())
-           {
-             programming_error ("bounds of spanner are invalid");
-             span->suicide ();
-           }
-         else
-           {
-             bounds[LEFT]->get_system ()->typeset_grob (span);
-             broken_intos_.push_back (span);
-           }
-       }
+        {
+          Drul_array<Item *> bounds;
+          bounds[LEFT] = break_points[i - 1];
+          bounds[RIGHT] = break_points[i];
+          Direction d = LEFT;
+          do
+            {
+              if (!bounds[d]->get_system ())
+                bounds[d] = bounds[d]->find_prebroken_piece (- d);
+            }
+          while ((flip (&d)) != LEFT);
+
+          if (!bounds[LEFT] || ! bounds[RIGHT])
+            {
+              programming_error ("bounds of this piece aren't breakable. ");
+              continue;
+            }
+
+          bool ok = parent_rank_slice.contains (bounds[LEFT]->get_column ()->get_rank ());
+          ok = ok && parent_rank_slice.contains (bounds[RIGHT]->get_column ()->get_rank ());
+
+          if (!ok)
+            {
+              programming_error (to_string ("Spanner `%s' is not fully contained in parent spanner. Ignoring orphaned part",
+                                            name ().c_str ()));
+              continue;
+            }
+
+          Spanner *span = dynamic_cast<Spanner *> (clone ());
+          span->set_bound (LEFT, bounds[LEFT]);
+          span->set_bound (RIGHT, bounds[RIGHT]);
+
+          if (!bounds[LEFT]->get_system ()
+              || !bounds[RIGHT]->get_system ()
+              || bounds[LEFT]->get_system () != bounds[RIGHT]->get_system ())
+            {
+              programming_error ("bounds of spanner are invalid");
+              span->suicide ();
+            }
+          else
+            {
+              bounds[LEFT]->get_system ()->typeset_grob (span);
+              broken_intos_.push_back (span);
+            }
+        }
     }
   vector_sort (broken_intos_, Spanner::less);
   for (vsize i = broken_intos_.size (); i--;)
@@ -157,7 +155,7 @@ Spanner::set_my_columns ()
   do
     {
       if (!spanned_drul_[i]->get_system ())
-       set_bound (i, spanned_drul_[i]->find_prebroken_piece ((Direction) -i));
+        set_bound (i, spanned_drul_[i]->find_prebroken_piece ((Direction) - i));
     }
   while (flip (&i) != LEFT);
 }
@@ -178,10 +176,9 @@ Interval_t<Moment>
 Spanner::spanned_time () const
 {
   return spanned_time_interval (spanned_drul_[LEFT],
-                               spanned_drul_[RIGHT]);
+                                spanned_drul_[RIGHT]);
 }
 
-
 Item *
 Spanner::get_bound (Direction d) const
 {
@@ -198,7 +195,7 @@ Spanner::set_bound (Direction d, Grob *s)
   Item *i = dynamic_cast<Item *> (s);
   if (!i)
     {
-      programming_error ("must have Item for spanner bound of " + name());
+      programming_error ("must have Item for spanner bound of " + name ());
       return;
     }
 
@@ -244,7 +241,7 @@ Spanner::spanner_length () const
   Drul_array<SCM> bounds (get_property ("left-bound-info"),
                           get_property ("right-bound-info"));
 
-  Direction d =  LEFT;
+  Direction d = LEFT;
   do
     lr[d] = robust_scm2double (ly_assoc_get (ly_symbol2scm ("X"),
                                              bounds[d], SCM_BOOL_F), -d);
@@ -289,7 +286,7 @@ Spanner::broken_neighbor (Direction d) const
     return 0;
 
   vsize k = get_break_index ();
-  Spanner *orig = dynamic_cast<Spanner*> (original_);
+  Spanner *orig = dynamic_cast<Spanner *> (original_);
   int j = int (k) + d;
   if (j < 0 || vsize (j) >= orig->broken_intos_.size ())
     return 0;
@@ -331,9 +328,9 @@ Spanner::get_broken_left_end_align () const
       && sc->break_status_dir () == RIGHT)
     {
       /*
-       We used to do a full search for the Break_align_item.
-       But that doesn't make a difference, since the Paper_column
-       is likely to contain only a Break_align_item.
+        We used to do a full search for the Break_align_item.
+        But that doesn't make a difference, since the Paper_column
+        is likely to contain only a Break_align_item.
       */
       return sc->extent (sc, X_AXIS)[RIGHT];
     }
@@ -383,26 +380,26 @@ Spanner::set_spacing_rods (SCM smob)
       Rod r;
       Spanner *sp = dynamic_cast<Spanner *> (me);
       System *root = get_root_system (me);
-      Drul_array<Item*> bounds (sp->get_bound (LEFT),
-                               sp->get_bound (RIGHT));
+      Drul_array<Item *> bounds (sp->get_bound (LEFT),
+                                 sp->get_bound (RIGHT));
       if (!bounds[LEFT] || !bounds[RIGHT])
-       return SCM_UNSPECIFIED;
+        return SCM_UNSPECIFIED;
 
-      vector<Item*> cols (root->broken_col_range (bounds[LEFT]->get_column (),
-                                                 bounds[RIGHT]->get_column ()));
+      vector<Item *> cols (root->broken_col_range (bounds[LEFT]->get_column (),
+                                                   bounds[RIGHT]->get_column ()));
 
       if (cols.size ())
-       {
-         Rod r ;
-         r.item_drul_[LEFT] = sp->get_bound (LEFT);
-         r.item_drul_[RIGHT] = cols[0]->find_prebroken_piece (LEFT);
-         r.distance_ = robust_scm2double (num_length, 0);
-         r.add_to_cols ();
-
-         r.item_drul_[LEFT] = cols.back ()->find_prebroken_piece (RIGHT);
-         r.item_drul_[RIGHT] = sp->get_bound (RIGHT);
-         r.add_to_cols ();
-       }
+        {
+          Rod r;
+          r.item_drul_[LEFT] = sp->get_bound (LEFT);
+          r.item_drul_[RIGHT] = cols[0]->find_prebroken_piece (LEFT);
+          r.distance_ = robust_scm2double (num_length, 0);
+          r.add_to_cols ();
+
+          r.item_drul_[LEFT] = cols.back ()->find_prebroken_piece (RIGHT);
+          r.item_drul_[RIGHT] = sp->get_bound (RIGHT);
+          r.add_to_cols ();
+        }
 
       r.distance_ = robust_scm2double (num_length, 0);
       r.item_drul_[LEFT] = sp->get_bound (LEFT);
@@ -475,7 +472,7 @@ Spanner::bounds_width (SCM grob)
   Grob *common = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS);
 
   Interval w (me->get_bound (LEFT)->relative_coordinate (common, X_AXIS),
-             me->get_bound (RIGHT)->relative_coordinate (common, X_AXIS));
+              me->get_bound (RIGHT)->relative_coordinate (common, X_AXIS));
 
   w -= me->relative_coordinate (common, X_AXIS);
 
@@ -537,17 +534,17 @@ Spanner::cache_pure_property (SCM sym, int start, int end, SCM val)
 }
 
 ADD_INTERFACE (Spanner,
-              "Some objects are horizontally spanned between objects.  For"
-              " example, slurs, beams, ties, etc.  These grobs form a subtype"
-              " called @code{Spanner}.  All spanners have two span points"
-              " (these must be @code{Item} objects), one on the left and one"
-              " on the right.  The left bound is also the X@tie{}reference"
-              " point of the spanner.",
-
-              /* properties */
-              "normalized-endpoints "
-              "minimum-length "
+               "Some objects are horizontally spanned between objects.  For"
+               " example, slurs, beams, ties, etc.  These grobs form a subtype"
+               " called @code{Spanner}.  All spanners have two span points"
+               " (these must be @code{Item} objects), one on the left and one"
+               " on the right.  The left bound is also the X@tie{}reference"
+               " point of the spanner.",
+
+               /* properties */
+               "normalized-endpoints "
+               "minimum-length "
                "spanner-broken "
                "spanner-id "
-              "to-barline "
-              );
+               "to-barline "
+              );
index a679eeae5f58bbe43fe996cabfc3427d02a20080..8e263d06944bd406b3bbff5a7a12165ce3f7a917 100644 (file)
@@ -39,6 +39,6 @@ Spring::print_smob (SCM, SCM p, scm_print_state *)
 SCM
 Spring::equal_p (SCM a, SCM b)
 {
-  return a == b? SCM_BOOL_T : SCM_BOOL_F;
+  return a == b ? SCM_BOOL_T : SCM_BOOL_F;
 }
 
index c576da374329bf22b196982c3276343587b56fbb..fc5b18f781f142de19cdd2cd55a8fab1e09ef58f 100644 (file)
@@ -57,16 +57,15 @@ Spring::update_blocking_force ()
       // Conceptually, this should be +inf, but 0.0 meets the requirements
       //  of Simple_spacer and creates fewer cases of 0.0*inf to handle.
       blocking_force_ = 0.0;
+  else if (inverse_compress_strength_ > 0.0)
+    blocking_force_ = (min_distance_ - distance_) / inverse_compress_strength_;
   else
-    if (inverse_compress_strength_ > 0.0)
-      blocking_force_ = (min_distance_ - distance_) / inverse_compress_strength_;
-    else
-      blocking_force_ = 0.0;
+    blocking_force_ = 0.0;
 }
 
 /* scale a spring, but in a way that doesn't violate min_distance */
 void
-Spring::operator*= (Real r)
+Spring::operator *= (Real r)
 {
   distance_ = max (min_distance_, distance_ * r);
   inverse_compress_strength_ = max (0.0, distance_ - min_distance_);
@@ -75,7 +74,7 @@ Spring::operator*= (Real r)
 }
 
 bool
-Spring::operator> (Spring const &other) const
+Spring::operator > (Spring const &other) const
 {
   return blocking_force_ > other.blocking_force_;
 }
@@ -203,7 +202,7 @@ Spring::length (Real f) const
   Real force = max (f, blocking_force_);
   Real inv_k = force < 0.0 ? inverse_compress_strength_ : inverse_stretch_strength_;
 
-  if (isinf(force))
+  if (isinf (force))
     {
       programming_error ("cruelty to springs");
       force = 0.0;
index 29ddd8d70b353ae32f2c2c1eec399d99af7f491f..b8ab0f593f5d11e82baf4d996f0a742620a0e56b 100644 (file)
@@ -58,15 +58,15 @@ ADD_ACKNOWLEDGER (Staff_collecting_engraver, staff_symbol);
 ADD_END_ACKNOWLEDGER (Staff_collecting_engraver, staff_symbol);
 
 ADD_TRANSLATOR (Staff_collecting_engraver,
-               /* doc */
-               "Maintain the @code{stavesFound} variable.",
+                /* doc */
+                "Maintain the @code{stavesFound} variable.",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "stavesFound ",
+                /* read */
+                "stavesFound ",
 
-               /* write */
-               "stavesFound "
-               );
+                /* write */
+                "stavesFound "
+               );
index 803e1ee82dcfa4958f94b2f2f94efc644b15bafb..4099ebfbd2a5301b4ae563294418a51a1a41e882 100644 (file)
@@ -32,15 +32,15 @@ Staff_grouper_interface::maybe_pure_within_group (Grob *me, Grob *child, bool pu
 {
   extract_grob_set (me, "elements", elts);
 
-  vector<Grob*>::const_iterator i = find (elts, child);
+  vector<Grob *>::const_iterator i = find (elts, child);
 
   if (i == elts.end ())
     return false;
 
   for (++i; i != elts.end (); ++i)
     if (Page_layout_problem::is_spaceable (*i)
-       && ((pure && !Hara_kiri_group_spanner::request_suicide (*i, start, end))
-           || (!pure && (*i)->is_live ())))
+        && ((pure && !Hara_kiri_group_spanner::request_suicide (*i, start, end))
+            || (!pure && (*i)->is_live ())))
       return me == unsmob_grob ((*i)->get_object ("staff-grouper"));
 
   // If there was no spaceable, living child after me, I don't
@@ -49,10 +49,10 @@ Staff_grouper_interface::maybe_pure_within_group (Grob *me, Grob *child, bool pu
 }
 
 ADD_INTERFACE (Staff_grouper_interface,
-              "A grob that collects staves together.",
+               "A grob that collects staves together.",
 
-              /* properties */
-              "staff-staff-spacing "
-              "staffgroup-staff-spacing "
-              );
+               /* properties */
+               "staff-staff-spacing "
+               "staffgroup-staff-spacing "
+              );
 
index 6d621a79a3319a1e7526450bcfadf75046ad5f5f..6d0595f54b43f959caa1b90688aaf2df8293a90b 100644 (file)
@@ -48,9 +48,9 @@ private:
   void set_instrument_name (string voice);
   void set_instrument (int channel, string voice);
   int get_channel (string instrument);
-  Audio_staffget_audio_staff (string voice);
-  Audio_staffnew_audio_staff (string voice);
-  Audio_dynamicget_dynamic (string voice);
+  Audio_staff *get_audio_staff (string voice);
+  Audio_staff *new_audio_staff (string voice);
+  Audio_dynamic *get_dynamic (string voice);
 
   string instrument_string_;
   int channel_;
@@ -58,9 +58,9 @@ private:
   Audio_text *instrument_name_;
   Audio_text *name_;
   Audio_tempo *tempo_;
-  map<string, Audio_staff*> staff_map_;
+  map<string, Audio_staff *> staff_map_;
   map<string, int> channel_map_;
-  map<string, Audio_dynamic*> dynamic_map_;
+  map<string, Audio_dynamic *> dynamic_map_;
   // Would prefer to have the following two items be
   // members of the containing class Performance,
   // so they can be reset for each new midi file output.
@@ -77,24 +77,24 @@ int Staff_performer::staff_performer_count_ = 0;
 #include "translator.icc"
 
 ADD_TRANSLATOR (Staff_performer,
-               /* doc */
-               "",
+                /* doc */
+                "",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               "");
+                /* write */
+                "");
 
 Staff_performer::Staff_performer ()
-  : channel_ (-1)
-  , instrument_ (0)
-  , instrument_name_ (0)
-  , name_ (0)
-  , tempo_ (0)
+  : channel_ (-1),
+    instrument_ (0),
+    instrument_name_ (0),
+    name_ (0),
+    tempo_ (0)
 {
 }
 
@@ -105,20 +105,20 @@ Staff_performer::~Staff_performer ()
 void
 Staff_performer::initialize ()
 {
-   ++staff_performer_count_;
+  ++staff_performer_count_;
 }
 
-Audio_staff*
+Audio_staff *
 Staff_performer::new_audio_staff (string voice)
 {
-  Audio_staffaudio_staff = new Audio_staff;
+  Audio_staff *audio_staff = new Audio_staff;
   audio_staff->merge_unisons_
     = to_boolean (get_property ("midiMergeUnisons"));
   string track_name = context ()->id_string () + ":" + voice;
   if (track_name != ":")
     {
       name_ = new Audio_text (Audio_text::TRACK_NAME, context ()->id_string ()
-                             + ":" + voice);
+                              + ":" + voice);
       audio_staff->add_audio_item (name_);
       announce_element (Audio_element_info (name_, 0));
     }
@@ -129,7 +129,7 @@ Staff_performer::new_audio_staff (string voice)
   return audio_staff;
 }
 
-Audio_staff*
+Audio_staff *
 Staff_performer::get_audio_staff (string voice)
 {
   SCM channel_mapping = get_property ("midiChannelMapping");
@@ -137,10 +137,10 @@ Staff_performer::get_audio_staff (string voice)
       && staff_map_.size ())
     return staff_map_.begin ()->second;
 
-  map<string, Audio_staff*>::const_iterator i = staff_map_.find (voice);
+  map<string, Audio_staff *>::const_iterator i = staff_map_.find (voice);
   if (i != staff_map_.end ())
     return i->second;
-  map<string, Audio_staff*>::const_iterator e = staff_map_.find ("");
+  map<string, Audio_staff *>::const_iterator e = staff_map_.find ("");
   if (staff_map_.size () == 1 && e != staff_map_.end ())
     {
       staff_map_[voice] = e->second;
@@ -149,10 +149,10 @@ Staff_performer::get_audio_staff (string voice)
   return new_audio_staff (voice);
 }
 
-Audio_dynamic*
+Audio_dynamic *
 Staff_performer::get_dynamic (string voice)
 {
-  map<string, Audio_dynamic*>::const_iterator i = dynamic_map_.find (voice);
+  map<string, Audio_dynamic *>::const_iterator i = dynamic_map_.find (voice);
   if (i != dynamic_map_.end ())
     return i->second;
   return 0;
@@ -169,7 +169,7 @@ Staff_performer::set_instrument (int channel, string voice)
   instrument_ = new Audio_instrument (instrument_string_);
   instrument_->channel_ = channel;
   announce_element (Audio_element_info (instrument_, 0));
-  Audio_staffaudio_staff = get_audio_staff (voice);
+  Audio_staff *audio_staff = get_audio_staff (voice);
   audio_staff->add_audio_item (instrument_);
   SCM proc = ly_lily_module_constant ("percussion?");
   SCM drums = scm_call_1 (proc, ly_symbol2scm (instrument_string_.c_str ()));
@@ -180,7 +180,7 @@ void
 Staff_performer::set_instrument_name (string voice)
 {
   instrument_name_ = new Audio_text (Audio_text::INSTRUMENT_NAME,
-                                    instrument_string_);
+                                     instrument_string_);
   announce_element (Audio_element_info (instrument_name_, 0));
   get_audio_staff (voice)->add_audio_item (instrument_name_);
 }
@@ -229,8 +229,8 @@ Staff_performer::get_channel (string instrument)
   SCM channel_mapping = get_property ("midiChannelMapping");
   map<string, int>& channel_map
     = (channel_mapping != ly_symbol2scm ("instrument"))
-    ? channel_map_
-    : static_channel_map_;
+      ? channel_map_
+      : static_channel_map_;
 
   if (channel_mapping == ly_symbol2scm ("staff")
       && channel_ >= 0)
@@ -239,10 +239,10 @@ Staff_performer::get_channel (string instrument)
   map<string, int>::const_iterator i = channel_map.find (instrument);
   if (i != channel_map.end ())
     return i->second;
+
   int channel = (channel_mapping == ly_symbol2scm ("staff"))
-    ? channel_count_++
-    : channel_map.size ();
+                ? channel_count_++
+                : channel_map.size ();
 
   /* MIDI players tend to ignore instrument settings on channel
      10, the percussion channel.  */
@@ -256,7 +256,7 @@ Staff_performer::get_channel (string instrument)
     {
       warning (_ ("MIDI channel wrapped around"));
       warning (_ ("remapping modulo 16"));
-      channel = channel % 16; 
+      channel = channel % 16;
     }
 
   channel_map[instrument] = channel;
@@ -269,38 +269,38 @@ Staff_performer::acknowledge_audio_element (Audio_element_info inf)
   if (Audio_item *ai = dynamic_cast<Audio_item *> (inf.elem_))
     {
       /* map each context (voice) to its own track */
-      Contextc = inf.origin_contexts (this)[0];
+      Context *c = inf.origin_contexts (this)[0];
       string voice;
       if (c->is_alias (ly_symbol2scm ("Voice")))
-       voice = c->id_string ();
+        voice = c->id_string ();
       SCM channel_mapping = get_property ("midiChannelMapping");
       string str = new_instrument_string ();
       if (channel_mapping != ly_symbol2scm ("instrument"))
-       channel_ = get_channel (voice);
+        channel_ = get_channel (voice);
       else if (channel_ < 0 && str.empty ())
-       channel_ = get_channel (str);
+        channel_ = get_channel (str);
       if (str.length ())
-       {
-         if (channel_mapping != ly_symbol2scm ("voice"))
-           channel_ = get_channel (str);
-         set_instrument (channel_, voice);
-         set_instrument_name (voice);
-       }
+        {
+          if (channel_mapping != ly_symbol2scm ("voice"))
+            channel_ = get_channel (str);
+          set_instrument (channel_, voice);
+          set_instrument_name (voice);
+        }
       ai->channel_ = channel_;
       bool encode_dynamics_as_velocity_ = true;
       if (encode_dynamics_as_velocity_)
-       {
-         if (Audio_dynamic *d = dynamic_cast<Audio_dynamic *> (inf.elem_))
-           {
-             dynamic_map_[voice] = d;
-             // Output volume as velocity: must disable Midi_dynamic output
-             d->silent_ = true;
-           }
-         if (Audio_dynamic *d = get_dynamic (voice))
-           if (Audio_note *n = dynamic_cast<Audio_note *> (inf.elem_))
-             n->dynamic_ = d;
-       }
-      Audio_staffaudio_staff = get_audio_staff (voice);
+        {
+          if (Audio_dynamic *d = dynamic_cast<Audio_dynamic *> (inf.elem_))
+            {
+              dynamic_map_[voice] = d;
+              // Output volume as velocity: must disable Midi_dynamic output
+              d->silent_ = true;
+            }
+          if (Audio_dynamic *d = get_dynamic (voice))
+            if (Audio_note *n = dynamic_cast<Audio_note *> (inf.elem_))
+              n->dynamic_ = d;
+        }
+      Audio_staff *audio_staff = get_audio_staff (voice);
       audio_staff->add_audio_item (ai);
     }
 }
index ff064b5c0f6a83455b4b9fd43de4f33046c17b89..2a216bdc6e0875651c75491238df1041364732a0 100644 (file)
@@ -55,24 +55,24 @@ Staff_spacing::optical_correction (Grob *me, Grob *g, Interval bar_height)
     {
       Direction d = get_grob_direction (stem);
       if (Stem::is_normal_stem (stem) && d == DOWN)
-       {
-
-         /*
-           can't look at stem-end-position, since that triggers
-           beam slope computations.
-         */
-         Real stem_start = Stem::head_positions (stem) [d];
-         Real stem_end = stem_start + 
-           d * robust_scm2double (stem->get_property ("length"), 7);
-         
-         Interval stem_posns (min (stem_start, stem_end),
-                              max (stem_end, stem_start));
-
-         stem_posns.intersect (bar_height);
-
-         ret = min (abs (stem_posns.length () / 7.0), 1.0);
-         ret *= robust_scm2double (me->get_property ("stem-spacing-correction"), 1);
-       }
+        {
+
+          /*
+            can't look at stem-end-position, since that triggers
+            beam slope computations.
+          */
+          Real stem_start = Stem::head_positions (stem) [d];
+          Real stem_end = stem_start
+                          + d * robust_scm2double (stem->get_property ("length"), 7);
+
+          Interval stem_posns (min (stem_start, stem_end),
+                               max (stem_end, stem_start));
+
+          stem_posns.intersect (bar_height);
+
+          ret = min (abs (stem_posns.length () / 7.0), 1.0);
+          ret *= robust_scm2double (me->get_property ("stem-spacing-correction"), 1);
+        }
     }
   return ret;
 }
@@ -92,23 +92,23 @@ Staff_spacing::bar_y_positions (Grob *bar_grob)
 
       string glyph_string = scm_is_string (glyph) ? ly_scm2string (glyph) : "";
       if (glyph_string.substr (0, 1) == "|"
-         || glyph_string.substr (0, 1) == ".")
-       {
-         Grob *common = bar_grob->common_refpoint (staff_sym, Y_AXIS);
-         bar_size = bar_grob->extent (common, Y_AXIS);
-         bar_size *= 1.0 / Staff_symbol_referencer::staff_space (bar_grob);
-       }
+          || glyph_string.substr (0, 1) == ".")
+        {
+          Grob *common = bar_grob->common_refpoint (staff_sym, Y_AXIS);
+          bar_size = bar_grob->extent (common, Y_AXIS);
+          bar_size *= 1.0 / Staff_symbol_referencer::staff_space (bar_grob);
+        }
     }
   return bar_size;
 }
 
 Real
 Staff_spacing::next_notes_correction (Grob *me,
-                                     Grob *last_grob)
+                                      Grob *last_grob)
 {
   Interval bar_size = bar_y_positions (last_grob);
   Grob *orig = me->original () ? me->original () : me;
-  vector<Item*> note_columns = Spacing_interface::right_note_columns (orig);
+  vector<Item *> note_columns = Spacing_interface::right_note_columns (orig);
 
   Real max_optical = 0.0;
 
@@ -132,20 +132,20 @@ Staff_spacing::get_spacing (Grob *me, Grob *right_col)
   Interval last_ext;
   Direction break_dir = me_item->break_status_dir ();
   Grob *last_grob = Spacing_interface::extremal_break_aligned_grob (me, LEFT,
-                                                                   break_dir,
-                                                                   &last_ext);
+                    break_dir,
+                    &last_ext);
   if (!last_grob)
     {
       /*
-       TODO:
+        TODO:
 
-       Should  insert a adjustable space here? For excercises, you might want to
-       use a staff without a clef in the beginning.
+        Should  insert a adjustable space here? For excercises, you might want to
+        use a staff without a clef in the beginning.
       */
 
       /*
-       we used to have a warning here, but it generates a lot of
-       spurious error messages.
+        we used to have a warning here, but it generates a lot of
+        spurious error messages.
       */
       return Spring ();
     }
@@ -159,7 +159,7 @@ Staff_spacing::get_spacing (Grob *me, Grob *right_col)
     {
       SCM nndef = scm_sloppy_assq (ly_symbol2scm ("next-note"), alist);
       if (scm_is_pair (nndef))
-       space_def = nndef;
+        space_def = nndef;
     }
 
   if (!scm_is_pair (space_def))
@@ -195,7 +195,6 @@ Staff_spacing::get_spacing (Grob *me, Grob *right_col)
       ideal = fixed;
     }
 
-
   Real optical_correction = next_notes_correction (me, last_grob);
   Real min_dist = Paper_column::minimum_distance (left_col, right_col);
 
@@ -212,10 +211,10 @@ Staff_spacing::get_spacing (Grob *me, Grob *right_col)
 }
 
 ADD_INTERFACE (Staff_spacing,
-              "This object calculates spacing details from a breakable"
-              " symbol (left) to another object.  For example, it takes care"
-              " of optical spacing from a bar line to a note.",
+               "This object calculates spacing details from a breakable"
+               " symbol (left) to another object.  For example, it takes care"
+               " of optical spacing from a bar line to a note.",
 
-              /* properties */
-              "stem-spacing-correction "
-              );
+               /* properties */
+               "stem-spacing-correction "
+              );
index 55e118245f2c793ac5b2ff92e995595e639d586e..a726f213253f28dbc9022ae3754d97775c4fa435 100644 (file)
@@ -84,7 +84,7 @@ Staff_symbol_engraver::process_music ()
       finished_span_ = span_;
       span_ = 0;
       if (first_start_)
-       first_start_ = false;
+        first_start_ = false;
     }
 
   if (span_events_[START]
@@ -99,7 +99,7 @@ Staff_symbol_engraver::start_spanner ()
     {
       span_ = make_spanner ("StaffSymbol", SCM_EOL);
       span_->set_bound (LEFT,
-                       unsmob_grob (get_property ("currentCommandColumn")));
+                        unsmob_grob (get_property ("currentCommandColumn")));
     }
 }
 
@@ -113,9 +113,9 @@ Staff_symbol_engraver::stop_spanner ()
     finished_span_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
 
   announce_end_grob (finished_span_,
-                    span_events_[STOP]
-                    ? span_events_[STOP]->self_scm ()
-                    : SCM_EOL);
+                     span_events_[STOP]
+                     ? span_events_[STOP]->self_scm ()
+                     : SCM_EOL);
 
   finished_span_ = 0;
 }
@@ -155,15 +155,15 @@ Staff_symbol_engraver::acknowledge_grob (Grob_info s)
 ADD_ACKNOWLEDGER (Staff_symbol_engraver, grob);
 
 ADD_TRANSLATOR (Staff_symbol_engraver,
-               /* doc */
-               "Create the constellation of five (default) staff lines.",
+                /* doc */
+                "Create the constellation of five (default) staff lines.",
 
-               /* create */
-               "StaffSymbol ",
+                /* create */
+                "StaffSymbol ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index e954dd37feffdd8164a1b8b3eba9a468e69e995c..35cd814f0c10fba5870530609b2b7bf9eee5e9b7 100644 (file)
@@ -30,7 +30,7 @@ LY_DEFINE (ly_grob_staff_position, "ly:grob-staff-position",
   Grob *g = unsmob_grob (sg);
   Real pos = Staff_symbol_referencer::get_position (g);
 
-  if (fabs (rint (pos) -pos) < 1e-6) // ugh.
+  if (fabs (rint (pos) - pos) < 1e-6) // ugh.
     return scm_from_int ((int) my_round (pos));
   else
     return scm_from_double (pos);
index 2939e0c0614fdb035fe5a62409c4708f7bbf03ee..f5ac177149e8d50e5d2dd1b5643600cee56dddf8 100644 (file)
@@ -81,7 +81,7 @@ Staff_symbol_referencer::get_position (Grob *me)
   if (st && c)
     {
       Real y = me->relative_coordinate (c, Y_AXIS)
-              - st->relative_coordinate (c, Y_AXIS);
+               - st->relative_coordinate (c, Y_AXIS);
       Real space = Staff_symbol::staff_space (st);
       p = (space == 0) ? 0 : 2.0 * y / space;
       return p;
@@ -91,7 +91,6 @@ Staff_symbol_referencer::get_position (Grob *me)
   return robust_scm2double (me->get_property ("staff-position"), p);
 }
 
-
 Interval
 Staff_symbol_referencer::extent_in_staff (Grob *me)
 {
@@ -101,8 +100,8 @@ Staff_symbol_referencer::extent_in_staff (Grob *me)
   Interval retval;
   if (st && c)
     {
-      retval  = me->extent (c, Y_AXIS)
-       - st->relative_coordinate (c, Y_AXIS);
+      retval = me->extent (c, Y_AXIS)
+               - st->relative_coordinate (c, Y_AXIS);
     }
 
   return retval;
@@ -154,7 +153,7 @@ Staff_symbol_referencer::set_position (Grob *me, Real p)
     }
 
   Real ss = Staff_symbol_referencer::staff_space (me);
-  me->translate_axis ((p  - oldpos) * ss * 0.5, Y_AXIS);
+  me->translate_axis ((p - oldpos) * ss * 0.5, Y_AXIS);
 }
 
 /* Half of the height, in staff space, i.e. 2.0 for a normal staff. */
@@ -168,22 +167,22 @@ int
 compare_position (Grob *const &a, Grob *const &b)
 {
   return sign (Staff_symbol_referencer::get_position ((Grob *)a)
-              - Staff_symbol_referencer::get_position ((Grob *) b));
+               - Staff_symbol_referencer::get_position ((Grob *) b));
 }
 
 bool
 position_less (Grob *const &a, Grob *const &b)
 {
   return Staff_symbol_referencer::get_position (a)
-    < Staff_symbol_referencer::get_position (b);
+         < Staff_symbol_referencer::get_position (b);
 }
 
 ADD_INTERFACE (Staff_symbol_referencer,
-              "An object whose Y@tie{}position is meant relative to a staff"
-              " symbol.  These usually"
-              " have @code{Staff_symbol_referencer::callback} in their"
-              " @code{Y-offset-callbacks}.",
-
-              /* properties */
-              "staff-position "
-              );
+               "An object whose Y@tie{}position is meant relative to a staff"
+               " symbol.  These usually"
+               " have @code{Staff_symbol_referencer::callback} in their"
+               " @code{Y-offset-callbacks}.",
+
+               /* properties */
+               "staff-position "
+              );
index d1629dfb243fbe26d88323a052a9b9aeffd1ce3d..f80a5c57741dfc1c2523f403fa809149c370d8d3 100644 (file)
@@ -54,25 +54,25 @@ Staff_symbol::print (SCM smob)
     {
       SCM width_scm = me->get_property ("width");
       if (d == RIGHT && scm_is_number (width_scm))
-       {
-         /*
-           don't multiply by Staff_symbol_referencer::staff_space (me),
-           since that would make aligning staff symbols of different sizes to
-           one right margin hell.
-         */
-         span_points[RIGHT] = scm_to_double (width_scm);
-       }
+        {
+          /*
+            don't multiply by Staff_symbol_referencer::staff_space (me),
+            since that would make aligning staff symbols of different sizes to
+            one right margin hell.
+          */
+          span_points[RIGHT] = scm_to_double (width_scm);
+        }
       else
-       {
-         Item *x = sp->get_bound (d);
+        {
+          Item *x = sp->get_bound (d);
 
-         span_points[d] = x->relative_coordinate (common, X_AXIS);
-         if (!x->break_status_dir ()
-             && !x->extent (x, X_AXIS).is_empty ())
-           span_points[d] += x->extent (x, X_AXIS)[d];
-       }
+          span_points[d] = x->relative_coordinate (common, X_AXIS);
+          if (!x->break_status_dir ()
+              && !x->extent (x, X_AXIS).is_empty ())
+            span_points[d] += x->extent (x, X_AXIS)[d];
+        }
 
-      span_points[d] -= d* t / 2;
+      span_points[d] -= d * t / 2;
     }
   while (flip (&d) != LEFT);
 
@@ -81,36 +81,35 @@ Staff_symbol::print (SCM smob)
   SCM line_positions = me->get_property ("line-positions");
   Stencil line
     = Lookup::horizontal_line (span_points
-                              -me->relative_coordinate (common, X_AXIS),
-                              t);
+                               - me->relative_coordinate (common, X_AXIS),
+                               t);
 
   Real space = staff_space (me);
   if (scm_is_pair (line_positions))
     {
       for (SCM s = line_positions; scm_is_pair (s);
-          s = scm_cdr (s))
-       {
-         Stencil b (line);
-         b.translate_axis (scm_to_double (scm_car (s))
-                           * 0.5 * space, Y_AXIS);
-         m.add_stencil (b);
-       }
+           s = scm_cdr (s))
+        {
+          Stencil b (line);
+          b.translate_axis (scm_to_double (scm_car (s))
+                            * 0.5 * space, Y_AXIS);
+          m.add_stencil (b);
+        }
     }
   else
     {
       int l = Staff_symbol::line_count (me);
       Real height = (l - 1) * staff_space (me) / 2;
       for (int i = 0; i < l; i++)
-       {
-         Stencil b (line);
-         b.translate_axis (height - i * space, Y_AXIS);
-         m.add_stencil (b);
-       }
+        {
+          Stencil b (line);
+          b.translate_axis (height - i * space, Y_AXIS);
+          m.add_stencil (b);
+        }
     }
   return m.smobbed_copy ();
 }
 
-
 int
 Staff_symbol::get_steps (Grob *me)
 {
@@ -150,14 +149,14 @@ Staff_symbol::get_ledger_line_thickness (Grob *me)
   return z[X_AXIS] * get_line_thickness (me) + z[Y_AXIS] * staff_space (me);
 }
 
-MAKE_SCHEME_CALLBACK (Staff_symbol, height,1);
+MAKE_SCHEME_CALLBACK (Staff_symbol, height, 1);
 SCM
-Staff_symbol::height  (SCM smob)
+Staff_symbol::height (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   Real t = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
   t *= robust_scm2double (me->get_property ("thickness"), 1.0);
-  
+
   SCM line_positions = me->get_property ("line-positions");
 
   Interval y_ext;
@@ -165,8 +164,8 @@ Staff_symbol::height  (SCM smob)
   if (scm_is_pair (line_positions))
     {
       for (SCM s = line_positions; scm_is_pair (s);
-          s = scm_cdr (s))
-       y_ext.add_point (scm_to_double (scm_car (s)) * 0.5 * space);
+           s = scm_cdr (s))
+        y_ext.add_point (scm_to_double (scm_car (s)) * 0.5 * space);
     }
   else
     {
@@ -174,7 +173,7 @@ Staff_symbol::height  (SCM smob)
       Real height = (l - 1) * staff_space (me) / 2;
       y_ext = Interval (-height, height);
     }
-  y_ext.widen (t/2);
+  y_ext.widen (t / 2);
   return ly_interval2scm (y_ext);
 }
 
@@ -187,20 +186,20 @@ Staff_symbol::on_line (Grob *me, int pos)
       Real min_line = HUGE_VAL;
       Real max_line = -HUGE_VAL;
       for (SCM s = line_positions; scm_is_pair (s); s = scm_cdr (s))
-       {
-         Real current_line = scm_to_double (scm_car (s));
-         if (pos == current_line)
-           return true;
-         if (current_line > max_line)
-           max_line = current_line;
-         if (current_line < min_line)
-           min_line = current_line;
-       
-       }
+        {
+          Real current_line = scm_to_double (scm_car (s));
+          if (pos == current_line)
+            return true;
+          if (current_line > max_line)
+            max_line = current_line;
+          if (current_line < min_line)
+            min_line = current_line;
+
+        }
       if (pos < min_line)
-       return (( (int) (rint (pos - min_line)) % 2) == 0);
+        return (( (int) (rint (pos - min_line)) % 2) == 0);
       if (pos > max_line)
-       return (( (int) (rint (pos - max_line)) % 2) == 0);
+        return (( (int) (rint (pos - max_line)) % 2) == 0);
 
       return false;
     }
@@ -227,18 +226,18 @@ Staff_symbol::line_span (Grob *me)
 }
 
 ADD_INTERFACE (Staff_symbol,
-              "This spanner draws the lines of a staff.  A staff symbol"
-              " defines a vertical unit, the @emph{staff space}.  Quantities"
-              " that go by a half staff space are called @emph{positions}."
-              "  The center (i.e., middle line or space) is position@tie{}0."
-              " The length of the symbol may be set by hand through the"
-              " @code{width} property.",
-
-              /* properties */
-              "ledger-line-thickness "
-              "line-count "
-              "line-positions "
-              "staff-space "
-              "thickness "
-              "width "
-              );
+               "This spanner draws the lines of a staff.  A staff symbol"
+               " defines a vertical unit, the @emph{staff space}.  Quantities"
+               " that go by a half staff space are called @emph{positions}."
+               "  The center (i.e., middle line or space) is position@tie{}0."
+               " The length of the symbol may be set by hand through the"
+               " @code{width} property.",
+
+               /* properties */
+               "ledger-line-thickness "
+               "line-count "
+               "line-positions "
+               "staff-space "
+               "thickness "
+               "width "
+              );
index 1acf51f362b37921e22d0efc2567a81f3eaf177c..bccd68e4372de23b7fe3176b663adad29441c24c 100644 (file)
@@ -32,8 +32,8 @@ public:
   TRANSLATOR_DECLARATIONS (Stanza_number_align_engraver);
 
 protected:
-  vector<Grob*> lyrics_;
-  vector<Grob*> stanza_numbers_;
+  vector<Grob *> lyrics_;
+  vector<Grob *> stanza_numbers_;
 
   DECLARE_ACKNOWLEDGER (lyric_syllable);
   DECLARE_ACKNOWLEDGER (stanza_number);
@@ -73,16 +73,16 @@ ADD_ACKNOWLEDGER (Stanza_number_align_engraver, lyric_syllable);
 ADD_ACKNOWLEDGER (Stanza_number_align_engraver, stanza_number);
 
 ADD_TRANSLATOR (Stanza_number_align_engraver,
-               /* doc */
-               "This engraver ensures that stanza numbers are neatly"
-               " aligned.",
+                /* doc */
+                "This engraver ensures that stanza numbers are neatly"
+                " aligned.",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               "");
+                /* write */
+                "");
 
index 0737e969dfd016749fde7d1a002e0ec3809874cc..d37268d08428050e4b493951e5eed52a7bb2be5d 100644 (file)
@@ -85,15 +85,15 @@ Stanza_number_engraver::stop_translation_timestep ()
 
 ADD_ACKNOWLEDGER (Stanza_number_engraver, lyric_syllable);
 ADD_TRANSLATOR (Stanza_number_engraver,
-               /* doc */
-               "Engrave stanza numbers.",
+                /* doc */
+                "Engrave stanza numbers.",
 
-               /* create */
-               "StanzaNumber ",
+                /* create */
+                "StanzaNumber ",
 
-               /* read */
-               "stanza ",
+                /* read */
+                "stanza ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index fb545911478bab563907bd80b307cd30811bd02f..6890b5b041c410f56186d1c8733eb4613e313179 100644 (file)
@@ -69,52 +69,51 @@ Stem_engraver::make_stem (Grob_info gi)
   if (tremolo_ev_)
     {
       /* Stem tremolo is never applied to a note by default,
-        it must be requested.  But there is a default for the
-        tremolo value:
+         it must be requested.  But there is a default for the
+         tremolo value:
 
-        c4:8 c c:
+         c4:8 c c:
 
-        the first and last (quarter) note both get one tremolo flag.  */
+         the first and last (quarter) note both get one tremolo flag.  */
       int requested_type
-       = robust_scm2int (tremolo_ev_->get_property ("tremolo-type"), 0);
+        = robust_scm2int (tremolo_ev_->get_property ("tremolo-type"), 0);
       SCM f = get_property ("tremoloFlags");
       if (!requested_type)
-       {
-         if (scm_is_number (f))
-           requested_type = scm_to_int (f);
-         else
-           requested_type = 8;
-       }
+        {
+          if (scm_is_number (f))
+            requested_type = scm_to_int (f);
+          else
+            requested_type = 8;
+        }
       else
-       context ()->set_property ("tremoloFlags", scm_from_int (requested_type));
-
+        context ()->set_property ("tremoloFlags", scm_from_int (requested_type));
 
       /*
-       we take the duration log from the Event, since the duration-log
-       for a note head is always <= 2.
+        we take the duration log from the Event, since the duration-log
+        for a note head is always <= 2.
       */
       Stream_event *ev = gi.event_cause ();
       Duration *dur = unsmob_duration (ev->get_property ("duration"));
-      
+
       int tremolo_flags = intlog2 (requested_type) - 2
-       - (dur->duration_log () > 2 ? dur->duration_log () - 2 : 0);
+                          - (dur->duration_log () > 2 ? dur->duration_log () - 2 : 0);
       if (tremolo_flags <= 0)
-       {
-         tremolo_ev_->origin ()->warning (_ ("tremolo duration is too long"));
-         tremolo_flags = 0;
-       }
+        {
+          tremolo_ev_->origin ()->warning (_ ("tremolo duration is too long"));
+          tremolo_flags = 0;
+        }
 
       if (tremolo_flags)
-       {
-         tremolo_ = make_item ("StemTremolo", tremolo_ev_->self_scm ());
-
-         /* The number of tremolo flags is the number of flags of the
-            tremolo-type minus the number of flags of the note itself.  */
-         tremolo_->set_property ("flag-count", scm_from_int (tremolo_flags));
-         tremolo_->set_parent (stem_, X_AXIS);
-         stem_->set_object ("tremolo-flag", tremolo_->self_scm ());
-         tremolo_->set_object ("stem", stem_->self_scm ());
-       }
+        {
+          tremolo_ = make_item ("StemTremolo", tremolo_ev_->self_scm ());
+
+          /* The number of tremolo flags is the number of flags of the
+             tremolo-type minus the number of flags of the note itself.  */
+          tremolo_->set_property ("flag-count", scm_from_int (tremolo_flags));
+          tremolo_->set_parent (stem_, X_AXIS);
+          stem_->set_object ("tremolo-flag", tremolo_->self_scm ());
+          tremolo_->set_object ("stem", stem_->self_scm ());
+        }
     }
 }
 
@@ -150,11 +149,11 @@ Stem_engraver::acknowledge_rhythmic_head (Grob_info gi)
   if (dc == -1)
     dc = 0;
 
-  if (ds != dc) 
+  if (ds != dc)
     {
       gi.event_cause ()->origin ()->warning (_f ("adding note head to incompatible stem (type = %d/%d)",
-                                                ds < 0 ? 1 << -ds : 1,
-                                                ds > 0 ? 1 << ds : 1));
+                                                 ds < 0 ? 1 << -ds : 1,
+                                                 ds > 0 ? 1 << ds : 1));
       gi.event_cause ()->origin ()->warning (_ ("maybe input should specify polyphonic voices"));
     }
 
@@ -170,16 +169,16 @@ Stem_engraver::stop_translation_timestep ()
       /* FIXME: junk these properties.  */
       SCM prop = get_property ("stemLeftBeamCount");
       if (scm_is_number (prop))
-       {
-         Stem::set_beaming (stem_, scm_to_int (prop), LEFT);
-         context ()->unset_property (ly_symbol2scm ("stemLeftBeamCount"));
-       }
+        {
+          Stem::set_beaming (stem_, scm_to_int (prop), LEFT);
+          context ()->unset_property (ly_symbol2scm ("stemLeftBeamCount"));
+        }
       prop = get_property ("stemRightBeamCount");
       if (scm_is_number (prop))
-       {
-         Stem::set_beaming (stem_, scm_to_int (prop), RIGHT);
-         context ()->unset_property (ly_symbol2scm ("stemRightBeamCount"));
-       }
+        {
+          Stem::set_beaming (stem_, scm_to_int (prop), RIGHT);
+          context ()->unset_property (ly_symbol2scm ("stemRightBeamCount"));
+        }
       stem_ = 0;
     }
   tremolo_ev_ = 0;
@@ -195,19 +194,19 @@ Stem_engraver::listen_tremolo (Stream_event *ev)
 ADD_ACKNOWLEDGER (Stem_engraver, rhythmic_head);
 
 ADD_TRANSLATOR (Stem_engraver,
-               /* doc */
-               "Create stems and single-stem tremolos.  It also works"
-               " together with the beam engraver for overriding beaming.",
-
-               /* create */
-               "Stem "
-               "StemTremolo ",
-
-               /* read */
-               "tremoloFlags "
-               "stemLeftBeamCount "
-               "stemRightBeamCount ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Create stems and single-stem tremolos.  It also works"
+                " together with the beam engraver for overriding beaming.",
+
+                /* create */
+                "Stem "
+                "StemTremolo ",
+
+                /* read */
+                "tremoloFlags "
+                "stemLeftBeamCount "
+                "stemRightBeamCount ",
+
+                /* write */
+                ""
+               );
index 5a115835ef55cc8561dfda677b5ef0b7f2c060a0..2036d9a89072e2ef8019761674ebabd45b8d8c23 100644 (file)
@@ -42,23 +42,22 @@ Stem_tremolo::calc_slope (SCM smob)
       Real dy = 0;
       SCM s = beam->get_property ("quantized-positions");
       if (is_number_pair (s))
-       dy = - scm_to_double (scm_car (s)) + scm_to_double (scm_cdr (s));
+        dy = - scm_to_double (scm_car (s)) + scm_to_double (scm_cdr (s));
 
       Grob *s2 = Beam::last_normal_stem (beam);
       Grob *s1 = Beam::first_normal_stem (beam);
-      
+
       Grob *common = s1->common_refpoint (s2, X_AXIS);
-      Real dx = s2->relative_coordinate (common, X_AXIS) -
-       s1->relative_coordinate (common, X_AXIS);
+      Real dx = s2->relative_coordinate (common, X_AXIS)
+                - s1->relative_coordinate (common, X_AXIS);
 
       return scm_from_double (dx ? dy / dx : 0);
     }
   else
     /* down stems with flags should have more sloped trems (helps avoid
        flag/stem collisions without making the stem very long) */
-    return scm_from_double (
-        (Stem::duration_log (stem) >= 3 && get_grob_direction (stem) == DOWN) ?
-          0.40 : 0.25);
+    return scm_from_double ((Stem::duration_log (stem) >= 3 && get_grob_direction (stem) == DOWN)
+                            ? 0.40 : 0.25);
 }
 
 MAKE_SCHEME_CALLBACK (Stem_tremolo, calc_width, 1)
@@ -72,7 +71,7 @@ Stem_tremolo::calc_width (SCM smob)
   bool flag = Stem::duration_log (stem) >= 3 && !beam;
 
   /* beamed stems and up-stems with flags have shorter tremolos */
-  return scm_from_double (((stemdir == UP && flag) || beam)? 1.0 : 1.5);
+  return scm_from_double (((stemdir == UP && flag) || beam) ? 1.0 : 1.5);
 }
 
 MAKE_SCHEME_CALLBACK (Stem_tremolo, calc_style, 1)
@@ -95,9 +94,9 @@ Stem_tremolo::get_beam_translation (Grob *me)
   Spanner *beam = Stem::get_beam (stem);
 
   return (beam && beam->is_live ())
-    ? Beam::get_beam_translation (beam)
-    : (Staff_symbol_referencer::staff_space (me)
-       * robust_scm2double (me->get_property ("length-fraction"), 1.0) * 0.81);
+         ? Beam::get_beam_translation (beam)
+         : (Staff_symbol_referencer::staff_space (me)
+            * robust_scm2double (me->get_property ("length-fraction"), 1.0) * 0.81);
 }
 
 Stencil
@@ -144,8 +143,6 @@ Stem_tremolo::raw_stencil (Grob *me, Real slope, Direction stemdir)
   return mol;
 }
 
-
-
 MAKE_SCHEME_CALLBACK (Stem_tremolo, pure_height, 3);
 SCM
 Stem_tremolo::pure_height (SCM smob, SCM, SCM)
@@ -179,7 +176,7 @@ Stem_tremolo::vertical_length (Grob *me)
 {
   return untranslated_stencil (me, 0.35).extent (Y_AXIS).length ();
 }
-  
+
 Stencil
 Stem_tremolo::untranslated_stencil (Grob *me, Real slope)
 {
@@ -202,7 +199,6 @@ Stem_tremolo::untranslated_stencil (Grob *me, Real slope)
   return raw_stencil (me, slope, stencil_dir);
 }
 
-  
 Stencil
 Stem_tremolo::translated_stencil (Grob *me, Real slope)
 {
@@ -211,7 +207,7 @@ Stem_tremolo::translated_stencil (Grob *me, Real slope)
   Grob *stem = unsmob_grob (me->get_object ("stem"));
   if (!stem)
     return Stencil ();
-  
+
   Direction stemdir = get_grob_direction (stem);
   if (stemdir == 0)
     stemdir = UP;
@@ -224,7 +220,7 @@ Stem_tremolo::translated_stencil (Grob *me, Real slope)
 
   Real end_y
     = Stem::stem_end_position (stem) * ss / 2
-    - stemdir * max (beam_count, 1) * beam_translation;
+      - stemdir * max (beam_count, 1) * beam_translation;
 
   if (!beam && Stem::duration_log (stem) >= 3)
     {
@@ -252,21 +248,21 @@ SCM
 Stem_tremolo::print (SCM grob)
 {
   Grob *me = unsmob_grob (grob);
-  
+
   Stencil s = translated_stencil (me, robust_scm2double (me->get_property ("slope"), 0.25));
   return s.smobbed_copy ();
 }
 
 ADD_INTERFACE (Stem_tremolo,
-              "A beam slashing a stem to indicate a tremolo.  The property"
-              " @code{style} can be @code{default} or @code{rectangle}.",
+               "A beam slashing a stem to indicate a tremolo.  The property"
+               " @code{style} can be @code{default} or @code{rectangle}.",
 
                /* properties */
-              "beam-thickness "
-              "beam-width "
-              "flag-count "
-              "length-fraction "
-              "stem "
+               "beam-thickness "
+               "beam-width "
+               "flag-count "
+               "length-fraction "
+               "stem "
                "style "
-              "slope "
-              );
+               "slope "
+              );
index 5b1a3d5041423e488e9cdc40eba25f4f7bf7a34a..e83ffd9893226a95672f70ebf284d7cd8d926733 100644 (file)
@@ -27,7 +27,7 @@
 #include "stem.hh"
 #include "spanner.hh"
 
-#include <cmath>               // rint
+#include <cmath>                // rint
 using namespace std;
 
 #include "beam.hh"
@@ -65,7 +65,7 @@ Stem::set_beaming (Grob *me, int beam_count, Direction d)
       lst = scm_cons (scm_from_int (i), lst);
   else
     lst = SCM_BOOL_F;
-  
+
   index_set_cell (pair, d, lst);
 }
 
@@ -89,7 +89,7 @@ Stem::head_positions (Grob *me)
     {
       Drul_array<Grob *> e (extremal_heads (me));
       return Interval (Staff_symbol_referencer::get_position (e[DOWN]),
-                      Staff_symbol_referencer::get_position (e[UP]));
+                       Staff_symbol_referencer::get_position (e[UP]));
     }
   return Interval ();
 }
@@ -100,12 +100,10 @@ Stem::chord_start_y (Grob *me)
   Interval hp = head_positions (me);
   if (!hp.is_empty ())
     return hp[get_grob_direction (me)] * Staff_symbol_referencer::staff_space (me)
-      * 0.5;
+           * 0.5;
   return 0;
 }
 
-
-
 void
 Stem::set_stemend (Grob *me, Real se)
 {
@@ -180,13 +178,13 @@ Stem::extremal_heads (Grob *me)
 
       Direction d = LEFT;
       do
-       {
-         if (d * p > d * extpos[d])
-           {
-             exthead[d] = n;
-             extpos[d] = p;
-           }
-       }
+        {
+          if (d * p > d * extpos[d])
+            {
+              exthead[d] = n;
+              extpos[d] = p;
+            }
+        }
       while (flip (&d) != DOWN);
     }
   return exthead;
@@ -226,23 +224,21 @@ bool
 Stem::is_invisible (Grob *me)
 {
   return !is_normal_stem (me)
-    && (robust_scm2double (me->get_property ("stemlet-length"),
-                          0.0) == 0.0);
+         && (robust_scm2double (me->get_property ("stemlet-length"),
+                                0.0) == 0.0);
 }
 
-
 bool
 Stem::is_normal_stem (Grob *me)
 {
   return head_count (me) && scm_to_int (me->get_property ("duration-log")) >= 1;
 }
 
-
 MAKE_SCHEME_CALLBACK (Stem, pure_height, 3)
 SCM
 Stem::pure_height (SCM smob,
-                  SCM /* start */,
-                  SCM /* end */)
+                   SCM /* start */,
+                   SCM /* end */)
 {
   Grob *me = unsmob_grob (smob);
   Interval iv;
@@ -258,29 +254,29 @@ Stem::pure_height (SCM smob,
       Real len_in_halfspaces;
       SCM user_set_len_scm = me->get_property_data ("length");
       if (scm_is_number (user_set_len_scm))
-       len_in_halfspaces = scm_to_double (user_set_len_scm);
+        len_in_halfspaces = scm_to_double (user_set_len_scm);
       else
-       len_in_halfspaces = scm_to_double (calc_length (smob));
+        len_in_halfspaces = scm_to_double (calc_length (smob));
       Real len = len_in_halfspaces * ss / 2;
       Direction dir = get_grob_direction (me);
 
       Interval hp = head_positions (me);
       if (dir == UP)
-       iv = Interval (0, len);
+        iv = Interval (0, len);
       else
-       iv = Interval (-len, 0);
+        iv = Interval (-len, 0);
 
       if (!hp.is_empty ())
-       {
-         iv.translate (hp[dir] * ss / 2);
-         iv.add_point (hp[-dir] * ss / 2);
-       }
+        {
+          iv.translate (hp[dir] * ss / 2);
+          iv.add_point (hp[-dir] * ss / 2);
+        }
 
       /* extend the stem (away from the head) to cover the staff */
       if (dir == UP)
-       iv[UP] = max (iv[UP], rad * ss);
+        iv[UP] = max (iv[UP], rad * ss);
       else
-       iv[DOWN] = min (iv[DOWN], -rad * ss);
+        iv[DOWN] = min (iv[DOWN], -rad * ss);
     }
   else
     iv = Interval (-rad * ss, rad * ss);
@@ -302,7 +298,7 @@ Stem::calc_stem_end_position (SCM smob)
       (void) beam->get_property ("quantized-positions");
       return me->get_property ("stem-end-position");
     }
-  
+
   vector<Real> a;
 
   /* WARNING: IN HALF SPACES */
@@ -326,7 +322,7 @@ SCM
 Stem::calc_length (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
-  
+
   SCM details = me->get_property ("details");
   int durlog = duration_log (me);
 
@@ -346,7 +342,7 @@ Stem::calc_length (SCM smob)
     {
       SCM sshorten = ly_assoc_get (ly_symbol2scm ("stem-shorten"), details, SCM_EOL);
       SCM scm_shorten = scm_is_pair (sshorten)
-       ? robust_list_ref (max (duration_log (me) - 2, 0), sshorten) : SCM_EOL;
+                        ? robust_list_ref (max (duration_log (me) - 2, 0), sshorten) : SCM_EOL;
       Real shorten_property = 2 * robust_scm2double (scm_shorten, 0);
       /*  change in length between full-size and shortened stems is executed gradually.
           "transition area" = stems between full-sized and fully-shortened.
@@ -364,7 +360,7 @@ Stem::calc_length (SCM smob)
           Shortening of flagged stems begins in the same moment as unflagged ones,
           but not earlier than on the middle line note.
           */
-      Real which_step = (min (1.0, quarter_stem_length - (2 * staff_rad) - 2.0)) + abs(hp[dir]);
+      Real which_step = (min (1.0, quarter_stem_length - (2 * staff_rad) - 2.0)) + abs (hp[dir]);
       Real shorten = min (max (0.0, (shortening_step * which_step)), shorten_property);
 
       length -= shorten;
@@ -382,7 +378,7 @@ Stem::calc_length (SCM smob)
       (Stem_tremolo::raw_stencil () looks at the beam.) --hwn  */
 
       Real minlen = 1.0
-       + 2 * Stem_tremolo::vertical_length (t_flag) / ss;
+                    + 2 * Stem_tremolo::vertical_length (t_flag) / ss;
 
       /* We don't want to add the whole extent of the flag because the trem
          and the flag can overlap partly. beam_translation gives a good
@@ -401,7 +397,7 @@ Stem::calc_length (SCM smob)
         }
       length = max (length, minlen + 1.0);
     }
-  
+
   return scm_from_double (length);
 }
 /* The log of the duration (Number of hooks on the flag minus two)  */
@@ -416,14 +412,14 @@ MAKE_SCHEME_CALLBACK (Stem, calc_positioning_done, 1);
 SCM
 Stem::calc_positioning_done (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);  
+  Grob *me = unsmob_grob (smob);
   if (!head_count (me))
     return SCM_BOOL_T;
 
   me->set_property ("positioning-done", SCM_BOOL_T);
-  
+
   extract_grob_set (me, "note-heads", ro_heads);
-  vector<Grob*> heads (ro_heads);
+  vector<Grob *> heads (ro_heads);
   vector_sort (heads, position_less);
   Direction dir = get_grob_direction (me);
 
@@ -442,8 +438,8 @@ Stem::calc_positioning_done (SCM smob)
 
   bool is_harmonic_centered = false;
   for (vsize i = 0; i < heads.size (); i++)
-    is_harmonic_centered = is_harmonic_centered 
-      || heads[i]->get_property ("style") == ly_symbol2scm ("harmonic");
+    is_harmonic_centered = is_harmonic_centered
+                           || heads[i]->get_property ("style") == ly_symbol2scm ("harmonic");
   is_harmonic_centered = is_harmonic_centered && is_invisible (me);
 
   Real w = hed->extent (hed, X_AXIS)[dir];
@@ -452,10 +448,10 @@ Stem::calc_positioning_done (SCM smob)
       Real amount = w - heads[i]->extent (heads[i], X_AXIS)[dir];
 
       if (is_harmonic_centered)
-       amount =
-         hed->extent (hed, X_AXIS).linear_combination (CENTER)
-         - heads[i]->extent (heads[i], X_AXIS).linear_combination (CENTER);
-      
+        amount
+          = hed->extent (hed, X_AXIS).linear_combination (CENTER)
+            - heads[i]->extent (heads[i], X_AXIS).linear_combination (CENTER);
+
       heads[i]->translate_axis (amount, X_AXIS);
     }
   bool parity = true;
@@ -463,54 +459,54 @@ Stem::calc_positioning_done (SCM smob)
   for (vsize i = 1; i < heads.size (); i++)
     {
       Real p = Staff_symbol_referencer::get_position (heads[i]);
-      Real dy = fabs (lastpos- p);
+      Real dy = fabs (lastpos - p);
 
       /*
-       dy should always be 0.5, 0.0, 1.0, but provide safety margin
-       for rounding errors.
+        dy should always be 0.5, 0.0, 1.0, but provide safety margin
+        for rounding errors.
       */
       if (dy < 1.1)
-       {
-         if (parity)
-           {
-             Real ell = heads[i]->extent (heads[i], X_AXIS).length ();
+        {
+          if (parity)
+            {
+              Real ell = heads[i]->extent (heads[i], X_AXIS).length ();
 
-             Direction d = get_grob_direction (me);
-             /*
-               Reversed head should be shifted ell-thickness, but this
-               looks too crowded, so we only shift ell-0.5*thickness.
+              Direction d = get_grob_direction (me);
+              /*
+                Reversed head should be shifted ell-thickness, but this
+                looks too crowded, so we only shift ell-0.5*thickness.
 
-               This leads to assymetry: Normal heads overlap the
-               stem 100% whereas reversed heads only overlaps the
-               stem 50%
-             */
+                This leads to assymetry: Normal heads overlap the
+                stem 100% whereas reversed heads only overlaps the
+                stem 50%
+              */
 
-             Real reverse_overlap = 0.5;
-             heads[i]->translate_axis ((ell - thick * reverse_overlap) * d,
-                                       X_AXIS);
+              Real reverse_overlap = 0.5;
+              heads[i]->translate_axis ((ell - thick * reverse_overlap) * d,
+                                        X_AXIS);
 
-             if (is_invisible (me))
-               heads[i]->translate_axis (-thick * (2 - reverse_overlap) * d,
-                                         X_AXIS);
+              if (is_invisible (me))
+                heads[i]->translate_axis (-thick * (2 - reverse_overlap) * d,
+                                          X_AXIS);
 
-             /* TODO:
+              /* TODO:
 
-             For some cases we should kern some more: when the
-             distance between the next or prev note is too large, we'd
-             get large white gaps, eg.
+              For some cases we should kern some more: when the
+              distance between the next or prev note is too large, we'd
+              get large white gaps, eg.
 
-             |
+              |
               X|
-             |X  <- kern this.
-             |
-             X
-
-             */
-           }
-         parity = !parity;
-       }
+              |X  <- kern this.
+              |
+              X
+
+              */
+            }
+          parity = !parity;
+        }
       else
-       parity = true;
+        parity = true;
 
       lastpos = int (p);
     }
@@ -535,9 +531,9 @@ Stem::calc_direction (SCM smob)
       SCM dd = me->get_property ("default-direction");
       dir = to_dir (dd);
       if (!dir)
-       return me->get_property ("neutral-direction");
+        return me->get_property ("neutral-direction");
     }
-  
+
   return scm_from_int (dir);
 }
 
@@ -554,14 +550,13 @@ Stem::calc_default_direction (SCM smob)
     {
       int udistance = (int) (UP * hp[UP] - staff_center);
       int ddistance = (int) (DOWN * hp[DOWN] - staff_center);
-      
+
       dir = Direction (sign (ddistance - udistance));
     }
-  
+
   return scm_from_int (dir);
 }
 
-
 MAKE_SCHEME_CALLBACK (Stem, height, 1);
 SCM
 Stem::height (SCM smob)
@@ -569,9 +564,9 @@ Stem::height (SCM smob)
   Grob *me = unsmob_grob (smob);
   if (!is_normal_stem (me))
     return ly_interval2scm (Interval ());
-  
+
   Direction dir = get_grob_direction (me);
-  
+
   Grob *beam = get_beam (me);
   if (beam)
     {
@@ -588,10 +583,10 @@ Stem::height (SCM smob)
   if (beam)
     {
       if (dir == CENTER)
-       {
-         programming_error ("no stem direction");
-         dir = UP;
-       }
+        {
+          programming_error ("no stem direction");
+          dir = UP;
+        }
       iv[dir] += dir * Beam::get_beam_thickness (beam) * 0.5;
     }
 
@@ -617,7 +612,7 @@ Stem::calc_flag (SCM smob)
     '() or "grace").  */
   string flag_style;
 
-   SCM flag_style_scm = me->get_property ("flag-style");
+  SCM flag_style_scm = me->get_property ("flag-style");
   if (scm_is_symbol (flag_style_scm))
     flag_style = ly_symbol2string (flag_style_scm);
 
@@ -644,13 +639,13 @@ Stem::calc_flag (SCM smob)
         }
       else
         staffline_offs = "2";
-     }
+    }
   else
     staffline_offs = "";
 
   char dir = (get_grob_direction (me) == UP) ? 'u' : 'd';
   string font_char = flag_style
-    + to_string (dir) + staffline_offs + to_string (log);
+                     + to_string (dir) + staffline_offs + to_string (log);
   Font_metric *fm = Font_interface::get_default_font (me);
   Stencil flag = fm->find_by_name ("flags." + font_char);
   if (flag.is_empty ())
@@ -674,12 +669,11 @@ Stem::calc_flag (SCM smob)
           else
             flag.add_stencil (stroke);
         }
-     }
+    }
 
   return flag.smobbed_copy ();
 }
 
-
 Stencil
 Stem::flag (Grob *me)
 {
@@ -695,11 +689,14 @@ Stem::flag (Grob *me)
   // the grob passed as argument! Thus, we only have to check if a valid
   // stencil is returned.
   SCM flag_style_scm = me->get_property ("flag");
-  if (Stencil *flag = unsmob_stencil (flag_style_scm)) {
-    return *flag;
-  } else {
-    return Stencil ();
-  }
+  if (Stencil *flag = unsmob_stencil (flag_style_scm))
+    {
+      return *flag;
+    }
+  else
+    {
+      return Stencil ();
+    }
 }
 
 MAKE_SCHEME_CALLBACK (Stem, width, 1);
@@ -713,7 +710,7 @@ Stem::width (SCM e)
   if (is_invisible (me))
     r.set_empty ();
   else if (unsmob_grob (me->get_object ("beam"))
-          || abs (duration_log (me)) <= 2)
+           || abs (duration_log (me)) <= 2)
     {
       r = Interval (-1, 1);
       r *= thickness (me) / 2;
@@ -730,7 +727,7 @@ Real
 Stem::thickness (Grob *me)
 {
   return scm_to_double (me->get_property ("thickness"))
-    * Staff_symbol_referencer::line_thickness (me);
+         * Staff_symbol_referencer::line_thickness (me);
 }
 
 MAKE_SCHEME_CALLBACK (Stem, calc_stem_begin_position, 1);
@@ -742,8 +739,8 @@ Stem::calc_stem_begin_position (SCM smob)
   Real half_space = Staff_symbol_referencer::staff_space (me) * 0.5;
   Grob *lh
     = to_boolean (me->get_property ("avoid-note-head"))
-    ? last_head (me)
-    : first_head (me);
+      ? last_head (me)
+      : first_head (me);
 
   Real pos = Staff_symbol_referencer::get_position (lh);
 
@@ -765,20 +762,20 @@ Stem::print (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   Grob *beam = get_beam (me);
-    
+
   Stencil mol;
   Direction d = get_grob_direction (me);
 
   Real stemlet_length = robust_scm2double (me->get_property ("stemlet-length"),
-                                          0.0);
+                                           0.0);
   bool stemlet = stemlet_length > 0.0;
 
   /* TODO: make the stem start a direction ?
      This is required to avoid stems passing in tablature chords.  */
   Grob *lh
     = to_boolean (me->get_property ("avoid-note-head"))
-    ? last_head (me)
-    : first_head (me);
+      ? last_head (me)
+      : first_head (me);
 
   if (!lh && !stemlet)
     return SCM_EOL;
@@ -786,7 +783,7 @@ Stem::print (SCM smob)
   if (!lh && stemlet && !beam)
     return SCM_EOL;
 
-  if (lh && robust_scm2int (lh->get_property ("duration-log"), 0) < 1) 
+  if (lh && robust_scm2int (lh->get_property ("duration-log"), 0) < 1)
     return SCM_EOL;
 
   if (is_invisible (me))
@@ -805,9 +802,9 @@ Stem::print (SCM smob)
       int beam_count = beam_multiplicity (me).length () + 1;
 
       y2 -= d
-       * (0.5 * beam_thickness
-          + beam_translation * max (0, (beam_count - 1))
-          + stemlet_length) / half_space;
+            * (0.5 * beam_thickness
+               + beam_translation * max (0, (beam_count - 1))
+               + stemlet_length) / half_space;
     }
 
   Interval stem_y (min (y1, y2), max (y2, y1));
@@ -818,7 +815,7 @@ Stem::print (SCM smob)
     = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
 
   Box b = Box (Interval (-stem_width / 2, stem_width / 2),
-              Interval (stem_y[DOWN] * half_space, stem_y[UP] * half_space));
+               Interval (stem_y[DOWN] * half_space, stem_y[UP] * half_space));
 
   Stencil ss = Lookup::round_filled_box (b, blot);
   mol.add_stencil (ss);
@@ -836,7 +833,7 @@ Stem::get_translated_flag (Grob *me)
     {
       Direction d = get_grob_direction (me);
       Real blot
-       = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
+        = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
       Real stem_width = thickness (me);
       Real half_space = Staff_symbol_referencer::staff_space (me) * 0.5;
       Real y2 = robust_scm2double (me->get_property ("stem-end-position"), 0.0);
@@ -846,7 +843,6 @@ Stem::get_translated_flag (Grob *me)
   return fl;
 }
 
-
 /*
   move the stem to right of the notehead if it is up.
 */
@@ -864,16 +860,15 @@ Stem::offset_callback (SCM smob)
       return scm_from_double (r);
     }
 
-  
   if (Grob *f = first_head (me))
     {
       Interval head_wid = f->extent (f, X_AXIS);
       Real attach = 0.0;
 
       if (is_invisible (me))
-       attach = 0.0;
+        attach = 0.0;
       else
-       attach = Note_head::stem_attachment_coordinate (f, X_AXIS);
+        attach = Note_head::stem_attachment_coordinate (f, X_AXIS);
 
       Direction d = get_grob_direction (me);
       Real real_attach = head_wid.linear_combination (d * attach);
@@ -881,10 +876,10 @@ Stem::offset_callback (SCM smob)
 
       /* If not centered: correct for stem thickness.  */
       if (attach)
-       {
-         Real rule_thick = thickness (me);
-         r += -d * rule_thick * 0.5;
-       }
+        {
+          Real rule_thick = thickness (me);
+          r += -d * rule_thick * 0.5;
+        }
       return scm_from_double (r);
     }
 
@@ -904,7 +899,7 @@ Stem::get_stem_info (Grob *me)
 {
   Stem_info si;
   si.dir_ = get_grob_direction (me);
-  
+
   SCM scm_info = me->get_property ("stem-info");
   si.ideal_y_ = scm_to_double (scm_car (scm_info));
   si.shortest_y_ = scm_to_double (scm_cadr (scm_info));
@@ -931,7 +926,7 @@ Stem::calc_stem_info (SCM smob)
     {
       (void) beam->get_property ("beaming");
     }
-  
+
   Real beam_translation = Beam::get_beam_translation (beam);
   Real beam_thickness = Beam::get_beam_thickness (beam);
   int beam_count = Beam::get_direction_beam_count (beam, my_dir);
@@ -941,27 +936,27 @@ Stem::calc_stem_info (SCM smob)
   /* Simple standard stem length */
   SCM details = me->get_property ("details");
   SCM lengths = ly_assoc_get (ly_symbol2scm ("beamed-lengths"), details, SCM_EOL);
-  
+
   Real ideal_length
     = (scm_is_pair (lengths)
        ? (scm_to_double (robust_list_ref (beam_count - 1, lengths))
-         * staff_space
-         * length_fraction
-         /*
-           stem only extends to center of beam
-         */
-         - 0.5 * beam_thickness)
+          * staff_space
+          * length_fraction
+          /*
+            stem only extends to center of beam
+          */
+          - 0.5 * beam_thickness)
        : 0.0);
 
   /* Condition: sane minimum free stem length (chord to beams) */
   lengths = ly_assoc_get (ly_symbol2scm ("beamed-minimum-free-lengths"),
-                         details, SCM_EOL);
+                          details, SCM_EOL);
 
   Real ideal_minimum_free
     = (scm_is_pair (lengths)
        ? (scm_to_double (robust_list_ref (beam_count - 1, lengths))
-         * staff_space
-         * length_fraction)
+          * staff_space
+          * length_fraction)
        : 0.0);
 
   Real height_of_my_trem = 0.0;
@@ -969,12 +964,11 @@ Stem::calc_stem_info (SCM smob)
   if (trem)
     {
       height_of_my_trem
-       = Stem_tremolo::vertical_length (trem)
-        /* hack a bit of space around the trem. */
-        + beam_translation;
+        = Stem_tremolo::vertical_length (trem)
+          /* hack a bit of space around the trem. */
+          + beam_translation;
     }
 
-  
   /* UGH
      It seems that also for ideal minimum length, we must use
      the maximum beam count (for this direction):
@@ -983,21 +977,21 @@ Stem::calc_stem_info (SCM smob)
 
      must be horizontal. */
   Real height_of_my_beams = beam_thickness
-    + (beam_count - 1) * beam_translation;
+                            + (beam_count - 1) * beam_translation;
 
   Real ideal_minimum_length = ideal_minimum_free
-    + height_of_my_beams
-    + height_of_my_trem
-    /* stem only extends to center of beam */
-    - 0.5 * beam_thickness;
+                              + height_of_my_beams
+                              + height_of_my_trem
+                              /* stem only extends to center of beam */
+                              - 0.5 * beam_thickness;
 
   ideal_length = max (ideal_length, ideal_minimum_length);
 
   /* Convert to Y position, calculate for dir == UP */
   Real note_start
     =     /* staff positions */
-    head_positions (me)[my_dir] * 0.5
-    * my_dir * staff_space;
+      head_positions (me)[my_dir] * 0.5
+      * my_dir * staff_space;
   Real ideal_y = note_start + ideal_length;
 
   /* Conditions for Y position */
@@ -1020,36 +1014,36 @@ Stem::calc_stem_info (SCM smob)
   if (!no_extend && !is_knee)
     {
       /* Highest beam of (UP) beam must never be lower than middle
-        staffline */
+         staffline */
       ideal_y = max (ideal_y, 0.0);
       /* Lowest beam of (UP) beam must never be lower than second staffline */
       ideal_y = max (ideal_y, (-staff_space
-                              - beam_thickness + height_of_my_beams));
+                               - beam_thickness + height_of_my_beams));
     }
 
   ideal_y -= robust_scm2double (beam->get_property ("shorten"), 0);
 
   SCM bemfl = ly_assoc_get (ly_symbol2scm ("beamed-extreme-minimum-free-lengths"),
-                           details, SCM_EOL);
-  
+                            details, SCM_EOL);
+
   Real minimum_free
     = (scm_is_pair (bemfl)
        ? (scm_to_double (robust_list_ref (beam_count - 1, bemfl))
-         * staff_space
-         * length_fraction)
+          * staff_space
+          * length_fraction)
        : 0.0);
 
   Real minimum_length = max (minimum_free, height_of_my_trem)
-    + height_of_my_beams
-    /* stem only extends to center of beam */
-    - 0.5 * beam_thickness;
+                        + height_of_my_beams
+                        /* stem only extends to center of beam */
+                        - 0.5 * beam_thickness;
 
   ideal_y *= my_dir;
   Real minimum_y = note_start + minimum_length;
   Real shortest_y = minimum_y * my_dir;
 
   return scm_list_2 (scm_from_double (ideal_y),
-                    scm_from_double (shortest_y));
+                     scm_from_double (shortest_y));
 }
 
 Slice
@@ -1078,60 +1072,60 @@ Stem::calc_cross_staff (SCM smob)
 
 /* FIXME:  Too many properties  */
 ADD_INTERFACE (Stem,
-              "The stem represents the graphical stem.  In addition, it"
-              " internally connects note heads, beams, and tremolos.  Rests"
-              " and whole notes have invisible stems.\n"
-              "\n"
-              "The following properties may be set in the @code{details}"
-              " list.\n"
-              "\n"
-              "@table @code\n"
-              "@item beamed-lengths\n"
-              "List of stem lengths given beam multiplicity.\n"
-              "@item beamed-minimum-free-lengths\n"
-              "List of normal minimum free stem lengths (chord to beams)"
-              " given beam multiplicity.\n"
-              "@item beamed-extreme-minimum-free-lengths\n"
-              "List of extreme minimum free stem lengths (chord to beams)"
-              " given beam multiplicity.\n"
-              "@item lengths\n"
-              "Default stem lengths.  The list gives a length for each"
-              " flag count.\n"
-              "@item stem-shorten\n"
-              "How much a stem in a forced direction should be shortened."
-              "  The list gives an amount depending on the number of flags"
-              " and beams.\n"
-              "@end table\n",
-
-              /* properties */
-              "avoid-note-head "
-              "beam "
-              "beaming "
-              "beamlet-default-length "
-              "beamlet-max-length-proportion "
-              "default-direction "
-              "details "
-              "direction "
-              "duration-log "
-              "flag "
-              "flag-style "
-              "french-beaming "
-              "length "
-              "length-fraction "
-              "max-beam-connect "
-              "neutral-direction "
-              "no-stem-extend "
-              "note-heads "
-              "positioning-done "
-              "rests "
-              "stem-begin-position "
-              "stem-end-position "
-              "stem-info "
-              "stemlet-length "
-              "stroke-style "
-              "thickness "
-              "tremolo-flag "
-              );
+               "The stem represents the graphical stem.  In addition, it"
+               " internally connects note heads, beams, and tremolos.  Rests"
+               " and whole notes have invisible stems.\n"
+               "\n"
+               "The following properties may be set in the @code{details}"
+               " list.\n"
+               "\n"
+               "@table @code\n"
+               "@item beamed-lengths\n"
+               "List of stem lengths given beam multiplicity.\n"
+               "@item beamed-minimum-free-lengths\n"
+               "List of normal minimum free stem lengths (chord to beams)"
+               " given beam multiplicity.\n"
+               "@item beamed-extreme-minimum-free-lengths\n"
+               "List of extreme minimum free stem lengths (chord to beams)"
+               " given beam multiplicity.\n"
+               "@item lengths\n"
+               "Default stem lengths.  The list gives a length for each"
+               " flag count.\n"
+               "@item stem-shorten\n"
+               "How much a stem in a forced direction should be shortened."
+               "  The list gives an amount depending on the number of flags"
+               " and beams.\n"
+               "@end table\n",
+
+               /* properties */
+               "avoid-note-head "
+               "beam "
+               "beaming "
+               "beamlet-default-length "
+               "beamlet-max-length-proportion "
+               "default-direction "
+               "details "
+               "direction "
+               "duration-log "
+               "flag "
+               "flag-style "
+               "french-beaming "
+               "length "
+               "length-fraction "
+               "max-beam-connect "
+               "neutral-direction "
+               "no-stem-extend "
+               "note-heads "
+               "positioning-done "
+               "rests "
+               "stem-begin-position "
+               "stem-end-position "
+               "stem-info "
+               "stemlet-length "
+               "stroke-style "
+               "thickness "
+               "tremolo-flag "
+              );
 
 /****************************************************************/
 
index d5926c6205b5bb9037e1995173a6ad06924a2546..27a732d523efc2651adb45b0450af80158810e75 100644 (file)
@@ -25,16 +25,16 @@ void register_stencil_head (SCM symbol)
 {
   if (!heads)
     heads = scm_permanent_object (scm_cons (SCM_EOL, SCM_EOL));
-  
+
   scm_set_object_property_x (symbol, ly_symbol2scm ("stencil-head?"), SCM_BOOL_T);
-  scm_set_cdr_x (heads,  scm_cons (symbol, scm_cdr (heads)));
+  scm_set_cdr_x (heads, scm_cons (symbol, scm_cdr (heads)));
 }
 
 bool
 is_stencil_head (SCM symbol)
 {
   return scm_object_property (symbol, ly_symbol2scm ("stencil-head?"))
-    == SCM_BOOL_T;
+         == SCM_BOOL_T;
 }
 
 SCM
index 4f8c6bbc8be85712cf2bdea34b6fc25f78bd51a8..e85ad90f43a2904374d7d9c402890036c24b4611 100644 (file)
 
 void
 interpret_stencil_expression (SCM expr,
-                             void (*func) (void *, SCM),
-                             void *func_arg,
-                             Offset o)
+                              void (*func) (void *, SCM),
+                              void *func_arg,
+                              Offset o)
 {
   while (1)
     {
       if (!scm_is_pair (expr))
-       return;
+        return;
 
       SCM head = scm_car (expr);
 
       if (head == ly_symbol2scm ("delay-stencil-evaluation"))
-       {
-         interpret_stencil_expression (scm_force (scm_cadr (expr)), func, func_arg, o);
-         return;
-       }
+        {
+          interpret_stencil_expression (scm_force (scm_cadr (expr)), func, func_arg, o);
+          return;
+        }
       if (head == ly_symbol2scm ("footnote"))
         return;
       if (head == ly_symbol2scm ("translate-stencil"))
-       {
-         o += ly_scm2offset (scm_cadr (expr));
-         expr = scm_caddr (expr);
-       }
+        {
+          o += ly_scm2offset (scm_cadr (expr));
+          expr = scm_caddr (expr);
+        }
       else if (head == ly_symbol2scm ("combine-stencil"))
-       {
+        {
 
-         for (SCM x = scm_cdr (expr); scm_is_pair (x); x = scm_cdr (x))
-           interpret_stencil_expression (scm_car (x), func, func_arg, o);
-         return;
-       }
+          for (SCM x = scm_cdr (expr); scm_is_pair (x); x = scm_cdr (x))
+            interpret_stencil_expression (scm_car (x), func, func_arg, o);
+          return;
+        }
       else if (head == ly_symbol2scm ("grob-cause"))
-       {
-         SCM grob = scm_cadr (expr);
-
-         (*func) (func_arg, scm_list_3 (head,
-                                        ly_quote_scm (ly_offset2scm (o)), grob));
-         interpret_stencil_expression (scm_caddr (expr), func, func_arg, o);
-         (*func) (func_arg, scm_list_1 (ly_symbol2scm ("no-origin")));
-         return;
-       }
+        {
+          SCM grob = scm_cadr (expr);
+
+          (*func) (func_arg, scm_list_3 (head,
+                                         ly_quote_scm (ly_offset2scm (o)), grob));
+          interpret_stencil_expression (scm_caddr (expr), func, func_arg, o);
+          (*func) (func_arg, scm_list_1 (ly_symbol2scm ("no-origin")));
+          return;
+        }
       else if (head == ly_symbol2scm ("color"))
-       {
-         SCM color = scm_cadr (expr);
-         SCM r = scm_car (color);
-         SCM g = scm_cadr (color);
-         SCM b = scm_caddr (color);
-
-         (*func) (func_arg, scm_list_4 (ly_symbol2scm ("setcolor"), r, g, b));
-         interpret_stencil_expression (scm_caddr (expr), func, func_arg, o);
-         (*func) (func_arg, scm_list_1 (ly_symbol2scm ("resetcolor")));
-
-         return;
-       }
+        {
+          SCM color = scm_cadr (expr);
+          SCM r = scm_car (color);
+          SCM g = scm_cadr (color);
+          SCM b = scm_caddr (color);
+
+          (*func) (func_arg, scm_list_4 (ly_symbol2scm ("setcolor"), r, g, b));
+          interpret_stencil_expression (scm_caddr (expr), func, func_arg, o);
+          (*func) (func_arg, scm_list_1 (ly_symbol2scm ("resetcolor")));
+
+          return;
+        }
       else if (head == ly_symbol2scm ("rotate-stencil"))
-       {
-         SCM args = scm_cadr (expr);
-         SCM angle = scm_car (args);
-         Offset tmp = o + robust_scm2offset (scm_cadr (args), Offset (0.0, 0.0));
+        {
+          SCM args = scm_cadr (expr);
+          SCM angle = scm_car (args);
+          Offset tmp = o + robust_scm2offset (scm_cadr (args), Offset (0.0, 0.0));
 
-         SCM offset = ly_offset2scm (tmp);
-         SCM x = scm_car (offset);
-         SCM y = scm_cdr (offset);
+          SCM offset = ly_offset2scm (tmp);
+          SCM x = scm_car (offset);
+          SCM y = scm_cdr (offset);
 
-         (*func) (func_arg, scm_list_4 (ly_symbol2scm ("setrotation"), angle, x, y));
-         interpret_stencil_expression (scm_caddr (expr), func, func_arg, o);
-         (*func) (func_arg, scm_list_4 (ly_symbol2scm ("resetrotation"), angle, x, y));
+          (*func) (func_arg, scm_list_4 (ly_symbol2scm ("setrotation"), angle, x, y));
+          interpret_stencil_expression (scm_caddr (expr), func, func_arg, o);
+          (*func) (func_arg, scm_list_4 (ly_symbol2scm ("resetrotation"), angle, x, y));
 
-         return;
-       }
+          return;
+        }
       else if (head == ly_symbol2scm ("scale-stencil"))
-       {
-         SCM args = scm_cadr (expr);
-         SCM x_scale = scm_car (args);
-         SCM y_scale = scm_cadr (args);
-         Offset unscaled = o.scale (Offset (1 / scm_to_double (x_scale),
-                                            1 / scm_to_double (y_scale)));
-
-         (*func) (func_arg, scm_list_3 (ly_symbol2scm ("setscale"), x_scale,
-                                        y_scale));
-         interpret_stencil_expression (scm_caddr (expr), func, func_arg,
-                                       unscaled);
-         (*func) (func_arg, scm_list_1 (ly_symbol2scm ("resetscale")));
-
-         return;
-       }
+        {
+          SCM args = scm_cadr (expr);
+          SCM x_scale = scm_car (args);
+          SCM y_scale = scm_cadr (args);
+          Offset unscaled = o.scale (Offset (1 / scm_to_double (x_scale),
+                                             1 / scm_to_double (y_scale)));
+
+          (*func) (func_arg, scm_list_3 (ly_symbol2scm ("setscale"), x_scale,
+                                         y_scale));
+          interpret_stencil_expression (scm_caddr (expr), func, func_arg,
+                                        unscaled);
+          (*func) (func_arg, scm_list_1 (ly_symbol2scm ("resetscale")));
+
+          return;
+        }
       else
-       {
-         (*func) (func_arg,
-                  scm_list_4 (ly_symbol2scm ("placebox"),
-                              scm_from_double (o[X_AXIS]),
-                              scm_from_double (o[Y_AXIS]),
-                              expr));
-         return;
-       }
+        {
+          (*func) (func_arg,
+                   scm_list_4 (ly_symbol2scm ("placebox"),
+                               scm_from_double (o[X_AXIS]),
+                               scm_from_double (o[Y_AXIS]),
+                               expr));
+          return;
+        }
     }
 }
 
@@ -134,13 +134,13 @@ find_font_function (void *fs, SCM x)
       SCM what = scm_caddr (args);
 
       if (scm_is_pair (what))
-       {
-         SCM head = scm_car (what);
-         if (ly_symbol2scm ("text") == head)
-           me->fonts_ = scm_cons (scm_cadr (what), me->fonts_);
-         else if (head == ly_symbol2scm ("char"))
-           me->fonts_ = scm_cons (scm_cadr (what), me->fonts_);
-       }
+        {
+          SCM head = scm_car (what);
+          if (ly_symbol2scm ("text") == head)
+            me->fonts_ = scm_cons (scm_cadr (what), me->fonts_);
+          else if (head == ly_symbol2scm ("char"))
+            me->fonts_ = scm_cons (scm_cadr (what), me->fonts_);
+        }
     }
 }
 
@@ -152,7 +152,7 @@ find_expression_fonts (SCM expr)
   fl.fonts_ = SCM_EOL;
 
   interpret_stencil_expression (expr, &find_font_function,
-                               (void *) & fl, Offset (0, 0));
+                                (void *) & fl, Offset (0, 0));
 
   return fl.fonts_;
 }
index 0e7f0cd8c7012a8da86e1bb185cf0b400feccbce..958bcc44c811472b4d3b34a93be2213e02488303 100644 (file)
@@ -17,7 +17,6 @@
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include "font-metric.hh"
 #include "libc-extension.hh"
 #include "lookup.hh"
@@ -28,9 +27,9 @@
 */
 
 LY_DEFINE (ly_stencil_translate_axis, "ly:stencil-translate-axis",
-          3, 0, 0, (SCM stil, SCM amount, SCM axis),
-          "Return a copy of @var{stil} but translated by @var{amount}"
-          " in @var{axis} direction.")
+           3, 0, 0, (SCM stil, SCM amount, SCM axis),
+           "Return a copy of @var{stil} but translated by @var{amount}"
+           " in @var{axis} direction.")
 {
   Stencil *s = unsmob_stencil (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
@@ -46,9 +45,9 @@ LY_DEFINE (ly_stencil_translate_axis, "ly:stencil-translate-axis",
 }
 
 LY_DEFINE (ly_stencil_translate, "ly:stencil-translate",
-          2, 0, 0, (SCM stil, SCM offset),
-          "Return a @var{stil}, but translated by @var{offset}"
-          " (a pair of numbers).")
+           2, 0, 0, (SCM stil, SCM offset),
+           "Return a @var{stil}, but translated by @var{offset}"
+           " (a pair of numbers).")
 {
   Stencil *s = unsmob_stencil (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
@@ -62,8 +61,8 @@ LY_DEFINE (ly_stencil_translate, "ly:stencil-translate",
 }
 
 LY_DEFINE (ly_stencil_expr, "ly:stencil-expr",
-          1, 0, 0, (SCM stil),
-          "Return the expression of @var{stil}.")
+           1, 0, 0, (SCM stil),
+           "Return the expression of @var{stil}.")
 {
   Stencil *s = unsmob_stencil (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
@@ -71,10 +70,10 @@ LY_DEFINE (ly_stencil_expr, "ly:stencil-expr",
 }
 
 LY_DEFINE (ly_stencil_extent, "ly:stencil-extent",
-          2, 0, 0, (SCM stil, SCM axis),
-          "Return a pair of numbers signifying the extent of @var{stil} in"
-          " @var{axis} direction (@code{0} or @code{1} for x and"
-          " y@tie{}axis, respectively).")
+           2, 0, 0, (SCM stil, SCM axis),
+           "Return a pair of numbers signifying the extent of @var{stil} in"
+           " @var{axis} direction (@code{0} or @code{1} for x and"
+           " y@tie{}axis, respectively).")
 {
   Stencil *s = unsmob_stencil (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
@@ -84,8 +83,8 @@ LY_DEFINE (ly_stencil_extent, "ly:stencil-extent",
 }
 
 LY_DEFINE (ly_stencil_empty_p, "ly:stencil-empty?",
-          1, 0, 0, (SCM stil),
-          "Return whether @var{stil} is empty.")
+           1, 0, 0, (SCM stil),
+           "Return whether @var{stil} is empty.")
 {
   Stencil *s = unsmob_stencil (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
@@ -93,28 +92,28 @@ LY_DEFINE (ly_stencil_empty_p, "ly:stencil-empty?",
 }
 
 LY_DEFINE (ly_stencil_combine_at_edge, "ly:stencil-combine-at-edge",
-          4, 2, 0, (SCM first, SCM axis, SCM direction,
-                    SCM second,
-                    SCM padding,
-                    SCM minimum),
-          "Construct a stencil by putting @var{second} next to @var{first}."
-          "  @var{axis} can be 0 (x-axis) or@tie{}1 (y-axis)."
-          "  @var{direction} can be -1 (left or down) or@tie{}1 (right or"
-          "  up).  The stencils are juxtaposed with @var{padding} as extra"
-          " space.  If this puts the reference points closer than"
-          " @var{minimum}, they are moved by the latter amount."
-          "  @var{first} and @var{second} may also be @code{'()} or"
-          " @code{#f}.")
+           4, 2, 0, (SCM first, SCM axis, SCM direction,
+                     SCM second,
+                     SCM padding,
+                     SCM minimum),
+           "Construct a stencil by putting @var{second} next to @var{first}."
+           "  @var{axis} can be 0 (x-axis) or@tie{}1 (y-axis)."
+           "  @var{direction} can be -1 (left or down) or@tie{}1 (right or"
+           "  up).  The stencils are juxtaposed with @var{padding} as extra"
+           " space.  If this puts the reference points closer than"
+           " @var{minimum}, they are moved by the latter amount."
+           "  @var{first} and @var{second} may also be @code{'()} or"
+           " @code{#f}.")
 {
   Stencil *s1 = unsmob_stencil (first);
   Stencil *s2 = unsmob_stencil (second);
   Stencil result;
 
   SCM_ASSERT_TYPE (s1 || first == SCM_BOOL_F || first == SCM_EOL,
-                  first, SCM_ARG1, __FUNCTION__, "Stencil, #f or ()");
+                   first, SCM_ARG1, __FUNCTION__, "Stencil, #f or ()");
   SCM_ASSERT_TYPE (s2 || second == SCM_BOOL_F || second == SCM_EOL,
-                  second, SCM_ARG4, __FUNCTION__, "Stencil, #f or ()");
-  LY_ASSERT_TYPE (is_axis, axis,  2);
+                   second, SCM_ARG4, __FUNCTION__, "Stencil, #f or ()");
+  LY_ASSERT_TYPE (is_axis, axis, 2);
   LY_ASSERT_TYPE (is_direction, direction, 3);
 
   Real p = 0.0;
@@ -135,14 +134,14 @@ LY_DEFINE (ly_stencil_combine_at_edge, "ly:stencil-combine-at-edge",
 
   if (s2)
     result.add_at_edge (Axis (scm_to_int (axis)),
-                       Direction (scm_to_int (direction)), *s2, p);
+                        Direction (scm_to_int (direction)), *s2, p);
 
   return result.smobbed_copy ();
 }
 
 LY_DEFINE (ly_stencil_add, "ly:stencil-add",
-          0, 0, 1, (SCM args),
-          "Combine stencils.  Takes any number of arguments.")
+           0, 0, 1, (SCM args),
+           "Combine stencils.  Takes any number of arguments.")
 {
 #define FUNC_NAME __FUNCTION__
   SCM_VALIDATE_REST_ARGUMENT (args);
@@ -156,7 +155,7 @@ LY_DEFINE (ly_stencil_add, "ly:stencil-add",
     {
       Stencil *s = unsmob_stencil (scm_car (args));
       if (!s)
-       SCM_ASSERT_TYPE (s, scm_car (args), SCM_ARGn, __FUNCTION__, "Stencil");
+        SCM_ASSERT_TYPE (s, scm_car (args), SCM_ARGn, __FUNCTION__, "Stencil");
 
       extent.unite (s->extent_box ());
       *tail = scm_cons (s->expr (), SCM_EOL);
@@ -169,35 +168,34 @@ LY_DEFINE (ly_stencil_add, "ly:stencil-add",
 }
 
 LY_DEFINE (ly_make_stencil, "ly:make-stencil",
-          1, 2, 0, (SCM expr, SCM xext, SCM yext),
-          "Stencils are device independent output expressions."
-          "  They carry two pieces of information:\n"
-          "\n"
-          "@enumerate\n"
-          "@item\n"
-          "A specification of how to print this object."
-          "  This specification is processed by the output backends,"
-          " for example @file{scm/output-ps.scm}.\n"
-          "\n"
-          "@item\n"
-          "The vertical and horizontal extents of the object, given as"
-          " pairs.  If an extent is unspecified (or if you use"
-          " @code{(1000 . -1000)} as its value), it is taken to be empty.\n"
-          "@end enumerate\n")
+           1, 2, 0, (SCM expr, SCM xext, SCM yext),
+           "Stencils are device independent output expressions."
+           "  They carry two pieces of information:\n"
+           "\n"
+           "@enumerate\n"
+           "@item\n"
+           "A specification of how to print this object."
+           "  This specification is processed by the output backends,"
+           " for example @file{scm/output-ps.scm}.\n"
+           "\n"
+           "@item\n"
+           "The vertical and horizontal extents of the object, given as"
+           " pairs.  If an extent is unspecified (or if you use"
+           " @code{(1000 . -1000)} as its value), it is taken to be empty.\n"
+           "@end enumerate\n")
 {
   SCM_ASSERT_TYPE (!scm_is_pair (expr)
-                  || is_stencil_head (scm_car (expr)),
-                  expr, SCM_ARG1, __FUNCTION__, "registered stencil expression");
-
+                   || is_stencil_head (scm_car (expr)),
+                   expr, SCM_ARG1, __FUNCTION__, "registered stencil expression");
 
-  Interval x; 
+  Interval x;
   if (xext != SCM_UNDEFINED)
     {
       LY_ASSERT_TYPE (is_number_pair, xext, 2);
       x = ly_scm2interval (xext);
     }
 
-  Interval y; 
+  Interval y;
   if (yext != SCM_UNDEFINED)
     {
       LY_ASSERT_TYPE (is_number_pair, yext, 3);
@@ -210,10 +208,10 @@ LY_DEFINE (ly_make_stencil, "ly:make-stencil",
 }
 
 LY_DEFINE (ly_stencil_aligned_to, "ly:stencil-aligned-to",
-          3, 0, 0, (SCM stil, SCM axis, SCM dir),
-          "Align @var{stil} using its own extents.  @var{dir} is a number."
-          "  @code{-1} and @code{1} are left and right, respectively."
-          "  Other values are interpolated (so @code{0} means the center).")
+           3, 0, 0, (SCM stil, SCM axis, SCM dir),
+           "Align @var{stil} using its own extents.  @var{dir} is a number."
+           "  @code{-1} and @code{1} are left and right, respectively."
+           "  Other values are interpolated (so @code{0} means the center).")
 {
   LY_ASSERT_SMOB (Stencil, stil, 1);
   LY_ASSERT_TYPE (is_axis, axis, 2);
@@ -222,14 +220,14 @@ LY_DEFINE (ly_stencil_aligned_to, "ly:stencil-aligned-to",
   Stencil target = *unsmob_stencil (stil);
 
   target.align_to ((Axis)scm_to_int (axis),
-                  scm_to_double (dir));
+                   scm_to_double (dir));
   return target.smobbed_copy ();
 }
 
 LY_DEFINE (ly_stencil_fonts, "ly:stencil-fonts",
-          1, 0, 0, (SCM s),
-          "Analyze @var{s}, and return a list of fonts used"
-          " in@tie{}@var{s}.")
+           1, 0, 0, (SCM s),
+           "Analyze @var{s}, and return a list of fonts used"
+           " in@tie{}@var{s}.")
 {
   LY_ASSERT_SMOB (Stencil, s, 1);
   Stencil *stil = unsmob_stencil (s);
@@ -237,15 +235,15 @@ LY_DEFINE (ly_stencil_fonts, "ly:stencil-fonts",
 }
 
 LY_DEFINE (ly_stencil_in_color, "ly:stencil-in-color",
-          4, 0, 0, (SCM stc, SCM r, SCM g, SCM b),
-          "Put @var{stc} in a different color.")
+           4, 0, 0, (SCM stc, SCM r, SCM g, SCM b),
+           "Put @var{stc} in a different color.")
 {
   LY_ASSERT_SMOB (Stencil, stc, 1);
   Stencil *stil = unsmob_stencil (stc);
   return Stencil (stil->extent_box (),
-                 scm_list_3 (ly_symbol2scm ("color"),
-                             scm_list_3 (r, g, b),
-                             stil->expr ())).smobbed_copy ();
+                  scm_list_3 (ly_symbol2scm ("color"),
+                              scm_list_3 (r, g, b),
+                              stil->expr ())).smobbed_copy ();
 }
 
 struct Stencil_interpret_arguments
@@ -261,9 +259,9 @@ void stencil_interpret_in_scm (void *p, SCM expr)
 }
 
 LY_DEFINE (ly_interpret_stencil_expression, "ly:interpret-stencil-expression",
-          4, 0, 0, (SCM expr, SCM func, SCM arg1, SCM offset),
-          "Parse @var{expr}, feed bits to @var{func} with first arg"
-          " @var{arg1} having offset @var{offset}.")
+           4, 0, 0, (SCM expr, SCM func, SCM arg1, SCM offset),
+           "Parse @var{expr}, feed bits to @var{func} with first arg"
+           " @var{arg1} having offset @var{offset}.")
 {
   LY_ASSERT_TYPE (ly_is_procedure, func, 2);
 
@@ -278,12 +276,12 @@ LY_DEFINE (ly_interpret_stencil_expression, "ly:interpret-stencil-expression",
 }
 
 LY_DEFINE (ly_bracket, "ly:bracket",
-          4, 0, 0,
-          (SCM a, SCM iv, SCM t, SCM p),
-          "Make a bracket in direction@tie{}@var{a}.  The extent of the"
-          " bracket is given by @var{iv}.  The wings protrude by an amount"
-          " of@tie{}@var{p}, which may be negative.  The thickness is given"
-          " by@tie{}@var{t}.")
+           4, 0, 0,
+           (SCM a, SCM iv, SCM t, SCM p),
+           "Make a bracket in direction@tie{}@var{a}.  The extent of the"
+           " bracket is given by @var{iv}.  The wings protrude by an amount"
+           " of@tie{}@var{p}, which may be negative.  The thickness is given"
+           " by@tie{}@var{t}.")
 {
   LY_ASSERT_TYPE (is_axis, a, 1);
   LY_ASSERT_TYPE (is_number_pair, iv, 2);
@@ -291,16 +289,16 @@ LY_DEFINE (ly_bracket, "ly:bracket",
   LY_ASSERT_TYPE (scm_is_number, p, 4);
 
   return Lookup::bracket ((Axis)scm_to_int (a), ly_scm2interval (iv),
-                         scm_to_double (t),
-                         scm_to_double (p),
-                         0.95 * scm_to_double (t)).smobbed_copy ();
+                          scm_to_double (t),
+                          scm_to_double (p),
+                          0.95 * scm_to_double (t)).smobbed_copy ();
 }
 
 LY_DEFINE (ly_stencil_rotate, "ly:stencil-rotate",
-          4, 0, 0, (SCM stil, SCM angle, SCM x, SCM y),
-          "Return a stencil @var{stil} rotated @var{angle} degrees around"
-          " the relative offset (@var{x}, @var{y}). E.g. an offset of"
-          " (-1, 1) will rotate the stencil around the left upper corner.")
+           4, 0, 0, (SCM stil, SCM angle, SCM x, SCM y),
+           "Return a stencil @var{stil} rotated @var{angle} degrees around"
+           " the relative offset (@var{x}, @var{y}). E.g. an offset of"
+           " (-1, 1) will rotate the stencil around the left upper corner.")
 {
   Stencil *s = unsmob_stencil (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
@@ -318,9 +316,9 @@ LY_DEFINE (ly_stencil_rotate, "ly:stencil-rotate",
 }
 
 LY_DEFINE (ly_stencil_rotate_absolute, "ly:stencil-rotate-absolute",
-          4, 0, 0, (SCM stil, SCM angle, SCM x, SCM y),
-          "Return a stencil @var{stil} rotated @var{angle} degrees around"
-          " point (@var{x}, @var{y}), given in absolute coordinates.")
+           4, 0, 0, (SCM stil, SCM angle, SCM x, SCM y),
+           "Return a stencil @var{stil} rotated @var{angle} degrees around"
+           " point (@var{x}, @var{y}), given in absolute coordinates.")
 {
   Stencil *s = unsmob_stencil (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
@@ -338,25 +336,25 @@ LY_DEFINE (ly_stencil_rotate_absolute, "ly:stencil-rotate-absolute",
 }
 
 LY_DEFINE (ly_round_filled_box, "ly:round-filled-box",
-          3, 0, 0,
-          (SCM xext, SCM yext, SCM blot),
-          "Make a @code{Stencil} object that prints a black box of"
-          " dimensions @var{xext}, @var{yext} and roundness @var{blot}.")
+           3, 0, 0,
+           (SCM xext, SCM yext, SCM blot),
+           "Make a @code{Stencil} object that prints a black box of"
+           " dimensions @var{xext}, @var{yext} and roundness @var{blot}.")
 {
   LY_ASSERT_TYPE (is_number_pair, xext, 1);
   LY_ASSERT_TYPE (is_number_pair, yext, 2);
   LY_ASSERT_TYPE (scm_is_number, blot, 3);
 
   return Lookup::round_filled_box (Box (ly_scm2interval (xext), ly_scm2interval (yext)),
-                                  scm_to_double (blot)).smobbed_copy ();
+                                   scm_to_double (blot)).smobbed_copy ();
 }
 
 LY_DEFINE (ly_round_filled_polygon, "ly:round-filled-polygon",
-          2, 0, 0,
-          (SCM points, SCM blot),
-          "Make a @code{Stencil} object that prints a black polygon with"
-          " corners at the points defined by @var{points} (list of coordinate"
-          " pairs) and roundness @var{blot}.")
+           2, 0, 0,
+           (SCM points, SCM blot),
+           "Make a @code{Stencil} object that prints a black polygon with"
+           " corners at the points defined by @var{points} (list of coordinate"
+           " pairs) and roundness @var{blot}.")
 {
   SCM_ASSERT_TYPE (scm_ilength (points) > 0, points, SCM_ARG1, __FUNCTION__, "list of coordinate pairs");
   LY_ASSERT_TYPE (scm_is_number, blot, 2);
@@ -364,19 +362,22 @@ LY_DEFINE (ly_round_filled_polygon, "ly:round-filled-polygon",
   for (SCM p = points; scm_is_pair (p); p = scm_cdr (p))
     {
       SCM scm_pt = scm_car (p);
-      if (scm_is_pair (scm_pt)) {
-        pts.push_back (ly_scm2offset (scm_pt));
-      } else {
-        // TODO: Print out warning
-      }
+      if (scm_is_pair (scm_pt))
+        {
+          pts.push_back (ly_scm2offset (scm_pt));
+        }
+      else
+        {
+          // TODO: Print out warning
+        }
     }
   return Lookup::round_filled_polygon (pts, scm_to_double (blot)).smobbed_copy ();
 }
 
 LY_DEFINE (ly_register_stencil_expression, "ly:register-stencil-expression",
-          1, 0, 0,
-          (SCM symbol),
-          "Add @var{symbol} as head of a stencil expression.")
+           1, 0, 0,
+           (SCM symbol),
+           "Add @var{symbol} as head of a stencil expression.")
 {
   LY_ASSERT_TYPE (ly_is_symbol, symbol, 1);
   register_stencil_head (symbol);
@@ -384,17 +385,17 @@ LY_DEFINE (ly_register_stencil_expression, "ly:register-stencil-expression",
 }
 
 LY_DEFINE (ly_all_stencil_expressions, "ly:all-stencil-expressions",
-          0, 0, 0,
-          (),
-          "Return all symbols recognized as stencil expressions.")
+           0, 0, 0,
+           (),
+           "Return all symbols recognized as stencil expressions.")
 {
   return all_stencil_heads ();
 }
 
 LY_DEFINE (ly_stencil_scale, "ly:stencil-scale",
-           3, 0, 0, (SCM stil, SCM x, SCM y),
-          "Scale @var{stil} using the horizontal and vertical scaling"
-          " factors @var{x} and @var{y}.")
+           3, 0, 0, (SCM stil, SCM x, SCM y),
+           "Scale @var{stil} using the horizontal and vertical scaling"
+           " factors @var{x} and @var{y}.")
 {
   Stencil *s = unsmob_stencil (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
index 6a094d28905af39a9cbb831faeb772676f838a7d..25c7e15cf58c82592202100702659028e04ec166 100644 (file)
@@ -68,8 +68,8 @@ bool
 Stencil::is_empty () const
 {
   return (expr_ == SCM_EOL
-         || dim_[X_AXIS].is_empty ()
-         || dim_[Y_AXIS].is_empty ());
+          || dim_[X_AXIS].is_empty ()
+          || dim_[Y_AXIS].is_empty ());
 }
 
 SCM
@@ -87,7 +87,7 @@ Stencil::extent_box () const
 void
 Stencil::rotate (Real a, Offset off)
 {
-  rotate_degrees (a * 180/M_PI, off); 
+  rotate_degrees (a * 180 / M_PI, off);
 }
 
 /*
@@ -112,9 +112,9 @@ Stencil::rotate_degrees_absolute (Real a, Offset absolute_off)
    */
 
   expr_ = scm_list_n (ly_symbol2scm ("rotate-stencil"),
-                     scm_list_2 (scm_from_double (a),
-                     scm_cons (scm_from_double (x), scm_from_double (y))),
-                     expr_, SCM_UNDEFINED);
+                      scm_list_2 (scm_from_double (a),
+                                  scm_cons (scm_from_double (x), scm_from_double (y))),
+                      expr_, SCM_UNDEFINED);
 
   /*
    * Calculate the new bounding box
@@ -123,10 +123,10 @@ Stencil::rotate_degrees_absolute (Real a, Offset absolute_off)
   shifted_box.translate (-absolute_off);
 
   vector<Offset> pts;
-  pts.push_back (Offset (shifted_box.x ().at(LEFT), shifted_box.y ().at(DOWN)));
-  pts.push_back (Offset (shifted_box.x ().at(RIGHT), shifted_box.y ().at(DOWN)));
-  pts.push_back (Offset (shifted_box.x ().at(RIGHT), shifted_box.y ().at(UP)));
-  pts.push_back (Offset (shifted_box.x ().at(LEFT), shifted_box.y ().at(UP)));
+  pts.push_back (Offset (shifted_box.x ().at (LEFT), shifted_box.y ().at (DOWN)));
+  pts.push_back (Offset (shifted_box.x ().at (RIGHT), shifted_box.y ().at (DOWN)));
+  pts.push_back (Offset (shifted_box.x ().at (RIGHT), shifted_box.y ().at (UP)));
+  pts.push_back (Offset (shifted_box.x ().at (LEFT), shifted_box.y ().at (UP)));
 
   const Offset rot = complex_exp (Offset (0, a * M_PI / 180.0));
   dim_.set_empty ();
@@ -158,24 +158,24 @@ Stencil::translate (Offset o)
   while (a < NO_AXES)
     {
       if (isinf (o[a])
-         || isnan (o[a])
-
-         // ugh, hardcoded. 
-         || fabs (o[a]) > 1e6)
-       {
-         programming_error (String_convert::form_string ("Improbable offset for stencil: %f staff space", o[a])
-                            + "\n"
-                            + "Setting to zero.");
-         o[a] = 0.0;
-         if (strict_infinity_checking)
-           scm_misc_error (__FUNCTION__, "Improbable offset.", SCM_EOL);
-       }
+          || isnan (o[a])
+
+          // ugh, hardcoded.
+          || fabs (o[a]) > 1e6)
+        {
+          programming_error (String_convert::form_string ("Improbable offset for stencil: %f staff space", o[a])
+                             + "\n"
+                             + "Setting to zero.");
+          o[a] = 0.0;
+          if (strict_infinity_checking)
+            scm_misc_error (__FUNCTION__, "Improbable offset.", SCM_EOL);
+        }
       incr (a);
     }
 
   expr_ = scm_list_n (ly_symbol2scm ("translate-stencil"),
-                     ly_offset2scm (o),
-                     expr_, SCM_UNDEFINED);
+                      ly_offset2scm (o),
+                      expr_, SCM_UNDEFINED);
   if (!is_empty ())
     dim_.translate (o);
 }
@@ -192,9 +192,9 @@ void
 Stencil::scale (Real x, Real y)
 {
   expr_ = scm_list_3 (ly_symbol2scm ("scale-stencil"),
-                     scm_list_2 (scm_from_double (x),
-                                 scm_from_double (y)),
-                     expr_);
+                      scm_list_2 (scm_from_double (x),
+                                  scm_from_double (y)),
+                      expr_);
   dim_[X_AXIS] *= x;
   dim_[Y_AXIS] *= y;
 }
@@ -247,7 +247,7 @@ Stencil::add_at_edge (Axis a, Direction d, Stencil const &s, Real padding)
     his_extent = i[-d];
 
   Real offset = (my_extent.is_empty () ? 0.0 : my_extent[d] - his_extent)
-    + d * padding;
+                + d * padding;
 
   Stencil toadd (s);
   toadd.translate_axis (offset, a);
@@ -258,11 +258,11 @@ Stencil
 Stencil::in_color (Real r, Real g, Real b) const
 {
   Stencil new_stencil (extent_box (),
-                      scm_list_3 (ly_symbol2scm ("color"),
-                                  scm_list_3 (scm_from_double (r),
-                                              scm_from_double (g),
-                                              scm_from_double (b)),
-                                  expr ()));
+                       scm_list_3 (ly_symbol2scm ("color"),
+                                   scm_list_3 (scm_from_double (r),
+                                               scm_from_double (g),
+                                               scm_from_double (b)),
+                                   expr ()));
   return new_stencil;
 }
 
index 99f8a3c83235480f31b8d3116c257674bb1c7ef8..0ff9938863329ca0b289d60966b3a8307508a90e 100644 (file)
 #include "stream-event.hh"
 
 LY_DEFINE (ly_stream_event_p, "ly:stream-event?",
-          1, 0, 0, (SCM obj),
-          "Is @code{@var{obj}} a @code{Stream_event} object?")
+           1, 0, 0, (SCM obj),
+           "Is @code{@var{obj}} a @code{Stream_event} object?")
 {
   return scm_from_bool (unsmob_stream_event (obj));
 }
 
 LY_DEFINE (ly_make_stream_event, "ly:make-stream-event",
-          1, 1, 0, (SCM cl, SCM proplist),
-          "Create a stream event of class @var{cl} with the given"
-          " mutable property list.")
+           1, 1, 0, (SCM cl, SCM proplist),
+           "Create a stream event of class @var{cl} with the given"
+           " mutable property list.")
 {
   LY_ASSERT_TYPE (ly_is_symbol, cl, 1);
 
   /* should be scm_list_p, but scm_list_p is expensive. */
   LY_ASSERT_TYPE (scm_is_pair, proplist, 2);
-  
+
   if (proplist == SCM_UNDEFINED)
     proplist = SCM_EOL;
 
@@ -43,10 +43,10 @@ LY_DEFINE (ly_make_stream_event, "ly:make-stream-event",
   return e->unprotect ();
 }
 
-LY_DEFINE (ly_event_property, "ly:event-property", 
+LY_DEFINE (ly_event_property, "ly:event-property",
            2, 0, 0, (SCM sev, SCM sym),
-          "Get the property @var{sym} of stream event @var{mus}."
-          "  If @var{sym} is undefined, return @code{'()}.")
+           "Get the property @var{sym} of stream event @var{mus}."
+           "  If @var{sym} is undefined, return @code{'()}.")
 {
   LY_ASSERT_TYPE (unsmob_stream_event, sev, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
@@ -62,13 +62,13 @@ LY_DEFINE (ly_event_set_property_x, "ly:event-set-property!",
 {
   LY_ASSERT_TYPE (unsmob_stream_event, ev, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
-  
+
   return ly_prob_set_property_x (ev, sym, val);
 }
 
 LY_DEFINE (ly_event_deep_copy, "ly:event-deep-copy",
-          1, 0, 0, (SCM m),
-          "Copy @var{m} and all sub expressions of@tie{}@var{m}.")
+           1, 0, 0, (SCM m),
+           "Copy @var{m} and all sub expressions of@tie{}@var{m}.")
 {
   SCM copy = m;
   if (Stream_event *ev = unsmob_stream_event (m))
@@ -78,7 +78,7 @@ LY_DEFINE (ly_event_deep_copy, "ly:event-deep-copy",
     }
   else if (scm_is_pair (m))
     copy = scm_cons (ly_event_deep_copy (scm_car (m)),
-                    ly_event_deep_copy (scm_cdr (m)));
+                     ly_event_deep_copy (scm_cdr (m)));
 
   return copy;
 }
index 840695301ad4a31f2e8287af2e22a9c15ff79e89..489e0e0906a2274999cfbd0a4ccd44383d70bdb3 100644 (file)
@@ -33,14 +33,14 @@ Stream_event::Stream_event ()
 
 Stream_event::Stream_event (SCM event_class, SCM mutable_props)
   : Prob (ly_symbol2scm ("Stream_event"),
-         scm_list_1 (scm_cons (ly_symbol2scm ("class"), event_class)))
+          scm_list_1 (scm_cons (ly_symbol2scm ("class"), event_class)))
 {
   mutable_property_alist_ = mutable_props;
 }
 
 Stream_event::Stream_event (SCM class_name, Input *origin)
   : Prob (ly_symbol2scm ("Stream_event"),
-         scm_list_1 (scm_cons (ly_symbol2scm ("class"), class_name)))
+          scm_list_1 (scm_cons (ly_symbol2scm ("class"), class_name)))
 {
   if (origin)
     set_spot (origin);
@@ -82,7 +82,7 @@ Stream_event::dump (SCM self)
   Stream_event *ev = unsmob_stream_event (self);
   // Reversed alists look prettier.
   return scm_cons (scm_reverse (ev->immutable_property_alist_),
-                  scm_reverse (ev->mutable_property_alist_));
+                   scm_reverse (ev->mutable_property_alist_));
 }
 
 SCM
@@ -97,5 +97,5 @@ Stream_event::undump (SCM data)
 Stream_event *
 unsmob_stream_event (SCM m)
 {
-  return dynamic_cast<Stream_event*> (unsmob_prob (m));
+  return dynamic_cast<Stream_event *> (unsmob_prob (m));
 }
index 74ac54930a2306819cd11d1e1c459f832b550575..4ef137e7bb669bccbe2d41ffb4f5dc8c6b65b3c1 100644 (file)
@@ -20,7 +20,7 @@
 #include "stencil.hh"
 #include "font-interface.hh"
 
-// update comment --hwn 
+// update comment --hwn
 /*
   Urg.
   This is almost text
@@ -61,15 +61,15 @@ Sustain_pedal::print (SCM smob)
     {
       string idx ("pedal.");
       if (text.substr (i, 3) == "Ped")
-       {
-         idx += "Ped";
-         i += 2;
-       }
+        {
+          idx += "Ped";
+          i += 2;
+        }
       else
-       idx += string (&text.c_str ()[i], 1);
+        idx += string (&text.c_str ()[i], 1);
       Stencil m = Font_interface::get_default_font (e)->find_by_name (idx);
       if (!m.is_empty ())
-       mol.add_at_edge (X_AXIS, RIGHT, m, 0);
+        mol.add_at_edge (X_AXIS, RIGHT, m, 0);
     }
 
   return mol.smobbed_copy ();
index a0bc5039254db3688e3e8a07a271752c75bc436a..b5011db62d91404245ce0273430ce335010b5a6b 100644 (file)
@@ -40,7 +40,7 @@ public:
 struct Bracket_nesting_group : public Bracket_nesting_node
 {
   Spanner *delimiter_;
-  vector<Bracket_nesting_node*> children_;
+  vector<Bracket_nesting_node *> children_;
   SCM symbol_;
 
   void from_list (SCM);
@@ -53,7 +53,6 @@ struct Bracket_nesting_group : public Bracket_nesting_node
   Bracket_nesting_group ();
 };
 
-
 struct Bracket_nesting_staff : public Bracket_nesting_node
 {
   Grob *staff_;
@@ -62,7 +61,6 @@ struct Bracket_nesting_staff : public Bracket_nesting_node
   virtual bool add_staff (Grob *);
 };
 
-
 Bracket_nesting_group::Bracket_nesting_group ()
 {
   symbol_ = SCM_EOL;
@@ -85,9 +83,9 @@ Bracket_nesting_group::create_grobs (Engraver *engraver, SCM default_type)
 {
   SCM type = scm_is_symbol (symbol_) ? symbol_ : default_type;
   delimiter_ = engraver->make_spanner (ly_symbol2string (type).c_str (),
-                                      SCM_EOL);
+                                       SCM_EOL);
 
-  for (vsize i = 0 ; i < children_.size (); i++)
+  for (vsize i = 0; i < children_.size (); i++)
     children_[i]->create_grobs (engraver, default_type);
 }
 
@@ -95,7 +93,7 @@ void
 Bracket_nesting_group::add_support (Grob *g)
 {
   Side_position_interface::add_support (g, delimiter_);
-  for (vsize i = 0 ; i < children_.size (); i++)
+  for (vsize i = 0; i < children_.size (); i++)
     children_[i]->add_support (g);
 }
 
@@ -108,7 +106,7 @@ void
 Bracket_nesting_group::set_bound (Direction d, Grob *g)
 {
   delimiter_->set_bound (d, g);
-  for (vsize i = 0 ; i < children_.size (); i++)
+  for (vsize i = 0; i < children_.size (); i++)
     children_[i]->set_bound (d, g);
 }
 
@@ -118,11 +116,10 @@ Bracket_nesting_group::set_nesting_support (Grob *parent)
   if (parent)
     Side_position_interface::add_support (delimiter_, parent);
 
-  for (vsize i = 0 ; i < children_.size (); i++)
+  for (vsize i = 0; i < children_.size (); i++)
     children_[i]->set_nesting_support (delimiter_);
 }
 
-
 void
 Bracket_nesting_group::from_list (SCM x)
 {
@@ -130,18 +127,18 @@ Bracket_nesting_group::from_list (SCM x)
     {
       SCM entry = scm_car (s);
       if (scm_is_pair (entry))
-       {
-         Bracket_nesting_group *node = new Bracket_nesting_group;
-         node->from_list (entry);
-         children_.push_back (node);
-       }
+        {
+          Bracket_nesting_group *node = new Bracket_nesting_group;
+          node->from_list (entry);
+          children_.push_back (node);
+        }
       else if (entry == ly_symbol2scm ("SystemStartBrace")
-              || entry == ly_symbol2scm ("SystemStartBracket")
-              || entry == ly_symbol2scm ("SystemStartBar")
-              || entry == ly_symbol2scm ("SystemStartSquare"))
-       symbol_ = entry;
+               || entry == ly_symbol2scm ("SystemStartBracket")
+               || entry == ly_symbol2scm ("SystemStartBar")
+               || entry == ly_symbol2scm ("SystemStartSquare"))
+        symbol_ = entry;
       else
-       children_.push_back (new Bracket_nesting_staff (0));
+        children_.push_back (new Bracket_nesting_staff (0));
     }
 }
 
@@ -151,18 +148,15 @@ Bracket_nesting_group::add_staff (Grob *grob)
   for (vsize i = 0; i < children_.size (); i++)
     {
       if (children_[i]->add_staff (grob))
-       {
-         Pointer_group_interface::add_grob (delimiter_,
-                                            ly_symbol2scm ("elements"), grob);
-         return true;
-       }
+        {
+          Pointer_group_interface::add_grob (delimiter_,
+                                             ly_symbol2scm ("elements"), grob);
+          return true;
+        }
     }
   return false;
 }
 
-
-
-
 /****************/
 
 class System_start_delimiter_engraver : public Engraver
@@ -197,7 +191,7 @@ System_start_delimiter_engraver::process_music ()
       nesting_->from_list (hierarchy);
       nesting_->create_grobs (this, delimiter_name);
       nesting_->set_bound (LEFT,
-                          unsmob_grob (get_property ("currentCommandColumn")));
+                           unsmob_grob (get_property ("currentCommandColumn")));
     }
 }
 
@@ -207,7 +201,7 @@ System_start_delimiter_engraver::finalize ()
   if (nesting_)
     {
       nesting_->set_bound (RIGHT,
-                          unsmob_grob (get_property ("currentCommandColumn")));
+                           unsmob_grob (get_property ("currentCommandColumn")));
       nesting_->set_nesting_support (0);
 
       delete nesting_;
@@ -239,23 +233,23 @@ ADD_ACKNOWLEDGER (System_start_delimiter_engraver, staff_symbol);
 ADD_ACKNOWLEDGER (System_start_delimiter_engraver, system_start_delimiter);
 
 ADD_TRANSLATOR (System_start_delimiter_engraver,
-               /* doc */
-               "Create a system start delimiter (i.e., a"
-               " @code{SystemStartBar}, @code{SystemStartBrace},"
-               " @code{SystemStartBracket} or @code{SystemStartSquare}"
-               " spanner).",
-
-               /* create */
-               "SystemStartSquare "
-               "SystemStartBrace "
-               "SystemStartBracket "
-               "SystemStartBar ",
-
-               /* read */
-               "systemStartDelimiter "
-               "systemStartDelimiterHierarchy "
-               "currentCommandColumn ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Create a system start delimiter (i.e., a"
+                " @code{SystemStartBar}, @code{SystemStartBrace},"
+                " @code{SystemStartBracket} or @code{SystemStartSquare}"
+                " spanner).",
+
+                /* create */
+                "SystemStartSquare "
+                "SystemStartBrace "
+                "SystemStartBracket "
+                "SystemStartBar ",
+
+                /* read */
+                "systemStartDelimiter "
+                "systemStartDelimiterHierarchy "
+                "currentCommandColumn ",
+
+                /* write */
+                ""
+               );
index 25da0494395a5c158bab33a1f5860e51c6bb5c15..815d94e7cf00b2466fd301f127c5284feea25eae 100644 (file)
@@ -36,16 +36,16 @@ System_start_delimiter::staff_bracket (Grob *me, Real height)
   Font_metric *fm = Font_interface::get_default_font (me);
 
   Drul_array<Stencil> tips (fm->find_by_name ("brackettips.down"),
-                           fm->find_by_name ("brackettips.up"));
+                            fm->find_by_name ("brackettips.up"));
 
   Real thickness = robust_scm2double (me->get_property ("thickness"), 0.25);
 
   Real overlap = 0.1 * thickness;
 
   Box box (Interval (0, thickness),
-          Interval (-1, 1)
-          * (height / 2 + overlap));
-  
+           Interval (-1, 1)
+           * (height / 2 + overlap));
+
   Stencil bracket = Lookup::filled_box (box);
   Direction d = DOWN;
   do
@@ -54,7 +54,7 @@ System_start_delimiter::staff_bracket (Grob *me, Real height)
   bracket = Stencil (box, bracket.expr ());
 
   bracket.translate_axis (-0.8, X_AXIS);
-  
+
   return bracket;
 }
 
@@ -63,18 +63,18 @@ System_start_delimiter::line_bracket (Grob *me, Real height)
 {
   Real thick
     = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"))
-    * robust_scm2double (me->get_property ("thickness"), 1);
+      * robust_scm2double (me->get_property ("thickness"), 1);
   Real w = 0.8;
-  
+
   Stencil tip1 = Line_interface::make_line (thick,
-                                          Offset (0, -height/2),
-                                          Offset (w, -height/2));
+                                            Offset (0, -height / 2),
+                                            Offset (w, -height / 2));
   Stencil tip2 = Line_interface::make_line (thick,
-                                           Offset (0, height/2),
-                                           Offset (w, height/2));
+                                            Offset (0, height / 2),
+                                            Offset (w, height / 2));
   Stencil vline = Line_interface::make_line (thick,
-                                            Offset (0, -height/2),
-                                            Offset (0, height/2));
+                                             Offset (0, -height / 2),
+                                             Offset (0, height / 2));
 
   vline.add_stencil (tip1);
   vline.add_stencil (tip2);
@@ -88,7 +88,7 @@ System_start_delimiter::simple_bar (Grob *me, Real h)
   Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
   Real w = lt * robust_scm2double (me->get_property ("thickness"), 1);
   return Lookup::round_filled_box (Box (Interval (0, w), Interval (-h / 2, h / 2)),
-                                  lt);
+                                   lt);
 }
 
 MAKE_SCHEME_CALLBACK (System_start_delimiter, print, 1);
@@ -107,16 +107,16 @@ System_start_delimiter::print (SCM smob)
       Spanner *sp = dynamic_cast<Spanner *> (elts[i]);
 
       if (sp
-         && sp->get_bound (LEFT) == me->get_bound (LEFT))
-       {
-         Interval dims = sp->extent (common, Y_AXIS);
-         if (!dims.is_empty ())
-           {
-             non_empty_count ++;
-             ext.unite (dims);
+          && sp->get_bound (LEFT) == me->get_bound (LEFT))
+        {
+          Interval dims = sp->extent (common, Y_AXIS);
+          if (!dims.is_empty ())
+            {
+              non_empty_count++;
+              ext.unite (dims);
               staffspace = Staff_symbol_referencer::staff_space (sp);
-           }
-       }
+            }
+        }
     }
 
   SCM glyph_sym = me->get_property ("style");
@@ -155,7 +155,7 @@ System_start_delimiter::staff_brace (Grob *me, Real y)
   fm = Font_interface::get_default_font (me);
 
   int
-    lo = 0;
+  lo = 0;
   int hi = max ((int) fm->count () - 1, 2);
 
   /* do a binary search for each Y, not very efficient, but passable?  */
@@ -165,48 +165,48 @@ System_start_delimiter::staff_brace (Grob *me, Real y)
       int cmp = (lo + hi) / 2;
       b = fm->get_indexed_char_dimensions (cmp);
       if (b[Y_AXIS].is_empty () || b[Y_AXIS].length () > y)
-       hi = cmp;
+        hi = cmp;
       else
-       lo = cmp;
+        lo = cmp;
     }
   while (hi - lo > 1);
 
   Stencil stil (fm->find_by_name ("brace" + to_string (lo)));
-  stil.translate_axis (-b[X_AXIS].length ()/2, X_AXIS);
+  stil.translate_axis (-b[X_AXIS].length () / 2, X_AXIS);
 
   stil.translate_axis (-0.2, X_AXIS);
-  
+
   return stil;
 }
 
 ADD_INTERFACE (System_start_delimiter,
-              "The brace, bracket or bar in front of the system.  The"
-              " following values for @code{style} are recognized:\n"
-              "\n"
-              "@table @code\n"
-              "@item bracket\n"
-              "A thick bracket, normally used to group similar"
-              " instruments in a score.  Default for @code{StaffGroup}."
-              "  @code{SystemStartBracket} uses this style.\n"
-              "@item brace\n"
-              "A @q{piano style} brace normally used for an instrument"
-              " that uses two staves.  The default style for"
-              " @code{GrandStaff}.  @code{SystemStartBrace} uses this"
-              " style.\n"
-              "@item bar-line\n"
-              "A simple line between the staves in a score.  Default"
-              " for staves enclosed in @code{<<} and @code{>>}."
-              "  @code{SystemStartBar} uses this style.\n"
-              "@item line-bracket\n"
-              "A simple square, normally used for subgrouping"
-              " instruments in a score.  @code{SystemStartSquare} uses"
-              " this style.\n"
-              "@end table\n"
-              "\n"
-              "See also @file{input/regression/system-start-nesting.ly}.",
-
-              /* properties */
-              "collapse-height "
-              "style "
-              "thickness "
-              );
+               "The brace, bracket or bar in front of the system.  The"
+               " following values for @code{style} are recognized:\n"
+               "\n"
+               "@table @code\n"
+               "@item bracket\n"
+               "A thick bracket, normally used to group similar"
+               " instruments in a score.  Default for @code{StaffGroup}."
+               "  @code{SystemStartBracket} uses this style.\n"
+               "@item brace\n"
+               "A @q{piano style} brace normally used for an instrument"
+               " that uses two staves.  The default style for"
+               " @code{GrandStaff}.  @code{SystemStartBrace} uses this"
+               " style.\n"
+               "@item bar-line\n"
+               "A simple line between the staves in a score.  Default"
+               " for staves enclosed in @code{<<} and @code{>>}."
+               "  @code{SystemStartBar} uses this style.\n"
+               "@item line-bracket\n"
+               "A simple square, normally used for subgrouping"
+               " instruments in a score.  @code{SystemStartSquare} uses"
+               " this style.\n"
+               "@end table\n"
+               "\n"
+               "See also @file{input/regression/system-start-nesting.ly}.",
+
+               /* properties */
+               "collapse-height "
+               "style "
+               "thickness "
+              );
index d151911ea5361fbe5ede643979be1343bfed1078..8a071cce90c9d89e6f88816eba4cfc43867ed0f1 100644 (file)
@@ -110,10 +110,10 @@ System::derived_mark () const
       Grob **ptr = &all_elements_->array_reference ()[0];
       Grob **end = ptr + all_elements_->size ();
       while (ptr < end)
-       {
-         scm_gc_mark ((*ptr)->self_scm ());
-         ptr++;
-       }
+        {
+          scm_gc_mark ((*ptr)->self_scm ());
+          ptr++;
+        }
     }
 
   if (pscore_)
@@ -136,20 +136,20 @@ System::do_break_substitution_and_fixup_refpoints ()
     {
       Grob *g = all_elements_->grob (i);
       if (g->internal_has_interface (ly_symbol2scm ("only-prebreak-interface")))
-       {
-         /*
-           Kill no longer needed grobs.
-         */
-         Item *it = dynamic_cast<Item *> (g);
-         if (it && Item::is_non_musical (it))
-           {
-             it->find_prebroken_piece (LEFT)->suicide ();
-             it->find_prebroken_piece (RIGHT)->suicide ();
-           }
-         g->suicide ();
-       }
+        {
+          /*
+            Kill no longer needed grobs.
+          */
+          Item *it = dynamic_cast<Item *> (g);
+          if (it && Item::is_non_musical (it))
+            {
+              it->find_prebroken_piece (LEFT)->suicide ();
+              it->find_prebroken_piece (RIGHT)->suicide ();
+            }
+          g->suicide ();
+        }
       else if (g->is_live ())
-       g->do_break_processing ();
+        g->do_break_processing ();
     }
 
   /*
@@ -162,11 +162,11 @@ System::do_break_substitution_and_fixup_refpoints ()
 
       extract_grob_set (se, "all-elements", all_elts);
       for (vsize j = 0; j < all_elts.size (); j++)
-       {
-         Grob *g = all_elts[j];
-         g->fixup_refpoint ();
-       }
-        
+        {
+          Grob *g = all_elts[j];
+          g->fixup_refpoint ();
+        }
+
       count += all_elts.size ();
     }
 
@@ -190,11 +190,11 @@ System::do_break_substitution_and_fixup_refpoints ()
       System *child = dynamic_cast<System *> (broken_intos_[i]);
       child->all_elements_->remove_duplicates ();
       for (vsize j = 0; j < child->all_elements_->size (); j++)
-       {
-         Grob *g = child->all_elements_->grob (j);
+        {
+          Grob *g = child->all_elements_->grob (j);
 
-         (void) g->get_property ("after-line-breaking");
-       }
+          (void) g->get_property ("after-line-breaking");
+        }
     }
 
   if (be_verbose_global)
@@ -217,15 +217,15 @@ System::get_paper_systems ()
   for (vsize i = 0; i < broken_intos_.size (); i++)
     {
       if (be_verbose_global)
-       progress_indication ("[");
+        progress_indication ("[");
 
       System *system = dynamic_cast<System *> (broken_intos_[i]);
 
       scm_vector_set_x (lines, scm_from_int (i),
-                       system->get_paper_system ());
+                        system->get_paper_system ());
 
       if (be_verbose_global)
-       progress_indication (to_string (i) + "]");
+        progress_indication (to_string (i) + "]");
     }
   return lines;
 }
@@ -254,13 +254,13 @@ System::get_footnote_grobs_in_range (vector<Grob *> &out, vsize start, vsize end
       bool end_of_line_visible = true;
       if (Spanner *s = dynamic_cast<Spanner *>(footnote_grobs_[i]))
         {
-          Direction spanner_placement =  robust_scm2dir (s->get_property ("spanner-placement"), LEFT);
+          Direction spanner_placement = robust_scm2dir (s->get_property ("spanner-placement"), LEFT);
           if (spanner_placement == CENTER)
             spanner_placement = LEFT;
 
           pos = s->spanned_rank_interval ()[spanner_placement];
         }
-      
+
       if (Item *item = dynamic_cast<Item *>(footnote_grobs_[i]))
         {
           if (!Item::break_visible (item))
@@ -345,19 +345,19 @@ System::break_into_pieces (vector<Column_x_positions> const &breaking)
       system->set_bound (RIGHT, c.back ());
       SCM system_labels = SCM_EOL;
       for (vsize j = 0; j < c.size (); j++)
-       {
-         c[j]->translate_axis (breaking[i].config_[j], X_AXIS);
-         dynamic_cast<Paper_column *> (c[j])->set_system (system);
-         /* collect the column labels */
-         collect_labels (c[j], &system_labels);
-       }
+        {
+          c[j]->translate_axis (breaking[i].config_[j], X_AXIS);
+          dynamic_cast<Paper_column *> (c[j])->set_system (system);
+          /* collect the column labels */
+          collect_labels (c[j], &system_labels);
+        }
       /*
-       Collect labels from any loose columns too: theses will be set on
-       an empty bar line or a column which is otherwise unused mid-line
+        Collect labels from any loose columns too: theses will be set on
+        an empty bar line or a column which is otherwise unused mid-line
       */
       vector<Grob *> loose (breaking[i].loose_cols_);
       for (vsize j = 0; j < loose.size (); j++)
-       collect_labels (loose[j], &system_labels);
+        collect_labels (loose[j], &system_labels);
 
       system->set_property ("labels", system_labels);
 
@@ -455,8 +455,8 @@ struct Layer_entry
 };
 
 bool
-operator< (Layer_entry  const &a,
-          Layer_entry  const &b)
+operator < (Layer_entry const &a,
+            Layer_entry const &b)
 {
   return a.layer_ < b.layer_;
 }
@@ -486,18 +486,18 @@ System::get_paper_system ()
       Stencil st = g->get_print_stencil ();
 
       if (st.expr () == SCM_EOL)
-       continue;
+        continue;
 
       Offset o;
       for (int a = X_AXIS; a < NO_AXES; a++)
-       o[Axis (a)] = g->relative_coordinate (this, Axis (a));
+        o[Axis (a)] = g->relative_coordinate (this, Axis (a));
 
       Offset extra = robust_scm2offset (g->get_property ("extra-offset"),
-                                       Offset (0, 0))
-       * Staff_symbol_referencer::staff_space (g);
+                                        Offset (0, 0))
+                     * Staff_symbol_referencer::staff_space (g);
 
       /* Must copy the stencil, for we cannot change the stencil
-        cached in G.  */
+         cached in G.  */
 
       st.translate (o + extra);
 
@@ -511,20 +511,20 @@ System::get_paper_system ()
   Interval x (extent (this, X_AXIS));
   Interval y (extent (this, Y_AXIS));
   Stencil sys_stencil (Box (x, y),
-                      scm_cons (ly_symbol2scm ("combine-stencil"),
-                                exprs));
+                       scm_cons (ly_symbol2scm ("combine-stencil"),
+                                 exprs));
   if (debug_skylines)
     {
       Skyline_pair *skylines = Skyline_pair::unsmob (get_property ("vertical-skylines"));
       if (skylines)
-       {
-         Stencil up
-           = Lookup::points_to_line_stencil (0.1, (*skylines)[UP].to_points (X_AXIS));
-         Stencil down
-           = Lookup::points_to_line_stencil (0.1, (*skylines)[DOWN].to_points (X_AXIS));
-         sys_stencil.add_stencil (up.in_color (255, 0, 0));
-         sys_stencil.add_stencil (down.in_color (0, 255, 0));
-       }
+        {
+          Stencil up
+            = Lookup::points_to_line_stencil (0.1, (*skylines)[UP].to_points (X_AXIS));
+          Stencil down
+            = Lookup::points_to_line_stencil (0.1, (*skylines)[DOWN].to_points (X_AXIS));
+          sys_stencil.add_stencil (up.in_color (255, 0, 0));
+          sys_stencil.add_stencil (down.in_color (0, 255, 0));
+        }
     }
 
   Grob *left_bound = this->get_bound (LEFT);
@@ -545,10 +545,10 @@ System::get_paper_system ()
     {
       extract_grob_set (align, "elements", staves);
       for (vsize i = 0; i < staves.size (); i++)
-       if (staves[i]->is_live ()
-           && Page_layout_problem::is_spaceable (staves[i]))
-         staff_refpoints.add_point (staves[i]->relative_coordinate (this,
-                                                                    Y_AXIS));
+        if (staves[i]->is_live ()
+            && Page_layout_problem::is_spaceable (staves[i]))
+          staff_refpoints.add_point (staves[i]->relative_coordinate (this,
+                                                                     Y_AXIS));
     }
 
   pl->set_property ("staff-refpoint-extent", ly_interval2scm (staff_refpoints));
@@ -573,11 +573,11 @@ System::broken_col_range (Item const *left, Item const *right) const
     i++;
 
   while (i < cols.size ()
-        && Paper_column::get_rank (cols[i]) < end_rank)
+         && Paper_column::get_rank (cols[i]) < end_rank)
     {
       Paper_column *c = dynamic_cast<Paper_column *> (cols[i]);
       if (Paper_column::is_breakable (c) && !c->get_system ())
-       ret.push_back (c);
+        ret.push_back (c);
       i++;
     }
 
@@ -596,14 +596,14 @@ System::used_columns () const
   while (last_breakable--)
     {
       if (Paper_column::is_breakable (ro_columns [last_breakable]))
-       break;
+        break;
     }
 
   vector<Grob *> columns;
   for (int i = 0; i <= last_breakable; i++)
     {
       if (Paper_column::is_used (ro_columns[i]))
-       columns.push_back (ro_columns[i]);
+        columns.push_back (ro_columns[i]);
     }
 
   return columns;
@@ -650,9 +650,9 @@ System::get_vertical_alignment ()
   for (vsize i = 0; i < elts.size (); i++)
     if (Align_interface::has_interface (elts[i]))
       {
-       if (ret)
-         programming_error ("found multiple vertical alignments in this system");
-       ret = elts[i];
+        if (ret)
+          programming_error ("found multiple vertical alignments in this system");
+        ret = elts[i];
       }
 
   if (!ret)
@@ -675,12 +675,12 @@ System::get_extremal_staff (Direction dir, Interval const &iv)
   for (vsize i = start; i != end; i += dir)
     {
       if (Hara_kiri_group_spanner::has_interface (elts[i]))
-       Hara_kiri_group_spanner::consider_suicide (elts[i]);
+        Hara_kiri_group_spanner::consider_suicide (elts[i]);
 
       Interval intersection = elts[i]->extent (this, X_AXIS);
       intersection.intersect (iv);
       if (elts[i]->is_live () && !intersection.is_empty ())
-       return elts[i];
+        return elts[i];
     }
   return 0;
 }
@@ -699,15 +699,15 @@ System::pure_refpoint_extent (vsize start, vsize end)
   for (vsize i = 0; i < offsets.size (); ++i)
     if (Page_layout_problem::is_spaceable (staves[i]))
       {
-       ret[UP] = offsets[i];
-       break;
+        ret[UP] = offsets[i];
+        break;
       }
 
   for (vsize i = offsets.size (); i--;)
     if (Page_layout_problem::is_spaceable (staves[i]))
       {
-       ret[DOWN] = offsets[i];
-       break;
+        ret[DOWN] = offsets[i];
+        break;
       }
 
   return ret;
@@ -727,16 +727,16 @@ System::part_of_line_pure_height (vsize start, vsize end, bool begin)
   for (vsize i = 0; i < staves.size (); ++i)
     {
       Interval iv = begin
-       ? Axis_group_interface::begin_of_line_pure_height (staves[i], start)
-       : Axis_group_interface::rest_of_line_pure_height (staves[i], start, end);
+                    ? Axis_group_interface::begin_of_line_pure_height (staves[i], start)
+                    : Axis_group_interface::rest_of_line_pure_height (staves[i], start, end);
       if (i < offsets.size ())
-       iv.translate (offsets[i]);
+        iv.translate (offsets[i]);
       ret.unite (iv);
     }
 
   Interval other_elements = begin
-    ? Axis_group_interface::begin_of_line_pure_height (this, start)
-    : Axis_group_interface::rest_of_line_pure_height (this, start, end);
+                            ? Axis_group_interface::begin_of_line_pure_height (this, start)
+                            : Axis_group_interface::rest_of_line_pure_height (this, start, end);
 
   ret.unite (other_elements);
 
@@ -771,22 +771,22 @@ System::calc_pure_relevant_grobs (SCM smob)
   for (vsize i = 0; i < elts.size (); ++i)
     {
       if (!Axis_group_interface::has_interface (elts[i]))
-       {
-         if (to_boolean (scm_apply_1 (pure_relevant_p, elts[i]->self_scm (), SCM_EOL)))
-           relevant_grobs.push_back (elts[i]);
-
-         if (Item *it = dynamic_cast<Item*> (elts[i]))
-           {
-             Direction d = LEFT;
-             do
-               {
-                 Item *piece = it->find_prebroken_piece (d);
-                 if (piece && to_boolean (scm_apply_1 (pure_relevant_p, piece->self_scm (), SCM_EOL)))
-                   relevant_grobs.push_back (piece);
-               }
-             while (flip (&d) != LEFT);
-           }
-       }
+        {
+          if (to_boolean (scm_apply_1 (pure_relevant_p, elts[i]->self_scm (), SCM_EOL)))
+            relevant_grobs.push_back (elts[i]);
+
+          if (Item *it = dynamic_cast<Item *> (elts[i]))
+            {
+              Direction d = LEFT;
+              do
+                {
+                  Item *piece = it->find_prebroken_piece (d);
+                  if (piece && to_boolean (scm_apply_1 (pure_relevant_p, piece->self_scm (), SCM_EOL)))
+                    relevant_grobs.push_back (piece);
+                }
+              while (flip (&d) != LEFT);
+            }
+        }
     }
 
   SCM grobs_scm = Grob_array::make_array ();
@@ -817,16 +817,16 @@ System::calc_pure_height (SCM smob, SCM start_scm, SCM end_scm)
   return ly_interval2scm (begin);
 }
 
-Grob*
+Grob *
 System::get_pure_bound (Direction d, int start, int end)
 {
   vector<vsize> ranks = pscore_->get_break_ranks ();
   vector<vsize> indices = pscore_->get_break_indices ();
-  vector<Grob*> cols = pscore_->get_columns ();
+  vector<Grob *> cols = pscore_->get_columns ();
 
   vsize target_rank = (d == LEFT ? start : end);
-  vector<vsize>::const_iterator i =
-    lower_bound (ranks.begin (), ranks.end (), target_rank, std::less<vsize> ());
+  vector<vsize>::const_iterator i
+    lower_bound (ranks.begin (), ranks.end (), target_rank, std::less<vsize> ());
 
   if (i != ranks.end () && (*i) == target_rank)
     return cols[indices[i - ranks.begin ()]];
@@ -834,21 +834,21 @@ System::get_pure_bound (Direction d, int start, int end)
     return 0;
 }
 
-Grob*
+Grob *
 System::get_maybe_pure_bound (Direction d, bool pure, int start, int end)
 {
   return pure ? get_pure_bound (d, start, end) : get_bound (d);
 }
 
 ADD_INTERFACE (System,
-              "This is the top-level object: Each object in a score"
-              " ultimately has a @code{System} object as its X and"
-              " Y@tie{}parent.",
-
-              /* properties */
-              "all-elements "
-              "columns "
-              "labels "
-              "pure-Y-extent "
-              "skyline-horizontal-padding "
-              );
+               "This is the top-level object: Each object in a score"
+               " ultimately has a @code{System} object as its X and"
+               " Y@tie{}parent.",
+
+               /* properties */
+               "all-elements "
+               "columns "
+               "labels "
+               "pure-Y-extent "
+               "skyline-horizontal-padding "
+              );
index 4e3f393a2df30766b0fc7cef612f15e1956703b8..b899ac4cda140d45805d1f9612ac100f8ad7d83e 100644 (file)
@@ -86,20 +86,20 @@ void
 Tab_note_heads_engraver::process_music ()
 {
   SCM tab_strings = articulation_list (note_events_,
-                                      tabstring_events_,
-                                      "string-number-event");
+                                       tabstring_events_,
+                                       "string-number-event");
   SCM defined_fingers = articulation_list (note_events_,
-                                          fingering_events_,
-                                          "fingering-event");
+                                           fingering_events_,
+                                           "fingering-event");
   SCM tab_notes = ly_cxx_vector_to_list (note_events_);
   SCM proc = get_property ("noteToFretFunction");
   SCM string_fret_finger = SCM_EOL;
   if (ly_is_procedure (proc))
     string_fret_finger = scm_call_3 (proc,
-                                    context ()->self_scm (),
-                                    tab_notes,
-                                    scm_list_2 (tab_strings,
-                                                defined_fingers));
+                                     context ()->self_scm (),
+                                     tab_notes,
+                                     scm_list_2 (tab_strings,
+                                                 defined_fingers));
   SCM note_entry = SCM_EOL;
   SCM string_number = SCM_EOL;
   SCM fret = SCM_EOL;
@@ -114,22 +114,22 @@ Tab_note_heads_engraver::process_music ()
   if (string_fret_finger != SCM_EOL)
     for (vsize i = 0; i < fret_count; i++)
       {
-       note_entry = scm_list_ref (string_fret_finger, scm_from_int (i));
-       string_number = scm_car (note_entry);
+        note_entry = scm_list_ref (string_fret_finger, scm_from_int (i));
+        string_number = scm_car (note_entry);
         if (string_number != SCM_BOOL_F)
           {
-           fret = scm_cadr (note_entry);
-           fret_label = scm_call_3 (fret_procedure,
-                                    context ()->self_scm (),
-                                    string_number,
-                                    fret);
-           index = length_changed ? 0 : i;
-           Item *note = make_item ("TabNoteHead", note_events_[index]->self_scm ());
-           note->set_property ("text", fret_label);
-           staff_position = scm_call_2 (staff_line_procedure,
-                                        context ()->self_scm (),
-                                        string_number);
-           note->set_property ("staff-position", staff_position);
+            fret = scm_cadr (note_entry);
+            fret_label = scm_call_3 (fret_procedure,
+                                     context ()->self_scm (),
+                                     string_number,
+                                     fret);
+            index = length_changed ? 0 : i;
+            Item *note = make_item ("TabNoteHead", note_events_[index]->self_scm ());
+            note->set_property ("text", fret_label);
+            staff_position = scm_call_2 (staff_line_procedure,
+                                         context ()->self_scm (),
+                                         string_number);
+            note->set_property ("staff-position", staff_position);
           }
       }
 }
@@ -143,26 +143,26 @@ Tab_note_heads_engraver::stop_translation_timestep ()
 }
 
 ADD_TRANSLATOR (Tab_note_heads_engraver,
-               /* doc */
-               "Generate one or more tablature note heads from event of type"
-               " @code{NoteEvent}.",
-
-               /* create */
-               "TabNoteHead ",
-
-               /* read */
-               "defaultStrings "
-               "fretLabels "
-               "highStringOne "
-               "middleCPosition "
-               "minimumFret "
-               "noteToFretFunction "
-               "stringOneTopmost "
-               "stringTunings "
-               "tablatureFormat "
-               "tabStaffLineLayoutFunction ",
-
-               /* write */
-               ""
-                );
+                /* doc */
+                "Generate one or more tablature note heads from event of type"
+                " @code{NoteEvent}.",
+
+                /* create */
+                "TabNoteHead ",
+
+                /* read */
+                "defaultStrings "
+                "fretLabels "
+                "highStringOne "
+                "middleCPosition "
+                "minimumFret "
+                "noteToFretFunction "
+                "stringOneTopmost "
+                "stringTunings "
+                "tablatureFormat "
+                "tabStaffLineLayoutFunction ",
+
+                /* write */
+                ""
+               );
 
index 5b339711279bc739989b6d5aa5e601db93603102..0fd7f8296ad3f4fd0362acd74d4e34092172cc7d 100644 (file)
@@ -44,16 +44,16 @@ Tab_staff_symbol_engraver::Tab_staff_symbol_engraver ()
 
 ADD_ACKNOWLEDGER (Tab_staff_symbol_engraver, staff_symbol);
 ADD_TRANSLATOR (Tab_staff_symbol_engraver,
-               /* doc */
-               "Create a tablature staff symbol, but look at"
-               " @code{stringTunings} for the number of lines.",
+                /* doc */
+                "Create a tablature staff symbol, but look at"
+                " @code{stringTunings} for the number of lines.",
 
-               /* create */
-               "StaffSymbol ",
+                /* create */
+                "StaffSymbol ",
 
-               /* read */
-               "stringTunings ",
+                /* read */
+                "stringTunings ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index a815c5a3bb98f262b704d3514c9d5268d2c2a153..bd2bde2987d0ac80a9c1f8cef63c93d727461615 100644 (file)
@@ -81,12 +81,12 @@ Tab_tie_follow_engraver::stop_translation_timestep ()
       bool spanner_start = false;
       for (vsize j = 0; j < slurs_.size (); j++)
         {
-          Itemleft_item = slurs_[j]->get_bound (LEFT);
+          Item *left_item = slurs_[j]->get_bound (LEFT);
           if (left_item)
             {
               SCM left_cause = left_item->get_property ("cause");
               Item *slur_cause = unsmob_item (left_cause);
-              if (slur_cause ==  note_heads_[k])
+              if (slur_cause == note_heads_[k])
                 {
                   note_heads_[k]->set_property ("span-start", SCM_BOOL_T);
                   spanner_start = true;
@@ -107,25 +107,24 @@ Tab_tie_follow_engraver::stop_translation_timestep ()
     }
   slurs_.clear ();
   glissandi_.clear ();
-  note_heads_.clear();
+  note_heads_.clear ();
 }
 
 ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, slur);
 ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, glissando);
 ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, tab_note_head);
 
-
 ADD_TRANSLATOR (Tab_tie_follow_engraver,
-               /* doc */
-               "Adjust TabNoteHead properties when a tie is followed"
-               " by a slur or glissando.",
+                /* doc */
+                "Adjust TabNoteHead properties when a tie is followed"
+                " by a slur or glissando.",
 
-               /* create */
-               " ",
+                /* create */
+                " ",
 
-               /* read */
+                /* read */
                 " ",
 
-               /* write */
+                /* write */
                 " "
-                );
+               );
index 2537ea2bbe281f45265079c196df47bdbddfffe0..267fdbdc24ba1e7cb7336ade04524e675375ffa5 100644 (file)
@@ -32,7 +32,6 @@ Interval_t<Rational>::infinity ()
   return infty;
 }
 
-
 template<>
 string
 Interval_t<Rational>::T_to_string (Rational a)
@@ -42,18 +41,16 @@ Interval_t<Rational>::T_to_string (Rational a)
 
 template INTERVAL__INSTANTIATE (Rational);
 
-
 template<>
 Moment
 Interval_t<Moment>::infinity ()
 {
   Moment infty;
-  
+
   infty.main_part_.set_infinite (1);
   return infty;
 }
 
-
 template<>
 string
 Interval_t<Moment>::T_to_string (Moment a)
index 95de5faa832a71fe03185c80756c6150616e0a8d..ca580578c943061196559b72e3c79d2ea8af5776 100644 (file)
@@ -33,12 +33,12 @@ public:
 
 protected:
 
-  virtual void derived_mark () const; 
+  virtual void derived_mark () const;
   void stop_translation_timestep ();
   void process_music ();
 private:
   Audio_tempo *audio_;
-  SCM last_tempo_; 
+  SCM last_tempo_;
 };
 
 void
@@ -86,15 +86,15 @@ Tempo_performer::stop_translation_timestep ()
 }
 
 ADD_TRANSLATOR (Tempo_performer,
-               /* doc */
-               "",
+                /* doc */
+                "",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "tempoWholesPerMinute ",
+                /* read */
+                "tempoWholesPerMinute ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 270855febde233ecc7d34f52f5b592d0430bc7f1..1073aa2fc4e9a5fe45bf5eca7f5b7d4c829b38bd 100644 (file)
@@ -59,7 +59,7 @@ Text_engraver::process_music ()
       Item *text = make_item ("TextScript", r->self_scm ());
 
       int priority = robust_scm2int (text->get_property ("script-priority"),
-                                    200);
+                                     200);
 
       /* see script-engraver.cc */
       priority += i;
@@ -68,7 +68,7 @@ Text_engraver::process_music ()
 
       Direction dir = to_dir (r->get_property ("direction"));
       if (dir)
-       set_grob_direction (text, dir);
+        set_grob_direction (text, dir);
 
       SCM mark = r->get_property ("text");
 
@@ -87,15 +87,15 @@ Text_engraver::Text_engraver ()
 }
 
 ADD_TRANSLATOR (Text_engraver,
-               /* doc */
-               "Create text scripts.",
+                /* doc */
+                "Create text scripts.",
 
-               /* create */
-               "TextScript ",
+                /* create */
+                "TextScript ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 983902f6af2079b97e586e2d6ab7eeeb752c225c..7bb4ceadc07c53ded50199d088572280975b1308 100644 (file)
@@ -42,7 +42,7 @@ replace_whitespace (string *str)
 
       // avoid the locale-dependent isspace
       if (cur == '\n' || cur == '\t' || cur == '\v')
-       (*str)[i] = ' ';
+        (*str)[i] = ' ';
 
       vsize char_len = utf8_char_len (cur);
 
@@ -53,8 +53,8 @@ replace_whitespace (string *str)
 MAKE_SCHEME_CALLBACK (Text_interface, interpret_string, 3);
 SCM
 Text_interface::interpret_string (SCM layout_smob,
-                                 SCM props,
-                                 SCM markup)
+                                  SCM props,
+                                  SCM markup)
 {
   LY_ASSERT_SMOB (Output_def, layout_smob, 1);
   LY_ASSERT_TYPE (scm_is_string, markup, 3);
@@ -71,8 +71,8 @@ Text_interface::interpret_string (SCM layout_smob,
     if it matches one of the music font encodings.  --pmccarty
   */
   SCM encoding = ly_chain_assoc_get (ly_symbol2scm ("font-encoding"),
-                                    props,
-                                    SCM_BOOL_F);
+                                     props,
+                                     SCM_BOOL_F);
   SCM music_encodings = ly_lily_module_constant ("all-music-font-encodings");
 
   bool is_music = (scm_memq (encoding, music_encodings) != SCM_BOOL_F);
@@ -80,14 +80,14 @@ Text_interface::interpret_string (SCM layout_smob,
 }
 
 MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Text_interface, interpret_markup, 3, 0,
-                                  "Convert a text markup into a stencil."
-"  Takes three arguments, @var{layout}, @var{props}, and @var{markup}.\n"
-"\n"
-"@var{layout} is a @code{\\layout} block; it may be obtained from a grob with"
-" @code{ly:grob-layout}.  @var{props} is an alist chain, i.e. a list of"
-"  alists.  This is typically obtained with"
-" @code{(ly:grob-alist-chain grob (ly:output-def-lookup layout 'text-font-defaults))}."
-"  @var{markup} is the markup text to be processed.");
+                                   "Convert a text markup into a stencil."
+                                   "  Takes three arguments, @var{layout}, @var{props}, and @var{markup}.\n"
+                                   "\n"
+                                   "@var{layout} is a @code{\\layout} block; it may be obtained from a grob with"
+                                   " @code{ly:grob-layout}.  @var{props} is an alist chain, i.e. a list of"
+                                   "  alists.  This is typically obtained with"
+                                   " @code{(ly:grob-alist-chain grob (ly:output-def-lookup layout 'text-font-defaults))}."
+                                   "  @var{markup} is the markup text to be processed.");
 SCM
 Text_interface::interpret_markup (SCM layout_smob, SCM props, SCM markup)
 {
@@ -98,7 +98,7 @@ Text_interface::interpret_markup (SCM layout_smob, SCM props, SCM markup)
       SCM func = scm_car (markup);
       SCM args = scm_cdr (markup);
       if (!is_markup (markup))
-       programming_error ("markup head has no markup signature");
+        programming_error ("markup head has no markup signature");
 
       return scm_apply_2 (func, layout_smob, props, args);
     }
@@ -134,10 +134,10 @@ bool
 Text_interface::is_markup (SCM x)
 {
   return (scm_is_string (x)
-         || (scm_is_pair (x)
-             && SCM_BOOL_F
-             != scm_object_property (scm_car (x),
-                                     ly_symbol2scm ("markup-signature"))));
+          || (scm_is_pair (x)
+              && SCM_BOOL_F
+              != scm_object_property (scm_car (x),
+                                      ly_symbol2scm ("markup-signature"))));
 }
 
 bool
@@ -147,20 +147,19 @@ Text_interface::is_markup_list (SCM x)
   return scm_is_true (scm_call_1 (music_list_p, x));
 }
 
-
 ADD_INTERFACE (Text_interface,
-              "A Scheme markup text, see @ruser{Formatting text} and"
-              " @rextend{New markup command definition}.\n"
-              "\n"
-              "There are two important commands:"
-              " @code{ly:text-interface::print}, which is a"
-              " grob callback, and"
-              " @code{ly:text-interface::interpret-markup}.",
-
-              /* properties */
-              "baseline-skip "
-              "text "
-              "word-space "
-              "text-direction "
-              );
+               "A Scheme markup text, see @ruser{Formatting text} and"
+               " @rextend{New markup command definition}.\n"
+               "\n"
+               "There are two important commands:"
+               " @code{ly:text-interface::print}, which is a"
+               " grob callback, and"
+               " @code{ly:text-interface::interpret-markup}.",
+
+               /* properties */
+               "baseline-skip "
+               "text "
+               "word-space "
+               "text-direction "
+              );
 
index c18bf098f2e03855dbfa4096b9d29331805abd96..0338960b49470897ff36c59db070ab2c40148a46 100644 (file)
@@ -69,28 +69,28 @@ Text_spanner_engraver::process_music ()
   if (event_drul_[STOP])
     {
       if (!span_)
-       event_drul_[STOP]->origin ()->warning (_ ("cannot find start of text spanner"));
+        event_drul_[STOP]->origin ()->warning (_ ("cannot find start of text spanner"));
       else
-       {
-         finished_ = span_;
-         announce_end_grob (finished_, SCM_EOL);
-         span_ = 0;
-         current_event_ = 0;
-       }
+        {
+          finished_ = span_;
+          announce_end_grob (finished_, SCM_EOL);
+          span_ = 0;
+          current_event_ = 0;
+        }
     }
 
   if (event_drul_[START])
     {
       if (current_event_)
-       event_drul_[START]->origin ()->warning (_ ("already have a text spanner"));
+        event_drul_[START]->origin ()->warning (_ ("already have a text spanner"));
       else
-       {
-         current_event_ = event_drul_[START];
-         span_ = make_spanner ("TextSpanner", event_drul_[START]->self_scm ());
+        {
+          current_event_ = event_drul_[START];
+          span_ = make_spanner ("TextSpanner", event_drul_[START]->self_scm ());
 
-         Side_position_interface::set_axis (span_, Y_AXIS);
-         event_drul_[START] = 0;
-       }
+          Side_position_interface::set_axis (span_, Y_AXIS);
+          event_drul_[START] = 0;
+        }
     }
 }
 
@@ -100,10 +100,10 @@ Text_spanner_engraver::typeset_all ()
   if (finished_)
     {
       if (!finished_->get_bound (RIGHT))
-       {
-         Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
-         finished_->set_bound (RIGHT, e);
-       }
+        {
+          Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
+          finished_->set_bound (RIGHT, e);
+        }
       finished_ = 0;
     }
 }
@@ -139,33 +139,33 @@ Text_spanner_engraver::acknowledge_note_column (Grob_info info)
   if (span_)
     {
       Pointer_group_interface::add_grob (span_,
-                                        ly_symbol2scm ("note-columns"),
-                                        info.grob ());
+                                         ly_symbol2scm ("note-columns"),
+                                         info.grob ());
       if (!span_->get_bound (LEFT))
-       add_bound_item (span_, info.grob ());
+        add_bound_item (span_, info.grob ());
     }
   else if (finished_)
     {
       Pointer_group_interface::add_grob (finished_,
-                                        ly_symbol2scm ("note-columns"),
-                                        info.grob ());
+                                         ly_symbol2scm ("note-columns"),
+                                         info.grob ());
       if (!finished_->get_bound (RIGHT))
-       add_bound_item (finished_, info.grob ());
+        add_bound_item (finished_, info.grob ());
     }
 }
 
 ADD_ACKNOWLEDGER (Text_spanner_engraver, note_column);
 
 ADD_TRANSLATOR (Text_spanner_engraver,
-               /* doc */
-               "Create text spanner from an event.",
+                /* doc */
+                "Create text spanner from an event.",
 
-               /* create */
-               "TextSpanner ",
+                /* create */
+                "TextSpanner ",
 
-               /* read */
-               "currentMusicalColumn ",
+                /* read */
+                "currentMusicalColumn ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 6e0eaecec0e09fa987aeb4b73bf70f57fea38eca..c73694d334e2f581f66727a1cfd012a26dac5033 100644 (file)
@@ -39,19 +39,19 @@ void
 Tie_column::add_tie (Grob *tc, Grob *tie)
 {
   Spanner *me = dynamic_cast<Spanner *> (tc);
-  
+
   if (tie->get_parent (Y_AXIS)
       && Tie_column::has_interface (tie->get_parent (Y_AXIS)))
     return;
 
   if (!me->get_bound (LEFT)
       || (Paper_column::get_rank (me->get_bound (LEFT)->get_column ())
-         > Paper_column::get_rank (dynamic_cast<Spanner*> (tie)->get_bound (LEFT)->get_column ())))
+          > Paper_column::get_rank (dynamic_cast<Spanner *> (tie)->get_bound (LEFT)->get_column ())))
     {
-       me->set_bound (LEFT, Tie::head (tie, LEFT));
-       me->set_bound (RIGHT, Tie::head (tie, RIGHT));
+      me->set_bound (LEFT, Tie::head (tie, LEFT));
+      me->set_bound (RIGHT, Tie::head (tie, RIGHT));
     }
-      
+
   tie->set_parent (me, Y_AXIS);
   Pointer_group_interface::add_grob (me, ly_symbol2scm ("ties"), tie);
 }
@@ -69,14 +69,14 @@ Tie_column::before_line_breaking (SCM smob)
       Spanner *tie = dynamic_cast<Spanner *> (unsmob_grob (scm_car (s)));
       Direction dir = LEFT;
       do
-       {
-         if (dir * tie->get_bound (dir)->get_column ()->get_rank ()
-             > dir * me->get_bound (dir)->get_column ()->get_rank ())
-           me->set_bound (dir, Tie::head (tie, dir));
-       }
+        {
+          if (dir * tie->get_bound (dir)->get_column ()->get_rank ()
+              > dir * me->get_bound (dir)->get_column ()->get_rank ())
+            me->set_bound (dir, Tie::head (tie, dir));
+        }
       while (flip (&dir) != LEFT);
     }
-  
+
   return SCM_UNSPECIFIED;
 }
 
@@ -86,7 +86,7 @@ Tie_column::calc_positioning_done (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   extract_grob_set (me, "ties", ro_ties);
-  vector<Grob*> ties (ro_ties);
+  vector<Grob *> ties (ro_ties);
   if (!ties.size ())
     return SCM_BOOL_T;
 
@@ -103,26 +103,24 @@ Tie_column::calc_positioning_done (SCM smob)
   for (vsize i = 0; i < base.size (); i++)
     {
       SCM cp = Tie::get_control_points (ties[i], problem.common_x_refpoint (),
-                                       base[i],
-                                       problem.details_);
+                                        base[i],
+                                        problem.details_);
 
       ties[i]->set_property ("control-points", cp);
       set_grob_direction (ties[i],
-                         base[i].dir_);
+                          base[i].dir_);
 
       problem.set_debug_scoring (base);
     }
   return SCM_BOOL_T;
 }
 
-
-
 ADD_INTERFACE (Tie_column,
-              "Object that sets directions of multiple ties in a tied"
-              " chord.",
+               "Object that sets directions of multiple ties in a tied"
+               " chord.",
 
-              /* properties */
-              "positioning-done "
-              "tie-configuration "
-              );
+               /* properties */
+               "positioning-done "
+               "tie-configuration "
+              );
 
index f84908c651d5f371bc56b08d8cdcc6738f700909..c415942b5d1c5b18bfa2a899fcd6122c58678b5f 100644 (file)
 
 int
 Tie_configuration::compare (Tie_configuration const &a,
-                           Tie_configuration const &b)
+                            Tie_configuration const &b)
 {
   if (a.position_ - b.position_)
     return sign (a.position_ - b.position_);
   return sign (a.dir_ - b.dir_);
 }
-                           
 
 Tie_configuration::Tie_configuration ()
 {
@@ -44,19 +43,17 @@ Tie_configuration::Tie_configuration ()
   column_ranks_ = Drul_array<int> (0, 0);
 }
 
-
 void
 Tie_configuration::center_tie_vertically (Tie_details const &details)
 {
   Bezier b = get_untransformed_bezier (details);
   Offset middle = b.curve_point (0.5);
   Offset edge = b.curve_point (0.0);
-  Real center = (edge[Y_AXIS] + middle[Y_AXIS])/2.0;
+  Real center = (edge[Y_AXIS] + middle[Y_AXIS]) / 2.0;
 
   delta_y_ = - dir_ * center;
 }
 
-
 Bezier
 Tie_configuration::get_transformed_bezier (Tie_details const &details) const
 {
@@ -64,7 +61,7 @@ Tie_configuration::get_transformed_bezier (Tie_details const &details) const
 
   b.scale (1, dir_);
   b.translate (Offset (attachment_x_[LEFT],
-                      delta_y_ + details.staff_space_ * 0.5 * position_));
+                       delta_y_ + details.staff_space_ * 0.5 * position_));
 
   return b;
 }
@@ -82,8 +79,8 @@ Tie_configuration::get_untransformed_bezier (Tie_details const &details) const
       l = 1.0;
     }
   return slur_shape (l,
-                    details.height_limit_,
-                    details.ratio_);
+                     details.height_limit_,
+                     details.ratio_);
 }
 
 int
@@ -94,7 +91,7 @@ Tie_configuration::column_span_length () const
 
 Real
 Tie_configuration::distance (Tie_configuration const &a,
-                            Tie_configuration const &b)
+                             Tie_configuration const &b)
 {
 
   Real d = 3 * (a.position_ - b.position_);
@@ -104,7 +101,6 @@ Tie_configuration::distance (Tie_configuration const &a,
     return d + (2 + (a.dir_ - b.dir_));
 }
 
-
 void
 Tie_configuration::add_score (Real s, string desc)
 {
@@ -120,8 +116,8 @@ Tie_configuration::height (Tie_details const &details) const
   Real l = attachment_x_.length ();
 
   return slur_shape (l,
-                    details.height_limit_,
-                    details.ratio_).curve_point (0.5)[Y_AXIS]; 
+                     details.height_limit_,
+                     details.ratio_).curve_point (0.5)[Y_AXIS];
 }
 
 Ties_configuration::Ties_configuration ()
@@ -147,7 +143,7 @@ Ties_configuration::add_tie_score (Real s, int i, string desc)
   if (s)
     {
       while (tie_score_cards_.size () < size ())
-       tie_score_cards_.push_back ("");
+        tie_score_cards_.push_back ("");
 
       tie_score_cards_[i] += to_string ("%s=%.2f ", desc.c_str (), s);
     }
@@ -168,15 +164,14 @@ Ties_configuration::score () const
   return score_;
 }
 
-
 string
 Ties_configuration::complete_tie_card (vsize i) const
 {
   string s;
   s += to_string ("%d (%.2f) %c: ", (*this)[i].position_, (*this)[i].delta_y_,
-                 ((*this)[i].dir_ == UP ? 'u' : 'd'))
-    + (*this)[i].card () + (*this).tie_card (i);
-  
+                  ((*this)[i].dir_ == UP ? 'u' : 'd'))
+       + (*this)[i].card () + (*this).tie_card (i);
+
   /*
     this is a little awkward, but we must decide where to put
     aggregrates.
@@ -186,7 +181,7 @@ Ties_configuration::complete_tie_card (vsize i) const
 
   if (i + 1 == size ())
     s += to_string ("TOTAL=%.2f", score ());
-  
+
   return s;
 }
 
@@ -194,7 +189,7 @@ Ties_configuration::complete_tie_card (vsize i) const
 string
 Ties_configuration::complete_score_card () const
 {
-  string s; 
+  string s;
   for (vsize i = 0; i < size (); i++)
     {
       s += complete_tie_card (i);
@@ -203,8 +198,6 @@ Ties_configuration::complete_score_card () const
   return s;
 }
 
-
-
 string
 Ties_configuration::card () const
 {
index f169e1fae9d730890de53d814604a0c76f127115..eee1aa2e91527ec5a22d5150bbc1e05427f5b704 100644 (file)
@@ -25,9 +25,8 @@
 #include "warn.hh"
 #include "tie-details.hh"
 
-
 /*
-  this is a macro because we want ly_symbol2scm() 
+  this is a macro because we want ly_symbol2scm()
  */
 #define get_real_detail(src, defvalue) \
   robust_scm2double(ly_assoc_get (ly_symbol2scm (src), details, SCM_EOL), defvalue)
@@ -39,23 +38,22 @@ Tie_details::from_grob (Grob *me)
 {
   staff_symbol_referencer_ = me;
   staff_space_ = Staff_symbol_referencer::staff_space (me);
-  
+
   neutral_direction_ = to_dir (me->get_property ("neutral-direction"));
   if (!neutral_direction_)
     neutral_direction_ = DOWN;
-  
+
   SCM details = me->get_property ("details");
 
   height_limit_ = get_real_detail ("height-limit", 0.75);
-  ratio_ = get_real_detail ("ratio", .333);  
+  ratio_ = get_real_detail ("ratio", .333);
   between_length_limit_ = get_real_detail ("between-length-limit", 1.0);
-  
+
   wrong_direction_offset_penalty_ = get_real_detail ("wrong-direction-offset-penalty", 10);
-  
+
   min_length_ = get_real_detail ("min-length", 1.0);
   min_length_penalty_factor_ = get_real_detail ("min-length-penalty-factor", 1.0);
 
-
   // in half-space
   center_staff_line_clearance_ = get_real_detail ("center-staff-line-clearance", 0.4);
   tip_staff_line_clearance_ = get_real_detail ("tip-staff-line-clearance", 0.4);
@@ -73,7 +71,7 @@ Tie_details::from_grob (Grob *me)
   intra_space_threshold_ = get_real_detail ("intra-space-threshold", 1.0);
   outer_tie_length_symmetry_penalty_factor_ = get_real_detail ("outer-tie-length-symmetry-penalty-factor", 3.0);
   outer_tie_vertical_distance_symmetry_penalty_factor_ = get_real_detail ("outer-tie-vertical-distance-symmetry-penalty-factor", 3.0);
-  
+
   outer_tie_vertical_gap_ = get_real_detail ("outer-tie-vertical-gap", 0.15);
 
   single_tie_region_size_ = get_int_detail ("single-tie-region-size", 3);
@@ -83,8 +81,8 @@ Tie_details::from_grob (Grob *me)
 
 Tie_details::Tie_details ()
 {
-  staff_space_ = 1.0; 
+  staff_space_ = 1.0;
   height_limit_ = 1.0;
-  ratio_ = .333;   
+  ratio_ = .333;
 }
 
index edaba06c7c0720e1dcc35321acf9010cee298226..251997ce3161f2d954a8976d33827d16eb2efb8b 100644 (file)
@@ -67,9 +67,9 @@ struct Head_event_tuple
 class Tie_engraver : public Engraver
 {
   Stream_event *event_;
-  vector<Grob*> now_heads_;
+  vector<Grob *> now_heads_;
   vector<Head_event_tuple> heads_to_tie_;
-  vector<Grob*> ties_;
+  vector<Grob *> ties_;
 
   Spanner *tie_column_;
 
@@ -114,7 +114,7 @@ void Tie_engraver::report_unterminated_tie (Head_event_tuple const &tie_start)
   // moment that created a tie, so this is not necessarily an unterminated
   // tie. Happens e.g. for <c e g>~ g
   if (!tie_start.tie_from_chord_created)
-    tie_start.head_->warning (_("unterminated tie"));
+    tie_start.head_->warning (_ ("unterminated tie"));
 }
 
 /*
@@ -134,8 +134,8 @@ Tie_engraver::process_music ()
 {
   bool busy = event_;
   for (vsize i = 0; !busy && i < heads_to_tie_.size (); i++)
-    busy |=  (heads_to_tie_[i].tie_event_
-             || heads_to_tie_[i].tie_stream_event_);
+    busy |= (heads_to_tie_[i].tie_event_
+             || heads_to_tie_[i].tie_stream_event_);
 
   if (busy)
     context ()->set_property ("tieMelismaBusy", SCM_BOOL_T);
@@ -154,51 +154,50 @@ Tie_engraver::acknowledge_note_head (Grob_info i)
       Stream_event *left_ev = unsmob_stream_event (th->get_property ("cause"));
 
       /*
-       maybe should check positions too.
+        maybe should check positions too.
       */
       if (!right_ev || !left_ev)
-       continue;
+        continue;
 
       /*
         Make a tie only if pitches are equal or if event end was not generated by
         Completion_heads_engraver.
       */
       if (ly_is_equal (right_ev->get_property ("pitch"), left_ev->get_property ("pitch"))
-         && (!Tie_engraver::has_autosplit_end (left_ev)))
-       {
-         Grob *p = new Spanner (heads_to_tie_[i].tie_definition_);
-         Moment end = heads_to_tie_[i].end_moment_;
-
-         SCM cause = heads_to_tie_[i].tie_event_
-           ? heads_to_tie_[i].tie_event_->self_scm ()
-           : heads_to_tie_[i].tie_stream_event_->self_scm ();
-
-         announce_grob (p, cause);
-         Tie::set_head (p, LEFT, th);
-         Tie::set_head (p, RIGHT, h);
-
-
-         if (is_direction (unsmob_stream_event (cause)->get_property ("direction")))
-           {
-             Direction d = to_dir (unsmob_stream_event (cause)->get_property ("direction"));
-             p->set_property ("direction", scm_from_int (d));
-           }
-
-         ties_.push_back (p);
-         heads_to_tie_.erase (heads_to_tie_.begin () + i);
-
-         /*
-           Prevent all other tied notes ending at the same moment (assume
-           implicitly the notes have also started at the same moment!)
-           from triggering an "unterminated tie" warning. Needed e.g. for
-           <c e g>~ g
-         */
-         for (vsize j = heads_to_tie_.size (); j--;)
-           {
-             if (heads_to_tie_[j].end_moment_ == end)
-               heads_to_tie_[j].tie_from_chord_created = true;
-           }
-       }
+          && (!Tie_engraver::has_autosplit_end (left_ev)))
+        {
+          Grob *p = new Spanner (heads_to_tie_[i].tie_definition_);
+          Moment end = heads_to_tie_[i].end_moment_;
+
+          SCM cause = heads_to_tie_[i].tie_event_
+                      ? heads_to_tie_[i].tie_event_->self_scm ()
+                      : heads_to_tie_[i].tie_stream_event_->self_scm ();
+
+          announce_grob (p, cause);
+          Tie::set_head (p, LEFT, th);
+          Tie::set_head (p, RIGHT, h);
+
+          if (is_direction (unsmob_stream_event (cause)->get_property ("direction")))
+            {
+              Direction d = to_dir (unsmob_stream_event (cause)->get_property ("direction"));
+              p->set_property ("direction", scm_from_int (d));
+            }
+
+          ties_.push_back (p);
+          heads_to_tie_.erase (heads_to_tie_.begin () + i);
+
+          /*
+            Prevent all other tied notes ending at the same moment (assume
+            implicitly the notes have also started at the same moment!)
+            from triggering an "unterminated tie" warning. Needed e.g. for
+            <c e g>~ g
+          */
+          for (vsize j = heads_to_tie_.size (); j--;)
+            {
+              if (heads_to_tie_[j].end_moment_ == end)
+                heads_to_tie_[j].tie_from_chord_created = true;
+            }
+        }
     }
 
   if (ties_.size () && ! tie_column_)
@@ -215,18 +214,18 @@ Tie_engraver::start_translation_timestep ()
   if (heads_to_tie_.size () && !to_boolean (get_property ("tieWaitForNote")))
     {
       Moment now = now_mom ();
-      for (vsize i = heads_to_tie_.size ();  i--; )
-       {
-         if (now > heads_to_tie_[i].end_moment_)
-           {
-             report_unterminated_tie (heads_to_tie_[i]);
-             heads_to_tie_.erase (heads_to_tie_.begin () + i);
-           }
-       }
+      for (vsize i = heads_to_tie_.size (); i--;)
+        {
+          if (now > heads_to_tie_[i].end_moment_)
+            {
+              report_unterminated_tie (heads_to_tie_[i]);
+              heads_to_tie_.erase (heads_to_tie_.begin () + i);
+            }
+        }
     }
 
   context ()->set_property ("tieMelismaBusy",
-                           ly_bool2scm (heads_to_tie_.size ()));
+                            ly_bool2scm (heads_to_tie_.size ()));
 }
 
 void
@@ -237,14 +236,14 @@ Tie_engraver::stop_translation_timestep ()
     {
       if (!wait)
         {
-         vector<Head_event_tuple>::iterator it = heads_to_tie_.begin ();
-         for (; it < heads_to_tie_.end (); it++)
-           report_unterminated_tie (*it);
-         heads_to_tie_.clear ();
+          vector<Head_event_tuple>::iterator it = heads_to_tie_.begin ();
+          for (; it < heads_to_tie_.end (); it++)
+            report_unterminated_tie (*it);
+          heads_to_tie_.clear ();
         }
 
       for (vsize i = 0; i < ties_.size (); i++)
-         typeset_tie (ties_[i]);
+        typeset_tie (ties_[i]);
 
       ties_.clear ();
       tie_column_ = 0;
@@ -262,67 +261,67 @@ Tie_engraver::stop_translation_timestep ()
     {
       Grob *head = now_heads_[i];
       Stream_event *left_ev
-       = unsmob_stream_event (head->get_property ("cause"));
+        = unsmob_stream_event (head->get_property ("cause"));
 
       if (!left_ev)
-       {
-         // may happen for ambitus
-         continue;
-       }
+        {
+          // may happen for ambitus
+          continue;
+        }
 
       // We only want real notes to cause ties, not e.g. pitched trills
       if (!left_ev->in_event_class ("note-event"))
-          continue;
+        continue;
 
       SCM left_articulations = left_ev->get_property ("articulations");
 
       Stream_event *tie_event = 0;
       Stream_event *tie_stream_event = event_;
       for (SCM s = left_articulations;
-          !tie_event && !tie_stream_event && scm_is_pair (s);
-          s = scm_cdr (s))
-       {
-         Stream_event *ev = unsmob_stream_event (scm_car (s));
-         if (!ev)
-           continue;
+           !tie_event && !tie_stream_event && scm_is_pair (s);
+           s = scm_cdr (s))
+        {
+          Stream_event *ev = unsmob_stream_event (scm_car (s));
+          if (!ev)
+            continue;
 
-         if (ev->in_event_class ("tie-event"))
-           tie_event = ev;
-       }
+          if (ev->in_event_class ("tie-event"))
+            tie_event = ev;
+        }
 
       if (left_ev && (tie_event || tie_stream_event)
-         && (!Tie_engraver::has_autosplit_end (left_ev)))
-       {
-         event_processed = true;
-
-         Head_event_tuple event_tup;
-
-         SCM start_definition
-           = updated_grob_properties (context (), ly_symbol2scm ("Tie"));
-
-         event_tup.head_ = head;
-         event_tup.tie_definition_ = start_definition;
-         event_tup.tie_event_ = tie_event;
-         event_tup.tie_stream_event_ = tie_stream_event;
-
-         Moment end = now_mom ();
-         if (end.grace_part_)
-           {
-             end.grace_part_ += get_event_length (left_ev).main_part_;
-           }
-         else
-           {
-             end += get_event_length (left_ev);
-           }
-         event_tup.end_moment_ = end;
-
-         new_heads_to_tie.push_back (event_tup);
-       }
+          && (!Tie_engraver::has_autosplit_end (left_ev)))
+        {
+          event_processed = true;
+
+          Head_event_tuple event_tup;
+
+          SCM start_definition
+            = updated_grob_properties (context (), ly_symbol2scm ("Tie"));
+
+          event_tup.head_ = head;
+          event_tup.tie_definition_ = start_definition;
+          event_tup.tie_event_ = tie_event;
+          event_tup.tie_stream_event_ = tie_stream_event;
+
+          Moment end = now_mom ();
+          if (end.grace_part_)
+            {
+              end.grace_part_ += get_event_length (left_ev).main_part_;
+            }
+          else
+            {
+              end += get_event_length (left_ev);
+            }
+          event_tup.end_moment_ = end;
+
+          new_heads_to_tie.push_back (event_tup);
+        }
     }
 
   if (!wait && new_heads_to_tie.size ())
     {
-      vector<Head_event_tuple>::iterator it=heads_to_tie_.begin ();
+      vector<Head_event_tuple>::iterator it = heads_to_tie_.begin ();
       for (; it < heads_to_tie_.end (); it++)
         report_unterminated_tie (*it);
       heads_to_tie_.clear ();
@@ -355,27 +354,27 @@ Tie_engraver::typeset_tie (Grob *her)
   do
     {
       if (!Tie::head (her, d))
-       new_head_drul[d] = Tie::head (her, (Direction) - d);
+        new_head_drul[d] = Tie::head (her, (Direction) - d);
     }
   while (flip (&d) != LEFT);
 
-  Spanner *sp = dynamic_cast<Spanner*> (her);
+  Spanner *sp = dynamic_cast<Spanner *> (her);
   sp->set_bound (LEFT, new_head_drul[LEFT]);
   sp->set_bound (RIGHT, new_head_drul[RIGHT]);
 }
 
 ADD_ACKNOWLEDGER (Tie_engraver, note_head);
 ADD_TRANSLATOR (Tie_engraver,
-               /* doc */
-               "Generate ties between note heads of equal pitch.",
+                /* doc */
+                "Generate ties between note heads of equal pitch.",
 
-               /* create */
-               "Tie "
-               "TieColumn ",
+                /* create */
+                "Tie "
+                "TieColumn ",
 
-               /* read */
-               "tieWaitForNote ",
+                /* read */
+                "tieWaitForNote ",
 
-               /* write */
-               "tieMelismaBusy "
-               );
+                /* write */
+                "tieMelismaBusy "
+               );
index 0c3279ce21479b7ed790e16552777c2908c40071..3e76c120b1a0468cc15df15637202c80e098b5d9 100644 (file)
@@ -46,7 +46,7 @@ Tie_formatting_problem::print_ties_configuration (Ties_configuration const *ties
       char const *man_pos = (specifications_[i].has_manual_position_) ? "(M)" : "";
       char const *man_dir = (specifications_[i].has_manual_dir_) ? "(M)" : "";
       char const *dir = (ties->at (i).dir_ == UP) ? "up" : "dn";
-      
+
       printf ("(P%d%s, %s%s) ", ties->at (i).position_, man_pos, dir, man_dir);
     }
   printf ("\n");
@@ -55,19 +55,19 @@ Tie_formatting_problem::print_ties_configuration (Ties_configuration const *ties
 Interval
 Tie_formatting_problem::get_attachment (Real y, Drul_array<int> columns) const
 {
-  Interval attachments (0,0);
+  Interval attachments (0, 0);
   Direction d = LEFT;
   do
     {
       Tuple2<int> key (columns[d], int (d));
       Chord_outline_map::const_iterator i (chord_outlines_.find (key));
       if (i == chord_outlines_.end ())
-       programming_error ("Cannot find chord outline");
+        programming_error ("Cannot find chord outline");
       else
-       attachments[d] = i->second.height (y);
+        attachments[d] = i->second.height (y);
     }
   while (flip (&d) != LEFT);
-  
+
   return attachments;
 }
 
@@ -86,9 +86,9 @@ Tie_formatting_problem::~Tie_formatting_problem ()
 }
 
 void
-Tie_formatting_problem::set_column_chord_outline (vector<Item*> bounds,
-                                                 Direction dir,
-                                                 int column_rank)
+Tie_formatting_problem::set_column_chord_outline (vector<Item *> bounds,
+                                                  Direction dir,
+                                                  int column_rank)
 {
   Real staff_space = Staff_symbol_referencer::staff_space (bounds[0]);
 
@@ -100,14 +100,14 @@ Tie_formatting_problem::set_column_chord_outline (vector<Item*> bounds,
     {
       Grob *head = bounds[i];
       if (!Note_head::has_interface (head))
-       continue;
-         
+        continue;
+
       if (!stem)
-       stem = unsmob_grob (head->get_object ("stem"));
-         
+        stem = unsmob_grob (head->get_object ("stem"));
+
       Real p = Staff_symbol_referencer::get_position (head);
-      Interval y ((p-1) * 0.5 * staff_space,
-                 (p+1) * 0.5 * staff_space);
+      Interval y ((p - 1) * 0.5 * staff_space,
+                  (p + 1) * 0.5 * staff_space);
 
       Interval x = head->extent (x_refpoint_, X_AXIS);
       head_boxes.push_back (Box (x, y));
@@ -115,21 +115,21 @@ Tie_formatting_problem::set_column_chord_outline (vector<Item*> bounds,
 
       Grob *dots = Rhythmic_head::get_dots (head);
       if (dir == LEFT && dots)
-       {
-         Interval x = dots->extent (x_refpoint_, X_AXIS);
-         int p = int (Staff_symbol_referencer::get_position (dots));
-
-         /*
-           TODO: shouldn't this use column-rank dependent key?  
-         */
-         dot_positions_.insert (p);
-         dot_x_.unite (x);
-
-         Interval y (dots->extent (dots, Y_AXIS));
-         y.translate (p * staff_space * 0.5);
-         
-         boxes.push_back (Box (x, y));
-       }
+        {
+          Interval x = dots->extent (x_refpoint_, X_AXIS);
+          int p = int (Staff_symbol_referencer::get_position (dots));
+
+          /*
+            TODO: shouldn't this use column-rank dependent key?
+          */
+          dot_positions_.insert (p);
+          dot_x_.unite (x);
+
+          Interval y (dots->extent (dots, Y_AXIS));
+          y.translate (p * staff_space * 0.5);
+
+          boxes.push_back (Box (x, y));
+        }
     }
 
   Tuple2<int> key (column_rank, int (dir));
@@ -137,107 +137,107 @@ Tie_formatting_problem::set_column_chord_outline (vector<Item*> bounds,
   if (stem)
     {
       if (Stem::is_normal_stem (stem))
-       {
-         Interval x;
-         x.add_point (stem->relative_coordinate (x_refpoint_, X_AXIS));
-         x.widen (staff_space / 20); // ugh.
-         Interval y;
-
-         Real stem_end_position = 0.0;
-         if (Stem::is_cross_staff (stem))
-           stem_end_position =  get_grob_direction (stem) * infinity_f;
-         else
-           {
-             if (use_horizontal_spacing_ || !Stem::get_beam (stem))
-               stem_end_position = Stem::stem_end_position (stem) * staff_space * .5;
-             else
-               stem_end_position = Stem::note_head_positions (stem)[get_grob_direction (stem)]
-                 * staff_space * .5;
-           }
-         
-         y.add_point (stem_end_position);
-
-         Direction stemdir = get_grob_direction (stem);
-         y.add_point (Stem::head_positions (stem)[-stemdir]
-                      * staff_space * .5);
-
-         /*
-           add extents of stem.
-         */
-         boxes.push_back (Box (x, y));
-
-         stem_extents_[key].unite (Box (x, y));
-
-         if (dir == LEFT)
-           {
-             Box flag_box = Stem::get_translated_flag (stem).extent_box ();
-             flag_box.translate ( Offset (x[RIGHT], X_AXIS));
-             boxes.push_back (flag_box);
-           }
-       }
+        {
+          Interval x;
+          x.add_point (stem->relative_coordinate (x_refpoint_, X_AXIS));
+          x.widen (staff_space / 20); // ugh.
+          Interval y;
+
+          Real stem_end_position = 0.0;
+          if (Stem::is_cross_staff (stem))
+            stem_end_position = get_grob_direction (stem) * infinity_f;
+          else
+            {
+              if (use_horizontal_spacing_ || !Stem::get_beam (stem))
+                stem_end_position = Stem::stem_end_position (stem) * staff_space * .5;
+              else
+                stem_end_position = Stem::note_head_positions (stem)[get_grob_direction (stem)]
+                                    * staff_space * .5;
+            }
+
+          y.add_point (stem_end_position);
+
+          Direction stemdir = get_grob_direction (stem);
+          y.add_point (Stem::head_positions (stem)[-stemdir]
+                       * staff_space * .5);
+
+          /*
+            add extents of stem.
+          */
+          boxes.push_back (Box (x, y));
+
+          stem_extents_[key].unite (Box (x, y));
+
+          if (dir == LEFT)
+            {
+              Box flag_box = Stem::get_translated_flag (stem).extent_box ();
+              flag_box.translate ( Offset (x[RIGHT], X_AXIS));
+              boxes.push_back (flag_box);
+            }
+        }
       else
-       {
-         Grob *head = Stem::support_head (stem);
-
-         /*
-           In case of invisible stem, don't pass x-center of heads.
-         */
-         Real x_center = head->extent (x_refpoint_, X_AXIS).center ();
-         Interval x_ext;
-         x_ext[-dir] = x_center;
-         x_ext[dir] = infinity_f * dir;
-         Interval y_ext;
-         for (vsize j = 0; j < head_boxes.size (); j++)
-           y_ext.unite (head_boxes[j][Y_AXIS]);
-
-         boxes.push_back (Box (x_ext, y_ext));
-       }
+        {
+          Grob *head = Stem::support_head (stem);
+
+          /*
+            In case of invisible stem, don't pass x-center of heads.
+          */
+          Real x_center = head->extent (x_refpoint_, X_AXIS).center ();
+          Interval x_ext;
+          x_ext[-dir] = x_center;
+          x_ext[dir] = infinity_f * dir;
+          Interval y_ext;
+          for (vsize j = 0; j < head_boxes.size (); j++)
+            y_ext.unite (head_boxes[j][Y_AXIS]);
+
+          boxes.push_back (Box (x_ext, y_ext));
+        }
 
       extract_grob_set (stem, "note-heads", heads);
-      for (vsize i = 0; i < heads.size (); i ++)
-       {
-         if (find (bounds.begin (), bounds.end (), dynamic_cast<Item*> (heads[i])) ==  bounds.end ())
-           {
-             /*
-               other untied notes in the same chord.
-             */
-         
-             Interval y = Staff_symbol_referencer::extent_in_staff (heads[i]);
-             Interval x = heads[i]->extent (x_refpoint_, X_AXIS);
-             boxes.push_back (Box (x, y));
-           }
-         
-         Grob *acc = unsmob_grob (heads[i]->get_object ("accidental-grob"));
-         if (acc)
-           acc->get_property ("stencil"); /* trigger tie-related suicide */
-
-         if (acc && acc->is_live () && dir == RIGHT)
-           {
-             boxes.push_back (Box (acc->extent (x_refpoint_, X_AXIS),
-                                   Staff_symbol_referencer::extent_in_staff (acc)));
-           }
-
-         head_positions_[column_rank].add_point (int (Staff_symbol_referencer::get_position (heads[i])));
-       }
-      
+      for (vsize i = 0; i < heads.size (); i++)
+        {
+          if (find (bounds.begin (), bounds.end (), dynamic_cast<Item *> (heads[i])) == bounds.end ())
+            {
+              /*
+                other untied notes in the same chord.
+              */
+
+              Interval y = Staff_symbol_referencer::extent_in_staff (heads[i]);
+              Interval x = heads[i]->extent (x_refpoint_, X_AXIS);
+              boxes.push_back (Box (x, y));
+            }
+
+          Grob *acc = unsmob_grob (heads[i]->get_object ("accidental-grob"));
+          if (acc)
+            acc->get_property ("stencil"); /* trigger tie-related suicide */
+
+          if (acc && acc->is_live () && dir == RIGHT)
+            {
+              boxes.push_back (Box (acc->extent (x_refpoint_, X_AXIS),
+                                    Staff_symbol_referencer::extent_in_staff (acc)));
+            }
+
+          head_positions_[column_rank].add_point (int (Staff_symbol_referencer::get_position (heads[i])));
+        }
+
     }
-  
+
   Direction updowndir = DOWN;
   do
     {
       Interval x;
       Interval y;
       if (head_boxes.size ())
-       {
-         Box b = boundary (head_boxes, updowndir, 0);
-         x = b[X_AXIS];
-         x[-dir] =  b[X_AXIS].linear_combination (-dir / 2);
-         y[-updowndir] = b[Y_AXIS][updowndir];
-         y[updowndir] = updowndir * infinity_f;
-       }
+        {
+          Box b = boundary (head_boxes, updowndir, 0);
+          x = b[X_AXIS];
+          x[-dir] = b[X_AXIS].linear_combination (-dir / 2);
+          y[-updowndir] = b[Y_AXIS][updowndir];
+          y[updowndir] = updowndir * infinity_f;
+        }
 
       if (!x.is_empty ())
-       boxes.push_back (Box (x, y));
+        boxes.push_back (Box (x, y));
     }
   while (flip (&updowndir) != DOWN);
 
@@ -247,7 +247,7 @@ Tie_formatting_problem::set_column_chord_outline (vector<Item*> bounds,
     {
       Interval iv (Axis_group_interface::staff_extent (bounds[0], x_refpoint_, X_AXIS, y_refpoint_, Y_AXIS));
       if (iv.is_empty ())
-       iv.add_point (bounds[0]->relative_coordinate (x_refpoint_, X_AXIS));
+        iv.add_point (bounds[0]->relative_coordinate (x_refpoint_, X_AXIS));
 
       chord_outlines_[key].set_minimum_height (iv[-dir]);
     }
@@ -255,10 +255,10 @@ Tie_formatting_problem::set_column_chord_outline (vector<Item*> bounds,
     {
       Interval x;
       for (vsize j = 0; j < head_boxes.size (); j++)
-       {
-         x.unite (head_boxes[j][X_AXIS]);
-       }
-      
+        {
+          x.unite (head_boxes[j][X_AXIS]);
+        }
+
       chord_outlines_[key].set_minimum_height (x[dir]);
     }
 
@@ -270,8 +270,8 @@ Tie_formatting_problem::set_column_chord_outline (vector<Item*> bounds,
 }
 
 void
-Tie_formatting_problem::set_chord_outline (vector<Item*> bounds,
-                                          Direction dir)
+Tie_formatting_problem::set_chord_outline (vector<Item *> bounds,
+                                           Direction dir)
 
 {
   vector<int> ranks;
@@ -283,23 +283,21 @@ Tie_formatting_problem::set_chord_outline (vector<Item*> bounds,
 
   for (vsize i = 0; i < ranks.size (); i++)
     {
-      vector<Item*> col_items;
-      for (vsize j = 0; j < bounds.size (); j ++)
-       {
-         if (bounds[j]->get_column ()->get_rank () == ranks[i])
-           col_items.push_back (bounds[j]);
-       }
+      vector<Item *> col_items;
+      for (vsize j = 0; j < bounds.size (); j++)
+        {
+          if (bounds[j]->get_column ()->get_rank () == ranks[i])
+            col_items.push_back (bounds[j]);
+        }
 
       set_column_chord_outline (col_items, dir, ranks[i]);
     }
 }
-  
-
 
 void
 Tie_formatting_problem::from_tie (Grob *tie)
 {
-  vector<Grob*> ties;
+  vector<Grob *> ties;
   ties.push_back (tie);
   from_ties (ties);
 
@@ -313,90 +311,89 @@ Tie_formatting_problem::common_x_refpoint () const
 }
 
 void
-Tie_formatting_problem::from_ties (vector<Grob*> const &ties)
+Tie_formatting_problem::from_ties (vector<Grob *> const &ties)
 {
   if (ties.empty ())
     return;
-  
+
   x_refpoint_ = ties[0];
   y_refpoint_ = ties[0];
   for (vsize i = 0; i < ties.size (); i++)
     {
-      Spanner *tie = dynamic_cast<Spanner*> (ties[i]);
+      Spanner *tie = dynamic_cast<Spanner *> (ties[i]);
       Item *l = tie->get_bound (LEFT);
       Item *r = tie->get_bound (RIGHT);
 
-      x_refpoint_ = l->common_refpoint (x_refpoint_, X_AXIS); 
+      x_refpoint_ = l->common_refpoint (x_refpoint_, X_AXIS);
       x_refpoint_ = r->common_refpoint (x_refpoint_, X_AXIS);
 
       if (!l->break_status_dir ())
-       y_refpoint_ = l->common_refpoint (y_refpoint_, Y_AXIS); 
+        y_refpoint_ = l->common_refpoint (y_refpoint_, Y_AXIS);
       if (!r->break_status_dir ())
-       y_refpoint_ = r->common_refpoint (y_refpoint_, Y_AXIS); 
+        y_refpoint_ = r->common_refpoint (y_refpoint_, Y_AXIS);
     }
 
   details_.from_grob (ties[0]);
-  
+
   Direction d = LEFT;
   do
     {
-      vector<Item*> bounds;
-      
+      vector<Item *> bounds;
+
       for (vsize i = 0; i < ties.size (); i++)
-       {
-         Item *it = dynamic_cast<Spanner*> (ties[i])->get_bound (d);
-         if (it->break_status_dir ())
-             it = it->get_column ();
-
-         bounds.push_back (it);
-       }
-      
+        {
+          Item *it = dynamic_cast<Spanner *> (ties[i])->get_bound (d);
+          if (it->break_status_dir ())
+            it = it->get_column ();
+
+          bounds.push_back (it);
+        }
+
       set_chord_outline (bounds, d);
     }
   while (flip (&d) != LEFT);
 
-
   for (vsize i = 0; i < ties.size (); i++)
     {
       Tie_specification spec;
       spec.from_grob (ties[i]);
-      
+
       do
-       {
-         spec.note_head_drul_[d] = Tie::head (ties[i], d);
-         spec.column_ranks_[d] = Tie::get_column_rank (ties[i], d);
-       }
+        {
+          spec.note_head_drul_[d] = Tie::head (ties[i], d);
+          spec.column_ranks_[d] = Tie::get_column_rank (ties[i], d);
+        }
       while (flip (&d) != LEFT);
       specifications_.push_back (spec);
     }
 }
 
 void
-Tie_formatting_problem::from_semi_ties (vector<Grob*> const &semi_ties, Direction head_dir)
+Tie_formatting_problem::from_semi_ties (vector<Grob *> const &semi_ties, Direction head_dir)
 {
   if (semi_ties.empty ())
     return;
 
-  use_horizontal_spacing_ = false; 
+  use_horizontal_spacing_ = false;
   details_.from_grob (semi_ties[0]);
-  vector<Item*> heads;
+  vector<Item *> heads;
 
   int column_rank = -1;
   for (vsize i = 0; i < semi_ties.size (); i++)
     {
       Tie_specification spec;
       Item *head = unsmob_item (semi_ties[i]->get_object ("note-head"));
-       
+
       if (!head)
-       programming_error ("LV tie without head?!");
+        programming_error ("LV tie without head?!");
 
       if (head)
-       {
-         spec.position_ = int (Staff_symbol_referencer::get_position (head));
-       }
+        {
+          spec.position_ = int (Staff_symbol_referencer::get_position (head));
+        }
 
       spec.from_grob (semi_ties[i]);
-      
+
       spec.note_head_drul_[head_dir] = head;
       column_rank = Tie::get_column_rank (semi_ties[i], head_dir);
       spec.column_ranks_ = Drul_array<int> (column_rank, column_rank);
@@ -409,13 +406,13 @@ Tie_formatting_problem::from_semi_ties (vector<Grob*> const &semi_ties, Directio
 
   for (vsize i = 0; i < semi_ties.size (); i++)
     {
-      x_refpoint_ = semi_ties[i]->common_refpoint (x_refpoint_, X_AXIS); 
-      y_refpoint_ = semi_ties[i]->common_refpoint (y_refpoint_, Y_AXIS); 
+      x_refpoint_ = semi_ties[i]->common_refpoint (x_refpoint_, X_AXIS);
+      y_refpoint_ = semi_ties[i]->common_refpoint (y_refpoint_, Y_AXIS);
     }
   for (vsize i = 0; i < heads.size (); i++)
     {
-      x_refpoint_ = heads[i]->common_refpoint (x_refpoint_, X_AXIS); 
-      y_refpoint_ = heads[i]->common_refpoint (y_refpoint_, Y_AXIS) ;
+      x_refpoint_ = heads[i]->common_refpoint (x_refpoint_, X_AXIS);
+      y_refpoint_ = heads[i]->common_refpoint (y_refpoint_, Y_AXIS);
     }
 
   set_chord_outline (heads, head_dir);
@@ -428,48 +425,46 @@ Tie_formatting_problem::from_semi_ties (vector<Grob*> const &semi_ties, Directio
   chord_outlines_[open_key].set_minimum_height (extremal - head_dir * 1.5);
 }
 
-
 Tie_specification
 Tie_formatting_problem::get_tie_specification (int i) const
 {
   return specifications_[i];
 }
 
-
 /*
-  Return configuration, create it if necessary. 
+  Return configuration, create it if necessary.
 */
-Tie_configuration*
+Tie_configuration *
 Tie_formatting_problem::get_configuration (int pos, Direction dir, Drul_array<int> columns,
-                                          bool tune_dy) const
+                                           bool tune_dy) const
 {
-  int key_components[] = {
+  int key_components[] =
+  {
     pos, dir, columns[LEFT], columns[RIGHT]
   };
-  Tuple<int,4> key (key_components);
-    
+  Tuple<int, 4> key (key_components);
+
   Tie_configuration_map::const_iterator f = possibilities_.find (key);
   if (f != possibilities_.end ())
     {
       return (*f).second;
     }
 
-  
   Tie_configuration *conf = generate_configuration (pos, dir, columns, tune_dy);
-  ((Tie_formatting_problem*) this)->possibilities_[key] = conf;
+  ((Tie_formatting_problem *) this)->possibilities_[key] = conf;
   return conf;
 }
 
-Tie_configuration*
+Tie_configuration *
 Tie_formatting_problem::generate_configuration (int pos, Direction dir,
-                                               Drul_array<int> columns, bool y_tune) const
+                                                Drul_array<int> columns, bool y_tune) const
 {
   Tie_configuration *conf = new Tie_configuration;
   conf->position_ = pos;
   conf->dir_ = dir;
-  
+
   conf->column_ranks_ = columns;
-  
+
   Real y = conf->position_ * 0.5 * details_.staff_space_;
 
   if (dot_positions_.find (pos) != dot_positions_.end ())
@@ -477,79 +472,79 @@ Tie_formatting_problem::generate_configuration (int pos, Direction dir,
       conf->delta_y_ += dir * 0.25 * details_.staff_space_;
       y_tune = false;
     }
-  
+
   if (y_tune
       && max (fabs (get_head_extent (columns[LEFT], LEFT, Y_AXIS)[dir] - y),
-             fabs (get_head_extent (columns[RIGHT], RIGHT, Y_AXIS)[dir] - y)) < 0.25
+              fabs (get_head_extent (columns[RIGHT], RIGHT, Y_AXIS)[dir] - y)) < 0.25
       && !Staff_symbol_referencer::on_line (details_.staff_symbol_referencer_, pos))
     {
-      conf->delta_y_ =
-       (get_head_extent (columns[LEFT], LEFT, Y_AXIS)[dir] - y)
-       + dir * details_.outer_tie_vertical_gap_;
+      conf->delta_y_
+        = (get_head_extent (columns[LEFT], LEFT, Y_AXIS)[dir] - y)
+          + dir * details_.outer_tie_vertical_gap_;
     }
 
   if (y_tune)
     {
       conf->attachment_x_ = get_attachment (y + conf->delta_y_, conf->column_ranks_);
-      Real h =  conf->height (details_);
-      
+      Real h = conf->height (details_);
+
       /*
-       TODO:
+        TODO:
 
-       - should make sliding criterion, should flatten ties if
+        - should make sliding criterion, should flatten ties if
+
+        - they're just the wrong (ie. touching line at top & bottom)
+        size.
 
-       - they're just the wrong (ie. touching line at top & bottom)
-       size.
-       
        */
       if (head_positions_slice (columns[LEFT]).contains (pos)
-         || head_positions_slice (columns[RIGHT]).contains (pos)
-         || abs (pos) < 2 * Staff_symbol_referencer::staff_radius (details_.staff_symbol_referencer_))
-       {
-         if (h < details_.intra_space_threshold_ * 0.5 * details_.staff_space_)
-           {
-             if (!Staff_symbol_referencer::on_line (details_.staff_symbol_referencer_, pos)
-                 && abs (pos) < 2 * Staff_symbol_referencer::staff_radius (details_.staff_symbol_referencer_))
-               {
-                 conf->center_tie_vertically (details_);
-               }
-             else if (Staff_symbol_referencer::on_line (details_.staff_symbol_referencer_, pos))
-               {
-                 conf->delta_y_ += dir *
-                   details_.tip_staff_line_clearance_ * 0.5 *  details_.staff_space_;
-               }
-           }
-         else 
-           {
-             Real top_y = y + conf->delta_y_ + conf->dir_ * h;
-             Real top_pos = top_y / (0.5*details_.staff_space_);
-             int round_pos = int (my_round (top_pos));
-
-             /* TODO: should use other variable? */
-             Real clearance = details_.center_staff_line_clearance_;
-             if (fabs (top_pos - round_pos) < clearance
-                 && Staff_symbol_referencer::on_staff_line (details_.staff_symbol_referencer_,
-                                                            round_pos))
-               {
-                 Real new_y = (round_pos + clearance * conf->dir_) * 0.5 * details_.staff_space_;
-                 conf->delta_y_ = (new_y - top_y);
-               }
-           }
-       }
-    }  
+          || head_positions_slice (columns[RIGHT]).contains (pos)
+          || abs (pos) < 2 * Staff_symbol_referencer::staff_radius (details_.staff_symbol_referencer_))
+        {
+          if (h < details_.intra_space_threshold_ * 0.5 * details_.staff_space_)
+            {
+              if (!Staff_symbol_referencer::on_line (details_.staff_symbol_referencer_, pos)
+                  && abs (pos) < 2 * Staff_symbol_referencer::staff_radius (details_.staff_symbol_referencer_))
+                {
+                  conf->center_tie_vertically (details_);
+                }
+              else if (Staff_symbol_referencer::on_line (details_.staff_symbol_referencer_, pos))
+                {
+                  conf->delta_y_ += dir *
+                                    details_.tip_staff_line_clearance_ * 0.5 * details_.staff_space_;
+                }
+            }
+          else
+            {
+              Real top_y = y + conf->delta_y_ + conf->dir_ * h;
+              Real top_pos = top_y / (0.5 * details_.staff_space_);
+              int round_pos = int (my_round (top_pos));
+
+              /* TODO: should use other variable? */
+              Real clearance = details_.center_staff_line_clearance_;
+              if (fabs (top_pos - round_pos) < clearance
+                  && Staff_symbol_referencer::on_staff_line (details_.staff_symbol_referencer_,
+                                                             round_pos))
+                {
+                  Real new_y = (round_pos + clearance * conf->dir_) * 0.5 * details_.staff_space_;
+                  conf->delta_y_ = (new_y - top_y);
+                }
+            }
+        }
+    }
   conf->attachment_x_ = get_attachment (y + conf->delta_y_, conf->column_ranks_);
   if (conf->height (details_) < details_.intra_space_threshold_ * 0.5 * details_.staff_space_)
     {
       /*
-       This is less sensible for long ties, since those are more
-       horizontal.
+        This is less sensible for long ties, since those are more
+        horizontal.
       */
       Interval close_by = get_attachment (y
-                                         + conf->delta_y_
-                                         + (dir * details_.intra_space_threshold_ * 0.25
-                                            * details_.staff_space_),
-                                         conf->column_ranks_);
-      
+                                          + conf->delta_y_
+                                          + (dir * details_.intra_space_threshold_ * 0.25
+                                             * details_.staff_space_),
+                                          conf->column_ranks_);
+
       conf->attachment_x_.intersect (close_by);
     }
 
@@ -558,26 +553,26 @@ Tie_formatting_problem::generate_configuration (int pos, Direction dir,
   if (conf->column_span_length ())
     {
       /*
-       avoid the stems that we attach to as well. We don't do this
-       for semities (span length = 0)
+        avoid the stems that we attach to as well. We don't do this
+        for semities (span length = 0)
 
-       It would be better to check D against HEAD-DIRECTION if
-       applicable.
+        It would be better to check D against HEAD-DIRECTION if
+        applicable.
       */
       Direction d = LEFT;
       do
-       {
-         Real y = conf->position_ * details_.staff_space_ * 0.5 + conf->delta_y_;
-         if (get_stem_extent (conf->column_ranks_[d], d, X_AXIS).is_empty ()
-             || !get_stem_extent (conf->column_ranks_[d], d, Y_AXIS).contains (y))
-           continue;
-
-         conf->attachment_x_[d] =
-           d * min (d * conf->attachment_x_[d],
-                    d * (get_stem_extent (conf->column_ranks_[d], d, X_AXIS)[-d] - d * details_.stem_gap_));
-       }
+        {
+          Real y = conf->position_ * details_.staff_space_ * 0.5 + conf->delta_y_;
+          if (get_stem_extent (conf->column_ranks_[d], d, X_AXIS).is_empty ()
+              || !get_stem_extent (conf->column_ranks_[d], d, Y_AXIS).contains (y))
+            continue;
+
+          conf->attachment_x_[d]
+            = d * min (d * conf->attachment_x_[d],
+                       d * (get_stem_extent (conf->column_ranks_[d], d, X_AXIS)[-d] - d * details_.stem_gap_));
+        }
       while (flip (&d) != LEFT);
-    }  
+    }
   return conf;
 }
 
@@ -606,19 +601,19 @@ Tie_formatting_problem::get_stem_extent (int col, Direction d, Axis a) const
  */
 Real
 Tie_formatting_problem::score_aptitude (Tie_configuration *conf,
-                                       Tie_specification const &spec,
-                                       Ties_configuration *ties_conf, int tie_idx) const
+                                        Tie_specification const &spec,
+                                        Ties_configuration *ties_conf, int tie_idx) const
 {
   Real penalty = 0.0;
   Real curve_y = conf->position_ * details_.staff_space_ * 0.5 + conf->delta_y_;
   Real tie_y = spec.position_ * details_.staff_space_ * 0.5;
   if (sign (curve_y - tie_y) != conf->dir_)
     {
-      Real p =  details_.wrong_direction_offset_penalty_;
+      Real p = details_.wrong_direction_offset_penalty_;
       if (ties_conf)
-       ties_conf->add_tie_score (p, tie_idx, "wrong dir");
+        ties_conf->add_tie_score (p, tie_idx, "wrong dir");
       else
-       penalty += p;
+        penalty += p;
     }
 
   {
@@ -627,29 +622,28 @@ Tie_formatting_problem::score_aptitude (Tie_configuration *conf,
     if (ties_conf)
       ties_conf->add_tie_score (p, tie_idx, "vdist");
     else
-      penalty += p; 
+      penalty += p;
   }
-  
+
   Direction d = LEFT;
   do
     {
       if (!spec.note_head_drul_[d])
-       continue;
-      
+        continue;
+
       Interval head_x = spec.note_head_drul_[d]->extent (x_refpoint_, X_AXIS);
       Real dist = head_x.distance (conf->attachment_x_[d]);
-      
 
       /*
-       TODO: flatten with log or sqrt.
+        TODO: flatten with log or sqrt.
        */
       Real p = details_.horizontal_distance_penalty_factor_
-       * convex_amplifier (1.25, 1.0, dist);
+               * convex_amplifier (1.25, 1.0, dist);
       if (ties_conf)
-       ties_conf->add_tie_score (p, tie_idx,
-                                 (d == LEFT) ? "lhdist" : "rhdist");
+        ties_conf->add_tie_score (p, tie_idx,
+                                  (d == LEFT) ? "lhdist" : "rhdist");
       else
-       penalty += p;
+        penalty += p;
 
     }
   while (flip (&d) != LEFT);
@@ -658,48 +652,47 @@ Tie_formatting_problem::score_aptitude (Tie_configuration *conf,
       && ties_conf->size () == 1)
     {
       Direction d = LEFT;
-      Drul_array<Grob*> stems (0, 0);
+      Drul_array<Grob *> stems (0, 0);
       do
-       {
-         if (!spec.note_head_drul_[d])
-           continue;
-
-         Grob *stem = unsmob_grob (spec.note_head_drul_[d]->get_object ("stem"));
-         if (stem
-             && Stem::is_normal_stem (stem))
-           stems[d] = stem;
-       }
+        {
+          if (!spec.note_head_drul_[d])
+            continue;
+
+          Grob *stem = unsmob_grob (spec.note_head_drul_[d]->get_object ("stem"));
+          if (stem
+              && Stem::is_normal_stem (stem))
+            stems[d] = stem;
+        }
       while (flip (&d) != LEFT);
 
       bool tie_stem_dir_ok = true;
       bool tie_position_dir_ok = true;
       if (stems[LEFT] && !stems[RIGHT])
-       tie_stem_dir_ok = conf->dir_ != get_grob_direction (stems[LEFT]);
+        tie_stem_dir_ok = conf->dir_ != get_grob_direction (stems[LEFT]);
       else if (!stems[LEFT] && stems[RIGHT])
-       tie_stem_dir_ok = conf->dir_ != get_grob_direction (stems[RIGHT]);
+        tie_stem_dir_ok = conf->dir_ != get_grob_direction (stems[RIGHT]);
       else if (stems[LEFT] && stems[RIGHT]
-         && get_grob_direction (stems[LEFT]) == get_grob_direction (stems[RIGHT]))
-       tie_stem_dir_ok = conf->dir_ != get_grob_direction (stems[LEFT]);
+               && get_grob_direction (stems[LEFT]) == get_grob_direction (stems[RIGHT]))
+        tie_stem_dir_ok = conf->dir_ != get_grob_direction (stems[LEFT]);
       else if (spec.position_)
-       tie_position_dir_ok = conf->dir_ == sign (spec.position_);
+        tie_position_dir_ok = conf->dir_ == sign (spec.position_);
 
       if (!tie_stem_dir_ok)
-       ties_conf->add_score (details_.same_dir_as_stem_penalty_, "tie/stem dir");
+        ties_conf->add_score (details_.same_dir_as_stem_penalty_, "tie/stem dir");
       if (!tie_position_dir_ok)
-       ties_conf->add_score (details_.same_dir_as_stem_penalty_, "tie/pos dir");
+        ties_conf->add_score (details_.same_dir_as_stem_penalty_, "tie/pos dir");
     }
-           
+
   return penalty;
 }
 
-
 Slice
 Tie_formatting_problem::head_positions_slice (int rank) const
 {
   Position_extent_map::const_iterator i (head_positions_.find (rank));
   if (i != head_positions_.end ())
     {
-      return  (*i).second; 
+      return (*i).second;
     }
   Slice empty;
   return empty;
@@ -714,70 +707,69 @@ Tie_formatting_problem::score_configuration (Tie_configuration *conf) const
 {
   if (conf->scored_)
     {
-      return ;
+      return;
     }
-  
+
   Real length = conf->attachment_x_.length ();
 
   Real length_penalty
     = peak_around (0.33 * details_.min_length_, details_.min_length_, length);
   conf->add_score (details_.min_length_penalty_factor_
-                  * length_penalty, "minlength");
-  
+                   * length_penalty, "minlength");
+
   Real tip_pos = conf->position_ + conf->delta_y_ / 0.5 * details_.staff_space_;
   Real tip_y = tip_pos * details_.staff_space_ * 0.5;
-  Real height =  conf->height (details_);
+  Real height = conf->height (details_);
 
   Real top_y = tip_y + conf->dir_ * height;
   Real top_pos = 2 * top_y / details_.staff_space_;
   Real round_top_pos = rint (top_pos);
   if (Staff_symbol_referencer::on_line (details_.staff_symbol_referencer_,
-                                               int (round_top_pos))
+                                        int (round_top_pos))
       && Staff_symbol_referencer::staff_radius (details_.staff_symbol_referencer_) > top_y)
     {
-      conf->add_score (
-       details_.staff_line_collision_penalty_
-       * peak_around (0.1 * details_.center_staff_line_clearance_,
-                      details_.center_staff_line_clearance_,
-                      fabs (top_pos - round_top_pos)),
-       "line center");
+      conf->add_score (details_.staff_line_collision_penalty_
+                       * peak_around (0.1 * details_.center_staff_line_clearance_,
+                                      details_.center_staff_line_clearance_,
+                                      fabs (top_pos - round_top_pos)),
+                       "line center");
     }
 
   int rounded_tip_pos = int (rint (tip_pos));
   if (Staff_symbol_referencer::on_line (details_.staff_symbol_referencer_, rounded_tip_pos)
       && (head_positions_slice (conf->column_ranks_[LEFT]).contains (rounded_tip_pos)
-         || head_positions_slice (conf->column_ranks_[RIGHT]).contains (rounded_tip_pos)
-         || abs (rounded_tip_pos) < 2 * Staff_symbol_referencer::staff_radius (details_.staff_symbol_referencer_))
-         )
+          || head_positions_slice (conf->column_ranks_[RIGHT]).contains (rounded_tip_pos)
+          || abs (rounded_tip_pos) < 2 * Staff_symbol_referencer::staff_radius (details_.staff_symbol_referencer_))
+     )
     {
       conf->add_score (details_.staff_line_collision_penalty_
-                      * peak_around (0.1 * details_.tip_staff_line_clearance_,
-                                     details_.tip_staff_line_clearance_,
-                                     fabs (tip_pos - rint (tip_pos))),
-                      "tipline");
+                       * peak_around (0.1 * details_.tip_staff_line_clearance_,
+                                      details_.tip_staff_line_clearance_,
+                                      fabs (tip_pos - rint (tip_pos))),
+                       "tipline");
     }
 
   if (!dot_x_.is_empty ())
     {
       /* use left edge? */
       Real x = dot_x_.center ();
-      
+
       Bezier b = conf->get_transformed_bezier (details_);
       if (b.control_point_extent (X_AXIS).contains (x))
-       {
-         Real y = b.get_other_coordinate (X_AXIS, x);
-
-         for (set<int>::const_iterator i (dot_positions_.begin ());
-              i != dot_positions_.end (); i ++)
-           {
-             int dot_pos = (*i);
-             conf->add_score (details_.dot_collision_penalty_
-               * peak_around (.1 * details_.dot_collision_clearance_,
-                              details_.dot_collision_clearance_,
-                              fabs (dot_pos * details_.staff_space_ * 0.5 - y)),
-                              "dot collision");
-           }
-       }
+        {
+          Real y = b.get_other_coordinate (X_AXIS, x);
+
+          for (set<int>::const_iterator i (dot_positions_.begin ());
+               i != dot_positions_.end (); i++)
+            {
+              int dot_pos = (*i);
+              conf->add_score (details_.dot_collision_penalty_
+                               * peak_around (.1 * details_.dot_collision_clearance_,
+                                              details_.dot_collision_clearance_,
+                                              fabs (dot_pos * details_.staff_space_ * 0.5 - y)),
+                               "dot collision");
+            }
+        }
     }
 
   conf->scored_ = true;
@@ -786,7 +778,7 @@ Tie_formatting_problem::score_configuration (Tie_configuration *conf) const
 void
 Tie_formatting_problem::score_ties_aptitude (Ties_configuration *ties) const
 {
-  if  (ties->size () != specifications_.size ())
+  if (ties->size () != specifications_.size ())
     {
       programming_error ("Huh? Mismatch between sizes.");
       return;
@@ -794,7 +786,7 @@ Tie_formatting_problem::score_ties_aptitude (Ties_configuration *ties) const
 
   for (vsize i = 0; i < ties->size (); i++)
     score_aptitude (&ties->at (i), specifications_[i],
-                   ties, i);
+                    ties, i);
 }
 
 void
@@ -802,7 +794,7 @@ Tie_formatting_problem::score_ties (Ties_configuration *ties) const
 {
   if (ties->scored_)
     return;
-  
+
   score_ties_configuration (ties);
   score_ties_aptitude (ties);
   ties->scored_ = true;
@@ -816,33 +808,33 @@ Tie_formatting_problem::score_ties_configuration (Ties_configuration *ties) cons
       score_configuration (&ties->at (i));
       ties->add_tie_score (ties->at (i).score (), i, "conf");
     }
-  
+
   Real last_edge = 0.0;
   Real last_center = 0.0;
   for (vsize i = 0; i < ties->size (); i++)
     {
       Bezier b (ties->at (i).get_transformed_bezier (details_));
-       
+
       Real center = b.curve_point (0.5)[Y_AXIS];
       Real edge = b.curve_point (0.0)[Y_AXIS];
-      
+
       if (i)
-       {
-         if (edge <= last_edge)
-           ties->add_score (details_.tie_column_monotonicity_penalty_, "monoton edge");
-         if (center <= last_center)
-           ties->add_score (details_.tie_column_monotonicity_penalty_, "monoton cent");
-
-         ties->add_score (details_.tie_tie_collision_penalty_ *
-                          peak_around (0.1 * details_.tie_tie_collision_distance_,
-                                       details_.tie_tie_collision_distance_,
-                                       fabs (center - last_center)),
-                          "tietie center");
-         ties->add_score (details_.tie_tie_collision_penalty_ *
-                          peak_around (0.1 * details_.tie_tie_collision_distance_,
-                                       details_.tie_tie_collision_distance_,
-                                       fabs (edge - last_edge)), "tietie edge");
-       }
+        {
+          if (edge <= last_edge)
+            ties->add_score (details_.tie_column_monotonicity_penalty_, "monoton edge");
+          if (center <= last_center)
+            ties->add_score (details_.tie_column_monotonicity_penalty_, "monoton cent");
+
+          ties->add_score (details_.tie_tie_collision_penalty_ *
+                           peak_around (0.1 * details_.tie_tie_collision_distance_,
+                                        details_.tie_tie_collision_distance_,
+                                        fabs (center - last_center)),
+                           "tietie center");
+          ties->add_score (details_.tie_tie_collision_penalty_ *
+                           peak_around (0.1 * details_.tie_tie_collision_distance_,
+                                        details_.tie_tie_collision_distance_,
+                                        fabs (edge - last_edge)), "tietie edge");
+        }
 
       last_edge = edge;
       last_center = center;
@@ -851,18 +843,18 @@ Tie_formatting_problem::score_ties_configuration (Ties_configuration *ties) cons
   if (ties->size () > 1)
     {
       ties->add_score (details_.outer_tie_length_symmetry_penalty_factor_
-                      * fabs (ties->at (0).attachment_x_.length () - ties->back ().attachment_x_.length ()),
-                      "length symm");
-  
+                       * fabs (ties->at (0).attachment_x_.length () - ties->back ().attachment_x_.length ()),
+                       "length symm");
+
       ties->add_score (details_.outer_tie_vertical_distance_symmetry_penalty_factor_
-                      * fabs (fabs (specifications_[0].position_ * 0.5 * details_.staff_space_
-                                    - (ties->at (0).position_ * 0.5 * details_.staff_space_
-                                       + ties->at (0).delta_y_))
-                              -
-                              fabs (specifications_.back ().position_ * 0.5 * details_.staff_space_
-                                    - (ties->back ().position_ * 0.5 * details_.staff_space_
-                                       + ties->back ().delta_y_))),
-                      "pos symmetry");
+                       * fabs (fabs (specifications_[0].position_ * 0.5 * details_.staff_space_
+                                     - (ties->at (0).position_ * 0.5 * details_.staff_space_
+                                        + ties->at (0).delta_y_))
+                               -
+                               fabs (specifications_.back ().position_ * 0.5 * details_.staff_space_
+                                     - (ties->back ().position_ * 0.5 * details_.staff_space_
+                                        + ties->back ().delta_y_))),
+                       "pos symmetry");
     }
 }
 
@@ -876,41 +868,41 @@ Tie_formatting_problem::generate_ties_configuration (Ties_configuration const &t
   Ties_configuration copy;
   for (vsize i = 0; i < ties_config.size (); i++)
     {
-      Tie_configuration * ptr = get_configuration (ties_config[i].position_, ties_config[i].dir_,
-                                                  ties_config[i].column_ranks_,
-                                                  !specifications_[i].has_manual_delta_y_);
+      Tie_configuration *ptr = get_configuration (ties_config[i].position_, ties_config[i].dir_,
+                                                  ties_config[i].column_ranks_,
+                                                  !specifications_[i].has_manual_delta_y_);
       if (specifications_[i].has_manual_delta_y_)
-       {
-         ptr->delta_y_
-           = (specifications_[i].manual_position_ - ties_config[i].position_)
-           * 0.5 * details_.staff_space_;
-       }
+        {
+          ptr->delta_y_
+            = (specifications_[i].manual_position_ - ties_config[i].position_)
+              * 0.5 * details_.staff_space_;
+        }
       copy.push_back (*ptr);
     }
-  
+
   return copy;
 }
 
 Ties_configuration
-Tie_formatting_problem::generate_base_chord_configuration () 
+Tie_formatting_problem::generate_base_chord_configuration ()
 {
   Ties_configuration ties_config;
-  for (vsize i = 0;  i < specifications_.size (); i ++)
+  for (vsize i = 0; i < specifications_.size (); i++)
     {
       Tie_configuration conf;
       if (specifications_[i].has_manual_dir_)
-       conf.dir_ = specifications_[i].manual_dir_;
+        conf.dir_ = specifications_[i].manual_dir_;
       if (specifications_[i].has_manual_position_)
-       {
-         conf.position_ = (int) my_round (specifications_[i].manual_position_);
-         if (specifications_[i].has_manual_delta_y_)
-           conf.delta_y_ = (specifications_[i].manual_position_ - conf.position_)
-             * 0.5 * details_.staff_space_;
-       }
+        {
+          conf.position_ = (int) my_round (specifications_[i].manual_position_);
+          if (specifications_[i].has_manual_delta_y_)
+            conf.delta_y_ = (specifications_[i].manual_position_ - conf.position_)
+                            * 0.5 * details_.staff_space_;
+        }
       else
-       {
-         conf.position_ = specifications_[i].position_;
-       }
+        {
+          conf.position_ = specifications_[i].position_;
+        }
 
       conf.column_ranks_ = specifications_[i].column_ranks_;
       ties_config.push_back (conf);
@@ -922,16 +914,16 @@ Tie_formatting_problem::generate_base_chord_configuration ()
       ties_config[i].position_ += ties_config[i].dir_;
 
   ties_config = generate_ties_configuration (ties_config);
-  
+
   return ties_config;
 }
 
 Ties_configuration
 Tie_formatting_problem::find_best_variation (Ties_configuration const &base,
-                                            vector<Tie_configuration_variation> const &vars)
+                                             vector<Tie_configuration_variation> const &vars)
 {
   Ties_configuration best = base;
-  
+
   /*
     This simply is 1-opt: we have K substitions, and we try applying
     exactly every one for each.
@@ -939,22 +931,20 @@ Tie_formatting_problem::find_best_variation (Ties_configuration const &base,
   for (vsize i = 0; i < vars.size (); i++)
     {
       Ties_configuration variant (base);
-      for (vsize j = 0; j < vars[i].index_suggestion_pairs_.size(); j++)
-       variant[vars[i].index_suggestion_pairs_[j].first] = *vars[i].index_suggestion_pairs_[j].second;
+      for (vsize j = 0; j < vars[i].index_suggestion_pairs_.size (); j++)
+        variant[vars[i].index_suggestion_pairs_[j].first] = *vars[i].index_suggestion_pairs_[j].second;
 
       variant.reset_score ();
       score_ties (&variant);
-      
+
       if (variant.score () < best.score ())
-       {
-         best = variant;
-       }
+        {
+          best = variant;
+        }
     }
 
   return best;
 }
-  
-                                      
 
 Ties_configuration
 Tie_formatting_problem::generate_optimal_configuration ()
@@ -962,7 +952,7 @@ Tie_formatting_problem::generate_optimal_configuration ()
   Ties_configuration base = generate_base_chord_configuration ();
   score_ties (&base);
 
-  vector<Tie_configuration_variation> vars;  
+  vector<Tie_configuration_variation> vars;
   if (specifications_.size () > 1)
     vars = generate_collision_variations (base);
   else
@@ -982,18 +972,18 @@ void
 Tie_formatting_problem::set_ties_config_standard_directions (Ties_configuration *tie_configs)
 {
   if (tie_configs->empty ())
-    return ;
+    return;
 
   if (!tie_configs->at (0).dir_)
     {
       if (tie_configs->size () == 1)
-       tie_configs->at (0).dir_ = Direction (sign (tie_configs->at (0).position_));
+        tie_configs->at (0).dir_ = Direction (sign (tie_configs->at (0).position_));
 
       if (!tie_configs->at (0).dir_)
-       tie_configs->at (0).dir_
-         = (tie_configs->size() > 1) ? DOWN : details_.neutral_direction_;
+        tie_configs->at (0).dir_
+          = (tie_configs->size () > 1) ? DOWN : details_.neutral_direction_;
     }
-  
+
   if (!tie_configs->back ().dir_)
     tie_configs->back ().dir_ = UP;
 
@@ -1003,36 +993,36 @@ Tie_formatting_problem::set_ties_config_standard_directions (Ties_configuration
   for (vsize i = 1; i < tie_configs->size (); i++)
     {
       Real diff = (tie_configs->at (i).position_
-                  -tie_configs->at (i-1).position_);
-                  
-      Real span_diff 
-       = specifications_[i].column_span () - specifications_[i-1].column_span ();
+                   - tie_configs->at (i - 1).position_);
+
+      Real span_diff
+        = specifications_[i].column_span () - specifications_[i - 1].column_span ();
       if (span_diff && fabs (diff) <= 2)
-       {
-         if  (span_diff > 0)
-           tie_configs->at (i).dir_ = UP;
-         else if (span_diff < 0)
-           tie_configs->at (i-1).dir_ = DOWN;  
-       }
+        {
+          if (span_diff > 0)
+            tie_configs->at (i).dir_ = UP;
+          else if (span_diff < 0)
+            tie_configs->at (i - 1).dir_ = DOWN;
+        }
       else if (fabs (diff) <= 1)
-       {
-         if (!tie_configs->at (i-1).dir_)
-           tie_configs->at (i-1).dir_ = DOWN;
-         if (!tie_configs->at (i).dir_)
-           tie_configs->at (i).dir_ = UP;
-       }
+        {
+          if (!tie_configs->at (i - 1).dir_)
+            tie_configs->at (i - 1).dir_ = DOWN;
+          if (!tie_configs->at (i).dir_)
+            tie_configs->at (i).dir_ = UP;
+        }
     }
 
   for (vsize i = 1; i + 1 < tie_configs->size (); i++)
     {
       Tie_configuration &conf = tie_configs->at (i);
       if (conf.dir_)
-       continue;
+        continue;
 
-      Direction position_dir =
-       Direction (sign (conf.position_));
+      Direction position_dir
+        = Direction (sign (conf.position_));
       if (!position_dir)
-       position_dir = DOWN;
+        position_dir = DOWN;
 
       conf.dir_ = position_dir;
     }
@@ -1042,33 +1032,33 @@ vector<Tie_configuration_variation>
 Tie_formatting_problem::generate_extremal_tie_variations (Ties_configuration const &ties) const
 {
   vector<Tie_configuration_variation> vars;
-  Direction d = DOWN; 
+  Direction d = DOWN;
   for (int i = 1; i <= details_.multi_tie_region_size_; i++)
     {
-      Drul_array<Tie_configuration*> configs (0, 0);
+      Drul_array<Tie_configuration *> configs (0, 0);
       do
-       {
-         const Tie_configuration &config = boundary (ties, d, 0);
-         if (config.dir_ == d
-             && !boundary (specifications_, d, 0).has_manual_position_)
-           {
-             Tie_configuration_variation var;
-             configs[d] =  get_configuration (config.position_ + d * i, d,
-                                              config.column_ranks_,
-                                              true);
-             var.add_suggestion((d == DOWN) ? 0 : ties.size () - 1,
-                                configs[d]);
-             vars.push_back (var);
-           }
-       }
-      while (flip (&d) !=  DOWN);
+        {
+          const Tie_configuration &config = boundary (ties, d, 0);
+          if (config.dir_ == d
+              && !boundary (specifications_, d, 0).has_manual_position_)
+            {
+              Tie_configuration_variation var;
+              configs[d] = get_configuration (config.position_ + d * i, d,
+                                              config.column_ranks_,
+                                              true);
+              var.add_suggestion ((d == DOWN) ? 0 : ties.size () - 1,
+                                  configs[d]);
+              vars.push_back (var);
+            }
+        }
+      while (flip (&d) != DOWN);
       if (configs[LEFT] && configs[RIGHT])
-       {
-         Tie_configuration_variation var;
-         var.add_suggestion(0, configs[DOWN]);
-         var.add_suggestion(ties.size() - 1, configs[UP]);
-         vars.push_back (var);
-       }
+        {
+          Tie_configuration_variation var;
+          var.add_suggestion (0, configs[DOWN]);
+          var.add_suggestion (ties.size () - 1, configs[UP]);
+          vars.push_back (var);
+        }
     }
 
   return vars;
@@ -1082,122 +1072,120 @@ Tie_formatting_problem::generate_single_tie_variations (Ties_configuration const
   int sz = details_.single_tie_region_size_;
   if (specifications_[0].has_manual_position_)
     sz = 1;
-  for (int i = 0; i < sz; i ++)
+  for (int i = 0; i < sz; i++)
     {
       Direction d = LEFT;
       do
-       {
-         if (i == 0
-             && ties[0].dir_ == d)
-           continue;
-         
-         int p = ties[0].position_ + i * d;
-         
-         if (!specifications_[0].has_manual_dir_
-             || d == specifications_[0].manual_dir_)
-           {
-             Tie_configuration_variation var;
-             var.add_suggestion(0,
-                                get_configuration (p,
-                                                   d, specifications_[0].column_ranks_,
-                                                   !specifications_[0].has_manual_delta_y_));
-             vars.push_back (var);
-           }
-       }
+        {
+          if (i == 0
+              && ties[0].dir_ == d)
+            continue;
+
+          int p = ties[0].position_ + i * d;
+
+          if (!specifications_[0].has_manual_dir_
+              || d == specifications_[0].manual_dir_)
+            {
+              Tie_configuration_variation var;
+              var.add_suggestion (0,
+                                  get_configuration (p,
+                                                     d, specifications_[0].column_ranks_,
+                                                     !specifications_[0].has_manual_delta_y_));
+              vars.push_back (var);
+            }
+        }
       while (flip (&d) != LEFT);
     }
   return vars;
 }
 
-
 vector<Tie_configuration_variation>
 Tie_formatting_problem::generate_collision_variations (Ties_configuration const &ties) const
 {
   Real center_distance_tolerance = 0.25;
-  
+
   vector<Tie_configuration_variation> vars;
   Real last_center = 0.0;
   for (vsize i = 0; i < ties.size (); i++)
     {
       Bezier b (ties[i].get_transformed_bezier (details_));
-       
+
       Real center = b.curve_point (0.5)[Y_AXIS];
-      
+
       if (i)
-       {
-         if (center <= last_center + center_distance_tolerance)
-           {
-             if (!specifications_[i].has_manual_dir_)
-               {
-                 Tie_configuration_variation var;
-                 var.add_suggestion(i,
-                                    get_configuration (specifications_[i].position_
-                                                      - ties[i].dir_,
-                                                      - ties[i].dir_,
-
-                                                      ties[i].column_ranks_,
-                                                      !specifications_[i].has_manual_delta_y_
-                                                       ));
-
-                 vars.push_back (var);
-               }
-
-             if (!specifications_[i-1].has_manual_dir_)
-               {
-                 Tie_configuration_variation var;
-                 var.add_suggestion(i-1,
-                                    get_configuration (specifications_[i-1].position_
-                                                       - ties[i-1].dir_,
-                                                       - ties[i-1].dir_,
-                                                       specifications_[i-1].column_ranks_,
-                                                       !specifications_[i-1].has_manual_delta_y_));
-
-                 vars.push_back (var);
-               }
-
-             if (i == 1 && !specifications_[i-1].has_manual_position_
-                 && ties[i-1].dir_ == DOWN)
-               {
-                 Tie_configuration_variation var;
-                 var.add_suggestion(i-1,
-                                    get_configuration (specifications_[i-1].position_ - 1, DOWN,
-                                                       specifications_[i-1].column_ranks_,
-                                                       !specifications_[i-1].has_manual_delta_y_
-                                                       ));
-                 vars.push_back (var);
-               }
-             if (i == ties.size () && !specifications_[i].has_manual_position_
-                 && ties[i].dir_ == UP)
-               {
-                 Tie_configuration_variation var;
-                 var.add_suggestion(i,
-                                    get_configuration (specifications_[i].position_
-                                                       + 1, UP,
-                                                       specifications_[i].column_ranks_,
-                                                       !specifications_[i].has_manual_delta_y_
-                                                       ));
-                 vars.push_back (var);
-               }
-           }
-         else if (dot_positions_.find (ties[i].position_) != dot_positions_.end ()
-                  && !specifications_[i].has_manual_position_)
-           {
-             Tie_configuration_variation var;
-             var.add_suggestion(i,
-                                get_configuration (ties[i].position_  + ties[i].dir_,
-                                                   ties[i].dir_,
-                                                   ties[i].column_ranks_,
-                                                   !specifications_[i].has_manual_delta_y_
-                                                   ));
-             vars.push_back (var);
-           }
-         
-       }
+        {
+          if (center <= last_center + center_distance_tolerance)
+            {
+              if (!specifications_[i].has_manual_dir_)
+                {
+                  Tie_configuration_variation var;
+                  var.add_suggestion (i,
+                                      get_configuration (specifications_[i].position_
+                                                         - ties[i].dir_,
+                                                         - ties[i].dir_,
+
+                                                         ties[i].column_ranks_,
+                                                         !specifications_[i].has_manual_delta_y_
+                                                        ));
+
+                  vars.push_back (var);
+                }
+
+              if (!specifications_[i - 1].has_manual_dir_)
+                {
+                  Tie_configuration_variation var;
+                  var.add_suggestion (i - 1,
+                                      get_configuration (specifications_[i - 1].position_
+                                                         - ties[i - 1].dir_,
+                                                         - ties[i - 1].dir_,
+                                                         specifications_[i - 1].column_ranks_,
+                                                         !specifications_[i - 1].has_manual_delta_y_));
+
+                  vars.push_back (var);
+                }
+
+              if (i == 1 && !specifications_[i - 1].has_manual_position_
+                  && ties[i - 1].dir_ == DOWN)
+                {
+                  Tie_configuration_variation var;
+                  var.add_suggestion (i - 1,
+                                      get_configuration (specifications_[i - 1].position_ - 1, DOWN,
+                                                         specifications_[i - 1].column_ranks_,
+                                                         !specifications_[i - 1].has_manual_delta_y_
+                                                        ));
+                  vars.push_back (var);
+                }
+              if (i == ties.size () && !specifications_[i].has_manual_position_
+                  && ties[i].dir_ == UP)
+                {
+                  Tie_configuration_variation var;
+                  var.add_suggestion (i,
+                                      get_configuration (specifications_[i].position_
+                                                         + 1, UP,
+                                                         specifications_[i].column_ranks_,
+                                                         !specifications_[i].has_manual_delta_y_
+                                                        ));
+                  vars.push_back (var);
+                }
+            }
+          else if (dot_positions_.find (ties[i].position_) != dot_positions_.end ()
+                   && !specifications_[i].has_manual_position_)
+            {
+              Tie_configuration_variation var;
+              var.add_suggestion (i,
+                                  get_configuration (ties[i].position_ + ties[i].dir_,
+                                                     ties[i].dir_,
+                                                     ties[i].column_ranks_,
+                                                     !specifications_[i].has_manual_delta_y_
+                                                    ));
+              vars.push_back (var);
+            }
+
+        }
 
       last_center = center;
     }
 
-
   return vars;
 }
 
@@ -1210,40 +1198,39 @@ Tie_formatting_problem::set_manual_tie_configuration (SCM manual_configs)
     {
       SCM entry = scm_car (s);
       if (scm_is_pair (entry))
-       {
-         Tie_specification &spec = specifications_[k];
-
-         if (scm_is_number (scm_car (entry)))
-           {
-             spec.has_manual_position_ = true;
-             spec.manual_position_ = scm_to_double (scm_car (entry));
-             spec.has_manual_delta_y_ = (scm_inexact_p (scm_car (entry)) == SCM_BOOL_T);
-           }
-         
-         if (scm_is_number (scm_cdr (entry)))
-           {
-             spec.has_manual_dir_ = true;
-             spec.manual_dir_ = Direction (scm_to_int (scm_cdr (entry)));
-           }
-       }         
-      k ++;
+        {
+          Tie_specification &spec = specifications_[k];
+
+          if (scm_is_number (scm_car (entry)))
+            {
+              spec.has_manual_position_ = true;
+              spec.manual_position_ = scm_to_double (scm_car (entry));
+              spec.has_manual_delta_y_ = (scm_inexact_p (scm_car (entry)) == SCM_BOOL_T);
+            }
+
+          if (scm_is_number (scm_cdr (entry)))
+            {
+              spec.has_manual_dir_ = true;
+              spec.manual_dir_ = Direction (scm_to_int (scm_cdr (entry)));
+            }
+        }
+      k++;
     }
 }
 
-
 void
 Tie_formatting_problem::set_debug_scoring (Ties_configuration const &base)
 {
 #if DEBUG_TIE_SCORING
   if (to_boolean (x_refpoint_->layout ()
-                 ->lookup_variable (ly_symbol2scm ("debug-tie-scoring"))))
+                  ->lookup_variable (ly_symbol2scm ("debug-tie-scoring"))))
     {
       for (vsize i = 0; i < base.size (); i++)
-       {
-         string card = base.complete_tie_card (i);
-         specifications_[i].tie_grob_->set_property ("annotation",
-                                                     ly_string2scm (card));
-       }
+        {
+          string card = base.complete_tie_card (i);
+          specifications_[i].tie_grob_->set_property ("annotation",
+                                                      ly_string2scm (card));
+        }
     }
 #endif
-}      
+}
index 5d237c1de3de1e3c345613518c840c6df6ede6d2..c53ddeac7b359a24e26656f150c5237f3e3c3410 100644 (file)
@@ -39,7 +39,6 @@ struct Head_audio_event_tuple
   }
 };
 
-
 class Tie_performer : public Performer
 {
   Stream_event *event_;
@@ -90,31 +89,31 @@ Tie_performer::acknowledge_audio_element (Audio_element_info inf)
       else
         now_heads_.push_back (inf_mom);
 
-      // Find a previous note that ties to the current note. If it exists, 
+      // Find a previous note that ties to the current note. If it exists,
       // remove it from the heads_to_tie vector and create the tie
       list<Head_audio_event_tuple>::iterator it;
       bool found = false;
       Stream_event *right_mus = inf.event_;
-        for (it = heads_to_tie_.begin ();
-             !found && (it != heads_to_tie_.end());
-             it++)
-       {
-         Audio_element_info et = (*it).head_;
-         Audio_note *th = dynamic_cast<Audio_note *> (et.elem_);
-         Stream_event *left_mus = et.event_;
-
-         if (th && right_mus && left_mus
-             && ly_is_equal (right_mus->get_property ("pitch"),
-                             left_mus->get_property ("pitch")))
-           {
-             found = true;
-             // (*it).moment_ already stores the end of the tied note!
-             Moment skip = now_mom() - (*it).end_moment_;
-             an->tie_to (th, skip);
-             // this invalidates the iterator, we are leaving the loop anyway
-             heads_to_tie_.erase (it);
-           }
-       }
+      for (it = heads_to_tie_.begin ();
+           !found && (it != heads_to_tie_.end ());
+           it++)
+        {
+          Audio_element_info et = (*it).head_;
+          Audio_note *th = dynamic_cast<Audio_note *> (et.elem_);
+          Stream_event *left_mus = et.event_;
+
+          if (th && right_mus && left_mus
+              && ly_is_equal (right_mus->get_property ("pitch"),
+                              left_mus->get_property ("pitch")))
+            {
+              found = true;
+              // (*it).moment_ already stores the end of the tied note!
+              Moment skip = now_mom () - (*it).end_moment_;
+              an->tie_to (th, skip);
+              // this invalidates the iterator, we are leaving the loop anyway
+              heads_to_tie_.erase (it);
+            }
+        }
     }
 }
 
@@ -122,7 +121,7 @@ void
 Tie_performer::start_translation_timestep ()
 {
   context ()->set_property ("tieMelismaBusy",
-                           ly_bool2scm (heads_to_tie_.size ()));
+                            ly_bool2scm (heads_to_tie_.size ()));
 }
 
 // a predicate implemented as a class, used to delete all tied notes with end
@@ -133,7 +132,8 @@ protected:
   Moment now;
 public:
   end_moment_passed (Moment mom) : now (mom) {}
-  bool operator() (const Head_audio_event_tuple &value) {
+  bool operator () (const Head_audio_event_tuple &value)
+  {
     return (value.end_moment_ <= now);
   }
 };
@@ -161,15 +161,15 @@ Tie_performer::stop_translation_timestep ()
 }
 
 ADD_TRANSLATOR (Tie_performer,
-               /* doc */
-               "Generate ties between note heads of equal pitch.",
+                /* doc */
+                "Generate ties between note heads of equal pitch.",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "tieWaitForNote",
+                /* read */
+                "tieWaitForNote",
 
-               /* write */
-               "tieMelismaBusy"
-               );
+                /* write */
+                "tieMelismaBusy"
+               );
index 3a7ce345cb425ec45d8fc5a326b3f6366d3e6525..0413495713a8d3637db91da615aa9a855392ab65 100644 (file)
@@ -13,13 +13,12 @@ Tie_specification::Tie_specification ()
   position_ = 0;
   manual_position_ = 0;
   manual_dir_ = CENTER;
-  note_head_drul_[LEFT] =
-    note_head_drul_[RIGHT] = 0;
-  column_ranks_[RIGHT] =
-    column_ranks_[LEFT] = 0;
+  note_head_drul_[LEFT]
+    note_head_drul_[RIGHT] = 0;
+  column_ranks_[RIGHT]
+    column_ranks_[LEFT] = 0;
 }
 
-
 void
 Tie_specification::from_grob (Grob *tie)
 {
@@ -29,7 +28,7 @@ Tie_specification::from_grob (Grob *tie)
       manual_dir_ = to_dir (tie->get_property ("direction"));
       has_manual_dir_ = true;
     }
-  
+
   position_ = Tie::get_position (tie);
   SCM pos_scm = tie->get_property ("staff-position");
   if (scm_is_number (pos_scm))
index e8b21d8544bad329473b39445c5e80dadb973cf5..b52f84db0f7b391a7aaf1f4524b7010f2f3305db 100644 (file)
@@ -60,8 +60,8 @@ Tie::head (Grob *me, Direction d)
       Direction hd = to_dir (me->get_property ("head-direction"));
 
       return (hd == d)
-       ? unsmob_grob (me->get_object ("note-head"))
-       : 0;
+             ? unsmob_grob (me->get_object ("note-head"))
+             : 0;
     }
 
   Item *it = dynamic_cast<Spanner *> (me)->get_bound (d);
@@ -97,7 +97,7 @@ Tie::get_position (Grob *me)
     {
       Grob *h = head (me, d);
       if (h)
-       return (int) rint (Staff_symbol_referencer::get_position (h));
+        return (int) rint (Staff_symbol_referencer::get_position (h));
     }
   while (flip (&d) != LEFT);
 
@@ -130,11 +130,11 @@ Tie::get_default_dir (Grob *me)
     {
       Grob *one_head = head (me, d);
       if (!one_head && dynamic_cast<Spanner *> (me))
-       one_head = Tie::head (dynamic_cast<Spanner *> (me)->broken_neighbor (d), d);
+        one_head = Tie::head (dynamic_cast<Spanner *> (me)->broken_neighbor (d), d);
 
       Grob *stem = one_head ? Rhythmic_head::get_stem (one_head) : 0;
       if (stem)
-       stem = Stem::is_invisible (stem) ? 0 : stem;
+        stem = Stem::is_invisible (stem) ? 0 : stem;
 
       stems[d] = stem;
     }
@@ -143,8 +143,8 @@ Tie::get_default_dir (Grob *me)
   if (stems[LEFT] && stems[RIGHT])
     {
       if (get_grob_direction (stems[LEFT]) == UP
-         && get_grob_direction (stems[RIGHT]) == UP)
-       return DOWN;
+          && get_grob_direction (stems[RIGHT]) == UP)
+        return DOWN;
     }
   else if (stems[LEFT] || stems[RIGHT])
     {
@@ -167,7 +167,7 @@ Tie::calc_direction (SCM smob)
        || Semi_tie_column::has_interface (yparent))
       && unsmob_grob_array (yparent->get_object ("ties"))
       //      && unsmob_grob_array (yparent->get_object ("ties"))->size () > 1
-      )
+     )
     {
       /* trigger positioning. */
       (void) yparent->get_property ("positioning-done");
@@ -197,14 +197,14 @@ Tie::get_default_control_points (Grob *me_grob)
     = problem.generate_optimal_configuration ();
 
   return get_control_points (me, problem.common_x_refpoint (),
-                            conf[0], problem.details_);
+                             conf[0], problem.details_);
 }
 
 SCM
 Tie::get_control_points (Grob *me,
-                        Grob *common,
-                        Tie_configuration const &conf,
-                        Tie_details const &details)
+                         Grob *common,
+                         Tie_configuration const &conf,
+                         Tie_details const &details)
 {
   Bezier b = conf.get_transformed_bezier (details);
   b.translate (Offset (- me->relative_coordinate (common, X_AXIS), 0));
@@ -213,7 +213,7 @@ Tie::get_control_points (Grob *me,
   for (int i = 4; i--;)
     {
       if (!b.control_[i].is_sane ())
-       programming_error ("Insane offset");
+        programming_error ("Insane offset");
       controls = scm_cons (ly_offset2scm (b.control_[i]), controls);
     }
   return controls;
@@ -232,11 +232,11 @@ Tie::calc_control_points (SCM smob)
     {
       extract_grob_set (yparent, "ties", ties);
       if (me->original () && ties.size () == 1
-         && !to_dir (me->get_property_data ("direction")))
-       {
-         assert (ties[0] == me);
-         set_grob_direction (me, Tie::get_default_dir (me));
-       }
+          && !to_dir (me->get_property_data ("direction")))
+        {
+          assert (ties[0] == me);
+          set_grob_direction (me, Tie::get_default_dir (me));
+        }
       /* trigger positioning. */
       (void) yparent->get_property ("positioning-done");
     }
@@ -275,9 +275,9 @@ Tie::print (SCM smob)
 
   SCM dash_definition = me->get_property ("dash-definition");
   a = Lookup::slur (b,
-                   get_grob_direction (me) * base_thick,
-                   line_thick,
-                   dash_definition);
+                    get_grob_direction (me) * base_thick,
+                    line_thick,
+                    dash_definition);
 
 #if DEBUG_TIE_SCORING
   SCM annotation = me->get_property ("annotation");
@@ -287,15 +287,15 @@ Tie::print (SCM smob)
       SCM properties = Font_interface::text_font_alist_chain (me);
 
       Stencil tm = *unsmob_stencil (Text_interface::interpret_markup
-                                   (me->layout ()->self_scm (), properties,
-                                    annotation));
+                                    (me->layout ()->self_scm (), properties,
+                                     annotation));
       tm.translate (Offset (b.control_[3][X_AXIS] + 0.5,
-                           b.control_[0][Y_AXIS] * 2));
+                            b.control_[0][Y_AXIS] * 2));
       tm = tm.in_color (1, 0, 0);
 
       /*
-       It would be nice if we could put this in a different layer,
-       but alas, this must be done with a Tie override.
+        It would be nice if we could put this in a different layer,
+        but alas, this must be done with a Tie override.
       */
       a.add_stencil (tm);
     }
@@ -305,18 +305,18 @@ Tie::print (SCM smob)
 }
 
 ADD_INTERFACE (Tie,
-              "A horizontal curve connecting two noteheads.",
-
-              /* properties */
-              "annotation "
-              "avoid-slur "    //  UGH.
-              "control-points "
-              "dash-definition "
-              "details "
-              "direction "
-              "head-direction "
-              "line-thickness "
-              "neutral-direction "
-              "staff-position "
-              "thickness "
-              );
+               "A horizontal curve connecting two noteheads.",
+
+               /* properties */
+               "annotation "
+               "avoid-slur "    //  UGH.
+               "control-points "
+               "dash-definition "
+               "details "
+               "direction "
+               "head-direction "
+               "line-thickness "
+               "neutral-direction "
+               "staff-position "
+               "thickness "
+              );
index d0621dd883c1f3d1c2e96840edeee612da267aac..60724a66fd612fcb05b2856191ef26785a19f97b 100644 (file)
@@ -66,24 +66,24 @@ Time_signature_engraver::process_music ()
     {
       int den = scm_to_int (scm_cdr (fr));
       if (den != (1 << intlog2 (den)))
-       {
-         /*
-           Todo: should make typecheck?
+        {
+          /*
+            Todo: should make typecheck?
 
-           OTOH, Tristan Keuris writes 8/20 in his Intermezzi.
-         */
-         warning (_f ("strange time signature found: %d/%d",
-                      int (scm_to_int (scm_car (fr))),
-                      den));
-       }
+            OTOH, Tristan Keuris writes 8/20 in his Intermezzi.
+          */
+          warning (_f ("strange time signature found: %d/%d",
+                       int (scm_to_int (scm_car (fr))),
+                       den));
+        }
 
       time_signature_ = make_item ("TimeSignature", SCM_EOL);
       time_signature_->set_property ("fraction", fr);
 
       if (last_time_fraction_ == SCM_BOOL_F)
-       time_signature_->set_property ("break-visibility",
-                                      get_property ("implicitTimeSignatureVisibility"));
-      
+        time_signature_->set_property ("break-visibility",
+                                       get_property ("implicitTimeSignatureVisibility"));
+
       last_time_fraction_ = fr;
     }
 }
@@ -97,17 +97,17 @@ Time_signature_engraver::stop_translation_timestep ()
 #include "translator.icc"
 
 ADD_TRANSLATOR (Time_signature_engraver,
-               /* doc */
-               "Create a @ref{TimeSignature} whenever"
-               " @code{timeSignatureFraction} changes.",
-
-               /* create */
-               "TimeSignature ",
-               
-               /* read */
-               "implicitTimeSignatureVisibility "
-               "timeSignatureFraction ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Create a @ref{TimeSignature} whenever"
+                " @code{timeSignatureFraction} changes.",
+
+                /* create */
+                "TimeSignature ",
+
+                /* read */
+                "implicitTimeSignatureVisibility "
+                "timeSignatureFraction ",
+
+                /* write */
+                ""
+               );
index 54d4514231ab810360036589ddbe7158f50faede..3469737317bccb06a2a7ef464fae53f39210535a 100644 (file)
@@ -82,15 +82,15 @@ Time_signature_performer::stop_translation_timestep ()
 #include "translator.icc"
 
 ADD_TRANSLATOR (Time_signature_performer,
-               /* doc */
-               "",
+                /* doc */
+                "",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index a1f8a38144fb6f9bd94b05a5476a1c690f907d3e..0b22eff640aa0406580a2a16999b320c2dede184 100644 (file)
@@ -77,22 +77,22 @@ Time_signature::special_time_signature (Grob *me, SCM scm_style, int n, int d)
   if (style == "C")
     {
       if /* neither C2/2 nor C4/4 */
-       (((n != 2) || (d != 2))
-        && ((n != 4) || (d != 4)))
-       return numbered_time_signature (me, n, d);
+      (((n != 2) || (d != 2))
+          && ((n != 4) || (d != 4)))
+        return numbered_time_signature (me, n, d);
     }
 
   string char_name = style + to_string (n) + to_string (d);
   me->set_property ("font-encoding", ly_symbol2scm ("fetaMusic"));
   Stencil out = Font_interface::get_default_font (me)
-    ->find_by_name ("timesig." + char_name);
+                ->find_by_name ("timesig." + char_name);
   if (!out.is_empty ())
     return out;
 
   /* If there is no such symbol, we default to the numbered style.
      (Here really with a warning!) */
   me->warning (_f ("time signature symbol `%s' not found; "
-                  "reverting to numbered style", char_name));
+                   "reverting to numbered style", char_name));
   return numbered_time_signature (me, n, d);
 }
 
@@ -101,13 +101,13 @@ Time_signature::numbered_time_signature (Grob *me, int num, int den)
 {
   SCM chain = me->get_property_alist_chain (Font_interface::text_font_alist_chain (me));
   chain = scm_cons (scm_list_1 (scm_cons (ly_symbol2scm ("font-encoding"),
-                                         ly_symbol2scm ("fetaText"))),
-                   chain);
+                                          ly_symbol2scm ("fetaText"))),
+                    chain);
 
   SCM sn = Text_interface::interpret_markup (me->layout ()->self_scm (), chain,
-                                            ly_string2scm (to_string (num)));
+                                             ly_string2scm (to_string (num)));
   SCM sd = Text_interface::interpret_markup (me->layout ()->self_scm (), chain,
-                                            ly_string2scm (to_string (den)));
+                                             ly_string2scm (to_string (den)));
 
   Stencil n = *unsmob_stencil (sn);
   Stencil d = *unsmob_stencil (sd);
@@ -132,30 +132,30 @@ Time_signature::numbered_time_signature (Grob *me, int num, int den)
 }
 
 ADD_INTERFACE (Time_signature,
-              "A time signature, in different styles.  The following values"
-              " for @code{style} are are recognized:\n"
-              "\n"
-              "@table @code\n"
-              "@item C\n"
-              "4/4 and 2/2 are typeset as C and struck C, respectively."
-              "  All other time signatures are written with two digits."
-              "  The value @code{default} is equivalent to @code{C}.\n"
-              "@item neomensural\n"
-              "2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8, and 9/8 are"
-              " typeset with neo-mensural style mensuration marks.  All"
-              " other time signatures are written with two digits.\n"
-              "@item mensural\n"
-              "2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8, and 9/8 are"
-              " typeset with mensural style mensuration marks.  All other"
-              " time signatures are written with two digits.\n"
-              "@item single-digit\n"
-              "All time signatures are typeset with a single digit, e.g.,"
-              " 3/2 is written as 3.\n"
-              "@item numbered\n"
-              "All time signatures are typeset with two digits.\n"
-              "@end table",
-
-              /* properties */
-              "fraction "
-              "style "
-              );
+               "A time signature, in different styles.  The following values"
+               " for @code{style} are are recognized:\n"
+               "\n"
+               "@table @code\n"
+               "@item C\n"
+               "4/4 and 2/2 are typeset as C and struck C, respectively."
+               "  All other time signatures are written with two digits."
+               "  The value @code{default} is equivalent to @code{C}.\n"
+               "@item neomensural\n"
+               "2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8, and 9/8 are"
+               " typeset with neo-mensural style mensuration marks.  All"
+               " other time signatures are written with two digits.\n"
+               "@item mensural\n"
+               "2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8, and 9/8 are"
+               " typeset with mensural style mensuration marks.  All other"
+               " time signatures are written with two digits.\n"
+               "@item single-digit\n"
+               "All time signatures are typeset with a single digit, e.g.,"
+               " 3/2 is written as 3.\n"
+               "@item numbered\n"
+               "All time signatures are typeset with two digits.\n"
+               "@end table",
+
+               /* properties */
+               "fraction "
+               "style "
+              );
index d5d069270bbed0b55d1b3b06eb719647315c9323..f4485f11a79f698a06d881c490d53a24d8e7a6d9 100644 (file)
@@ -35,11 +35,11 @@ Timing_translator::stop_translation_timestep ()
       Moment now = now_mom ();
 
       if (barleft > Moment (0))
-       {
-         Moment nextmom = now + barleft;
-         nextmom.grace_part_ = Rational (0);
-         global->add_moment_to_process (nextmom);
-       }
+        {
+          Moment nextmom = now + barleft;
+          nextmom.grace_part_ = Rational (0);
+          global->add_moment_to_process (nextmom);
+        }
     }
 }
 
@@ -51,15 +51,15 @@ Timing_translator::initialize ()
   context ()->set_property ("internalBarNumber", scm_from_int (1));
 
   context ()->set_property ("timeSignatureFraction",
-                           scm_cons (scm_from_int (4), scm_from_int (4)));
+                            scm_cons (scm_from_int (4), scm_from_int (4)));
   /*
     Do not init measurePosition; this should be done from global
     context.
   */
   context ()->set_property ("measureLength",
-                           Moment (Rational (1)).smobbed_copy ());
+                            Moment (Rational (1)).smobbed_copy ());
   context ()->set_property ("baseMoment",
-                           Moment (Rational (1, 4)).smobbed_copy ());
+                            Moment (Rational (1, 4)).smobbed_copy ());
 }
 
 Rational
@@ -106,7 +106,7 @@ Timing_translator::start_translation_timestep ()
     {
       measposp = now;
       context ()->set_property ("measurePosition",
-                               measposp.smobbed_copy ());
+                                measposp.smobbed_copy ());
     }
 
   measposp += dt;
@@ -121,8 +121,8 @@ Timing_translator::start_translation_timestep ()
   while (c && measposp.main_part_ >= len)
     {
       measposp.main_part_ -= len;
-      current_barnumber ++;
-      internal_barnumber ++;
+      current_barnumber++;
+      internal_barnumber++;
     }
 
   context ()->set_property ("currentBarNumber", scm_from_int (current_barnumber));
@@ -133,27 +133,27 @@ Timing_translator::start_translation_timestep ()
 #include "translator.icc"
 
 ADD_TRANSLATOR (Timing_translator,
-               /* doc */
-               "This engraver adds the alias @code{Timing} to its containing"
-               " context.  Responsible for synchronizing timing information"
-               " from staves.  Normally in @code{Score}.  In order to create"
-               " polyrhythmic music, this engraver should be removed from"
-               " @code{Score} and placed in @code{Staff}.",
-
-               /* create */
-               "",
-
-               /* read */
-               "internalBarNumber "
-               "currentBarNumber "
-               "measureLength "
-               "measurePosition ",
-
-               /* write */
-               "baseMoment "
-               "currentBarNumber "
-               "internalBarNumber "
-               "measureLength "
-               "measurePosition "
-               "timeSignatureFraction "
-               );
+                /* doc */
+                "This engraver adds the alias @code{Timing} to its containing"
+                " context.  Responsible for synchronizing timing information"
+                " from staves.  Normally in @code{Score}.  In order to create"
+                " polyrhythmic music, this engraver should be removed from"
+                " @code{Score} and placed in @code{Staff}.",
+
+                /* create */
+                "",
+
+                /* read */
+                "internalBarNumber "
+                "currentBarNumber "
+                "measureLength "
+                "measurePosition ",
+
+                /* write */
+                "baseMoment "
+                "currentBarNumber "
+                "internalBarNumber "
+                "measureLength "
+                "measurePosition "
+                "timeSignatureFraction "
+               );
index b190a927c7a0506963ce52a8e5e92bd4dbe3d0f8..8004166e515d0a00f464f7a9107c98caf13c23d3 100644 (file)
@@ -30,8 +30,8 @@
 Scheme_hash_table *global_translator_dict = 0;
 
 LY_DEFINE (get_all_translators, "ly:get-all-translators", 0, 0, 0, (),
-          "Return a list of all translator objects that may be"
-          " instantiated.")
+           "Return a list of all translator objects that may be"
+           " instantiated.")
 {
   SCM l = global_translator_dict ? global_translator_dict->to_alist () : SCM_EOL;
 
index aae00e4e1cd2f948edb47ace56a684257f0d3a89..1c5c94d667a74f27fa4d9554227de033f95d9944 100644 (file)
@@ -30,7 +30,7 @@ Engraver_dispatch_list::apply (Grob_info gi)
     {
       Engraver_dispatch_entry const &e (dispatch_entries_[i]);
       if (e.engraver_ == origin)
-       continue;
+        continue;
 
       (*e.function_) (e.engraver_, gi);
     }
@@ -38,7 +38,7 @@ Engraver_dispatch_list::apply (Grob_info gi)
 
 SCM
 Engraver_dispatch_list::create (SCM trans_list,
-                               SCM iface_list, Direction start_end)
+                                SCM iface_list, Direction start_end)
 {
   SCM retval = Engraver_dispatch_list ().smobbed_copy ();
   Engraver_dispatch_list *list = Engraver_dispatch_list::unsmob (retval);
@@ -48,26 +48,26 @@ Engraver_dispatch_list::create (SCM trans_list,
   for (SCM s = trans_list; scm_is_pair (s); s = scm_cdr (s))
     {
       Engraver *eng
-       = dynamic_cast<Engraver *> (unsmob_translator (scm_car (s)));
+        = dynamic_cast<Engraver *> (unsmob_translator (scm_car (s)));
 
       if (!eng)
-       continue;
+        continue;
 
       entry.engraver_ = eng;
       for (SCM i = iface_list; scm_is_pair (i); i = scm_cdr (i))
-       {
-         Engraver_void_function_engraver_grob_info ptr
-           = (start_end == START)
-           ? eng->get_acknowledger (scm_car (i))
-           : eng->get_end_acknowledger (scm_car (i));
-         
-         if (ptr)
-           {
-             entry.function_ = ptr;
-             list->dispatch_entries_.push_back (entry);
-             found = true;
-           }
-       }
+        {
+          Engraver_void_function_engraver_grob_info ptr
+            = (start_end == START)
+              ? eng->get_acknowledger (scm_car (i))
+              : eng->get_end_acknowledger (scm_car (i));
+
+          if (ptr)
+            {
+              entry.function_ = ptr;
+              list->dispatch_entries_.push_back (entry);
+              found = true;
+            }
+        }
     }
 
   return found ? retval : SCM_EOL;
@@ -81,8 +81,8 @@ Engraver_dispatch_list::mark_smob (SCM)
 
 int
 Engraver_dispatch_list::print_smob (SCM /* x */,
-                                   SCM p,
-                                   scm_print_state *)
+                                    SCM p,
+                                    scm_print_state *)
 {
   scm_puts ("#<Engraver_dispatch_list>", p);
   return 1;
index 5bde18c6b98119804f460f2c006a3c78ee15494d..42d587dae121117b12564813aa6c3c985b8777d2 100644 (file)
@@ -38,12 +38,12 @@ get_translator_group (SCM sym)
     return new Score_performer ();
 
   error (_f ("fatal error. Couldn't find type: %s",
-            ly_symbol2string (sym).c_str ()));
+             ly_symbol2string (sym).c_str ()));
   scm_flush (scm_current_error_port ());
   scm_display (sym, scm_current_error_port ());
   scm_flush (scm_current_error_port ());
-  
+
   exit (2);
-  
+
   return 0;
 }
index 487037a2dc4e7ab815420daf353e5ba2e05624a4..b91faa5e3e7b6d7a6af1985b59bdf15cdd3ed6a3 100644 (file)
@@ -54,12 +54,12 @@ Translator_group::connect_to_context (Context *c)
   if (context_)
     {
       programming_error ("translator group is already connected to context "
-                        + context_->context_name ());
+                         + context_->context_name ());
     }
-  
+
   context_ = c;
   c->event_source ()->add_listener (GET_LISTENER (create_child_translator),
-                                   ly_symbol2scm ("AnnounceNewContext"));
+                                    ly_symbol2scm ("AnnounceNewContext"));
   for (SCM tr_list = simple_trans_list_; scm_is_pair (tr_list); tr_list = scm_cdr (tr_list))
     {
       Translator *tr = unsmob_translator (scm_car (tr_list));
@@ -76,7 +76,7 @@ Translator_group::disconnect_from_context ()
       tr->disconnect_from_context (context_);
     }
   context_->event_source ()->remove_listener (GET_LISTENER (create_child_translator),
-                                             ly_symbol2scm ("AnnounceNewContext"));
+                                              ly_symbol2scm ("AnnounceNewContext"));
   context_ = 0;
   protected_events_ = SCM_EOL;
 }
@@ -102,9 +102,9 @@ filter_performers (SCM ell)
   for (SCM p = ell; scm_is_pair (p); p = scm_cdr (p))
     {
       if (unsmob_performer (scm_car (*tail)))
-       *tail = scm_cdr (*tail);
+        *tail = scm_cdr (*tail);
       else
-       tail = SCM_CDRLOC (*tail);
+        tail = SCM_CDRLOC (*tail);
     }
   return ell;
 }
@@ -116,14 +116,14 @@ filter_engravers (SCM ell)
   for (SCM p = ell; scm_is_pair (p); p = scm_cdr (p))
     {
       if (unsmob_engraver (scm_car (*tail)))
-       *tail = scm_cdr (*tail);
+        *tail = scm_cdr (*tail);
       else
-       tail = SCM_CDRLOC (*tail);
+        tail = SCM_CDRLOC (*tail);
     }
   return ell;
 }
 
-/* 
+/*
   Protects the parameter from being garbage collected. The object is
   protected until the next disconnect_from_context call.
 
@@ -131,7 +131,7 @@ filter_engravers (SCM ell)
   this list. This eliminates the need for derived_mark methods in most
   translators; all incoming events are instead protected by the
   translator group.
+
   TODO: Should the list also be flushed at the beginning of each new
   moment?
  */
@@ -155,7 +155,7 @@ Translator_group::create_child_translator (SCM sev)
   Context *new_context = unsmob_context (cs);
   Context_def *def = unsmob_context_def (new_context->get_definition ());
   SCM ops = new_context->get_definition_mods ();
-  
+
   SCM trans_names = def->get_translator_names (ops);
 
   Translator_group *g = get_translator_group (def->get_translator_group_type ());
@@ -168,46 +168,46 @@ Translator_group::create_child_translator (SCM sev)
 
       Translator *type = 0;
       if (ly_is_symbol (definition))
-       type = get_translator (definition);
+        type = get_translator (definition);
       else if (ly_is_pair (definition))
-       {
-         type = get_translator (ly_symbol2scm ("Scheme_engraver"));
-         is_scheme = true;
-       }
+        {
+          type = get_translator (ly_symbol2scm ("Scheme_engraver"));
+          is_scheme = true;
+        }
       else if (ly_is_procedure (definition))
-       {
-         // `definition' is a procedure, which takes the context as
-         // an argument and evaluates to an a-list scheme engraver
-         // definition.
-         definition = scm_call_1 (definition, cs);
-         type = get_translator (ly_symbol2scm ("Scheme_engraver"));
-         is_scheme = true;
-       }
-        
+        {
+          // `definition' is a procedure, which takes the context as
+          // an argument and evaluates to an a-list scheme engraver
+          // definition.
+          definition = scm_call_1 (definition, cs);
+          type = get_translator (ly_symbol2scm ("Scheme_engraver"));
+          is_scheme = true;
+        }
+
       if (!type)
-       warning (_f ("cannot find: `%s'", ly_symbol2string (scm_car (s)).c_str ()));
+        warning (_f ("cannot find: `%s'", ly_symbol2string (scm_car (s)).c_str ()));
       else
-       {
-         Translator *instance = type->clone ();
-         if (is_scheme)
-           dynamic_cast<Scheme_engraver *> (instance)->init_from_scheme (definition);
-
-         SCM str = instance->self_scm ();
-
-         if (instance->must_be_last ())
-           {
-             SCM cons = scm_cons (str, SCM_EOL);
-             if (scm_is_pair (trans_list))
-               scm_set_cdr_x (scm_last_pair (trans_list), cons);
-             else
-               trans_list = cons;
-           }
-         else
-           trans_list = scm_cons (str, trans_list);
-
-         instance->daddy_context_ = new_context;
-         instance->unprotect ();
-       }
+        {
+          Translator *instance = type->clone ();
+          if (is_scheme)
+            dynamic_cast<Scheme_engraver *> (instance)->init_from_scheme (definition);
+
+          SCM str = instance->self_scm ();
+
+          if (instance->must_be_last ())
+            {
+              SCM cons = scm_cons (str, SCM_EOL);
+              if (scm_is_pair (trans_list))
+                scm_set_cdr_x (scm_last_pair (trans_list), cons);
+              else
+                trans_list = cons;
+            }
+          else
+            trans_list = scm_cons (str, trans_list);
+
+          instance->daddy_context_ = new_context;
+          instance->unprotect ();
+        }
     }
 
   /* Filter unwanted translator types. Required to make
@@ -224,9 +224,9 @@ Translator_group::create_child_translator (SCM sev)
   g->unprotect ();
 
   recurse_over_translators (new_context,
-                           &Translator::initialize,
-                           &Translator_group::initialize,
-                           DOWN);
+                            &Translator::initialize,
+                            &Translator_group::initialize,
+                            DOWN);
 }
 
 SCM
@@ -260,7 +260,7 @@ precomputed_recurse_over_translators (Context *c, Translator_precompute_index id
 
 void
 recurse_over_translators (Context *c, Translator_method ptr,
-                         Translator_group_method tg_ptr, Direction dir)
+                          Translator_group_method tg_ptr, Direction dir)
 {
   Translator_group *tg
     = dynamic_cast<Translator_group *> (c->implementation ());
@@ -278,7 +278,7 @@ recurse_over_translators (Context *c, Translator_method ptr,
   if (tg && dir == UP)
     {
       translator_each (tg->get_simple_trans_list (),
-                      ptr);
+                       ptr);
 
       (tg->*tg_ptr) ();
     }
@@ -308,10 +308,10 @@ Translator_group::precompute_method_bindings ()
 
       assert (tr);
       for (int i = 0; i < TRANSLATOR_METHOD_PRECOMPUTE_COUNT; i++)
-       {
-         if (ptrs[i])
-           precomputed_method_bindings_[i].push_back (Translator_method_binding (tr, ptrs[i]));
-       }
+        {
+          if (ptrs[i])
+            precomputed_method_bindings_[i].push_back (Translator_method_binding (tr, ptrs[i]));
+        }
     }
 
   fetch_precomputable_methods (precomputed_self_method_bindings_);
index 7ede1b0eb412bc51adfd7e390d97842de61da4ea..cc6f13f8ca073a070cddad59a6453d8e5ec968f4 100644 (file)
@@ -23,9 +23,9 @@
 #include "moment.hh"
 
 LY_DEFINE (ly_translator_name, "ly:translator-name",
-          1, 0, 0, (SCM trans),
-          "Return the type name of the translator object @var{trans}."
-          "  The name is a symbol.")
+           1, 0, 0, (SCM trans),
+           "Return the type name of the translator object @var{trans}."
+           "  The name is a symbol.")
 {
   LY_ASSERT_SMOB (Translator, trans, 1);
   Translator *tr = unsmob_translator (trans);
@@ -34,18 +34,17 @@ LY_DEFINE (ly_translator_name, "ly:translator-name",
 }
 
 LY_DEFINE (ly_translator_description, "ly:translator-description",
-          1, 0, 0, (SCM me),
-          "Return an alist of properties of translator @var{me}.")
+           1, 0, 0, (SCM me),
+           "Return an alist of properties of translator @var{me}.")
 {
   LY_ASSERT_SMOB (Translator, me, 1);
   Translator *tr = unsmob_translator (me);
   return tr->translator_description ();
 }
 
-
 LY_DEFINE (ly_translator_context, "ly:translator-context",
-          1, 0, 0, (SCM trans),
-          "Return the context of the translator object @var{trans}.")
+           1, 0, 0, (SCM trans),
+           "Return the context of the translator object @var{trans}.")
 {
   LY_ASSERT_SMOB (Translator, trans, 1);
   Translator *tr = unsmob_translator (trans);
index 3020006f837e21e9edfac660a720a41bb80ca2f3..f101fb90e1754188066e587c624b53707e7dcc80 100644 (file)
@@ -122,7 +122,7 @@ Translator::connect_to_context (Context *c)
 {
   for (translator_listener_record *r = get_listener_list (); r; r = r->next_)
     c->events_below ()->add_listener (r->get_listener_ (this, r->event_class_),
-                                     r->event_class_);
+                                      r->event_class_);
 }
 
 void
@@ -130,7 +130,7 @@ Translator::disconnect_from_context (Context *c)
 {
   for (translator_listener_record *r = get_listener_list (); r; r = r->next_)
     c->events_below ()->remove_listener (r->get_listener_ (this, r->event_class_),
-                                        r->event_class_);
+                                         r->event_class_);
 }
 
 static SCM listened_event_class_table;
@@ -141,19 +141,18 @@ ensure_listened_hash ()
     listened_event_class_table = scm_permanent_object (scm_c_make_hash_table (61));
 }
 
-
 LY_DEFINE (ly_get_listened_event_classes, "ly:get-listened-event-classes",
-          0, 0, 0, (),
-          "Return a list of all event classes that some translator listens"
-          " to.")
+           0, 0, 0, (),
+           "Return a list of all event classes that some translator listens"
+           " to.")
 {
   ensure_listened_hash ();
   return ly_hash_table_keys (listened_event_class_table);
 }
 
 LY_DEFINE (ly_is_listened_event_class, "ly:is-listened-event-class",
-          1, 0, 0, (SCM sym),
-          "Is @var{sym} a listened event class?")
+           1, 0, 0, (SCM sym),
+           "Is @var{sym} a listened event class?")
 {
   ensure_listened_hash ();
   return scm_hashq_ref (listened_event_class_table, sym, SCM_BOOL_F);
@@ -166,7 +165,6 @@ add_listened_event_class (SCM sym)
   scm_hashq_set_x (listened_event_class_table, sym, SCM_BOOL_T);
 }
 
-
 /*
   internally called once, statically, for each translator
   listener. Connects the name of an event class with a procedure that
@@ -177,17 +175,17 @@ add_listened_event_class (SCM sym)
  */
 void
 Translator::add_translator_listener (translator_listener_record **listener_list,
-                                    translator_listener_record *r,
-                                    Listener (*get_listener) (void *, SCM), 
-                                    const char *ev_class)
+                                     translator_listener_record *r,
+                                     Listener (*get_listener) (void *, SCM),
+                                     const char *ev_class)
 {
   /* ev_class is the C++ identifier name. Convert to scm symbol */
   string name = string (ev_class);
   name = replace_all (&name, '_', '-');
   name += "-event";
-  
+
   SCM class_sym = scm_from_locale_symbol (name.c_str ());
-  
+
   add_listened_event_class (class_sym);
 
   r->event_class_ = class_sym;
@@ -201,34 +199,34 @@ Translator::add_translator_listener (translator_listener_record **listener_list,
 */
 SCM
 Translator::static_translator_description (const char *grobs,
-                                          const char *desc,
-                                          translator_listener_record *listener_list,
-                                          const char *read, 
-                                          const char *write) const
-{
-  SCM static_properties = SCM_EOL;                                     
-
-  static_properties = scm_acons (ly_symbol2scm ("grobs-created"),      
-                                parse_symbol_list (grobs), static_properties);
-  
-  static_properties = scm_acons (ly_symbol2scm ("description"),        
-                                scm_from_locale_string (desc), static_properties); 
-  
+                                           const char *desc,
+                                           translator_listener_record *listener_list,
+                                           const char *read,
+                                           const char *write) const
+{
+  SCM static_properties = SCM_EOL;
+
+  static_properties = scm_acons (ly_symbol2scm ("grobs-created"),
+                                 parse_symbol_list (grobs), static_properties);
+
+  static_properties = scm_acons (ly_symbol2scm ("description"),
+                                 scm_from_locale_string (desc), static_properties);
+
   SCM list = SCM_EOL;
   for (; listener_list; listener_list = listener_list->next_)
     list = scm_cons (listener_list->event_class_, list);
   static_properties = scm_acons (ly_symbol2scm ("events-accepted"),
-                                list, static_properties);
-  
-  static_properties = scm_acons (ly_symbol2scm ("properties-read"),    
-                                parse_symbol_list (read), static_properties); 
-  
-  static_properties = scm_acons (ly_symbol2scm ("properties-written"), 
-                                parse_symbol_list (write), static_properties); 
-  
-  return static_properties;                                            
-}
-  
+                                 list, static_properties);
+
+  static_properties = scm_acons (ly_symbol2scm ("properties-read"),
+                                 parse_symbol_list (read), static_properties);
+
+  static_properties = scm_acons (ly_symbol2scm ("properties-written"),
+                                 parse_symbol_list (write), static_properties);
+
+  return static_properties;
+}
+
 /*
   SMOBS
 */
@@ -279,8 +277,8 @@ Translator::print_smob (SCM s, SCM port, scm_print_state *)
 
 void
 add_acknowledger (Engraver_void_function_engraver_grob_info ptr,
-                 char const *func_name,
-                 vector<Acknowledge_information> *ack_array)
+                  char const *func_name,
+                  vector<Acknowledge_information> *ack_array)
 {
   Acknowledge_information inf;
   inf.function_ = ptr;
@@ -303,12 +301,11 @@ generic_get_acknowledger (SCM sym, vector<Acknowledge_information> const *ack_ar
   for (vsize i = 0; i < ack_array->size (); i++)
     {
       if (ack_array->at (i).symbol_ == sym)
-       return ack_array->at (i).function_;
+        return ack_array->at (i).function_;
     }
   return 0;
 }
 
-
 Moment
 get_event_length (Stream_event *e)
 {
@@ -323,7 +320,7 @@ Moment
 get_event_length (Stream_event *e, Moment now)
 {
   Moment len = get_event_length (e);
-  
+
   if (now.grace_part_)
     {
       len.grace_part_ = len.main_part_;
@@ -340,15 +337,15 @@ get_event_length (Stream_event *e, Moment now)
 bool
 internal_event_assignment (Stream_event **old_ev, Stream_event *new_ev, const char *function)
 {
-  if (*old_ev &&
-      !to_boolean (scm_equal_p ((*old_ev)->self_scm (), 
-                              new_ev->self_scm ())))
+  if (*old_ev
+      && !to_boolean (scm_equal_p ((*old_ev)->self_scm (),
+                                   new_ev->self_scm ())))
     {
       /* extract event class from function name */
       string ev_class = function;
 
       /* This assertion fails if EVENT_ASSIGNMENT was called outside a
-        translator listener. Don't do that. */
+         translator listener. Don't do that. */
       const char *prefix = "listen_";
       assert (0 == ev_class.find (prefix));
 
@@ -368,15 +365,15 @@ internal_event_assignment (Stream_event **old_ev, Stream_event *new_ev, const ch
 }
 
 ADD_TRANSLATOR (Translator,
-               /* doc */
-               "Base class.  Not instantiated.",
+                /* doc */
+                "Base class.  Not instantiated.",
 
-               /* create */
-               "",
+                /* create */
+                "",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 5f4b38d265395944fbf4ed5254303902e8d37b01..21321d8e976b808791716f71f6c69144b7a95689 100644 (file)
@@ -77,17 +77,17 @@ Trill_spanner_engraver::acknowledge_note_column (Grob_info info)
   if (span_)
     {
       Pointer_group_interface::add_grob (span_,
-                                        ly_symbol2scm ("note-columns"),
-                                        info.grob());
+                                         ly_symbol2scm ("note-columns"),
+                                         info.grob ());
       if (!span_->get_bound (LEFT))
-       add_bound_item (span_, info.grob ());
+        add_bound_item (span_, info.grob ());
     }
   else if (finished_)
     {
       Pointer_group_interface::add_grob (finished_, ly_symbol2scm ("note-columns"),
-                                        info.grob());
+                                         info.grob ());
       if (!finished_->get_bound (RIGHT))
-       add_bound_item (finished_, info.grob ());
+        add_bound_item (finished_, info.grob ());
     }
 }
 
@@ -99,7 +99,7 @@ Trill_spanner_engraver::process_music ()
     {
       Stream_event *ender = event_drul_[STOP];
       if (!ender)
-       ender = event_drul_[START];
+        ender = event_drul_[START];
       finished_ = span_;
       announce_end_grob (finished_, ender->self_scm ());
       span_ = 0;
@@ -120,10 +120,10 @@ Trill_spanner_engraver::typeset_all ()
   if (finished_)
     {
       if (!finished_->get_bound (RIGHT))
-       {
-         Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
-         finished_->set_bound (RIGHT, e);
-       }
+        {
+          Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
+          finished_->set_bound (RIGHT, e);
+        }
       finished_ = 0;
     }
 }
@@ -155,16 +155,16 @@ Trill_spanner_engraver::finalize ()
 ADD_ACKNOWLEDGER (Trill_spanner_engraver, note_column);
 
 ADD_TRANSLATOR (Trill_spanner_engraver,
-               /* doc */
-               "Create trill spanner from an event.",
+                /* doc */
+                "Create trill spanner from an event.",
 
-               /* create */
-               "TrillSpanner ",
+                /* create */
+                "TrillSpanner ",
 
-               /* read */
-               "currentCommandColumn "
-               "currentMusicalColumn ",
+                /* read */
+                "currentCommandColumn "
+                "currentMusicalColumn ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 4bd6378f27687c7d36ef82a1fb31b9f6624067bb..932f7a6c95050b42d375a5ef9171ddba184d52b8 100644 (file)
@@ -29,7 +29,6 @@
 #include "main.hh"
 #include "open-type-font.hh"
 
-
 Index_to_charcode_map
 make_index_to_charcode_map (FT_Face face)
 {
@@ -45,7 +44,7 @@ make_index_to_charcode_map (FT_Face face)
        charcode = FT_Get_Next_Char (face, charcode, &gindex))
     {
       m[gindex] = charcode;
-      j ++;
+      j++;
     }
   FT_Set_Charmap (face, current_cmap);
 
@@ -68,7 +67,7 @@ print_header (void *out, FT_Face face)
 
   lily_cookie_fprintf (out, "%d dict begin\n", 11);
   lily_cookie_fprintf (out, "/FontName /%s def\n",
-                      FT_Get_Postscript_Name (face));
+                       FT_Get_Postscript_Name (face));
 
   lily_cookie_fprintf (out, "/Encoding StandardEncoding def\n");
   lily_cookie_fprintf (out, "/PaintType 0 def\n");
@@ -78,15 +77,15 @@ print_header (void *out, FT_Face face)
     = (TT_Header *)FT_Get_Sfnt_Table (face, ft_sfnt_head);
 
   lily_cookie_fprintf (out, "/FontBBox [%lf %lf %lf %lf] def\n",
-                      float (ht->xMin) / float (ht->Units_Per_EM),
-                      float (ht->yMin) / float (ht->Units_Per_EM),
-                      float (ht->xMax) / float (ht->Units_Per_EM),
-                      float (ht->yMax) / float (ht->Units_Per_EM));
+                       float (ht->xMin) / float (ht->Units_Per_EM),
+                       float (ht->yMin) / float (ht->Units_Per_EM),
+                       float (ht->xMax) / float (ht->Units_Per_EM),
+                       float (ht->yMax) / float (ht->Units_Per_EM));
 
   lily_cookie_fprintf (out, "/FontType 42 def\n");
   lily_cookie_fprintf (out, "/FontInfo 8 dict dup begin\n");
   lily_cookie_fprintf (out, "/version (%.3f) def\n",
-                      ht->Font_Revision / 65536.0);
+                       ht->Font_Revision / 65536.0);
 
 #if 0
   if (strings[0])
@@ -110,13 +109,13 @@ print_header (void *out, FT_Face face)
 #endif
 
   lily_cookie_fprintf (out, "/isFixedPitch %s def\n",
-                      pt->isFixedPitch ? "true" : "false");
+                       pt->isFixedPitch ? "true" : "false");
   lily_cookie_fprintf (out, "/UnderlinePosition %lf def\n",
-                      float (pt->underlinePosition)
-                      / float (ht->Units_Per_EM));
+                       float (pt->underlinePosition)
+                       / float (ht->Units_Per_EM));
   lily_cookie_fprintf (out, "/UnderlineThickness %lf def\n",
-                      float (pt->underlineThickness)
-                      / float (ht->Units_Per_EM));
+                       float (pt->underlineThickness)
+                       / float (ht->Units_Per_EM));
   lily_cookie_fprintf (out, "end readonly def\n");
 }
 
@@ -128,8 +127,8 @@ const FT_ULong FT_ENC_TAG (loca_tag, 'l', 'o', 'c', 'a');
 
 static
 void t42_write_table (void *out, FT_Face face, unsigned char const *buffer,
-                     size_t s, bool is_glyf,
-                     FT_ULong head_length, FT_ULong loca_length)
+                      size_t s, bool is_glyf,
+                      FT_ULong head_length, FT_ULong loca_length)
 {
   vector<FT_UShort> chunks;
 
@@ -139,59 +138,59 @@ void t42_write_table (void *out, FT_Face face, unsigned char const *buffer,
       unsigned char *head_buf = new unsigned char[head_length];
       FT_Error error = FT_Load_Sfnt_Table (face, head_tag, 0, head_buf, NULL);
       if (error)
-       programming_error ("FT_Load_Sfnt_Table (): error.");
+        programming_error ("FT_Load_Sfnt_Table (): error.");
 
       /* we access the lower byte of indexToLocFormat */
-      bool long_offsets = head_buf[4*4 + 2*2 + 2*8 + 4*2 + 3*2 + 1] == 1;
+      bool long_offsets = head_buf[4 * 4 + 2 * 2 + 2 * 8 + 4 * 2 + 3 * 2 + 1] == 1;
 
       delete[] head_buf;
 
       unsigned char *loca_buf = new unsigned char[loca_length];
       error = FT_Load_Sfnt_Table (face, loca_tag, 0, loca_buf, NULL);
       if (error)
-       programming_error ("FT_Load_Sfnt_Table (): error.");
+        programming_error ("FT_Load_Sfnt_Table (): error.");
 
       unsigned char *p = loca_buf;
       unsigned char *endp = loca_buf + loca_length;
 
       FT_ULong offset = 0, last_offset = 0, last_chunk = 0;
       while (p < endp)
-      {
-       if (long_offsets)
-         {
-           offset = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
-           p += 4;
-         }
-       else
-         {
-           offset = ((p[0] << 8) | p[1]) << 1;
-           p += 2;
-         }
-       if (offset > last_offset + CHUNKSIZE)
-         {
-           if (last_chunk != last_offset)
-             chunks.push_back (FT_UShort (last_offset - last_chunk));
-           /*
-             a single glyph with more than 64k data
-             is a pathological case but...
-            */
-           FT_ULong rest = offset - last_offset;
-           while (rest > CHUNKSIZE)
-             {
-               chunks.push_back (CHUNKSIZE);
-               rest -= CHUNKSIZE;
-             }
-           chunks.push_back (FT_UShort (rest));
-           last_chunk = offset;
-         }
-       else if (offset > last_chunk + CHUNKSIZE)
-         {
-           chunks.push_back (FT_UShort (last_offset - last_chunk));
-           last_chunk = last_offset;
-         }
-
-       last_offset = offset;
-      }
+        {
+          if (long_offsets)
+            {
+              offset = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
+              p += 4;
+            }
+          else
+            {
+              offset = ((p[0] << 8) | p[1]) << 1;
+              p += 2;
+            }
+          if (offset > last_offset + CHUNKSIZE)
+            {
+              if (last_chunk != last_offset)
+                chunks.push_back (FT_UShort (last_offset - last_chunk));
+              /*
+                a single glyph with more than 64k data
+                is a pathological case but...
+               */
+              FT_ULong rest = offset - last_offset;
+              while (rest > CHUNKSIZE)
+                {
+                  chunks.push_back (CHUNKSIZE);
+                  rest -= CHUNKSIZE;
+                }
+              chunks.push_back (FT_UShort (rest));
+              last_chunk = offset;
+            }
+          else if (offset > last_chunk + CHUNKSIZE)
+            {
+              chunks.push_back (FT_UShort (last_offset - last_chunk));
+              last_chunk = last_offset;
+            }
+
+          last_offset = offset;
+        }
       chunks.push_back (FT_UShort (s - last_chunk));
 
       delete[] loca_buf;
@@ -200,17 +199,17 @@ void t42_write_table (void *out, FT_Face face, unsigned char const *buffer,
     {
       FT_ULong rest = s;
       while (rest > CHUNKSIZE)
-       {
-         chunks.push_back (CHUNKSIZE);
-         rest -= CHUNKSIZE;
-       }
+        {
+          chunks.push_back (CHUNKSIZE);
+          rest -= CHUNKSIZE;
+        }
       chunks.push_back (FT_UShort (rest));
     }
   else
     chunks.push_back (CHUNKSIZE);
 
   lily_cookie_fprintf (out, "\n"
-                           " <");
+                       " <");
 
   int l = 0;
   static char xdigits[] = "0123456789ABCDEF";
@@ -219,32 +218,32 @@ void t42_write_table (void *out, FT_Face face, unsigned char const *buffer,
   for (size_t j = 0; j < s; j++)
     {
       if (l >= chunks[cur_chunk_idx])
-       {
-         lily_cookie_fprintf (out, "\n"
-                                   " 00>\n"
-                                   " <");
-         l = 0;
-         cur_chunk_idx ++;
-       }
+        {
+          lily_cookie_fprintf (out, "\n"
+                               " 00>\n"
+                               " <");
+          l = 0;
+          cur_chunk_idx++;
+        }
 
       if (l % 31 == 0)
-       lily_cookie_fprintf (out, "\n"
-                                 "  ");
+        lily_cookie_fprintf (out, "\n"
+                             "  ");
 
       /* lily_cookie_fprintf (out,"%02X",(int)buffer[j]) is too slow */
       lily_cookie_putc (xdigits[(buffer[j] & 0xF0) >> 4], out);
       lily_cookie_putc (xdigits[buffer[j] & 0x0F], out);
 
-      l ++;
+      l++;
     }
 
   /* pad to four-byte boundary */
-  while ((s ++) % 4 != 0)
+  while ((s++) % 4 != 0)
     lily_cookie_fprintf (out, "00");
 
   lily_cookie_fprintf (out, "\n"
-                           "  00\n"
-                           " >");
+                       "  00\n"
+                       " >");
 }
 
 static void
@@ -261,27 +260,27 @@ print_body (void *out, FT_Face face)
     contains tables which aren't indexed at all
    */
   while (FT_Sfnt_Table_Info (face, idx, &tag, &length)
-        != FT_Err_Table_Missing)
-  {
-    lengths.push_back (length);
-    tags.push_back (tag);
-    if (tag == head_tag)
-      head_length = length;
-    else if (tag == loca_tag)
-      loca_length = length;
-    idx ++;
-  }
+         != FT_Err_Table_Missing)
+    {
+      lengths.push_back (length);
+      tags.push_back (tag);
+      if (tag == head_tag)
+        head_length = length;
+      else if (tag == loca_tag)
+        loca_length = length;
+      idx++;
+    }
 
   FT_ULong hlength = 12 + 16 * idx;
 
   unsigned char *hbuf = new unsigned char[hlength];
   unsigned char *p;
 
-  hbuf[0] = 0x00;                                      /* version */
+  hbuf[0] = 0x00;                                       /* version */
   hbuf[1] = 0x01;
   hbuf[2] = 0x00;
   hbuf[3] = 0x00;
-  hbuf[4] = (unsigned char) ((idx & 0xFF00) >> 8);     /* numTables */
+  hbuf[4] = (unsigned char) ((idx & 0xFF00) >> 8);      /* numTables */
   hbuf[5] = idx & 0x00FF;
 
   FT_UInt searchRange, entrySelector, rangeShift;
@@ -303,65 +302,65 @@ print_body (void *out, FT_Face face)
 
   FT_ULong checksum, font_checksum = 0;
 
-  FT_ULong offset = hlength;           /* first table offset */
+  FT_ULong offset = hlength;            /* first table offset */
 
   for (FT_UInt i = 0; i < idx; i++)
-  {
-    /* here, the buffer length must be a multiple of 4 */
-    FT_ULong len = (lengths[i] + 3) & ~3;
-    unsigned char *buf = new unsigned char[len];
-
-    buf[len - 1] = 0x00;               /* assure padding with zeros */
-    buf[len - 2] = 0x00;
-    buf[len - 3] = 0x00;
-
-    FT_Error error = FT_Load_Sfnt_Table (face, tags[i], 0, buf, NULL);
-    if (error)
-      programming_error ("FT_Load_Sfnt_Table (): error.");
-
-    if (tag == head_tag)
-      {
-       /*
-         first pass of computing the font checksum
-         needs checkSumAdjustment = 0
-        */
-       buf[8] = 0x00;
-       buf[9] = 0x00;
-       buf[10] = 0x00;
-       buf[11] = 0x00;
-      }
-
-    checksum = 0;
-    unsigned char *endq = buf + len;
-    for (unsigned char *q = buf; q < endq; q += 4)
-      checksum += (q[0] << 24) | (q[1] << 16) | (q[2] << 8) | q[3];
-    font_checksum += checksum;
-
-    delete[] buf;
-
-    *(p++) = (unsigned char) ((tags[i] & 0xFF000000UL) >> 24);
-    *(p++) = (unsigned char) ((tags[i] & 0x00FF0000UL) >> 16);
-    *(p++) = (unsigned char) ((tags[i] & 0x0000FF00UL) >> 8);
-    *(p++) = tags[i] & 0x000000FFUL;
-
-    *(p++) = (unsigned char) ((checksum & 0xFF000000UL) >> 24);
-    *(p++) = (unsigned char) ((checksum & 0x00FF0000UL) >> 16);
-    *(p++) = (unsigned char) ((checksum & 0x0000FF00UL) >> 8);
-    *(p++) = checksum & 0x000000FFUL;
-
-    *(p++) = (unsigned char) ((offset & 0xFF000000UL) >> 24);
-    *(p++) = (unsigned char) ((offset & 0x00FF0000UL) >> 16);
-    *(p++) = (unsigned char) ((offset & 0x0000FF00UL) >> 8);
-    *(p++) = offset & 0x000000FFUL;
-
-    *(p++) = (unsigned char) ((lengths[i] & 0xFF000000UL) >> 24);
-    *(p++) = (unsigned char) ((lengths[i] & 0x00FF0000UL) >> 16);
-    *(p++) = (unsigned char) ((lengths[i] & 0x0000FF00UL) >> 8);
-    *(p++) = lengths[i] & 0x000000FFUL;
-
-    /* offset must be a multiple of 4 */
-    offset += (lengths[i] + 3) & ~3;
-  }
+    {
+      /* here, the buffer length must be a multiple of 4 */
+      FT_ULong len = (lengths[i] + 3) & ~3;
+      unsigned char *buf = new unsigned char[len];
+
+      buf[len - 1] = 0x00;                /* assure padding with zeros */
+      buf[len - 2] = 0x00;
+      buf[len - 3] = 0x00;
+
+      FT_Error error = FT_Load_Sfnt_Table (face, tags[i], 0, buf, NULL);
+      if (error)
+        programming_error ("FT_Load_Sfnt_Table (): error.");
+
+      if (tag == head_tag)
+        {
+          /*
+            first pass of computing the font checksum
+            needs checkSumAdjustment = 0
+           */
+          buf[8] = 0x00;
+          buf[9] = 0x00;
+          buf[10] = 0x00;
+          buf[11] = 0x00;
+        }
+
+      checksum = 0;
+      unsigned char *endq = buf + len;
+      for (unsigned char *q = buf; q < endq; q += 4)
+        checksum += (q[0] << 24) | (q[1] << 16) | (q[2] << 8) | q[3];
+      font_checksum += checksum;
+
+      delete[] buf;
+
+      *(p++) = (unsigned char) ((tags[i] & 0xFF000000UL) >> 24);
+      *(p++) = (unsigned char) ((tags[i] & 0x00FF0000UL) >> 16);
+      *(p++) = (unsigned char) ((tags[i] & 0x0000FF00UL) >> 8);
+      *(p++) = tags[i] & 0x000000FFUL;
+
+      *(p++) = (unsigned char) ((checksum & 0xFF000000UL) >> 24);
+      *(p++) = (unsigned char) ((checksum & 0x00FF0000UL) >> 16);
+      *(p++) = (unsigned char) ((checksum & 0x0000FF00UL) >> 8);
+      *(p++) = checksum & 0x000000FFUL;
+
+      *(p++) = (unsigned char) ((offset & 0xFF000000UL) >> 24);
+      *(p++) = (unsigned char) ((offset & 0x00FF0000UL) >> 16);
+      *(p++) = (unsigned char) ((offset & 0x0000FF00UL) >> 8);
+      *(p++) = offset & 0x000000FFUL;
+
+      *(p++) = (unsigned char) ((lengths[i] & 0xFF000000UL) >> 24);
+      *(p++) = (unsigned char) ((lengths[i] & 0x00FF0000UL) >> 16);
+      *(p++) = (unsigned char) ((lengths[i] & 0x0000FF00UL) >> 8);
+      *(p++) = lengths[i] & 0x000000FFUL;
+
+      /* offset must be a multiple of 4 */
+      offset += (lengths[i] + 3) & ~3;
+    }
 
   /* add checksum of TTF header */
   checksum = 0;
@@ -376,41 +375,41 @@ print_body (void *out, FT_Face face)
    */
   lily_cookie_fprintf (out, "/sfnts [");
   t42_write_table (out, face, hbuf, hlength, false,
-                  head_length, loca_length);
+                   head_length, loca_length);
   delete[] hbuf;
 
   idx = 0;
 
   while (FT_Sfnt_Table_Info (face, idx, &tag, &length)
-        != FT_Err_Table_Missing)
+         != FT_Err_Table_Missing)
     {
       unsigned char *buf = new unsigned char[length];
       FT_Error error = FT_Load_Sfnt_Table (face, tag, 0, buf, NULL);
       if (error)
-       programming_error ("FT_Load_Sfnt_Table (): error.");
+        programming_error ("FT_Load_Sfnt_Table (): error.");
 
       if (tag == head_tag)
-       {
-         /* in the second pass simply store the computed font checksum */
-         buf[8] = (unsigned char) ((font_checksum & 0xFF000000UL) >> 24);
-         buf[9] = (unsigned char) ((font_checksum & 0x00FF0000UL) >> 16);
-         buf[10] = (unsigned char) ((font_checksum & 0x0000FF00UL) >> 8);
-         buf[11] = font_checksum & 0x000000FFUL;
-       }
+        {
+          /* in the second pass simply store the computed font checksum */
+          buf[8] = (unsigned char) ((font_checksum & 0xFF000000UL) >> 24);
+          buf[9] = (unsigned char) ((font_checksum & 0x00FF0000UL) >> 16);
+          buf[10] = (unsigned char) ((font_checksum & 0x0000FF00UL) >> 8);
+          buf[11] = font_checksum & 0x000000FFUL;
+        }
 
       bool is_glyf_table = tag == glyf_tag && length > CHUNKSIZE;
       t42_write_table (out, face, buf, length, is_glyf_table,
-                      head_length, loca_length);
+                       head_length, loca_length);
 
       delete[] buf;
-      idx ++;
+      idx++;
     }
   lily_cookie_fprintf (out, "\n] def\n");
 }
 
 static void
 print_trailer (void *out,
-              FT_Face face)
+               FT_Face face)
 {
   const int GLYPH_NAME_LEN = 256;
   char glyph_name[GLYPH_NAME_LEN];
@@ -427,40 +426,40 @@ print_trailer (void *out,
     {
       glyph_name[0] = 0;
       if (face->face_flags & FT_FACE_FLAG_GLYPH_NAMES)
-       {
-         FT_Error error = FT_Get_Glyph_Name (face, i, glyph_name,
-                                             GLYPH_NAME_LEN);
-         if (error)
-           {
-             programming_error ("FT_Get_Glyph_Name (): error.");
-             glyph_name[0] = 0;
-           }
-       }
+        {
+          FT_Error error = FT_Get_Glyph_Name (face, i, glyph_name,
+                                              GLYPH_NAME_LEN);
+          if (error)
+            {
+              programming_error ("FT_Get_Glyph_Name (): error.");
+              glyph_name[0] = 0;
+            }
+        }
 
       if (!glyph_name[0] && ic_map.find (i) != ic_map.end ())
-       {
-         FT_ULong ucode = ic_map[i];
-         get_unicode_name (glyph_name, ucode);
-       }
+        {
+          FT_ULong ucode = ic_map[i];
+          get_unicode_name (glyph_name, ucode);
+        }
 
       if (i == 0)
-       sprintf (glyph_name, ".notdef");
+        sprintf (glyph_name, ".notdef");
       else if (glyph_name == string (".notdef"))
-       glyph_name[0] = '\0';
+        glyph_name[0] = '\0';
 
       if (!glyph_name[0])
-       get_glyph_index_name (glyph_name, i);
+        get_glyph_index_name (glyph_name, i);
 
       if (glyph_name[0])
-       {
-         lily_cookie_fprintf (out, "(%s) cvn %d def ", glyph_name, i);
-         output_count ++;
-       }
+        {
+          lily_cookie_fprintf (out, "(%s) cvn %d def ", glyph_name, i);
+          output_count++;
+        }
       else
-       programming_error (to_string ("no name for glyph %d", i));
-                       
+        programming_error (to_string ("no name for glyph %d", i));
+
       if (! (output_count % 5))
-       lily_cookie_fprintf (out, "\n");
+        lily_cookie_fprintf (out, "\n");
     }
 
   lily_cookie_fprintf (out, "end readonly def\n");
@@ -477,11 +476,11 @@ create_type42_font (void *out, string name, int idx)
     {
       face = open_ft_face (name, -1);
       if (idx >= face->num_faces)
-       {
-         warning (_f ("font index %d too large for font `%s', using index 0",
-                      idx, name.c_str()));
-         idx = 0;
-       }
+        {
+          warning (_f ("font index %d too large for font `%s', using index 0",
+                       idx, name.c_str ()));
+          idx = 0;
+        }
       FT_Done_Face (face);
     }
 
@@ -495,11 +494,11 @@ create_type42_font (void *out, string name, int idx)
 }
 
 LY_DEFINE (ly_ttf_ps_name, "ly:ttf-ps-name",
-          1, 1, 0, (SCM ttf_file_name, SCM idx),
-          "Extract the PostScript name from a TrueType font.  The optional"
-          " @var{idx} argument is useful for TrueType collections (TTC)"
-          " only; it specifies the font index within the TTC.  The default"
-          " value of @var{idx} is@tie{}0.")
+           1, 1, 0, (SCM ttf_file_name, SCM idx),
+           "Extract the PostScript name from a TrueType font.  The optional"
+           " @var{idx} argument is useful for TrueType collections (TTC)"
+           " only; it specifies the font index within the TTC.  The default"
+           " value of @var{idx} is@tie{}0.")
 {
   LY_ASSERT_TYPE (scm_is_string, ttf_file_name, 1);
 
@@ -509,10 +508,10 @@ LY_DEFINE (ly_ttf_ps_name, "ly:ttf-ps-name",
       LY_ASSERT_TYPE (scm_is_integer, idx, 2);
       i = scm_to_int (idx);
       if (i < 0)
-       {
-         warning (_ ("font index must be non-negative, using index 0"));
-         i = 0;
-       }
+        {
+          warning (_ ("font index must be non-negative, using index 0"));
+          i = 0;
+        }
     }
 
   string file_name = ly_scm2string (ttf_file_name);
@@ -526,11 +525,11 @@ LY_DEFINE (ly_ttf_ps_name, "ly:ttf-ps-name",
     {
       face = open_ft_face (file_name, -1);
       if (i >= face->num_faces)
-       {
-         warning (_f ("font index %d too large for font `%s', using index 0",
-                      i, file_name.c_str()));
-         i = 0;
-       }
+        {
+          warning (_f ("font index %d too large for font `%s', using index 0",
+                       i, file_name.c_str ()));
+          i = 0;
+        }
       FT_Done_Face (face);
     }
 
@@ -546,12 +545,12 @@ LY_DEFINE (ly_ttf_ps_name, "ly:ttf-ps-name",
 }
 
 LY_DEFINE (ly_ttf_2_pfa, "ly:ttf->pfa",
-          1, 1, 0, (SCM ttf_file_name, SCM idx),
-          "Convert the contents of a TrueType font file to PostScript"
-          " Type@tie{}42 font, returning it as a string.  The optional"
-          " @var{idx} argument is useful for TrueType collections (TTC)"
-          " only; it specifies the font index within the TTC.  The default"
-          " value of @var{idx} is@tie{}0.")
+           1, 1, 0, (SCM ttf_file_name, SCM idx),
+           "Convert the contents of a TrueType font file to PostScript"
+           " Type@tie{}42 font, returning it as a string.  The optional"
+           " @var{idx} argument is useful for TrueType collections (TTC)"
+           " only; it specifies the font index within the TTC.  The default"
+           " value of @var{idx} is@tie{}0.")
 {
   LY_ASSERT_TYPE (scm_is_string, ttf_file_name, 1);
 
@@ -561,10 +560,10 @@ LY_DEFINE (ly_ttf_2_pfa, "ly:ttf->pfa",
       LY_ASSERT_TYPE (scm_is_integer, idx, 2);
       i = scm_to_int (idx);
       if (i < 0)
-       {
-         warning (_ ("font index must be non-negative, using index 0"));
-         i = 0;
-       }
+        {
+          warning (_ ("font index must be non-negative, using index 0"));
+          i = 0;
+        }
     }
 
   string file_name = ly_scm2string (ttf_file_name);
@@ -575,7 +574,7 @@ LY_DEFINE (ly_ttf_2_pfa, "ly:ttf->pfa",
 
   create_type42_font (&stream, file_name, i);
   SCM asscm = scm_from_locale_stringn (stream.get_string (),
-                                      stream.get_length ());
+                                       stream.get_length ());
 
   if (be_verbose_global)
     progress_indication ("]");
index a7e1c6c2ba3cd78193352f465a439d1eadda9e06..c6dfa799924a5c4b169406cf26854c1b865d0f24 100644 (file)
@@ -86,7 +86,7 @@ flatten_number_pair_property (Grob *me, Direction xdir, SCM sym)
 */
 Grob *
 Tuplet_bracket::parallel_beam (Grob *me_grob, vector<Grob *> const &cols,
-                              bool *equally_long)
+                               bool *equally_long)
 {
   Spanner *me = dynamic_cast<Spanner *> (me_grob);
 
@@ -95,12 +95,12 @@ Tuplet_bracket::parallel_beam (Grob *me_grob, vector<Grob *> const &cols,
     return 0;
 
   Drul_array<Grob *> stems (Note_column::get_stem (cols[0]),
-                           Note_column::get_stem (cols.back ()));
+                            Note_column::get_stem (cols.back ()));
 
   if (!stems[RIGHT]
       || !stems[LEFT]
       || (dynamic_cast<Item *> (stems[RIGHT])->get_column ()
-         != me->get_bound (RIGHT)->get_column ()))
+          != me->get_bound (RIGHT)->get_column ()))
     return 0;
 
   Drul_array<Grob *> beams;
@@ -135,7 +135,7 @@ Tuplet_bracket::calc_connect_to_neighbors (SCM smob)
 
   Direction dir = get_grob_direction (me);
   Drul_array<Item *> bounds (get_x_bound_item (me, LEFT, dir),
-                            get_x_bound_item (me, RIGHT, dir));
+                             get_x_bound_item (me, RIGHT, dir));
 
   Drul_array<bool> connect_to_other (false, false);
   Direction d = LEFT;
@@ -145,25 +145,25 @@ Tuplet_bracket::calc_connect_to_neighbors (SCM smob)
       Spanner *orig_spanner = dynamic_cast<Spanner *> (me->original ());
       vsize neighbor_idx = me->get_break_index () - break_dir;
       if (break_dir
-         && d == RIGHT
-         && neighbor_idx < orig_spanner->broken_intos_.size ())
-       {
-         Grob *neighbor = orig_spanner->broken_intos_[neighbor_idx];
+          && d == RIGHT
+          && neighbor_idx < orig_spanner->broken_intos_.size ())
+        {
+          Grob *neighbor = orig_spanner->broken_intos_[neighbor_idx];
 
-         /* trigger possible suicide*/
-         (void) neighbor->get_property ("positions");
-       }
+          /* trigger possible suicide*/
+          (void) neighbor->get_property ("positions");
+        }
 
       connect_to_other[d]
-       = (break_dir
-          && neighbor_idx < orig_spanner->broken_intos_.size ()
-          && orig_spanner->broken_intos_[neighbor_idx]->is_live ());
+        = (break_dir
+           && neighbor_idx < orig_spanner->broken_intos_.size ()
+           && orig_spanner->broken_intos_[neighbor_idx]->is_live ());
     }
   while (flip (&d) != LEFT);
 
   if (connect_to_other[LEFT] || connect_to_other[RIGHT])
     return scm_cons (scm_from_bool (connect_to_other[LEFT]),
-                    scm_from_bool (connect_to_other[RIGHT]));
+                     scm_from_bool (connect_to_other[RIGHT]));
 
   return SCM_EOL;
 }
@@ -207,7 +207,7 @@ Tuplet_bracket::calc_control_points (SCM smob)
 
   Drul_array<bool> connect_to_other
     = robust_scm2booldrul (me->get_property ("connect-to-neighbor"),
-                          Drul_array<bool> (false, false));
+                           Drul_array<bool> (false, false));
 
   Interval x_span;
   Direction d = LEFT;
@@ -216,47 +216,47 @@ Tuplet_bracket::calc_control_points (SCM smob)
       x_span[d] = robust_relative_extent (bounds[d], commonx, X_AXIS)[d];
 
       if (connect_to_other[d])
-       {
-         Interval overshoot (robust_scm2drul (me->get_property ("break-overshoot"),
-                                              Interval (-0.5, 0.0)));
-
-         if (d == RIGHT)
-           x_span[d] += d * overshoot[d];
-         else
-           x_span[d] = robust_relative_extent (bounds[d],
-                                               commonx, X_AXIS)[RIGHT]
-             - overshoot[LEFT];
-       }
+        {
+          Interval overshoot (robust_scm2drul (me->get_property ("break-overshoot"),
+                                               Interval (-0.5, 0.0)));
+
+          if (d == RIGHT)
+            x_span[d] += d * overshoot[d];
+          else
+            x_span[d] = robust_relative_extent (bounds[d],
+                                                commonx, X_AXIS)[RIGHT]
+                        - overshoot[LEFT];
+        }
 
       else if (d == RIGHT
-              && (columns.empty ()
-                  || (bounds[d]->get_column ()
-                      != dynamic_cast<Item *> (columns.back ())->get_column ())))
-       {
-         /*
-           We're connecting to a column, for the last bit of a broken
-           fullLength bracket.
-         */
-         Real padding
-           = robust_scm2double (me->get_property ("full-length-padding"), 1.0);
-
-         if (bounds[d]->break_status_dir ())
-           padding = 0.0;
-
-         Real coord = bounds[d]->relative_coordinate (commonx, X_AXIS);
-         if (to_boolean (me->get_property ("full-length-to-extent")))
-           coord = robust_relative_extent (bounds[d], commonx, X_AXIS)[LEFT];
-
-         coord = max (coord, x_span[LEFT]);
-
-         x_span[d] = coord - padding;
-       }
+               && (columns.empty ()
+                   || (bounds[d]->get_column ()
+                       != dynamic_cast<Item *> (columns.back ())->get_column ())))
+        {
+          /*
+            We're connecting to a column, for the last bit of a broken
+            fullLength bracket.
+          */
+          Real padding
+            = robust_scm2double (me->get_property ("full-length-padding"), 1.0);
+
+          if (bounds[d]->break_status_dir ())
+            padding = 0.0;
+
+          Real coord = bounds[d]->relative_coordinate (commonx, X_AXIS);
+          if (to_boolean (me->get_property ("full-length-to-extent")))
+            coord = robust_relative_extent (bounds[d], commonx, X_AXIS)[LEFT];
+
+          coord = max (coord, x_span[LEFT]);
+
+          x_span[d] = coord - padding;
+        }
     }
   while (flip (&d) != LEFT);
 
   x_span -= me->get_bound (LEFT)->relative_coordinate (commonx, X_AXIS);
   return scm_list_2 (ly_offset2scm (Offset (x_span[LEFT], positions[LEFT])),
-                    ly_offset2scm (Offset (x_span[RIGHT], positions[RIGHT])));
+                     ly_offset2scm (Offset (x_span[RIGHT], positions[RIGHT])));
 }
 
 /*
@@ -304,7 +304,7 @@ Tuplet_bracket::print (SCM smob)
   */
   if (!to_boolean (bracket_vis_prop)
       && (robust_scm2moment (me->get_bound (LEFT)->get_column ()->get_property ("when"), Moment (0))
-         == robust_scm2moment (me->get_bound (RIGHT)->get_column ()->get_property ("when"), Moment (0))))
+          == robust_scm2moment (me->get_bound (RIGHT)->get_column ()->get_property ("when"), Moment (0))))
     bracket_visibility = false;
 
   Drul_array<Offset> points;
@@ -327,12 +327,12 @@ Tuplet_bracket::print (SCM smob)
     {
       Interval ext = number_grob->extent (number_grob, X_AXIS);
       if (!ext.is_empty ())
-       {
-         gap = ext.length () + 1.0;
+        {
+          gap = ext.length () + 1.0;
 
-         if ((0.75 * x_span.length () < gap) && !bracket_prop)
-           bracket_visibility = false;
-       }
+          if ((0.75 * x_span.length () < gap) && !bracket_prop)
+            bracket_visibility = false;
+        }
     }
 
   if (bracket_visibility)
@@ -340,11 +340,11 @@ Tuplet_bracket::print (SCM smob)
       Drul_array<Real> zero (0, 0);
       Real ss = Staff_symbol_referencer::staff_space (me);
       Drul_array<Real> height
-       = robust_scm2drul (me->get_property ("edge-height"), zero);
+        = robust_scm2drul (me->get_property ("edge-height"), zero);
       Drul_array<Real> flare
-       = robust_scm2drul (me->get_property ("bracket-flare"), zero);
+        = robust_scm2drul (me->get_property ("bracket-flare"), zero);
       Drul_array<Real> shorten
-       = robust_scm2drul (me->get_property ("shorten-pair"), zero);
+        = robust_scm2drul (me->get_property ("shorten-pair"), zero);
       Drul_array<Stencil> edge_stencils;
 
       Direction dir = get_grob_direction (me);
@@ -354,55 +354,55 @@ Tuplet_bracket::print (SCM smob)
       scale_drul (&shorten, ss);
 
       Drul_array<bool> connect_to_other
-       = robust_scm2booldrul (me->get_property ("connect-to-neighbor"),
-                              Drul_array<bool> (false, false));
+        = robust_scm2booldrul (me->get_property ("connect-to-neighbor"),
+                               Drul_array<bool> (false, false));
 
       Direction d = LEFT;
       do
-       {
-         if (connect_to_other[d])
-           {
-             height[d] = 0.0;
-             flare[d] = 0.0;
-             shorten[d] = 0.0;
-
-             SCM edge_text = me->get_property ("edge-text");
-
-             if (scm_is_pair (edge_text))
-               {
-                 SCM properties = Font_interface::text_font_alist_chain (me);
-                 SCM text = index_get_cell (edge_text, d);
-                 if (Text_interface::is_markup (text))
-                   {
-                     SCM t
-                       = Text_interface::interpret_markup (pap->self_scm (),
-                                                           properties, text);
-
-                     Stencil *edge_text = unsmob_stencil (t);
-                     edge_text->translate_axis (x_span[d] - x_span[LEFT],
-                                                X_AXIS);
-                     edge_stencils[d] = *edge_text;
-                   }
-               }
-           }
-       }
+        {
+          if (connect_to_other[d])
+            {
+              height[d] = 0.0;
+              flare[d] = 0.0;
+              shorten[d] = 0.0;
+
+              SCM edge_text = me->get_property ("edge-text");
+
+              if (scm_is_pair (edge_text))
+                {
+                  SCM properties = Font_interface::text_font_alist_chain (me);
+                  SCM text = index_get_cell (edge_text, d);
+                  if (Text_interface::is_markup (text))
+                    {
+                      SCM t
+                        = Text_interface::interpret_markup (pap->self_scm (),
+                                                            properties, text);
+
+                      Stencil *edge_text = unsmob_stencil (t);
+                      edge_text->translate_axis (x_span[d] - x_span[LEFT],
+                                                 X_AXIS);
+                      edge_stencils[d] = *edge_text;
+                    }
+                }
+            }
+        }
       while (flip (&d) != LEFT);
 
       Stencil brack = make_bracket (me, Y_AXIS,
-                                   points[RIGHT] - points[LEFT],
-                                   height,
-                                   /*
-                                     0.1 = more space at right due to italics
-                                     TODO: use italic correction of font.
-                                   */
-                                   Interval (-0.5, 0.5) * gap + 0.1,
-                                   flare, shorten);
+                                    points[RIGHT] - points[LEFT],
+                                    height,
+                                    /*
+                                      0.1 = more space at right due to italics
+                                      TODO: use italic correction of font.
+                                    */
+                                    Interval (-0.5, 0.5) * gap + 0.1,
+                                    flare, shorten);
 
       do
-       {
-         if (!edge_stencils[d].is_empty ())
-           brack.add_stencil (edge_stencils[d]);
-       }
+        {
+          if (!edge_stencils[d].is_empty ())
+            brack.add_stencil (edge_stencils[d]);
+        }
       while (flip (&d) != LEFT);
 
       mol.add_stencil (brack);
@@ -420,12 +420,12 @@ Tuplet_bracket::print (SCM smob)
 */
 Stencil
 Tuplet_bracket::make_bracket (Grob *me, // for line properties.
-                             Axis protrusion_axis,
-                             Offset dz,
-                             Drul_array<Real> height,
-                             Interval gap,
-                             Drul_array<Real> flare,
-                             Drul_array<Real> shorten)
+                              Axis protrusion_axis,
+                              Offset dz,
+                              Drul_array<Real> height,
+                              Interval gap,
+                              Drul_array<Real> flare,
+                              Drul_array<Real> shorten)
 {
   Drul_array<Offset> corners (Offset (0, 0), dz);
 
@@ -444,7 +444,7 @@ Tuplet_bracket::make_bracket (Grob *me, // for line properties.
   if (!gap.is_empty ())
     {
       do
-       gap_corners[d] = (dz * 0.5) + gap[d] / length * dz;
+        gap_corners[d] = (dz * 0.5) + gap[d] / length * dz;
       while (flip (&d) != LEFT);
     }
 
@@ -461,18 +461,18 @@ Tuplet_bracket::make_bracket (Grob *me, // for line properties.
   do
     {
       if (!gap.is_empty ())
-       m.add_stencil (Line_interface::line (me, straight_corners[d],
-                                            gap_corners[d]));
+        m.add_stencil (Line_interface::line (me, straight_corners[d],
+                                             gap_corners[d]));
 
       m.add_stencil (Line_interface::line (me, straight_corners[d],
-                                          flare_corners[d]));
+                                           flare_corners[d]));
     }
 
   while (flip (&d) != LEFT);
 
   if (gap.is_empty ())
     m.add_stencil (Line_interface::line (me, straight_corners[LEFT],
-                                        straight_corners[RIGHT]));
+                                         straight_corners[RIGHT]));
 
   return m;
 }
@@ -528,10 +528,10 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
     {
       Real pad = robust_scm2double (me->get_property ("staff-padding"), -1.0);
       if (pad >= 0.0)
-       {
-         staff = st->extent (commony, Y_AXIS) - my_offset;
-         staff.widen (pad);
-       }
+        {
+          staff = st->extent (commony, Y_AXIS) - my_offset;
+          staff.widen (pad);
+        }
     }
 
   Direction dir = get_grob_direction (me);
@@ -544,8 +544,8 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
   Real x0 = robust_relative_extent (lgr, commonx, X_AXIS)[LEFT];
   Real x1 = robust_relative_extent (rgr, commonx, X_AXIS)[RIGHT];
   bool follow_beam = par_beam
-    && get_grob_direction (par_beam) == dir
-    && !to_boolean (par_beam->get_property ("knee"));
+                     && get_grob_direction (par_beam) == dir
+                     && !to_boolean (par_beam->get_property ("knee"));
 
   vector<Offset> points;
   if (columns.size ()
@@ -554,18 +554,18 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
       && Note_column::get_stem (columns.back ()))
     {
       /*
-       trigger set_stem_ends
+        trigger set_stem_ends
       */
       (void) par_beam->get_property ("quantized-positions");
 
       Drul_array<Grob *> stems (Note_column::get_stem (columns[0]),
-                               Note_column::get_stem (columns.back ()));
+                                Note_column::get_stem (columns.back ()));
 
       Real ss = 0.5 * Staff_symbol_referencer::staff_space (me);
       Real lp = ss * robust_scm2double (stems[LEFT]->get_property ("stem-end-position"), 0.0)
-       + stems[LEFT]->get_parent (Y_AXIS)->relative_coordinate (commony, Y_AXIS);
+                + stems[LEFT]->get_parent (Y_AXIS)->relative_coordinate (commony, Y_AXIS);
       Real rp = ss * robust_scm2double (stems[RIGHT]->get_property ("stem-end-position"), 0.0)
-       + stems[RIGHT]->get_parent (Y_AXIS)->relative_coordinate (commony, Y_AXIS);
+                + stems[RIGHT]->get_parent (Y_AXIS)->relative_coordinate (commony, Y_AXIS);
 
       *dy = rp - lp;
       points.push_back (Offset (stems[LEFT]->relative_coordinate (commonx, X_AXIS) - x0, lp));
@@ -574,44 +574,44 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
   else
     {
       /*
-       Use outer non-rest columns to determine slope
+        Use outer non-rest columns to determine slope
       */
       Grob *left_col = 0;
       Grob *right_col = 0;
       get_bounds (me, &left_col, &right_col);
       if (left_col && right_col)
-       {
-         Interval rv = Note_column::cross_staff_extent (right_col, commony);
-         Interval lv = Note_column::cross_staff_extent (left_col, commony);
-         rv.unite (staff);
-         lv.unite (staff);
-
-         Real graphical_dy = rv[dir] - lv[dir];
-
-         Slice ls = Note_column::head_positions_interval (left_col);
-         Slice rs = Note_column::head_positions_interval (right_col);
-
-         Interval musical_dy;
-         musical_dy[UP] = rs[UP] - ls[UP];
-         musical_dy[DOWN] = rs[DOWN] - ls[DOWN];
-         if (sign (musical_dy[UP]) != sign (musical_dy[DOWN]))
-           *dy = 0.0;
-         else if (sign (graphical_dy) != sign (musical_dy[DOWN]))
-           *dy = 0.0;
-         else
-           *dy = graphical_dy;
-       }
+        {
+          Interval rv = Note_column::cross_staff_extent (right_col, commony);
+          Interval lv = Note_column::cross_staff_extent (left_col, commony);
+          rv.unite (staff);
+          lv.unite (staff);
+
+          Real graphical_dy = rv[dir] - lv[dir];
+
+          Slice ls = Note_column::head_positions_interval (left_col);
+          Slice rs = Note_column::head_positions_interval (right_col);
+
+          Interval musical_dy;
+          musical_dy[UP] = rs[UP] - ls[UP];
+          musical_dy[DOWN] = rs[DOWN] - ls[DOWN];
+          if (sign (musical_dy[UP]) != sign (musical_dy[DOWN]))
+            *dy = 0.0;
+          else if (sign (graphical_dy) != sign (musical_dy[DOWN]))
+            *dy = 0.0;
+          else
+            *dy = graphical_dy;
+        }
       else
-       *dy = 0;
+        *dy = 0;
 
       for (vsize i = 0; i < columns.size (); i++)
-       {
-         Interval note_ext = Note_column::cross_staff_extent (columns[i],
-                                                              commony);
-         Real x = columns[i]->relative_coordinate (commonx, X_AXIS) - x0;
+        {
+          Interval note_ext = Note_column::cross_staff_extent (columns[i],
+                                                               commony);
+          Real x = columns[i]->relative_coordinate (commonx, X_AXIS) - x0;
 
-         points.push_back (Offset (x, note_ext[dir]));
-       }
+          points.push_back (Offset (x, note_ext[dir]));
+        }
     }
 
   if (!follow_beam)
@@ -633,28 +633,28 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
       Interval tuplet_y (tuplets[i]->extent (commony, Y_AXIS));
 
       if (!tuplets[i]->is_live ())
-       continue;
+        continue;
 
       Direction d = LEFT;
       Drul_array<Real> positions
-       = robust_scm2interval (tuplets[i]->get_property ("positions"),
-                              Interval (0,0));
+        = robust_scm2interval (tuplets[i]->get_property ("positions"),
+                               Interval (0, 0));
 
       Real other_dy = positions[RIGHT] - positions[LEFT];
 
       do
-       {
-         Real y
-           = tuplet_y.linear_combination (d * sign (other_dy));
-
-         /*
-           We don't take padding into account for nested tuplets.
-           the edges can come very close to the stems, likewise for
-           nested tuplets?
-         */
-
-         points.push_back (Offset (tuplet_x[d] - x0, y));
-       }
+        {
+          Real y
+            = tuplet_y.linear_combination (d * sign (other_dy));
+
+          /*
+            We don't take padding into account for nested tuplets.
+            the edges can come very close to the stems, likewise for
+            nested tuplets?
+          */
+
+          points.push_back (Offset (tuplet_x[d] - x0, y));
+        }
       while (flip (&d) != LEFT);
     }
 
@@ -666,7 +666,7 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
       Real tuplety = (*dy) * x * factor + my_offset;
 
       if (points[i][Y_AXIS] * dir > (*offset + tuplety) * dir)
-       *offset = points[i][Y_AXIS] - tuplety;
+        *offset = points[i][Y_AXIS] - tuplety;
     }
 
   *offset += scm_to_double (me->get_property ("padding")) * dir;
@@ -688,7 +688,7 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
 
       *offset = rint (*offset);
       if (Staff_symbol_referencer::on_line (me, (int) rint (*offset)))
-       *offset += dir;
+        *offset += dir;
 
       *offset *= 0.5 * ss;
     }
@@ -714,7 +714,7 @@ Tuplet_bracket::calc_positions (SCM smob)
   calc_position_and_height (me, &offset, &dy);
 
   SCM x = scm_cons (scm_from_double (offset),
-                   scm_from_double (offset + dy));
+                    scm_from_double (offset + dy));
 
   return x;
 }
@@ -734,7 +734,7 @@ Tuplet_bracket::get_default_dir (Grob *me)
         continue;
       Direction d = Note_column::dir (nc);
       if (d)
-       dirs[d]++;
+        dirs[d]++;
     }
 
   if (dirs[UP] == dirs[DOWN])
@@ -750,7 +750,7 @@ Tuplet_bracket::get_default_dir (Grob *me)
       for (vsize i = 0; i < columns.size (); i++)
         {
           Direction d = Note_column::dir (columns[i]);
-          extremal_positions[d] = minmax (d, 1.0*Note_column::head_positions_interval (columns[i])[d], extremal_positions[d]);
+          extremal_positions[d] = minmax (d, 1.0 * Note_column::head_positions_interval (columns[i])[d], extremal_positions[d]);
         }
       Direction d = LEFT;
       do
@@ -801,37 +801,37 @@ Tuplet_bracket::calc_cross_staff (SCM smob)
     {
       Grob *stem = unsmob_grob (cols[i]->get_object ("stem"));
       if (stem && to_boolean (stem->get_property ("cross-staff")))
-       return SCM_BOOL_T;
+        return SCM_BOOL_T;
     }
 
   return SCM_BOOL_F;
 }
 
 ADD_INTERFACE (Tuplet_bracket,
-              "A bracket with a number in the middle, used for tuplets."
-              "  When the bracket spans a line break, the value of"
-              " @code{break-overshoot} determines how far it extends"
-              " beyond the staff.  At a line break, the markups in the"
-              " @code{edge-text} are printed at the edges.",
-
-              /* properties */
-              "bracket-flare "
-              "bracket-visibility "
-              "break-overshoot "
-              "connect-to-neighbor "
-              "control-points "
-              "direction "
-              "edge-height "
-              "edge-text "
-              "full-length-padding "
-              "full-length-to-extent "
-              "gap "
-              "positions "
-              "note-columns "
-              "padding "
-              "tuplet-number "
-              "shorten-pair "
-              "staff-padding "
-              "thickness "
-              "tuplets "
-              );
+               "A bracket with a number in the middle, used for tuplets."
+               "  When the bracket spans a line break, the value of"
+               " @code{break-overshoot} determines how far it extends"
+               " beyond the staff.  At a line break, the markups in the"
+               " @code{edge-text} are printed at the edges.",
+
+               /* properties */
+               "bracket-flare "
+               "bracket-visibility "
+               "break-overshoot "
+               "connect-to-neighbor "
+               "control-points "
+               "direction "
+               "edge-height "
+               "edge-text "
+               "full-length-padding "
+               "full-length-to-extent "
+               "gap "
+               "positions "
+               "note-columns "
+               "padding "
+               "tuplet-number "
+               "shorten-pair "
+               "staff-padding "
+               "thickness "
+               "tuplets "
+              );
index 3829c98283632ed0f4583e68c99a4e577bdd23b3..c21794436cd3a21147bbc4eda6e2307980626729 100644 (file)
@@ -41,7 +41,7 @@ struct Tuplet_description
   Moment stop_moment_;
   Moment start_moment_;
   Moment length_;
-  
+
   Tuplet_description ()
   {
     event_ = 0;
@@ -61,8 +61,8 @@ protected:
   vector<Tuplet_description> tuplets_;
   vector<Tuplet_description> new_tuplets_;
   vector<Tuplet_description> stopped_tuplets_;
-  vector<Spanner*> last_tuplets_;
-  
+  vector<Spanner *> last_tuplets_;
+
   DECLARE_ACKNOWLEDGER (note_column);
   DECLARE_TRANSLATOR_LISTENER (tuplet_span);
   virtual void finalize ();
@@ -81,32 +81,32 @@ Tuplet_engraver::listen_tuplet_span (Stream_event *ev)
       d.event_ = ev;
 
       d.length_ = robust_scm2moment (d.event_->get_property ("length"),
-                                    Moment (0));
+                                     Moment (0));
       d.start_moment_ = now_mom ();
       d.stop_moment_ = now_mom () + d.length_;
 
-      for (vsize i=0; i < new_tuplets_.size (); i++)
-       {
-         /*
-           discard duplicates.
-         */
-         if (new_tuplets_[i].stop_moment_ == d.stop_moment_)
-           return;
-       }
-      
+      for (vsize i = 0; i < new_tuplets_.size (); i++)
+        {
+          /*
+            discard duplicates.
+          */
+          if (new_tuplets_[i].stop_moment_ == d.stop_moment_)
+            return;
+        }
+
       new_tuplets_.push_back (d);
     }
   else if (dir == STOP)
     {
       if (tuplets_.size ())
-       {
-         stopped_tuplets_.push_back (tuplets_.back ());
-         tuplets_.pop_back ();
-       }
-      else if (!to_boolean (get_property ("skipTypesetting"))) 
-       ev->origin ()->warning (_ ("No tuplet to end"));
+        {
+          stopped_tuplets_.push_back (tuplets_.back ());
+          tuplets_.pop_back ();
+        }
+      else if (!to_boolean (get_property ("skipTypesetting")))
+        ev->origin ()->warning (_ ("No tuplet to end"));
     }
-  else 
+  else
     ev->origin ()->programming_error ("direction tuplet-span-event_ invalid.");
 }
 
@@ -117,48 +117,48 @@ Tuplet_engraver::process_music ()
     This may happen if the end of a tuplet is part of a quoted voice.
    */
   Moment now = now_mom ();
-  for (vsize i = tuplets_.size (); i --; )
+  for (vsize i = tuplets_.size (); i--;)
     {
       if (tuplets_[i].stop_moment_ == now)
-       {
-         stopped_tuplets_.push_back (tuplets_[i]);
-         tuplets_.erase (tuplets_.begin () + i);
-       }
+        {
+          stopped_tuplets_.push_back (tuplets_[i]);
+          tuplets_.erase (tuplets_.begin () + i);
+        }
     }
-  
+
   for (vsize i = 0; i < stopped_tuplets_.size (); i++)
     {
       Spanner *bracket = stopped_tuplets_[i].bracket_;
       Spanner *number = stopped_tuplets_[i].number_;
       if (bracket)
-       {
-         if (stopped_tuplets_[i].full_length_)
-           {
-             Item *col =
-               unsmob_item (stopped_tuplets_[i].full_length_note_
-                            ? get_property ("currentMusicalColumn")
-                            : get_property ("currentCommandColumn"));
-             
-             bracket->set_bound (RIGHT, col);
-             number->set_bound (RIGHT, col);
-           }
-         else if (!bracket->get_bound (RIGHT))
-           {
-             if (bracket->get_bound (LEFT))
-               {
-                 bracket->set_bound (RIGHT,
-                                     bracket->get_bound (LEFT));
-                 number->set_bound (RIGHT,
-                                    stopped_tuplets_[i].bracket_->get_bound (LEFT));
-               }
-             else
-               programming_error ("stopped tuplet bracket has neither left nor right bound");
-           }     
-         // todo: scrap last_tuplets_, use stopped_tuplets_ only.
-         // clear stopped_tuplets_ at start_translation_timestep
-         last_tuplets_.push_back (bracket);
-         last_tuplets_.push_back (number);
-       }
+        {
+          if (stopped_tuplets_[i].full_length_)
+            {
+              Item *col
+                = unsmob_item (stopped_tuplets_[i].full_length_note_
+                               ? get_property ("currentMusicalColumn")
+                               : get_property ("currentCommandColumn"));
+
+              bracket->set_bound (RIGHT, col);
+              number->set_bound (RIGHT, col);
+            }
+          else if (!bracket->get_bound (RIGHT))
+            {
+              if (bracket->get_bound (LEFT))
+                {
+                  bracket->set_bound (RIGHT,
+                                      bracket->get_bound (LEFT));
+                  number->set_bound (RIGHT,
+                                     stopped_tuplets_[i].bracket_->get_bound (LEFT));
+                }
+              else
+                programming_error ("stopped tuplet bracket has neither left nor right bound");
+            }
+          // todo: scrap last_tuplets_, use stopped_tuplets_ only.
+          // clear stopped_tuplets_ at start_translation_timestep
+          last_tuplets_.push_back (bracket);
+          last_tuplets_.push_back (number);
+        }
     }
   stopped_tuplets_.clear ();
 
@@ -169,30 +169,28 @@ Tuplet_engraver::process_music ()
       /* i goes from size-1 downto 0, inclusively */
       vsize i = j - 1;
 
-            
       if (tuplets_[i].bracket_)
-       continue;
+        continue;
 
       tuplets_[i].full_length_ = to_boolean (get_property ("tupletFullLength"));
       tuplets_[i].full_length_note_
-       = to_boolean (get_property ("tupletFullLengthNote"));
-      
+        = to_boolean (get_property ("tupletFullLengthNote"));
+
       tuplets_[i].bracket_ = make_spanner ("TupletBracket",
-                                          tuplets_[i].event_->self_scm ());
+                                           tuplets_[i].event_->self_scm ());
       tuplets_[i].number_ = make_spanner ("TupletNumber",
-                                         tuplets_[i].event_->self_scm ());
+                                          tuplets_[i].event_->self_scm ());
       tuplets_[i].number_->set_object ("bracket", tuplets_[i].bracket_->self_scm ());
       tuplets_[i].number_->set_parent (tuplets_[i].bracket_, X_AXIS);
       tuplets_[i].number_->set_parent (tuplets_[i].bracket_, Y_AXIS);
       tuplets_[i].bracket_->set_object ("tuplet-number", tuplets_[i].number_->self_scm ());
       tuplets_[i].stop_moment_.grace_part_ = 0;
-      
-      
+
       if (i + 1 < tuplets_.size () && tuplets_[i + 1].bracket_)
-       Tuplet_bracket::add_tuplet_bracket (tuplets_[i].bracket_, tuplets_[i + 1].bracket_);
-      
+        Tuplet_bracket::add_tuplet_bracket (tuplets_[i].bracket_, tuplets_[i + 1].bracket_);
+
       if (i > 0 && tuplets_[i - 1].bracket_)
-       Tuplet_bracket::add_tuplet_bracket (tuplets_[i - 1].bracket_, tuplets_[i].bracket_);
+        Tuplet_bracket::add_tuplet_bracket (tuplets_[i - 1].bracket_, tuplets_[i].bracket_);
 
     }
 }
@@ -203,9 +201,9 @@ Tuplet_engraver::acknowledge_note_column (Grob_info inf)
   for (vsize j = 0; j < tuplets_.size (); j++)
     if (tuplets_[j].bracket_)
       {
-       Item *i = dynamic_cast<Item *> (inf.grob ());
-       Tuplet_bracket::add_column (tuplets_[j].bracket_, i);
-       add_bound_item (tuplets_[j].number_, i);
+        Item *i = dynamic_cast<Item *> (inf.grob ());
+        Tuplet_bracket::add_column (tuplets_[j].bracket_, i);
+        add_bound_item (tuplets_[j].number_, i);
       }
 }
 
@@ -216,7 +214,7 @@ Tuplet_engraver::start_translation_timestep ()
   /*
     May seem superfluous, but necessary for skipTypesetting.
    */
-  new_tuplets_.clear ();       
+  new_tuplets_.clear ();
 }
 
 void
@@ -225,8 +223,8 @@ Tuplet_engraver::finalize ()
   if (to_boolean (get_property ("tupletFullLength")))
     for (vsize i = 0; i < last_tuplets_.size (); i++)
       {
-       Item *col = unsmob_item (get_property ("currentCommandColumn"));
-       last_tuplets_[i]->set_bound (RIGHT, col);
+        Item *col = unsmob_item (get_property ("currentCommandColumn"));
+        last_tuplets_[i]->set_bound (RIGHT, col);
       }
 }
 
@@ -236,17 +234,17 @@ Tuplet_engraver::Tuplet_engraver ()
 
 ADD_ACKNOWLEDGER (Tuplet_engraver, note_column);
 ADD_TRANSLATOR (Tuplet_engraver,
-               /* doc */
-               "Catch tuplet events and generate appropriate bracket.",
-               
-               /* create */
-               "TupletBracket "
-               "TupletNumber ",
-
-               /* read */
-               "tupletFullLength "
-               "tupletFullLengthNote ",
-
-               /* write */
-               ""
-               );
+                /* doc */
+                "Catch tuplet events and generate appropriate bracket.",
+
+                /* create */
+                "TupletBracket "
+                "TupletNumber ",
+
+                /* read */
+                "tupletFullLength "
+                "tupletFullLengthNote ",
+
+                /* write */
+                ""
+               );
index 97737db0f2b8582f19f24c6213119886d20a57b6..5f3548e4905975f41392f5b5d40ca3a98dce631b 100644 (file)
@@ -63,8 +63,8 @@ Music *
 Tuplet_iterator::create_event (Direction d)
 {
   SCM ev_scm = scm_call_2 (ly_lily_module_constant ("make-span-event"),
-                          ly_symbol2scm ("TupletSpanEvent"),
-                          scm_from_int (d));
+                           ly_symbol2scm ("TupletSpanEvent"),
+                           scm_from_int (d));
 
   Music *mus = get_music ();
 
@@ -75,8 +75,8 @@ Tuplet_iterator::create_event (Direction d)
       ev->set_property ("numerator", mus->get_property ("numerator"));
       ev->set_property ("denominator", mus->get_property ("denominator"));
       ev->set_property ("tweaks", mus->get_property ("tweaks"));
-      ev->set_property ("length", spanner_duration_.smobbed_copy ()); 
-    }  
+      ev->set_property ("length", spanner_duration_.smobbed_copy ());
+    }
 
   synthesized_events_ = scm_cons (ev_scm, synthesized_events_);
   return ev;
@@ -105,22 +105,22 @@ Tuplet_iterator::process (Moment m)
     {
       descend_to_bottom_context ();
       if (tuplet_handler_.get_outlet ())
-       create_event (STOP)->send_to_context (tuplet_handler_.get_outlet ());
+        create_event (STOP)->send_to_context (tuplet_handler_.get_outlet ());
 
       if (m.main_part_ < music_get_length ().main_part_)
-       {
-         tuplet_handler_.set_context (get_outlet ());
-         report_event (create_event (START));
+        {
+          tuplet_handler_.set_context (get_outlet ());
+          report_event (create_event (START));
 
-         next_split_mom_ += spanner_duration_;
-       }
+          next_split_mom_ += spanner_duration_;
+        }
       else
-       tuplet_handler_.set_context (0);
+        tuplet_handler_.set_context (0);
     }
   Music_wrapper_iterator::process (m);
   if (child_iter_ && child_iter_->ok ())
     descend_to_child (child_iter_->get_outlet ());
-  
+
 }
 
 void
index 8a4499e2c3c62e4efbe60265d4a1160fb5f91c89..2972942ee346169e681908f838fa31b618d4afd8 100644 (file)
@@ -31,14 +31,13 @@ struct Tuplet_number
   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
   DECLARE_GROB_INTERFACE ();
 };
-  
 
 MAKE_SCHEME_CALLBACK (Tuplet_number, print, 1);
-SCM 
+SCM
 Tuplet_number::print (SCM smob)
 {
   Spanner *me = unsmob_spanner (smob);
-  Spanner *tuplet = unsmob_spanner (me->get_object ("bracket")); 
+  Spanner *tuplet = unsmob_spanner (me->get_object ("bracket"));
 
   if (!tuplet || !tuplet->is_live ())
     {
@@ -52,7 +51,7 @@ Tuplet_number::print (SCM smob)
   stc->align_to (X_AXIS, CENTER);
   stc->align_to (Y_AXIS, CENTER);
 
-  SCM cpoints =  tuplet->get_property ("control-points");
+  SCM cpoints = tuplet->get_property ("control-points");
   Drul_array<Offset> points;
   if (scm_is_pair (cpoints))
     {
@@ -64,7 +63,7 @@ Tuplet_number::print (SCM smob)
       programming_error ("wrong type for control-points");
     }
   stc->translate ((points[RIGHT] + points[LEFT]) / 2);
-  
+
   return stc_scm;
 }
 
@@ -77,11 +76,11 @@ Tuplet_number::calc_cross_staff (SCM smob)
 }
 
 ADD_INTERFACE (Tuplet_number,
-              "The number for a bracket.",
+               "The number for a bracket.",
 
-              /* properties */
-              "avoid-slur "    // UGH.
-              "bracket "
-              "direction "
-              );
+               /* properties */
+               "avoid-slur "    // UGH.
+               "bracket "
+               "direction "
+              );
 
index 1f4f75d870cbfe756bc2f02ab5966f66ad384c22..e65b56a7e91014645e0b74e04623760e16d081d0 100644 (file)
@@ -42,25 +42,25 @@ Tweak_engraver::acknowledge_grob (Grob_info info)
   if (Stream_event *ev = info.event_cause ())
     {
       for (SCM s = ev->get_property ("tweaks");
-          scm_is_pair (s); s = scm_cdr (s))
-       {
-         info.grob ()->set_property (scm_caar (s), scm_cdar (s));
-       }
+           scm_is_pair (s); s = scm_cdr (s))
+        {
+          info.grob ()->set_property (scm_caar (s), scm_cdar (s));
+        }
     }
 }
 
 ADD_ACKNOWLEDGER (Tweak_engraver, grob);
 ADD_TRANSLATOR (Tweak_engraver,
-               /* doc */
-               "Read the @code{tweaks} property from the originating event,"
-               " and set properties.",
-               
-               /* create */
-               "",
+                /* doc */
+                "Read the @code{tweaks} property from the originating event,"
+                " and set properties.",
 
-               /* read */
-               "",
+                /* create */
+                "",
 
-               /* write */
-               ""
-               );
+                /* read */
+                "",
+
+                /* write */
+                ""
+               );
index 7ee50cbfe6e42ba85155dbef8e02a02fef7e194a..737b4a29b49f78753327aae2302d139affac4a42 100644 (file)
@@ -43,18 +43,18 @@ Unfolded_repeat_iterator::get_music_list () const
   for (int i = 0; i < rep_count; i++)
     {
       if (unsmob_music (body))
-       *tail = scm_cons (body, SCM_EOL);
+        *tail = scm_cons (body, SCM_EOL);
 
       tail = SCM_CDRLOC (*tail);
 
       if (alt_count)
-       {
-         *tail = scm_cons (scm_car (alts), SCM_EOL);
-         tail = SCM_CDRLOC (*tail);
-         if (i >= rep_count - alt_count)
+        {
+          *tail = scm_cons (scm_car (alts), SCM_EOL);
+          tail = SCM_CDRLOC (*tail);
+          if (i >= rep_count - alt_count)
 
-           alts = scm_cdr (alts);
-       }
+            alts = scm_cdr (alts);
+        }
     }
 
   return l;
index 5402a8fb01da24f005a09caafe2c2b054f6bc42e..c89f0e832da5f6008a052b0a7ea2a09a861f392c 100644 (file)
@@ -64,12 +64,12 @@ class Vaticana_ligature_engraver : public Gregorian_ligature_engraver
 private:
   static bool
   need_extra_horizontal_space (int prev_prefix_set, int prefix_set,
-                              int context_info, int delta_pitch);
+                               int context_info, int delta_pitch);
   bool is_stacked_head (int prefix_set,
-                       int context_info);
+                        int context_info);
   Real align_heads (vector<Grob_info> primitives,
-                   Real flexa_width,
-                   Real thickness);
+                    Real flexa_width,
+                    Real thickness);
   void check_for_prefix_loss (Item *primitive);
   void check_for_ambiguous_dot_pitch (Grob_info primitive);
   void add_mora_column (Paper_column *column);
@@ -81,7 +81,7 @@ public:
 protected:
   virtual Spanner *create_ligature_spanner ();
   virtual void transform_heads (Spanner *ligature,
-                               vector<Grob_info> primitives);
+                                vector<Grob_info> primitives);
   DECLARE_TRANSLATOR_LISTENER (pes_or_flexa);
   DECLARE_TRANSLATOR_LISTENER (ligature);
 };
@@ -102,8 +102,8 @@ Vaticana_ligature_engraver::listen_ligature (Stream_event *ev)
 
 Vaticana_ligature_engraver::Vaticana_ligature_engraver ()
 {
-  brew_ligature_primitive_proc =
-    Vaticana_ligature::brew_ligature_primitive_proc;
+  brew_ligature_primitive_proc
+    Vaticana_ligature::brew_ligature_primitive_proc;
   augmented_primitives_.clear ();
 }
 
@@ -115,7 +115,7 @@ Vaticana_ligature_engraver::create_ligature_spanner ()
 
 bool
 Vaticana_ligature_engraver::is_stacked_head (int prefix_set,
-                                            int context_info)
+                                             int context_info)
 {
   bool is_stacked;
 
@@ -162,7 +162,7 @@ Vaticana_ligature_engraver::is_stacked_head (int prefix_set,
  */
 bool
 Vaticana_ligature_engraver::need_extra_horizontal_space (int prev_prefix_set, int prefix_set,
-                                                        int context_info, int delta_pitch)
+                                                         int context_info, int delta_pitch)
 {
   if (prev_prefix_set & VIRGA)
     /*
@@ -200,13 +200,13 @@ Vaticana_ligature_engraver::need_extra_horizontal_space (int prev_prefix_set, in
 
 Real
 Vaticana_ligature_engraver::align_heads (vector<Grob_info> primitives,
-                                        Real flexa_width,
-                                        Real thickness)
+                                         Real flexa_width,
+                                         Real thickness)
 {
   if (!primitives.size ())
     {
       programming_error ("Vaticana_ligature:"
-                        " empty ligature [ignored]");
+                         " empty ligature [ignored]");
       return 0.0;
     }
 
@@ -238,9 +238,9 @@ Vaticana_ligature_engraver::align_heads (vector<Grob_info> primitives,
     {
       Item *primitive = dynamic_cast<Item *> (primitives[i].grob ());
       int prefix_set
-       = scm_to_int (primitive->get_property ("prefix-set"));
+        = scm_to_int (primitive->get_property ("prefix-set"));
       int context_info
-       = scm_to_int (primitive->get_property ("context-info"));
+        = scm_to_int (primitive->get_property ("context-info"));
 
       /*
        * Get glyph_name, delta_pitch and context_info for this head.
@@ -248,28 +248,28 @@ Vaticana_ligature_engraver::align_heads (vector<Grob_info> primitives,
 
       SCM glyph_name_scm = primitive->get_property ("glyph-name");
       if (glyph_name_scm == SCM_EOL)
-       {
-         primitive->programming_error ("Vaticana_ligature:"
-                                       " undefined glyph-name ->"
-                                       " ignoring grob");
-         continue;
-       }
+        {
+          primitive->programming_error ("Vaticana_ligature:"
+                                        " undefined glyph-name ->"
+                                        " ignoring grob");
+          continue;
+        }
       string glyph_name = ly_scm2string (glyph_name_scm);
 
       int delta_pitch = 0;
       if (prev_primitive) /* urgh, need prev_primitive only here */
-       {
-         SCM delta_pitch_scm = prev_primitive->get_property ("delta-position");
-         if (delta_pitch_scm != SCM_EOL)
-           delta_pitch = scm_to_int (delta_pitch_scm);
-         else
-           {
-             primitive->programming_error ("Vaticana_ligature:"
-                                           " delta-position undefined ->"
-                                           " ignoring grob");
-             continue;
-           }
-       }
+        {
+          SCM delta_pitch_scm = prev_primitive->get_property ("delta-position");
+          if (delta_pitch_scm != SCM_EOL)
+            delta_pitch = scm_to_int (delta_pitch_scm);
+          else
+            {
+              primitive->programming_error ("Vaticana_ligature:"
+                                            " delta-position undefined ->"
+                                            " ignoring grob");
+              continue;
+            }
+        }
 
       /*
        * Now determine width and x-offset of head.
@@ -279,45 +279,45 @@ Vaticana_ligature_engraver::align_heads (vector<Grob_info> primitives,
       Real x_offset;
 
       if (context_info & STACKED_HEAD)
-       {
-         /*
-          * This head is stacked upon the previous one; hence, it
-          * does not contribute to the total width of the ligature,
-          * and its width is assumed to be 0.0.  Moreover, it is
-          * shifted to the left by its width such that the right side
-          * of this and the other head are horizontally aligned.
-          */
-         head_width = 0.0;
-         x_offset = join_thickness
-           - Font_interface::get_default_font (primitive)->
-           find_by_name ("noteheads.s" + glyph_name).extent (X_AXIS).length ();
-       }
+        {
+          /*
+           * This head is stacked upon the previous one; hence, it
+           * does not contribute to the total width of the ligature,
+           * and its width is assumed to be 0.0.  Moreover, it is
+           * shifted to the left by its width such that the right side
+           * of this and the other head are horizontally aligned.
+           */
+          head_width = 0.0;
+          x_offset = join_thickness
+                     - Font_interface::get_default_font (primitive)->
+                     find_by_name ("noteheads.s" + glyph_name).extent (X_AXIS).length ();
+        }
       else if (glyph_name == "flexa" || glyph_name == "")
-       {
-         /*
-          * This head represents either half of a flexa shape.
-          * Hence, it is assigned half the width of this shape.
-          */
-         head_width = 0.5 * flexa_width;
-         x_offset = 0.0;
-       }
+        {
+          /*
+           * This head represents either half of a flexa shape.
+           * Hence, it is assigned half the width of this shape.
+           */
+          head_width = 0.5 * flexa_width;
+          x_offset = 0.0;
+        }
       else
-       {
-         /*
-          * This is a regular head, placed right to the previous one.
-          * Retrieve its width from corresponding font.
-          */
-         head_width
-           = Font_interface::get_default_font (primitive)->
-           find_by_name ("noteheads.s" + glyph_name).extent (X_AXIS).length ();
-         x_offset = 0.0;
-       }
+        {
+          /*
+           * This is a regular head, placed right to the previous one.
+           * Retrieve its width from corresponding font.
+           */
+          head_width
+            = Font_interface::get_default_font (primitive)->
+              find_by_name ("noteheads.s" + glyph_name).extent (X_AXIS).length ();
+          x_offset = 0.0;
+        }
 
       /*
        * Save the head's final x-offset.
        */
       primitive->set_property ("x-offset",
-                              scm_from_double (x_offset));
+                               scm_from_double (x_offset));
 
       /*
        * If the head is the 2nd head of a pes or flexa (but not a
@@ -325,39 +325,39 @@ Vaticana_ligature_engraver::align_heads (vector<Grob_info> primitives,
        * neighbour head (i.e. the previous head) by a vertical beam.
        */
       if ((context_info & PES_UPPER)
-         || ((context_info & FLEXA_RIGHT)
-             && ! (context_info & PES_LOWER)))
-       {
-         if (!prev_primitive)
-           {
-             primitive->programming_error ("Vaticana ligature: add-join:"
-                                           " missing previous primitive");
-           }
-         else
-           {
-             prev_primitive->set_property ("add-join",
-                                           ly_bool2scm (true));
-
-             /*
-              * Create a small overlap of adjacent heads so that the join
-              * can be drawn perfectly between them.
-              */
-             ligature_width -= join_thickness;
-           }
-       }
+          || ((context_info & FLEXA_RIGHT)
+              && ! (context_info & PES_LOWER)))
+        {
+          if (!prev_primitive)
+            {
+              primitive->programming_error ("Vaticana ligature: add-join:"
+                                            " missing previous primitive");
+            }
+          else
+            {
+              prev_primitive->set_property ("add-join",
+                                            ly_bool2scm (true));
+
+              /*
+               * Create a small overlap of adjacent heads so that the join
+               * can be drawn perfectly between them.
+               */
+              ligature_width -= join_thickness;
+            }
+        }
       else if (glyph_name == "")
-       {
-         /*
-          * This is the 2nd (virtual) head of flexa shape.  Join it
-          * tightly with 1st head, i.e. do *not* add additional
-          * space, such that next head will not be off from the flexa
-          * shape.
-          */
-       }
+        {
+          /*
+           * This is the 2nd (virtual) head of flexa shape.  Join it
+           * tightly with 1st head, i.e. do *not* add additional
+           * space, such that next head will not be off from the flexa
+           * shape.
+           */
+        }
 
       if (need_extra_horizontal_space (prev_prefix_set, prefix_set,
-                                      context_info, delta_pitch))
-       ligature_width += extra_space;
+                                       context_info, delta_pitch))
+        ligature_width += extra_space;
 
       /*
        * Horizontally line-up this head to form a ligature.
@@ -398,9 +398,9 @@ Vaticana_ligature_engraver::check_for_prefix_loss (Item *primitive)
     {
       string prefs = Gregorian_ligature::prefixes_to_str (primitive);
       primitive->warning (_f ("ignored prefix(es) `%s' of this head"
-                             " according to restrictions of the selected"
-                             " ligature style",
-                             prefs.c_str ()));
+                              " according to restrictions of the selected"
+                              " ligature style",
+                              prefs.c_str ()));
     }
 }
 
@@ -412,15 +412,15 @@ Vaticana_ligature_engraver::add_mora_column (Paper_column *column)
   if (!column) // empty ligature???
     {
       augmented_primitives_[0].grob ()->
-       programming_error ("no paper column to add dot");
+      programming_error ("no paper column to add dot");
       return;
     }
   Item *dotcol = make_item ("DotColumn", SCM_EOL);
   dotcol->set_parent (column, X_AXIS);
   for (vsize i = 0; i < augmented_primitives_.size (); i++)
     {
-      Item *primitive =
-       dynamic_cast<Item *> (augmented_primitives_[i].grob ());
+      Item *primitive
+        = dynamic_cast<Item *> (augmented_primitives_[i].grob ());
       Item *dot = make_item ("Dots", primitive->self_scm ());
       dot->set_property ("dot-count", scm_from_int (1));
       dot->set_parent (primitive, Y_AXIS);
@@ -461,19 +461,19 @@ Vaticana_ligature_engraver::check_for_ambiguous_dot_pitch (Grob_info primitive)
       Stream_event *cause = augmented_primitives_[i].event_cause ();
       int pitch = unsmob_pitch (cause->get_property ("pitch"))->steps ();
       if (pitch == new_pitch)
-       {
-         primitive.grob ()->
-           warning ("Ambiguous use of dots in ligature: there are"
-                    " multiple dotted notes with the same pitch."
-                    "  The ligature should be split.");
-         return; // supress multiple identical warnings
-       }
+        {
+          primitive.grob ()->
+          warning ("Ambiguous use of dots in ligature: there are"
+                   " multiple dotted notes with the same pitch."
+                   "  The ligature should be split.");
+          return; // supress multiple identical warnings
+        }
     }
 }
 
 void
 Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
-                                            vector<Grob_info> primitives)
+                                             vector<Grob_info> primitives)
 {
   Real flexa_width = robust_scm2double (ligature->get_property ("flexa-width"), 2);
 
@@ -492,47 +492,47 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
       int delta_pitch;
       SCM delta_pitch_scm = primitive->get_property ("delta-position");
       if (delta_pitch_scm != SCM_EOL)
-       delta_pitch = scm_to_int (delta_pitch_scm);
+        delta_pitch = scm_to_int (delta_pitch_scm);
       else
-       {
-         primitive->programming_error ("Vaticana_ligature:"
-                                       " delta-position undefined ->"
-                                       " ignoring grob");
-         continue;
-       }
+        {
+          primitive->programming_error ("Vaticana_ligature:"
+                                        " delta-position undefined ->"
+                                        " ignoring grob");
+          continue;
+        }
 
       /* retrieve & complete prefix_set and context_info */
       int prefix_set
-       = scm_to_int (primitive->get_property ("prefix-set"));
+        = scm_to_int (primitive->get_property ("prefix-set"));
       int context_info
-       = scm_to_int (primitive->get_property ("context-info"));
+        = scm_to_int (primitive->get_property ("context-info"));
 
       if (Rhythmic_head::dot_count (primitive) > 0)
-       // remove dots from primitive and add remember primitive for
-       // creating a dot column
-       {
-         Rhythmic_head::get_dots (primitive)->set_property ("dot-count",
-                                                            scm_from_int (0));
-         // TODO: Maybe completely remove grob "Dots" (dots->suicide
-         // () ?) rather than setting property "dot-count" to 0.
-
-         check_for_ambiguous_dot_pitch (primitives[i]);
-         augmented_primitives_.push_back (primitives[i]);
-       }
+        // remove dots from primitive and add remember primitive for
+        // creating a dot column
+        {
+          Rhythmic_head::get_dots (primitive)->set_property ("dot-count",
+                                                             scm_from_int (0));
+          // TODO: Maybe completely remove grob "Dots" (dots->suicide
+          // () ?) rather than setting property "dot-count" to 0.
+
+          check_for_ambiguous_dot_pitch (primitives[i]);
+          augmented_primitives_.push_back (primitives[i]);
+        }
       else if (augmented_primitives_.size () > 0)
-       {
-         primitive->warning ("This ligature has a dotted head followed by"
-                             " a non-dotted head.  The ligature should be"
-                             " split after the last dotted head before"
-                             " this head.");
-       }
+        {
+          primitive->warning ("This ligature has a dotted head followed by"
+                              " a non-dotted head.  The ligature should be"
+                              " split after the last dotted head before"
+                              " this head.");
+        }
 
       if (is_stacked_head (prefix_set, context_info))
-       {
-         context_info |= STACKED_HEAD;
-         primitive->set_property ("context-info",
-                                  scm_from_int (context_info));
-       }
+        {
+          context_info |= STACKED_HEAD;
+          primitive->set_property ("context-info",
+                                   scm_from_int (context_info));
+        }
 
       /*
        * Now determine which head to typeset (this is context sensitive
@@ -542,118 +542,118 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
        */
       string glyph_name;
       if (prefix_set & VIRGA)
-       {
-         glyph_name = "vaticana.punctum";
-         primitive->set_property ("add-stem", ly_bool2scm (true));
-       }
+        {
+          glyph_name = "vaticana.punctum";
+          primitive->set_property ("add-stem", ly_bool2scm (true));
+        }
       else if (prefix_set & QUILISMA)
-       glyph_name = "vaticana.quilisma";
+        glyph_name = "vaticana.quilisma";
       else if (prefix_set & ORISCUS)
-       glyph_name = "solesmes.oriscus";
+        glyph_name = "solesmes.oriscus";
       else if (prefix_set & STROPHA)
-       if (prefix_set & AUCTUM)
-         glyph_name = "solesmes.stropha.aucta";
-       else glyph_name = "solesmes.stropha";
+        if (prefix_set & AUCTUM)
+          glyph_name = "solesmes.stropha.aucta";
+        else glyph_name = "solesmes.stropha";
       else if (prefix_set & INCLINATUM)
-       if (prefix_set & AUCTUM)
-         glyph_name = "solesmes.incl.auctum";
-       else if (prefix_set & DEMINUTUM)
-         glyph_name = "solesmes.incl.parvum";
-       else
-         glyph_name = "vaticana.inclinatum";
+        if (prefix_set & AUCTUM)
+          glyph_name = "solesmes.incl.auctum";
+        else if (prefix_set & DEMINUTUM)
+          glyph_name = "solesmes.incl.parvum";
+        else
+          glyph_name = "vaticana.inclinatum";
       else if (prefix_set & DEMINUTUM)
-       {
-         if (i == 0)
-           {
-             // initio debilis
-             glyph_name = "vaticana.reverse.plica";
-           }
-         else if (prev_delta_pitch > 0)
-           {
-             // epiphonus
-             if (! (prev_context_info & FLEXA_RIGHT))
-               {
-                 /* correct head of previous primitive */
-                 if (prev_delta_pitch > 1)
-                   prev_glyph_name = "vaticana.epiphonus";
-                 else
-                   prev_glyph_name = "vaticana.vepiphonus";
-               }
-             if (prev_delta_pitch > 1)
-               glyph_name = "vaticana.plica";
-             else
-               glyph_name = "vaticana.vplica";
-           }
-         else if (prev_delta_pitch < 0)
-           {
-             // cephalicus
-             if (! (prev_context_info & FLEXA_RIGHT))
-               /* correct head of previous primitive */
-               {
-                 if (i > 1)
-                   {
-                     /* cephalicus head with fixed size cauda */
-                     prev_glyph_name = "vaticana.inner.cephalicus";
-                   }
-                 else
-                   {
-                     /* cephalicus head without cauda */
-                     prev_glyph_name = "vaticana.cephalicus";
-                   }
-
-                 /*
-                  * Flexa has no variable size cauda if its left head is
-                  * stacked on the right head.  This is true for
-                  * cephalicus.  Hence, remove the cauda.
-                  *
-                  * Urgh: for the current implementation, this rule only
-                  * applies for cephalicus; but it is a fundamental rule.
-                  * Therefore, the following line of code should be
-                  * placed somewhere else.
-                  */
-                 prev_primitive->set_property ("add-cauda",
-                                               ly_bool2scm (false));
-               }
-             if (prev_delta_pitch < - 1)
-               glyph_name = "vaticana.reverse.plica";
-             else
-               glyph_name = "vaticana.reverse.vplica";
-           }
-         else // (prev_delta_pitch == 0)
-           {
-             primitive->programming_error ("Vaticana_ligature:"
-                                           " deminutum head must have different"
-                                           " pitch -> ignoring grob");
-           }
-       }
+        {
+          if (i == 0)
+            {
+              // initio debilis
+              glyph_name = "vaticana.reverse.plica";
+            }
+          else if (prev_delta_pitch > 0)
+            {
+              // epiphonus
+              if (! (prev_context_info & FLEXA_RIGHT))
+                {
+                  /* correct head of previous primitive */
+                  if (prev_delta_pitch > 1)
+                    prev_glyph_name = "vaticana.epiphonus";
+                  else
+                    prev_glyph_name = "vaticana.vepiphonus";
+                }
+              if (prev_delta_pitch > 1)
+                glyph_name = "vaticana.plica";
+              else
+                glyph_name = "vaticana.vplica";
+            }
+          else if (prev_delta_pitch < 0)
+            {
+              // cephalicus
+              if (! (prev_context_info & FLEXA_RIGHT))
+                /* correct head of previous primitive */
+                {
+                  if (i > 1)
+                    {
+                      /* cephalicus head with fixed size cauda */
+                      prev_glyph_name = "vaticana.inner.cephalicus";
+                    }
+                  else
+                    {
+                      /* cephalicus head without cauda */
+                      prev_glyph_name = "vaticana.cephalicus";
+                    }
+
+                  /*
+                   * Flexa has no variable size cauda if its left head is
+                   * stacked on the right head.  This is true for
+                   * cephalicus.  Hence, remove the cauda.
+                   *
+                   * Urgh: for the current implementation, this rule only
+                   * applies for cephalicus; but it is a fundamental rule.
+                   * Therefore, the following line of code should be
+                   * placed somewhere else.
+                   */
+                  prev_primitive->set_property ("add-cauda",
+                                                ly_bool2scm (false));
+                }
+              if (prev_delta_pitch < - 1)
+                glyph_name = "vaticana.reverse.plica";
+              else
+                glyph_name = "vaticana.reverse.vplica";
+            }
+          else // (prev_delta_pitch == 0)
+            {
+              primitive->programming_error ("Vaticana_ligature:"
+                                            " deminutum head must have different"
+                                            " pitch -> ignoring grob");
+            }
+        }
       else if (prefix_set & (CAVUM | LINEA))
-       if ((prefix_set & CAVUM) && (prefix_set & LINEA))
-         glyph_name = "vaticana.linea.punctum.cavum";
-       else if (prefix_set & CAVUM)
-         glyph_name = "vaticana.punctum.cavum";
-       else
-         glyph_name = "vaticana.linea.punctum";
+        if ((prefix_set & CAVUM) && (prefix_set & LINEA))
+          glyph_name = "vaticana.linea.punctum.cavum";
+        else if (prefix_set & CAVUM)
+          glyph_name = "vaticana.punctum.cavum";
+        else
+          glyph_name = "vaticana.linea.punctum";
       else if (prefix_set & AUCTUM)
-       if (prefix_set & ASCENDENS)
-         glyph_name = "solesmes.auct.asc";
-       else
-         glyph_name = "solesmes.auct.desc";
+        if (prefix_set & ASCENDENS)
+          glyph_name = "solesmes.auct.asc";
+        else
+          glyph_name = "solesmes.auct.desc";
       else if ((context_info & STACKED_HEAD)
-              && (context_info & PES_UPPER))
-       if (prev_delta_pitch > 1)
-         glyph_name = "vaticana.upes";
-       else
-         glyph_name = "vaticana.vupes";
+               && (context_info & PES_UPPER))
+        if (prev_delta_pitch > 1)
+          glyph_name = "vaticana.upes";
+        else
+          glyph_name = "vaticana.vupes";
       else
-       glyph_name = "vaticana.punctum";
+        glyph_name = "vaticana.punctum";
 
       /*
        * This head needs a cauda, if it starts a flexa, is not the upper
        * head of a pes, and if it is a punctum.
        */
       if ((context_info & FLEXA_LEFT) && ! (context_info & PES_UPPER))
-       if (glyph_name == "vaticana.punctum")
-         primitive->set_property ("add-cauda", ly_bool2scm (true));
+        if (glyph_name == "vaticana.punctum")
+          primitive->set_property ("add-cauda", ly_bool2scm (true));
 
       /*
        * Execptional rule for porrectus:
@@ -663,21 +663,21 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
        * the previous head into a single curved flexa shape.
        */
       if ((context_info & FLEXA_RIGHT) && (context_info & PES_LOWER))
-       {
-         check_for_prefix_loss (prev_primitive);
-         prev_glyph_name = "flexa";
-         prev_primitive->set_property ("flexa-height",
-                                       scm_from_int (prev_delta_pitch));
-         prev_primitive->set_property ("flexa-width",
-                                       scm_from_double (flexa_width));
-         bool add_cauda = !(prev_prefix_set && PES_OR_FLEXA);
-         prev_primitive->set_property ("add-cauda",
-                                       ly_bool2scm (add_cauda));
-         check_for_prefix_loss (primitive);
-         glyph_name = "";
-         primitive->set_property ("flexa-width",
-                                  scm_from_double (flexa_width));
-       }
+        {
+          check_for_prefix_loss (prev_primitive);
+          prev_glyph_name = "flexa";
+          prev_primitive->set_property ("flexa-height",
+                                        scm_from_int (prev_delta_pitch));
+          prev_primitive->set_property ("flexa-width",
+                                        scm_from_double (flexa_width));
+          bool add_cauda = !(prev_prefix_set && PES_OR_FLEXA);
+          prev_primitive->set_property ("add-cauda",
+                                        ly_bool2scm (add_cauda));
+          check_for_prefix_loss (primitive);
+          glyph_name = "";
+          primitive->set_property ("flexa-width",
+                                   scm_from_double (flexa_width));
+        }
 
       /*
        * Exceptional rule for pes:
@@ -688,22 +688,22 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
        * current head.
        */
       if (prefix_set & PES_OR_FLEXA)
-       {
-         if ((context_info & PES_UPPER) && (context_info & STACKED_HEAD))
-           {
-             if (prev_glyph_name == "vaticana.punctum")
-               {
-                 if (prev_delta_pitch > 1)
-                   prev_glyph_name = "vaticana.lpes";
-                 else
-                   prev_glyph_name = "vaticana.vlpes";
-               }
-           }
-       }
+        {
+          if ((context_info & PES_UPPER) && (context_info & STACKED_HEAD))
+            {
+              if (prev_glyph_name == "vaticana.punctum")
+                {
+                  if (prev_delta_pitch > 1)
+                    prev_glyph_name = "vaticana.lpes";
+                  else
+                    prev_glyph_name = "vaticana.vlpes";
+                }
+            }
+        }
 
       if (prev_primitive)
-       prev_primitive->set_property ("glyph-name",
-                                     ly_string2scm (prev_glyph_name));
+        prev_primitive->set_property ("glyph-name",
+                                      ly_string2scm (prev_glyph_name));
 
       /*
        * In the backend, flexa shapes and joins need to know about line
@@ -721,7 +721,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
     }
 
   prev_primitive->set_property ("glyph-name",
-                               ly_string2scm (prev_glyph_name));
+                                ly_string2scm (prev_glyph_name));
 
   align_heads (primitives, flexa_width, thickness);
 
@@ -734,27 +734,27 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
   Item *first_primitive = dynamic_cast<Item *> (primitives[0].grob ());
   Paper_column *paper_column = first_primitive->get_column ();
   paper_column->warning (_f ("Vaticana_ligature_engraver:"
-                            " setting `spacing-increment = %f': ptr =%ul",
-                            ligature_width, paper_column));
+                             " setting `spacing-increment = %f': ptr =%ul",
+                             ligature_width, paper_column));
   paper_column->
-    set_property ("forced-spacing", scm_from_double (ligature_width));
+  set_property ("forced-spacing", scm_from_double (ligature_width));
 #endif
 }
 
 ADD_ACKNOWLEDGER (Vaticana_ligature_engraver, rest);
 ADD_ACKNOWLEDGER (Vaticana_ligature_engraver, ligature_head);
 ADD_TRANSLATOR (Vaticana_ligature_engraver,
-               /* doc */
-               "Handle ligatures by glueing special ligature heads"
-               " together.",
+                /* doc */
+                "Handle ligatures by glueing special ligature heads"
+                " together.",
 
-               /* create */
-               "VaticanaLigature "
-               "DotColumn ",
+                /* create */
+                "VaticanaLigature "
+                "DotColumn ",
 
-               /* read */
-               "",
+                /* read */
+                "",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index 7a00cff3003b9075d3278a9f11cc72900dd8eaeb..42511f7243f141c7071630eeb5b94fad823d8ee5 100644 (file)
 
 Stencil
 vaticana_brew_cauda (Grob *me,
-                    int pos,
-                    int delta_pitch,
-                    Real thickness,
-                    Real blotdiameter)
+                     int pos,
+                     int delta_pitch,
+                     Real thickness,
+                     Real blotdiameter)
 {
   bool on_staffline = Staff_symbol_referencer::on_line (me, pos);
   int interspaces = Staff_symbol_referencer::line_count (me) - 1;
@@ -49,25 +49,25 @@ vaticana_brew_cauda (Grob *me,
   if (on_staffline)
     {
       if (delta_pitch >= -1)
-       length = 1.30;
+        length = 1.30;
       else if (delta_pitch >= -2)
-       length = 1.35;
+        length = 1.35;
       else
-       length = 1.85;
+        length = 1.85;
     }
   else
     {
       if (delta_pitch >= -1)
-       if (above_staff)
-         length = 1.30;
-       else
-         length = 1.00;
+        if (above_staff)
+          length = 1.30;
+        else
+          length = 1.00;
       else if (delta_pitch >= -2)
-       length = 1.35;
+        length = 1.35;
       else if (delta_pitch >= -3)
-       length = 1.50;
+        length = 1.50;
       else
-       length = 1.85;
+        length = 1.85;
     }
   Box cauda_box (Interval (0, thickness), Interval (-length, 0));
   return Lookup::round_filled_box (cauda_box, blotdiameter);
@@ -78,8 +78,8 @@ vaticana_brew_cauda (Grob *me,
  */
 Stencil
 vaticana_brew_flexa (Grob *me,
-                    bool solid,
-                    Real line_thickness)
+                     bool solid,
+                     Real line_thickness)
 {
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Stencil stencil;
@@ -92,7 +92,7 @@ vaticana_brew_flexa (Grob *me,
   else
     {
       me->warning ("Vaticana_ligature: "
-                  + _ ("flexa-height undefined; assuming 0"));
+                   + _ ("flexa-height undefined; assuming 0"));
       interval = 0.0;
     }
 
@@ -107,7 +107,7 @@ vaticana_brew_flexa (Grob *me,
    */
   Real left_height
     = right_height
-    + min (0.12 * abs (interval), 0.3) * staff_space;
+      + min (0.12 * abs (interval), 0.3) * staff_space;
 
   /*
    * Compensate optical illusion regarding vertical position of left
@@ -137,7 +137,7 @@ vaticana_brew_flexa (Grob *me,
   if (solid)
     {
       Stencil solid_head
-       = Lookup::bezier_sandwich (top_curve, bottom_curve, 0.0);
+        = Lookup::bezier_sandwich (top_curve, bottom_curve, 0.0);
       stencil.add_stencil (solid_head);
     }
   else // outline
@@ -145,13 +145,13 @@ vaticana_brew_flexa (Grob *me,
       Bezier inner_top_curve = top_curve;
       inner_top_curve.translate (Offset (0.0, -line_thickness));
       Stencil top_edge
-       = Lookup::bezier_sandwich (top_curve, inner_top_curve, 0.0);
+        = Lookup::bezier_sandwich (top_curve, inner_top_curve, 0.0);
       stencil.add_stencil (top_edge);
 
       Bezier inner_bottom_curve = bottom_curve;
       inner_bottom_curve.translate (Offset (0.0, +line_thickness));
       Stencil bottom_edge
-       = Lookup::bezier_sandwich (bottom_curve, inner_bottom_curve, 0.0);
+        = Lookup::bezier_sandwich (bottom_curve, inner_bottom_curve, 0.0);
       stencil.add_stencil (bottom_edge);
 
       /*
@@ -163,12 +163,12 @@ vaticana_brew_flexa (Grob *me,
        * the left end of the bezier curve.
        */
       Box left_edge_box (Interval (0, line_thickness),
-                        Interval (-0.5 * left_height, +0.5 * left_height));
+                         Interval (-0.5 * left_height, +0.5 * left_height));
       Stencil left_edge = Lookup::filled_box (left_edge_box);
       stencil.add_stencil (left_edge);
 
       Box right_edge_box (Interval (-line_thickness, 0),
-                         Interval (-0.5 * right_height, +0.5 * right_height));
+                          Interval (-0.5 * right_height, +0.5 * right_height));
       Stencil right_edge = Lookup::filled_box (right_edge_box);
       right_edge.translate_axis (width, X_AXIS);
       right_edge.translate_axis (corrected_interval / 2.0, Y_AXIS);
@@ -180,19 +180,19 @@ vaticana_brew_flexa (Grob *me,
 
 Stencil
 vaticana_brew_join (Grob *me, int delta_pitch,
-                   Real join_thickness, Real blotdiameter)
+                    Real join_thickness, Real blotdiameter)
 {
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   if (!delta_pitch)
     {
       me->programming_error (_ ("Vaticana_ligature: "
-                               "zero join (delta_pitch == 0)"));
+                                "zero join (delta_pitch == 0)"));
       return Lookup::blank (Box (Interval (0, 0), Interval (0, 0)));
     }
   Interval x_extent = Interval (0, join_thickness);
   Interval y_extent = (delta_pitch > 0)
-    ? Interval (0, delta_pitch * 0.5 * staff_space) : // ascending join
-    Interval (delta_pitch * 0.5 * staff_space, 0); // descending join
+                      ? Interval (0, delta_pitch * 0.5 * staff_space) : // ascending join
+                      Interval (delta_pitch * 0.5 * staff_space, 0); // descending join
   Box join_box (x_extent, y_extent);
   return Lookup::round_filled_box (join_box, blotdiameter);
 }
@@ -204,7 +204,7 @@ vaticana_brew_primitive (Grob *me)
   if (glyph_name_scm == SCM_EOL)
     {
       me->programming_error ("Vaticana_ligature: "
-                            "undefined glyph-name -> ignoring grob");
+                             "undefined glyph-name -> ignoring grob");
       return Lookup::blank (Box (Interval (0, 0), Interval (0, 0)));
     }
 
@@ -246,15 +246,15 @@ vaticana_brew_primitive (Grob *me)
       Real staff_space = Staff_symbol_referencer::staff_space (me);
       Real flexa_width = robust_scm2double (me->get_property ("flexa-width"), 2) * staff_space;
       out
-       = Lookup::blank (Box (Interval (0, 0.5 * flexa_width), Interval (0, 0)));
+        = Lookup::blank (Box (Interval (0, 0.5 * flexa_width), Interval (0, 0)));
     }
   else if (glyph_name == "flexa")
     out = vaticana_brew_flexa (me, true, line_thickness);
   else
     {
       out
-       = Font_interface::get_default_font (me)->
-       find_by_name ("noteheads.s" + glyph_name);
+        = Font_interface::get_default_font (me)->
+          find_by_name ("noteheads.s" + glyph_name);
     }
   out.translate_axis (x_offset, X_AXIS);
   Real head_width = out.extent (X_AXIS).length ();
@@ -262,16 +262,16 @@ vaticana_brew_primitive (Grob *me)
   if (add_cauda)
     {
       Stencil cauda
-       = vaticana_brew_cauda (me, pos, delta_pitch,
-                              line_thickness, blotdiameter);
+        = vaticana_brew_cauda (me, pos, delta_pitch,
+                               line_thickness, blotdiameter);
       out.add_stencil (cauda);
     }
 
   if (add_stem)
     {
       Stencil stem
-       = vaticana_brew_cauda (me, pos, -1,
-                              line_thickness, blotdiameter);
+        = vaticana_brew_cauda (me, pos, -1,
+                               line_thickness, blotdiameter);
       stem.translate_axis (head_width - line_thickness, X_AXIS);
       out.add_stencil (stem);
     }
@@ -279,7 +279,7 @@ vaticana_brew_primitive (Grob *me)
   if (add_join)
     {
       Stencil join
-       = vaticana_brew_join (me, delta_pitch, line_thickness, blotdiameter);
+        = vaticana_brew_join (me, delta_pitch, line_thickness, blotdiameter);
       join.translate_axis (head_width - line_thickness, X_AXIS);
       out.add_stencil (join);
     }
@@ -304,16 +304,16 @@ Vaticana_ligature::print (SCM)
 }
 
 ADD_INTERFACE (Vaticana_ligature,
-              "A vaticana style Gregorian ligature.",
-
-              /* properties */
-              "glyph-name "
-              "flexa-height "
-              "flexa-width "
-              "thickness "
-              "add-cauda "
-              "add-stem "
-              "add-join "
-              "delta-position "
-              "x-offset "
-              );
+               "A vaticana style Gregorian ligature.",
+
+               /* properties */
+               "glyph-name "
+               "flexa-height "
+               "flexa-width "
+               "thickness "
+               "add-cauda "
+               "add-stem "
+               "add-join "
+               "delta-position "
+               "x-offset "
+              );
index 570340f8d94dbc8254328b0e8cc6e84caad6cce1..d7184e37fdac6c9877e6c5a674ad717bc0f6a0b2 100644 (file)
@@ -50,20 +50,20 @@ protected:
 
 ADD_ACKNOWLEDGER (Vertical_align_engraver, axis_group);
 ADD_TRANSLATOR (Vertical_align_engraver,
-               /* doc */
-               "Catch groups (staves, lyrics lines, etc.) and stack them"
-               " vertically.",
+                /* doc */
+                "Catch groups (staves, lyrics lines, etc.) and stack them"
+                " vertically.",
 
-               /* create */
-               "VerticalAlignment ",
+                /* create */
+                "VerticalAlignment ",
 
-               /* read */
-               "alignAboveContext "
-               "alignBelowContext ",
+                /* read */
+                "alignAboveContext "
+                "alignBelowContext ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
 
 Vertical_align_engraver::Vertical_align_engraver ()
 {
@@ -113,9 +113,9 @@ Vertical_align_engraver::qualifies (Grob_info i) const
   int sz = i.origin_contexts ((Translator *)this).size ();
 
   return sz > 0 && Axis_group_interface::has_interface (i.grob ())
-    && !i.grob ()->get_parent (Y_AXIS)
-    && !to_boolean (i.grob ()->get_property ("no-alignment"))
-    && Axis_group_interface::has_axis (i.grob (), Y_AXIS);
+         && !i.grob ()->get_parent (Y_AXIS)
+         && !to_boolean (i.grob ()->get_property ("no-alignment"))
+         && Axis_group_interface::has_axis (i.grob (), Y_AXIS);
 }
 
 void
@@ -126,7 +126,7 @@ Vertical_align_engraver::acknowledge_axis_group (Grob_info i)
       string id = i.context ()->id_string ();
 
       scm_hash_set_x (id_to_group_hashtab_, ly_string2scm (id),
-                     i.grob ()->self_scm ());
+                      i.grob ()->self_scm ());
 
       SCM before_id = i.context ()->get_property ("alignAboveContext");
       SCM after_id = i.context ()->get_property ("alignBelowContext");
@@ -138,40 +138,40 @@ Vertical_align_engraver::acknowledge_axis_group (Grob_info i)
       Grob *after_grob = unsmob_grob (after);
 
       Align_interface::add_element (valign_, i.grob ());
-       
+
       if (before_grob || after_grob)
-       {
-         Grob_array *ga = unsmob_grob_array (valign_->get_object ("elements"));
-         vector<Grob*> &arr = ga->array_reference ();
-
-         Grob *added = arr.back ();
-         arr.pop_back ();
-         for (vsize i = 0; i < arr.size (); i++)
-           {
-             if (arr[i] == before_grob)
-               {
-                 arr.insert (arr.begin () + i, added);
-
-                 /* Only set staff affinity if it already has one.  That way we won't
-                    set staff-affinity on things that don't want it (like staves). */
-                 if (scm_is_number (added->get_property ("staff-affinity")))
-                   added->set_property ("staff-affinity", scm_from_int (DOWN));
-                 break;
-               }
-             else if (arr[i] == after_grob)
-               {
-                 arr.insert (arr.begin () + i + 1, added);
-                 if (scm_is_number (added->get_property ("staff-affinity")))
-                   added->set_property ("staff-affinity", scm_from_int (UP));
-                 break;
-               }
-           }
-       }
+        {
+          Grob_array *ga = unsmob_grob_array (valign_->get_object ("elements"));
+          vector<Grob *> &arr = ga->array_reference ();
+
+          Grob *added = arr.back ();
+          arr.pop_back ();
+          for (vsize i = 0; i < arr.size (); i++)
+            {
+              if (arr[i] == before_grob)
+                {
+                  arr.insert (arr.begin () + i, added);
+
+                  /* Only set staff affinity if it already has one.  That way we won't
+                     set staff-affinity on things that don't want it (like staves). */
+                  if (scm_is_number (added->get_property ("staff-affinity")))
+                    added->set_property ("staff-affinity", scm_from_int (DOWN));
+                  break;
+                }
+              else if (arr[i] == after_grob)
+                {
+                  arr.insert (arr.begin () + i + 1, added);
+                  if (scm_is_number (added->get_property ("staff-affinity")))
+                    added->set_property ("staff-affinity", scm_from_int (UP));
+                  break;
+                }
+            }
+        }
     }
   else if (qualifies (i))
     {
       Pointer_group_interface::add_grob (valign_, ly_symbol2scm ("elements"), i.grob ());
       if (!unsmob_grob (i.grob ()->get_object ("staff-grouper")))
-       i.grob ()->set_object ("staff-grouper", valign_->self_scm ());
+        i.grob ()->set_object ("staff-grouper", valign_->self_scm ());
     }
 }
index 6877a1a2eb05f7046eb04bf55b34652760524788..8a42dde4697f21e9ddf3a2616ab82a23952be588 100644 (file)
@@ -49,8 +49,8 @@ Volta_bracket_interface::print (SCM smob)
   Spanner *me = unsmob_spanner (smob);
   Spanner *orig_span = dynamic_cast<Spanner *> (me->original ());
   bool broken_first_bracket = orig_span && (orig_span->broken_intos_[0]
-                                           == (Spanner *)me);
-  
+                                            == (Spanner *)me);
+
   Output_def *layout = me->layout ();
   Real half_space = 0.5;
 
@@ -65,67 +65,64 @@ Volta_bracket_interface::print (SCM smob)
     {
       Paper_column *pc = bound->get_column ();
       left = pc->break_align_width (pc, ly_symbol2scm ("break-alignment"))[RIGHT]
-       // For some reason, break_align_width is relative to
-       // the x-parent of the column.
-       - bound->relative_coordinate (pc->get_parent (X_AXIS), X_AXIS);
+             // For some reason, break_align_width is relative to
+             // the x-parent of the column.
+             - bound->relative_coordinate (pc->get_parent (X_AXIS), X_AXIS);
     }
   else
     {
       /*
-       the volta spanner is attached to the bar-line, which is moved
-       to the right. We don't need to compensate for the left edge.
+        the volta spanner is attached to the bar-line, which is moved
+        to the right. We don't need to compensate for the left edge.
       */
     }
 
   modify_edge_height (me);
   if (!me->is_live ())
     return SCM_EOL;
-  
+
   Drul_array<Real> edge_height = robust_scm2interval (me->get_property ("edge-height"),
-                                                     Interval (1.0, 1.0));
+                                                      Interval (1.0, 1.0));
   Drul_array<Real> flare = robust_scm2interval (me->get_property ("bracket-flare"),
-                                               Interval (0, 0));
+                                                Interval (0, 0));
   Drul_array<Real> shorten = robust_scm2interval (me->get_property ("shorten-pair"),
-                                                 Interval (0, 0));
+                                                  Interval (0, 0));
 
-
-  
   scale_drul (&edge_height, - Real (get_grob_direction (me)));
 
   Interval empty;
   Offset start;
   start[X_AXIS] = me->spanner_length () - left - half_space;
-  
+
   /*
-    ugh, Tuplet_bracket should use Horizontal_bracket, not the other way around. 
+    ugh, Tuplet_bracket should use Horizontal_bracket, not the other way around.
   */
   Stencil total
-    = Tuplet_bracket::make_bracket (me, Y_AXIS, start, 
-                                   edge_height, empty, flare, shorten);
+    = Tuplet_bracket::make_bracket (me, Y_AXIS, start,
+                                    edge_height, empty, flare, shorten);
 
   if (!orig_span || broken_first_bracket)
     {
       SCM text = me->get_property ("text");
       SCM properties = me->get_property_alist_chain (SCM_EOL);
       SCM snum = Text_interface::interpret_markup (layout->self_scm (),
-                                                  properties, text);
+                                                   properties, text);
       Stencil num = *unsmob_stencil (snum);
       num.align_to (Y_AXIS, UP);
       num.translate_axis (-0.5, Y_AXIS);
       total.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()
-                        - 1.0);
+                         - 1.0);
     }
-  
+
   total.translate_axis (left, X_AXIS);
   return total.smobbed_copy ();
 }
 
-
 void
 Volta_bracket_interface::modify_edge_height (Spanner *me)
 {
   Spanner *orig_span = dynamic_cast<Spanner *> (me->original ());
+
   bool broken_first_bracket = orig_span && (orig_span->broken_intos_[0] == (Spanner *)me);
   bool broken_last_bracket = orig_span && (orig_span->broken_intos_.back () == (Spanner *)me);
   bool no_vertical_start = orig_span && !broken_first_bracket;
@@ -142,23 +139,23 @@ Volta_bracket_interface::modify_edge_height (Spanner *me)
     str = "|";
 
   no_vertical_end
-    |= (str != ":|"
-       && str != "|:"
-       && str != "|."
-       && str != ":|:"
-       && str != ":|.|:"
-       && str != ":|.:"
-       && str != ".|");
+  |= (str != ":|"
+      && str != "|:"
+      && str != "|."
+      && str != ":|:"
+      && str != ":|.|:"
+      && str != ":|.:"
+      && str != ".|");
 
   if (no_vertical_end || no_vertical_start)
     {
       Drul_array<Real> edge_height = robust_scm2interval (me->get_property ("edge-height"),
-                                                         Interval (1.0, 1.0));
+                                                          Interval (1.0, 1.0));
       if (no_vertical_start)
-       edge_height[LEFT] = 0.0;
+        edge_height[LEFT] = 0.0;
 
       if (no_vertical_end)
-       edge_height[RIGHT] = 0.0;
+        edge_height[RIGHT] = 0.0;
 
       me->set_property ("edge-height", ly_interval2scm (edge_height));
     }
@@ -176,11 +173,11 @@ Volta_bracket_interface::add_bar (Grob *me, Item *b)
 }
 
 ADD_INTERFACE (Volta_bracket_interface,
-              "Volta bracket with number.",
+               "Volta bracket with number.",
 
-              /* properties */
-              "bars "
-              "thickness "
-              "height "
-              );
+               /* properties */
+               "bars "
+               "thickness "
+               "height "
+              );
 
index eec8fa46ff824d36b22e191aaf1df42d7cbee82b..d632ae724fbbe523f1901e3112c60ec7708062f3 100644 (file)
@@ -83,14 +83,14 @@ Volta_engraver::process_music ()
       SCM c = scm_car (cs);
 
       if (scm_is_pair (c)
-         && scm_car (c) == ly_symbol2scm ("volta")
-         && scm_is_pair (scm_cdr (c)))
-       {
-         if (scm_cadr (c) == SCM_BOOL_F)
-           end = true;
-         else
-           start_string_ = scm_cadr (c);
-       }
+          && scm_car (c) == ly_symbol2scm ("volta")
+          && scm_is_pair (scm_cdr (c)))
+        {
+          if (scm_cadr (c) == SCM_BOOL_F)
+            end = true;
+          else
+            start_string_ = scm_cadr (c);
+        }
 
       cs = scm_cdr (cs);
     }
@@ -101,7 +101,7 @@ Volta_engraver::process_music ()
       Moment now = now_mom ();
 
       bool early_stop = unsmob_moment (l)
-       && *unsmob_moment (l) <= now - started_mom_;
+                        && *unsmob_moment (l) <= now - started_mom_;
 
       end = end || early_stop;
     }
@@ -121,11 +121,11 @@ Volta_engraver::process_music ()
       warning (_ ("already have a volta spanner, ending that one prematurely"));
 
       if (end_volta_bracket_)
-       {
-         warning (_ ("also already have an ended spanner"));
-         warning (_ ("giving up"));
-         return;
-       }
+        {
+          warning (_ ("also already have an ended spanner"));
+          warning (_ ("giving up"));
+          return;
+        }
 
       end_volta_bracket_ = volta_bracket_;
       volta_bracket_ = 0;
@@ -141,7 +141,7 @@ Volta_engraver::process_music ()
       volta_bracket_->set_property ("text", start_string_);
 
       if (!volta_spanner_)
-       volta_spanner_ = make_spanner ("VoltaBracketSpanner", SCM_EOL);
+        volta_spanner_ = make_spanner ("VoltaBracketSpanner", SCM_EOL);
 
       Axis_group_interface::add_element (volta_spanner_, volta_bracket_);
     }
@@ -174,7 +174,7 @@ Volta_engraver::stop_translation_timestep ()
   if (end_volta_bracket_ && !volta_bracket_)
     {
       for (SCM s = get_property ("stavesFound"); scm_is_pair (s); s = scm_cdr (s))
-       Side_position_interface::add_support (volta_spanner_, unsmob_grob (scm_car (s)));
+        Side_position_interface::add_support (volta_spanner_, unsmob_grob (scm_car (s)));
       volta_spanner_ = 0;
     }
 
@@ -192,18 +192,18 @@ Volta_engraver::stop_translation_timestep ()
 */
 ADD_ACKNOWLEDGER (Volta_engraver, bar_line);
 ADD_TRANSLATOR (Volta_engraver,
-               /* doc */
-               "Make volta brackets.",
+                /* doc */
+                "Make volta brackets.",
 
-               /* create */
-               "VoltaBracket "
-               "VoltaBracketSpanner ",
+                /* create */
+                "VoltaBracket "
+                "VoltaBracketSpanner ",
 
-               /* read */
-               "repeatCommands "
-               "voltaSpannerDuration "
-               "stavesFound ",
+                /* read */
+                "repeatCommands "
+                "voltaSpannerDuration "
+                "stavesFound ",
 
-               /* write */
-               ""
-               );
+                /* write */
+                ""
+               );
index b7ac2059f14964e33260d4f28d6d1b1499d9c251..91bf94e42a0323a4e8d7049f4f2b3fb1a8019b47 100644 (file)
@@ -50,7 +50,7 @@ SCM
 Volta_repeat_iterator::get_music_list ()const
 {
   return scm_cons (get_music ()->get_property ("element"),
-                  get_music ()->get_property ("elements"));
+                   get_music ()->get_property ("elements"));
 }
 
 void
@@ -76,7 +76,7 @@ Volta_repeat_iterator::add_repeat_command (SCM what)
   Context *where = get_outlet ()->where_defined (reps, &current_reps);
 
   if (where
-       && (current_reps == SCM_EOL || scm_is_pair (current_reps)))
+      && (current_reps == SCM_EOL || scm_is_pair (current_reps)))
     {
       current_reps = scm_cons (what, current_reps);
       where->set_property (reps, current_reps);
@@ -93,25 +93,25 @@ Volta_repeat_iterator::next_element (bool side_effect)
   if (side_effect)
     {
       if (alt_count_)
-       {
-         string repstr = to_string (rep_count_ - alt_count_ + done_count_) + ".";
-         if (done_count_ > 1)
-           {
-             add_repeat_command (scm_list_n (ly_symbol2scm ("volta"), SCM_BOOL_F, SCM_UNDEFINED));
-
-             if (done_count_ - 1 < alt_count_)
-               add_repeat_command (ly_symbol2scm ("end-repeat"));
-           }
-
-         if (done_count_ == 1 && alt_count_ < rep_count_)
-           repstr = "1.--" + to_string (rep_count_ - alt_count_ + done_count_) + ".";
-
-         if (done_count_ <= alt_count_)
-           add_repeat_command (scm_list_n (ly_symbol2scm ("volta"),
-                                           ly_string2scm (repstr), SCM_UNDEFINED));
-       }
+        {
+          string repstr = to_string (rep_count_ - alt_count_ + done_count_) + ".";
+          if (done_count_ > 1)
+            {
+              add_repeat_command (scm_list_n (ly_symbol2scm ("volta"), SCM_BOOL_F, SCM_UNDEFINED));
+
+              if (done_count_ - 1 < alt_count_)
+                add_repeat_command (ly_symbol2scm ("end-repeat"));
+            }
+
+          if (done_count_ == 1 && alt_count_ < rep_count_)
+            repstr = "1.--" + to_string (rep_count_ - alt_count_ + done_count_) + ".";
+
+          if (done_count_ <= alt_count_)
+            add_repeat_command (scm_list_n (ly_symbol2scm ("volta"),
+                                            ly_string2scm (repstr), SCM_UNDEFINED));
+        }
       else
-       add_repeat_command (ly_symbol2scm ("end-repeat"));
+        add_repeat_command (ly_symbol2scm ("end-repeat"));
     }
 }
 
index be3ade7e049818028a102aa5452f58d62feecb31..6d942d7e93e3d39f54edb6081b5369509c7b96de 100644 (file)
@@ -28,4 +28,6 @@ RemoveEmptyStaves = \with {
   \remove "Hara_kiri_engraver"
   \consists "Hara_kiri_engraver"
   \override VerticalAxisGroup #'remove-empty = ##t
+  \description "Remove staves which are considered to be empty according
+to the list of interfaces set by @code{keepAliveInterfaces}."
 }
index 3535a0a6a7b0dc5a03188dca78078e178ede3f16..2278f85a266387dbedef8a3d3192917b2193d126 100644 (file)
@@ -361,7 +361,7 @@ the number appears at @var{offset}.  Note that, for this to take effect,
 auto-numbering must be turned on in the paper block.  Otherwise, no
 number will appear.  Use like @code{\\once})")
    #{
-     \footnoteGrob $grob-name $offset \markup { "" } $footnote
+     \footnoteGrob $grob-name $offset \markup { \null } $footnote
    #})
 
 footnote =
@@ -389,7 +389,7 @@ Otherwise, no number will appear.  Use like @code{\\tweak})")
    (make-music 'FootnoteEvent
               'X-offset (car offset)
               'Y-offset (cdr offset)
-              'text (markup "")
+              'text (make-null-markup)
               'footnote-text footnote))
 
 grace =
index 03bc122520932c5653177529a5dab5b5ec2383bc..e6449d6fb53362c62eea457eee6010a1593a8d5f 100644 (file)
@@ -13,14 +13,14 @@ TEXINFO_MANUALS =\
  $(TEXI_FILES:%.texi=%)
 
 TOPDIR_HTML_MANUALS = 
-SPLITTED_HTML_MANUALS = $(foreach manual, $(TEXINFO_MANUALS),\
- $(if $(findstring $(manual), $(UNSPLITTED_HTML_MANUALS)),,$(manual)))
-NOT_TOPDIR_HTML_MANUALS = $(foreach manual, $(SPLITTED_HTML_MANUALS),\
+SPLIT_HTML_MANUALS = $(foreach manual, $(TEXINFO_MANUALS),\
+ $(if $(findstring $(manual), $(UNSPLIT_HTML_MANUALS)),,$(manual)))
+NOT_TOPDIR_HTML_MANUALS = $(foreach manual, $(SPLIT_HTML_MANUALS),\
  $(if $(findstring $(manual), $(TOPDIR_HTML_MANUALS)),,$(manual)))
 
-OUT_HTML_FILES += $(UNSPLITTED_HTML_MANUALS:%=$(top-build-dir)/Documentation/$(outdir)/%.$(ISOLANG).html) \
+OUT_HTML_FILES += $(UNSPLIT_HTML_MANUALS:%=$(top-build-dir)/Documentation/$(outdir)/%.$(ISOLANG).html) \
  $(TOPDIR_HTML_MANUALS:%=$(outdir)/index.$(ISOLANG).html)
-BIG_PAGE_HTML_FILES := $(SPLITTED_HTML_MANUALS:%=$(top-build-dir)/Documentation/$(outdir)/%-big-page.$(ISOLANG).html)
+BIG_PAGE_HTML_FILES := $(SPLIT_HTML_MANUALS:%=$(top-build-dir)/Documentation/$(outdir)/%-big-page.$(ISOLANG).html)
 DEEP_HTML_FILES := $(NOT_TOPDIR_HTML_MANUALS:%=$(top-build-dir)/Documentation/$(outdir)/%/index.$(ISOLANG).html)
 PDF_FILES := $(TELY_FILES:%.tely=$(top-build-dir)/Documentation/$(outdir)/%.$(ISOLANG).pdf)
 
index c72522072195d2b9751158e12cd0014a333294c2..a58e4bc89a7a6c607a3da1dea2478ecce9b8ba0f 100644 (file)
@@ -157,24 +157,40 @@ if test > 0:
 fi;
 
 
-%
-% dimensions aren't entirely right.
-%
-def draw_brevis (expr linecount) =
+def draw_brevis (expr linecount, line_thickness_multiplier) =
        save stemthick, fudge;
 
-       stemthick# = 2 stafflinethickness#;
+       stemthick# = line_thickness_multiplier * 2 * stafflinethickness#;
        define_whole_blacker_pixels (stemthick);
 
-       fudge = hround (blot_diameter / 2);
+       % Breves of smaller design sizes should have their lines
+       % farther apart (the overlap should be smaller).
+       fudge = hround (blot_diameter
+                       * min (max (-0.15,
+                                   (0.8
+                                    - (20 / (design_size + 4))
+                                    + .1 linecount)),
+                              0.3));
 
        draw_outside_ellipse (1.80, 0, 0.707, 0);
        undraw_inside_ellipse (1.30, 125, 0.68, 2 stafflinethickness#);
 
        pickup pencircle scaled stemthick;
 
-       bot y1 = -d;
-       top y2 = h;
+       % Breves of smaller design sizes should have their lines longer.
+       line_length := min (max (0.7, (64/60 - (design_size / 60))), 0.85);
+
+       % Line lengths between 0.72 and 0.77 are not nice
+       % because they are neither separate nor connected
+       % when there is an interval of fourth.
+       if line_length < 0.75:
+               quanted_line_length := min (0.72, line_length);
+       else:
+               quanted_line_length := max (0.77, line_length);
+       fi;
+
+       bot y1 = -quanted_line_length * staff_space;
+       top y2 = quanted_line_length * staff_space;
        rt x1 - fudge = 0;
        x1 = x2;
 
@@ -183,17 +199,22 @@ def draw_brevis (expr linecount) =
        y4 = y2;
        y3 = y1;
 
+       % Breves of smaller design sizes should have their lines
+       % farther apart.
+       line_distance := (1.95 - 0.008 * design_size) * stemthick;
        for i := 0 step 1 until linecount - 1:
-               draw_gridline (z1 - (1.5 * i * stemthick, 0),
-                              z2 - (1.5 * i * stemthick, 0), stemthick);
-               draw_gridline (z3 + (1.5 * i * stemthick, 0),
-                              z4 + (1.5 * i * stemthick, 0), stemthick);
+               draw_gridline (z1 - (i * line_distance, 0),
+                              z2 - (i * line_distance, 0),
+                              stemthick);
+               draw_gridline (z3 + (i * line_distance, 0),
+                              z4 + (i * line_distance, 0),
+                              stemthick);
        endfor;
 enddef;
 
 
 fet_beginchar ("Brevis notehead", "sM1");
-       draw_brevis (1);
+       draw_brevis (1, 1);
 
        draw_staff (-2, 2, 0);
 fet_endchar;
@@ -201,7 +222,7 @@ fet_endchar;
 
 if test > 0:
        fet_beginchar ("Brevis notehead", "sM1");
-               draw_brevis(1);
+               draw_brevis(1, 1);
 
                draw_staff (-2, 2, 0.5);
        fet_endchar;
@@ -209,7 +230,7 @@ fi;
 
 
 fet_beginchar ("Double-lined brevis notehead", "sM1double");
-       draw_brevis (2);
+       draw_brevis (2, 0.8);
 
        draw_staff (-2, 2, 0);
 fet_endchar;
@@ -217,7 +238,7 @@ fet_endchar;
 
 if test > 0:
        fet_beginchar ("Double-lined brevis notehead", "sM1double");
-               draw_brevis (2);
+               draw_brevis (2, 0.8);
 
                draw_staff (-2, 2, 0.5);
        fet_endchar;
index d46f1a4313022c5a20e57da4c28bdb00bc0f123a..312de6e2927cdb0e1744cd015d1e11728dd0aff3 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -7,10 +7,10 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: lilypond 2.13.53\n"
+"Project-Id-Version: lilypond 2.15.9\n"
 "Report-Msgid-Bugs-To: http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs\n"
-"POT-Creation-Date: 2011-03-02 10:34+0100\n"
-"PO-Revision-Date: 2011-04-06 19:38+0200\n"
+"POT-Creation-Date: 2011-08-02 19:43+0200\n"
+"PO-Revision-Date: 2011-08-03 23:06+0200\n"
 "Last-Translator: Jean-Charles Malahieude <lilyfan@orange.fr>\n"
 "Language-Team: French <traduc@traduc.org>\n"
 "Language: fr\n"
@@ -89,8 +89,8 @@ msgstr ""
 msgid "%s has been replaced by %s"
 msgstr "%s a été remplacé par %s"
 
-#: convertrules.py:24 lilylib.py:78 musicexp.py:17 convert-ly.py:64 warn.cc:66
-#: input.cc:109
+#: convertrules.py:24 lilylib.py:85 musicexp.py:17 convert-ly.py:64 warn.cc:66
+#: input.cc:108
 #, c-format, python-format
 msgid "warning: %s"
 msgstr "Avertissement : %s"
@@ -110,6 +110,7 @@ msgstr "\\textstyle est obsolète ; utiliser désormais la syntaxe \\key"
 
 #: convertrules.py:86 convertrules.py:1905 convertrules.py:2084
 #: convertrules.py:2236 convertrules.py:2566 convertrules.py:2862
+#: convertrules.py:3206
 msgid "bump version for release"
 msgstr "sauter de version pour mise à jour"
 
@@ -217,7 +218,7 @@ msgstr "Interchanger < > et << >>"
 #: convertrules.py:1349
 msgid "attempting automatic \\figures conversion.  Check results!"
 msgstr ""
-"tentative de convesion automatique des \\figures. \n"
+"tentative de conversion automatique des \\figures. \n"
 "Résultats à vérifier !"
 
 #: convertrules.py:1400
@@ -773,6 +774,26 @@ msgstr "Diagrammes pour vents : modifications touchant la clarinette."
 msgid "woodwind-diagrams.  Clarinet fingering changed to reflect actual anatomy of instrument.\n"
 msgstr "Diagrammes pour vents : doigtés plus adaptés à la clarinette actuelle.\n"
 
+#: convertrules.py:3211
+msgid "Change in internal property for MultiMeasureRest"
+msgstr "MultiMeasureRest : modification des propriétés internes."
+
+#: convertrules.py:3214
+msgid "use-breve-rest.  This internal property has been replaced by round-to-longer-rest and usable-duration-logs.\n"
+msgstr ""
+"use-breve-rest : cette propriété interne est remplacée par\n"
+"round-to-longer-rest et usable-duration-logs.\n"
+
+#: convertrules.py:3219
+msgid "Handling of non-automatic footnotes."
+msgstr "Gestion des notes de bas de page non automatisée."
+
+#: convertrules.py:3223
+msgid "If you are using non-automatic footnotes, make sure to set footnote-auto-numbering = ##f in the paper block.\n"
+msgstr ""
+"Pour une gestion non automatisée des notes de bas de page, n'oubliez pas\n"
+"de mentionner footnote-auto-numbering = ##f dans le bloc \\paper.\n"
+
 #: book_base.py:24
 #, python-format
 msgid "file not found: %s"
@@ -782,23 +803,28 @@ msgstr "fichier non trouvé : %s"
 msgid "Output function not implemented"
 msgstr "Fonction de production non implémentée."
 
-#: lilylib.py:81 musicxml.py:13 convert-ly.py:67 warn.cc:72 input.cc:115
-#: input.cc:123
+#: lilylib.py:88 musicxml.py:13 convert-ly.py:67 warn.cc:72 input.cc:114
+#: input.cc:122
 #, c-format, python-format
 msgid "error: %s"
 msgstr "Erreur : %s"
 
-#: lilylib.py:124 lilylib.py:175
+#: lilylib.py:131
+#, python-format
+msgid "Processing %s.ly"
+msgstr "Traitement de « %s.ly »"
+
+#: lilylib.py:135 lilylib.py:198
 #, python-format
 msgid "Invoking `%s'"
 msgstr "Appel de « %s »"
 
-#: lilylib.py:126 lilylib.py:177
+#: lilylib.py:137 lilylib.py:200
 #, python-format
 msgid "Running %s..."
 msgstr "Exécution de %s..."
 
-#: lilylib.py:253
+#: lilylib.py:276
 #, python-format
 msgid "Usage: %s"
 msgstr "Utilisation : %s"
@@ -861,7 +887,7 @@ msgstr "Aucun instrument ne correspond à l'ID %s\n"
 msgid "cannot find \\begin{document} in LaTeX document"
 msgstr "Impossible de trouver \\begin{document} dans le document LaTeX."
 
-#: musicxml2ly.py:223
+#: musicxml2ly.py:224
 #, python-format
 msgid "Encountered file created by %s, containing wrong beaming information. All beaming information in the MusicXML file will be ignored"
 msgstr ""
@@ -869,121 +895,121 @@ msgstr ""
 "erronées. Toutes les informations de ligature du fichier MusicXML seront\n"
 "ignorées."
 
-#: musicxml2ly.py:239 musicxml2ly.py:241
+#: musicxml2ly.py:240 musicxml2ly.py:242
 #, python-format
 msgid "Unprocessed PartGroupInfo %s encountered"
 msgstr "PartGroupInfo %s détecté, mais non traité"
 
-#: musicxml2ly.py:494
+#: musicxml2ly.py:495
 #, python-format
 msgid "Encountered note at %s without type and duration (=%s)"
 msgstr "Une note se trouve en %s, sans type ni durée (=%s)"
 
-#: musicxml2ly.py:514
+#: musicxml2ly.py:515
 #, python-format
 msgid "Encountered rational duration with denominator %s, unable to convert to lilypond duration"
 msgstr ""
 "Durée rationnelle au dénominateur de %s détectée ;\n"
 "impossible de traduire en durée LilyPond"
 
-#: musicxml2ly.py:761
+#: musicxml2ly.py:762
 msgid "Unable to extract key signature!"
 msgstr "Impossible de déterminer l'armure."
 
-#: musicxml2ly.py:788
+#: musicxml2ly.py:789
 #, python-format
 msgid "unknown mode %s, expecting 'major' or 'minor' or a church mode!"
 msgstr ""
 "%s : mode inconnu.\n"
 "Devrait être « majeur », « mineur » ou « mode d'église »"
 
-#: musicxml2ly.py:926
+#: musicxml2ly.py:927
 #, python-format
 msgid "Encountered unprocessed marker %s\n"
 msgstr "Détection d'un marqueur non traité : %s\n"
 
-#: musicxml2ly.py:1020
+#: musicxml2ly.py:1021
 #, python-format
 msgid "unknown span event %s"
 msgstr "Événement de prolongation inconnu : « %s »"
 
-#: musicxml2ly.py:1030
+#: musicxml2ly.py:1031
 #, python-format
 msgid "unknown span type %s for %s"
 msgstr "%s n'est pas un type de prolongateur reconnu pour %s"
 
-#: musicxml2ly.py:1450
+#: musicxml2ly.py:1451
 msgid "Unknown metronome mark, ignoring"
 msgstr "Indication métronomique inconnue et ignorée."
 
 #. TODO: Implement the other (more complex) way for tempo marks!
-#: musicxml2ly.py:1455
+#: musicxml2ly.py:1456
 msgid "Metronome marks with complex relations (<metronome-note> in MusicXML) are not yet implemented."
 msgstr ""
 "Les indications métronomiques aux relations complexes (<metronome-note> pour \n"
 "MusicXML) n'ont pas encore été implémentées."
 
-#: musicxml2ly.py:1657
+#: musicxml2ly.py:1658
 #, python-format
 msgid "Unable to convert chord type %s to lilypond."
 msgstr "Impossible de convertir le type d'accord %s au format LilyPond"
 
-#: musicxml2ly.py:1806
+#: musicxml2ly.py:1807
 #, python-format
 msgid "drum %s type unknown, please add to instrument_drumtype_dict"
 msgstr ""
-"%s n'est pas un type de percussion connu. \n"
+"%s n'est pas un type de percussion connu.\n"
 "L'ajouter à instrument_drumtype_dict"
 
-#: musicxml2ly.py:1810
+#: musicxml2ly.py:1811
 msgid "cannot find suitable event"
 msgstr "Aucun événement correspondant"
 
-#: musicxml2ly.py:1958
+#: musicxml2ly.py:1959
 #, python-format
 msgid "Negative skip %s (from position %s to %s)"
 msgstr "Retour en arrière de %s (partant de %s et jusqu'à %s)"
 
-#: musicxml2ly.py:2099
+#: musicxml2ly.py:2100
 #, python-format
 msgid "Negative skip found: from %s to %s, difference is %s"
 msgstr "Retour en arrière, de %s à %s ; différence = %s"
 
-#: musicxml2ly.py:2180
+#: musicxml2ly.py:2181
 #, python-format
 msgid "unexpected %s; expected %s or %s or %s"
 msgstr "%s détecté, au lieu de %s, %s ou %s"
 
-#: musicxml2ly.py:2286
+#: musicxml2ly.py:2287
 msgid "Encountered closing slur, but no slur is open"
 msgstr "Terminaison d'une liaison qui n'a pas été débutée"
 
-#: musicxml2ly.py:2289
+#: musicxml2ly.py:2290
 msgid "Cannot have two simultaneous (closing) slurs"
 msgstr "deux liaisons ne peuvent se terminer simultanément"
 
-#: musicxml2ly.py:2298
+#: musicxml2ly.py:2299
 msgid "Cannot have a slur inside another slur"
 msgstr "des liaisons ne peuvent s'imbriquer"
 
-#: musicxml2ly.py:2301
+#: musicxml2ly.py:2302
 msgid "Cannot have two simultaneous slurs"
 msgstr "deux liaisons ne peuvent intervenir simultanément"
 
-#: musicxml2ly.py:2435
+#: musicxml2ly.py:2436
 #, python-format
 msgid "cannot simultaneously have more than one mode: %s"
 msgstr "SVP, un seul mode à la fois : %s"
 
-#: musicxml2ly.py:2543
+#: musicxml2ly.py:2544
 msgid "Converting to LilyPond expressions..."
 msgstr "Conversion en expressions LilyPond..."
 
-#: musicxml2ly.py:2554
+#: musicxml2ly.py:2555
 msgid "musicxml2ly [OPTION]... FILE.xml"
-msgstr "musicxml2ly [options]... FICHIER.xml"
+msgstr "musicxml2ly [OPTION]... FICHIER.xml"
 
-#: musicxml2ly.py:2556
+#: musicxml2ly.py:2557
 msgid ""
 "Convert MusicXML from FILE.xml to LilyPond input.\n"
 "If the given filename is -, musicxml2ly reads from the command line.\n"
@@ -991,12 +1017,12 @@ msgstr ""
 "Convertit FICHIER.xml (MusicXML) au format LilyPond.\n"
 "Si le nom du fichier est « - », musicxml2ly lira la ligne de commande.\n"
 
-#: musicxml2ly.py:2562 midi2ly.py:987 abc2ly.py:1386 lilypond-book.py:140
-#: convert-ly.py:98 etf2ly.py:1202 main.cc:157
+#: musicxml2ly.py:2563 midi2ly.py:1060 abc2ly.py:1386 lilypond-book.py:140
+#: convert-ly.py:98 etf2ly.py:1202 main.cc:159
 msgid "show this help and exit"
 msgstr "visualiser cette aide et quitter"
 
-#: musicxml2ly.py:2566
+#: musicxml2ly.py:2567
 msgid ""
 "Copyright (c) 2005--2011 by\n"
 "    Han-Wen Nienhuys <hanwen@xs4all.nl>,\n"
@@ -1008,67 +1034,69 @@ msgstr ""
 "    Jan Nieuwenhuizen <janneke@gnu.org> and\n"
 "    Reinhold Kainhofer <reinhold@kainhofer.com>\n"
 
-#: musicxml2ly.py:2580 midi2ly.py:1015 abc2ly.py:1382 lilypond-book.py:212
-#: convert-ly.py:94 etf2ly.py:1206 main.cc:168
+#: musicxml2ly.py:2581 midi2ly.py:1091 abc2ly.py:1382 lilypond-book.py:217
+#: convert-ly.py:94 etf2ly.py:1206 main.cc:174
 msgid "show version number and exit"
-msgstr "afficher le numéro de version et quitter"
+msgstr "affiche le numéro de version et quitte"
 
-#: musicxml2ly.py:2585 midi2ly.py:1009 lilypond-book.py:204 main.cc:169
+#: musicxml2ly.py:2586 midi2ly.py:1085 lilypond-book.py:209 main.cc:175
 msgid "be verbose"
-msgstr "Passe en mode verbeux"
+msgstr "passe en mode verbeux"
 
-#: musicxml2ly.py:2591
+#: musicxml2ly.py:2592
 msgid "use lxml.etree; uses less memory and cpu time"
 msgstr ""
 "utilise lxml.etree pour consommer moins de mémoire\n"
 "et de temps processeur."
 
-#: musicxml2ly.py:2597
+#: musicxml2ly.py:2598
 msgid "input file is a zip-compressed MusicXML file"
 msgstr "le fichier d'entrée est un fichier MusicXML compressé"
 
-#: musicxml2ly.py:2603
+#: musicxml2ly.py:2604
 msgid "convert pitches in relative mode (default)"
 msgstr "convertit les hauteurs en mode relatif (par défaut)"
 
-#: musicxml2ly.py:2608
+#: musicxml2ly.py:2609
 msgid "convert pitches in absolute mode"
 msgstr "convertit les hauteurs en mode absolu"
 
-#: musicxml2ly.py:2611
+#: musicxml2ly.py:2612
 msgid "LANG"
 msgstr "LANG"
 
-#: musicxml2ly.py:2613
+#: musicxml2ly.py:2614
 msgid "use LANG for pitch names, e.g. 'deutsch' for note names in German"
-msgstr "utilise une autre définition linguistique (LANG), p.ex. deutsch l'allemand"
+msgstr ""
+"utilise une autre définition linguistique (LANG),\n"
+"p.ex. deutsch pour l'allemand"
 
-#: musicxml2ly.py:2619
+#: musicxml2ly.py:2620
 msgid "do not convert directions (^, _ or -) for articulations, dynamics, etc."
 msgstr ""
 "ne convertit pas les emplacements (^, _ ou -) des articulations, \n"
 "nuances, etc."
 
-#: musicxml2ly.py:2625
+#: musicxml2ly.py:2626
 msgid "do not convert exact vertical positions of rests"
 msgstr "ne convertit pas le positionnement absolu des silences"
 
-#: musicxml2ly.py:2631
+#: musicxml2ly.py:2632
 msgid "do not convert the exact page layout and breaks"
 msgstr "ne convertit pas les sauts et la mise en page"
 
-#: musicxml2ly.py:2637
+#: musicxml2ly.py:2638
 msgid "do not convert beaming information, use lilypond's automatic beaming instead"
 msgstr ""
 "ne convertit pas les informations de ligature ; \n"
 "laisse LilyPond gérer les ligatures automatiques"
 
-#: musicxml2ly.py:2640 midi2ly.py:992 midi2ly.py:997 etf2ly.py:1208
-#: main.cc:161 main.cc:166
+#: musicxml2ly.py:2641 midi2ly.py:1065 midi2ly.py:1070 etf2ly.py:1208
+#: main.cc:165 main.cc:172
 msgid "FILE"
 msgstr "FICHIER"
 
-#: musicxml2ly.py:2645
+#: musicxml2ly.py:2646
 msgid "set output filename to FILE, stdout if -"
 msgstr "produit la sortie dans FICHIER (stdout si -)"
 
@@ -1076,8 +1104,8 @@ msgstr "produit la sortie dans FICHIER (stdout si -)"
 #. "Report bugs in English via %s",
 #. or if there is a LilyPond users list or forum in your language
 #. "Report bugs in English via %s or in YOUR_LANG via URI"
-#: musicxml2ly.py:2648 midi2ly.py:1028 abc2ly.py:1395 lilypond-book.py:234
-#: convert-ly.py:144 etf2ly.py:1216 main.cc:281
+#: musicxml2ly.py:2649 midi2ly.py:1104 abc2ly.py:1395 lilypond-book.py:239
+#: convert-ly.py:144 etf2ly.py:1216 main.cc:285
 #, c-format, python-format
 msgid "Report bugs via %s"
 msgstr ""
@@ -1086,145 +1114,159 @@ msgstr ""
 "ou en anglais à\n"
 "%s"
 
-#: musicxml2ly.py:2728
+#: musicxml2ly.py:2729
 #, python-format
 msgid "unknown part in part-list: %s"
 msgstr "la partie %s n'est pas mentionnée dans part-list"
 
-#: musicxml2ly.py:2790
+#: musicxml2ly.py:2791
 msgid "Input is compressed, extracting raw MusicXML data from stdin"
 msgstr ""
 "Le fichier d'entrée est compressé.\n"
 "Extraction des données MusicXML brutes à partir de stdin"
 
-#: musicxml2ly.py:2793
+#: musicxml2ly.py:2804
 #, python-format
 msgid "Input file %s is compressed, extracting raw MusicXML data"
 msgstr ""
 "Le fichier d'entrée (%s) est compressé.\n"
 "Extraction des données MusicXML brutes"
 
-#: musicxml2ly.py:2823
+#: musicxml2ly.py:2834
 msgid "Reading MusicXML from Standard input ..."
 msgstr "Lecture du fichier MusicXML à partir de l'entrée standard..."
 
-#: musicxml2ly.py:2825
+#: musicxml2ly.py:2836
 #, python-format
 msgid "Reading MusicXML from %s ..."
 msgstr "Lecture du fichier MusicXML %s..."
 
-#: musicxml2ly.py:2858
+#: musicxml2ly.py:2869
 #, python-format
 msgid "Output to `%s'"
 msgstr "Fichier de sortie : « %s »"
 
-#: musicxml2ly.py:2925
+#: musicxml2ly.py:2936
 #, python-format
 msgid "Unable to find input file %s"
 msgstr "Impossible de trouver le fichier d'entrée : « %s »"
 
-#: midi2ly.py:90 lilypond-book.py:116 convert-ly.py:81 etf2ly.py:1189
+#: midi2ly.py:81 lilypond-book.py:116 convert-ly.py:81 etf2ly.py:1189
 #, python-format
 msgid "Copyright (c) %s by"
 msgstr "Copyright (c) %s détenu par"
 
-#: midi2ly.py:92 lilypond-book.py:118 convert-ly.py:83 etf2ly.py:1191
+#: midi2ly.py:83 lilypond-book.py:118 convert-ly.py:83 etf2ly.py:1191
 msgid "Distributed under terms of the GNU General Public License."
 msgstr "Distribué selon les termes de la GNU General Public License."
 
-#: midi2ly.py:93 lilypond-book.py:119 convert-ly.py:84 etf2ly.py:1192
+#: midi2ly.py:84 lilypond-book.py:119 convert-ly.py:84 etf2ly.py:1192
 msgid "It comes with NO WARRANTY."
 msgstr "Le logiciel est distribué SANS GARANTIE."
 
-#: midi2ly.py:99
+#: midi2ly.py:90
 msgid "warning: "
 msgstr "Avertissement : "
 
-#: midi2ly.py:102 midi2ly.py:1041
+#: midi2ly.py:93 midi2ly.py:1121
 msgid "error: "
 msgstr "Erreur : "
 
-#: midi2ly.py:103
+#: midi2ly.py:94
 msgid "Exiting... "
 msgstr "Fin d'exécution... "
 
-#: midi2ly.py:960
+#: midi2ly.py:834
+msgid "found more than 5 voices on a staff, expect bad output"
+msgstr ""
+"l'une des portées contient plus de cinq voix ;\n"
+"attendez-vous à un piètre résultat."
+
+#: midi2ly.py:1030
 #, python-format
 msgid "%s output to `%s'..."
 msgstr "%s reproduit dans « %s »..."
 
-#: midi2ly.py:972 abc2ly.py:1373 lilypond-book.py:122 convert-ly.py:87
+#: midi2ly.py:1042 abc2ly.py:1373 lilypond-book.py:122 convert-ly.py:87
 #, python-format
 msgid "%s [OPTION]... FILE"
 msgstr "%s [OPTIONS]... FICHIER"
 
-#: midi2ly.py:973
+#: midi2ly.py:1043
 #, python-format
 msgid "Convert %s to LilyPond input.\n"
-msgstr "Convertir %s au format source LilyPond.\n"
+msgstr "convertit %s au format source LilyPond.\n"
 
-#: midi2ly.py:978
+#: midi2ly.py:1048
 msgid "print absolute pitches"
-msgstr "Afficher des hauteurs absolues"
+msgstr "affecte des hauteurs absolues"
 
-#: midi2ly.py:980 midi2ly.py:1002
+#: midi2ly.py:1050 midi2ly.py:1075
 msgid "DUR"
 msgstr "DUR"
 
-#: midi2ly.py:981
+#: midi2ly.py:1051
 msgid "quantise note durations on DUR"
-msgstr "Quantifier les durées de note d'après DUR"
+msgstr "quantifie les durées de note d'après DUR"
+
+#: midi2ly.py:1054
+msgid "debug printing"
+msgstr "affiche des informations de débogage"
 
-#: midi2ly.py:984
+#: midi2ly.py:1057
 msgid "print explicit durations"
-msgstr "Écrit des durées explicites"
+msgstr "affecte des durées explicites"
 
-#: midi2ly.py:989
+#: midi2ly.py:1062
 msgid "prepend FILE to output"
-msgstr "ajout de FICHIER à la sortie"
+msgstr "ajoute FICHIER à la sortie"
 
-#: midi2ly.py:993
+#: midi2ly.py:1066
 msgid "set key: ALT=+sharps|-flats; MINOR=1"
-msgstr "Définit l'armure : ALT=+dièse|-bémol; MINEUR=1"
+msgstr "définit l'armure : ALT=+dièse|-bémol; MINEUR=1"
 
-#: midi2ly.py:994
+#: midi2ly.py:1067
 msgid "ALT[:MINOR]"
 msgstr "ALT[:MINEUR]"
 
-#: midi2ly.py:996 abc2ly.py:1388 etf2ly.py:1207
+#: midi2ly.py:1069 abc2ly.py:1388 etf2ly.py:1207
 msgid "write output to FILE"
-msgstr "produire la sortie dans le FICHIER"
+msgstr "produit la sortie dans le FICHIER"
 
-#: midi2ly.py:999
+#: midi2ly.py:1072
 msgid "preview of first 4 bars"
 msgstr "prévisualisation des quatre premières mesures"
 
-#: midi2ly.py:1001
+#: midi2ly.py:1074
 msgid "quantise note starts on DUR"
-msgstr "Quantifie les débuts de note sur DUR"
+msgstr "quantifie les débuts de note sur DUR"
 
-#: midi2ly.py:1004
+#: midi2ly.py:1078
+msgid "use s instead of r for rests"
+msgstr "traduit les silences en « s », non en « r »"
+
+#: midi2ly.py:1080
 msgid "DUR*NUM/DEN"
 msgstr "DUR*NUM/DEN"
 
-#: midi2ly.py:1007
+#: midi2ly.py:1083
 msgid "allow tuplet durations DUR*NUM/DEN"
-msgstr "Permet des n-olets de durée DUR*NUM/DEN"
+msgstr "permet des n-olets de durée DUR*NUM/DEN"
 
-#: midi2ly.py:1016 lilypond-book.py:215 convert-ly.py:139 etf2ly.py:1210
-#: main.cc:170
+#: midi2ly.py:1092 lilypond-book.py:220 convert-ly.py:139 etf2ly.py:1210
+#: main.cc:176
 msgid "show warranty and copyright"
-msgstr "afficher les notices de garantie et du droit d'auteur"
+msgstr "affiche les notices de garantie et du droit d'auteur"
 
-#: midi2ly.py:1019
+#: midi2ly.py:1095
 msgid "treat every text as a lyric"
-msgstr "Traite tout texte comme étant des paroles"
+msgstr "traite tout texte comme étant des paroles"
 
-#: midi2ly.py:1022
+#: midi2ly.py:1098
 msgid "Examples"
 msgstr "Exemples"
 
-#: midi2ly.py:1042
+#: midi2ly.py:1122
 msgid "no files specified on command line."
 msgstr "aucun fichier spéficié sur la ligne de commande."
 
@@ -1270,12 +1312,12 @@ msgstr "FILTRE"
 
 #: lilypond-book.py:130
 msgid "pipe snippets through FILTER [default: `convert-ly -n -']"
-msgstr "Passe les extraits à travers le FILTRE [par défaut : `convert-ly -n -']"
+msgstr "passe les extraits à travers le FILTRE [par défaut : `convert-ly -n -']"
 
 #: lilypond-book.py:134
 msgid "use output format FORMAT (texi [default], texi-html, latex, html, docbook)"
 msgstr ""
-"Utilise le format de sortie FORMAT (texi par défaut, texi-html, latex,\n"
+"utilise le format de sortie FORMAT (texi par défaut, texi-html, latex,\n"
 "html ou docbook)"
 
 #: lilypond-book.py:135
@@ -1284,16 +1326,16 @@ msgstr "FORMAT"
 
 #: lilypond-book.py:142
 msgid "add DIR to include path"
-msgstr "Ajoute le RÉP au chemin de recherche des inclusions"
+msgstr "ajoute le RÉP au chemin de recherche des inclusions"
 
 #: lilypond-book.py:143 lilypond-book.py:150 lilypond-book.py:163
-#: lilypond-book.py:173 lilypond-book.py:189 lilypond-book.py:195 main.cc:160
+#: lilypond-book.py:173 lilypond-book.py:194 lilypond-book.py:200 main.cc:164
 msgid "DIR"
 msgstr "RÉP"
 
 #: lilypond-book.py:148
 msgid "format Texinfo output so that Info will look for images of music in DIR"
-msgstr "Formate la sortie Texinfo pour qu'Info cherche les images dans RÉP"
+msgstr "formate la sortie Texinfo pour qu'Info cherche les images dans RÉP"
 
 #: lilypond-book.py:155
 msgid "PAD"
@@ -1302,19 +1344,19 @@ msgstr "PAD"
 #: lilypond-book.py:157
 msgid "pad left side of music to align music inspite of uneven bar numbers (in mm)"
 msgstr ""
-"Tasse la musique par la gauche pour la répartir en dépit du nombre irrégulier\n"
+"tasse la musique par la gauche pour la répartir en dépit du nombre irrégulier\n"
 "de mesures (en mm)"
 
 #: lilypond-book.py:162
 msgid "write lily-XXX files to DIR, link into --output dir"
 msgstr ""
-"Ã\89crit les fichiers lily-XXX dans RÉP et crée un lien vers le répertoire\n"
+"écrit les fichiers lily-XXX dans RÉP et crée un lien vers le répertoire\n"
 "spécifié par --output"
 
 #: lilypond-book.py:167
 msgid "Load the additional python PACKAGE (containing e.g. a custom output format)"
 msgstr ""
-"Charge le PAQUETAGE python supplémentaire (contenant p.ex. un format\n"
+"charge le PAQUETAGE python supplémentaire (contenant p.ex. un format\n"
 "de sortie particulier)"
 
 #: lilypond-book.py:168
@@ -1323,7 +1365,7 @@ msgstr "PAQUETAGE"
 
 #: lilypond-book.py:172
 msgid "write output to DIR"
-msgstr "Produit la sortie dans RÉP"
+msgstr "produit la sortie dans RÉP"
 
 #: lilypond-book.py:177
 msgid "COMMAND"
@@ -1331,95 +1373,99 @@ msgstr "COMMANDE"
 
 #: lilypond-book.py:178
 msgid "process ly_files using COMMAND FILE..."
-msgstr "Traîte ly_files en utilisant COMMANDE FICHIER..."
+msgstr "traîte ly_files en utilisant COMMANDE FICHIER..."
+
+#: lilypond-book.py:183
+msgid "Redirect the lilypond output"
+msgstr "redirige la sortie la sortie lilypond"
 
-#: lilypond-book.py:182
+#: lilypond-book.py:187
 msgid "Compile snippets in safe mode"
-msgstr "Compile des extraits en mode protégé"
+msgstr "compile des extraits en mode protégé"
 
-#: lilypond-book.py:188
+#: lilypond-book.py:193
 msgid "do not fail if no lilypond output is found"
-msgstr "Désactive la mise en échec en l’absence de sortie de lilypond"
+msgstr "désactive la mise en échec en l’absence de sortie de lilypond"
 
-#: lilypond-book.py:194
+#: lilypond-book.py:199
 msgid "do not fail if no PNG images are found for EPS files"
 msgstr ""
-"Désactive la mise en échec en l’absence d’images PNG correspondant aux\n"
-"fichiers EPS"
+"désactive la mise en échec en l’absence d’images PNG\n"
+"correspondant aux fichiers EPS"
 
-#: lilypond-book.py:200
+#: lilypond-book.py:205
 msgid "write snippet output files with the same base name as their source file"
 msgstr ""
-"Affecte au résultat des extraits la même racine\n"
+"affecte au résultat des extraits la même racine\n"
 "que celle des fichiers source"
 
-#: lilypond-book.py:220
+#: lilypond-book.py:225
 msgid ""
 "run executable PROG instead of latex, or in\n"
 "case --pdf option is set instead of pdflatex"
 msgstr ""
-"Utilise l’exécutable PROG en lieu et place de latex,\n"
+"utilise l’exécutable PROG en lieu et place de latex,\n"
 "ou lorsque l'option --pdf remplace pdflatex"
 
-#: lilypond-book.py:222
+#: lilypond-book.py:227
 msgid "PROG"
 msgstr "PROG"
 
-#: lilypond-book.py:228
+#: lilypond-book.py:233
 msgid "create PDF files for use with PDFTeX"
-msgstr "Crée des fichiers PDF pour utilisation par PDFTeX"
+msgstr "crée des fichiers PDF pour utilisation par PDFTeX"
 
-#: lilypond-book.py:419
+#: lilypond-book.py:428
 msgid "Writing snippets..."
 msgstr "Écriture des extraits..."
 
-#: lilypond-book.py:425
+#: lilypond-book.py:434
 msgid "Processing..."
 msgstr "Traitement..."
 
-#: lilypond-book.py:431
+#: lilypond-book.py:440
 msgid "All snippets are up to date..."
 msgstr "Tous les extraits sont à jour..."
 
-#: lilypond-book.py:452
+#: lilypond-book.py:461
 #, python-format
 msgid "cannot determine format for: %s"
 msgstr "format indéterminé pour %s"
 
-#: lilypond-book.py:461
+#: lilypond-book.py:470
 #, python-format
 msgid "%s is up to date."
 msgstr "%s est à jour."
 
-#: lilypond-book.py:475
+#: lilypond-book.py:484
 #, python-format
 msgid "Writing `%s'..."
 msgstr "Écriture de « %s »..."
 
-#: lilypond-book.py:537
+#: lilypond-book.py:546
 msgid "Output would overwrite input file; use --output."
 msgstr "La sortie va écraser le fichier d'entrée ; utiliser --output"
 
-#: lilypond-book.py:541
+#: lilypond-book.py:550
 #, python-format
 msgid "Reading %s..."
 msgstr "Lecture en cours de %s..."
 
-#: lilypond-book.py:549
+#: lilypond-book.py:558
 msgid "Dissecting..."
 msgstr "Dissection en cours..."
 
-#: lilypond-book.py:561
+#: lilypond-book.py:570
 #, python-format
 msgid "Compiling %s..."
 msgstr "Compilation de %s..."
 
-#: lilypond-book.py:570
+#: lilypond-book.py:579
 #, python-format
 msgid "Processing include: %s"
 msgstr "Traitement d'inclusion : %s"
 
-#: lilypond-book.py:582
+#: lilypond-book.py:591
 #, python-format
 msgid "Removing `%s'"
 msgstr "Suppression de « %s »"
@@ -1493,7 +1539,9 @@ msgstr "impossible d'ouvrir le fichier « %s »"
 #: convert-ly.py:339
 #, python-format
 msgid "%s: Unable to determine version.  Skipping"
-msgstr "impossible de déterminer la version  de « %s ». Au suivant !"
+msgstr ""
+"impossible de déterminer la version  de « %s ».\n"
+" Au suivant !"
 
 #: convert-ly.py:344
 #, python-format
@@ -1532,7 +1580,7 @@ msgstr "Autres langues"
 msgid "success: %s"
 msgstr "Résultat : %s"
 
-#: warn.cc:86 grob.cc:617 input.cc:97
+#: warn.cc:86 grob.cc:613 input.cc:97
 #, c-format
 msgid "programming error: %s"
 msgstr "erreur de programmation : %s"
@@ -1577,7 +1625,7 @@ msgstr "flexe de style vaticana ascendant"
 msgid "Vaticana_ligature: zero join (delta_pitch == 0)"
 msgstr "Vaticana_ligature: aucun joint (delta_pitch == 0)"
 
-#: parse-scm.cc:101
+#: parse-scm.cc:100
 msgid "GUILE signaled an error for the expression beginning here"
 msgstr "GUILE a signalé une erreur pour l'expression débutant ici"
 
@@ -1586,15 +1634,15 @@ msgid "rhythmic head is not part of a rhythmic column"
 msgstr "tête rythmique non rattachée à un empilement rythmique"
 
 #. if we get to here, just put everything on one line
-#: constrained-breaking.cc:189 constrained-breaking.cc:207
+#: constrained-breaking.cc:187 constrained-breaking.cc:205
 msgid "cannot find line breaking that satisfies constraints"
 msgstr "impossible de trouver un saut de ligne qui satisfasse aux contraintes"
 
-#: horizontal-bracket-engraver.cc:78
+#: horizontal-bracket-engraver.cc:62
 msgid "do not have that many brackets"
 msgstr "n'a pas autant de crochets"
 
-#: horizontal-bracket-engraver.cc:87
+#: horizontal-bracket-engraver.cc:71
 msgid "conflicting note group events"
 msgstr "événements de groupe de notes conflictuels"
 
@@ -1606,12 +1654,12 @@ msgstr "retrait du trait d'union sans suite"
 msgid "unterminated hyphen; removing"
 msgstr "trait d'union sans suite ; escamoté"
 
-#: pango-font.cc:187 open-type-font.cc:319
+#: pango-font.cc:189 open-type-font.cc:318
 #, c-format
 msgid "FT_Get_Glyph_Name () error: %s"
 msgstr "Erreur FT_Get_Glyph_Name () : %s"
 
-#: pango-font.cc:204
+#: pango-font.cc:205
 #, c-format
 msgid ""
 "Glyph has no name, but font supports glyph naming.\n"
@@ -1620,16 +1668,16 @@ msgstr ""
 "Le glyphe n'a pas de nom alors que la fonte prend en charge leur nommage.\n"
 "Glyphe U+%0X ignoré dans le fichier %s"
 
-#: pango-font.cc:241
+#: pango-font.cc:242
 #, c-format
 msgid "no PostScript font name for font `%s'"
 msgstr "« %s » n'est pas un fichier de fonte PostScript"
 
-#: pango-font.cc:290
+#: pango-font.cc:291
 msgid "FreeType face has no PostScript font name"
 msgstr "Caractère FreeType sans nom de police PostScript"
 
-#: midi-item.cc:92
+#: midi-item.cc:89
 #, c-format
 msgid "no such MIDI instrument: `%s'"
 msgstr "instrument MIDI non répertorié : « %s »"
@@ -1638,7 +1686,7 @@ msgstr "instrument MIDI non répertorié : « %s »"
 msgid "NoteEvent without pitch"
 msgstr "NoteEvent sans hauteur"
 
-#: rest.cc:159
+#: rest.cc:160
 #, c-format
 msgid "rest `%s' not found"
 msgstr "silence « %s » inconnu"
@@ -1656,7 +1704,7 @@ msgstr "ligature déjà présente"
 msgid "unterminated beam"
 msgstr "ligature non terminée"
 
-#: beam-engraver.cc:266 chord-tremolo-engraver.cc:150
+#: beam-engraver.cc:266 chord-tremolo-engraver.cc:149
 msgid "stem must have Rhythmic structure"
 msgstr "la hampe doit avoir une structure Rythmic"
 
@@ -1668,26 +1716,28 @@ msgstr "la hampe ne s'insère pas dans la ligature"
 msgid "beam was started here"
 msgstr "la ligature a débuté ici"
 
-#: music-iterator.cc:182
+#: music-iterator.cc:181
 msgid "Sending non-event to context"
 msgstr "Envoi d'un non-événement au contexte"
 
-#: context.cc:149
+#: context.cc:148
 #, c-format
 msgid "cannot find or create new `%s'"
 msgstr "impossible de trouver ou créer un nouveau « %s »"
 
-#: context.cc:207
+#: context.cc:206
 #, c-format
 msgid "cannot find or create `%s' called `%s'"
 msgstr "impossible de trouver ou créer « %s » appelé « %s »"
 
-#: context.cc:269
+#: context.cc:268
 #, c-format
 msgid "Invalid CreateContext event: Cannot create %s context"
-msgstr "Événement CreateContext invalide : impossible de créer le contexte %s"
+msgstr ""
+"Événement CreateContext invalide :\n"
+" impossible de créer le contexte %s"
 
-#: context.cc:400
+#: context.cc:399
 #, c-format
 msgid "cannot find or create: `%s'"
 msgstr "impossible de trouver ou créer « %s »"
@@ -1707,11 +1757,11 @@ msgstr ""
 "Un saut explicite a été outrepassé par un autre événement.\n"
 "Positionnez quelques contrôles de mesure (bar check) pour vérifier."
 
-#: tie-engraver.cc:116
+#: tie-engraver.cc:117
 msgid "unterminated tie"
 msgstr "liaison de prolongation non terminée"
 
-#: tie-engraver.cc:312
+#: tie-engraver.cc:348
 msgid "lonely tie"
 msgstr "liaison de prolongation orpheline"
 
@@ -1797,27 +1847,27 @@ msgstr ""
 "l'avant dernière note doit en être une autre,\n"
 "sinon la ligature doit être LB ou SSB"
 
-#: mensural-ligature-engraver.cc:386
+#: mensural-ligature-engraver.cc:387
 msgid "unexpected case fall-through"
 msgstr "cas inattendu et non interprétable"
 
-#: piano-pedal-engraver.cc:298
+#: piano-pedal-engraver.cc:296
 #, c-format
 msgid "expect 3 strings for piano pedals, found: %ld"
 msgstr "Les pédales de piano nécessitent 3 cordes. Il y en a %ld"
 
-#: piano-pedal-engraver.cc:313 piano-pedal-engraver.cc:324
+#: piano-pedal-engraver.cc:311 piano-pedal-engraver.cc:322
 #: piano-pedal-performer.cc:104
 #, c-format
 msgid "cannot find start of piano pedal: `%s'"
 msgstr "début de la pédale de piano indéterminé : « %s »"
 
-#: piano-pedal-engraver.cc:359
+#: piano-pedal-engraver.cc:357
 #, c-format
 msgid "cannot find start of piano pedal bracket: `%s'"
 msgstr "début du crochet de la pédale de piano indéterminé : « %s »"
 
-#: input.cc:131 source-file.cc:179 source-file.cc:194
+#: input.cc:130 source-file.cc:178 source-file.cc:193
 msgid "position unknown"
 msgstr "position inconnue"
 
@@ -1826,32 +1876,32 @@ msgstr "position inconnue"
 msgid "Layout output to `%s'..."
 msgstr "Sortie mise en page vers « %s »..."
 
-#: general-scheme.cc:306
+#: general-scheme.cc:305
 msgid "infinity or NaN encountered while converting Real number"
 msgstr "Infini ou valeur non numérique rencontré lors de la conversion d'un nombre réel"
 
-#: general-scheme.cc:307
+#: general-scheme.cc:306
 msgid "setting to zero"
 msgstr "initialisation à zéro"
 
-#: general-scheme.cc:543
+#: general-scheme.cc:540
 msgid "Found infinity or nan in output. Substituting 0.0"
 msgstr ""
 "La sortie contient l'infini ou une valeur non numérique.\n"
 "Substitution par 0.0"
 
-#: music.cc:151
+#: music.cc:150
 #, c-format
 msgid "octave check failed; expected \"%s\", found: \"%s\""
 msgstr ""
 "Échec de vérification d'octave.\n"
 "Aurait dû être \"%s\", \"%s\" obtenu"
 
-#: music.cc:219
+#: music.cc:218
 msgid "(normalized pitch)"
 msgstr "(hauteur normalisée)"
 
-#: music.cc:223
+#: music.cc:222
 #, c-format
 msgid "Transposing %s by %s makes alteration larger than double"
 msgstr "La transposition de %s à %s crée des altérations supérieures aux doubles"
@@ -1865,21 +1915,21 @@ msgstr "translateur inconnu : « %s »"
 msgid "trying to use \\partial after the start of a piece"
 msgstr "\\partial ne devrait intervenir qu'en début de morceau"
 
-#: new-fingering-engraver.cc:106
+#: new-fingering-engraver.cc:105
 msgid "cannot add text scripts to individual note heads"
 msgstr "impossible d'ajouter du texte à des têtes de notes individuelles"
 
-#: new-fingering-engraver.cc:250
+#: new-fingering-engraver.cc:249
 msgid "no placement found for fingerings"
 msgstr "nulle part où positionner des doigtés"
 
-#: new-fingering-engraver.cc:251
+#: new-fingering-engraver.cc:250
 msgid "placing below"
 msgstr "on les place en dessous"
 
 #: ligature-engraver.cc:104 ligature-bracket-engraver.cc:72
 msgid "cannot find start of ligature"
-msgstr "impossible de trouver le début d'une ligature"
+msgstr "impossible de trouver le début de la ligature"
 
 #: ligature-engraver.cc:109
 msgid "no right bound"
@@ -1893,15 +1943,15 @@ msgstr "a déjà une ligature"
 msgid "no left bound"
 msgstr "pas de borne à gauche"
 
-#: ligature-engraver.cc:185
+#: ligature-engraver.cc:184
 msgid "unterminated ligature"
 msgstr "ligature non terminée"
 
-#: ligature-engraver.cc:214
+#: ligature-engraver.cc:211
 msgid "ignoring rest: ligature may not contain rest"
 msgstr "le silence est ignoré : une ligature ne peut contenir de silence"
 
-#: ligature-engraver.cc:215
+#: ligature-engraver.cc:212
 msgid "ligature was started here"
 msgstr "la ligature a débuté ici"
 
@@ -1910,32 +1960,32 @@ msgstr "la ligature a débuté ici"
 msgid "cannot change, already in translator: %s"
 msgstr "modification impossible, c'est déjà dans le translateur : %s"
 
-#: accidental-engraver.cc:180
+#: accidental-engraver.cc:179
 #, c-format
 msgid "accidental typesetting list must begin with context-name: %s"
 msgstr ""
 "La saisie d'une liste d'altérations accidentelles doit débuter \n"
 "par un nom de contexte : %s"
 
-#: accidental-engraver.cc:210
+#: accidental-engraver.cc:209
 #, c-format
 msgid "procedure or context-name expected for accidental rule, found %s"
 msgstr ""
 "procédure ou nom de contexte requis pour la règle d'altération accidentelle,\n"
 "%s trouvé"
 
-#: ttf.cc:481 ttf.cc:530
+#: ttf.cc:480 ttf.cc:529
 #, c-format
 msgid "font index %d too large for font `%s', using index 0"
 msgstr ""
 "index %d trop grand pour la fonte « %s » ;\n"
 "réindexé sur 0"
 
-#: ttf.cc:513 ttf.cc:565
+#: ttf.cc:512 ttf.cc:564
 msgid "font index must be non-negative, using index 0"
 msgstr "l'index de fonte ne peut être négatif ; réindexé sur 0"
 
-#: break-alignment-interface.cc:206
+#: break-alignment-interface.cc:199
 #, c-format
 msgid "No spacing entry from %s to `%s'"
 msgstr "Pas d'espacement entre %s et « %s »"
@@ -1996,7 +2046,7 @@ msgstr "Chemin de recherche : « %s »"
 msgid "Aborting"
 msgstr "Abandon"
 
-#: note-collision.cc:497
+#: note-collision.cc:494
 msgid "ignoring too many clashing note columns"
 msgstr "trop d'empilements de notes se chevauchent. On fera au mieux."
 
@@ -2017,22 +2067,22 @@ msgstr "a déjà une extension terminée"
 msgid "giving up"
 msgstr "abandon"
 
-#: page-layout-problem.cc:322
+#: page-layout-problem.cc:603
 msgid "cannot fit music on page: ragged-spacing was requested, but page was compressed"
 msgstr ""
 "impossible de faire tenir la musique sur la page :\n"
 "  justification demandée, mais page déjà compressée"
 
-#: page-layout-problem.cc:325
+#: page-layout-problem.cc:606
 #, c-format
 msgid "cannot fit music on page: overflow is %f"
 msgstr "impossible de faire tenir la musique sur la page.  Débordement de %f"
 
-#: page-layout-problem.cc:327
+#: page-layout-problem.cc:608
 msgid "compressing music to fit"
 msgstr "compression de la musique pour que cela tienne"
 
-#: page-layout-problem.cc:765
+#: page-layout-problem.cc:1047
 msgid "staff-affinities should only decrease"
 msgstr "staff-affinities devraient aller en ordre décroissant"
 
@@ -2049,7 +2099,7 @@ msgstr "rehearsalMark doit être un entier"
 msgid "mark label must be a markup object"
 msgstr "les étiquettes de marque doivent être des objets de type \"markup\""
 
-#: new-dynamic-engraver.cc:142
+#: new-dynamic-engraver.cc:168
 #, c-format
 msgid ""
 "unknown crescendo style: %s\n"
@@ -2058,35 +2108,34 @@ msgstr ""
 "style de crescendo inconnu : %s\n"
 "retour à la valeur par défaut (soufflet)."
 
-#: new-dynamic-engraver.cc:200
+#: new-dynamic-engraver.cc:233
 #, c-format
 msgid "unterminated %s"
 msgstr "%s non terminé(e)"
 
-#: stem-engraver.cc:103
+#: stem-engraver.cc:102
 msgid "tremolo duration is too long"
 msgstr "durée du tremolo trop longue"
 
-#. FIXME:
-#: stem-engraver.cc:140
+#: stem-engraver.cc:154
 #, c-format
-msgid "adding note head to incompatible stem (type = %d)"
-msgstr "Ajout d'une tête de note à une hampe incompatible (type = %d)"
+msgid "adding note head to incompatible stem (type = %d/%d)"
+msgstr "Ajout d'une tête de note à une hampe incompatible (type = %d/%d)"
 
-#: stem-engraver.cc:142
+#: stem-engraver.cc:157
 msgid "maybe input should specify polyphonic voices"
 msgstr "la source devrait spécifier des voix polyphoniques"
 
-#: lily-lexer.cc:264
+#: lily-lexer.cc:265
 msgid "include files are not allowed in safe mode"
 msgstr "l'inclusion de fichiers n'est pas permise en mode sans échec"
 
-#: lily-lexer.cc:291
+#: lily-lexer.cc:292
 #, c-format
 msgid "identifier name is a keyword: `%s'"
 msgstr "Le nom de l'identificateur est un mot clé : « %s »"
 
-#: lily-lexer.cc:312
+#: lily-lexer.cc:313
 #, c-format
 msgid "error at EOF: %s"
 msgstr "erreur à la fin du fichier (EOF) : %s"
@@ -2096,12 +2145,12 @@ msgstr "erreur à la fin du fichier (EOF) : %s"
 msgid "cannot find Voice `%s'"
 msgstr "impossible de repérer la voix (Voice) « %s »"
 
-#: includable-lexer.cc:71 lily-guile.cc:87 lily-parser-scheme.cc:109
+#: includable-lexer.cc:71 lily-guile.cc:86 lily-parser-scheme.cc:109
 #, c-format
 msgid "cannot find file: `%s'"
 msgstr "fichier non trouvé : « %s »"
 
-#: includable-lexer.cc:73 lily-parser-scheme.cc:100
+#: includable-lexer.cc:73 lily-parser-scheme.cc:101
 #, c-format
 msgid "(search path: `%s')"
 msgstr "(chemin de recherche : « %s »)"
@@ -2115,40 +2164,54 @@ msgid "removing beam with no stems"
 msgstr "suppression d'une ligature ayant moins de deux hampes"
 
 #. We are completely screwed.
-#: beam.cc:1274
+#: beam.cc:1350
 msgid "no viable initial configuration found: may not find good beam slope"
 msgstr ""
 "pas de configuration initiale viable repérée : \n"
 "la pente de la ligature pourrait être inesthétique."
 
-#: slur-engraver.cc:93
+#: staff-performer.cc:257
+msgid "MIDI channel wrapped around"
+msgstr "Bouclage du canal MIDI"
+
+#: staff-performer.cc:258
+msgid "remapping modulo 16"
+msgstr "réaffectation modulo 16"
+
+#: slur-engraver.cc:90 phrasing-slur-engraver.cc:89
 #, c-format
 msgid "direction of %s invalid: %d"
 msgstr "l'orientation de %s n'est pas valide : %d"
 
-#: slur-engraver.cc:162
+#: slur-engraver.cc:158
 msgid "unterminated slur"
 msgstr "liaison non terminée"
 
-#: slur-engraver.cc:174
+#: slur-engraver.cc:183
 msgid "cannot end slur"
 msgstr "impossible de terminer la liaison"
 
-#: font-config.cc:40
+#. We already have a slur, so give a warning and completely ignore
+#. the new slur.
+#: slur-engraver.cc:200
+msgid "already have slur"
+msgstr "a déjà une liaison"
+
+#: font-config.cc:39
 msgid "Initializing FontConfig..."
 msgstr "Initialisation de FontConfig..."
 
-#: font-config.cc:55 font-config-scheme.cc:152
+#: font-config.cc:54 font-config-scheme.cc:151
 #, c-format
 msgid "failed adding font directory: %s"
 msgstr "échec lors de l'ajout d'un répertoire de fontes : « %s »"
 
-#: font-config.cc:57 font-config-scheme.cc:154
+#: font-config.cc:56 font-config-scheme.cc:153
 #, c-format
 msgid "adding font directory: %s"
 msgstr "ajout d'un répertoire de fontes : « %s »"
 
-#: font-config.cc:61
+#: font-config.cc:60
 msgid "Building font database..."
 msgstr "Construction de la base de donnée des fontes..."
 
@@ -2194,29 +2257,29 @@ msgstr "Aucun nom de glyphe ne correspond à l'altération %s"
 msgid "natural alteration glyph not found"
 msgstr "pas de glyphe correspondant au bécarre"
 
-#: system.cc:197
+#: system.cc:201
 #, c-format
 msgid "Element count %d"
 msgstr "%d éléments dénombrés."
 
-#: system.cc:303
+#: system.cc:402
 #, c-format
 msgid "Grob count %d"
 msgstr "%d objet graphiques (grob) dénombrés"
 
-#: slur.cc:362
+#: slur.cc:359
 #, c-format
 msgid "Ignoring grob for slur: %s. avoid-slur not set?"
 msgstr ""
 "objet graphique (grob) non concerné par la liaison : %s.\n"
 "avoid-slur non définie ?"
 
-#: font-config-scheme.cc:168
+#: font-config-scheme.cc:167
 #, c-format
 msgid "failed adding font file: %s"
 msgstr "échec lors de l'ajout d'un fichier de fontes : « %s »"
 
-#: font-config-scheme.cc:170
+#: font-config-scheme.cc:169
 #, c-format
 msgid "adding font file: %s"
 msgstr "ajout d'un fichier de fontes : « %s »"
@@ -2225,36 +2288,36 @@ msgstr "ajout d'un fichier de fontes : « %s »"
 msgid "decrescendo too small"
 msgstr "decrescendo trop petit"
 
-#: extender-engraver.cc:170 extender-engraver.cc:179
+#: extender-engraver.cc:169 extender-engraver.cc:178
 msgid "unterminated extender"
 msgstr "prolongation ou extenseur non terminé"
 
-#: lily-guile.cc:89
+#: lily-guile.cc:88
 #, c-format
 msgid "(load path: `%s')"
 msgstr "(chemin de chargement : « %s »)"
 
-#: lily-guile.cc:437
+#: lily-guile.cc:431
 #, c-format
 msgid "cannot find property type-check for `%s' (%s)."
 msgstr "vérification du type de propriété pour « %s » (%s) non trouvée"
 
-#: lily-guile.cc:440
+#: lily-guile.cc:434
 msgid "perhaps a typing error?"
 msgstr "Probable faute de frappe"
 
-#: lily-guile.cc:447
+#: lily-guile.cc:441
 msgid "doing assignment anyway"
 msgstr "affectation faite malgré tout"
 
-#: lily-guile.cc:459
+#: lily-guile.cc:453
 #, c-format
 msgid "type check for `%s' failed; value `%s' must be of type `%s'"
 msgstr ""
 "la vérification du type de « %s » a échoué ; \n"
 "   la valeur « %s » doit être du type « %s »"
 
-#: main.cc:109
+#: main.cc:107
 #, c-format
 msgid ""
 "This program is free software.  It is covered by the GNU General Public\n"
@@ -2267,11 +2330,12 @@ msgstr ""
 "sous certaines conditions.\n"
 "Invoquez « %s --warranty » pour plus d'informations.\n"
 
-#: main.cc:115
+#: main.cc:113
 msgid ""
 "    This program is free software; you can redistribute it and/or\n"
-"modify it under the terms of the GNU General Public License version 2\n"
-"as published by the Free Software Foundation.\n"
+"modify it under the terms of the GNU General Public License as \n"
+"published by the Free Software Foundation, either version 3 of\n"
+"the License, or (at your option) any later version.\n"
 "\n"
 "    This program is distributed in the hope that it will be useful,\n"
 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -2297,11 +2361,11 @@ msgstr ""
 " écrire à la Free Software Foundation, Inc., 59 Temple Place - Suite 330, \n"
 "Boston, MA 02111-1307, USA.\n"
 
-#: main.cc:146
+#: main.cc:147
 msgid "SYM[=VAL]"
 msgstr "SYM[=VAL]"
 
-#: main.cc:147
+#: main.cc:148
 msgid ""
 "set Scheme option SYM to VAL (default: #t).\n"
 "Use -dhelp for help."
@@ -2310,43 +2374,43 @@ msgstr ""
 "à l'option Scheme SYM.\n"
 "Utiliser -dhelp pour avoir de l'aide."
 
-#: main.cc:150
+#: main.cc:152
 msgid "EXPR"
 msgstr "EXPR"
 
-#: main.cc:150
+#: main.cc:152
 msgid "evaluate scheme code"
 msgstr "évaluation du code Scheme"
 
 #. Bug in option parser: --output =foe is taken as an abbreviation
 #. for --output-format.
-#: main.cc:153
+#: main.cc:155
 msgid "FORMATs"
 msgstr "FORMATs"
 
-#: main.cc:153
+#: main.cc:155
 msgid "dump FORMAT,...  Also as separate options:"
 msgstr ""
 "produire FORMAT,...\n"
 "Aussi comme options séparées :"
 
-#: main.cc:154
+#: main.cc:156
 msgid "generate PDF (default)"
 msgstr "générer le PDF (par défaut)"
 
-#: main.cc:155
+#: main.cc:157
 msgid "generate PNG"
 msgstr "générer le PNG"
 
-#: main.cc:156
+#: main.cc:158
 msgid "generate PostScript"
 msgstr "générer le PostScript"
 
-#: main.cc:158
+#: main.cc:161
 msgid "FIELD"
 msgstr "CHAMP"
 
-#: main.cc:158
+#: main.cc:161
 msgid ""
 "dump header field FIELD to file\n"
 "named BASENAME.FIELD"
@@ -2354,21 +2418,21 @@ msgstr ""
 "écrire le champ d'entête CHAMP dans le\n"
 "fichier nommé BASENAME.CHAMP"
 
-#: main.cc:160
+#: main.cc:164
 msgid "add DIR to search path"
 msgstr "ajouter RÉPERTOIRE au chemin de recherche"
 
-#: main.cc:161
+#: main.cc:165
 msgid "use FILE as init file"
 msgstr ""
 "utiliser FICHIER comme\n"
 "fichier d'initialisation"
 
-#: main.cc:163
+#: main.cc:168
 msgid "USER, GROUP, JAIL, DIR"
 msgstr "USER,GROUP,CAGE,RÉP"
 
-#: main.cc:163
+#: main.cc:168
 msgid ""
 "chroot to JAIL, become USER:GROUP\n"
 "and cd into DIR"
@@ -2376,20 +2440,20 @@ msgstr ""
 "chroot dans CAGE, devenir UTILISATEUR:GROUPE\n"
 "et cd dans RÉPERTOIRE"
 
-#: main.cc:166
+#: main.cc:172
 msgid "write output to FILE (suffix will be added)"
 msgstr ""
 "produire la sortie dans FICHIER \n"
 "(adjonction automatique du suffixe)"
 
-#: main.cc:167
+#: main.cc:173
 msgid "relocate using directory of lilypond program"
 msgstr ""
 "redétermine le chemin d'exécution\n"
 "des composants de LilyPond"
 
 #. Do not update the copyright years here, run `make grand-replace'
-#: main.cc:238
+#: main.cc:242
 #, c-format
 msgid ""
 "Copyright (c) %s by\n"
@@ -2399,88 +2463,88 @@ msgstr ""
 "%s et autres."
 
 #. No version number or newline here.  It confuses help2man.
-#: main.cc:265
+#: main.cc:269
 #, c-format
 msgid "Usage: %s [OPTION]... FILE..."
 msgstr "Utilisation : %s [OPTIONS]... FICHIER..."
 
-#: main.cc:267
+#: main.cc:271
 msgid "Typeset music and/or produce MIDI from FILE."
 msgstr "Composer la musique ou jouer en format MIDI à partir du FICHIER"
 
-#: main.cc:269
+#: main.cc:273
 msgid "LilyPond produces beautiful music notation."
 msgstr "LilyPond produit une jolie notation musicale"
 
-#: main.cc:271
+#: main.cc:275
 #, c-format
 msgid "For more information, see %s"
 msgstr "Pour plus d'informations, voir %s"
 
-#: main.cc:273
+#: main.cc:277
 msgid "Options:"
 msgstr "Options :"
 
-#: main.cc:327
+#: main.cc:331
 #, c-format
 msgid "expected %d arguments with jail, found: %u"
 msgstr "une cage requiert %d arguments, il y en a %u"
 
-#: main.cc:341
+#: main.cc:345
 #, c-format
 msgid "no such user: %s"
 msgstr "utilisateur inconnu : « %s »"
 
-#: main.cc:343
+#: main.cc:347
 #, c-format
 msgid "cannot get user id from user name: %s: %s"
 msgstr ""
 "impossible de repérer l'identifiant utilisateur à partir du nom d'utilisateur :\n"
 "%s : %s"
 
-#: main.cc:358
+#: main.cc:362
 #, c-format
 msgid "no such group: %s"
 msgstr "groupe inconnu : %s"
 
-#: main.cc:360
+#: main.cc:364
 #, c-format
 msgid "cannot get group id from group name: %s: %s"
 msgstr ""
 "impossible de repérer l'identifiant groupe à partir du nom de groupe :\n"
 "%s : %s "
 
-#: main.cc:368
+#: main.cc:372
 #, c-format
 msgid "cannot chroot to: %s: %s"
 msgstr "impossible de chrooter vers : %s : %s"
 
-#: main.cc:375
+#: main.cc:379
 #, c-format
 msgid "cannot change group id to: %d: %s"
 msgstr "impossible de changer l'identifiant de groupe en %d : %s"
 
-#: main.cc:381
+#: main.cc:385
 #, c-format
 msgid "cannot change user id to: %d: %s"
 msgstr "impossible de changer l'identifiant utilisateur en %d : %s"
 
-#: main.cc:387
+#: main.cc:391
 #, c-format
 msgid "cannot change working directory to: %s: %s"
 msgstr "impossible de changer le répertoire de travail en %s : %s"
 
-#: main.cc:628
+#: main.cc:631
 #, c-format
 msgid "exception caught: %s"
 msgstr "exception capturée : %s"
 
-#: key-signature-interface.cc:78
+#: key-signature-interface.cc:77
 #, c-format
 msgid "No glyph found for alteration: %s"
 msgstr "Pas de glyphe pour l'altération « %s »"
 
-#: key-signature-interface.cc:88
+#: key-signature-interface.cc:87
 msgid "alteration not found"
 msgstr "altération non trouvée"
 
@@ -2489,36 +2553,36 @@ msgstr "altération non trouvée"
 msgid "dot `%s' not found"
 msgstr "point « %s » introuvable"
 
-#: translator.cc:359
+#: translator.cc:356
 #, c-format
 msgid "Two simultaneous %s events, junking this one"
 msgstr "Deux événements %s simultanés, rejet de celui-ci"
 
-#: translator.cc:360
+#: translator.cc:357
 #, c-format
 msgid "Previous %s event here"
 msgstr "Événement %s précédent ici"
 
-#: glissando-engraver.cc:105
+#: glissando-engraver.cc:156
 msgid "unterminated glissando"
 msgstr "glissando non terminé"
 
-#: text-spanner-engraver.cc:73
+#: text-spanner-engraver.cc:72
 msgid "cannot find start of text spanner"
 msgstr "impossible de repérer le point de départ de l'extension de texte"
 
-#: text-spanner-engraver.cc:86
+#: text-spanner-engraver.cc:85
 msgid "already have a text spanner"
 msgstr "a déjà une extension de texte"
 
-#: text-spanner-engraver.cc:132
+#: text-spanner-engraver.cc:130
 msgid "unterminated text spanner"
 msgstr "extension de texte non terminée"
 
 #: clef.cc:65
 #, c-format
 msgid "clef `%s' not found"
-msgstr "clé `%s' introuvable"
+msgstr "clé « %s » introuvable"
 
 #.
 #. Todo: should make typecheck?
@@ -2530,12 +2594,14 @@ msgstr "clé `%s' introuvable"
 msgid "strange time signature found: %d/%d"
 msgstr "Chiffrage de mesure inhabituel : %d/%d"
 
-#: lily-parser-scheme.cc:82
+#: lily-parser-scheme.cc:83
 #, c-format
 msgid "Changing working directory to: `%s'"
-msgstr "Modification du répertoire de travail pour « %s »"
+msgstr ""
+"Modification du répertoire de travail pour\n"
+" « %s »"
 
-#: lily-parser-scheme.cc:99
+#: lily-parser-scheme.cc:100
 #, c-format
 msgid "cannot find init file: `%s'"
 msgstr "impossible de trouver le fichier d'initialisation « %s »"
@@ -2545,7 +2611,7 @@ msgstr "impossible de trouver le fichier d'initialisation « %s »"
 msgid "Processing `%s'"
 msgstr "Traitement de « %s »"
 
-#: lily-parser-scheme.cc:204
+#: lily-parser-scheme.cc:203
 msgid "ly:parser-parse-string is only valid with a new parser.  Use ly:parser-include-string instead."
 msgstr ""
 "ly:parser-parse-string ne peut foncionner qu'avec un nouvel analyseur.\n"
@@ -2556,7 +2622,7 @@ msgstr ""
 msgid "custos `%s' not found"
 msgstr "custode « %s » introuvable"
 
-#: program-option-scheme.cc:237
+#: program-option-scheme.cc:232
 #, c-format
 msgid "no such internal option: %s"
 msgstr "option interne inconnue : %s"
@@ -2565,10 +2631,17 @@ msgstr "option interne inconnue : %s"
 msgid "cannot resolve rest collision: rest direction not set"
 msgstr "collision de silences insoluble : positionnement du silence indéterminée"
 
-#: rest-collision.cc:160 rest-collision.cc:205
+#: rest-collision.cc:160 rest-collision.cc:275
 msgid "too many colliding rests"
 msgstr "trop de silences se chevauchent"
 
+#: pdf-scheme.cc:50
+#, c-format
+msgid "Conversion of string `%s' to UTF-16be failed: %s"
+msgstr ""
+"La conversion de la chaîne « %s » en UTF-16be a échoué :\n"
+" %s"
+
 #: episema-engraver.cc:75
 msgid "already have an episema"
 msgstr "épisème déjà présent"
@@ -2586,57 +2659,57 @@ msgstr "épisème non terminé"
 msgid "%d: %s"
 msgstr "%d : %s"
 
-#: grob-property.cc:173
+#: grob-property.cc:169
 #, c-format
 msgid "cyclic dependency: calculation-in-progress encountered for #'%s (%s)"
 msgstr "dépendance circulaire : calculation-in-progress rencontrée pour #'%s (%s)"
 
-#: relocate.cc:54
+#: relocate.cc:53
 #, c-format
 msgid "Setting %s to %s"
 msgstr "%s fixé à %s"
 
-#: relocate.cc:74
+#: relocate.cc:73
 #, c-format
 msgid "no such file: %s for %s"
 msgstr "fichier inexistant : %s pour %s"
 
-#: relocate.cc:84 relocate.cc:102
+#: relocate.cc:83 relocate.cc:101
 #, c-format
 msgid "no such directory: %s for %s"
 msgstr "répertoire inexistant : %s pour %s"
 
-#: relocate.cc:94
+#: relocate.cc:93
 #, c-format
 msgid "%s=%s (prepend)\n"
 msgstr "%s=%s (ajout)\n"
 
-#: relocate.cc:124
+#: relocate.cc:123
 #, c-format
 msgid "not relocating, no %s/ or current/ found under %s"
 msgstr "relocalisation non effectuée, ni %s/ ni courrant/ n'existent sous %s"
 
-#: relocate.cc:135
+#: relocate.cc:134
 #, c-format
 msgid "Relocation: compile datadir=%s, new datadir=%s"
 msgstr "Relocalisation : datadir de compilation=%s, nouveau datadir=%s"
 
-#: relocate.cc:148
+#: relocate.cc:147
 #, c-format
 msgid "Relocation: framework_prefix=%s"
 msgstr "Relocalisation : framework_prefix=%s"
 
-#: relocate.cc:189
+#: relocate.cc:188
 #, c-format
 msgid "Relocation: is absolute: argv0=%s"
 msgstr "Relocalisation : argv0=%s est absolu"
 
-#: relocate.cc:196
+#: relocate.cc:195
 #, c-format
 msgid "Relocation: from cwd: argv0=%s"
 msgstr "Relocalisation : argv0=%s à partir du répertoire courant"
 
-#: relocate.cc:213
+#: relocate.cc:212
 #, c-format
 msgid ""
 "Relocation: from PATH=%s\n"
@@ -2645,25 +2718,45 @@ msgstr ""
 "Relocalisation : à partir de PATH=%s\n"
 "argv0=%s"
 
-#: relocate.cc:240
+#: relocate.cc:239
 msgid "LILYPONDPREFIX is obsolete, use LILYPOND_DATADIR"
 msgstr "LILYPONDPREFIX est obsolète, utiliser LILYPOND_DATADIR"
 
-#: relocate.cc:367
+#: relocate.cc:365
 #, c-format
 msgid "Relocation file: %s"
 msgstr "Fichier de relocalisation : %s"
 
-#: relocate.cc:373 source-file.cc:65
+#: relocate.cc:371 source-file.cc:65
 #, c-format
 msgid "cannot open file: `%s'"
 msgstr "Impossible d'ouvrir le fichier « %s »"
 
-#: relocate.cc:403
+#: relocate.cc:401
 #, c-format
 msgid "Unknown relocation command %s"
 msgstr "Commande de relocalisation inconnue : %s"
 
+#: gregorian-ligature-engraver.cc:70
+#, c-format
+msgid "\\%s ignored"
+msgstr "\\%s ignoré(e)"
+
+#: gregorian-ligature-engraver.cc:75
+#, c-format
+msgid "implied \\%s added"
+msgstr "\\%s implicite ajouté(e)"
+
+#. ligature may not start with 2nd head of pes or flexa
+#: gregorian-ligature-engraver.cc:224
+msgid "cannot apply `\\~' on first head of ligature"
+msgstr "Impossible d'appliquer « \\~ » à la première tête de ligature"
+
+#. (pitch == prev_pitch)
+#: gregorian-ligature-engraver.cc:236
+msgid "cannot apply `\\~' on heads with identical pitch"
+msgstr "Impossible d'appliquer « \\~ » à des têtes ayant la même hauteur"
+
 #: translator-group.cc:188
 #, c-format
 msgid "cannot find: `%s'"
@@ -2673,35 +2766,35 @@ msgstr " « %s » inconnu(e)"
 msgid "unterminated phrasing slur"
 msgstr "liaison de phrasé non terminée"
 
-#: lyric-engraver.cc:176
+#: phrasing-slur-engraver.cc:182
+msgid "cannot end phrasing slur"
+msgstr "impossible de terminer la liaison de phrasé"
+
+#: phrasing-slur-engraver.cc:196
+msgid "already have phrasing slur"
+msgstr "il y a déjà une liaison de phrasé"
+
+#: lyric-engraver.cc:186
 msgid "Lyric syllable does not have note. Use \\lyricsto or associatedVoice."
 msgstr "Syllabe sans note de rattachement. Utiliser \\lyricsto ou associatedVoice."
 
-#: page-breaking.cc:248
+#: page-breaking.cc:274
 msgid "ignoring min-systems-per-page and max-systems-per-page because systems-per-page was set"
 msgstr ""
 "systems-per-page non défini :\n"
 "  min-systems-per-page et max-systems-per-page ignorés"
 
-#: page-breaking.cc:253
+#: page-breaking.cc:279
 msgid "min-systems-per-page is larger than max-systems-per-page, ignoring both values"
 msgstr ""
 "min-systems-per-page supérieur à max-systems-per-page :\n"
 "  tous deux seront ignorés"
 
-#: performance.cc:54
+#: performance.cc:55
 msgid "Track..."
 msgstr "Piste..."
 
-#: performance.cc:83
-msgid "MIDI channel wrapped around"
-msgstr "Bouclage du canal MIDI"
-
-#: performance.cc:84
-msgid "remapping modulo 16"
-msgstr "réaffectation modulo 16"
-
-#: performance.cc:111
+#: performance.cc:85
 #, c-format
 msgid "MIDI output to `%s'..."
 msgstr "Sortie MIDI vers « %s »..."
@@ -2710,29 +2803,9 @@ msgstr "Sortie MIDI vers « %s »..."
 msgid "No tuplet to end"
 msgstr "Aucun n-olet à terminer"
 
-#: gregorian-ligature-engraver.cc:70
-#, c-format
-msgid "\\%s ignored"
-msgstr "\\%s ignoré(e)"
-
-#: gregorian-ligature-engraver.cc:75
-#, c-format
-msgid "implied \\%s added"
-msgstr "\\%s implicite ajouté(e)"
-
-#. ligature may not start with 2nd head of pes or flexa
-#: gregorian-ligature-engraver.cc:224
-msgid "cannot apply `\\~' on first head of ligature"
-msgstr "Impossible d'appliquer « \\~ » à la première tête de ligature"
-
-#. (pitch == prev_pitch)
-#: gregorian-ligature-engraver.cc:236
-msgid "cannot apply `\\~' on heads with identical pitch"
-msgstr "Impossible d'appliquer « \\~ » à des têtes ayant la même hauteur"
-
 #: chord-tremolo-engraver.cc:88
 msgid "No tremolo to end"
-msgstr "Il n'y a aucun trémolo à terminer"
+msgstr "Aucun trémolo à terminer"
 
 #: chord-tremolo-engraver.cc:109
 msgid "unterminated chord tremolo"
@@ -2768,22 +2841,22 @@ msgstr "\\override et \\revert requièrent des arguments symboliques"
 msgid "expected to read %d characters, got %d"
 msgstr "au lieu de %d caractères à lire, il y en a %d"
 
-#: axis-group-interface.cc:631
+#: axis-group-interface.cc:627
 msgid "an outside-staff object should have a direction, defaulting to up"
 msgstr ""
 "un objet externe à la portée devrait avoir un positionnement.\n"
-"Placé par défaut au-dessus."
+"  Placé par défaut au-dessus."
 
-#: coherent-ligature-engraver.cc:111
+#: coherent-ligature-engraver.cc:110
 #, c-format
 msgid "Coherent_ligature_engraver: setting `spacing-increment=0.01': ptr=%ul"
 msgstr "Coherent_ligature_engraver : initialise `spacing-increment=0.01': ptr=%ul"
 
-#: percent-repeat-engraver.cc:148
+#: percent-repeat-engraver.cc:147
 msgid "unterminated percent repeat"
 msgstr "répétition en pourcent non terminée"
 
-#: note-head.cc:76
+#: note-head.cc:75
 #, c-format
 msgid "none of note heads `%s' or `%s' found"
 msgstr "tête de note « %s » ou « %s » non trouvée"
@@ -2801,12 +2874,12 @@ msgstr "ne sait comment interpréter l'articulation"
 msgid " scheme encoding: "
 msgstr "encodage Scheme : "
 
-#: all-font-metrics.cc:156
+#: all-font-metrics.cc:153
 #, c-format
 msgid "cannot find font: `%s'"
 msgstr "fonte « %s » introuvable"
 
-#: property-iterator.cc:85
+#: property-iterator.cc:93
 #, c-format
 msgid "not a grob name, `%s'"
 msgstr " « %s » n'est pas un nom d'objet graphique (grob)"
@@ -2814,18 +2887,18 @@ msgstr " « %s » n'est pas un nom d'objet graphique (grob)"
 #: bar-check-iterator.cc:84
 #, c-format
 msgid "barcheck failed at: %s"
-msgstr "échec du contrôle de mesure (barcheck) à %s"
+msgstr "échec du contrôle de mesure (barcheck) à %s"
 
-#: stem.cc:116
+#: stem.cc:114
 msgid "weird stem size, check for narrow beams"
 msgstr "taille de hampe bizarre ; vérifier la présence de liens étroits"
 
-#: stem.cc:657
+#: stem.cc:652
 #, c-format
 msgid "flag `%s' not found"
 msgstr "crochet inconnu : « %s »"
 
-#: stem.cc:673
+#: stem.cc:668
 #, c-format
 msgid "flag stroke `%s' not found"
 msgstr "type de crochet inconnu : « %s »"
@@ -2899,23 +2972,23 @@ msgstr "        nombre de pages : %d"
 msgid "\tprevious break: %d"
 msgstr "        coupure précédente : %d"
 
-#: lily-parser.cc:106
+#: lily-parser.cc:105
 msgid "Parsing..."
 msgstr "Analyse..."
 
-#: lily-parser.cc:134
+#: lily-parser.cc:133
 msgid "braces do not match"
 msgstr "accolades non pairées"
 
-#: score.cc:178
+#: score.cc:176
 msgid "already have music in score"
 msgstr "il y a déjà de la musique dans la partition"
 
-#: score.cc:179
+#: score.cc:177
 msgid "this is the previous music"
 msgstr "voici la musique précédente"
 
-#: score.cc:184
+#: score.cc:182
 msgid "errors found, ignoring music expression"
 msgstr "suite à des erreurs répétées, l'expression musicale sera ignorée"
 
@@ -2961,7 +3034,9 @@ msgstr "Interface inconnue : « %s »"
 #: grob-interface.cc:79
 #, c-format
 msgid "Grob `%s' has no interface for property `%s'"
-msgstr "L'objet graphique (Grob) « %s » n'a pas d'interface pour la propriété « %s »"
+msgstr ""
+"L'objet graphique (Grob) « %s »\n"
+" n'a pas d'interface pour la propriété « %s »"
 
 #: open-type-font.cc:44
 #, c-format
@@ -2978,17 +3053,17 @@ msgstr "impossible de charger la table des fontes : %s"
 msgid "FreeType error: %s"
 msgstr "Erreur FreeType : %s"
 
-#: open-type-font.cc:111
+#: open-type-font.cc:110
 #, c-format
 msgid "unsupported font format: %s"
 msgstr "format de police non supporté : %s"
 
-#: open-type-font.cc:113
+#: open-type-font.cc:112
 #, c-format
 msgid "error reading font file %s: %s"
 msgstr "erreur de lecture du fichier de fontes %s : %s"
 
-#: open-type-font.cc:188
+#: open-type-font.cc:187
 #, c-format
 msgid "FT_Get_Glyph_Name () Freetype error: %s"
 msgstr "erreur Freetype FT_Get_Glyph_Name () : %s"
@@ -3003,120 +3078,120 @@ msgstr "impossible d'ouvrir le fichier en écriture : %s : %s"
 msgid "cannot write to file: `%s'"
 msgstr "impossible d'écrire dans le fichier « %s »"
 
-#: parser.yy:820
+#: parser.yy:825
 msgid "\\paper cannot be used in \\score, use \\layout instead"
 msgstr "dans la section \\score, utiliser \\layout au lieu de \\paper"
 
-#: parser.yy:844
+#: parser.yy:849
 msgid "need \\paper for paper block"
 msgstr "\\paper est nécessaire pour définir les paramètres de la page"
 
-#: parser.yy:1363
+#: parser.yy:1369
 msgid "only \\consists takes non-string argument."
 msgstr "seul \\consists peut prendre un argument autre qu'une chaîne"
 
-#: parser.yy:1376
+#: parser.yy:1382
 msgid "Grob name should be alphanumeric"
 msgstr "Un nom de Grob devrait être alphanumérique"
 
-#: parser.yy:1685
+#: parser.yy:1697
 msgid "second argument must be pitch list"
 msgstr "le second argument doit être une liste de hauteurs"
 
-#: parser.yy:1716 parser.yy:1721 parser.yy:2194
+#: parser.yy:1728 parser.yy:1733 parser.yy:2206
 msgid "have to be in Lyric mode for lyrics"
 msgstr "doit être en mode Lyric pour des paroles"
 
-#: parser.yy:1818
+#: parser.yy:1830
 msgid "expecting string as script definition"
 msgstr "chaîne requise pour définir un script"
 
-#: parser.yy:1973 parser.yy:2024
+#: parser.yy:1985 parser.yy:2036
 #, c-format
 msgid "not a duration: %d"
 msgstr "%d n'est pas une durée"
 
-#: parser.yy:2148
+#: parser.yy:2160
 msgid "have to be in Note mode for notes"
 msgstr "doit être en mode Note pour des notes"
 
-#: parser.yy:2209
+#: parser.yy:2221
 msgid "have to be in Chord mode for chords"
 msgstr "doit être en mode Chord pour des accords"
 
-#: lexer.ll:190
+#: lexer.ll:192
 msgid "stray UTF-8 BOM encountered"
 msgstr "parasitage par UTF-8 BOM"
 
-#: lexer.ll:194
+#: lexer.ll:196
 msgid "Skipping UTF-8 BOM"
 msgstr "Escamotage d'UTF-8 BOM"
 
-#: lexer.ll:249
+#: lexer.ll:251
 #, c-format
 msgid "Renaming input to: `%s'"
 msgstr "L'entrée a été renommée en « %s »"
 
-#: lexer.ll:266
+#: lexer.ll:268
 msgid "quoted string expected after \\version"
 msgstr "\\version doit être suivi d'une chaîne entre guillemets"
 
-#: lexer.ll:270
+#: lexer.ll:272
 msgid "quoted string expected after \\sourcefilename"
 msgstr "\\sourcefilename doit être suivi d'une chaîne entre guillemets"
 
-#: lexer.ll:274
+#: lexer.ll:276
 msgid "integer expected after \\sourcefileline"
 msgstr "\\sourcefilename doit être suivi d'un nombre entier"
 
-#: lexer.ll:287
+#: lexer.ll:289
 msgid "EOF found inside a comment"
 msgstr "Fin de fichier (EOF) à l'intérieur du commentaire"
 
-#: lexer.ll:302
+#: lexer.ll:304
 msgid "\\maininput not allowed outside init files"
 msgstr "\\maininput n'est pas permis en dehors des fichiers d'initialisation"
 
-#: lexer.ll:326
+#: lexer.ll:328
 #, c-format
 msgid "wrong or undefined identifier: `%s'"
 msgstr "identificateur erroné ou non défini : « %s »"
 
 #. backup rule
-#: lexer.ll:335
+#: lexer.ll:337
 msgid "end quote missing"
 msgstr "absence de guillemet fermant"
 
-#: lexer.ll:485
+#: lexer.ll:487
 msgid "Brace found at end of lyric.  Did you forget a space?"
 msgstr "Accolade repérée à la fin d'une parole. Manquerait-il une espace ?"
 
-#: lexer.ll:595
+#: lexer.ll:597
 msgid "Brace found at end of markup.  Did you forget a space?"
 msgstr "Accolade repérée à la fin d'un \"markup\". Manquerait-il une espace ?"
 
-#: lexer.ll:699
+#: lexer.ll:701
 #, c-format
 msgid "invalid character: `%c'"
 msgstr "caractère invalide : « %c »"
 
-#: lexer.ll:814 lexer.ll:815
+#: lexer.ll:822 lexer.ll:823
 #, c-format
 msgid "unknown escaped string: `\\%s'"
 msgstr "chaîne d'échappement inconnue : « \\%s »"
 
-#: lexer.ll:924 lexer.ll:925
+#: lexer.ll:932 lexer.ll:933
 #, c-format
 msgid "file too old: %s (oldest supported: %s)"
 msgstr ""
 "%s est plus qu'obsolète ;\n"
 "le plus ancien pouvant être supporté est %s"
 
-#: lexer.ll:925 lexer.ll:926
+#: lexer.ll:933 lexer.ll:934
 msgid "consider updating the input with the convert-ly script"
 msgstr "Envisagez la mise à jour de la source à l'aide du script convert-ly"
 
-#: lexer.ll:931 lexer.ll:932
+#: lexer.ll:939 lexer.ll:940
 #, c-format
 msgid "program too old: %s (file requires: %s)"
 msgstr "Programme plus qu'obsolète : %s (le fichier requiert %s)"
@@ -3131,10 +3206,19 @@ msgstr "Traitement de ~S..."
 msgid "Writing ~S..."
 msgstr "Écriture de ~S..."
 
-#: documentation-lib.scm:198
+#: documentation-lib.scm:184
+#, scheme-format
+msgid "cannot find description for property `~S' (~S)"
+msgstr ""
+"impossible de trouver une description de la propriété « ~S »\n"
+" (~S)"
+
+#: documentation-lib.scm:205
 #, scheme-format
 msgid "cannot find description for property ~S (~S)"
-msgstr "impossible de trouver une description de la propriété ~S (~S)"
+msgstr ""
+"impossible de trouver une description de la propriété ~S\n"
+" (~S)"
 
 #: parser-clef.scm:141 parser-clef.scm:181
 #, scheme-format
@@ -3172,23 +3256,23 @@ msgstr "Écriture de ~a..."
 msgid "symbol ~S redefined"
 msgstr "symbole « ~S » redéfini"
 
-#: paper.scm:115
+#: paper.scm:117
 msgid "set-global-staff-size: not in toplevel scope"
 msgstr "set-global-staff-size n'est pas à un niveau de portée globale"
 
-#: paper.scm:296
+#: paper.scm:301
 #, scheme-format
 msgid "This is not a \\layout {} object, ~S"
 msgstr "~S n'est pas un objet de \\layout {}"
 
-#: paper.scm:308
+#: paper.scm:313
 #, scheme-format
 msgid "Unknown paper size: ~a"
 msgstr "Format de papier inconnu : ~a"
 
 #. TODO: should raise (generic) exception with throw, and catch
 #. that in parse-scm.cc
-#: paper.scm:323
+#: paper.scm:328
 msgid "Must use #(set-paper-size .. ) within \\paper { ... }"
 msgstr "#(set-paper-size ..) doit être dans la section \\paper { ... }"
 
@@ -3208,22 +3292,24 @@ msgstr "impossible de trouver ~A"
 #: lily.scm:350
 #, scheme-format
 msgid "wrong type for argument ~a.  Expecting ~a, found ~s"
-msgstr "type d'argument erroné pour ~a. Attendait ~a, ~s trouvé"
+msgstr ""
+"type d'argument erroné pour ~a.\n"
+" Attendait ~a, ~s trouvé"
 
-#: lily.scm:716
+#: lily.scm:710
 msgid "Compilation successfully completed"
 msgstr "Compilation menée à son terme, avec succès."
 
-#: lily.scm:717
+#: lily.scm:711
 msgid "Compilation completed with warnings or errors"
 msgstr "Compilation menée à son terme, avec des avertissements ou erreurs."
 
-#: lily.scm:779
+#: lily.scm:773
 #, scheme-format
 msgid "job ~a terminated with signal: ~a"
 msgstr "le travail ~a s'est terminé avec le signal ~a"
 
-#: lily.scm:782
+#: lily.scm:776
 #, scheme-format
 msgid ""
 "logfile ~a (exit ~a):\n"
@@ -3232,17 +3318,17 @@ msgstr ""
 "fichier journal ~a (sortie ~a) :\n"
 "~a"
 
-#: lily.scm:804 lily.scm:882
+#: lily.scm:798 lily.scm:876
 #, scheme-format
 msgid "failed files: ~S"
 msgstr "erreur sur les fichiers ~S"
 
-#: lily.scm:873
+#: lily.scm:867
 #, scheme-format
 msgid "Redirecting output to ~a..."
 msgstr "Redirection de la sortie vers ~a..."
 
-#: lily.scm:892
+#: lily.scm:886
 #, scheme-format
 msgid "Invoking `~a'...\n"
 msgstr "Appel de « ~a »...\n"
@@ -3277,7 +3363,7 @@ msgstr "hauteur d'arrivée (to) absente de la gamme ; rien à transposer"
 
 #: modal-transforms.scm:46
 msgid "pitch to be transposed not in scale; ignoring"
-msgstr "hauteur à laquelle transposer absente de la gamme ; ignorée"
+msgstr "hauteur à laquelle transposer absente de la gamme ; rien à transposer"
 
 #: modal-transforms.scm:71
 msgid "'around' pitch not in scale; ignoring"
@@ -3285,7 +3371,7 @@ msgstr "hauteur pivot (around) absente de la gamme : rien à transposer"
 
 #: modal-transforms.scm:79
 msgid "pitch to be inverted not in scale; ignoring"
-msgstr "hauteur d'inversion absente de la gamme : ignorée"
+msgstr "hauteur d'inversion absente de la gamme : rien à transposer"
 
 #: modal-transforms.scm:95
 msgid "negative replication count; ignoring"
@@ -3367,12 +3453,12 @@ msgstr "compatibilité avec l'ancien mode relatif non utilisée"
 msgid "Found infinity or nan in output.  Substituting 0.0"
 msgstr "Détection d'une valeur infini ou non numérique. Substitution par 0.0"
 
-#: output-ps.scm:289 output-svg.scm:550
+#: output-ps.scm:299 output-svg.scm:550
 #, scheme-format
 msgid "unknown line-cap-style: ~S"
 msgstr "line-cap-style inconnu : ~S"
 
-#: output-ps.scm:294 output-svg.scm:556
+#: output-ps.scm:304 output-svg.scm:556
 #, scheme-format
 msgid "unknown line-join-style: ~S"
 msgstr "line-join-style inconnu : ~S"
@@ -3415,50 +3501,56 @@ msgstr "Utilisation de `~a' pour le nom des notes..."
 msgid "Could not find language `~a'.  Ignoring."
 msgstr "`~a' n'est pas une langue reconnue pour les noms de note. Abandon."
 
-#: define-music-types.scm:740
+#: define-music-types.scm:747
 #, scheme-format
 msgid "symbol expected: ~S"
 msgstr "symbole requis : ~S"
 
-#: define-music-types.scm:743
+#: define-music-types.scm:750
 #, scheme-format
 msgid "cannot find music object: ~S"
 msgstr "impossible de trouver l'objet de type musique : ~S"
 
-#: define-music-types.scm:762
+#: define-music-types.scm:769
 #, scheme-format
 msgid "unknown repeat type `~S'"
 msgstr "type de répétition inconnu : « ~S »"
 
-#: define-music-types.scm:763
+#: define-music-types.scm:770
 msgid "See define-music-types.scm for supported repeats"
 msgstr "Consulter define-music-types.scm pour connaître les répétitions prises en charge"
 
-#: translation-functions.scm:341
+#: translation-functions.scm:350
 #, scheme-format
 msgid "Negative fret for pitch ~a on string ~a"
 msgstr "La hauteur ~a sur la corde ~a donne un fret négatif"
 
-#: translation-functions.scm:385
+#: translation-functions.scm:401
 #, scheme-format
 msgid "No open string for pitch ~a"
 msgstr "Pas de corde à vide pour la hauteur ~a"
 
-#: translation-functions.scm:400
+#: translation-functions.scm:416 translation-functions.scm:428
 #, scheme-format
 msgid "Requested string for pitch requires negative fret: string ~a pitch ~a"
-msgstr "Hauteur et corde requises demandent un fret négatif : corde ~a hauteur ~a"
+msgstr ""
+"Hauteur et corde requises demandent un fret négatif :\n"
+" corde ~a hauteur ~a"
 
-#: translation-functions.scm:401
-msgid "Ignoring string request."
-msgstr "Cette corde sera ignorée"
+#: translation-functions.scm:419
+msgid "Ignoring string request and recalculating."
+msgstr "Cette corde sera ignorée et redéfinie."
 
-#: translation-functions.scm:414
+#: translation-functions.scm:431
+msgid "Ignoring note in tablature."
+msgstr "Cette note sera ignorée dans la tablature."
+
+#: translation-functions.scm:454
 #, scheme-format
 msgid "No string for pitch ~a (given frets ~a)"
 msgstr "Aucune corde ne contient la hauteur ~a avec un fret ~a"
 
-#: translation-functions.scm:515
+#: translation-functions.scm:559
 #, scheme-format
 msgid ""
 "No label for fret ~a (on string ~a);\n"
@@ -3487,7 +3579,7 @@ msgstr "imposible de réaliser l'intégration ~S=~S"
 msgid "do not know how to embed font ~s ~s ~s"
 msgstr "impossible d'intégrer les fontes ~s ~s ~s"
 
-#: framework-ps.scm:669
+#: framework-ps.scm:686
 msgid ""
 "\n"
 "The PostScript backend does not support the\n"
@@ -3526,7 +3618,7 @@ msgstr ""
 msgid "invalid tremolo repeat count: ~a"
 msgstr "nombre de répétition en trémolo invalide : ~a"
 
-#: music-functions.scm:618
+#: music-functions.scm:619
 #, scheme-format
 msgid "music expected: ~S"
 msgstr "~S requiert de la musique"
@@ -3539,21 +3631,21 @@ msgstr ""
 "Échec du contrôle de barre de mesure. \n"
 "Aurait dû se trouver à ~a au lieu de ~a"
 
-#: music-functions.scm:846
+#: music-functions.scm:845
 #, scheme-format
 msgid "cannot find quoted music: `~S'"
 msgstr "impossible de trouver la citation de musique « ~S »"
 
-#: music-functions.scm:982
+#: music-functions.scm:979
 msgid "Add @var{octave-shift} to the octave of @var{pitch}."
 msgstr "Ajoute @var{octave-shift} à l'octave de @var{hauteur}."
 
-#: music-functions.scm:1037
+#: music-functions.scm:1039
 #, scheme-format
 msgid "Unknown octaveness type: ~S "
 msgstr "Octave inconnue : « ~S »"
 
-#: music-functions.scm:1038
+#: music-functions.scm:1040
 msgid "Defaulting to 'any-octave."
 msgstr "Application de la valeur par défaut 'any-octave."
 
@@ -3581,48 +3673,52 @@ msgstr "la classe d'événement ~A semble être inutilisée"
 #: define-event-classes.scm:155
 #, scheme-format
 msgid "translator listens to nonexisting event class ~A"
-msgstr "le traducteur écoute la classe d'événements ~A inexistante"
+msgstr "le traducteur écoute une classe d'événements ~A inexistante"
 
 #: markup.scm:223
 #, scheme-format
 msgid "Wrong number of arguments.  Expect: ~A, found ~A: ~S"
-msgstr "Nombre d'arguments erroné. Requis : ~A, présent(s) ~A : ~S"
+msgstr ""
+"Nombre d'arguments erroné : ~A requis, ~A présent(s) :\n"
+" ~S"
 
 #: markup.scm:229
 #, scheme-format
 msgid "Invalid argument in position ~A.  Expect: ~A, found: ~S."
-msgstr "Argument invalide à la position ~A. ~A attendu, ~S trouvé."
+msgstr ""
+"Argument invalide à la position ~A.\n"
+" ~A requis, trouvé ~S ."
 
 #: markup.scm:292
 #, scheme-format
 msgid "Not a markup command: ~A"
-msgstr "~A n'est pas une commande de type « markup»"
+msgstr "~A n'est pas une commande de type « markup »"
 
 #: ps-to-png.scm:74
 #, scheme-format
 msgid "~a exited with status: ~S"
 msgstr "~a s'est terminé avec le statut ~S"
 
-#: define-markup-commands.scm:803
+#: define-markup-commands.scm:883
 msgid "no systems found in \\score markup, does it have a \\layout block?"
 msgstr "pas de système trouvé dans le bloc \\score, contient-il un bloc \\layout ?"
 
-#: define-markup-commands.scm:2404
+#: define-markup-commands.scm:2561
 #, scheme-format
 msgid "Cannot find glyph ~a"
 msgstr "impossible de trouver le glyphe ~a"
 
-#: define-markup-commands.scm:2830
+#: define-markup-commands.scm:2987
 #, scheme-format
 msgid "no brace found for point size ~S "
 msgstr "il n'y a pas d'accolade qui fasse ~S points"
 
-#: define-markup-commands.scm:2831
+#: define-markup-commands.scm:2988
 #, scheme-format
 msgid "defaulting to ~S pt"
 msgstr "application de la taille par défaut (~S pt)"
 
-#: define-markup-commands.scm:2984
+#: define-markup-commands.scm:3141
 #, scheme-format
 msgid "not a valid duration string: ~a"
 msgstr "chaîne de durée invalide : ~a"
index fa48354dcaee80ce11bf8a51e2f347588ae0129f..e029cb638fce5713eee0a98b6ac6ea37330aeb2d 100644 (file)
--- a/po/it.po
+++ b/po/it.po
@@ -4,14 +4,14 @@
 #
 # Tineke de Munnik <jantien@xs4all.nl>, 1998.
 # Maurizio Umberto Puxeddu <umbpux@tin.it>, 1999
-# Federico Bruni <fedelogy@gmail.com>, 2010-2011, 2011.
+# Federico Bruni <fedelogy@gmail.com>, 2009-2011.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: lilypond 2.13.53\n"
+"Project-Id-Version: lilypond 2.15.9\n"
 "Report-Msgid-Bugs-To: http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs\n"
-"POT-Creation-Date: 2011-03-02 10:34+0100\n"
-"PO-Revision-Date: 2011-04-05 00:25+0200\n"
+"POT-Creation-Date: 2011-08-02 19:43+0200\n"
+"PO-Revision-Date: 2011-08-08 00:25+0200\n"
 "Last-Translator: Federico Bruni <fedelogy@gmail.com>\n"
 "Language-Team: Italian <tp@lists.linux.it>\n"
 "Language: it\n"
@@ -87,8 +87,8 @@ msgstr "Si consulti il manuale per i dettagli e si aggiorni manualmente."
 msgid "%s has been replaced by %s"
 msgstr "%s è stato sostituito da %s"
 
-#: convertrules.py:24 lilylib.py:78 musicexp.py:17 convert-ly.py:64 warn.cc:66
-#: input.cc:109
+#: convertrules.py:24 lilylib.py:85 musicexp.py:17 convert-ly.py:64 warn.cc:66
+#: input.cc:108
 #, c-format, python-format
 msgid "warning: %s"
 msgstr "attenzione: %s"
@@ -108,6 +108,7 @@ msgstr "\\textstyle deprecato, nuova sintassi per \\key"
 
 #: convertrules.py:86 convertrules.py:1905 convertrules.py:2084
 #: convertrules.py:2236 convertrules.py:2566 convertrules.py:2862
+#: convertrules.py:3206
 msgid "bump version for release"
 msgstr "aumentare il numero di versione per il rilascio"
 
@@ -746,6 +747,22 @@ msgstr "Diagrammi dei legni: Modifiche al diagramma del clarinetto."
 msgid "woodwind-diagrams.  Clarinet fingering changed to reflect actual anatomy of instrument.\n"
 msgstr "woodwind-diagrams.  La diteggiatura del clarinetto è stata modificata per riflettere l'effettiva anatomia dello strumento.\n"
 
+#: convertrules.py:3211
+msgid "Change in internal property for MultiMeasureRest"
+msgstr "Modifica della proprietà interna di MultiMeasureRest"
+
+#: convertrules.py:3214
+msgid "use-breve-rest.  This internal property has been replaced by round-to-longer-rest and usable-duration-logs.\n"
+msgstr "use-breve-rest.  Questa proprietà interna è stata sostituita da round-to-longer-rest e usable-duration-logs.\n"
+
+#: convertrules.py:3219
+msgid "Handling of non-automatic footnotes."
+msgstr "Gestione delle note a pié di pagina non automatiche."
+
+#: convertrules.py:3223
+msgid "If you are using non-automatic footnotes, make sure to set footnote-auto-numbering = ##f in the paper block.\n"
+msgstr "Se si sta usando note a pié di pagina non automatiche, occorre impostare footnote-auto-numbering = ##f nel blocco paper.\n"
+
 #: book_base.py:24
 #, python-format
 msgid "file not found: %s"
@@ -755,23 +772,28 @@ msgstr "file non trovato: %s"
 msgid "Output function not implemented"
 msgstr "Funzione di output non implementata"
 
-#: lilylib.py:81 musicxml.py:13 convert-ly.py:67 warn.cc:72 input.cc:115
-#: input.cc:123
+#: lilylib.py:88 musicxml.py:13 convert-ly.py:67 warn.cc:72 input.cc:114
+#: input.cc:122
 #, c-format, python-format
 msgid "error: %s"
 msgstr "errore: %s"
 
-#: lilylib.py:124 lilylib.py:175
+#: lilylib.py:131
+#, python-format
+msgid "Processing %s.ly"
+msgstr "Elaborazione di %s.ly"
+
+#: lilylib.py:135 lilylib.py:198
 #, python-format
 msgid "Invoking `%s'"
 msgstr "Invocazione di «%s»"
 
-#: lilylib.py:126 lilylib.py:177
+#: lilylib.py:137 lilylib.py:200
 #, python-format
 msgid "Running %s..."
 msgstr "Esecuzione di %s..."
 
-#: lilylib.py:253
+#: lilylib.py:276
 #, python-format
 msgid "Usage: %s"
 msgstr "Uso: %s"
@@ -832,118 +854,118 @@ msgstr "Impossibile trovare lo strumento con ID=%s\n"
 msgid "cannot find \\begin{document} in LaTeX document"
 msgstr "impossibile trovare \\begin{document} nel documento LaTeX"
 
-#: musicxml2ly.py:223
+#: musicxml2ly.py:224
 #, python-format
 msgid "Encountered file created by %s, containing wrong beaming information. All beaming information in the MusicXML file will be ignored"
 msgstr "Si è trovato un file creato da %s che contiene informazioni sbagliate sulla disposizione delle travature. Tutte le informazioni sulle travature presenti nel file MusicXML verranno ignorate"
 
-#: musicxml2ly.py:239 musicxml2ly.py:241
+#: musicxml2ly.py:240 musicxml2ly.py:242
 #, python-format
 msgid "Unprocessed PartGroupInfo %s encountered"
 msgstr "PartGroupInfo %s rilevato ma non elaborato"
 
-#: musicxml2ly.py:494
+#: musicxml2ly.py:495
 #, python-format
 msgid "Encountered note at %s without type and duration (=%s)"
 msgstr "Trovata una nota in %s senza tipo e durata (=%s)"
 
-#: musicxml2ly.py:514
+#: musicxml2ly.py:515
 #, python-format
 msgid "Encountered rational duration with denominator %s, unable to convert to lilypond duration"
 msgstr "Trovata una durata razionale con denominatore %s, impossibile convertire in una durata di lilypond"
 
-#: musicxml2ly.py:761
+#: musicxml2ly.py:762
 msgid "Unable to extract key signature!"
 msgstr "Impossibile estrarre l'armatura di chiave!"
 
-#: musicxml2ly.py:788
+#: musicxml2ly.py:789
 #, python-format
 msgid "unknown mode %s, expecting 'major' or 'minor' or a church mode!"
 msgstr "modo %s sconosciuto, è richiesto \"major\" o \"minor\" o un modo ecclesiastico!"
 
-#: musicxml2ly.py:926
+#: musicxml2ly.py:927
 #, python-format
 msgid "Encountered unprocessed marker %s\n"
 msgstr "Trovato un marcatore non elaborato %s\n"
 
-#: musicxml2ly.py:1020
+#: musicxml2ly.py:1021
 #, python-format
 msgid "unknown span event %s"
 msgstr "evento di estensione %s sconosciuto"
 
-#: musicxml2ly.py:1030
+#: musicxml2ly.py:1031
 #, python-format
 msgid "unknown span type %s for %s"
 msgstr "tipo di estensione %s sconosciuto per %s"
 
-#: musicxml2ly.py:1450
+#: musicxml2ly.py:1451
 msgid "Unknown metronome mark, ignoring"
 msgstr "Indicazione metronomica sconosciuta, si ignora"
 
 #. TODO: Implement the other (more complex) way for tempo marks!
-#: musicxml2ly.py:1455
+#: musicxml2ly.py:1456
 msgid "Metronome marks with complex relations (<metronome-note> in MusicXML) are not yet implemented."
 msgstr "Indicazioni metronomiche con relazioni complesse (<metronome-note> in MusicXML) non sono ancora implementate."
 
-#: musicxml2ly.py:1657
+#: musicxml2ly.py:1658
 #, python-format
 msgid "Unable to convert chord type %s to lilypond."
 msgstr "Impossibile convertire l'accordo di tipo %s in un'espressione di lilypond."
 
-#: musicxml2ly.py:1806
+#: musicxml2ly.py:1807
 #, python-format
 msgid "drum %s type unknown, please add to instrument_drumtype_dict"
 msgstr "tipo di percussione %s sconosciuto, si prega di aggiungerlo a instrument_drumtype_dict"
 
-#: musicxml2ly.py:1810
+#: musicxml2ly.py:1811
 msgid "cannot find suitable event"
 msgstr "impossibile trovare un evento adatto"
 
-#: musicxml2ly.py:1958
+#: musicxml2ly.py:1959
 #, python-format
 msgid "Negative skip %s (from position %s to %s)"
 msgstr "Salto negativo %s (dalla posizione %s a %s)"
 
-#: musicxml2ly.py:2099
+#: musicxml2ly.py:2100
 #, python-format
 msgid "Negative skip found: from %s to %s, difference is %s"
 msgstr "Trovato un salto negativo: da %s a %s, la differenza è %s"
 
-#: musicxml2ly.py:2180
+#: musicxml2ly.py:2181
 #, python-format
 msgid "unexpected %s; expected %s or %s or %s"
 msgstr "%s inaspettato; previsto %s o %s o %s"
 
-#: musicxml2ly.py:2286
+#: musicxml2ly.py:2287
 msgid "Encountered closing slur, but no slur is open"
 msgstr "Trovata la chiusura di una legatura di portamento, ma non ne è stata aperta alcuna"
 
-#: musicxml2ly.py:2289
+#: musicxml2ly.py:2290
 msgid "Cannot have two simultaneous (closing) slurs"
 msgstr "Due legature di portamento non possono chiudersi simultaneamente"
 
-#: musicxml2ly.py:2298
+#: musicxml2ly.py:2299
 msgid "Cannot have a slur inside another slur"
 msgstr "Due legature di portamento non possono sovrapporsi"
 
-#: musicxml2ly.py:2301
+#: musicxml2ly.py:2302
 msgid "Cannot have two simultaneous slurs"
 msgstr "Due legature di portamento non possono intervenire simultaneamente"
 
-#: musicxml2ly.py:2435
+#: musicxml2ly.py:2436
 #, python-format
 msgid "cannot simultaneously have more than one mode: %s"
 msgstr "non si può avere simultaneamente più di un modo: %s"
 
-#: musicxml2ly.py:2543
+#: musicxml2ly.py:2544
 msgid "Converting to LilyPond expressions..."
 msgstr "Conversione nelle espressioni di LilyPond..."
 
-#: musicxml2ly.py:2554
+#: musicxml2ly.py:2555
 msgid "musicxml2ly [OPTION]... FILE.xml"
 msgstr "musicxml2ly [OPZIONE]... FILE.xml"
 
-#: musicxml2ly.py:2556
+#: musicxml2ly.py:2557
 msgid ""
 "Convert MusicXML from FILE.xml to LilyPond input.\n"
 "If the given filename is -, musicxml2ly reads from the command line.\n"
@@ -951,12 +973,12 @@ msgstr ""
 "Converte FILE.xml (MusicXML) in input di LilyPond.\n"
 "Se il nome del file è -, musicxml2ly legge dalla riga di comando.\n"
 
-#: musicxml2ly.py:2562 midi2ly.py:987 abc2ly.py:1386 lilypond-book.py:140
-#: convert-ly.py:98 etf2ly.py:1202 main.cc:157
+#: musicxml2ly.py:2563 midi2ly.py:1060 abc2ly.py:1386 lilypond-book.py:140
+#: convert-ly.py:98 etf2ly.py:1202 main.cc:159
 msgid "show this help and exit"
 msgstr "mostra questo messaggio di aiuto ed esce"
 
-#: musicxml2ly.py:2566
+#: musicxml2ly.py:2567
 msgid ""
 "Copyright (c) 2005--2011 by\n"
 "    Han-Wen Nienhuys <hanwen@xs4all.nl>,\n"
@@ -968,61 +990,61 @@ msgstr ""
 "    Jan Nieuwenhuizen <janneke@gnu.org> e\n"
 "    Reinhold Kainhofer <reinhold@kainhofer.com>\n"
 
-#: musicxml2ly.py:2580 midi2ly.py:1015 abc2ly.py:1382 lilypond-book.py:212
-#: convert-ly.py:94 etf2ly.py:1206 main.cc:168
+#: musicxml2ly.py:2581 midi2ly.py:1091 abc2ly.py:1382 lilypond-book.py:217
+#: convert-ly.py:94 etf2ly.py:1206 main.cc:174
 msgid "show version number and exit"
 msgstr "mostra il numero di versione ed esce"
 
-#: musicxml2ly.py:2585 midi2ly.py:1009 lilypond-book.py:204 main.cc:169
+#: musicxml2ly.py:2586 midi2ly.py:1085 lilypond-book.py:209 main.cc:175
 msgid "be verbose"
 msgstr "passa in modalità prolissa"
 
-#: musicxml2ly.py:2591
+#: musicxml2ly.py:2592
 msgid "use lxml.etree; uses less memory and cpu time"
 msgstr "usa lxml.etree per limitare il consumo di memoria e i tempi del processore"
 
-#: musicxml2ly.py:2597
+#: musicxml2ly.py:2598
 msgid "input file is a zip-compressed MusicXML file"
 msgstr "il file di input è un file MusicXML compresso in ZIP"
 
-#: musicxml2ly.py:2603
+#: musicxml2ly.py:2604
 msgid "convert pitches in relative mode (default)"
 msgstr "converte le altezze in modo relativo (predefinito)"
 
-#: musicxml2ly.py:2608
+#: musicxml2ly.py:2609
 msgid "convert pitches in absolute mode"
 msgstr "converte le altezze in modo assoluto"
 
-#: musicxml2ly.py:2611
+#: musicxml2ly.py:2612
 msgid "LANG"
 msgstr "LINGUA"
 
-#: musicxml2ly.py:2613
+#: musicxml2ly.py:2614
 msgid "use LANG for pitch names, e.g. 'deutsch' for note names in German"
 msgstr "usa LINGUA per i nomi delle altezze, ad esempio 'deutsch' per i nomi delle note in tedesco"
 
-#: musicxml2ly.py:2619
+#: musicxml2ly.py:2620
 msgid "do not convert directions (^, _ or -) for articulations, dynamics, etc."
 msgstr "non converte le direzioni (^, _ o -) per articolazioni, dinamiche, etc."
 
-#: musicxml2ly.py:2625
+#: musicxml2ly.py:2626
 msgid "do not convert exact vertical positions of rests"
 msgstr "non converte le esatte posizioni verticali delle pause"
 
-#: musicxml2ly.py:2631
+#: musicxml2ly.py:2632
 msgid "do not convert the exact page layout and breaks"
 msgstr "non converte l'esatta formattazione di pagina e gli a capo"
 
-#: musicxml2ly.py:2637
+#: musicxml2ly.py:2638
 msgid "do not convert beaming information, use lilypond's automatic beaming instead"
 msgstr "non converte le informazioni relative alle travature, usare invece la disposizione automatica delle travature di lilypond"
 
-#: musicxml2ly.py:2640 midi2ly.py:992 midi2ly.py:997 etf2ly.py:1208
-#: main.cc:161 main.cc:166
+#: musicxml2ly.py:2641 midi2ly.py:1065 midi2ly.py:1070 etf2ly.py:1208
+#: main.cc:165 main.cc:172
 msgid "FILE"
 msgstr "FILE"
 
-#: musicxml2ly.py:2645
+#: musicxml2ly.py:2646
 msgid "set output filename to FILE, stdout if -"
 msgstr "imposta il nome del file di output su FILE (stdout se -)"
 
@@ -1030,147 +1052,159 @@ msgstr "imposta il nome del file di output su FILE (stdout se -)"
 #. "Report bugs in English via %s",
 #. or if there is a LilyPond users list or forum in your language
 #. "Report bugs in English via %s or in YOUR_LANG via URI"
-#: musicxml2ly.py:2648 midi2ly.py:1028 abc2ly.py:1395 lilypond-book.py:234
-#: convert-ly.py:144 etf2ly.py:1216 main.cc:281
+#: musicxml2ly.py:2649 midi2ly.py:1104 abc2ly.py:1395 lilypond-book.py:239
+#: convert-ly.py:144 etf2ly.py:1216 main.cc:285
 #, c-format, python-format
 msgid "Report bugs via %s"
 msgstr "Segnalare i bug in inglese attraverso %s"
 
-#: musicxml2ly.py:2728
+#: musicxml2ly.py:2729
 #, python-format
 msgid "unknown part in part-list: %s"
 msgstr "parte sconosciuta in part-list: %s"
 
-#: musicxml2ly.py:2790
+#: musicxml2ly.py:2791
 msgid "Input is compressed, extracting raw MusicXML data from stdin"
 msgstr "L'input è compresso. Estrazione dei dati MusicXML da stdin"
 
-#: musicxml2ly.py:2793
+#: musicxml2ly.py:2804
 #, python-format
 msgid "Input file %s is compressed, extracting raw MusicXML data"
 msgstr "Il file di input %s è compresso. Estrazione dei dati MusicXML"
 
-#: musicxml2ly.py:2823
+#: musicxml2ly.py:2834
 msgid "Reading MusicXML from Standard input ..."
 msgstr "Lettura di MusicXML da Standard input ..."
 
-#: musicxml2ly.py:2825
+#: musicxml2ly.py:2836
 #, python-format
 msgid "Reading MusicXML from %s ..."
 msgstr "Lettura di MusicXML da %s ..."
 
-#: musicxml2ly.py:2858
+#: musicxml2ly.py:2869
 #, python-format
 msgid "Output to `%s'"
 msgstr "Output inviato a «%s»"
 
-#: musicxml2ly.py:2925
+#: musicxml2ly.py:2936
 #, python-format
 msgid "Unable to find input file %s"
 msgstr "Impossibile trovare il file di input %s"
 
-#: midi2ly.py:90 lilypond-book.py:116 convert-ly.py:81 etf2ly.py:1189
+#: midi2ly.py:81 lilypond-book.py:116 convert-ly.py:81 etf2ly.py:1189
 #, python-format
 msgid "Copyright (c) %s by"
 msgstr "Copyright (c) %s di"
 
-#: midi2ly.py:92 lilypond-book.py:118 convert-ly.py:83 etf2ly.py:1191
+#: midi2ly.py:83 lilypond-book.py:118 convert-ly.py:83 etf2ly.py:1191
 msgid "Distributed under terms of the GNU General Public License."
 msgstr "Distribuito secondo i termini della GNU General Public License."
 
-#: midi2ly.py:93 lilypond-book.py:119 convert-ly.py:84 etf2ly.py:1192
+#: midi2ly.py:84 lilypond-book.py:119 convert-ly.py:84 etf2ly.py:1192
 msgid "It comes with NO WARRANTY."
 msgstr "È distribuito con NESSUNA GARANZIA."
 
-#: midi2ly.py:99
+#: midi2ly.py:90
 msgid "warning: "
 msgstr "attenzione: "
 
-#: midi2ly.py:102 midi2ly.py:1041
+#: midi2ly.py:93 midi2ly.py:1121
 msgid "error: "
 msgstr "errore: "
 
-#: midi2ly.py:103
+#: midi2ly.py:94
 msgid "Exiting... "
 msgstr "Uscita... "
 
-#: midi2ly.py:960
+#: midi2ly.py:834
+msgid "found more than 5 voices on a staff, expect bad output"
+msgstr "trovate più di 5 voci in un rigo, è probabile che l'output sia sbagliato"
+
+#: midi2ly.py:1030
 #, python-format
 msgid "%s output to `%s'..."
 msgstr "%s output inviato a «%s»..."
 
-#: midi2ly.py:972 abc2ly.py:1373 lilypond-book.py:122 convert-ly.py:87
+#: midi2ly.py:1042 abc2ly.py:1373 lilypond-book.py:122 convert-ly.py:87
 #, python-format
 msgid "%s [OPTION]... FILE"
 msgstr "%s [OPZIONE]... FILE"
 
-#: midi2ly.py:973
+#: midi2ly.py:1043
 #, python-format
 msgid "Convert %s to LilyPond input.\n"
 msgstr "Converte %s in input LilyPond.\n"
 
-#: midi2ly.py:978
+#: midi2ly.py:1048
 msgid "print absolute pitches"
 msgstr "stampa altezze assolute"
 
-#: midi2ly.py:980 midi2ly.py:1002
+#: midi2ly.py:1050 midi2ly.py:1075
 msgid "DUR"
 msgstr "DURATA"
 
-#: midi2ly.py:981
+#: midi2ly.py:1051
 msgid "quantise note durations on DUR"
 msgstr "quantificare la durata delle note in DURATA"
 
-#: midi2ly.py:984
+#: midi2ly.py:1054
+msgid "debug printing"
+msgstr "mostra le informazioni di debug"
+
+#: midi2ly.py:1057
 msgid "print explicit durations"
 msgstr "stampa durate esplicite"
 
-#: midi2ly.py:989
+#: midi2ly.py:1062
 msgid "prepend FILE to output"
 msgstr "antepone FILE all'output"
 
-#: midi2ly.py:993
+#: midi2ly.py:1066
 msgid "set key: ALT=+sharps|-flats; MINOR=1"
 msgstr "imposta la tonalità: ALTERAZIONE=+diesis|-bemolle; MINORE=1"
 
-#: midi2ly.py:994
+#: midi2ly.py:1067
 msgid "ALT[:MINOR]"
 msgstr "ALTERAZIONE[:MINORE]"
 
-#: midi2ly.py:996 abc2ly.py:1388 etf2ly.py:1207
+#: midi2ly.py:1069 abc2ly.py:1388 etf2ly.py:1207
 msgid "write output to FILE"
 msgstr "scrive l'output in FILE"
 
-#: midi2ly.py:999
+#: midi2ly.py:1072
 msgid "preview of first 4 bars"
 msgstr "anteprima delle prime 4 battute"
 
-#: midi2ly.py:1001
+#: midi2ly.py:1074
 msgid "quantise note starts on DUR"
 msgstr "quantifica l'inizio di una nota in DURATA"
 
-#: midi2ly.py:1004
+#: midi2ly.py:1078
+msgid "use s instead of r for rests"
+msgstr "si usi s invece di r per indicare le pause"
+
+#: midi2ly.py:1080
 msgid "DUR*NUM/DEN"
 msgstr "DURATA*NUMERATORE/DENOMINATORE"
 
-#: midi2ly.py:1007
+#: midi2ly.py:1083
 msgid "allow tuplet durations DUR*NUM/DEN"
 msgstr "consente le durate DURATA*NUMERATORE/DENOMINATORE nei gruppi irregolari"
 
-#: midi2ly.py:1016 lilypond-book.py:215 convert-ly.py:139 etf2ly.py:1210
-#: main.cc:170
+#: midi2ly.py:1092 lilypond-book.py:220 convert-ly.py:139 etf2ly.py:1210
+#: main.cc:176
 msgid "show warranty and copyright"
 msgstr "mostra la garanzia e il copyright"
 
-#: midi2ly.py:1019
+#: midi2ly.py:1095
 msgid "treat every text as a lyric"
 msgstr "tratta ogni testo come il testo di una canzone"
 
-#: midi2ly.py:1022
+#: midi2ly.py:1098
 msgid "Examples"
 msgstr "Esempi"
 
-#: midi2ly.py:1042
+#: midi2ly.py:1122
 msgid "no files specified on command line."
 msgstr "nessun file specificato nella riga di comando."
 
@@ -1229,7 +1263,7 @@ msgid "add DIR to include path"
 msgstr "aggiunge DIR al percorso di inclusione"
 
 #: lilypond-book.py:143 lilypond-book.py:150 lilypond-book.py:163
-#: lilypond-book.py:173 lilypond-book.py:189 lilypond-book.py:195 main.cc:160
+#: lilypond-book.py:173 lilypond-book.py:194 lilypond-book.py:200 main.cc:164
 msgid "DIR"
 msgstr "DIR"
 
@@ -1271,23 +1305,27 @@ msgstr "COMANDO"
 msgid "process ly_files using COMMAND FILE..."
 msgstr "elabora ly_files con COMANDO FILE..."
 
-#: lilypond-book.py:182
+#: lilypond-book.py:183
+msgid "Redirect the lilypond output"
+msgstr "Redirezione dell'output di lilypond"
+
+#: lilypond-book.py:187
 msgid "Compile snippets in safe mode"
 msgstr "Compila i frammenti di codice in modalità sicura"
 
-#: lilypond-book.py:188
+#: lilypond-book.py:193
 msgid "do not fail if no lilypond output is found"
 msgstr "non si interrompe se non si trova alcun output di lilypond"
 
-#: lilypond-book.py:194
+#: lilypond-book.py:199
 msgid "do not fail if no PNG images are found for EPS files"
 msgstr "non si interrompe se non si trovano immagini PNG per i file EPS"
 
-#: lilypond-book.py:200
+#: lilypond-book.py:205
 msgid "write snippet output files with the same base name as their source file"
 msgstr "scrive i file di output dei frammenti di codice con lo stesso nome di base dei file sorgenti"
 
-#: lilypond-book.py:220
+#: lilypond-book.py:225
 msgid ""
 "run executable PROG instead of latex, or in\n"
 "case --pdf option is set instead of pdflatex"
@@ -1295,65 +1333,65 @@ msgstr ""
 "eseguire il PROGRAMMA eseguibile invece di latex, o nel caso in\n"
 "cui viene impostata l'opzione --pdf invece di usare pdflatex"
 
-#: lilypond-book.py:222
+#: lilypond-book.py:227
 msgid "PROG"
 msgstr "PROGRAMMA"
 
-#: lilypond-book.py:228
+#: lilypond-book.py:233
 msgid "create PDF files for use with PDFTeX"
 msgstr "creare file PDF per l'utilizzo con PDFTeX"
 
-#: lilypond-book.py:419
+#: lilypond-book.py:428
 msgid "Writing snippets..."
 msgstr "Scrittura dei frammenti di codice..."
 
-#: lilypond-book.py:425
+#: lilypond-book.py:434
 msgid "Processing..."
 msgstr "In elaborazione..."
 
-#: lilypond-book.py:431
+#: lilypond-book.py:440
 msgid "All snippets are up to date..."
 msgstr "Tutti i frammenti di codice sono aggiornati..."
 
-#: lilypond-book.py:452
+#: lilypond-book.py:461
 #, python-format
 msgid "cannot determine format for: %s"
 msgstr "impossibile determinare il formato per: %s"
 
-#: lilypond-book.py:461
+#: lilypond-book.py:470
 #, python-format
 msgid "%s is up to date."
 msgstr "%s è aggiornato."
 
-#: lilypond-book.py:475
+#: lilypond-book.py:484
 #, python-format
 msgid "Writing `%s'..."
 msgstr "Scrittura di «%s»..."
 
-#: lilypond-book.py:537
+#: lilypond-book.py:546
 msgid "Output would overwrite input file; use --output."
 msgstr "L'output sovrascriverebbe il file di input; usare --output."
 
-#: lilypond-book.py:541
+#: lilypond-book.py:550
 #, python-format
 msgid "Reading %s..."
 msgstr "Lettura di %s..."
 
-#: lilypond-book.py:549
+#: lilypond-book.py:558
 msgid "Dissecting..."
 msgstr "Dissezione di..."
 
-#: lilypond-book.py:561
+#: lilypond-book.py:570
 #, python-format
 msgid "Compiling %s..."
 msgstr "Compilazione di %s"
 
-#: lilypond-book.py:570
+#: lilypond-book.py:579
 #, python-format
 msgid "Processing include: %s"
 msgstr "Elaborazione di include: %s"
 
-#: lilypond-book.py:582
+#: lilypond-book.py:591
 #, python-format
 msgid "Removing `%s'"
 msgstr "Eliminazione di «%s»"
@@ -1463,7 +1501,7 @@ msgstr "Altre lingue"
 msgid "success: %s"
 msgstr "riuscito: %s"
 
-#: warn.cc:86 grob.cc:617 input.cc:97
+#: warn.cc:86 grob.cc:613 input.cc:97
 #, c-format
 msgid "programming error: %s"
 msgstr "errore di programmazione: %s"
@@ -1508,7 +1546,7 @@ msgstr "flexa ascendente in stile vaticana"
 msgid "Vaticana_ligature: zero join (delta_pitch == 0)"
 msgstr "Vaticana_ligature: unione nulla (delta_pitch == 0)"
 
-#: parse-scm.cc:101
+#: parse-scm.cc:100
 msgid "GUILE signaled an error for the expression beginning here"
 msgstr "GUILE ha segnalato un errore per l'espressione che inizia qui"
 
@@ -1517,15 +1555,15 @@ msgid "rhythmic head is not part of a rhythmic column"
 msgstr "la testa ritmica non fa parte di una colonna ritmica"
 
 #. if we get to here, just put everything on one line
-#: constrained-breaking.cc:189 constrained-breaking.cc:207
+#: constrained-breaking.cc:187 constrained-breaking.cc:205
 msgid "cannot find line breaking that satisfies constraints"
 msgstr "impossibile trovare interruzioni di linea che soddisfino i vincoli"
 
-#: horizontal-bracket-engraver.cc:78
+#: horizontal-bracket-engraver.cc:62
 msgid "do not have that many brackets"
 msgstr "non ci sono così tante parentesi"
 
-#: horizontal-bracket-engraver.cc:87
+#: horizontal-bracket-engraver.cc:71
 msgid "conflicting note group events"
 msgstr "eventi di gruppi di note in conflitto"
 
@@ -1537,12 +1575,12 @@ msgstr "eliminazione di un trattino non terminato"
 msgid "unterminated hyphen; removing"
 msgstr "trattino non terminato; eliminazione"
 
-#: pango-font.cc:187 open-type-font.cc:319
+#: pango-font.cc:189 open-type-font.cc:318
 #, c-format
 msgid "FT_Get_Glyph_Name () error: %s"
 msgstr "errore in FT_Get_Glyph_Name (): %s"
 
-#: pango-font.cc:204
+#: pango-font.cc:205
 #, c-format
 msgid ""
 "Glyph has no name, but font supports glyph naming.\n"
@@ -1551,16 +1589,16 @@ msgstr ""
 "Il glifo non ha un nome, ma il tipo di carattere permette di dare un nome al glifo.\n"
 "Si salta il glifo U+%0X, file %s"
 
-#: pango-font.cc:241
+#: pango-font.cc:242
 #, c-format
 msgid "no PostScript font name for font `%s'"
 msgstr "nessun nome di tipo di carattere PostScript per «%s»"
 
-#: pango-font.cc:290
+#: pango-font.cc:291
 msgid "FreeType face has no PostScript font name"
 msgstr "Il tipo FreeType non ha un nome per il tipo di carattere PostScript"
 
-#: midi-item.cc:92
+#: midi-item.cc:89
 #, c-format
 msgid "no such MIDI instrument: `%s'"
 msgstr "non esiste questo strumento MIDI: «%s»"
@@ -1569,7 +1607,7 @@ msgstr "non esiste questo strumento MIDI: «%s»"
 msgid "NoteEvent without pitch"
 msgstr "NoteEvent senza altezza"
 
-#: rest.cc:159
+#: rest.cc:160
 #, c-format
 msgid "rest `%s' not found"
 msgstr "pausa «%s» non trovata"
@@ -1587,7 +1625,7 @@ msgstr "travatura già presente"
 msgid "unterminated beam"
 msgstr "travatura non terminata"
 
-#: beam-engraver.cc:266 chord-tremolo-engraver.cc:150
+#: beam-engraver.cc:266 chord-tremolo-engraver.cc:149
 msgid "stem must have Rhythmic structure"
 msgstr "il gambo deve avere una struttura ritmica"
 
@@ -1599,26 +1637,26 @@ msgstr "il gambo non rientra nella travatura"
 msgid "beam was started here"
 msgstr "la travatura è iniziata qui"
 
-#: music-iterator.cc:182
+#: music-iterator.cc:181
 msgid "Sending non-event to context"
 msgstr "Invio di un non-evento al contesto"
 
-#: context.cc:149
+#: context.cc:148
 #, c-format
 msgid "cannot find or create new `%s'"
 msgstr "impossibile trovare o creare un nuovo «%s»"
 
-#: context.cc:207
+#: context.cc:206
 #, c-format
 msgid "cannot find or create `%s' called `%s'"
 msgstr "impossibile trovare o creare «%s» chiamato «%s»"
 
-#: context.cc:269
+#: context.cc:268
 #, c-format
 msgid "Invalid CreateContext event: Cannot create %s context"
 msgstr "Evento CreateContext non valido: impossibile creare il contesto %s"
 
-#: context.cc:400
+#: context.cc:399
 #, c-format
 msgid "cannot find or create: `%s'"
 msgstr "impossibile trovare o creare: «%s»"
@@ -1636,11 +1674,11 @@ msgstr "Classe di evento %s sconosciuta"
 msgid "forced break was overridden by some other event, should you be using bar checks?"
 msgstr "l'interruzione forzata è stata sovrascritta da qualche altro evento, considerare l'uso dei controlli di battuta"
 
-#: tie-engraver.cc:116
+#: tie-engraver.cc:117
 msgid "unterminated tie"
 msgstr "legatura di valore non terminata"
 
-#: tie-engraver.cc:312
+#: tie-engraver.cc:348
 msgid "lonely tie"
 msgstr "legatura di valore solitaria"
 
@@ -1726,27 +1764,27 @@ msgstr ""
 "lo deve essere anche la penultima nota,\n"
 "oppure la legatura deve essere LB o SSB"
 
-#: mensural-ligature-engraver.cc:386
+#: mensural-ligature-engraver.cc:387
 msgid "unexpected case fall-through"
 msgstr "caso inatteso e non interpretabile"
 
-#: piano-pedal-engraver.cc:298
+#: piano-pedal-engraver.cc:296
 #, c-format
 msgid "expect 3 strings for piano pedals, found: %ld"
 msgstr "previste tre corde per i pedali del pianoforte, trovate: %ld"
 
-#: piano-pedal-engraver.cc:313 piano-pedal-engraver.cc:324
+#: piano-pedal-engraver.cc:311 piano-pedal-engraver.cc:322
 #: piano-pedal-performer.cc:104
 #, c-format
 msgid "cannot find start of piano pedal: `%s'"
 msgstr "impossibile trovare l'inizio del pedale del pianoforte: «%s»"
 
-#: piano-pedal-engraver.cc:359
+#: piano-pedal-engraver.cc:357
 #, c-format
 msgid "cannot find start of piano pedal bracket: `%s'"
 msgstr "impossibile trovare la parentesi di apertura del pedale del pianoforte: «%s»"
 
-#: input.cc:131 source-file.cc:179 source-file.cc:194
+#: input.cc:130 source-file.cc:178 source-file.cc:193
 msgid "position unknown"
 msgstr "posizione sconosciuta"
 
@@ -1755,28 +1793,28 @@ msgstr "posizione sconosciuta"
 msgid "Layout output to `%s'..."
 msgstr "Output della formattazione inviato a «%s»..."
 
-#: general-scheme.cc:306
+#: general-scheme.cc:305
 msgid "infinity or NaN encountered while converting Real number"
 msgstr "si è incontrato infinito o un valore non numerico durante la conversione di un numero reale"
 
-#: general-scheme.cc:307
+#: general-scheme.cc:306
 msgid "setting to zero"
 msgstr "impostato a zero"
 
-#: general-scheme.cc:543
+#: general-scheme.cc:540
 msgid "Found infinity or nan in output. Substituting 0.0"
 msgstr "Trovato infinito o un valore non numerico nell'output. Sostituito con 0.0"
 
-#: music.cc:151
+#: music.cc:150
 #, c-format
 msgid "octave check failed; expected \"%s\", found: \"%s\""
 msgstr "controllo dell'ottava fallito: previsto \"%s\", trovato: \"%s\""
 
-#: music.cc:219
+#: music.cc:218
 msgid "(normalized pitch)"
 msgstr "(altezza normalizzata)"
 
-#: music.cc:223
+#: music.cc:222
 #, c-format
 msgid "Transposing %s by %s makes alteration larger than double"
 msgstr "La trasposizione di %s da %s ingrandisce le alterazioni più del doppio"
@@ -1790,15 +1828,15 @@ msgstr "traduttore sconosciuto: «%s»"
 msgid "trying to use \\partial after the start of a piece"
 msgstr "tentativo di usare \\partial all'inizio di un brano"
 
-#: new-fingering-engraver.cc:106
+#: new-fingering-engraver.cc:105
 msgid "cannot add text scripts to individual note heads"
 msgstr "impossibile aggiungere delle scritte testuali alle teste delle note individuali"
 
-#: new-fingering-engraver.cc:250
+#: new-fingering-engraver.cc:249
 msgid "no placement found for fingerings"
 msgstr "nessuna posizione trovata per le diteggiature"
 
-#: new-fingering-engraver.cc:251
+#: new-fingering-engraver.cc:250
 msgid "placing below"
 msgstr "si colloca in basso"
 
@@ -1818,15 +1856,15 @@ msgstr "legatura già presente"
 msgid "no left bound"
 msgstr "manca il limite sinistro"
 
-#: ligature-engraver.cc:185
+#: ligature-engraver.cc:184
 msgid "unterminated ligature"
 msgstr "legatura non terminata"
 
-#: ligature-engraver.cc:214
+#: ligature-engraver.cc:211
 msgid "ignoring rest: ligature may not contain rest"
 msgstr "pausa ignorata: la legatura non può contenere una pausa"
 
-#: ligature-engraver.cc:215
+#: ligature-engraver.cc:212
 msgid "ligature was started here"
 msgstr "la legatura è iniziata qui"
 
@@ -1835,26 +1873,26 @@ msgstr "la legatura è iniziata qui"
 msgid "cannot change, already in translator: %s"
 msgstr "impossibile cambiare, già nel traduttore: %s"
 
-#: accidental-engraver.cc:180
+#: accidental-engraver.cc:179
 #, c-format
 msgid "accidental typesetting list must begin with context-name: %s"
 msgstr "la lista tipografica delle alterazioni deve iniziare con context-name: %s"
 
-#: accidental-engraver.cc:210
+#: accidental-engraver.cc:209
 #, c-format
 msgid "procedure or context-name expected for accidental rule, found %s"
 msgstr "si aspettava una procedura o un nome di contesto per la regola di alterazione accidentale, si è trovato %s"
 
-#: ttf.cc:481 ttf.cc:530
+#: ttf.cc:480 ttf.cc:529
 #, c-format
 msgid "font index %d too large for font `%s', using index 0"
 msgstr "l'indice del tipo di carattere %d è troppo grande per il tipo di carattere «%s», si usa l'indice 0"
 
-#: ttf.cc:513 ttf.cc:565
+#: ttf.cc:512 ttf.cc:564
 msgid "font index must be non-negative, using index 0"
 msgstr "l'indice del tipo di carattere deve essere non negativo, si usa l'indice 0"
 
-#: break-alignment-interface.cc:206
+#: break-alignment-interface.cc:199
 #, c-format
 msgid "No spacing entry from %s to `%s'"
 msgstr "Nessuno spazio da %s a «%s»"
@@ -1909,7 +1947,7 @@ msgstr "Percorso di ricerca «%s»"
 msgid "Aborting"
 msgstr "Si sospende l'esecuzione"
 
-#: note-collision.cc:497
+#: note-collision.cc:494
 msgid "ignoring too many clashing note columns"
 msgstr "troppe collisioni tra colonne di note, ignorate"
 
@@ -1930,20 +1968,20 @@ msgstr "è già presente uno spanner terminato"
 msgid "giving up"
 msgstr "rinuncia"
 
-#: page-layout-problem.cc:322
+#: page-layout-problem.cc:603
 msgid "cannot fit music on page: ragged-spacing was requested, but page was compressed"
 msgstr "impossibile far entrare la musica nella pagina: richiesta la spaziatura ridotta, ma la pagina è già stata compressa"
 
-#: page-layout-problem.cc:325
+#: page-layout-problem.cc:606
 #, c-format
 msgid "cannot fit music on page: overflow is %f"
 msgstr "impossibile far entrare la musica nella pagina: l'eccesso è %f"
 
-#: page-layout-problem.cc:327
+#: page-layout-problem.cc:608
 msgid "compressing music to fit"
 msgstr "si comprime la musica per farla entrare"
 
-#: page-layout-problem.cc:765
+#: page-layout-problem.cc:1047
 msgid "staff-affinities should only decrease"
 msgstr "staff-affinities deve solo diminuire"
 
@@ -1960,7 +1998,7 @@ msgstr "rehearsalMark deve avere un valore intero"
 msgid "mark label must be a markup object"
 msgstr "l'etichetta del segno deve essere un oggetto di markup"
 
-#: new-dynamic-engraver.cc:142
+#: new-dynamic-engraver.cc:168
 #, c-format
 msgid ""
 "unknown crescendo style: %s\n"
@@ -1969,35 +2007,34 @@ msgstr ""
 "stile di crescendo sconosciuto: %s\n"
 "si usa la forcella predefinita."
 
-#: new-dynamic-engraver.cc:200
+#: new-dynamic-engraver.cc:233
 #, c-format
 msgid "unterminated %s"
 msgstr "%s non terminato"
 
-#: stem-engraver.cc:103
+#: stem-engraver.cc:102
 msgid "tremolo duration is too long"
 msgstr "la durata del tremolo è troppo lunga"
 
-#. FIXME:
-#: stem-engraver.cc:140
+#: stem-engraver.cc:154
 #, c-format
-msgid "adding note head to incompatible stem (type = %d)"
-msgstr "si aggiunge la testa della nota a un gambo incompatibile (tipo = %d)"
+msgid "adding note head to incompatible stem (type = %d/%d)"
+msgstr "si aggiunge la testa della nota a un gambo incompatibile (tipo = %d/%d)"
 
-#: stem-engraver.cc:142
+#: stem-engraver.cc:157
 msgid "maybe input should specify polyphonic voices"
 msgstr "forse l'input dovrebbe specificare le voci polifoniche"
 
-#: lily-lexer.cc:264
+#: lily-lexer.cc:265
 msgid "include files are not allowed in safe mode"
 msgstr "l'inclusione di file non è permessa in modalità sicura"
 
-#: lily-lexer.cc:291
+#: lily-lexer.cc:292
 #, c-format
 msgid "identifier name is a keyword: `%s'"
 msgstr "Il nome dell'identificatore è una parola chiave: «%s»"
 
-#: lily-lexer.cc:312
+#: lily-lexer.cc:313
 #, c-format
 msgid "error at EOF: %s"
 msgstr "errore alla fine del file (EOF): %s"
@@ -2007,12 +2044,12 @@ msgstr "errore alla fine del file (EOF): %s"
 msgid "cannot find Voice `%s'"
 msgstr "impossibile trovare la voce (Voice) «%s»"
 
-#: includable-lexer.cc:71 lily-guile.cc:87 lily-parser-scheme.cc:109
+#: includable-lexer.cc:71 lily-guile.cc:86 lily-parser-scheme.cc:109
 #, c-format
 msgid "cannot find file: `%s'"
 msgstr "impossibile trovare il file: «%s»"
 
-#: includable-lexer.cc:73 lily-parser-scheme.cc:100
+#: includable-lexer.cc:73 lily-parser-scheme.cc:101
 #, c-format
 msgid "(search path: `%s')"
 msgstr "(percorso di ricerca: «%s»)"
@@ -2026,38 +2063,52 @@ msgid "removing beam with no stems"
 msgstr "rimozione delle travature senza gambi"
 
 #. We are completely screwed.
-#: beam.cc:1274
+#: beam.cc:1350
 msgid "no viable initial configuration found: may not find good beam slope"
 msgstr "nessuna configurazione iniziale fattibile trovata: si potrebbe non trovare una buona inclinazione delle travature"
 
-#: slur-engraver.cc:93
+#: staff-performer.cc:257
+msgid "MIDI channel wrapped around"
+msgstr "Numerazione canale MIDI ricominciata"
+
+#: staff-performer.cc:258
+msgid "remapping modulo 16"
+msgstr "riassegnata con modulo 16"
+
+#: slur-engraver.cc:90 phrasing-slur-engraver.cc:89
 #, c-format
 msgid "direction of %s invalid: %d"
 msgstr "direzione di %s non valida: %d"
 
-#: slur-engraver.cc:162
+#: slur-engraver.cc:158
 msgid "unterminated slur"
 msgstr "legatura di portamento non terminata"
 
-#: slur-engraver.cc:174
+#: slur-engraver.cc:183
 msgid "cannot end slur"
 msgstr "impossibile terminare la legatura di portamento"
 
-#: font-config.cc:40
+#. We already have a slur, so give a warning and completely ignore
+#. the new slur.
+#: slur-engraver.cc:200
+msgid "already have slur"
+msgstr "legatura già presente"
+
+#: font-config.cc:39
 msgid "Initializing FontConfig..."
 msgstr "Inizializzazione di FontConfig..."
 
-#: font-config.cc:55 font-config-scheme.cc:152
+#: font-config.cc:54 font-config-scheme.cc:151
 #, c-format
 msgid "failed adding font directory: %s"
 msgstr "errore nell'aggiungere la directory dei tipi di carattere: %s"
 
-#: font-config.cc:57 font-config-scheme.cc:154
+#: font-config.cc:56 font-config-scheme.cc:153
 #, c-format
 msgid "adding font directory: %s"
 msgstr "aggiungere la directory dei tipi di carattere: %s"
 
-#: font-config.cc:61
+#: font-config.cc:60
 msgid "Building font database..."
 msgstr "Creazione del database dei tipi di carattere..."
 
@@ -2103,27 +2154,27 @@ msgstr "Non si è trovato il nome del glifo per l'alterazione %s"
 msgid "natural alteration glyph not found"
 msgstr "alterazione naturale del glifo non trovata"
 
-#: system.cc:197
+#: system.cc:201
 #, c-format
 msgid "Element count %d"
 msgstr "Numero degli elementi %d"
 
-#: system.cc:303
+#: system.cc:402
 #, c-format
 msgid "Grob count %d"
 msgstr "Numero degli oggetti grafici %d"
 
-#: slur.cc:362
+#: slur.cc:359
 #, c-format
 msgid "Ignoring grob for slur: %s. avoid-slur not set?"
 msgstr "Si ignora il grob per la legatura di portamento: %s. Non si è impostato avoid-slur?"
 
-#: font-config-scheme.cc:168
+#: font-config-scheme.cc:167
 #, c-format
 msgid "failed adding font file: %s"
 msgstr "errore nell'aggiungere il file dei tipi di carattere: %s"
 
-#: font-config-scheme.cc:170
+#: font-config-scheme.cc:169
 #, c-format
 msgid "adding font file: %s"
 msgstr "aggiungere il file dei tipi di carattere: %s"
@@ -2132,34 +2183,34 @@ msgstr "aggiungere il file dei tipi di carattere: %s"
 msgid "decrescendo too small"
 msgstr "decrescendo troppo piccolo"
 
-#: extender-engraver.cc:170 extender-engraver.cc:179
+#: extender-engraver.cc:169 extender-engraver.cc:178
 msgid "unterminated extender"
 msgstr "estensore non terminato"
 
-#: lily-guile.cc:89
+#: lily-guile.cc:88
 #, c-format
 msgid "(load path: `%s')"
 msgstr "(percorso di caricamento: «%s»)"
 
-#: lily-guile.cc:437
+#: lily-guile.cc:431
 #, c-format
 msgid "cannot find property type-check for `%s' (%s)."
 msgstr "impossibile trovare la proprietà type-check per «%s» (%s)."
 
-#: lily-guile.cc:440
+#: lily-guile.cc:434
 msgid "perhaps a typing error?"
 msgstr "forse un errore di digitazione?"
 
-#: lily-guile.cc:447
+#: lily-guile.cc:441
 msgid "doing assignment anyway"
 msgstr "compito comunque in corso"
 
-#: lily-guile.cc:459
+#: lily-guile.cc:453
 #, c-format
 msgid "type check for `%s' failed; value `%s' must be of type `%s'"
 msgstr "controllo del tipo per «%s» fallito; il valore «%s» deve essere del tipo «%s»"
 
-#: main.cc:109
+#: main.cc:107
 #, c-format
 msgid ""
 "This program is free software.  It is covered by the GNU General Public\n"
@@ -2171,11 +2222,12 @@ msgstr ""
 "License che permette di modificarlo o distribuirne copie rispettando certe\n"
 "condizioni. Per maggiori informazioni, invocare «%s --warranty».\n"
 
-#: main.cc:115
+#: main.cc:113
 msgid ""
 "    This program is free software; you can redistribute it and/or\n"
-"modify it under the terms of the GNU General Public License version 2\n"
-"as published by the Free Software Foundation.\n"
+"modify it under the terms of the GNU General Public License as \n"
+"published by the Free Software Foundation, either version 3 of\n"
+"the License, or (at your option) any later version.\n"
 "\n"
 "    This program is distributed in the hope that it will be useful,\n"
 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -2188,8 +2240,9 @@ msgid ""
 "Boston, MA 02111-1307, USA.\n"
 msgstr ""
 "    Questo programma è software libero; puoi ridistribuirlo e/o\n"
-"modificarlo sotto le condizioni della GNU General Public License, versione 2,\n"
-"come pubblicata dalla Free Software Foundation.\n"
+"modificarlo sotto le condizioni della GNU General Public License,\n"
+"come pubblicata dalla Free Software Foundation, nella versione 3 della\n"
+"licenza o in qualsiasi versione successiva.\n"
 "\n"
 "    Questo programma è distribuito nella speranza che possa essere utile,\n"
 "ma SENZA ALCUNA GARANZIA; è privo anche di garanzia implicita di\n"
@@ -2201,11 +2254,11 @@ msgstr ""
 "Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n"
 "Boston, MA 02111-1307, USA.\n"
 
-#: main.cc:146
+#: main.cc:147
 msgid "SYM[=VAL]"
 msgstr "SIMBOLO[=VALORE]"
 
-#: main.cc:147
+#: main.cc:148
 msgid ""
 "set Scheme option SYM to VAL (default: #t).\n"
 "Use -dhelp for help."
@@ -2213,41 +2266,41 @@ msgstr ""
 "imposta l'opzione di Scheme SIMBOLO a VALORE (predefinito: #t).\n"
 "Usare -dhelp per ottenere aiuto."
 
-#: main.cc:150
+#: main.cc:152
 msgid "EXPR"
 msgstr "ESPRESSIONE"
 
-#: main.cc:150
+#: main.cc:152
 msgid "evaluate scheme code"
 msgstr "valuta il codice scheme"
 
 #. Bug in option parser: --output =foe is taken as an abbreviation
 #. for --output-format.
-#: main.cc:153
+#: main.cc:155
 msgid "FORMATs"
 msgstr "FORMATO"
 
-#: main.cc:153
+#: main.cc:155
 msgid "dump FORMAT,...  Also as separate options:"
 msgstr "scarica FORMATO,...  Anche come opzioni separate:"
 
-#: main.cc:154
+#: main.cc:156
 msgid "generate PDF (default)"
 msgstr "genera PDF (predefinito)"
 
-#: main.cc:155
+#: main.cc:157
 msgid "generate PNG"
 msgstr "genera PNG"
 
-#: main.cc:156
+#: main.cc:158
 msgid "generate PostScript"
 msgstr "genera PostScript"
 
-#: main.cc:158
+#: main.cc:161
 msgid "FIELD"
 msgstr "CAMPO"
 
-#: main.cc:158
+#: main.cc:161
 msgid ""
 "dump header field FIELD to file\n"
 "named BASENAME.FIELD"
@@ -2255,19 +2308,19 @@ msgstr ""
 "scrive il campo di intestazione CAMPO sul\n"
 "file chiamato BASENAME.CAMPO"
 
-#: main.cc:160
+#: main.cc:164
 msgid "add DIR to search path"
 msgstr "aggiunge DIRECTORY ai percorsi di ricerca"
 
-#: main.cc:161
+#: main.cc:165
 msgid "use FILE as init file"
 msgstr "usa FILE come file di inizializzazione"
 
-#: main.cc:163
+#: main.cc:168
 msgid "USER, GROUP, JAIL, DIR"
 msgstr "UTENTE, GRUPPO, GABBIA, DIRECTORY"
 
-#: main.cc:163
+#: main.cc:168
 msgid ""
 "chroot to JAIL, become USER:GROUP\n"
 "and cd into DIR"
@@ -2275,16 +2328,16 @@ msgstr ""
 "chroot a GABBIA, diventa UTENTE:GRUPPO\n"
 "ed entra in DIRECTORY"
 
-#: main.cc:166
+#: main.cc:172
 msgid "write output to FILE (suffix will be added)"
 msgstr "scrive l'output su FILE (verrà aggiunto un suffisso)"
 
-#: main.cc:167
+#: main.cc:173
 msgid "relocate using directory of lilypond program"
 msgstr "trasferisce alla directory del programma lilypond"
 
 #. Do not update the copyright years here, run `make grand-replace'
-#: main.cc:238
+#: main.cc:242
 #, c-format
 msgid ""
 "Copyright (c) %s by\n"
@@ -2294,84 +2347,84 @@ msgstr ""
 "%s e altri."
 
 #. No version number or newline here.  It confuses help2man.
-#: main.cc:265
+#: main.cc:269
 #, c-format
 msgid "Usage: %s [OPTION]... FILE..."
 msgstr "Uso: %s [OPZIONE]... [FILE]..."
 
-#: main.cc:267
+#: main.cc:271
 msgid "Typeset music and/or produce MIDI from FILE."
 msgstr "Stampa partitura oppure crea MIDI da FILE."
 
-#: main.cc:269
+#: main.cc:273
 msgid "LilyPond produces beautiful music notation."
 msgstr "LilyPond produce bella notazione musicale."
 
-#: main.cc:271
+#: main.cc:275
 #, c-format
 msgid "For more information, see %s"
 msgstr "Per maggiori informazioni si veda %s"
 
-#: main.cc:273
+#: main.cc:277
 msgid "Options:"
 msgstr "Opzioni:"
 
-#: main.cc:327
+#: main.cc:331
 #, c-format
 msgid "expected %d arguments with jail, found: %u"
 msgstr "previsti gli argomenti %d per la gabbia, trovati: %u"
 
-#: main.cc:341
+#: main.cc:345
 #, c-format
 msgid "no such user: %s"
 msgstr "non esiste questo utente: %s"
 
-#: main.cc:343
+#: main.cc:347
 #, c-format
 msgid "cannot get user id from user name: %s: %s"
 msgstr "impossibile acquisire l'id dell'utente dal nome utente: %s: %s"
 
-#: main.cc:358
+#: main.cc:362
 #, c-format
 msgid "no such group: %s"
 msgstr "non esiste questo gruppo: %s"
 
-#: main.cc:360
+#: main.cc:364
 #, c-format
 msgid "cannot get group id from group name: %s: %s"
 msgstr "impossibile acquisire l'id del gruppo dal nome del gruppo: %s:%s"
 
-#: main.cc:368
+#: main.cc:372
 #, c-format
 msgid "cannot chroot to: %s: %s"
 msgstr "non si può fare il chroot a: %s: %s"
 
-#: main.cc:375
+#: main.cc:379
 #, c-format
 msgid "cannot change group id to: %d: %s"
 msgstr "non si può cambiare l'id del gruppo in: %d: %s"
 
-#: main.cc:381
+#: main.cc:385
 #, c-format
 msgid "cannot change user id to: %d: %s"
 msgstr "non si può cambiare l'id dell'utente in: %d: %s"
 
-#: main.cc:387
+#: main.cc:391
 #, c-format
 msgid "cannot change working directory to: %s: %s"
 msgstr "non si può passare alla directory di lavoro: %s: %s"
 
-#: main.cc:628
+#: main.cc:631
 #, c-format
 msgid "exception caught: %s"
 msgstr "ricevuta un'eccezione: %s"
 
-#: key-signature-interface.cc:78
+#: key-signature-interface.cc:77
 #, c-format
 msgid "No glyph found for alteration: %s"
 msgstr "Nessun glifo trovato per l'alterazione: %s"
 
-#: key-signature-interface.cc:88
+#: key-signature-interface.cc:87
 msgid "alteration not found"
 msgstr "alterazione non trovata"
 
@@ -2380,29 +2433,29 @@ msgstr "alterazione non trovata"
 msgid "dot `%s' not found"
 msgstr "punto «%s» non trovato"
 
-#: translator.cc:359
+#: translator.cc:356
 #, c-format
 msgid "Two simultaneous %s events, junking this one"
 msgstr "Due eventi %s simultanei, si butta via questo"
 
-#: translator.cc:360
+#: translator.cc:357
 #, c-format
 msgid "Previous %s event here"
 msgstr "L'evento %s precedente sta qui"
 
-#: glissando-engraver.cc:105
+#: glissando-engraver.cc:156
 msgid "unterminated glissando"
 msgstr "glissando non terminato"
 
-#: text-spanner-engraver.cc:73
+#: text-spanner-engraver.cc:72
 msgid "cannot find start of text spanner"
 msgstr "impossibile trovare l'inizio di uno spanner testuale"
 
-#: text-spanner-engraver.cc:86
+#: text-spanner-engraver.cc:85
 msgid "already have a text spanner"
 msgstr "spanner testuale già presente"
 
-#: text-spanner-engraver.cc:132
+#: text-spanner-engraver.cc:130
 msgid "unterminated text spanner"
 msgstr "spanner testuale non terminato"
 
@@ -2421,12 +2474,12 @@ msgstr "chiave «%s» non trovata"
 msgid "strange time signature found: %d/%d"
 msgstr "si è incontrato uno strano segno di tempo: %d/%d"
 
-#: lily-parser-scheme.cc:82
+#: lily-parser-scheme.cc:83
 #, c-format
 msgid "Changing working directory to: `%s'"
 msgstr "Si cambia la directory di lavoro a: «%s»"
 
-#: lily-parser-scheme.cc:99
+#: lily-parser-scheme.cc:100
 #, c-format
 msgid "cannot find init file: `%s'"
 msgstr "impossibile trovare il file di init: «%s»"
@@ -2436,7 +2489,7 @@ msgstr "impossibile trovare il file di init: «%s»"
 msgid "Processing `%s'"
 msgstr "Elaborazione di «%s»"
 
-#: lily-parser-scheme.cc:204
+#: lily-parser-scheme.cc:203
 msgid "ly:parser-parse-string is only valid with a new parser.  Use ly:parser-include-string instead."
 msgstr "ly:parser-parse-string è valido solo con un nuovo parser.  Usare ly:parser-include-string al suo posto."
 
@@ -2445,7 +2498,7 @@ msgstr "ly:parser-parse-string è valido solo con un nuovo parser.  Usare ly:par
 msgid "custos `%s' not found"
 msgstr "custos «%s» non trovato"
 
-#: program-option-scheme.cc:237
+#: program-option-scheme.cc:232
 #, c-format
 msgid "no such internal option: %s"
 msgstr "opzione interna sconosciuta: %s"
@@ -2454,10 +2507,15 @@ msgstr "opzione interna sconosciuta: %s"
 msgid "cannot resolve rest collision: rest direction not set"
 msgstr "impossibile risolvere la collisione di pause: direzione delle pause non impostata"
 
-#: rest-collision.cc:160 rest-collision.cc:205
+#: rest-collision.cc:160 rest-collision.cc:275
 msgid "too many colliding rests"
 msgstr "troppe collisioni tra pause"
 
+#: pdf-scheme.cc:50
+#, c-format
+msgid "Conversion of string `%s' to UTF-16be failed: %s"
+msgstr "Fallita la conversione della stringa \"%s\" in UTF-16be: %s"
+
 #: episema-engraver.cc:75
 msgid "already have an episema"
 msgstr "episema già presente"
@@ -2475,57 +2533,57 @@ msgstr "episema non terminato"
 msgid "%d: %s"
 msgstr "%d: %s"
 
-#: grob-property.cc:173
+#: grob-property.cc:169
 #, c-format
 msgid "cyclic dependency: calculation-in-progress encountered for #'%s (%s)"
 msgstr "dipendenza ciclica: calculation-in-progress incontrato per #'%s (%s)"
 
-#: relocate.cc:54
+#: relocate.cc:53
 #, c-format
 msgid "Setting %s to %s"
 msgstr "Si imposta %s su %s"
 
-#: relocate.cc:74
+#: relocate.cc:73
 #, c-format
 msgid "no such file: %s for %s"
 msgstr "file inesistente: %s per %s"
 
-#: relocate.cc:84 relocate.cc:102
+#: relocate.cc:83 relocate.cc:101
 #, c-format
 msgid "no such directory: %s for %s"
 msgstr "directory inesistente: %s per %s"
 
-#: relocate.cc:94
+#: relocate.cc:93
 #, c-format
 msgid "%s=%s (prepend)\n"
 msgstr "%s=%s (prefisso)\n"
 
-#: relocate.cc:124
+#: relocate.cc:123
 #, c-format
 msgid "not relocating, no %s/ or current/ found under %s"
 msgstr "non si riloca, non si è incontrato %s/ o current/ in %s"
 
-#: relocate.cc:135
+#: relocate.cc:134
 #, c-format
 msgid "Relocation: compile datadir=%s, new datadir=%s"
 msgstr "Rilocazione: compilare datadir=%s, nuova datadir=%s"
 
-#: relocate.cc:148
+#: relocate.cc:147
 #, c-format
 msgid "Relocation: framework_prefix=%s"
 msgstr "Rilocazione: framework_prefix=%s"
 
-#: relocate.cc:189
+#: relocate.cc:188
 #, c-format
 msgid "Relocation: is absolute: argv0=%s"
 msgstr "Rilocazione: è assoluta: argv0=%s"
 
-#: relocate.cc:196
+#: relocate.cc:195
 #, c-format
 msgid "Relocation: from cwd: argv0=%s"
 msgstr "Rilocazione: da cwd: argv0=%s"
 
-#: relocate.cc:213
+#: relocate.cc:212
 #, c-format
 msgid ""
 "Relocation: from PATH=%s\n"
@@ -2534,25 +2592,45 @@ msgstr ""
 "Rilocazione: da PATH=%s\n"
 "argv0=%s"
 
-#: relocate.cc:240
+#: relocate.cc:239
 msgid "LILYPONDPREFIX is obsolete, use LILYPOND_DATADIR"
 msgstr "LILYPONDPREFIX è obsoleto, usare LILYPOND_DATADIR"
 
-#: relocate.cc:367
+#: relocate.cc:365
 #, c-format
 msgid "Relocation file: %s"
 msgstr "File di rilocazione: %s"
 
-#: relocate.cc:373 source-file.cc:65
+#: relocate.cc:371 source-file.cc:65
 #, c-format
 msgid "cannot open file: `%s'"
 msgstr "impossibile aprire il file: «%s»"
 
-#: relocate.cc:403
+#: relocate.cc:401
 #, c-format
 msgid "Unknown relocation command %s"
 msgstr "Comando di rilocazione sconosciuto %s"
 
+#: gregorian-ligature-engraver.cc:70
+#, c-format
+msgid "\\%s ignored"
+msgstr "\\%s ignorato"
+
+#: gregorian-ligature-engraver.cc:75
+#, c-format
+msgid "implied \\%s added"
+msgstr "aggiunto il \\%s implicato"
+
+#. ligature may not start with 2nd head of pes or flexa
+#: gregorian-ligature-engraver.cc:224
+msgid "cannot apply `\\~' on first head of ligature"
+msgstr "impossibile applicare «\\~» sulla prima testa della legatura"
+
+#. (pitch == prev_pitch)
+#: gregorian-ligature-engraver.cc:236
+msgid "cannot apply `\\~' on heads with identical pitch"
+msgstr "impossibile applicare «\\~» su teste di identica altezza"
+
 #: translator-group.cc:188
 #, c-format
 msgid "cannot find: `%s'"
@@ -2562,31 +2640,31 @@ msgstr "impossibile trovare: «%s»"
 msgid "unterminated phrasing slur"
 msgstr "legatura di frase non terminata"
 
-#: lyric-engraver.cc:176
+#: phrasing-slur-engraver.cc:182
+msgid "cannot end phrasing slur"
+msgstr "impossibile chiudere la legatura di frase"
+
+#: phrasing-slur-engraver.cc:196
+msgid "already have phrasing slur"
+msgstr "legatura di frase già presente"
+
+#: lyric-engraver.cc:186
 msgid "Lyric syllable does not have note. Use \\lyricsto or associatedVoice."
 msgstr "Le sillabe del testo non hanno note. Usare \\lyricsto o associatedVoice."
 
-#: page-breaking.cc:248
+#: page-breaking.cc:274
 msgid "ignoring min-systems-per-page and max-systems-per-page because systems-per-page was set"
 msgstr "si ignorano min-systems-per-page e max-systems-per-page perché è stato impostato systems-per-page"
 
-#: page-breaking.cc:253
+#: page-breaking.cc:279
 msgid "min-systems-per-page is larger than max-systems-per-page, ignoring both values"
 msgstr "min-systems-per-page è maggiore di max-systems-per-page, si ignorano entrambi i valori"
 
-#: performance.cc:54
+#: performance.cc:55
 msgid "Track..."
 msgstr "Traccia..."
 
-#: performance.cc:83
-msgid "MIDI channel wrapped around"
-msgstr "Numerazione canale MIDI ricominciata"
-
-#: performance.cc:84
-msgid "remapping modulo 16"
-msgstr "riassegnata con modulo 16"
-
-#: performance.cc:111
+#: performance.cc:85
 #, c-format
 msgid "MIDI output to `%s'..."
 msgstr "L'output MIDI è inviato a «%s»..."
@@ -2595,26 +2673,6 @@ msgstr "L'output MIDI è inviato a «%s»..."
 msgid "No tuplet to end"
 msgstr "Nessun gruppo irregolare da terminare"
 
-#: gregorian-ligature-engraver.cc:70
-#, c-format
-msgid "\\%s ignored"
-msgstr "\\%s ignorato"
-
-#: gregorian-ligature-engraver.cc:75
-#, c-format
-msgid "implied \\%s added"
-msgstr "aggiunto il \\%s implicato"
-
-#. ligature may not start with 2nd head of pes or flexa
-#: gregorian-ligature-engraver.cc:224
-msgid "cannot apply `\\~' on first head of ligature"
-msgstr "impossibile applicare «\\~» sulla prima testa della legatura"
-
-#. (pitch == prev_pitch)
-#: gregorian-ligature-engraver.cc:236
-msgid "cannot apply `\\~' on heads with identical pitch"
-msgstr "impossibile applicare «\\~» su teste di identica altezza"
-
 #: chord-tremolo-engraver.cc:88
 msgid "No tremolo to end"
 msgstr "Nessun tremolo alla fine"
@@ -2653,20 +2711,20 @@ msgstr "sono necessari argomenti simbolici per \\override e \\revert"
 msgid "expected to read %d characters, got %d"
 msgstr "si prevedeva di leggere %d caratteri, se ne sono ottenuti %d"
 
-#: axis-group-interface.cc:631
+#: axis-group-interface.cc:627
 msgid "an outside-staff object should have a direction, defaulting to up"
 msgstr "un oggetto esterno al rigo dovrebbe avere una direzione, si imposta in su come da impostazione predefinita"
 
-#: coherent-ligature-engraver.cc:111
+#: coherent-ligature-engraver.cc:110
 #, c-format
 msgid "Coherent_ligature_engraver: setting `spacing-increment=0.01': ptr=%ul"
 msgstr "Coherent_ligature_engraver: impostare `spacing-increment=0.01': ptr=%ul"
 
-#: percent-repeat-engraver.cc:148
+#: percent-repeat-engraver.cc:147
 msgid "unterminated percent repeat"
 msgstr "ripetizione percentuale non terminata"
 
-#: note-head.cc:76
+#: note-head.cc:75
 #, c-format
 msgid "none of note heads `%s' or `%s' found"
 msgstr "non si è trovata alcuna delle teste delle note «%s» o «%s»"
@@ -2684,12 +2742,12 @@ msgstr "non so come interpretare l'articolazione:"
 msgid " scheme encoding: "
 msgstr " codifica di Scheme: "
 
-#: all-font-metrics.cc:156
+#: all-font-metrics.cc:153
 #, c-format
 msgid "cannot find font: `%s'"
 msgstr "impossibile trovare il tipo di carattere: «%s»"
 
-#: property-iterator.cc:85
+#: property-iterator.cc:93
 #, c-format
 msgid "not a grob name, `%s'"
 msgstr "non è il nome di un grob, «%s»"
@@ -2699,16 +2757,16 @@ msgstr "non è il nome di un grob, «%s»"
 msgid "barcheck failed at: %s"
 msgstr "controllo di battuta fallito a: %s"
 
-#: stem.cc:116
+#: stem.cc:114
 msgid "weird stem size, check for narrow beams"
 msgstr "strana dimensione del gambo, controllare di non avere travature strette"
 
-#: stem.cc:657
+#: stem.cc:652
 #, c-format
 msgid "flag `%s' not found"
 msgstr "non si trova la coda uncinata «%s»"
 
-#: stem.cc:673
+#: stem.cc:668
 #, c-format
 msgid "flag stroke `%s' not found"
 msgstr "non si trova il tratto «%s» della coda uncinata"
@@ -2778,23 +2836,23 @@ msgstr "\tnumero delle pagine: %d"
 msgid "\tprevious break: %d"
 msgstr "\tinterruzione precedente: %d"
 
-#: lily-parser.cc:106
+#: lily-parser.cc:105
 msgid "Parsing..."
 msgstr "Analisi..."
 
-#: lily-parser.cc:134
+#: lily-parser.cc:133
 msgid "braces do not match"
 msgstr "le graffe non corrispondono"
 
-#: score.cc:178
+#: score.cc:176
 msgid "already have music in score"
 msgstr "musica già presente nello spartito"
 
-#: score.cc:179
+#: score.cc:177
 msgid "this is the previous music"
 msgstr "questa è la musica precedente"
 
-#: score.cc:184
+#: score.cc:182
 msgid "errors found, ignoring music expression"
 msgstr "trovati degli errori, si ignora l'espressione musicale"
 
@@ -2855,17 +2913,17 @@ msgstr "impossibile caricare la tabella dei tipi di carattere: %s"
 msgid "FreeType error: %s"
 msgstr "Errore FreeType: %s"
 
-#: open-type-font.cc:111
+#: open-type-font.cc:110
 #, c-format
 msgid "unsupported font format: %s"
 msgstr "formato di tipo di carattere non supportato: %s"
 
-#: open-type-font.cc:113
+#: open-type-font.cc:112
 #, c-format
 msgid "error reading font file %s: %s"
 msgstr "errore nella lettura del file del tipo di carattere %s: %s"
 
-#: open-type-font.cc:188
+#: open-type-font.cc:187
 #, c-format
 msgid "FT_Get_Glyph_Name () Freetype error: %s"
 msgstr "errore di Freetype in FT_Get_Glyph_Name (): %s"
@@ -2880,118 +2938,118 @@ msgstr "impossibile aprire il file con permesso di scrittura: %s: %s"
 msgid "cannot write to file: `%s'"
 msgstr "impossibile scrivere su file: «%s»"
 
-#: parser.yy:820
+#: parser.yy:825
 msgid "\\paper cannot be used in \\score, use \\layout instead"
 msgstr "non si può usare \\paper dentro \\score, usare \\layout al suo posto"
 
-#: parser.yy:844
+#: parser.yy:849
 msgid "need \\paper for paper block"
 msgstr "è necessario \\paper per il blocco \"paper\""
 
-#: parser.yy:1363
+#: parser.yy:1369
 msgid "only \\consists takes non-string argument."
 msgstr "solo \\consists prende un argomento diverso da una stringa"
 
-#: parser.yy:1376
+#: parser.yy:1382
 msgid "Grob name should be alphanumeric"
 msgstr "Il nome del grob deve essere alfanumerico"
 
-#: parser.yy:1685
+#: parser.yy:1697
 msgid "second argument must be pitch list"
 msgstr "il secondo argomento deve essere una lista di altezze"
 
-#: parser.yy:1716 parser.yy:1721 parser.yy:2194
+#: parser.yy:1728 parser.yy:1733 parser.yy:2206
 msgid "have to be in Lyric mode for lyrics"
 msgstr "bisogna essere in modo \"Lyric\" per i testi"
 
-#: parser.yy:1818
+#: parser.yy:1830
 msgid "expecting string as script definition"
 msgstr "ci si aspetta una stringa come definizione dello script"
 
-#: parser.yy:1973 parser.yy:2024
+#: parser.yy:1985 parser.yy:2036
 #, c-format
 msgid "not a duration: %d"
 msgstr "non è una durata: %d"
 
-#: parser.yy:2148
+#: parser.yy:2160
 msgid "have to be in Note mode for notes"
 msgstr "bisogna essere in modo \"Note\" per le note"
 
-#: parser.yy:2209
+#: parser.yy:2221
 msgid "have to be in Chord mode for chords"
 msgstr "bisogna essere in modo \"Chord\" per gli accordi"
 
-#: lexer.ll:190
+#: lexer.ll:192
 msgid "stray UTF-8 BOM encountered"
 msgstr "si è incontrato un segno BOM UTF-8 isolato"
 
-#: lexer.ll:194
+#: lexer.ll:196
 msgid "Skipping UTF-8 BOM"
 msgstr "Si ignora il BOM UTF-8"
 
-#: lexer.ll:249
+#: lexer.ll:251
 #, c-format
 msgid "Renaming input to: `%s'"
 msgstr "Si rinomina l'input in: «%s»"
 
-#: lexer.ll:266
+#: lexer.ll:268
 msgid "quoted string expected after \\version"
 msgstr "\\version deve essere seguito da una stringa compresa tra virgolette"
 
-#: lexer.ll:270
+#: lexer.ll:272
 msgid "quoted string expected after \\sourcefilename"
 msgstr "\\sourcefilename deve essere seguito da una stringa compresa tra virgolette"
 
-#: lexer.ll:274
+#: lexer.ll:276
 msgid "integer expected after \\sourcefileline"
 msgstr "\\sourcefileline deve essere seguito da un intero"
 
-#: lexer.ll:287
+#: lexer.ll:289
 msgid "EOF found inside a comment"
 msgstr "fine del file (EOF) trovata in un commento"
 
-#: lexer.ll:302
+#: lexer.ll:304
 msgid "\\maininput not allowed outside init files"
 msgstr "\\maininput non permesso fuori dai file di inizializzazione"
 
-#: lexer.ll:326
+#: lexer.ll:328
 #, c-format
 msgid "wrong or undefined identifier: `%s'"
 msgstr "indentificatore errato o non definito: «%s»"
 
 #. backup rule
-#: lexer.ll:335
+#: lexer.ll:337
 msgid "end quote missing"
 msgstr "mancano le virgolette di chiusura"
 
-#: lexer.ll:485
+#: lexer.ll:487
 msgid "Brace found at end of lyric.  Did you forget a space?"
 msgstr "Trovata una parentesi alla fine del testo.  È stato dimenticato uno spazio?"
 
-#: lexer.ll:595
+#: lexer.ll:597
 msgid "Brace found at end of markup.  Did you forget a space?"
 msgstr "Trovata una parentesi alla fine della marcatura.  È stato dimenticato uno spazio?"
 
-#: lexer.ll:699
+#: lexer.ll:701
 #, c-format
 msgid "invalid character: `%c'"
 msgstr "carattere non valido: «%c»"
 
-#: lexer.ll:814 lexer.ll:815
+#: lexer.ll:822 lexer.ll:823
 #, c-format
 msgid "unknown escaped string: `\\%s'"
 msgstr "stringa di escape sconosciuta: «\\%s»"
 
-#: lexer.ll:924 lexer.ll:925
+#: lexer.ll:932 lexer.ll:933
 #, c-format
 msgid "file too old: %s (oldest supported: %s)"
 msgstr "file troppo vecchio: %s (il più vecchio che si può gestire è: %s)"
 
-#: lexer.ll:925 lexer.ll:926
+#: lexer.ll:933 lexer.ll:934
 msgid "consider updating the input with the convert-ly script"
 msgstr "si consideri di aggiornare l'input con lo script convert-ly"
 
-#: lexer.ll:931 lexer.ll:932
+#: lexer.ll:939 lexer.ll:940
 #, c-format
 msgid "program too old: %s (file requires: %s)"
 msgstr "programma troppo vecchio: %s (il file richiede: %s)"
@@ -3006,7 +3064,12 @@ msgstr "Elaborazione di ~S..."
 msgid "Writing ~S..."
 msgstr "Scrittura di ~S..."
 
-#: documentation-lib.scm:198
+#: documentation-lib.scm:184
+#, scheme-format
+msgid "cannot find description for property `~S' (~S)"
+msgstr "impossibile trovare la descrizione per la proprietà \"~S\" (~S)"
+
+#: documentation-lib.scm:205
 #, scheme-format
 msgid "cannot find description for property ~S (~S)"
 msgstr "impossibile trovare la descrizione per la proprietà ~S (~S)"
@@ -3047,23 +3110,23 @@ msgstr "Scrittura di ~a..."
 msgid "symbol ~S redefined"
 msgstr "simbolo ~S ridefinito"
 
-#: paper.scm:115
+#: paper.scm:117
 msgid "set-global-staff-size: not in toplevel scope"
 msgstr "set-global-staff-size: non è nell'ambito di livello più alto"
 
-#: paper.scm:296
+#: paper.scm:301
 #, scheme-format
 msgid "This is not a \\layout {} object, ~S"
 msgstr "Questo non è un oggetto \\layout {}, ~S"
 
-#: paper.scm:308
+#: paper.scm:313
 #, scheme-format
 msgid "Unknown paper size: ~a"
 msgstr "Dimensione del foglio sconosciuta: ~a"
 
 #. TODO: should raise (generic) exception with throw, and catch
 #. that in parse-scm.cc
-#: paper.scm:323
+#: paper.scm:328
 msgid "Must use #(set-paper-size .. ) within \\paper { ... }"
 msgstr "Si deve usare #(set-paper-size .. ) all'interno di \\paper { ... }"
 
@@ -3085,20 +3148,20 @@ msgstr "impossibile trovare ~A"
 msgid "wrong type for argument ~a.  Expecting ~a, found ~s"
 msgstr "tipo di argomento errato per ~a. Previsto ~a, trovato ~s"
 
-#: lily.scm:716
+#: lily.scm:710
 msgid "Compilation successfully completed"
 msgstr "Compilazione completata con successo"
 
-#: lily.scm:717
+#: lily.scm:711
 msgid "Compilation completed with warnings or errors"
 msgstr "Compilazione completata con avvertimenti o errori"
 
-#: lily.scm:779
+#: lily.scm:773
 #, scheme-format
 msgid "job ~a terminated with signal: ~a"
 msgstr "il lavoro ~a è terminato col segnale ~a"
 
-#: lily.scm:782
+#: lily.scm:776
 #, scheme-format
 msgid ""
 "logfile ~a (exit ~a):\n"
@@ -3107,17 +3170,17 @@ msgstr ""
 "file di registro ~a (uscita ~a):\n"
 "~a"
 
-#: lily.scm:804 lily.scm:882
+#: lily.scm:798 lily.scm:876
 #, scheme-format
 msgid "failed files: ~S"
 msgstr "errore nei file: ~S"
 
-#: lily.scm:873
+#: lily.scm:867
 #, scheme-format
 msgid "Redirecting output to ~a..."
 msgstr "Redirezione dell'output verso ~a..."
 
-#: lily.scm:892
+#: lily.scm:886
 #, scheme-format
 msgid "Invoking `~a'...\n"
 msgstr "Chiamata di «~a»...\n"
@@ -3240,12 +3303,12 @@ msgstr "compatibilità col vecchio modo relativo non utilizzata"
 msgid "Found infinity or nan in output.  Substituting 0.0"
 msgstr "Trovato infinito o un valore non numerico nell'output.  Sostituito con 0.0"
 
-#: output-ps.scm:289 output-svg.scm:550
+#: output-ps.scm:299 output-svg.scm:550
 #, scheme-format
 msgid "unknown line-cap-style: ~S"
 msgstr "line-cap-style sconosciuto: ~S"
 
-#: output-ps.scm:294 output-svg.scm:556
+#: output-ps.scm:304 output-svg.scm:556
 #, scheme-format
 msgid "unknown line-join-style: ~S"
 msgstr "line-join-style sconosciuto: ~S"
@@ -3288,50 +3351,54 @@ msgstr "Utilizzo di \"~a\" per i nomi delle note..."
 msgid "Could not find language `~a'.  Ignoring."
 msgstr "Impossibile trovare il linguaggio \"~a\".  Si ignora."
 
-#: define-music-types.scm:740
+#: define-music-types.scm:747
 #, scheme-format
 msgid "symbol expected: ~S"
 msgstr "simbolo atteso: ~S"
 
-#: define-music-types.scm:743
+#: define-music-types.scm:750
 #, scheme-format
 msgid "cannot find music object: ~S"
 msgstr "impossibile trovare l'oggetto musicale: ~S"
 
-#: define-music-types.scm:762
+#: define-music-types.scm:769
 #, scheme-format
 msgid "unknown repeat type `~S'"
 msgstr "tipo di ripetizione sconosciuto «~S»"
 
-#: define-music-types.scm:763
+#: define-music-types.scm:770
 msgid "See define-music-types.scm for supported repeats"
 msgstr "Si veda define-music-types.scm per le ripetizioni supportate"
 
-#: translation-functions.scm:341
+#: translation-functions.scm:350
 #, scheme-format
 msgid "Negative fret for pitch ~a on string ~a"
 msgstr "Tasto negativo per l'altezza ~a sulla corda ~a"
 
-#: translation-functions.scm:385
+#: translation-functions.scm:401
 #, scheme-format
 msgid "No open string for pitch ~a"
 msgstr "Nessuna corda a vuoto per l'altezza ~a"
 
-#: translation-functions.scm:400
+#: translation-functions.scm:416 translation-functions.scm:428
 #, scheme-format
 msgid "Requested string for pitch requires negative fret: string ~a pitch ~a"
 msgstr "La corda richiesta per questa altezza necessita un tasto negativo: corda ~a altezza ~a"
 
-#: translation-functions.scm:401
-msgid "Ignoring string request."
-msgstr "Ignorata la richiesta di questa corda."
+#: translation-functions.scm:419
+msgid "Ignoring string request and recalculating."
+msgstr "Ignorata la richiesta di questa corda, viene ricalcolata."
+
+#: translation-functions.scm:431
+msgid "Ignoring note in tablature."
+msgstr "Ignorata la nota nell'intavolatura."
 
-#: translation-functions.scm:414
+#: translation-functions.scm:454
 #, scheme-format
 msgid "No string for pitch ~a (given frets ~a)"
 msgstr "Nessuna corda per l'altezza ~a (se i tasti sono ~a)"
 
-#: translation-functions.scm:515
+#: translation-functions.scm:559
 #, scheme-format
 msgid ""
 "No label for fret ~a (on string ~a);\n"
@@ -3360,7 +3427,7 @@ msgstr "impossibile realizzare l'integrazione ~S=~S"
 msgid "do not know how to embed font ~s ~s ~s"
 msgstr "non so come inserire il tipo di carattere ~s ~s ~s"
 
-#: framework-ps.scm:669
+#: framework-ps.scm:686
 msgid ""
 "\n"
 "The PostScript backend does not support the\n"
@@ -3397,7 +3464,7 @@ msgstr "Più alternative che ripetizioni.  Vengono tralasciate le alternative in
 msgid "invalid tremolo repeat count: ~a"
 msgstr "numero di ripetizioni di tremolo non valido: ~a"
 
-#: music-functions.scm:618
+#: music-functions.scm:619
 #, scheme-format
 msgid "music expected: ~S"
 msgstr "musica attesa: ~S"
@@ -3408,21 +3475,21 @@ msgstr "musica attesa: ~S"
 msgid "Bar check failed.  Expect to be at ~a, instead at ~a"
 msgstr "Controllo di battuta fallito.  Avrebbe dovuto trovarsi a ~a invece che a ~a"
 
-#: music-functions.scm:846
+#: music-functions.scm:845
 #, scheme-format
 msgid "cannot find quoted music: `~S'"
 msgstr "impossibile trovare la musica citata: «~S»"
 
-#: music-functions.scm:982
+#: music-functions.scm:979
 msgid "Add @var{octave-shift} to the octave of @var{pitch}."
 msgstr "Aggiungere @var{octave-shift} all'ottava di @var{altezza}."
 
-#: music-functions.scm:1037
+#: music-functions.scm:1039
 #, scheme-format
 msgid "Unknown octaveness type: ~S "
 msgstr "Tipo di ottava sconosciuto: ~S "
 
-#: music-functions.scm:1038
+#: music-functions.scm:1040
 msgid "Defaulting to 'any-octave."
 msgstr "Applicazione del valore predefinito 'any-octave."
 
@@ -3470,26 +3537,26 @@ msgstr "Non è un comando di tipo \"markup\": ~A"
 msgid "~a exited with status: ~S"
 msgstr "~a è terminato con stato ~S"
 
-#: define-markup-commands.scm:803
+#: define-markup-commands.scm:883
 msgid "no systems found in \\score markup, does it have a \\layout block?"
 msgstr "non si è trovato alcun sistema nella marcatura \\score, contiene un blocco \\layout?"
 
-#: define-markup-commands.scm:2404
+#: define-markup-commands.scm:2561
 #, scheme-format
 msgid "Cannot find glyph ~a"
 msgstr "Impossibile trovare il glifo ~a"
 
-#: define-markup-commands.scm:2830
+#: define-markup-commands.scm:2987
 #, scheme-format
 msgid "no brace found for point size ~S "
 msgstr "non c'è una graffa che abbia una dimensione di ~S punti"
 
-#: define-markup-commands.scm:2831
+#: define-markup-commands.scm:2988
 #, scheme-format
 msgid "defaulting to ~S pt"
 msgstr "si applica la dimensione predefinita ~S pt"
 
-#: define-markup-commands.scm:2984
+#: define-markup-commands.scm:3141
 #, scheme-format
 msgid "not a valid duration string: ~a"
 msgstr "non è una durata valida per la stringa: ~a"
@@ -3840,10 +3907,6 @@ msgstr "Operazione di proprietà non valida: ~a"
 #~ msgid "from musical definition: %s"
 #~ msgstr "della definizione musicale: %s"
 
-#, fuzzy
-#~ msgid "cannot find start of phrasing slur"
-#~ msgstr "non trovo le estremità di %s"
-
 #, fuzzy
 #~ msgid "unterminated pedal bracket"
 #~ msgstr "beam non terminato"
index 0ff656e5b5359db41981653971185f580ba00b9c..4be4f86ea6489cc970b5f059c5655c711522c471 100644 (file)
@@ -1,12 +1,12 @@
 # Translation of LilyPond.
-# Copyright (C) 1998--2011 Han-Wen Nienhuys, Jan Nieuwenhuizen
-# This file is distributed under the same license as the lilypond package.
+# Copyright (C) 998--2011 Han-Wen Nienhuys, Jan Nieuwenhuizen
+# This file is distributed under the same license as the PACKAGE package.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: lilypond 2.13.53\n"
+"Project-Id-Version: 2.15.8\n"
 "Report-Msgid-Bugs-To: http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs\n"
-"POT-Creation-Date: 2011-03-02 10:34+0100\n"
+"POT-Creation-Date: 2011-08-02 19:43+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -83,8 +83,8 @@ msgstr ""
 msgid "%s has been replaced by %s"
 msgstr ""
 
-#: convertrules.py:24 lilylib.py:78 musicexp.py:17 convert-ly.py:64 warn.cc:66
-#: input.cc:109
+#: convertrules.py:24 lilylib.py:85 musicexp.py:17 convert-ly.py:64 warn.cc:66
+#: input.cc:108
 #, c-format, python-format
 msgid "warning: %s"
 msgstr ""
@@ -104,6 +104,7 @@ msgstr ""
 
 #: convertrules.py:86 convertrules.py:1905 convertrules.py:2084
 #: convertrules.py:2236 convertrules.py:2566 convertrules.py:2862
+#: convertrules.py:3206
 msgid "bump version for release"
 msgstr ""
 
@@ -683,6 +684,26 @@ msgid ""
 "instrument.\n"
 msgstr ""
 
+#: convertrules.py:3211
+msgid "Change in internal property for MultiMeasureRest"
+msgstr ""
+
+#: convertrules.py:3214
+msgid ""
+"use-breve-rest.  This internal property has been replaced by round-to-longer-"
+"rest and usable-duration-logs.\n"
+msgstr ""
+
+#: convertrules.py:3219
+msgid "Handling of non-automatic footnotes."
+msgstr ""
+
+#: convertrules.py:3223
+msgid ""
+"If you are using non-automatic footnotes, make sure to set footnote-auto-"
+"numbering = ##f in the paper block.\n"
+msgstr ""
+
 #: book_base.py:24
 #, python-format
 msgid "file not found: %s"
@@ -692,23 +713,28 @@ msgstr ""
 msgid "Output function not implemented"
 msgstr ""
 
-#: lilylib.py:81 musicxml.py:13 convert-ly.py:67 warn.cc:72 input.cc:115
-#: input.cc:123
+#: lilylib.py:88 musicxml.py:13 convert-ly.py:67 warn.cc:72 input.cc:114
+#: input.cc:122
 #, c-format, python-format
 msgid "error: %s"
 msgstr ""
 
-#: lilylib.py:124 lilylib.py:175
+#: lilylib.py:131
+#, python-format
+msgid "Processing %s.ly"
+msgstr ""
+
+#: lilylib.py:135 lilylib.py:198
 #, python-format
 msgid "Invoking `%s'"
 msgstr ""
 
-#: lilylib.py:126 lilylib.py:177
+#: lilylib.py:137 lilylib.py:200
 #, python-format
 msgid "Running %s..."
 msgstr ""
 
-#: lilylib.py:253
+#: lilylib.py:276
 #, python-format
 msgid "Usage: %s"
 msgstr ""
@@ -771,135 +797,135 @@ msgstr ""
 msgid "cannot find \\begin{document} in LaTeX document"
 msgstr ""
 
-#: musicxml2ly.py:223
+#: musicxml2ly.py:224
 #, python-format
 msgid ""
 "Encountered file created by %s, containing wrong beaming information. All "
 "beaming information in the MusicXML file will be ignored"
 msgstr ""
 
-#: musicxml2ly.py:239 musicxml2ly.py:241
+#: musicxml2ly.py:240 musicxml2ly.py:242
 #, python-format
 msgid "Unprocessed PartGroupInfo %s encountered"
 msgstr ""
 
-#: musicxml2ly.py:494
+#: musicxml2ly.py:495
 #, python-format
 msgid "Encountered note at %s without type and duration (=%s)"
 msgstr ""
 
-#: musicxml2ly.py:514
+#: musicxml2ly.py:515
 #, python-format
 msgid ""
 "Encountered rational duration with denominator %s, unable to convert to "
 "lilypond duration"
 msgstr ""
 
-#: musicxml2ly.py:761
+#: musicxml2ly.py:762
 msgid "Unable to extract key signature!"
 msgstr ""
 
-#: musicxml2ly.py:788
+#: musicxml2ly.py:789
 #, python-format
 msgid "unknown mode %s, expecting 'major' or 'minor' or a church mode!"
 msgstr ""
 
-#: musicxml2ly.py:926
+#: musicxml2ly.py:927
 #, python-format
 msgid "Encountered unprocessed marker %s\n"
 msgstr ""
 
-#: musicxml2ly.py:1020
+#: musicxml2ly.py:1021
 #, python-format
 msgid "unknown span event %s"
 msgstr ""
 
-#: musicxml2ly.py:1030
+#: musicxml2ly.py:1031
 #, python-format
 msgid "unknown span type %s for %s"
 msgstr ""
 
-#: musicxml2ly.py:1450
+#: musicxml2ly.py:1451
 msgid "Unknown metronome mark, ignoring"
 msgstr ""
 
 #. TODO: Implement the other (more complex) way for tempo marks!
-#: musicxml2ly.py:1455
+#: musicxml2ly.py:1456
 msgid ""
 "Metronome marks with complex relations (<metronome-note> in MusicXML) are "
 "not yet implemented."
 msgstr ""
 
-#: musicxml2ly.py:1657
+#: musicxml2ly.py:1658
 #, python-format
 msgid "Unable to convert chord type %s to lilypond."
 msgstr ""
 
-#: musicxml2ly.py:1806
+#: musicxml2ly.py:1807
 #, python-format
 msgid "drum %s type unknown, please add to instrument_drumtype_dict"
 msgstr ""
 
-#: musicxml2ly.py:1810
+#: musicxml2ly.py:1811
 msgid "cannot find suitable event"
 msgstr ""
 
-#: musicxml2ly.py:1958
+#: musicxml2ly.py:1959
 #, python-format
 msgid "Negative skip %s (from position %s to %s)"
 msgstr ""
 
-#: musicxml2ly.py:2099
+#: musicxml2ly.py:2100
 #, python-format
 msgid "Negative skip found: from %s to %s, difference is %s"
 msgstr ""
 
-#: musicxml2ly.py:2180
+#: musicxml2ly.py:2181
 #, python-format
 msgid "unexpected %s; expected %s or %s or %s"
 msgstr ""
 
-#: musicxml2ly.py:2286
+#: musicxml2ly.py:2287
 msgid "Encountered closing slur, but no slur is open"
 msgstr ""
 
-#: musicxml2ly.py:2289
+#: musicxml2ly.py:2290
 msgid "Cannot have two simultaneous (closing) slurs"
 msgstr ""
 
-#: musicxml2ly.py:2298
+#: musicxml2ly.py:2299
 msgid "Cannot have a slur inside another slur"
 msgstr ""
 
-#: musicxml2ly.py:2301
+#: musicxml2ly.py:2302
 msgid "Cannot have two simultaneous slurs"
 msgstr ""
 
-#: musicxml2ly.py:2435
+#: musicxml2ly.py:2436
 #, python-format
 msgid "cannot simultaneously have more than one mode: %s"
 msgstr ""
 
-#: musicxml2ly.py:2543
+#: musicxml2ly.py:2544
 msgid "Converting to LilyPond expressions..."
 msgstr ""
 
-#: musicxml2ly.py:2554
+#: musicxml2ly.py:2555
 msgid "musicxml2ly [OPTION]... FILE.xml"
 msgstr ""
 
-#: musicxml2ly.py:2556
+#: musicxml2ly.py:2557
 msgid ""
 "Convert MusicXML from FILE.xml to LilyPond input.\n"
 "If the given filename is -, musicxml2ly reads from the command line.\n"
 msgstr ""
 
-#: musicxml2ly.py:2562 midi2ly.py:987 abc2ly.py:1386 lilypond-book.py:140
-#: convert-ly.py:98 etf2ly.py:1202 main.cc:157
+#: musicxml2ly.py:2563 midi2ly.py:1060 abc2ly.py:1386 lilypond-book.py:140
+#: convert-ly.py:98 etf2ly.py:1202 main.cc:159
 msgid "show this help and exit"
 msgstr ""
 
-#: musicxml2ly.py:2566
+#: musicxml2ly.py:2567
 msgid ""
 "Copyright (c) 2005--2011 by\n"
 "    Han-Wen Nienhuys <hanwen@xs4all.nl>,\n"
@@ -907,62 +933,62 @@ msgid ""
 "    Reinhold Kainhofer <reinhold@kainhofer.com>\n"
 msgstr ""
 
-#: musicxml2ly.py:2580 midi2ly.py:1015 abc2ly.py:1382 lilypond-book.py:212
-#: convert-ly.py:94 etf2ly.py:1206 main.cc:168
+#: musicxml2ly.py:2581 midi2ly.py:1091 abc2ly.py:1382 lilypond-book.py:217
+#: convert-ly.py:94 etf2ly.py:1206 main.cc:174
 msgid "show version number and exit"
 msgstr ""
 
-#: musicxml2ly.py:2585 midi2ly.py:1009 lilypond-book.py:204 main.cc:169
+#: musicxml2ly.py:2586 midi2ly.py:1085 lilypond-book.py:209 main.cc:175
 msgid "be verbose"
 msgstr ""
 
-#: musicxml2ly.py:2591
+#: musicxml2ly.py:2592
 msgid "use lxml.etree; uses less memory and cpu time"
 msgstr ""
 
-#: musicxml2ly.py:2597
+#: musicxml2ly.py:2598
 msgid "input file is a zip-compressed MusicXML file"
 msgstr ""
 
-#: musicxml2ly.py:2603
+#: musicxml2ly.py:2604
 msgid "convert pitches in relative mode (default)"
 msgstr ""
 
-#: musicxml2ly.py:2608
+#: musicxml2ly.py:2609
 msgid "convert pitches in absolute mode"
 msgstr ""
 
-#: musicxml2ly.py:2611
+#: musicxml2ly.py:2612
 msgid "LANG"
 msgstr ""
 
-#: musicxml2ly.py:2613
+#: musicxml2ly.py:2614
 msgid "use LANG for pitch names, e.g. 'deutsch' for note names in German"
 msgstr ""
 
-#: musicxml2ly.py:2619
+#: musicxml2ly.py:2620
 msgid "do not convert directions (^, _ or -) for articulations, dynamics, etc."
 msgstr ""
 
-#: musicxml2ly.py:2625
+#: musicxml2ly.py:2626
 msgid "do not convert exact vertical positions of rests"
 msgstr ""
 
-#: musicxml2ly.py:2631
+#: musicxml2ly.py:2632
 msgid "do not convert the exact page layout and breaks"
 msgstr ""
 
-#: musicxml2ly.py:2637
+#: musicxml2ly.py:2638
 msgid ""
 "do not convert beaming information, use lilypond's automatic beaming instead"
 msgstr ""
 
-#: musicxml2ly.py:2640 midi2ly.py:992 midi2ly.py:997 etf2ly.py:1208
-#: main.cc:161 main.cc:166
+#: musicxml2ly.py:2641 midi2ly.py:1065 midi2ly.py:1070 etf2ly.py:1208
+#: main.cc:165 main.cc:172
 msgid "FILE"
 msgstr ""
 
-#: musicxml2ly.py:2645
+#: musicxml2ly.py:2646
 msgid "set output filename to FILE, stdout if -"
 msgstr ""
 
@@ -970,147 +996,159 @@ msgstr ""
 #. "Report bugs in English via %s",
 #. or if there is a LilyPond users list or forum in your language
 #. "Report bugs in English via %s or in YOUR_LANG via URI"
-#: musicxml2ly.py:2648 midi2ly.py:1028 abc2ly.py:1395 lilypond-book.py:234
-#: convert-ly.py:144 etf2ly.py:1216 main.cc:281
+#: musicxml2ly.py:2649 midi2ly.py:1104 abc2ly.py:1395 lilypond-book.py:239
+#: convert-ly.py:144 etf2ly.py:1216 main.cc:285
 #, c-format, python-format
 msgid "Report bugs via %s"
 msgstr ""
 
-#: musicxml2ly.py:2728
+#: musicxml2ly.py:2729
 #, python-format
 msgid "unknown part in part-list: %s"
 msgstr ""
 
-#: musicxml2ly.py:2790
+#: musicxml2ly.py:2791
 msgid "Input is compressed, extracting raw MusicXML data from stdin"
 msgstr ""
 
-#: musicxml2ly.py:2793
+#: musicxml2ly.py:2804
 #, python-format
 msgid "Input file %s is compressed, extracting raw MusicXML data"
 msgstr ""
 
-#: musicxml2ly.py:2823
+#: musicxml2ly.py:2834
 msgid "Reading MusicXML from Standard input ..."
 msgstr ""
 
-#: musicxml2ly.py:2825
+#: musicxml2ly.py:2836
 #, python-format
 msgid "Reading MusicXML from %s ..."
 msgstr ""
 
-#: musicxml2ly.py:2858
+#: musicxml2ly.py:2869
 #, python-format
 msgid "Output to `%s'"
 msgstr ""
 
-#: musicxml2ly.py:2925
+#: musicxml2ly.py:2936
 #, python-format
 msgid "Unable to find input file %s"
 msgstr ""
 
-#: midi2ly.py:90 lilypond-book.py:116 convert-ly.py:81 etf2ly.py:1189
+#: midi2ly.py:81 lilypond-book.py:116 convert-ly.py:81 etf2ly.py:1189
 #, python-format
 msgid "Copyright (c) %s by"
 msgstr ""
 
-#: midi2ly.py:92 lilypond-book.py:118 convert-ly.py:83 etf2ly.py:1191
+#: midi2ly.py:83 lilypond-book.py:118 convert-ly.py:83 etf2ly.py:1191
 msgid "Distributed under terms of the GNU General Public License."
 msgstr ""
 
-#: midi2ly.py:93 lilypond-book.py:119 convert-ly.py:84 etf2ly.py:1192
+#: midi2ly.py:84 lilypond-book.py:119 convert-ly.py:84 etf2ly.py:1192
 msgid "It comes with NO WARRANTY."
 msgstr ""
 
-#: midi2ly.py:99
+#: midi2ly.py:90
 msgid "warning: "
 msgstr ""
 
-#: midi2ly.py:102 midi2ly.py:1041
+#: midi2ly.py:93 midi2ly.py:1121
 msgid "error: "
 msgstr ""
 
-#: midi2ly.py:103
+#: midi2ly.py:94
 msgid "Exiting... "
 msgstr ""
 
-#: midi2ly.py:960
+#: midi2ly.py:834
+msgid "found more than 5 voices on a staff, expect bad output"
+msgstr ""
+
+#: midi2ly.py:1030
 #, python-format
 msgid "%s output to `%s'..."
 msgstr ""
 
-#: midi2ly.py:972 abc2ly.py:1373 lilypond-book.py:122 convert-ly.py:87
+#: midi2ly.py:1042 abc2ly.py:1373 lilypond-book.py:122 convert-ly.py:87
 #, python-format
 msgid "%s [OPTION]... FILE"
 msgstr ""
 
-#: midi2ly.py:973
+#: midi2ly.py:1043
 #, python-format
 msgid "Convert %s to LilyPond input.\n"
 msgstr ""
 
-#: midi2ly.py:978
+#: midi2ly.py:1048
 msgid "print absolute pitches"
 msgstr ""
 
-#: midi2ly.py:980 midi2ly.py:1002
+#: midi2ly.py:1050 midi2ly.py:1075
 msgid "DUR"
 msgstr ""
 
-#: midi2ly.py:981
+#: midi2ly.py:1051
 msgid "quantise note durations on DUR"
 msgstr ""
 
-#: midi2ly.py:984
+#: midi2ly.py:1054
+msgid "debug printing"
+msgstr ""
+
+#: midi2ly.py:1057
 msgid "print explicit durations"
 msgstr ""
 
-#: midi2ly.py:989
+#: midi2ly.py:1062
 msgid "prepend FILE to output"
 msgstr ""
 
-#: midi2ly.py:993
+#: midi2ly.py:1066
 msgid "set key: ALT=+sharps|-flats; MINOR=1"
 msgstr ""
 
-#: midi2ly.py:994
+#: midi2ly.py:1067
 msgid "ALT[:MINOR]"
 msgstr ""
 
-#: midi2ly.py:996 abc2ly.py:1388 etf2ly.py:1207
+#: midi2ly.py:1069 abc2ly.py:1388 etf2ly.py:1207
 msgid "write output to FILE"
 msgstr ""
 
-#: midi2ly.py:999
+#: midi2ly.py:1072
 msgid "preview of first 4 bars"
 msgstr ""
 
-#: midi2ly.py:1001
+#: midi2ly.py:1074
 msgid "quantise note starts on DUR"
 msgstr ""
 
-#: midi2ly.py:1004
+#: midi2ly.py:1078
+msgid "use s instead of r for rests"
+msgstr ""
+
+#: midi2ly.py:1080
 msgid "DUR*NUM/DEN"
 msgstr ""
 
-#: midi2ly.py:1007
+#: midi2ly.py:1083
 msgid "allow tuplet durations DUR*NUM/DEN"
 msgstr ""
 
-#: midi2ly.py:1016 lilypond-book.py:215 convert-ly.py:139 etf2ly.py:1210
-#: main.cc:170
+#: midi2ly.py:1092 lilypond-book.py:220 convert-ly.py:139 etf2ly.py:1210
+#: main.cc:176
 msgid "show warranty and copyright"
 msgstr ""
 
-#: midi2ly.py:1019
+#: midi2ly.py:1095
 msgid "treat every text as a lyric"
 msgstr ""
 
-#: midi2ly.py:1022
+#: midi2ly.py:1098
 msgid "Examples"
 msgstr ""
 
-#: midi2ly.py:1042
+#: midi2ly.py:1122
 msgid "no files specified on command line."
 msgstr ""
 
@@ -1169,7 +1207,7 @@ msgid "add DIR to include path"
 msgstr ""
 
 #: lilypond-book.py:143 lilypond-book.py:150 lilypond-book.py:163
-#: lilypond-book.py:173 lilypond-book.py:189 lilypond-book.py:195 main.cc:160
+#: lilypond-book.py:173 lilypond-book.py:194 lilypond-book.py:200 main.cc:164
 msgid "DIR"
 msgstr ""
 
@@ -1211,87 +1249,91 @@ msgstr ""
 msgid "process ly_files using COMMAND FILE..."
 msgstr ""
 
-#: lilypond-book.py:182
+#: lilypond-book.py:183
+msgid "Redirect the lilypond output"
+msgstr ""
+
+#: lilypond-book.py:187
 msgid "Compile snippets in safe mode"
 msgstr ""
 
-#: lilypond-book.py:188
+#: lilypond-book.py:193
 msgid "do not fail if no lilypond output is found"
 msgstr ""
 
-#: lilypond-book.py:194
+#: lilypond-book.py:199
 msgid "do not fail if no PNG images are found for EPS files"
 msgstr ""
 
-#: lilypond-book.py:200
+#: lilypond-book.py:205
 msgid "write snippet output files with the same base name as their source file"
 msgstr ""
 
-#: lilypond-book.py:220
+#: lilypond-book.py:225
 msgid ""
 "run executable PROG instead of latex, or in\n"
 "case --pdf option is set instead of pdflatex"
 msgstr ""
 
-#: lilypond-book.py:222
+#: lilypond-book.py:227
 msgid "PROG"
 msgstr ""
 
-#: lilypond-book.py:228
+#: lilypond-book.py:233
 msgid "create PDF files for use with PDFTeX"
 msgstr ""
 
-#: lilypond-book.py:419
+#: lilypond-book.py:428
 msgid "Writing snippets..."
 msgstr ""
 
-#: lilypond-book.py:425
+#: lilypond-book.py:434
 msgid "Processing..."
 msgstr ""
 
-#: lilypond-book.py:431
+#: lilypond-book.py:440
 msgid "All snippets are up to date..."
 msgstr ""
 
-#: lilypond-book.py:452
+#: lilypond-book.py:461
 #, python-format
 msgid "cannot determine format for: %s"
 msgstr ""
 
-#: lilypond-book.py:461
+#: lilypond-book.py:470
 #, python-format
 msgid "%s is up to date."
 msgstr ""
 
-#: lilypond-book.py:475
+#: lilypond-book.py:484
 #, python-format
 msgid "Writing `%s'..."
 msgstr ""
 
-#: lilypond-book.py:537
+#: lilypond-book.py:546
 msgid "Output would overwrite input file; use --output."
 msgstr ""
 
-#: lilypond-book.py:541
+#: lilypond-book.py:550
 #, python-format
 msgid "Reading %s..."
 msgstr ""
 
-#: lilypond-book.py:549
+#: lilypond-book.py:558
 msgid "Dissecting..."
 msgstr ""
 
-#: lilypond-book.py:561
+#: lilypond-book.py:570
 #, python-format
 msgid "Compiling %s..."
 msgstr ""
 
-#: lilypond-book.py:570
+#: lilypond-book.py:579
 #, python-format
 msgid "Processing include: %s"
 msgstr ""
 
-#: lilypond-book.py:582
+#: lilypond-book.py:591
 #, python-format
 msgid "Removing `%s'"
 msgstr ""
@@ -1397,7 +1439,7 @@ msgstr ""
 msgid "success: %s"
 msgstr ""
 
-#: warn.cc:86 grob.cc:617 input.cc:97
+#: warn.cc:86 grob.cc:613 input.cc:97
 #, c-format
 msgid "programming error: %s"
 msgstr ""
@@ -1442,7 +1484,7 @@ msgstr ""
 msgid "Vaticana_ligature: zero join (delta_pitch == 0)"
 msgstr ""
 
-#: parse-scm.cc:101
+#: parse-scm.cc:100
 msgid "GUILE signaled an error for the expression beginning here"
 msgstr ""
 
@@ -1451,15 +1493,15 @@ msgid "rhythmic head is not part of a rhythmic column"
 msgstr ""
 
 #. if we get to here, just put everything on one line
-#: constrained-breaking.cc:189 constrained-breaking.cc:207
+#: constrained-breaking.cc:187 constrained-breaking.cc:205
 msgid "cannot find line breaking that satisfies constraints"
 msgstr ""
 
-#: horizontal-bracket-engraver.cc:78
+#: horizontal-bracket-engraver.cc:62
 msgid "do not have that many brackets"
 msgstr ""
 
-#: horizontal-bracket-engraver.cc:87
+#: horizontal-bracket-engraver.cc:71
 msgid "conflicting note group events"
 msgstr ""
 
@@ -1471,28 +1513,28 @@ msgstr ""
 msgid "unterminated hyphen; removing"
 msgstr ""
 
-#: pango-font.cc:187 open-type-font.cc:319
+#: pango-font.cc:189 open-type-font.cc:318
 #, c-format
 msgid "FT_Get_Glyph_Name () error: %s"
 msgstr ""
 
-#: pango-font.cc:204
+#: pango-font.cc:205
 #, c-format
 msgid ""
 "Glyph has no name, but font supports glyph naming.\n"
 "Skipping glyph U+%0X, file %s"
 msgstr ""
 
-#: pango-font.cc:241
+#: pango-font.cc:242
 #, c-format
 msgid "no PostScript font name for font `%s'"
 msgstr ""
 
-#: pango-font.cc:290
+#: pango-font.cc:291
 msgid "FreeType face has no PostScript font name"
 msgstr ""
 
-#: midi-item.cc:92
+#: midi-item.cc:89
 #, c-format
 msgid "no such MIDI instrument: `%s'"
 msgstr ""
@@ -1501,7 +1543,7 @@ msgstr ""
 msgid "NoteEvent without pitch"
 msgstr ""
 
-#: rest.cc:159
+#: rest.cc:160
 #, c-format
 msgid "rest `%s' not found"
 msgstr ""
@@ -1519,7 +1561,7 @@ msgstr ""
 msgid "unterminated beam"
 msgstr ""
 
-#: beam-engraver.cc:266 chord-tremolo-engraver.cc:150
+#: beam-engraver.cc:266 chord-tremolo-engraver.cc:149
 msgid "stem must have Rhythmic structure"
 msgstr ""
 
@@ -1531,26 +1573,26 @@ msgstr ""
 msgid "beam was started here"
 msgstr ""
 
-#: music-iterator.cc:182
+#: music-iterator.cc:181
 msgid "Sending non-event to context"
 msgstr ""
 
-#: context.cc:149
+#: context.cc:148
 #, c-format
 msgid "cannot find or create new `%s'"
 msgstr ""
 
-#: context.cc:207
+#: context.cc:206
 #, c-format
 msgid "cannot find or create `%s' called `%s'"
 msgstr ""
 
-#: context.cc:269
+#: context.cc:268
 #, c-format
 msgid "Invalid CreateContext event: Cannot create %s context"
 msgstr ""
 
-#: context.cc:400
+#: context.cc:399
 #, c-format
 msgid "cannot find or create: `%s'"
 msgstr ""
@@ -1570,11 +1612,11 @@ msgid ""
 "checks?"
 msgstr ""
 
-#: tie-engraver.cc:116
+#: tie-engraver.cc:117
 msgid "unterminated tie"
 msgstr ""
 
-#: tie-engraver.cc:312
+#: tie-engraver.cc:348
 msgid "lonely tie"
 msgstr ""
 
@@ -1654,27 +1696,27 @@ msgid ""
 "or the ligatura must be LB or SSB"
 msgstr ""
 
-#: mensural-ligature-engraver.cc:386
+#: mensural-ligature-engraver.cc:387
 msgid "unexpected case fall-through"
 msgstr ""
 
-#: piano-pedal-engraver.cc:298
+#: piano-pedal-engraver.cc:296
 #, c-format
 msgid "expect 3 strings for piano pedals, found: %ld"
 msgstr ""
 
-#: piano-pedal-engraver.cc:313 piano-pedal-engraver.cc:324
+#: piano-pedal-engraver.cc:311 piano-pedal-engraver.cc:322
 #: piano-pedal-performer.cc:104
 #, c-format
 msgid "cannot find start of piano pedal: `%s'"
 msgstr ""
 
-#: piano-pedal-engraver.cc:359
+#: piano-pedal-engraver.cc:357
 #, c-format
 msgid "cannot find start of piano pedal bracket: `%s'"
 msgstr ""
 
-#: input.cc:131 source-file.cc:179 source-file.cc:194
+#: input.cc:130 source-file.cc:178 source-file.cc:193
 msgid "position unknown"
 msgstr ""
 
@@ -1683,28 +1725,28 @@ msgstr ""
 msgid "Layout output to `%s'..."
 msgstr ""
 
-#: general-scheme.cc:306
+#: general-scheme.cc:305
 msgid "infinity or NaN encountered while converting Real number"
 msgstr ""
 
-#: general-scheme.cc:307
+#: general-scheme.cc:306
 msgid "setting to zero"
 msgstr ""
 
-#: general-scheme.cc:543
+#: general-scheme.cc:540
 msgid "Found infinity or nan in output. Substituting 0.0"
 msgstr ""
 
-#: music.cc:151
+#: music.cc:150
 #, c-format
 msgid "octave check failed; expected \"%s\", found: \"%s\""
 msgstr ""
 
-#: music.cc:219
+#: music.cc:218
 msgid "(normalized pitch)"
 msgstr ""
 
-#: music.cc:223
+#: music.cc:222
 #, c-format
 msgid "Transposing %s by %s makes alteration larger than double"
 msgstr ""
@@ -1718,15 +1760,15 @@ msgstr ""
 msgid "trying to use \\partial after the start of a piece"
 msgstr ""
 
-#: new-fingering-engraver.cc:106
+#: new-fingering-engraver.cc:105
 msgid "cannot add text scripts to individual note heads"
 msgstr ""
 
-#: new-fingering-engraver.cc:250
+#: new-fingering-engraver.cc:249
 msgid "no placement found for fingerings"
 msgstr ""
 
-#: new-fingering-engraver.cc:251
+#: new-fingering-engraver.cc:250
 msgid "placing below"
 msgstr ""
 
@@ -1746,15 +1788,15 @@ msgstr ""
 msgid "no left bound"
 msgstr ""
 
-#: ligature-engraver.cc:185
+#: ligature-engraver.cc:184
 msgid "unterminated ligature"
 msgstr ""
 
-#: ligature-engraver.cc:214
+#: ligature-engraver.cc:211
 msgid "ignoring rest: ligature may not contain rest"
 msgstr ""
 
-#: ligature-engraver.cc:215
+#: ligature-engraver.cc:212
 msgid "ligature was started here"
 msgstr ""
 
@@ -1763,26 +1805,26 @@ msgstr ""
 msgid "cannot change, already in translator: %s"
 msgstr ""
 
-#: accidental-engraver.cc:180
+#: accidental-engraver.cc:179
 #, c-format
 msgid "accidental typesetting list must begin with context-name: %s"
 msgstr ""
 
-#: accidental-engraver.cc:210
+#: accidental-engraver.cc:209
 #, c-format
 msgid "procedure or context-name expected for accidental rule, found %s"
 msgstr ""
 
-#: ttf.cc:481 ttf.cc:530
+#: ttf.cc:480 ttf.cc:529
 #, c-format
 msgid "font index %d too large for font `%s', using index 0"
 msgstr ""
 
-#: ttf.cc:513 ttf.cc:565
+#: ttf.cc:512 ttf.cc:564
 msgid "font index must be non-negative, using index 0"
 msgstr ""
 
-#: break-alignment-interface.cc:206
+#: break-alignment-interface.cc:199
 #, c-format
 msgid "No spacing entry from %s to `%s'"
 msgstr ""
@@ -1841,7 +1883,7 @@ msgstr ""
 msgid "Aborting"
 msgstr ""
 
-#: note-collision.cc:497
+#: note-collision.cc:494
 msgid "ignoring too many clashing note columns"
 msgstr ""
 
@@ -1862,22 +1904,22 @@ msgstr ""
 msgid "giving up"
 msgstr ""
 
-#: page-layout-problem.cc:322
+#: page-layout-problem.cc:603
 msgid ""
 "cannot fit music on page: ragged-spacing was requested, but page was "
 "compressed"
 msgstr ""
 
-#: page-layout-problem.cc:325
+#: page-layout-problem.cc:606
 #, c-format
 msgid "cannot fit music on page: overflow is %f"
 msgstr ""
 
-#: page-layout-problem.cc:327
+#: page-layout-problem.cc:608
 msgid "compressing music to fit"
 msgstr ""
 
-#: page-layout-problem.cc:765
+#: page-layout-problem.cc:1047
 msgid "staff-affinities should only decrease"
 msgstr ""
 
@@ -1894,42 +1936,41 @@ msgstr ""
 msgid "mark label must be a markup object"
 msgstr ""
 
-#: new-dynamic-engraver.cc:142
+#: new-dynamic-engraver.cc:168
 #, c-format
 msgid ""
 "unknown crescendo style: %s\n"
 "defaulting to hairpin."
 msgstr ""
 
-#: new-dynamic-engraver.cc:200
+#: new-dynamic-engraver.cc:233
 #, c-format
 msgid "unterminated %s"
 msgstr ""
 
-#: stem-engraver.cc:103
+#: stem-engraver.cc:102
 msgid "tremolo duration is too long"
 msgstr ""
 
-#. FIXME:
-#: stem-engraver.cc:140
+#: stem-engraver.cc:154
 #, c-format
-msgid "adding note head to incompatible stem (type = %d)"
+msgid "adding note head to incompatible stem (type = %d/%d)"
 msgstr ""
 
-#: stem-engraver.cc:142
+#: stem-engraver.cc:157
 msgid "maybe input should specify polyphonic voices"
 msgstr ""
 
-#: lily-lexer.cc:264
+#: lily-lexer.cc:265
 msgid "include files are not allowed in safe mode"
 msgstr ""
 
-#: lily-lexer.cc:291
+#: lily-lexer.cc:292
 #, c-format
 msgid "identifier name is a keyword: `%s'"
 msgstr ""
 
-#: lily-lexer.cc:312
+#: lily-lexer.cc:313
 #, c-format
 msgid "error at EOF: %s"
 msgstr ""
@@ -1939,12 +1980,12 @@ msgstr ""
 msgid "cannot find Voice `%s'"
 msgstr ""
 
-#: includable-lexer.cc:71 lily-guile.cc:87 lily-parser-scheme.cc:109
+#: includable-lexer.cc:71 lily-guile.cc:86 lily-parser-scheme.cc:109
 #, c-format
 msgid "cannot find file: `%s'"
 msgstr ""
 
-#: includable-lexer.cc:73 lily-parser-scheme.cc:100
+#: includable-lexer.cc:73 lily-parser-scheme.cc:101
 #, c-format
 msgid "(search path: `%s')"
 msgstr ""
@@ -1958,38 +1999,52 @@ msgid "removing beam with no stems"
 msgstr ""
 
 #. We are completely screwed.
-#: beam.cc:1274
+#: beam.cc:1350
 msgid "no viable initial configuration found: may not find good beam slope"
 msgstr ""
 
-#: slur-engraver.cc:93
+#: staff-performer.cc:257
+msgid "MIDI channel wrapped around"
+msgstr ""
+
+#: staff-performer.cc:258
+msgid "remapping modulo 16"
+msgstr ""
+
+#: slur-engraver.cc:90 phrasing-slur-engraver.cc:89
 #, c-format
 msgid "direction of %s invalid: %d"
 msgstr ""
 
-#: slur-engraver.cc:162
+#: slur-engraver.cc:158
 msgid "unterminated slur"
 msgstr ""
 
-#: slur-engraver.cc:174
+#: slur-engraver.cc:183
 msgid "cannot end slur"
 msgstr ""
 
-#: font-config.cc:40
+#. We already have a slur, so give a warning and completely ignore
+#. the new slur.
+#: slur-engraver.cc:200
+msgid "already have slur"
+msgstr ""
+
+#: font-config.cc:39
 msgid "Initializing FontConfig..."
 msgstr ""
 
-#: font-config.cc:55 font-config-scheme.cc:152
+#: font-config.cc:54 font-config-scheme.cc:151
 #, c-format
 msgid "failed adding font directory: %s"
 msgstr ""
 
-#: font-config.cc:57 font-config-scheme.cc:154
+#: font-config.cc:56 font-config-scheme.cc:153
 #, c-format
 msgid "adding font directory: %s"
 msgstr ""
 
-#: font-config.cc:61
+#: font-config.cc:60
 msgid "Building font database..."
 msgstr ""
 
@@ -2037,27 +2092,27 @@ msgstr ""
 msgid "natural alteration glyph not found"
 msgstr ""
 
-#: system.cc:197
+#: system.cc:201
 #, c-format
 msgid "Element count %d"
 msgstr ""
 
-#: system.cc:303
+#: system.cc:402
 #, c-format
 msgid "Grob count %d"
 msgstr ""
 
-#: slur.cc:362
+#: slur.cc:359
 #, c-format
 msgid "Ignoring grob for slur: %s. avoid-slur not set?"
 msgstr ""
 
-#: font-config-scheme.cc:168
+#: font-config-scheme.cc:167
 #, c-format
 msgid "failed adding font file: %s"
 msgstr ""
 
-#: font-config-scheme.cc:170
+#: font-config-scheme.cc:169
 #, c-format
 msgid "adding font file: %s"
 msgstr ""
@@ -2066,34 +2121,34 @@ msgstr ""
 msgid "decrescendo too small"
 msgstr ""
 
-#: extender-engraver.cc:170 extender-engraver.cc:179
+#: extender-engraver.cc:169 extender-engraver.cc:178
 msgid "unterminated extender"
 msgstr ""
 
-#: lily-guile.cc:89
+#: lily-guile.cc:88
 #, c-format
 msgid "(load path: `%s')"
 msgstr ""
 
-#: lily-guile.cc:437
+#: lily-guile.cc:431
 #, c-format
 msgid "cannot find property type-check for `%s' (%s)."
 msgstr ""
 
-#: lily-guile.cc:440
+#: lily-guile.cc:434
 msgid "perhaps a typing error?"
 msgstr ""
 
-#: lily-guile.cc:447
+#: lily-guile.cc:441
 msgid "doing assignment anyway"
 msgstr ""
 
-#: lily-guile.cc:459
+#: lily-guile.cc:453
 #, c-format
 msgid "type check for `%s' failed; value `%s' must be of type `%s'"
 msgstr ""
 
-#: main.cc:109
+#: main.cc:107
 #, c-format
 msgid ""
 "This program is free software.  It is covered by the GNU General Public\n"
@@ -2102,11 +2157,12 @@ msgid ""
 "information.\n"
 msgstr ""
 
-#: main.cc:115
+#: main.cc:113
 msgid ""
 "    This program is free software; you can redistribute it and/or\n"
-"modify it under the terms of the GNU General Public License version 2\n"
-"as published by the Free Software Foundation.\n"
+"modify it under the terms of the GNU General Public License as \n"
+"published by the Free Software Foundation, either version 3 of\n"
+"the License, or (at your option) any later version.\n"
 "\n"
 "    This program is distributed in the hope that it will be useful,\n"
 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -2119,84 +2175,84 @@ msgid ""
 "Boston, MA 02111-1307, USA.\n"
 msgstr ""
 
-#: main.cc:146
+#: main.cc:147
 msgid "SYM[=VAL]"
 msgstr ""
 
-#: main.cc:147
+#: main.cc:148
 msgid ""
 "set Scheme option SYM to VAL (default: #t).\n"
 "Use -dhelp for help."
 msgstr ""
 
-#: main.cc:150
+#: main.cc:152
 msgid "EXPR"
 msgstr ""
 
-#: main.cc:150
+#: main.cc:152
 msgid "evaluate scheme code"
 msgstr ""
 
 #. Bug in option parser: --output =foe is taken as an abbreviation
 #. for --output-format.
-#: main.cc:153
+#: main.cc:155
 msgid "FORMATs"
 msgstr ""
 
-#: main.cc:153
+#: main.cc:155
 msgid "dump FORMAT,...  Also as separate options:"
 msgstr ""
 
-#: main.cc:154
+#: main.cc:156
 msgid "generate PDF (default)"
 msgstr ""
 
-#: main.cc:155
+#: main.cc:157
 msgid "generate PNG"
 msgstr ""
 
-#: main.cc:156
+#: main.cc:158
 msgid "generate PostScript"
 msgstr ""
 
-#: main.cc:158
+#: main.cc:161
 msgid "FIELD"
 msgstr ""
 
-#: main.cc:158
+#: main.cc:161
 msgid ""
 "dump header field FIELD to file\n"
 "named BASENAME.FIELD"
 msgstr ""
 
-#: main.cc:160
+#: main.cc:164
 msgid "add DIR to search path"
 msgstr ""
 
-#: main.cc:161
+#: main.cc:165
 msgid "use FILE as init file"
 msgstr ""
 
-#: main.cc:163
+#: main.cc:168
 msgid "USER, GROUP, JAIL, DIR"
 msgstr ""
 
-#: main.cc:163
+#: main.cc:168
 msgid ""
 "chroot to JAIL, become USER:GROUP\n"
 "and cd into DIR"
 msgstr ""
 
-#: main.cc:166
+#: main.cc:172
 msgid "write output to FILE (suffix will be added)"
 msgstr ""
 
-#: main.cc:167
+#: main.cc:173
 msgid "relocate using directory of lilypond program"
 msgstr ""
 
 #. Do not update the copyright years here, run `make grand-replace'
-#: main.cc:238
+#: main.cc:242
 #, c-format
 msgid ""
 "Copyright (c) %s by\n"
@@ -2204,84 +2260,84 @@ msgid ""
 msgstr ""
 
 #. No version number or newline here.  It confuses help2man.
-#: main.cc:265
+#: main.cc:269
 #, c-format
 msgid "Usage: %s [OPTION]... FILE..."
 msgstr ""
 
-#: main.cc:267
+#: main.cc:271
 msgid "Typeset music and/or produce MIDI from FILE."
 msgstr ""
 
-#: main.cc:269
+#: main.cc:273
 msgid "LilyPond produces beautiful music notation."
 msgstr ""
 
-#: main.cc:271
+#: main.cc:275
 #, c-format
 msgid "For more information, see %s"
 msgstr ""
 
-#: main.cc:273
+#: main.cc:277
 msgid "Options:"
 msgstr ""
 
-#: main.cc:327
+#: main.cc:331
 #, c-format
 msgid "expected %d arguments with jail, found: %u"
 msgstr ""
 
-#: main.cc:341
+#: main.cc:345
 #, c-format
 msgid "no such user: %s"
 msgstr ""
 
-#: main.cc:343
+#: main.cc:347
 #, c-format
 msgid "cannot get user id from user name: %s: %s"
 msgstr ""
 
-#: main.cc:358
+#: main.cc:362
 #, c-format
 msgid "no such group: %s"
 msgstr ""
 
-#: main.cc:360
+#: main.cc:364
 #, c-format
 msgid "cannot get group id from group name: %s: %s"
 msgstr ""
 
-#: main.cc:368
+#: main.cc:372
 #, c-format
 msgid "cannot chroot to: %s: %s"
 msgstr ""
 
-#: main.cc:375
+#: main.cc:379
 #, c-format
 msgid "cannot change group id to: %d: %s"
 msgstr ""
 
-#: main.cc:381
+#: main.cc:385
 #, c-format
 msgid "cannot change user id to: %d: %s"
 msgstr ""
 
-#: main.cc:387
+#: main.cc:391
 #, c-format
 msgid "cannot change working directory to: %s: %s"
 msgstr ""
 
-#: main.cc:628
+#: main.cc:631
 #, c-format
 msgid "exception caught: %s"
 msgstr ""
 
-#: key-signature-interface.cc:78
+#: key-signature-interface.cc:77
 #, c-format
 msgid "No glyph found for alteration: %s"
 msgstr ""
 
-#: key-signature-interface.cc:88
+#: key-signature-interface.cc:87
 msgid "alteration not found"
 msgstr ""
 
@@ -2290,29 +2346,29 @@ msgstr ""
 msgid "dot `%s' not found"
 msgstr ""
 
-#: translator.cc:359
+#: translator.cc:356
 #, c-format
 msgid "Two simultaneous %s events, junking this one"
 msgstr ""
 
-#: translator.cc:360
+#: translator.cc:357
 #, c-format
 msgid "Previous %s event here"
 msgstr ""
 
-#: glissando-engraver.cc:105
+#: glissando-engraver.cc:156
 msgid "unterminated glissando"
 msgstr ""
 
-#: text-spanner-engraver.cc:73
+#: text-spanner-engraver.cc:72
 msgid "cannot find start of text spanner"
 msgstr ""
 
-#: text-spanner-engraver.cc:86
+#: text-spanner-engraver.cc:85
 msgid "already have a text spanner"
 msgstr ""
 
-#: text-spanner-engraver.cc:132
+#: text-spanner-engraver.cc:130
 msgid "unterminated text spanner"
 msgstr ""
 
@@ -2331,12 +2387,12 @@ msgstr ""
 msgid "strange time signature found: %d/%d"
 msgstr ""
 
-#: lily-parser-scheme.cc:82
+#: lily-parser-scheme.cc:83
 #, c-format
 msgid "Changing working directory to: `%s'"
 msgstr ""
 
-#: lily-parser-scheme.cc:99
+#: lily-parser-scheme.cc:100
 #, c-format
 msgid "cannot find init file: `%s'"
 msgstr ""
@@ -2346,7 +2402,7 @@ msgstr ""
 msgid "Processing `%s'"
 msgstr ""
 
-#: lily-parser-scheme.cc:204
+#: lily-parser-scheme.cc:203
 msgid ""
 "ly:parser-parse-string is only valid with a new parser.  Use ly:parser-"
 "include-string instead."
@@ -2357,7 +2413,7 @@ msgstr ""
 msgid "custos `%s' not found"
 msgstr ""
 
-#: program-option-scheme.cc:237
+#: program-option-scheme.cc:232
 #, c-format
 msgid "no such internal option: %s"
 msgstr ""
@@ -2366,10 +2422,15 @@ msgstr ""
 msgid "cannot resolve rest collision: rest direction not set"
 msgstr ""
 
-#: rest-collision.cc:160 rest-collision.cc:205
+#: rest-collision.cc:160 rest-collision.cc:275
 msgid "too many colliding rests"
 msgstr ""
 
+#: pdf-scheme.cc:50
+#, c-format
+msgid "Conversion of string `%s' to UTF-16be failed: %s"
+msgstr ""
+
 #: episema-engraver.cc:75
 msgid "already have an episema"
 msgstr ""
@@ -2387,82 +2448,102 @@ msgstr ""
 msgid "%d: %s"
 msgstr ""
 
-#: grob-property.cc:173
+#: grob-property.cc:169
 #, c-format
 msgid "cyclic dependency: calculation-in-progress encountered for #'%s (%s)"
 msgstr ""
 
-#: relocate.cc:54
+#: relocate.cc:53
 #, c-format
 msgid "Setting %s to %s"
 msgstr ""
 
-#: relocate.cc:74
+#: relocate.cc:73
 #, c-format
 msgid "no such file: %s for %s"
 msgstr ""
 
-#: relocate.cc:84 relocate.cc:102
+#: relocate.cc:83 relocate.cc:101
 #, c-format
 msgid "no such directory: %s for %s"
 msgstr ""
 
-#: relocate.cc:94
+#: relocate.cc:93
 #, c-format
 msgid "%s=%s (prepend)\n"
 msgstr ""
 
-#: relocate.cc:124
+#: relocate.cc:123
 #, c-format
 msgid "not relocating, no %s/ or current/ found under %s"
 msgstr ""
 
-#: relocate.cc:135
+#: relocate.cc:134
 #, c-format
 msgid "Relocation: compile datadir=%s, new datadir=%s"
 msgstr ""
 
-#: relocate.cc:148
+#: relocate.cc:147
 #, c-format
 msgid "Relocation: framework_prefix=%s"
 msgstr ""
 
-#: relocate.cc:189
+#: relocate.cc:188
 #, c-format
 msgid "Relocation: is absolute: argv0=%s"
 msgstr ""
 
-#: relocate.cc:196
+#: relocate.cc:195
 #, c-format
 msgid "Relocation: from cwd: argv0=%s"
 msgstr ""
 
-#: relocate.cc:213
+#: relocate.cc:212
 #, c-format
 msgid ""
 "Relocation: from PATH=%s\n"
 "argv0=%s"
 msgstr ""
 
-#: relocate.cc:240
+#: relocate.cc:239
 msgid "LILYPONDPREFIX is obsolete, use LILYPOND_DATADIR"
 msgstr ""
 
-#: relocate.cc:367
+#: relocate.cc:365
 #, c-format
 msgid "Relocation file: %s"
 msgstr ""
 
-#: relocate.cc:373 source-file.cc:65
+#: relocate.cc:371 source-file.cc:65
 #, c-format
 msgid "cannot open file: `%s'"
 msgstr ""
 
-#: relocate.cc:403
+#: relocate.cc:401
 #, c-format
 msgid "Unknown relocation command %s"
 msgstr ""
 
+#: gregorian-ligature-engraver.cc:70
+#, c-format
+msgid "\\%s ignored"
+msgstr ""
+
+#: gregorian-ligature-engraver.cc:75
+#, c-format
+msgid "implied \\%s added"
+msgstr ""
+
+#. ligature may not start with 2nd head of pes or flexa
+#: gregorian-ligature-engraver.cc:224
+msgid "cannot apply `\\~' on first head of ligature"
+msgstr ""
+
+#. (pitch == prev_pitch)
+#: gregorian-ligature-engraver.cc:236
+msgid "cannot apply `\\~' on heads with identical pitch"
+msgstr ""
+
 #: translator-group.cc:188
 #, c-format
 msgid "cannot find: `%s'"
@@ -2472,35 +2553,35 @@ msgstr ""
 msgid "unterminated phrasing slur"
 msgstr ""
 
-#: lyric-engraver.cc:176
+#: phrasing-slur-engraver.cc:182
+msgid "cannot end phrasing slur"
+msgstr ""
+
+#: phrasing-slur-engraver.cc:196
+msgid "already have phrasing slur"
+msgstr ""
+
+#: lyric-engraver.cc:186
 msgid "Lyric syllable does not have note. Use \\lyricsto or associatedVoice."
 msgstr ""
 
-#: page-breaking.cc:248
+#: page-breaking.cc:274
 msgid ""
 "ignoring min-systems-per-page and max-systems-per-page because systems-per-"
 "page was set"
 msgstr ""
 
-#: page-breaking.cc:253
+#: page-breaking.cc:279
 msgid ""
 "min-systems-per-page is larger than max-systems-per-page, ignoring both "
 "values"
 msgstr ""
 
-#: performance.cc:54
+#: performance.cc:55
 msgid "Track..."
 msgstr ""
 
-#: performance.cc:83
-msgid "MIDI channel wrapped around"
-msgstr ""
-
-#: performance.cc:84
-msgid "remapping modulo 16"
-msgstr ""
-
-#: performance.cc:111
+#: performance.cc:85
 #, c-format
 msgid "MIDI output to `%s'..."
 msgstr ""
@@ -2509,26 +2590,6 @@ msgstr ""
 msgid "No tuplet to end"
 msgstr ""
 
-#: gregorian-ligature-engraver.cc:70
-#, c-format
-msgid "\\%s ignored"
-msgstr ""
-
-#: gregorian-ligature-engraver.cc:75
-#, c-format
-msgid "implied \\%s added"
-msgstr ""
-
-#. ligature may not start with 2nd head of pes or flexa
-#: gregorian-ligature-engraver.cc:224
-msgid "cannot apply `\\~' on first head of ligature"
-msgstr ""
-
-#. (pitch == prev_pitch)
-#: gregorian-ligature-engraver.cc:236
-msgid "cannot apply `\\~' on heads with identical pitch"
-msgstr ""
-
 #: chord-tremolo-engraver.cc:88
 msgid "No tremolo to end"
 msgstr ""
@@ -2567,20 +2628,20 @@ msgstr ""
 msgid "expected to read %d characters, got %d"
 msgstr ""
 
-#: axis-group-interface.cc:631
+#: axis-group-interface.cc:627
 msgid "an outside-staff object should have a direction, defaulting to up"
 msgstr ""
 
-#: coherent-ligature-engraver.cc:111
+#: coherent-ligature-engraver.cc:110
 #, c-format
 msgid "Coherent_ligature_engraver: setting `spacing-increment=0.01': ptr=%ul"
 msgstr ""
 
-#: percent-repeat-engraver.cc:148
+#: percent-repeat-engraver.cc:147
 msgid "unterminated percent repeat"
 msgstr ""
 
-#: note-head.cc:76
+#: note-head.cc:75
 #, c-format
 msgid "none of note heads `%s' or `%s' found"
 msgstr ""
@@ -2598,12 +2659,12 @@ msgstr ""
 msgid " scheme encoding: "
 msgstr ""
 
-#: all-font-metrics.cc:156
+#: all-font-metrics.cc:153
 #, c-format
 msgid "cannot find font: `%s'"
 msgstr ""
 
-#: property-iterator.cc:85
+#: property-iterator.cc:93
 #, c-format
 msgid "not a grob name, `%s'"
 msgstr ""
@@ -2613,16 +2674,16 @@ msgstr ""
 msgid "barcheck failed at: %s"
 msgstr ""
 
-#: stem.cc:116
+#: stem.cc:114
 msgid "weird stem size, check for narrow beams"
 msgstr ""
 
-#: stem.cc:657
+#: stem.cc:652
 #, c-format
 msgid "flag `%s' not found"
 msgstr ""
 
-#: stem.cc:673
+#: stem.cc:668
 #, c-format
 msgid "flag stroke `%s' not found"
 msgstr ""
@@ -2694,23 +2755,23 @@ msgstr ""
 msgid "\tprevious break: %d"
 msgstr ""
 
-#: lily-parser.cc:106
+#: lily-parser.cc:105
 msgid "Parsing..."
 msgstr ""
 
-#: lily-parser.cc:134
+#: lily-parser.cc:133
 msgid "braces do not match"
 msgstr ""
 
-#: score.cc:178
+#: score.cc:176
 msgid "already have music in score"
 msgstr ""
 
-#: score.cc:179
+#: score.cc:177
 msgid "this is the previous music"
 msgstr ""
 
-#: score.cc:184
+#: score.cc:182
 msgid "errors found, ignoring music expression"
 msgstr ""
 
@@ -2771,17 +2832,17 @@ msgstr ""
 msgid "FreeType error: %s"
 msgstr ""
 
-#: open-type-font.cc:111
+#: open-type-font.cc:110
 #, c-format
 msgid "unsupported font format: %s"
 msgstr ""
 
-#: open-type-font.cc:113
+#: open-type-font.cc:112
 #, c-format
 msgid "error reading font file %s: %s"
 msgstr ""
 
-#: open-type-font.cc:188
+#: open-type-font.cc:187
 #, c-format
 msgid "FT_Get_Glyph_Name () Freetype error: %s"
 msgstr ""
@@ -2796,118 +2857,118 @@ msgstr ""
 msgid "cannot write to file: `%s'"
 msgstr ""
 
-#: parser.yy:820
+#: parser.yy:825
 msgid "\\paper cannot be used in \\score, use \\layout instead"
 msgstr ""
 
-#: parser.yy:844
+#: parser.yy:849
 msgid "need \\paper for paper block"
 msgstr ""
 
-#: parser.yy:1363
+#: parser.yy:1369
 msgid "only \\consists takes non-string argument."
 msgstr ""
 
-#: parser.yy:1376
+#: parser.yy:1382
 msgid "Grob name should be alphanumeric"
 msgstr ""
 
-#: parser.yy:1685
+#: parser.yy:1697
 msgid "second argument must be pitch list"
 msgstr ""
 
-#: parser.yy:1716 parser.yy:1721 parser.yy:2194
+#: parser.yy:1728 parser.yy:1733 parser.yy:2206
 msgid "have to be in Lyric mode for lyrics"
 msgstr ""
 
-#: parser.yy:1818
+#: parser.yy:1830
 msgid "expecting string as script definition"
 msgstr ""
 
-#: parser.yy:1973 parser.yy:2024
+#: parser.yy:1985 parser.yy:2036
 #, c-format
 msgid "not a duration: %d"
 msgstr ""
 
-#: parser.yy:2148
+#: parser.yy:2160
 msgid "have to be in Note mode for notes"
 msgstr ""
 
-#: parser.yy:2209
+#: parser.yy:2221
 msgid "have to be in Chord mode for chords"
 msgstr ""
 
-#: lexer.ll:190
+#: lexer.ll:192
 msgid "stray UTF-8 BOM encountered"
 msgstr ""
 
-#: lexer.ll:194
+#: lexer.ll:196
 msgid "Skipping UTF-8 BOM"
 msgstr ""
 
-#: lexer.ll:249
+#: lexer.ll:251
 #, c-format
 msgid "Renaming input to: `%s'"
 msgstr ""
 
-#: lexer.ll:266
+#: lexer.ll:268
 msgid "quoted string expected after \\version"
 msgstr ""
 
-#: lexer.ll:270
+#: lexer.ll:272
 msgid "quoted string expected after \\sourcefilename"
 msgstr ""
 
-#: lexer.ll:274
+#: lexer.ll:276
 msgid "integer expected after \\sourcefileline"
 msgstr ""
 
-#: lexer.ll:287
+#: lexer.ll:289
 msgid "EOF found inside a comment"
 msgstr ""
 
-#: lexer.ll:302
+#: lexer.ll:304
 msgid "\\maininput not allowed outside init files"
 msgstr ""
 
-#: lexer.ll:326
+#: lexer.ll:328
 #, c-format
 msgid "wrong or undefined identifier: `%s'"
 msgstr ""
 
 #. backup rule
-#: lexer.ll:335
+#: lexer.ll:337
 msgid "end quote missing"
 msgstr ""
 
-#: lexer.ll:485
+#: lexer.ll:487
 msgid "Brace found at end of lyric.  Did you forget a space?"
 msgstr ""
 
-#: lexer.ll:595
+#: lexer.ll:597
 msgid "Brace found at end of markup.  Did you forget a space?"
 msgstr ""
 
-#: lexer.ll:699
+#: lexer.ll:701
 #, c-format
 msgid "invalid character: `%c'"
 msgstr ""
 
-#: lexer.ll:814 lexer.ll:815
+#: lexer.ll:822 lexer.ll:823
 #, c-format
 msgid "unknown escaped string: `\\%s'"
 msgstr ""
 
-#: lexer.ll:924 lexer.ll:925
+#: lexer.ll:932 lexer.ll:933
 #, c-format
 msgid "file too old: %s (oldest supported: %s)"
 msgstr ""
 
-#: lexer.ll:925 lexer.ll:926
+#: lexer.ll:933 lexer.ll:934
 msgid "consider updating the input with the convert-ly script"
 msgstr ""
 
-#: lexer.ll:931 lexer.ll:932
+#: lexer.ll:939 lexer.ll:940
 #, c-format
 msgid "program too old: %s (file requires: %s)"
 msgstr ""
@@ -2922,7 +2983,12 @@ msgstr ""
 msgid "Writing ~S..."
 msgstr ""
 
-#: documentation-lib.scm:198
+#: documentation-lib.scm:184
+#, scheme-format
+msgid "cannot find description for property `~S' (~S)"
+msgstr ""
+
+#: documentation-lib.scm:205
 #, scheme-format
 msgid "cannot find description for property ~S (~S)"
 msgstr ""
@@ -2963,23 +3029,23 @@ msgstr ""
 msgid "symbol ~S redefined"
 msgstr ""
 
-#: paper.scm:115
+#: paper.scm:117
 msgid "set-global-staff-size: not in toplevel scope"
 msgstr ""
 
-#: paper.scm:296
+#: paper.scm:301
 #, scheme-format
 msgid "This is not a \\layout {} object, ~S"
 msgstr ""
 
-#: paper.scm:308
+#: paper.scm:313
 #, scheme-format
 msgid "Unknown paper size: ~a"
 msgstr ""
 
 #. TODO: should raise (generic) exception with throw, and catch
 #. that in parse-scm.cc
-#: paper.scm:323
+#: paper.scm:328
 msgid "Must use #(set-paper-size .. ) within \\paper { ... }"
 msgstr ""
 
@@ -3001,37 +3067,37 @@ msgstr ""
 msgid "wrong type for argument ~a.  Expecting ~a, found ~s"
 msgstr ""
 
-#: lily.scm:716
+#: lily.scm:710
 msgid "Compilation successfully completed"
 msgstr ""
 
-#: lily.scm:717
+#: lily.scm:711
 msgid "Compilation completed with warnings or errors"
 msgstr ""
 
-#: lily.scm:779
+#: lily.scm:773
 #, scheme-format
 msgid "job ~a terminated with signal: ~a"
 msgstr ""
 
-#: lily.scm:782
+#: lily.scm:776
 #, scheme-format
 msgid ""
 "logfile ~a (exit ~a):\n"
 "~a"
 msgstr ""
 
-#: lily.scm:804 lily.scm:882
+#: lily.scm:798 lily.scm:876
 #, scheme-format
 msgid "failed files: ~S"
 msgstr ""
 
-#: lily.scm:873
+#: lily.scm:867
 #, scheme-format
 msgid "Redirecting output to ~a..."
 msgstr ""
 
-#: lily.scm:892
+#: lily.scm:886
 #, scheme-format
 msgid "Invoking `~a'...\n"
 msgstr ""
@@ -3151,12 +3217,12 @@ msgstr ""
 msgid "Found infinity or nan in output.  Substituting 0.0"
 msgstr ""
 
-#: output-ps.scm:289 output-svg.scm:550
+#: output-ps.scm:299 output-svg.scm:550
 #, scheme-format
 msgid "unknown line-cap-style: ~S"
 msgstr ""
 
-#: output-ps.scm:294 output-svg.scm:556
+#: output-ps.scm:304 output-svg.scm:556
 #, scheme-format
 msgid "unknown line-join-style: ~S"
 msgstr ""
@@ -3199,50 +3265,54 @@ msgstr ""
 msgid "Could not find language `~a'.  Ignoring."
 msgstr ""
 
-#: define-music-types.scm:740
+#: define-music-types.scm:747
 #, scheme-format
 msgid "symbol expected: ~S"
 msgstr ""
 
-#: define-music-types.scm:743
+#: define-music-types.scm:750
 #, scheme-format
 msgid "cannot find music object: ~S"
 msgstr ""
 
-#: define-music-types.scm:762
+#: define-music-types.scm:769
 #, scheme-format
 msgid "unknown repeat type `~S'"
 msgstr ""
 
-#: define-music-types.scm:763
+#: define-music-types.scm:770
 msgid "See define-music-types.scm for supported repeats"
 msgstr ""
 
-#: translation-functions.scm:341
+#: translation-functions.scm:350
 #, scheme-format
 msgid "Negative fret for pitch ~a on string ~a"
 msgstr ""
 
-#: translation-functions.scm:385
+#: translation-functions.scm:401
 #, scheme-format
 msgid "No open string for pitch ~a"
 msgstr ""
 
-#: translation-functions.scm:400
+#: translation-functions.scm:416 translation-functions.scm:428
 #, scheme-format
 msgid "Requested string for pitch requires negative fret: string ~a pitch ~a"
 msgstr ""
 
-#: translation-functions.scm:401
-msgid "Ignoring string request."
+#: translation-functions.scm:419
+msgid "Ignoring string request and recalculating."
+msgstr ""
+
+#: translation-functions.scm:431
+msgid "Ignoring note in tablature."
 msgstr ""
 
-#: translation-functions.scm:414
+#: translation-functions.scm:454
 #, scheme-format
 msgid "No string for pitch ~a (given frets ~a)"
 msgstr ""
 
-#: translation-functions.scm:515
+#: translation-functions.scm:559
 #, scheme-format
 msgid ""
 "No label for fret ~a (on string ~a);\n"
@@ -3269,7 +3339,7 @@ msgstr ""
 msgid "do not know how to embed font ~s ~s ~s"
 msgstr ""
 
-#: framework-ps.scm:669
+#: framework-ps.scm:686
 msgid ""
 "\n"
 "The PostScript backend does not support the\n"
@@ -3294,7 +3364,7 @@ msgstr ""
 msgid "invalid tremolo repeat count: ~a"
 msgstr ""
 
-#: music-functions.scm:618
+#: music-functions.scm:619
 #, scheme-format
 msgid "music expected: ~S"
 msgstr ""
@@ -3305,21 +3375,21 @@ msgstr ""
 msgid "Bar check failed.  Expect to be at ~a, instead at ~a"
 msgstr ""
 
-#: music-functions.scm:846
+#: music-functions.scm:845
 #, scheme-format
 msgid "cannot find quoted music: `~S'"
 msgstr ""
 
-#: music-functions.scm:982
+#: music-functions.scm:979
 msgid "Add @var{octave-shift} to the octave of @var{pitch}."
 msgstr ""
 
-#: music-functions.scm:1037
+#: music-functions.scm:1039
 #, scheme-format
 msgid "Unknown octaveness type: ~S "
 msgstr ""
 
-#: music-functions.scm:1038
+#: music-functions.scm:1040
 msgid "Defaulting to 'any-octave."
 msgstr ""
 
@@ -3369,26 +3439,26 @@ msgstr ""
 msgid "~a exited with status: ~S"
 msgstr ""
 
-#: define-markup-commands.scm:803
+#: define-markup-commands.scm:883
 msgid "no systems found in \\score markup, does it have a \\layout block?"
 msgstr ""
 
-#: define-markup-commands.scm:2404
+#: define-markup-commands.scm:2561
 #, scheme-format
 msgid "Cannot find glyph ~a"
 msgstr ""
 
-#: define-markup-commands.scm:2830
+#: define-markup-commands.scm:2987
 #, scheme-format
 msgid "no brace found for point size ~S "
 msgstr ""
 
-#: define-markup-commands.scm:2831
+#: define-markup-commands.scm:2988
 #, scheme-format
 msgid "defaulting to ~S pt"
 msgstr ""
 
-#: define-markup-commands.scm:2984
+#: define-markup-commands.scm:3141
 #, scheme-format
 msgid "not a valid duration string: ~a"
 msgstr ""
index 568ff17e75e42331648135b4423f0f836b16ee8c..de3848537cb2f466fd8816414bc6519147c30ea9 100644 (file)
@@ -102,7 +102,7 @@ def source_links_replace (m, source_val):
     return 'href="' + os.path.join (source_val, m.group (1)) + '"'
 
 # More hardcoding, yay!
-splitted_docs_re = re.compile('(Documentation/out-www/(automated-engraving|essay|notation|changes|extending|music-glossary|usage|web|learning|snippets))/')
+split_docs_re = re.compile('(Documentation/out-www/(automated-engraving|essay|notation|changes|extending|music-glossary|usage|web|learning|snippets|contributor))/')
 lily_snippets_re = re.compile ('(href|src)="([0-9a-f]{2}/lily-.*?)"')
 pictures_re = re.compile ('src="(pictures/.*?)"')
 
@@ -110,11 +110,11 @@ docindex_link_re = re.compile (r'href="index.html"')
 manuals_page_link_re = re.compile (r'href="((?:\.\./)+)Documentation/web/manuals')
 
 ## Windows does not support symlinks.
-# This function avoids creating symlinks for splitted HTML manuals
+# This function avoids creating symlinks for split HTML manuals
 # Get rid of symlinks in GNUmakefile.in (local-WWW-post)
 # this also fixes missing PNGs only present in translated docs
 def hack_urls (s, prefix, target, is_development_branch):
-    if splitted_docs_re.match (prefix):
+    if split_docs_re.match (prefix):
         s = lily_snippets_re.sub ('\\1="../\\2"', s)
         s = pictures_re.sub ('src="../\\1"', s)
 
index bedfaaaf54cff148ee922d504a9e2dddb0e9c23c..fc35924b66cdb1cc570d55db8a9aa9fccb3bc942 100644 (file)
@@ -3215,7 +3215,7 @@ def conv (str):
         stderr_write (UPDATE_MANUALLY)
     return str
 
-@rule ((2, 15, 8),
+@rule ((2, 15, 7),
     _ ("Handling of non-automatic footnotes."))
 def conv(str):
     if re.search (r'\\footnote', str):
diff --git a/scm/document-context-mods.scm b/scm/document-context-mods.scm
new file mode 100644 (file)
index 0000000..85f46de
--- /dev/null
@@ -0,0 +1,100 @@
+;;;; This file is part of LilyPond, the GNU music typesetter.
+;;;;
+;;;; Copyright (C) 2011 Neil Puttock <n.puttock@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
+;;;; the Free Software Foundation, either version 3 of the License, or
+;;;; (at your option) any later version.
+;;;;
+;;;; LilyPond is distributed in the hope that it will be useful,
+;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;; GNU General Public License for more details.
+;;;;
+;;;; You should have received a copy of the GNU General Public License
+;;;; along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
+
+(use-modules (ice-9 format))
+
+(define (grob-property-path path)
+  (string-join (map symbol->string path) " "))
+
+(define (document-mod-list op)
+  (let ((tag (car op))
+        (name-sym (cadr op))
+        (args (cddr op)))
+    (case tag
+      ((push)
+       (let ((value (car args))
+             (path (cdr args)))
+         (string-append
+          "@item Sets "
+          (format "grob property @code{~a} "
+                  (grob-property-path path))
+          (format "in @code{@rinternals{~a}} to ~a."
+                  name-sym
+                  (scm->texi value))
+          "\n")))
+      ((pop)
+       (string-append
+        "@item Reverts "
+        (format "grob property @code{~a} "
+                (grob-property-path (car args)))
+        (format "in @code{@rinternals{~a}}."
+                name-sym)
+        "\n"))
+      ((assign)
+       (format "@item Sets translator property @code{~a} to ~a.\n"
+               name-sym
+               (scm->texi (car args))))
+      ((unset)
+       (format "@item Unsets translator property @code{~a}.\n"
+               name-sym))
+      ((consists)
+       (format "@item Adds @code{@rinternals{~a}}.\n" name-sym))
+      ((remove)
+       (format "@item Removes @code{@rinternals{~a}}.\n" name-sym))
+      (else ""))))
+
+(define (document-context-mod context-mod-pair)
+  (let* ((name-sym (car context-mod-pair))
+         (mod-list (ly:get-context-mods (cdr context-mod-pair)))
+         (docstring (filter (lambda (mod)
+                              (eq? (car mod) 'description))
+                            mod-list)))
+    (format
+     "@item @code{~a}
+@findex ~a
+~a
+@itemize
+~{~a ~}
+@end itemize
+"
+     name-sym
+     name-sym
+     (if (pair? docstring) (cadar docstring) "(undocumented; fixme)")
+     (map document-mod-list mod-list))))
+
+(define (document-mod obj-pair)
+  (cond
+   ((ly:context-mod? (cdr obj-pair))
+    (document-context-mod obj-pair))
+   (else
+    #f)))
+
+(define context-mods-doc-string
+  (format
+   "@table @asis
+~a
+@end table
+"
+   (string-join
+    (filter
+     identity
+     (map
+      document-mod
+      (sort
+       (ly:module->alist (current-module))
+       identifier<?)))
+    "")))
index b456acf334a14f6a4dc974ae9918813033259d20..838de55e558db9bad72d1fafc3972318dd2ce54a 100644 (file)
    (else
     #f)))
 
-
-(define (identifier<? a b)
-  (ly:string-ci<?
-   (symbol->string (car a))
-   (symbol->string (car b))))
-
-
 (define-public (identifiers-doc-string)
   (format #f
    "@table @asis
index b1d9fcda2ddac42f8128b880f5d34bf15982f91f..b2aa9637b66159a928b7809c415ab69cb9aeaeb9 100644 (file)
@@ -34,6 +34,7 @@
               "document-music.scm"
               "document-type-predicates.scm"
               "document-identifiers.scm"
+              "document-context-mods.scm"
               "document-backend.scm"
               "document-markup.scm"))
 
@@ -72,6 +73,9 @@
  (identifiers-doc-string)
  (open-output-file "identifiers.tely"))
 
+(display
+ context-mods-doc-string
+ (open-output-file "context-mod-identifiers.tely"))
 
 (display
  (backend-properties-doc-string all-user-grob-properties)
index af48e55c6b51a32b40a1f1e223e5ef1daf62e2fb..013cc2a4377bc0b373db7364221feedc96fe6d95 100644 (file)
@@ -175,6 +175,10 @@ string-to-use).  If QUOTE? is #t, embed table in a @quotation environment."
 (define (writing-wip x)
   (ly:message (_ "Writing ~S...") x))
 
+(define (identifier<? a b)
+  (ly:string-ci<?
+   (symbol->string (car a))
+   (symbol->string (car b))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; property  stuff.
index 34c9cb3820096c04603fd358393651bb165491e1..ede65ff5e2a54b88d303e0a2429e3980384c7022 100644 (file)
@@ -746,23 +746,6 @@ Handy for debugging, possibly turned off."
 
    (reverse matches))
 
-(define-public (random-string pool n)
-  "Produces a random lowercase string of length n"
-  (define (helper alphabet out num)
-    (let ((rand (random (string-length pool))))
-      (if (< num 1)
-          out
-          (helper alphabet
-                  (string-concatenate `(,out
-                                        ,(substring alphabet
-                                                    rand
-                                                    (+ 1 rand))))
-                  (- num 1)))))
-  (helper pool "" n))
-
-(define-public (random-lowercase-string n)
-  (random-string "abcdefghijklmnopqrstuvwxyz" n))
-
 ;;;;;;;;;;;;;;;;
 ;; other
 
index 171cee12407e8bbb2ebf1f0c87b25d3ed3e0ce3f..5633ad84a140a389d507c5a670a51ae76f6438d0 100644 (file)
@@ -243,15 +243,14 @@ into a @code{MultiMeasureTextEvent}."
   (let* ((set (and (integer? label)
                   (context-spec-music (make-property-set 'rehearsalMark label)
                                      'Score)))
-        (ev (make-music 'MarkEvent))
-        (ch (make-event-chord (list ev))))
+        (ev (make-music 'MarkEvent
+                        'origin location)))
 
-    (set! (ly:music-property ev 'origin) location)
     (if set
-       (make-sequential-music (list set ch))
+       (make-sequential-music (list set ev))
        (begin
          (set! (ly:music-property ev 'label) label)
-         ch))))
+         ev))))
 
 (define-ly-syntax (partial parser location dur)
   "Make a partial measure."
index ca7806fe58bfdd8f93402ee9d6ecc4193e915cec..4449a45b47fb07e1dac29afba3b916f14c5798c2 100755 (executable)
@@ -67,7 +67,7 @@ rules = {
     ('([\w\(\)\]]) +(&&|\|\||<=|>=|!=|\|=|==|\+=|-=|\*=|/=|\?|<|>|\+|-|=|/|:|&|\||\*) +([\w\(\)])', '\\1 \\2 \\3'),
 
     # trailing operator, but don't un-trail close angle-braces > nor pointer *, and not before a preprocessor line
-    (' (::|&&|\|\||<=|>=|!=|\|=|==|\+=|-=|\*=|/=|\?|<|\+|-|=|/|:|&XXX|\||\*XXX) *\n( *)([^\s#])', '\n\\2\\1 \\3'),
+    ('(?<!\s) (::|&&|\|\||<=|>=|!=|\|=|==|\+=|-=|\*=|/=|\?|<|\+|-|=|/|:|&XXX|\||\*XXX) *\n( *)([^\s#])', '\n\\2\\1 \\3'),
     # space after `operator'
     ('(\Woperator) *([^\w\s])', '\\1 \\2'),
     # trailing parenthesis open
@@ -133,9 +133,10 @@ snippet_res = {
 
     'string':
     r'''(?x)
+    "      # leave the leading " character visible to CXX rules
     (?P<match>
     (?P<code>
-    "([^"\n]|\\")*"))''',
+    ([^"\n]|\\")*"))''',
     
     'char':
     r'''(?x)
index 5d795eedfb1ee98c51563d0af3e9d15bfec795f4..ed7363148ed5a64451be5f8260388a3d521e41ff 100644 (file)
@@ -15,6 +15,7 @@ Manual names and reference keywords:
 Files to be excluded (not available in git):
 @exclude colorado.itexi
 @exclude computer-notation.itexi
+@exclude context-mod-identifiers.tely
 @exclude context-properties.tely
 @exclude engravingbib.itexi
 @exclude identifiers.tely
index 95df0f82069a4da0d186cbed3fdd4d15286a6f3c..2119e7b6ab6791e4b56fa15888561e747daef788 100644 (file)
@@ -1,4 +1,4 @@
-#!@PERL@
+#! /usr/bin/perl
 
 ##################################################
 # Convert stylized Metafont to PostScript Type 1 #
@@ -7,7 +7,7 @@
 
 ########################################################################
 # mf2pt1                                                               #
-# Copyright (C) 2008 Scott Pakin                                       #
+# Copyright (C) 2011 Scott Pakin                                       #
 #                                                                      #
 # This program may be distributed and/or modified under the conditions #
 # of the LaTeX Project Public License, either version 1.3c of this     #
@@ -21,7 +21,7 @@
 # version 2006/05/20 or later.                                         #
 ########################################################################
 
-our $VERSION = "2.4.4";   # mf2pt1 version number
+our $VERSION = "2.4.5";   # mf2pt1 version number
 require 5.6.1;            # I haven't tested mf2pt1 with older Perl versions
 
 use File::Basename;
@@ -160,7 +160,7 @@ my $filedir;
 my $filenoext;
 my $versionmsg = "mf2pt1 version $VERSION
 
-Copyright (C) 2008 Scott Pakin
+Copyright (C) 2011 Scott Pakin
 
 This program may be distributed and/or modified under the conditions
 of the LaTeX Project Public License, either version 1.3c of this
@@ -726,7 +726,7 @@ sub output_trailer ()
 {
     print OUTFILE <<"ENDTRAILER";
 /.notdef {
-        0 @{[$fontbbox[2]-$fontbbox[0]]} hsbw
+        0 @{[frac_string (frac_approx ($fontbbox[2] - $fontbbox[0]))]} hsbw
         endchar
         } ND
 end
index 4f4cd85bb075859a3bf56051ccab2096ce39c5ad..941aa8cd117ec28a064bfe6af7b404f1a1a1e147 100644 (file)
@@ -2,6 +2,7 @@ ancient-notation.itely
 chords.itely
 colorado.itexi
 computer-notation.itexi
+context-mod-identifiers.tely
 context-properties.tely
 contexts-and-engravers.itely
 editorial-annotations.itely
index c1728f9924b1efcf9672a33bae1740960765bc22..6d81f550ac89892ba86107e4054dd13d72160cc6 100644 (file)
@@ -27,5 +27,10 @@ $(outdir)/%.pfb: %.mf $(outdir)/mf2pt1.mem
        && mv $$TMP/*pfb $(outdir); \
        rm -rf $$TMP
 
+# since recent mpost versions no longer create a mem file, we create a dummy
+# file to satisfy the dependency (which gets overwritten in case an older
+# mpost creates a real mem file)
 $(outdir)/mf2pt1.mem: mf2pt1.mp
-       cd $(outdir) && mpost -progname=mpost -ini $(top-src-dir)/mf/mf2pt1.mp \\dump
+       cd $(outdir) \
+          && touch mf2pt1.mem \
+          && mpost -progname=mpost -ini $(top-src-dir)/mf/mf2pt1.mp \\dump