From 304b5f3aa7eee7b0ff8d4ba7526a1410735f6e74 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 8 Mar 2004 16:17:42 +0000 Subject: [PATCH] * lily/accidental-placement.cc (position_accidentals): bugfix in offset, this fixes right-padding of AccidentalPlacement. * Documentation/user/tutorial.itely (An orchestral part): more fixes for the tutorial. * lily/parser.yy (context_def_spec_block): use \context instead of \translator. * Documentation/user/tutorial.itely (Automatic and manual beams): editing of tutorial. --- ChangeLog | 8 + Documentation/user/invoking.itexi | 14 ++ Documentation/user/lilypond.tely | 4 +- Documentation/user/music-glossary.tely | 29 +++ Documentation/user/notation.itely | 87 ++----- Documentation/user/tutorial.itely | 308 +++++++++++++---------- VERSION | 2 +- lily/accidental-placement.cc | 5 +- lily/horizontal-bracket-engraver.cc | 24 +- lily/hyphen-engraver.cc | 6 +- lily/identifier-smob.cc | 10 +- lily/input-file-results.cc | 4 +- lily/input-smob.cc | 2 +- lily/instrument-name-engraver.cc | 12 +- lily/item.cc | 2 +- lily/key-engraver.cc | 8 +- lily/key-performer.cc | 4 +- lily/kpath.cc | 8 +- lily/ligature-bracket-engraver.cc | 4 +- lily/ligature-engraver.cc | 2 +- lily/lily-guile.cc | 40 +-- lily/line-interface.cc | 2 +- lily/line-spanner.cc | 18 +- lily/lookup.cc | 44 ++-- lily/ly-module.cc | 8 +- lily/lyric-combine-music-iterator.cc | 16 +- lily/lyric-engraver.cc | 6 +- lily/lyric-extender.cc | 2 +- lily/lyric-hyphen.cc | 2 +- lily/lyric-performer.cc | 4 +- lily/main.cc | 2 +- lily/mark-engraver.cc | 6 +- lily/measure-grouping-engraver.cc | 14 +- lily/measure-grouping-spanner.cc | 4 +- lily/melisma-translator.cc | 6 +- lily/mensural-ligature-engraver.cc | 4 +- lily/mensural-ligature.cc | 16 +- lily/metronome-engraver.cc | 8 +- lily/midi-item.cc | 4 +- lily/midi-walker.cc | 2 +- lily/moment.cc | 16 +- lily/multi-measure-rest-engraver.cc | 32 +-- lily/multi-measure-rest.cc | 10 +- lily/music-iterator.cc | 14 +- lily/music-wrapper-iterator.cc | 8 +- lily/my-lily-lexer.cc | 8 +- lily/my-lily-parser.cc | 4 +- lily/new-fingering-engraver.cc | 52 ++-- lily/new-lyric-combine-music-iterator.cc | 8 +- lily/note-collision.cc | 4 +- lily/note-head-line-engraver.cc | 6 +- lily/note-head.cc | 16 +- lily/note-heads-engraver.cc | 8 +- lily/note-name-engraver.cc | 8 +- lily/note-performer.cc | 6 +- lily/note-spacing.cc | 30 +-- lily/ottava-bracket.cc | 2 +- lily/ottava-engraver.cc | 6 +- lily/output-property-engraver.cc | 12 +- lily/output-property-music-iterator.cc | 2 +- lily/paper-column.cc | 4 +- lily/paper-score.cc | 2 +- lily/parse-scm.cc | 4 +- lily/parser.yy | 242 +++++++++--------- lily/part-combine-engraver.cc | 4 +- lily/part-combine-iterator.cc | 14 +- lily/percent-repeat-engraver.cc | 8 +- lily/percent-repeat-item.cc | 4 +- lily/percent-repeat-iterator.cc | 12 +- lily/performer-group-performer.cc | 4 +- lily/phrasing-slur-engraver.cc | 6 +- lily/piano-pedal-bracket.cc | 6 +- lily/piano-pedal-engraver.cc | 18 +- lily/piano-pedal-performer.cc | 2 +- lily/pitch-squash-engraver.cc | 6 +- lily/property-iterator.cc | 20 +- lily/quote-iterator.cc | 6 +- lily/recording-group-engraver.cc | 18 +- lily/relative-octave-check.cc | 4 +- lily/repeat-acknowledge-engraver.cc | 4 +- lily/repeated-music.cc | 4 +- lily/rest-collision-engraver.cc | 6 +- lily/rest-engraver.cc | 6 +- lily/rest.cc | 6 +- lily/rhythmic-column-engraver.cc | 6 +- lily/scm-hash.cc | 8 +- lily/scm-option.cc | 2 +- lily/score-context.cc | 2 +- lily/score-engraver.cc | 6 +- lily/score-performer.cc | 2 +- lily/score.cc | 12 +- lily/script-column-engraver.cc | 6 +- lily/script-engraver.cc | 8 +- lily/separating-group-spanner.cc | 4 +- lily/separating-line-group-engraver.cc | 20 +- lily/sequential-iterator.cc | 8 +- lily/sequential-music-iterator.cc | 2 +- lily/simple-spacer.cc | 6 +- lily/simultaneous-music-iterator.cc | 16 +- lily/simultaneous-music.cc | 6 +- lily/skyline.cc | 46 ++-- lily/slash-repeat-engraver.cc | 6 +- lily/slur-engraver.cc | 2 +- lily/slur-performer.cc | 6 +- lily/slur.cc | 6 +- lily/source-file.cc | 10 +- lily/spacing-engraver.cc | 6 +- lily/spacing-spanner.cc | 32 +-- lily/span-arpeggio-engraver.cc | 6 +- lily/span-bar-engraver.cc | 4 +- lily/span-dynamic-performer.cc | 2 +- lily/spanner.cc | 4 +- lily/spring-smob.cc | 6 +- lily/staff-collecting-engraver.cc | 4 +- lily/staff-performer.cc | 2 +- lily/staff-spacing.cc | 14 +- lily/staff-symbol-engraver.cc | 14 +- lily/staff-symbol.cc | 4 +- lily/stanza-number-align-engraver.cc | 6 +- lily/stanza-number-engraver.cc | 4 +- lily/stem-engraver.cc | 10 +- lily/stem-tremolo.cc | 4 +- lily/stem.cc | 14 +- lily/stencil-scheme.cc | 12 +- lily/string-number-engraver.cc | 4 +- lily/swallow-engraver.cc | 4 +- lily/swallow-perf.cc | 6 +- lily/system-start-delimiter-engraver.cc | 6 +- lily/system-start-delimiter.cc | 4 +- lily/system.cc | 28 +-- lily/tab-note-heads-engraver.cc | 28 +-- lily/tempo-performer.cc | 2 +- lily/text-engraver.cc | 4 +- lily/text-item.cc | 2 +- lily/text-spanner-engraver.cc | 8 +- lily/text-spanner.cc | 6 +- lily/tie-engraver.cc | 10 +- lily/tie-performer.cc | 4 +- lily/tie.cc | 2 +- lily/time-signature-engraver.cc | 8 +- lily/time-signature-performer.cc | 4 +- lily/time-signature.cc | 4 +- lily/timing-translator.cc | 2 +- lily/translator-ctors.cc | 2 +- lily/translator-group.cc | 2 +- lily/translator.cc | 4 +- lily/tuplet-bracket.cc | 22 +- lily/tuplet-engraver.cc | 8 +- lily/type-swallow-translator.cc | 18 +- lily/un-relativable-music.cc | 2 +- lily/unfolded-repeat-iterator.cc | 20 +- lily/untransposable-music.cc | 4 +- lily/vaticana-ligature-engraver.cc | 20 +- lily/vaticana-ligature.cc | 18 +- lily/vertical-align-engraver.cc | 4 +- lily/virtual-font-metric.cc | 12 +- lily/volta-bracket.cc | 8 +- lily/volta-engraver.cc | 10 +- scm/define-grobs.scm | 4 +- 159 files changed, 1048 insertions(+), 997 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63b1f1cc53..e8d0440d66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2004-03-08 Han-Wen Nienhuys + * lily/accidental-placement.cc (position_accidentals): bugfix in + offset, this fixes right-padding of AccidentalPlacement. + + * lily/[h-z]*.cc: () formatting. + + * Documentation/user/tutorial.itely (An orchestral part): more + fixes for the tutorial. + * scm/translation-functions.scm (fraction-tuplet-formatter): reverse fraction. diff --git a/Documentation/user/invoking.itexi b/Documentation/user/invoking.itexi index 1b3b612bc6..67420e265e 100644 --- a/Documentation/user/invoking.itexi +++ b/Documentation/user/invoking.itexi @@ -230,6 +230,20 @@ they will each be processed independently. @footnote{The status of GUILE is not reset across invocations, so be careful not to change any system defaults from within Scheme.} +We strongly advise against making LilyPond formatting available +through a webserver. That is, processing input from untrusted users, +and returning the resulting PDF file. LilyPond is a big and complex +program. It was not written with security in mind. Making it available +to the outside world is a huge risk; consider the security +implications of + +@verbatim + #(system "rm -rf /") + \score { + c4^#(ly:export (ly:gulp-file "/etc/passwd")) + } +@end verbatim + @section Command line options diff --git a/Documentation/user/lilypond.tely b/Documentation/user/lilypond.tely index 7c6ecbe512..b3bf557a5f 100644 --- a/Documentation/user/lilypond.tely +++ b/Documentation/user/lilypond.tely @@ -42,12 +42,14 @@ Distributions will want to install lilypond.info in postinstall, doing: HINTS FOR STYLE +* Try not to use punctuation between introductocing sentence and +display material (verbatim, music, example code). + * don't refer to LilyPond in the text. The reader knows what the manual is about * if you do, capitalization is LilyPond. - * don't explicitly refer to the reader/user. There is no one else besides the reader and the writer. diff --git a/Documentation/user/music-glossary.tely b/Documentation/user/music-glossary.tely index bbaac50666..95479cfe33 100644 --- a/Documentation/user/music-glossary.tely +++ b/Documentation/user/music-glossary.tely @@ -844,6 +844,35 @@ FI: avain, nuottiavain. @aref{C clef}, @aref{F clef}, @aref{G clef}. +@aitem{cluster} + +A @emph{cluster} is a range of simultaneously sounding pitches that +may change over time. The set of available pitches to apply usually +depends on the acoustic source. Thus, in piano music, a cluster +typically consists of a continuous range of the semitones as provided +by the piano's fixed set of a chromatic scale. In choral music, each +singer of the choir typically may sing an arbitrary pitch within the +cluster's range that is not bound to any diatonic, chromatic or other +scale. In electronic music, a cluster (theoretically) may even cover +a continuous range of pitches, thus resulting in colored noise, such +as pink noise. + +Clusters can be denoted in the context of ordinary staff notation by +engraving simple geometrical shapes that replace ordinary notation of +notes. Ordinary notes as musical events specify starting time and +duration of pitches; however, the duration of a note is expressed by +the shape of the note head rather than by the horizontal graphical +extent of the note symbol. In contrast, the shape of a cluster +geometrically describes the development of a range of pitches +(vertical extent) over time (horizontal extent). Still, the +geometrical shape of a cluster covers the area in which any single +pitch contained in the cluster would be notated as an ordinary note. + +@lilypond[relative=1,verbatim] + \apply #notes-to-clusters { } +@end lilypond + + @aitem{comma} I: comma, F: comma, diff --git a/Documentation/user/notation.itely b/Documentation/user/notation.itely index 786549989d..56cd96aed7 100644 --- a/Documentation/user/notation.itely +++ b/Documentation/user/notation.itely @@ -10,7 +10,7 @@ This chapter describes all the different types of notation supported by LilyPond. It is intended as a reference for users that are already -somewhat familiar with using LilyPond. +somewhat familiar with LilyPond. @menu * Note entry:: @@ -39,9 +39,8 @@ somewhat familiar with using LilyPond. @section Note entry @cindex Note entry -The basic elements of any piece of music are the notes. This section -is about basic notation elements notes, rests and related constructs, -such as stems, tuplets and ties. +This section is about basic notation elements notes, rests and +related constructs, such as stems, tuplets and ties. @menu * Notes:: @@ -82,8 +81,8 @@ this manual.} @cindex entering notes The most common syntax for pitch entry is used in @code{\chords} and -@code{\notes} mode. In Note and Chord mode, pitches may be designated -by names. The notes are specified by the letters @code{a} through +@code{\notes} mode. In these modes, pitches may be designated by +names. The notes are specified by the letters @code{a} through @code{g}, while the octave is formed with notes ranging from @code{c} to @code{b}. The pitch @code{c} is an octave below middle C and the letters span the octave above that C: @@ -189,9 +188,17 @@ question mark `@code{?}' after the pitch: @end lilypond +@seealso + The automatic production of accidentals can be tuned in many ways. For more information, refer to @ref{Accidentals}. + +@refbugs + +There are no generally accepted standards for denoting three quarter +flats, so LilyPond's symbol does not conform to any standard. + @node Chords @subsection Chords @@ -199,6 +206,9 @@ A chord is formed by a enclosing a set of pitches in @code{<} and @code{>}. A chord may be followed by a duration, and a set of articulations, just like simple notes. +@lilypond[relative] + 4 8 <>8 +@end lilypond @node Rests @subsection Rests @@ -214,7 +224,7 @@ r1 r2 r4 r8 @end lilypond Whole bar rests, centered in middle of the bar, -must be done with multi measure rests. They are discussed in +must be done with multi-measure rests. They are discussed in @ref{Multi measure rests}. @@ -300,17 +310,19 @@ r1 r2 r4 r8 r16 r32 r64 r64 @lilypond[noindent] \score { \notes \relative c'' { - a\breve \autoBeamOff + a\breve*1/2 \autoBeamOff a1 a2 a4 a8 a16 a32 a64 a64 - r\longa r\breve + r\longa*1/4 r\breve *1/2 r1 r2 r4 r8 r16 r32 r64 r64 } \paper { + raggedright = ##t \context { \StaffContext \remove "Clef_engraver" \override StaffSymbol #'transparent = ##t - \override TimeSignature #'transparent = ##t + \override TimeSignature #'transparent = ##t + \override BarLine #'transparent = ##t \consists "Pitch_squash_engraver" } } @@ -799,7 +811,6 @@ The key signature indicates the scale in which a piece is played. It is denoted by a set of alterations (flats or sharps) at the start of the staff. -@syntax Setting or changing the key signature is done with the @code{\key} command: @@ -851,7 +862,6 @@ Internals: @internalsref{KeyChangeEvent}, and @internalsref{KeySignature}. The clef indicates which lines of the staff correspond to which pitches. -@syntax The clef can be set or changed with the @code{\clef} command: @lilypond[fragment,verbatim] @@ -972,7 +982,6 @@ Time signature indicates the metrum of a piece: a regular pattern of strong and weak beats. It is denoted by a fraction at the start of the staff. -@syntax The time signature is set or changed by the @code{\time} command: @@ -1082,7 +1091,6 @@ Bar lines delimit measures, but are also used to indicate repeats. Normally, they are inserted automatically. Line breaks may only happen on bar lines. -@syntax Special types of bar lines can be forced with the @code{\bar} command: @@ -1746,7 +1754,6 @@ for the problematic notes. A slur indicates that notes are to be played bound or @emph{legato}. -@syntax They are entered using parentheses: @lilypond[relative=1,fragment,verbatim] @@ -2312,7 +2319,6 @@ and might produce crashes or other errors. A glissando is a smooth change in pitch. It is denoted by a line or a wavy line between two notes. -@syntax A glissando line can be requested by attaching a @code{\glissando} to a note: @@ -2491,7 +2497,6 @@ Make beat or measure repeats. These look like percent signs. @node Repeat syntax @subsection Repeat syntax -@syntax LilyPond has one syntactic construct for specifying different types of repeats. The syntax is @@ -2733,7 +2738,6 @@ Examples: @inputfileref{input/regression,rhythmic-staff.ly}. @cindex percussion @cindex drums -@syntax Percussion notes may be entered in @code{\drums} mode, which is similar to @code{notes}. Each piece of percussion has a full name and @@ -3075,7 +3079,6 @@ current voice from its current staff to the Staff called Pianos have pedals that alter the way sound are produced. Generally, a piano has three pedals, sustain, una corda, and sostenuto. -@syntax Piano pedal instruction can be expressed by attaching @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda}, @@ -4324,7 +4327,6 @@ The key of a transposing instrument can also be specified. This applies to many wind instruments, for example, clarinets (B-flat, A and E-flat), horn (F) and trumpet (B-flat, C, D and E-flat). -@syntax The transposition is entered after the keyword @code{\transposition}: @@ -4446,7 +4448,6 @@ places where the two parts differ, they are typeset as separate voices, and stem directions are set automatically. Also, solo and @emph{a due} parts are identified and can be marked. -@syntax The syntax for part combining is @@ -4752,7 +4753,6 @@ Augmentum dots within ligatures are not handled correctly. @cindex note heads -@syntax For ancient notation, a note head style other than the @code{default} style may be chosen. This is accomplished by setting the @code{style} @@ -4797,7 +4797,6 @@ overview over all available note head styles. @cindex accidentals -@syntax Use the @code{style} property of grob @internalsref{Accidental} to select ancient accidentals. Supported styles are @@ -4873,7 +4872,6 @@ Examples: @inputfileref{input/test,ancient-accidentals.ly}. @cindex rests -@syntax Use the @code{style} property of grob @internalsref{Rest} to select ancient accidentals. Supported styles are @code{classical}, @@ -4909,7 +4907,6 @@ In this manual: @ref{Rests} gives a general introduction into the use of rests. @cindex clefs -@syntax LilyPond supports a variety of clefs, many of them ancient. @@ -5129,7 +5126,6 @@ until a new mensural g clef will have been implemented. @cindex flags -@syntax Use the @code{flag-style} property of grob @internalsref{Stem} to select ancient flags. Besides the @code{default} flag style, @@ -5172,7 +5168,6 @@ Gregorian Chant notation. @cindex time signatures -@syntax There is limited support for mensural time signatures. The glyphs are hard-wired to particular time fractions. In other words, @@ -5285,7 +5280,6 @@ of musical notation such as contemporary editions of Gregorian chant like the @emph{editio vaticana}. There are different custos glyphs used in different flavors of notational style. -@syntax For typesetting custodes, just put a @internalsref{Custos_engraver} into the @internalsref{Staff} context when declaring the @code{\paper} block, @@ -5415,7 +5409,6 @@ can be characterized as short, medium and long pause, somewhat like a chant, but is also frequently used within a single antiphonal/responsorial chant to mark the end of each section. -@syntax To use divisiones, include the file @code{gregorian-init.ly}. It contains definitions that you can apply by just inserting @@ -5479,7 +5472,6 @@ during the late 16th / early 17th century. Still, ligatures have survived in contemporary editions of Gregorian chant such as the Editio Vaticana from 1905/08. -@syntax Syntactically, ligatures are simply enclosed by @code{\[} and @code{\]}. Some ligature styles (such as Editio Vaticana) may need @@ -5519,7 +5511,6 @@ implementation is still experimental; it may output strange warnings or even crash in some cases or produce weird results on more complex ligatures. -@syntax To engrave white mensural ligatures, in the paper block the @internalsref{Mensural_ligature_engraver} has to be put into the @@ -6974,7 +6965,6 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published @end multitable -@syntax Unlike most other neumes notation systems, the input language for neumes does not necessarily reflect directly the typographical @@ -7265,7 +7255,6 @@ Trigonus: apply equal spacing, regardless of pitch. @c TODO: musicological blurb about FB -@syntax LilyPond has limited support for figured bass: @@ -7392,34 +7381,10 @@ support for contemporary notation in LilyPond is limited. @cindex cluster -In musical terminology, a @emph{cluster} denotes a range of -simultaneously sounding pitches that may change over time. The set of -available pitches to apply usually depends on the acoustic source. -Thus, in piano music, a cluster typically consists of a continuous range -of the semitones as provided by the piano's fixed set of a chromatic -scale. In choral music, each singer of the choir typically may sing an -arbitrary pitch within the cluster's range that is not bound to any -diatonic, chromatic or other scale. In electronic music, a cluster -(theoretically) may even cover a continuous range of pitches, thus -resulting in colored noise, such as pink noise. - -Clusters can be denoted in the context of ordinary staff notation by -engraving simple geometrical shapes that replace ordinary notation of -notes. Ordinary notes as musical events specify starting time and -duration of pitches; however, the duration of a note is expressed by the -shape of the note head rather than by the horizontal graphical extent of -the note symbol. In contrast, the shape of a cluster geometrically -describes the development of a range of pitches (vertical extent) over -time (horizontal extent). Still, the geometrical shape of a cluster -covers the area in which any single pitch contained in the cluster would -be notated as an ordinary note. From this point of view, it is -reasonable to specify a cluster as the envelope of a set of notes. - -@syntax - -A cluster is engraved as the envelope of a set of -cluster-notes. Cluster notes are created by applying the function -@code{notes-to-clusters} to a sequence of chords, e.g. +A cluster indicates a continuous range of pitches to be played. They +can be denoted as the envelope of a set of notes. They are entered by +applying the function @code{notes-to-clusters} to a sequence of +chords, e.g. @c @lilypond[relative=1,verbatim] \apply #notes-to-clusters { } diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index dada5aa994..49fb778ddc 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -78,23 +78,24 @@ your first sheets of music. @node First steps @section First steps -We start off by showing how very simple music is entered in LilyPond. -A note is entered by typing its name, from @samp{a} through @samp{g}, -and a number. So, if you enter - +The first example demonstrates how to enter the very simple piece of +music, a scale. A note can be entered by typing its name, from +@samp{a} through @samp{g}. So, if you enter + @example -c4 d4 e4 f4 +c d e f g a b @end example @noindent -then the result looks like this: +the result looks like this: @lilypond[notime,relative] -c4 d4 e4 f4 +c d e f g a b @end lilypond -The number specifies the length of the note, @samp{1} for a -@rglos{whole note}, @samp{2} for a @rglos{half note}, and so on: +The duration of a note is specfied by a number after the note name. +@samp{1} for a @rglos{whole note}, @samp{2} for a @rglos{half note}, +and so on @example a1 a2 a4 a16 a32 @@ -106,16 +107,16 @@ a1 a2 a4 a16 a32 \transpose c c' { a1 a2 a4 a16 a32 s16_" " } @end lilypond -If you do not specify a @rglos{duration}, the the first note is a -quarter, and for others, the last entered duration is used. +If you do not specify a @rglos{duration}, then the duration last +entered is used, and the first note will be a quarter @example -a4 a a2 a +a a8 a a2 a @end example @lilypond[notime] \set Score.timing = ##f -\transpose c c' { a a a2 a s16_" " } +\transpose c c' { a a8 a a2 a s16_" " } @end lilypond @@ -174,8 +175,8 @@ s16_" " The @rglos{clef} can be set using the @code{\clef} command: @c what is more common name treble or violin? -@c in Dutch, it's violin. -@c in English it's definitely treble. +@c in Dutch, it is violin. +@c in English it is definitely treble. @example \clef treble \clef bass @@ -1004,11 +1005,11 @@ keyword @code{\appoggiatura} or @code{\acciaccatura} For more information on @table @asis -@item grace notes +@item Grace notes see @ref{Grace notes}, -@item tuplets +@item Tuplets see @ref{Tuplets}, -@item upsteps +@item Pickups see @ref{Partial measures}. @end table @@ -1052,24 +1053,37 @@ for comments: @cindex Lyrics @cindex Songs -Lyrics are entered by separating each syllable with a space, and -surrounding them with @code{\lyrics @{ @dots{} @}}, for example, +Lyrics are entered by separating each syllable with a space, + +@example + I want to break free +@end example + +To prevent certain words (for example ``as'') as being read as a +pitch, the input-mode must be switched. This is done with +@code{\lyrics}. In @code{\lyrics} mode, all words are read as lyric +syllables. @example \lyrics @{ I want to break free @} @end example -Like notes, lyrics are also a form of music, but they must not be -printed on a staff, which is the default way to print music. To print -them as lyrics, they must be marked with @code{ \new Lyrics}: +@noindent +Again, the braces @code{@{@}} signify that the syllables are sung in +sequence. + +By default, music expressions are interpreted in @code{Staff} context. For +lyrics, this is obviously not desirable, so it is necessary +to explicitly specify a @code{Lyrics} context, + @example \new Lyrics \lyrics @{ I want to break free @} @end example + The melody for this song is as follows: @lilypond[fragment,relative=1] - \partial 8 - c8 - \times 2/3 { f4 g g } \times 2/3 { g4( a2) } + c4 + \times 2/3 { f4 g g } \times 2/3 { g4( a2) } @end lilypond The lyrics can be set to these notes, combining both with the @@ -1082,13 +1096,13 @@ aligned. In this case, there is only one melody, so we can leave it empty. The final result is -@lilypond[verbatim,fragment] +@lilypond[verbatim,fragment,raggedright] \score { \notes << - \relative c' \new Voice { - \partial 8 - c8 - \times 2/3 { f g g } \times 2/3 { g4( a2) } + \partial 4 + \relative c' { + c4 + \times 2/3 { f g g } \times 2/3 { g4( a2) } } \lyricsto "" \new Lyrics \lyrics { I want to break free } >> @@ -1123,9 +1137,10 @@ resulting in a centered hyphen between two syllables: @end example @lilypond[raggedright] \score { - << \notes \relative f' { \time 2/4 + << \notes \relative f' + \context Voice = bla { \time 2/4 f4 f c' c' } - \new Lyrics \lyrics { Twin -- kle twin -- kle } + \new Lyrics \lyrics \lyricsto "bla" { Twin -- kle twin -- kle } >> \paper { raggedright = ##t } } @@ -1144,21 +1159,21 @@ discussed in @ref{Vocal music}. @cindex chord names In popular music, it is common to denote accompaniment as chord-names. -Using them in LilyPond has two parts, just like lyrics: entering the -chords (with @code{\chords}), and printing them (with @code{\new -ChordNames}). +Such chords can be entered like notes, -Chord names are entered by starting chords mode (with @code{\chords}). -In chords mode, you can enter chords with a letter (indicating the -root of the chord), and a durations following that: -@c -@lilypond[verbatim] - \chords { c2 f4. g8 } -@end lilypond +@example + c2 f4. g8 +@end example @noindent -The result of @code{\chords} is a list of chords, and is equivalent -to entering chords with @code{<@dots{}>}. +but now, each pitch is read as the root of a chord instead of a note. +This mode is switched on with @code{\chords}: + +@lilypond[verbatim] +\score { + \chords { c2 f4. g8 } +} +@end lilypond Other chords can be created by adding modifiers after a colon. The following example shows a few common modifiers: @@ -1167,9 +1182,11 @@ following example shows a few common modifiers: \chords { c2 f4:m g4:maj7 gis1:dim7 } @end lilypond -Printing chords is done by adding @code{\new ChordNames} -before the chords thus entered: -@c +For leadsheets, chords are not printed on staves, but as names on a +line of themselves. Hence, we have to override the context with +@code{\new}, rendering the music expression in a @code{ChordNames} +context + @lilypond[verbatim] \new ChordNames \chords { c2 f4.:m g4.:maj7 gis8:dim7 } @end lilypond @@ -1191,10 +1208,10 @@ a lead sheet, for example, @lilypond[] \score { << + \partial 4 \new ChordNames \chords { r8 c2:sus4 f } \notes \relative c' { - \partial 8 - c8 + c4 \times 2/3 { f g g } \times 2/3 { g4( a2) } } \new Lyrics \lyricsto "" \lyrics { I want to break free __ } >> @@ -1213,12 +1230,14 @@ reference manual section @ref{Chords}. @cindex MIDI MIDI (Musical Instrument Digital Interface) is a standard for -connecting and recording digital instruments. A MIDI file is like a -tape recording of a MIDI instrument. The @code{\midi} block causes LilyPond -to create a MIDI file, so you can listen to the music you entered. -It is great for checking the music: octaves that are off or -accidentals that were mistyped stand out very much when listening to -the musical transcription. +connecting and controlling digital instruments. A MIDI file is like a +tape recording of a MIDI instrument. + +To create a MIDI from a music piece of music, add a +@code{\midi} block causes LilyPond to create a MIDI file, so you +can listen to the music you entered. It is great for checking the +music: octaves that are off or accidentals that were mistyped stand +out very much when listening to the musical transcription. The @code{\midi} block is added to @code{\score}, for example, @example @@ -1269,13 +1288,12 @@ example, @cindex composer @cindex Engraved by LilyPond -When the file is processed by the @code{lilypond} wrapper script -the title and composer specified are printed above the music. The -`tagline' is a short line printed at bottom of the last page which -normally says ``Engraved by LilyPond, version @dots{}''. In the -example above it is replaced by the line ``small is -beautiful.''@footnote{Nicely printed parts are good PR for us, so do -us a favor, and leave the tagline if you can.} +When the file is processed the title and composer are printed above +the music. The `tagline' is a short line printed at bottom of the last +page which normally says ``Engraved by LilyPond, version @dots{}''. In +the example above it is replaced by the line ``small is +beautiful.''@footnote{Nicely printed parts are good PR for us, so +please leave the tagline if you can.} Normally, the @code{\header} is put at the top of the file. However, for a document that contains multiple pieces (e.g. an etude book, or @@ -1322,37 +1340,31 @@ Entering such parts is done by entering each voice as a sequence (with @code{@{ .. @}}), and combining those simultaneously, separating the voices with @code{\\}: -@example - << @{ a4 g2 f4~ f4 @} \\ - @{ r4 g4 f2 f4 @} >> -@end example -@lilypond[relative=1] -\new Staff << { a4 g2 f4~ f4 } \\ - { r4 g4 f2 f4 } >> -@end lilypond +@lilypond[verbatim,relative=1] + << { a4 g2 f4~ f4 } \\ + { r4 g4 f2 f4 } >> +@end verbatim For polyphonic music typesetting, spacer rests can also be convenient: these are rests that do not print. It is useful for filling up voices that -temporarily do not play: -@example - << @{ a4 g2 f4~ f4 @} \\ - @{ s4 g4 f2 f4 @} >> -@end example +temporarily do not play. Here is the same example with a spacer rest +instead of a normal rest @lilypond[relative=1] -\new Staff << { a4 g2 f4~ f4 } \\ - { s4 g4 f2 f4 } >> + << { a4 g2 f4~ f4 } \\ + { s4 g4 f2 f4 } >> @end lilypond Again, these expressions can be nested arbitrarily: -@lilypond[fragment] +@lilypond[fragment,relative=2] << \new Staff - \relative c'' << { a4 g2 f4~ f4 } \\ - { s4 g4 f2 f4 } >> + { s4 g4 f2 f4 } + >> \new Staff - << { \clef bass 1 ~ 4 } \\ + << \clef bass + { 1 ~ 4 } \\ { f4 d e2 ~ e4} >> >> @@ -1401,9 +1413,8 @@ More information on formatting piano music is in @ref{Piano music}. When all of the elements discussed earlier are combined to produce larger files, the @code{\score} blocks get a lot bigger, because the -music expressions are longer, and, in the case of polyphonic and/or -orchestral pieces, more deeply nested. Such large expressions can -become unwieldy. +music expressions are longer, and, in the case of polyphonic pieces, +more deeply nested. Such large expressions can become unwieldy. By using variables, also known as identifiers, it is possible to break up complex music expressions. An identifier is assigned as follows: @@ -1419,7 +1430,7 @@ variable substitution: @lilypond[raggedright,verbatim] seufzer = \notes { - dis'8 e'8 + e'4( dis'4) } \score { \notes { \seufzer \seufzer @@ -1464,7 +1475,7 @@ both the part and the score. It is convenient to define the notes in a special file, for example, suppose that the @file{horn-music.ly} contains the following part of a -horn/bassoon duo. +horn/bassoon duo, @example hornNotes = \notes \relative c @{ \time 2/4 @@ -1472,9 +1483,10 @@ hornNotes = \notes \relative c @{ @} @end example -Then, an individual part is made by putting the following in a file: +Then, an individual part is made by putting the following in a file + @example -\include "horn-music.lyinc" +\include "horn-music.ly" \header @{ instrument = "Horn in F" @} @@ -1482,13 +1494,21 @@ Then, an individual part is made by putting the following in a file: \notes \transpose f c' \hornNotes @} @end example -The @code{\include} command substitutes the contents of the file at -this position in the file, so that @code{hornNotes} is defined -afterwards. The code @code{\transpose f c'} indicates that the -argument, being @code{\hornNotes}, should be transposed by a fifth -downwards: sounding @code{f} is denoted by notated @code{c'}, which -corresponds with tuning of a normal French Horn in F. The -transposition can be seen in the following output: + +The line + +@verbatim + \include "horn-music.ly" +@end verbatim + +@noindent +substitutes the contents of @file{horn-music.ly} at this position in +the file, so @code{hornNotes} is defined afterwards. The command +@code{\transpose f c'} indicates that the argument, being +@code{\hornNotes}, should be transposed by a fifth downwards: sounding +@code{f} is denoted by notated @code{c'}, which corresponds with +tuning of a normal French Horn in F. The transposition can be seen in +the following output: @lilypond[raggedright] \score { @@ -1501,7 +1521,7 @@ transposition can be seen in the following output: In ensemble pieces, one of the voices often does not play for many measures. This is denoted by a special rest, the multi-measure -rest. It is entered with a capital R followed by a duration (1 +rest. It is entered with a capital @code{R} followed by a duration (1 for a whole note, 2 for a half note, etc.) By multiplying the duration, longer rests can be constructed. For example, this rest takes 3 measures in 2/4 time: @@ -1509,14 +1529,16 @@ takes 3 measures in 2/4 time: R2*3 @end example -When printing the part, the following @code{skipBars} property must be -set to true, to prevent the rest from being expanded to three one bar -rests: +When printing the part, multi-rests +must be condensed. This is done by setting a run-time variable: @example \set Score.skipBars = ##t @end example -Prepending the rest and the property setting above, leads to the -following result: + + +This commands sets the property @code{skipBars} property in the +@code{Score} context to true (@code{##t}). Prepending the rest and +this option to the music above, leads to the following result: @lilypond[raggedright] \score {\notes { \transpose f c' \relative c { \time 2/4 @@ -1525,12 +1547,14 @@ following result: r4 f8 a cis4 f e d } }} @end lilypond + The score is made by combining all of the music in a @code{\score} -block, assuming that the other voice is in @code{bassoonNotes}, in the -file @file{bassoon-music.ly}: +block. Assuming that the other voice is in @code{bassoonNotes} in the +file @file{bassoon-music.ly}, a score is made with + @example -\include "bassoon-music.lyinc" -\include "horn-music.lyinc" +\include "bassoon-music.ly" +\include "horn-music.ly" \score @{ \simultaneous @{ @@ -1539,7 +1563,7 @@ file @file{bassoon-music.ly}: @} @} @end example -This would lead to the simple score depicted below: +leading to @lilypond[raggedright] \score { @@ -1556,6 +1580,7 @@ This would lead to the simple score depicted below: More in-depth information on preparing parts and scores is in the notation manual, in @ref{Orchestral music}. +Setting run-time variables (``properties'') is discussed in ref-TODO. @node Integrating text and music @section Integrating text and music @@ -1564,48 +1589,52 @@ notation manual, in @ref{Orchestral music}. @cindex HTML, music in @cindex Texinfo, music in -Sometimes you might want to use music examples in a text that you are -writing (for example, a musicological treatise, a songbook, or (like us) -the LilyPond manual). You can make such texts by hand, simply by -importing a PostScript figure into your word processor. However, -there is an automated procedure to reduce the amount of work. +Some texts include music examples. Examples are musicological +treatises, songbooks or manuals like this. Such texts can be made by +hand, simply by importing a PostScript figure into the word processor. +However, there is an automated procedure to reduce the amount of work +involved HTML, La@TeX{}, and Texinfo documents. + -If you use HTML, La@TeX{}, or Texinfo, you can mix text and LilyPond -code. A script called @code{lilypond-book} will extract the music -fragments, run LilyPond on them, and put back the resulting notation. -This program is fully described in @ref{lilypond-book manual}. Here -we show a small example. The example also contains explanatory text, -so we will not comment on it further: +A script called @code{lilypond-book} will extract the music fragments, +run format them, and put back the resulting notation. This program is +fully described in @ref{lilypond-book manual}. Here we show a small +example. The example also contains explanatory text, so we will not +comment on it further: @example \documentclass[a4paper]@{article@} \begin@{document@} -In a lilypond-book document, you can freely mix music and text. For -example: +Documents for lilypond-book may freely mix music and text. For +example, + \begin@{lilypond@} \score @{ \notes \relative c' @{ c2 g'2 \times 2/3 @{ f8 e d @} c'2 g4 @} @} \end@{lilypond@} -If you have no \verb+\score+ block in the fragment, -\texttt@{lilypond-book@} will supply one: +If there is no \verb+\score+ block in the fragment, +\texttt@{lilypond-book@} will supply one \begin@{lilypond@} c'4 \end@{lilypond@} -In the example you see here two things happened: a +In this example two things happened: a \verb+\score+ block was added, and the line width was set to natural -length. You can specify options by putting them in brackets: +length. + +Options are put in brackets. \begin[staffsize=26,verbatim]@{lilypond@} c'4 f16 \end@{lilypond@} -If you want to include large examples in the text it is more -convenient to put it in a separate file: + +Larger examples can be put in a separate file, and introduced with +\verb+\lilypondfile+. \lilypondfile@{screech-boink.ly@} @@ -1621,9 +1650,9 @@ lilypond-book (GNU LilyPond) 2.1.19 Reading `input/tutorial/lilybook.tex' Reading `input/screech-boink.ly' @var{lots of stuff deleted} -Writing `out/lilybook.latex' +Writing `out/lilybook.tex' $ cd out -$ latex lilybook.latex +$ latex lilybook @var{lots of stuff deleted} $ xdvi lilybook @end example @@ -1637,16 +1666,17 @@ $ ps2pdf lilybook.ps Running lilypond-book and running latex creates a lot of temporary -files. You would not want those to clutter up your working -directory. The @code{outdir} option to lilypond-book creates the -temporary files in a separate subdirectory @file{out}. +files, which would clutter up the working directory. To remedy this, +use the @code{output} option. It will create the files in a separate +subdirectory @file{out}. -The result looks more or less like this: +The result looks more or less like @separate -In a lilypond-book document, you can freely mix music and text. For -example: +Documents for lilypond-book may freely mix music and text. For +example, + @lilypond \score { \notes \relative c' { @@ -1665,15 +1695,17 @@ If you have no @code{\score} block in the fragment, c'4 @end lilypond -In the example you see here, two things happened: a +In this example two things happened: a @code{score} block was added, and the line width was set to natural -length. You can specify options by putting them in brackets: +length. + +Options are put in brackets. @lilypond[staffsize=26,verbatim] c'4 f16 @end lilypond -If you want to include large examples in the text, it is more -convenient to put it in a separate file: +Larger examples can be put in a separate file, and introduced with +@code{\lilypondfile}. @lilypondfile{screech-boink.ly} diff --git a/VERSION b/VERSION index 991be8c59f..d84cbb075a 100644 --- a/VERSION +++ b/VERSION @@ -2,5 +2,5 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=1 PATCH_LEVEL=29 -MY_PATCH_LEVEL= +MY_PATCH_LEVEL=hwn1 diff --git a/lily/accidental-placement.cc b/lily/accidental-placement.cc index 79cb293ac1..c39279072c 100644 --- a/lily/accidental-placement.cc +++ b/lily/accidental-placement.cc @@ -381,12 +381,11 @@ Accidental_placement::position_accidentals (Grob * me) head_ape-> left_skyline_ = head_skyline; head_ape->offset_ = 0.0; - head_ape->offset_ -= robust_scm2double ( me->get_property ("right-padding"), 0); - - Real padding = robust_scm2double (me->get_property ("padding"),0.2); Array left_skyline = head_ape->left_skyline_; + heighten_skyline (&left_skyline, + -robust_scm2double (me->get_property ("right-padding"), 0)); /* Add accs entries right-to-left. */ diff --git a/lily/horizontal-bracket-engraver.cc b/lily/horizontal-bracket-engraver.cc index 60a3669d7f..99836973b4 100644 --- a/lily/horizontal-bracket-engraver.cc +++ b/lily/horizontal-bracket-engraver.cc @@ -16,19 +16,19 @@ source file of the GNU LilyPond music typesetter class Horizontal_bracket_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Horizontal_bracket_engraver); + TRANSLATOR_DECLARATIONS (Horizontal_bracket_engraver); Link_array bracket_stack_; Link_array events_; int pop_count_; int push_count_; - virtual bool try_music(Music*); + virtual bool try_music (Music*); virtual void stop_translation_timestep (); virtual void process_music (); virtual void acknowledge_grob (Grob_info); }; -ENTER_DESCRIPTION(Horizontal_bracket_engraver, +ENTER_DESCRIPTION (Horizontal_bracket_engraver, "Create horizontal brackets over notes for musical analysis purposes.", "HorizontalBracket", "note-grouping-event", @@ -36,7 +36,7 @@ ENTER_DESCRIPTION(Horizontal_bracket_engraver, "", ""); -Horizontal_bracket_engraver::Horizontal_bracket_engraver() +Horizontal_bracket_engraver::Horizontal_bracket_engraver () { pop_count_ = 0; push_count_ = 0; @@ -53,8 +53,8 @@ Horizontal_bracket_engraver::try_music (Music *m) if (d == STOP) { pop_count_ ++; - if (pop_count_ > bracket_stack_.size()) - m->origin()->warning (_("Don't have that many brackets.")); + if (pop_count_ > bracket_stack_.size ()) + m->origin ()->warning (_("Don't have that many brackets.")); } else { @@ -63,7 +63,7 @@ Horizontal_bracket_engraver::try_music (Music *m) } if (pop_count_ && push_count_) - m->origin()->warning (_("Conflicting note group events.")); + m->origin ()->warning (_("Conflicting note group events.")); return true; } @@ -75,7 +75,7 @@ Horizontal_bracket_engraver::acknowledge_grob (Grob_info gi) { if (Note_column::has_interface (gi.grob_)) { - for (int i = 0; i < bracket_stack_.size(); i++) + for (int i = 0; i < bracket_stack_.size (); i++) { Side_position_interface::add_support (bracket_stack_[i], gi.grob_); Pointer_group_interface::add_grob (bracket_stack_[i], @@ -93,8 +93,8 @@ Horizontal_bracket_engraver::process_music () { Spanner * sp = make_spanner ("HorizontalBracket"); - announce_grob (sp, events_[k]->self_scm()); - for (int i = 0; i < bracket_stack_.size(); i++) + announce_grob (sp, events_[k]->self_scm ()); + for (int i = 0; i < bracket_stack_.size (); i++) { /* sp is the smallest, it should be added to the bigger brackets. @@ -111,8 +111,8 @@ Horizontal_bracket_engraver::stop_translation_timestep () { for (int i = pop_count_; i--;) { - if (bracket_stack_.size()) - typeset_grob (bracket_stack_.pop()); + if (bracket_stack_.size ()) + typeset_grob (bracket_stack_.pop ()); } pop_count_ = 0; push_count_ = 0; diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index 771db2d90d..96ec03b3fc 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -19,7 +19,7 @@ class Hyphen_engraver : public Engraver Spanner* hyphen_; Spanner * finished_hyphen_; public: - TRANSLATOR_DECLARATIONS(Hyphen_engraver); + TRANSLATOR_DECLARATIONS (Hyphen_engraver); protected: virtual void acknowledge_grob (Grob_info); @@ -121,7 +121,7 @@ Hyphen_engraver::process_music () if (ev_) { hyphen_ = make_spanner ("LyricHyphen"); - announce_grob (hyphen_, ev_->self_scm()); + announce_grob (hyphen_, ev_->self_scm ()); } } @@ -152,7 +152,7 @@ Hyphen_engraver::stop_translation_timestep () -ENTER_DESCRIPTION(Hyphen_engraver, +ENTER_DESCRIPTION (Hyphen_engraver, /* descr */ "Create lyric hyphens", /* creats*/ "LyricHyphen", /* accepts */ "hyphen-event", diff --git a/lily/identifier-smob.cc b/lily/identifier-smob.cc index 23ac02158b..678cc4a8d0 100644 --- a/lily/identifier-smob.cc +++ b/lily/identifier-smob.cc @@ -16,7 +16,7 @@ scm_t_bits package_tag; /* Print a textual represenation of the smob to a given port. */ static int -print_box (SCM b, SCM port, scm_print_state *pstate) +print_box (SCM b, SCM port, scm_print_state *) { SCM value = SCM_CELL_OBJECT_1 (b); @@ -31,7 +31,7 @@ print_box (SCM b, SCM port, scm_print_state *pstate) /* This defines the primitve `make-box', which returns a new smob of type `box', initialized to `#f'. */ -LY_DEFINE(package_identifier, "ly:export", 1,0,0, (SCM arg), +LY_DEFINE (package_identifier, "ly:export", 1,0,0, (SCM arg), "Export a Scheme object to the parser, so it is treated as an identifier.") { /* This macro creates the new objects, stores the value `#f' into it @@ -43,9 +43,9 @@ LY_DEFINE(package_identifier, "ly:export", 1,0,0, (SCM arg), /* This is the primitive `box-ref' which returns the object stored in the box. */ SCM -unpack_identifier(SCM box) +unpack_identifier (SCM box) { - if (SCM_IMP(box) || SCM_CELL_TYPE(box) != package_tag) + if (SCM_IMP (box) || SCM_CELL_TYPE (box) != package_tag) return SCM_UNDEFINED; return SCM_CELL_OBJECT_1 (box); @@ -58,4 +58,4 @@ init_box_type (void) scm_set_smob_mark (package_tag, scm_markcdr); scm_set_smob_print (package_tag, print_box); } -ADD_SCM_INIT_FUNC(package, init_box_type); +ADD_SCM_INIT_FUNC (package, init_box_type); diff --git a/lily/input-file-results.cc b/lily/input-file-results.cc index 9c9b29a3fc..c100864453 100644 --- a/lily/input-file-results.cc +++ b/lily/input-file-results.cc @@ -41,7 +41,7 @@ bool store_locations_global_b; /* no ! suffix since it doesn't modify 1st argument. */ -LY_DEFINE(ly_set_point_and_click, "ly:set-point-and-click", 1, 0, 0, +LY_DEFINE (ly_set_point_and_click, "ly:set-point-and-click", 1, 0, 0, (SCM what), "Set the options for Point-and-click source specials output. The\n" "argument is a symbol. Possible options are @code{none} (no source specials),\n" @@ -123,7 +123,7 @@ Input_file_results::~Input_file_results () global_input_file =0; - ly_clear_anonymous_modules(); + ly_clear_anonymous_modules (); } diff --git a/lily/input-smob.cc b/lily/input-smob.cc index fafeab7b7d..4ca03d940a 100644 --- a/lily/input-smob.cc +++ b/lily/input-smob.cc @@ -83,7 +83,7 @@ LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 0, (SCM sip, SCM msg), "Print @var{msg} as a GNU compliant error message, pointing to the" "location in @var{sip}.\n") { - Input *ip = unsmob_input(sip); + Input *ip = unsmob_input (sip); SCM_ASSERT_TYPE (ip, sip, SCM_ARG1, __FUNCTION__, "input location"); SCM_ASSERT_TYPE (gh_string_p (msg), msg, SCM_ARG2, __FUNCTION__, "string"); diff --git a/lily/instrument-name-engraver.cc b/lily/instrument-name-engraver.cc index 642983f72b..9793e8dae3 100644 --- a/lily/instrument-name-engraver.cc +++ b/lily/instrument-name-engraver.cc @@ -21,7 +21,7 @@ class Instrument_name_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Instrument_name_engraver); + TRANSLATOR_DECLARATIONS (Instrument_name_engraver); protected: Grob *text_; @@ -87,7 +87,7 @@ Instrument_name_engraver::acknowledge_grob (Grob_info i) { if (Bar_line::has_interface (i.grob_)) { - create_text(); + create_text (); } if (dynamic_cast (i.grob_) @@ -123,10 +123,10 @@ Instrument_name_engraver::process_music () a name to be attached to lyrics or chords. */ if (gh_string_p (get_property ("whichBar"))) - create_text(); + create_text (); } -ENTER_DESCRIPTION(Instrument_name_engraver, +ENTER_DESCRIPTION (Instrument_name_engraver, /* descr */ " Prints the name of the instrument (specified by " " @code{Staff.instrument} and @code{Staff.instr}) " "at the left of the staff. ", @@ -142,7 +142,7 @@ ENTER_DESCRIPTION(Instrument_name_engraver, class Vocal_name_engraver : public Instrument_name_engraver { public: - TRANSLATOR_DECLARATIONS(Vocal_name_engraver); + TRANSLATOR_DECLARATIONS (Vocal_name_engraver); virtual void create_text (); }; @@ -178,7 +178,7 @@ Vocal_name_engraver::create_text () -ENTER_DESCRIPTION(Vocal_name_engraver, +ENTER_DESCRIPTION (Vocal_name_engraver, /* descr */ " Prints the name of the a lyric voice (specified by " " @code{Staff.vocalName} and @code{Staff.vocNam}) " "at the left of the staff. ", diff --git a/lily/item.cc b/lily/item.cc index 2077c17b45..635ea2f1f5 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -190,7 +190,7 @@ unsmob_item (SCM s ) -ADD_INTERFACE(Item, +ADD_INTERFACE (Item, "item-interface", "\n" "\n" diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index b8426de44b..e06884464a 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -33,7 +33,7 @@ class Key_engraver : public Engraver Item * item_; public: - TRANSLATOR_DECLARATIONS(Key_engraver); + TRANSLATOR_DECLARATIONS (Key_engraver); protected: virtual void initialize (); @@ -73,7 +73,7 @@ Key_engraver::create_key (bool def) item_->set_property ("old-accidentals", get_property ("lastKeySignature")); item_->set_property ("new-accidentals", get_property ("keySignature")); - announce_grob(item_, key_ev_ ? key_ev_->self_scm() : SCM_EOL); + announce_grob (item_, key_ev_ ? key_ev_->self_scm () : SCM_EOL); } if (!def) @@ -188,13 +188,13 @@ Key_engraver::initialize () daddy_context_->set_property ("keySignature", SCM_EOL); daddy_context_->set_property ("lastKeySignature", SCM_EOL); - Pitch p(0,0,0); + Pitch p (0,0,0); daddy_context_->set_property ("tonic", p.smobbed_copy ()); } -ENTER_DESCRIPTION(Key_engraver, +ENTER_DESCRIPTION (Key_engraver, /* descr */ "", /* creats*/ "KeySignature", /* accepts */ "key-change-event", diff --git a/lily/key-performer.cc b/lily/key-performer.cc index 54617f292d..50a352bed1 100644 --- a/lily/key-performer.cc +++ b/lily/key-performer.cc @@ -16,7 +16,7 @@ class Key_performer : public Performer { public: - TRANSLATOR_DECLARATIONS(Key_performer); + TRANSLATOR_DECLARATIONS (Key_performer); ~Key_performer (); protected: @@ -98,7 +98,7 @@ Key_performer::try_music (Music* req) return false; } -ENTER_DESCRIPTION(Key_performer, +ENTER_DESCRIPTION (Key_performer, "","", "key-change-event", "","",""); diff --git a/lily/kpath.cc b/lily/kpath.cc index cb6968aafb..bc2ac1a3fa 100644 --- a/lily/kpath.cc +++ b/lily/kpath.cc @@ -46,13 +46,13 @@ kpathsea_find_afm (char const * name) #if (KPATHSEA && HAVE_KPSE_FIND_FILE) char * name_ptr = kpse_find_file (name, kpse_afm_format, true); - if(!name_ptr) + if (!name_ptr) { /* don't mutter about afms, since we try to find them first, and lots of TFMs don't have AFMs. */ - // warning (_f("kpathsea couldn't find AFM file `%s'", name)); + // warning (_f ("kpathsea couldn't find AFM file `%s'", name)); } else return name_ptr; @@ -71,9 +71,9 @@ kpathsea_find_tfm (char const * name) #if (KPATHSEA && HAVE_KPSE_FIND_FILE) char * name_ptr = kpse_find_file (name, kpse_tfm_format, true); - if(!name_ptr) + if (!name_ptr) { - warning (_f("Kpathsea couldn't find TFM file `%s'", name)); + warning (_f ("Kpathsea couldn't find TFM file `%s'", name)); } else return name_ptr; diff --git a/lily/ligature-bracket-engraver.cc b/lily/ligature-bracket-engraver.cc index 94548c920c..975b85b775 100644 --- a/lily/ligature-bracket-engraver.cc +++ b/lily/ligature-bracket-engraver.cc @@ -25,7 +25,7 @@ protected: virtual void typeset_ligature (Spanner *ligature, Array); public: - TRANSLATOR_DECLARATIONS(Ligature_bracket_engraver); + TRANSLATOR_DECLARATIONS (Ligature_bracket_engraver); private: void typeset_ligature_bracket (); @@ -62,7 +62,7 @@ Ligature_bracket_engraver::acknowledge_grob (Grob_info info) } } -ENTER_DESCRIPTION(Ligature_bracket_engraver, +ENTER_DESCRIPTION (Ligature_bracket_engraver, /* descr */ "Handles Ligature_events by engraving Ligature brackets.", /* creats*/ "TupletBracket", /* accepts */ "ligature-event", diff --git a/lily/ligature-engraver.cc b/lily/ligature-engraver.cc index 5e2f63ff0a..f1b120d146 100644 --- a/lily/ligature-engraver.cc +++ b/lily/ligature-engraver.cc @@ -206,7 +206,7 @@ Ligature_engraver::process_music () ligature_start_mom_ = now_mom (); - announce_grob(ligature_, reqs_drul_[START]->self_scm()); + announce_grob (ligature_, reqs_drul_[START]->self_scm ()); override_stencil_callback (); } } diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 773f072aa3..44cedbbd03 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -22,8 +22,8 @@ source-file.hh includes cmath which undefines isinf and isnan */ -inline int my_isinf(Real r) { return isinf(r); } -inline int my_isnan(Real r) { return isnan(r); } +inline int my_isinf (Real r) { return isinf (r); } +inline int my_isnan (Real r) { return isnan (r); } @@ -102,7 +102,7 @@ gulp_file_to_string (String fn) return result; } -LY_DEFINE(ly_gulp_file, "ly:gulp-file", 1,0, 0, +LY_DEFINE (ly_gulp_file, "ly:gulp-file", 1,0, 0, (SCM name), "Read the file named @var{name}, and return its contents in a string. The " " file is looked up using the lilypond search path.") @@ -126,7 +126,7 @@ ly_scm2string (SCM s) { assert (gh_string_p (s)); - char *p = SCM_STRING_CHARS(s); + char *p = SCM_STRING_CHARS (s); String r (p); return r; } @@ -149,7 +149,7 @@ index_set_cell (SCM s, Direction d, SCM v) return s; } -LY_DEFINE(ly_warning,"ly:warn", 1, 0, 0, +LY_DEFINE (ly_warning,"ly:warn", 1, 0, 0, (SCM str),"Scheme callable function to issue the warning @code{msg}.") { SCM_ASSERT_TYPE (gh_string_p (str), str, SCM_ARG1, __FUNCTION__, "string"); @@ -157,7 +157,7 @@ LY_DEFINE(ly_warning,"ly:warn", 1, 0, 0, return SCM_BOOL_T; } -LY_DEFINE(ly_dir_p, "ly:dir?", 1,0, 0, (SCM s), +LY_DEFINE (ly_dir_p, "ly:dir?", 1,0, 0, (SCM s), "type predicate. A direction is a -1, 0 or 1, where -1 represents " "left or down and 1 represents right or up. ") { @@ -313,7 +313,7 @@ ly_scm2offset (SCM s) } -LY_DEFINE(ly_number2string, "ly:number->string", 1, 0,0, +LY_DEFINE (ly_number2string, "ly:number->string", 1, 0,0, (SCM s), " converts @var{num} to a string without generating many decimals. It " "leaves a space at the end.") @@ -366,7 +366,7 @@ wave_sweep_goodbye (void *dummy1, void *dummy2, void *dummy3) #include "version.hh" -LY_DEFINE(ly_version, "ly:version", 0, 0, 0, (), +LY_DEFINE (ly_version, "ly:version", 0, 0, 0, (), "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 ")" ; @@ -374,7 +374,7 @@ LY_DEFINE(ly_version, "ly:version", 0, 0, 0, (), return gh_eval_str ((char*)vs); } -LY_DEFINE(ly_unit, "ly:unit", 0, 0, 0, (), +LY_DEFINE (ly_unit, "ly:unit", 0, 0, 0, (), "Return the unit used for lengths as a string.") { return scm_makfrom0str (INTERNAL_UNIT); @@ -382,7 +382,7 @@ LY_DEFINE(ly_unit, "ly:unit", 0, 0, 0, (), -LY_DEFINE(ly_dimension_p, "ly:dimension?", 1, 0, 0, (SCM d), +LY_DEFINE (ly_dimension_p, "ly:dimension?", 1, 0, 0, (SCM d), "Return @var{d} is a number. Used to distinguish length " "variables from normal numbers.") { @@ -464,9 +464,9 @@ SCM ly_assoc_cdr (SCM key, SCM alist) { if (gh_pair_p (alist)) { - SCM trykey = ly_caar(alist); - if(gh_pair_p(trykey) && to_boolean(scm_equal_p(key,ly_cdr(trykey)))) - return ly_car(alist); + SCM trykey = ly_caar (alist); + if (gh_pair_p (trykey) && to_boolean (scm_equal_p (key,ly_cdr (trykey)))) + return ly_car (alist); else return ly_assoc_cdr (key, ly_cdr (alist)); } @@ -679,12 +679,12 @@ taint (SCM *) SCM display_list (SCM s) { - SCM p = scm_current_output_port(); + SCM p = scm_current_output_port (); scm_puts ("(", p); - for (; gh_pair_p(s); s =gh_cdr(s)) + for (; gh_pair_p (s); s =gh_cdr (s)) { - scm_display (gh_car(s), p); + scm_display (gh_car (s), p); scm_puts (" ", p); } scm_puts (")", p); @@ -713,12 +713,12 @@ int_list_to_slice (SCM l) PRE: length (L) > 0 */ SCM -robust_list_ref(int i, SCM l) +robust_list_ref (int i, SCM l) { - while (i-- > 0 && gh_pair_p (gh_cdr(l))) + while (i-- > 0 && gh_pair_p (gh_cdr (l))) l = gh_cdr (l); - return gh_car(l); + return gh_car (l); } @@ -790,7 +790,7 @@ alist_to_hashq (SCM alist) /* Debugging mem leaks: */ -LY_DEFINE(ly_protects, "ly:protects", 0, 0, 0, (), +LY_DEFINE (ly_protects, "ly:protects", 0, 0, 0, (), "Return hash of protected objects.") { return scm_protects; diff --git a/lily/line-interface.cc b/lily/line-interface.cc index e53e40e22d..eb5f8e9756 100644 --- a/lily/line-interface.cc +++ b/lily/line-interface.cc @@ -96,7 +96,7 @@ Line_interface::line (Grob *me, Offset from, Offset to) } } -ADD_INTERFACE(Line_interface, "line-interface", +ADD_INTERFACE (Line_interface, "line-interface", "Generic line objects. Any object using lines supports this. Normally," "you get a straight line. If @code{dash-period} is defined, a dashed line is " "produced; the length of the dashes is tuned with " diff --git a/lily/line-spanner.cc b/lily/line-spanner.cc index b9bea18d6f..6456135af9 100644 --- a/lily/line-spanner.cc +++ b/lily/line-spanner.cc @@ -37,7 +37,7 @@ zigzag_stencil (Grob *me, double w = robust_scm2double (me->get_property ("zigzag-width"), 1)*staff_space; double l = robust_scm2double ( me->get_property ("zigzag-length"), 1)* w; - double h = l>w/2 ? sqrt(l*l-w*w/4) : 0; + double h = l>w/2 ? sqrt (l*l-w*w/4) : 0; SCM list = scm_list_n (ly_symbol2scm ("zigzag-line"), gh_bool2scm (true), @@ -56,7 +56,7 @@ zigzag_stencil (Grob *me, return Stencil (b, list); } -MAKE_SCHEME_CALLBACK(Line_spanner, after_line_breaking, 1); +MAKE_SCHEME_CALLBACK (Line_spanner, after_line_breaking, 1); SCM Line_spanner::after_line_breaking (SCM g) { @@ -78,8 +78,8 @@ Line_spanner::after_line_breaking (SCM g) --hwn. */ - if (sp->get_bound (LEFT)->break_status_dir() - && !sp->get_bound (RIGHT)->break_status_dir()) + if (sp->get_bound (LEFT)->break_status_dir () + && !sp->get_bound (RIGHT)->break_status_dir ()) { /* Can't do suicide, since this mucks up finding the trend. @@ -139,7 +139,7 @@ Line_spanner::line_stencil (Grob *me, mol.translate (from); return mol; } - return Stencil(); + return Stencil (); } /* @@ -190,13 +190,13 @@ Line_spanner::print (SCM smob) Offset his_off; - if (bound[RIGHT]->break_status_dir()) + if (bound[RIGHT]->break_status_dir ()) { if (bound[LEFT]->break_status_dir ()) { programming_error ("line-spanner with two broken ends. Farewell sweet world."); - me->suicide(); + me->suicide (); return SCM_EOL; } @@ -216,7 +216,7 @@ Line_spanner::print (SCM smob) { programming_error ("no note heads for the line spanner on next line?" " Confused."); - me->suicide(); + me->suicide (); return SCM_EOL; } @@ -245,7 +245,7 @@ Line_spanner::print (SCM smob) dz = (dz.length () - 2*gap) *dir; - Stencil l (line_stencil (me, Offset(0, 0), dz)); + Stencil l (line_stencil (me, Offset (0, 0), dz)); l.translate (dir * gap + p1 - Offset (me->relative_coordinate (commonx, X_AXIS), diff --git a/lily/lookup.cc b/lily/lookup.cc index f9753cfad4..2ebe0baa07 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -159,7 +159,7 @@ Lookup::filled_box (Box b) * | | * | | * |<-------------------------->| - * Box extent(X_AXIS) + * Box extent (X_AXIS) */ Stencil Lookup::round_filled_box (Box b, Real blotdiameter) @@ -202,12 +202,12 @@ Lookup::round_filled_box (Box b, Real blotdiameter) * touch each other will in general not work as expected for non-null * blotdiameter. * - * (c) Given a polygon ((x0, y0), (x1, y1), ... , (x(n-1), y(n-1))), + * (c) Given a polygon ((x0, y0), (x1, y1), ... , (x (n-1), y (n-1))), * if there is a natural number k such that blotdiameter is greater - * than the maximum of { | (x(k mod n), y(k mod n)) - (x((k+1) mod n), - * y((k+1) mod n)) |, | (x(k mod n), y(k mod n)) - (x((k+2) mod n), - * y((k+2) mod n)) |, | (x((k+1) mod n), y((k+1) mod n)) - (x((k+2) - * mod n), y((k+2) mod n)) | }, then the outline of the rounded + * than the maximum of { | (x (k mod n), y (k mod n)) - (x ((k+1) mod n), + * y ((k+1) mod n)) |, | (x (k mod n), y (k mod n)) - (x ((k+2) mod n), + * y ((k+2) mod n)) |, | (x ((k+1) mod n), y ((k+1) mod n)) - (x ((k+2) + * mod n), y ((k+2) mod n)) | }, then the outline of the rounded * polygon will exceed the outline of the core polygon. In other * words: Do not draw rounded polygons that have a leg smaller or * thinner than blotdiameter (or set blotdiameter to a sufficiently @@ -218,7 +218,7 @@ Lookup::round_filled_box (Box b, Real blotdiameter) * to a core filled polygon. For details of these two different * approaches, see the thread upon the ledger lines patch that started * on March 25, 2002 on the devel mailing list. The below version of - * round_filled_polygon() sticks to the moulding model, which the + * round_filled_polygon () sticks to the moulding model, which the * majority of the list participants finally voted for. This, * however, results in the above limitations and a much increased * complexity of the algorithm, since it has to compute a shrinked @@ -287,7 +287,7 @@ Lookup::round_filled_polygon (Array points, Real blotdiameter) Offset p13n = 0.5 * (p10n + p12n); Offset p14n = 0.5 * (p10n - p12n); Offset p13; - Real d = p13n.length () * p14n.length (); // distance p3n to line(p1..p0) + 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 @@ -385,7 +385,7 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick) ly_quote_scm (list), gh_double2scm (linethick), SCM_UNDEFINED)); - Box b(curve.extent (X_AXIS), + Box b (curve.extent (X_AXIS), curve.extent (Y_AXIS)); b[X_AXIS].unite (back.extent (X_AXIS)); @@ -657,7 +657,7 @@ Lookup::repeat_slash (Real w, Real s, Real t) SCM slashnodot = scm_list_n (ly_symbol2scm ("repeat-slash"), wid, sl, thick, SCM_UNDEFINED); - Box b (Interval (0, w + sqrt (sqr(t/s) + sqr (t))), + Box b (Interval (0, w + sqrt (sqr (t/s) + sqr (t))), Interval (0, w * s)); return Stencil (b, slashnodot); // http://slashnodot.org @@ -668,9 +668,9 @@ Stencil Lookup::bracket (Axis a, Interval iv, Real thick, Real protude, 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; + b[other] = Interval (-1, 1) * thick * 0.5; Stencil m = round_filled_box (b, blot); @@ -694,7 +694,7 @@ Lookup::triangle (Interval iv, Real thick, Real protude) SCM s = scm_list_n (ly_symbol2scm ("symmetric-x-triangle"), gh_double2scm (thick), - gh_double2scm (iv.length()), + gh_double2scm (iv.length ()), gh_double2scm (protude), SCM_UNDEFINED); return Stencil (b, s); @@ -704,17 +704,17 @@ Lookup::triangle (Interval iv, Real thick, Real protude) /* TODO: use rounded boxes. */ -LY_DEFINE(ly_bracket ,"ly:bracket", +LY_DEFINE (ly_bracket ,"ly:bracket", 4, 0, 0, (SCM a, SCM iv, SCM t, SCM p), "Make a bracket in direction @var{a}. The extent of the bracket is " "given by @var{iv}. The wings protude by an amount of @var{p}, which " "may be negative. The thickness is given by @var{t}.") { - SCM_ASSERT_TYPE(is_axis (a), a, SCM_ARG1, __FUNCTION__, "axis") ; - SCM_ASSERT_TYPE(is_number_pair (iv), iv, SCM_ARG2, __FUNCTION__, "number pair") ; - SCM_ASSERT_TYPE(gh_number_p (t), a, SCM_ARG3, __FUNCTION__, "number") ; - SCM_ASSERT_TYPE(gh_number_p (p), a, SCM_ARG4, __FUNCTION__, "number") ; + SCM_ASSERT_TYPE (is_axis (a), a, SCM_ARG1, __FUNCTION__, "axis") ; + SCM_ASSERT_TYPE (is_number_pair (iv), iv, SCM_ARG2, __FUNCTION__, "number pair") ; + SCM_ASSERT_TYPE (gh_number_p (t), a, SCM_ARG3, __FUNCTION__, "number") ; + SCM_ASSERT_TYPE (gh_number_p (p), a, SCM_ARG4, __FUNCTION__, "number") ; return Lookup::bracket ((Axis)gh_scm2int (a), ly_scm2interval (iv), @@ -725,7 +725,7 @@ LY_DEFINE(ly_bracket ,"ly:bracket", -LY_DEFINE(ly_filled_box ,"ly:round-filled-box", +LY_DEFINE (ly_filled_box ,"ly:round-filled-box", 3, 0, 0, (SCM xext, SCM yext, SCM blot), "Make a @code{Stencil} " @@ -733,9 +733,9 @@ LY_DEFINE(ly_filled_box ,"ly:round-filled-box", "@var{yext} and roundness @var{blot}." ) { - SCM_ASSERT_TYPE(is_number_pair (xext), xext, SCM_ARG1, __FUNCTION__, "number pair") ; - SCM_ASSERT_TYPE(is_number_pair (yext), yext, SCM_ARG2, __FUNCTION__, "number pair") ; - SCM_ASSERT_TYPE(gh_number_p (blot), blot, SCM_ARG3, __FUNCTION__, "number") ; + SCM_ASSERT_TYPE (is_number_pair (xext), xext, SCM_ARG1, __FUNCTION__, "number pair") ; + SCM_ASSERT_TYPE (is_number_pair (yext), yext, SCM_ARG2, __FUNCTION__, "number pair") ; + SCM_ASSERT_TYPE (gh_number_p (blot), blot, SCM_ARG3, __FUNCTION__, "number") ; return Lookup::round_filled_box (Box (ly_scm2interval (xext), ly_scm2interval (yext)), gh_scm2double (blot)).smobbed_copy (); diff --git a/lily/ly-module.cc b/lily/ly-module.cc index 008c4224b1..4f4aecb873 100644 --- a/lily/ly-module.cc +++ b/lily/ly-module.cc @@ -46,7 +46,7 @@ ly_clear_anonymous_modules () UGH. */ - SCM_STRUCT_DATA(gh_car(s))[scm_module_index_obarray] = (long unsigned int) tab; + SCM_STRUCT_DATA (gh_car (s))[scm_module_index_obarray] = (long unsigned int) tab; } } @@ -70,7 +70,7 @@ ly_copy_module_variables (SCM dest, SCM src) { SCM_VALIDATE_MODULE (1, src); - SCM obarr= SCM_MODULE_OBARRAY(src); + SCM obarr= SCM_MODULE_OBARRAY (src); scm_internal_hash_fold ((Hash_cl_func) &define_one_var, (void*) dest, SCM_EOL, obarr); } @@ -85,7 +85,7 @@ ly_module_symbols (SCM mod) { SCM_VALIDATE_MODULE (1, mod); - SCM obarr= SCM_MODULE_OBARRAY(mod); + SCM obarr= SCM_MODULE_OBARRAY (mod); return scm_internal_hash_fold ((Hash_cl_func) &accumulate_symbol, NULL, SCM_EOL, obarr); } @@ -101,7 +101,7 @@ ly_module_to_alist (SCM mod) SCM_VALIDATE_MODULE (1, mod); - SCM obarr= SCM_MODULE_OBARRAY(mod); + SCM obarr= SCM_MODULE_OBARRAY (mod); return scm_internal_hash_fold ((Hash_cl_func) &entry_to_alist, NULL, SCM_EOL, obarr); } diff --git a/lily/lyric-combine-music-iterator.cc b/lily/lyric-combine-music-iterator.cc index 4c176aacf2..74c076670b 100644 --- a/lily/lyric-combine-music-iterator.cc +++ b/lily/lyric-combine-music-iterator.cc @@ -19,11 +19,11 @@ class Lyric_combine_music_iterator : public Music_iterator public: Lyric_combine_music_iterator (); Lyric_combine_music_iterator (Lyric_combine_music_iterator const&src); - DECLARE_SCHEME_CALLBACK(constructor, ()); + DECLARE_SCHEME_CALLBACK (constructor, ()); protected: virtual void construct_children (); virtual Moment pending_moment () const; - virtual void do_quit(); + virtual void do_quit (); virtual void process (Moment); virtual Music_iterator *try_music_in_children (Music *) const; @@ -88,12 +88,12 @@ Lyric_combine_music_iterator::ok () const } void -Lyric_combine_music_iterator::derived_mark()const +Lyric_combine_music_iterator::derived_mark ()const { if (music_iter_) - scm_gc_mark (music_iter_->self_scm()); + scm_gc_mark (music_iter_->self_scm ()); if (lyric_iter_) - scm_gc_mark (lyric_iter_->self_scm()); + scm_gc_mark (lyric_iter_->self_scm ()); } void @@ -127,7 +127,7 @@ Lyric_combine_music_iterator::get_busy_status () const Context * tr = music_iter_->get_outlet (); SCM grobs = tr->get_property ("busyGrobs"); - Moment now = tr->now_mom(); + Moment now = tr->now_mom (); for (; gh_pair_p (grobs); grobs = gh_cdr (grobs)) { SCM grob = gh_cdar (grobs); @@ -177,9 +177,9 @@ void Lyric_combine_music_iterator::do_quit () { if (music_iter_) - music_iter_->quit(); + music_iter_->quit (); if (lyric_iter_) - lyric_iter_->quit(); + lyric_iter_->quit (); } Music_iterator* diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 20cf201bdc..e93c9bccdf 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -26,7 +26,7 @@ protected: virtual void process_music (); public: - TRANSLATOR_DECLARATIONS(Lyric_engraver); + TRANSLATOR_DECLARATIONS (Lyric_engraver); private: Music * event_; Item* text_; @@ -61,7 +61,7 @@ Lyric_engraver::process_music () text_= make_item ("LyricText"); text_->set_property ("text", event_->get_property ("text")); - announce_grob (text_, event_->self_scm()); + announce_grob (text_, event_->self_scm ()); } } @@ -135,7 +135,7 @@ Lyric_engraver::stop_translation_timestep () } -ENTER_DESCRIPTION(Lyric_engraver, +ENTER_DESCRIPTION (Lyric_engraver, /* descr */ "", /* creats*/ "", /* accepts */ "lyric-event", diff --git a/lily/lyric-extender.cc b/lily/lyric-extender.cc index a367065814..92b1ca711a 100644 --- a/lily/lyric-extender.cc +++ b/lily/lyric-extender.cc @@ -71,7 +71,7 @@ Lyric_extender::print (SCM smob) Spanner *orig = dynamic_cast (me->original_); bool last_line = orig - && (me->get_break_index () == orig->broken_intos_.size() - 2) + && (me->get_break_index () == orig->broken_intos_.size () - 2) && !Lyric_extender::is_visible (orig->broken_intos_.top ()); diff --git a/lily/lyric-hyphen.cc b/lily/lyric-hyphen.cc index f7a7221afd..98b2b22403 100644 --- a/lily/lyric-hyphen.cc +++ b/lily/lyric-hyphen.cc @@ -27,7 +27,7 @@ Hyphen_spanner::print (SCM smob) 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[LEFT]) == Paper_column::when_mom (bounds[RIGHT]->get_column ())) return SCM_EOL; Grob * common = bounds[LEFT]->common_refpoint (bounds[RIGHT], X_AXIS); diff --git a/lily/lyric-performer.cc b/lily/lyric-performer.cc index ae6e778ab2..2cc834ef9f 100644 --- a/lily/lyric-performer.cc +++ b/lily/lyric-performer.cc @@ -14,7 +14,7 @@ class Lyric_performer : public Performer { public: - TRANSLATOR_DECLARATIONS(Lyric_performer); + TRANSLATOR_DECLARATIONS (Lyric_performer); protected: virtual bool try_music (Music* req); @@ -73,4 +73,4 @@ Lyric_performer::try_music (Music* req) return false; } -ENTER_DESCRIPTION(Lyric_performer,"","","lyric-event","","",""); +ENTER_DESCRIPTION (Lyric_performer,"","","lyric-event","","",""); diff --git a/lily/main.cc b/lily/main.cc index d3f29fdd99..337918b3f2 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -198,7 +198,7 @@ usage () printf ("\n\n"); printf (_ ("Typeset music and/or produce MIDI from FILE.").to_str0 ()); printf ("\n\n"); - printf(_ ("LilyPond produces beautiful music notation.").to_str0 ()); + printf (_ ("LilyPond produces beautiful music notation.").to_str0 ()); printf ("\n"); printf (_f ("For more information, see %s,", PROGRAM_URL).to_str0 ()); printf ("\n\n"); diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index 0400f74509..3dc5cda209 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -23,7 +23,7 @@ class Mark_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Mark_engraver); + TRANSLATOR_DECLARATIONS (Mark_engraver); protected: Item* text_; @@ -83,7 +83,7 @@ Mark_engraver::create_items (Music *ev) return; text_ = make_item ("RehearsalMark"); - announce_grob(text_, ev->self_scm()); + announce_grob (text_, ev->self_scm ()); } @@ -144,7 +144,7 @@ Mark_engraver::process_music () } } -ENTER_DESCRIPTION(Mark_engraver, +ENTER_DESCRIPTION (Mark_engraver, /* descr */ "", /* creats*/ "RehearsalMark", /* accepts */ "mark-event", diff --git a/lily/measure-grouping-engraver.cc b/lily/measure-grouping-engraver.cc index d4fdd3cace..67720943c8 100644 --- a/lily/measure-grouping-engraver.cc +++ b/lily/measure-grouping-engraver.cc @@ -15,7 +15,7 @@ class Measure_grouping_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Measure_grouping_engraver); + TRANSLATOR_DECLARATIONS (Measure_grouping_engraver); protected: Spanner * grouping_; @@ -27,7 +27,7 @@ protected: }; void -Measure_grouping_engraver::finalize() +Measure_grouping_engraver::finalize () { if (grouping_) { @@ -51,7 +51,7 @@ Measure_grouping_engraver::acknowledge_grob (Grob_info gi) void Measure_grouping_engraver::process_music () { - Moment now = now_mom(); + Moment now = now_mom (); if (grouping_ && now.main_part_ >= stop_grouping_mom_ && !now.grace_part_) { grouping_->set_bound (RIGHT, @@ -78,7 +78,7 @@ Measure_grouping_engraver::process_music () s = gh_cdr (s) ) { - int grouplen = gh_scm2int (gh_car(s)); + int grouplen = gh_scm2int (gh_car (s)); if (where == mp) { if (grouping_) @@ -92,7 +92,7 @@ Measure_grouping_engraver::process_music () announce_grob (grouping_, SCM_EOL); - stop_grouping_mom_ = now.main_part_ + Rational(grouplen - 1) * bl ; + stop_grouping_mom_ = now.main_part_ + Rational (grouplen - 1) * bl ; get_global_context ()->add_moment_to_process (Moment (stop_grouping_mom_)); if (grouplen == 3) @@ -105,12 +105,12 @@ Measure_grouping_engraver::process_music () } } } -Measure_grouping_engraver::Measure_grouping_engraver() +Measure_grouping_engraver::Measure_grouping_engraver () { grouping_ = 0; } -ENTER_DESCRIPTION(Measure_grouping_engraver, +ENTER_DESCRIPTION (Measure_grouping_engraver, /* descr */ "Creates Measure_grouping objects using beatGrouping property", /* creats*/ "MeasureGrouping", /* accepts */ "", diff --git a/lily/measure-grouping-spanner.cc b/lily/measure-grouping-spanner.cc index 20c8cd3494..62c7c287ab 100644 --- a/lily/measure-grouping-spanner.cc +++ b/lily/measure-grouping-spanner.cc @@ -27,7 +27,7 @@ Measure_grouping::print (SCM grob) Real height = robust_scm2double (me->get_property ("height"), 1); 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), + Grob *common = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS); Interval rext = me->get_bound (RIGHT)->extent (common, X_AXIS); @@ -55,7 +55,7 @@ Measure_grouping::print (SCM grob) } m.align_to (Y_AXIS, DOWN); - return m.smobbed_copy(); + return m.smobbed_copy (); } ADD_INTERFACE (Measure_grouping,"measure-grouping-interface", diff --git a/lily/melisma-translator.cc b/lily/melisma-translator.cc index 1ac8032102..5f057b28d5 100644 --- a/lily/melisma-translator.cc +++ b/lily/melisma-translator.cc @@ -22,7 +22,7 @@ class Melisma_translator : public Translator { public: - TRANSLATOR_DECLARATIONS(Melisma_translator); + TRANSLATOR_DECLARATIONS (Melisma_translator); protected: virtual bool try_music (Music *); virtual void process_music (); @@ -68,12 +68,12 @@ Melisma_translator::start_translation_timestep () event_ = 0; } -Melisma_translator::Melisma_translator() +Melisma_translator::Melisma_translator () { event_ = 0; } -ENTER_DESCRIPTION(Melisma_translator, +ENTER_DESCRIPTION (Melisma_translator, /* descr */ "This translator collects melisma information about ties, beams, and user settings (@code{melismaBusy}, and signals it to the @code{\addlyrics} code. ", /* creats*/ "", /* accepts */ "melisma-playing-event melisma-span-event", diff --git a/lily/mensural-ligature-engraver.cc b/lily/mensural-ligature-engraver.cc index 299d764447..541df71401 100644 --- a/lily/mensural-ligature-engraver.cc +++ b/lily/mensural-ligature-engraver.cc @@ -54,7 +54,7 @@ protected: virtual void build_ligature (Spanner *ligature, Array primitives); public: - TRANSLATOR_DECLARATIONS(Mensural_ligature_engraver); + TRANSLATOR_DECLARATIONS (Mensural_ligature_engraver); private: int apply_transition (Array primitives, @@ -337,7 +337,7 @@ Mensural_ligature_engraver::transform_heads (Array primitives) * these properties via the concrete Ligature grob (like * MensuralLigature) and then copy these properties as necessary to * each of the NoteHead grobs. This is what - * propagate_properties() does. + * propagate_properties () does. */ void Mensural_ligature_engraver::propagate_properties (Spanner *ligature, diff --git a/lily/mensural-ligature.cc b/lily/mensural-ligature.cc index c696661d8a..f7b6927f28 100644 --- a/lily/mensural-ligature.cc +++ b/lily/mensural-ligature.cc @@ -54,7 +54,7 @@ brew_flexa (Grob *me, Real y_correction = (cauda_direction == UP) ? +0.5*height : - -0.5*height - cauda_box_y.length(); + -0.5*height - cauda_box_y.length (); Box cauda_box (cauda_box_x, cauda_box_y); Stencil cauda = Lookup::filled_box (cauda_box); @@ -66,8 +66,8 @@ brew_flexa (Grob *me, // Compensate optical illusion regarding vertical position of left // and right endings due to slope. - Real ypos_correction = -0.1*staff_space * sign(slope); - Real slope_correction = 0.2*staff_space * sign(slope); + Real ypos_correction = -0.1*staff_space * sign (slope); + Real slope_correction = 0.2*staff_space * sign (slope); Real corrected_slope = slope + slope_correction/width; if (solid) @@ -80,13 +80,13 @@ brew_flexa (Grob *me, { Stencil left_edge = Lookup::beam (corrected_slope, thickness, height, 0.0); - stencil.add_stencil(left_edge); + stencil.add_stencil (left_edge); Stencil right_edge = Lookup::beam (corrected_slope, thickness, height, 0.0); right_edge.translate_axis (width-thickness, X_AXIS); right_edge.translate_axis (corrected_slope * (width-thickness), Y_AXIS); - stencil.add_stencil(right_edge); + stencil.add_stencil (right_edge); Stencil bottom_edge = Lookup::beam (corrected_slope, width, thickness, 0.0); @@ -157,7 +157,7 @@ internal_brew_primitive (Grob *me, bool ledger_take_space) switch (primitive) { case MLP_NONE: - return Stencil(); + return Stencil (); case MLP_BB: out = brew_flexa (me, delta_pitch, false, flexa_width, thickness, true, DOWN); @@ -203,11 +203,11 @@ internal_brew_primitive (Grob *me, bool ledger_take_space) } int pos = (int)rint (Staff_symbol_referencer::get_position (me)); - add_ledger_lines(me, &out, pos, 0, ledger_take_space); + add_ledger_lines (me, &out, pos, 0, ledger_take_space); if (primitive & MLP_FLEXA) { pos += delta_pitch; - add_ledger_lines(me, &out, pos, 0.5*delta_pitch, ledger_take_space); + add_ledger_lines (me, &out, pos, 0.5*delta_pitch, ledger_take_space); } return out; diff --git a/lily/metronome-engraver.cc b/lily/metronome-engraver.cc index bf5e4b1414..877121403b 100644 --- a/lily/metronome-engraver.cc +++ b/lily/metronome-engraver.cc @@ -22,7 +22,7 @@ class Metronome_mark_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Metronome_mark_engraver); + TRANSLATOR_DECLARATIONS (Metronome_mark_engraver); protected: Item *text_; Grob *bar_line_; @@ -81,7 +81,7 @@ Metronome_mark_engraver::create_items (Music *rq) text_ = make_item ("MetronomeMark"); - announce_grob(text_, rq->self_scm()); + announce_grob (text_, rq->self_scm ()); } @@ -101,13 +101,13 @@ Metronome_mark_engraver::process_music () SCM proc = get_property ("metronomeMarkFormatter"); SCM result= scm_call_2 (proc, mark_ev_->self_scm (), - daddy_context_->self_scm()); + daddy_context_->self_scm ()); text_->set_property ("text", result); } } -ENTER_DESCRIPTION(Metronome_mark_engraver, +ENTER_DESCRIPTION (Metronome_mark_engraver, /* descr */ "Engrave metro nome marking. This delegates the real work to the function in the metronomeMarkFormatter property", /* creats*/ "MetronomeMark", /* accepts */ "metronome-change-event", diff --git a/lily/midi-item.cc b/lily/midi-item.cc index 5715a01747..9ade245a71 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -148,7 +148,7 @@ Midi_instrument::to_string () const SCM program = gh_call1 (proc, ly_symbol2scm (audio_->str_.to_str0 ())); found = (program != SCM_BOOL_F); if (found) - program_byte = gh_scm2int(program); + program_byte = gh_scm2int (program); else warning (_f ("no such MIDI instrument: `%s'", audio_->str_.to_str0 ())); @@ -243,7 +243,7 @@ int Midi_note::get_fine_tuning () const { int ft = audio_->pitch_.quartertone_pitch (); - ft -= 2 * audio_->pitch_.semitone_pitch(); + ft -= 2 * audio_->pitch_.semitone_pitch (); ft *= 50; // 1 quarter tone = 50 cents return ft; } diff --git a/lily/midi-walker.cc b/lily/midi-walker.cc index b0a67ca6f9..340eee8492 100644 --- a/lily/midi-walker.cc +++ b/lily/midi-walker.cc @@ -130,7 +130,7 @@ Midi_walker::output_event (Moment now_mom, Midi_item* l) this is not correct, but at least it doesn't crash when you start with graces */ - if (delta_t < Moment(0)) + if (delta_t < Moment (0)) { delta_t = Moment (0); } diff --git a/lily/moment.cc b/lily/moment.cc index 39c509f734..3a6fcd3ecd 100644 --- a/lily/moment.cc +++ b/lily/moment.cc @@ -57,10 +57,10 @@ LY_DEFINE (make_moment,"ly:make-moment", 2,0,0, (SCM n, SCM d), "notes, @var{g} is zero.\n" ) { - SCM_ASSERT_TYPE(SCM_INUMP (n), n, SCM_ARG1, __FUNCTION__, "integer"); - SCM_ASSERT_TYPE(SCM_INUMP (d), d, SCM_ARG2, __FUNCTION__, "integer"); + SCM_ASSERT_TYPE (SCM_INUMP (n), n, SCM_ARG1, __FUNCTION__, "integer"); + SCM_ASSERT_TYPE (SCM_INUMP (d), d, SCM_ARG2, __FUNCTION__, "integer"); - return Moment (Rational (gh_scm2int (n), gh_scm2int (d))).smobbed_copy(); + return Moment (Rational (gh_scm2int (n), gh_scm2int (d))).smobbed_copy (); } LY_DEFINE (add_moment,"ly:add-moment", 2,0,0, (SCM a, SCM b), @@ -72,7 +72,7 @@ LY_DEFINE (add_moment,"ly:add-moment", 2,0,0, (SCM a, SCM b), SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment"); SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment"); - return (*ma + *mb).smobbed_copy(); + return (*ma + *mb).smobbed_copy (); } @@ -85,7 +85,7 @@ LY_DEFINE (mul_moment,"ly:mul-moment", 2,0,0, (SCM a, SCM b), SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment"); SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment"); - return (*ma * *mb).smobbed_copy(); + return (*ma * *mb).smobbed_copy (); } @@ -99,7 +99,7 @@ LY_DEFINE (div_moment,"ly:div-moment", 2,0,0, (SCM a, SCM b), SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment"); SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment"); - return (*ma / *mb).smobbed_copy(); + return (*ma / *mb).smobbed_copy (); } LY_DEFINE (ly_moment_less_p,"ly:momentset_property ("direction",dir); numbers_.push (sp); - announce_grob (sp, e->self_scm()); + announce_grob (sp, e->self_scm ()); } /* @@ -106,7 +106,7 @@ Multi_measure_rest_engraver::process_music () Direction d = DOWN; do { Grob *last =0; - for (int i=0; i get_property ("direction")) { @@ -122,16 +122,16 @@ Multi_measure_rest_engraver::process_music () Spanner *sp = make_spanner ("MultiMeasureRestNumber"); numbers_.push (sp); - announce_grob (sp, rest_ev_->self_scm()); + announce_grob (sp, rest_ev_->self_scm ()); } - for (int i =0 ; i < numbers_.size(); i++) + for (int i =0 ; i < numbers_.size (); i++) { Side_position_interface::add_support (numbers_[i], mmrest_); numbers_[i]->set_parent (mmrest_, Y_AXIS); } - announce_grob (mmrest_, rest_ev_->self_scm()); + announce_grob (mmrest_, rest_ev_->self_scm ()); start_measure_ = gh_scm2int (get_property ("currentBarNumber")); } @@ -148,7 +148,7 @@ Multi_measure_rest_engraver::stop_translation_timestep () if (bar_seen_) { - Grob *cmc = unsmob_grob (get_property("breakableSeparationItem")); + Grob *cmc = unsmob_grob (get_property ("breakableSeparationItem")); if (!cmc) cmc = unsmob_grob (get_property ("currentCommandColumn")); @@ -157,14 +157,14 @@ Multi_measure_rest_engraver::stop_translation_timestep () if (mmrest_) { add_bound_item (mmrest_, it); - for (int i = 0; i < numbers_.size(); i++) + for (int i = 0; i < numbers_.size (); i++) add_bound_item (numbers_[i], it); } if (last_rest_) { add_bound_item (last_rest_,it); - for (int i = 0; i < last_numbers_.size(); i++) + for (int i = 0; i < last_numbers_.size (); i++) add_bound_item (last_numbers_[i], it); } } @@ -177,7 +177,7 @@ Multi_measure_rest_engraver::stop_translation_timestep () && mmrest_->get_bound (LEFT) && mmrest_->get_bound (RIGHT)) { typeset_grob (mmrest_); - for (int i = 0 ; i < numbers_.size(); i++) + for (int i = 0 ; i < numbers_.size (); i++) { typeset_grob (numbers_[i]); } @@ -202,7 +202,7 @@ Multi_measure_rest_engraver::stop_translation_timestep () } } last_rest_ = 0; - last_numbers_.clear(); + last_numbers_.clear (); } text_events_.clear (); @@ -248,7 +248,7 @@ Multi_measure_rest_engraver::start_translation_timestep () mmrest_ = 0; numbers_.clear (); - Grob * last = last_numbers_.size() ? last_numbers_[0] : 0; + Grob * last = last_numbers_.size () ? last_numbers_[0] : 0; if (last && last->get_property ("text") == SCM_EOL) { SCM thres = get_property ("restNumberThreshold"); @@ -257,7 +257,7 @@ Multi_measure_rest_engraver::start_translation_timestep () t = gh_scm2int (thres); if (num <= t) - last->suicide(); + last->suicide (); else { SCM text @@ -290,7 +290,7 @@ Multi_measure_rest_engraver::finalize () } -ENTER_DESCRIPTION(Multi_measure_rest_engraver, +ENTER_DESCRIPTION (Multi_measure_rest_engraver, /* descr */ "Engraves multi-measure rests that are produced with @code{R}. Reads " "measurePosition and currentBarNumber to determine what number to print " diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 7fd6e765ce..b04768dfea 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -87,7 +87,7 @@ Multi_measure_rest::print (SCM smob) } while ((flip (&d)) != LEFT); - Real space = sp_iv.length(); + Real space = sp_iv.length (); Real rx = sp->get_bound (LEFT)->relative_coordinate (0, X_AXIS); /* @@ -123,7 +123,7 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space) measures = gh_scm2int (m); } if (measures <= 0) - return Stencil(); + return Stencil (); SCM limit = me->get_property ("expand-limit"); @@ -188,7 +188,7 @@ Multi_measure_rest::big_rest (Grob *me, Real width) Real slt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")); Real y = slt * thick_thick/2 * ss; Real ythick = hair_thick * slt * ss; - Box b(Interval (0, 0 >? (width - 2 * ythick)), Interval (-y, y)); + Box b (Interval (0, 0 >? (width - 2 * ythick)), Interval (-y, y)); Real blot = width ? (.8 * (y get_property ("minimum-length"), 0.0); - rod.distance_ = max(rod.distance_, + rod.distance_ = max (rod.distance_, minlen); rod.add_to_cols (); } diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 438a02bad3..9af76a408f 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -90,7 +90,7 @@ Music_iterator::get_static_get_iterator (Music *m) else p = new Simple_music_iterator; - iter = p->self_scm(); + iter = p->self_scm (); scm_gc_unprotect_object (iter); } @@ -180,8 +180,8 @@ Music_iterator::get_music () const /****************************************************************/ IMPLEMENT_TYPE_P (Music_iterator, "ly:iterator?"); -IMPLEMENT_SMOBS(Music_iterator); -IMPLEMENT_DEFAULT_EQUAL_P(Music_iterator); +IMPLEMENT_SMOBS (Music_iterator); +IMPLEMENT_DEFAULT_EQUAL_P (Music_iterator); SCM Music_iterator::mark_smob (SCM smob) @@ -194,9 +194,9 @@ Music_iterator::mark_smob (SCM smob) only, we _must_ mark them. */ if (mus->get_outlet ()) - scm_gc_mark (mus->get_outlet ()->self_scm()); + scm_gc_mark (mus->get_outlet ()->self_scm ()); if (mus->music_) - scm_gc_mark (mus->music_->self_scm()); + scm_gc_mark (mus->music_->self_scm ()); return SCM_EOL; @@ -214,7 +214,7 @@ Music_iterator::print_smob (SCM sm , SCM port, scm_print_state*) } void -Music_iterator::derived_mark()const +Music_iterator::derived_mark ()const { } @@ -226,7 +226,7 @@ Music_iterator::quit () } void -Music_iterator::do_quit() +Music_iterator::do_quit () { } diff --git a/lily/music-wrapper-iterator.cc b/lily/music-wrapper-iterator.cc index e88f773d90..428cac5a62 100644 --- a/lily/music-wrapper-iterator.cc +++ b/lily/music-wrapper-iterator.cc @@ -16,16 +16,16 @@ Music_wrapper_iterator::Music_wrapper_iterator () } void -Music_wrapper_iterator::do_quit() +Music_wrapper_iterator::do_quit () { - child_iter_->quit(); + child_iter_->quit (); } void Music_wrapper_iterator::derived_mark () const { if (child_iter_) - scm_gc_mark (child_iter_->self_scm()); + scm_gc_mark (child_iter_->self_scm ()); } void @@ -39,7 +39,7 @@ Music_wrapper_iterator::derived_substitute (Context *f,Context *t) void Music_wrapper_iterator::construct_children () { - Music * m = dynamic_cast (get_music ())-> element(); + Music * m = dynamic_cast (get_music ())-> element (); child_iter_ = unsmob_iterator (get_iterator (m)); } diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 86b2c3368e..30b4afd7dd 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -103,7 +103,7 @@ My_lily_lexer::My_lily_lexer () scopes_ = SCM_EOL; - add_scope(ly_make_anonymous_module()); + add_scope (ly_make_anonymous_module ()); errorlevel_ =0; main_input_b_ = false; @@ -124,7 +124,7 @@ My_lily_lexer::add_scope (SCM module) gh_car (s), SCM_UNDEFINED), SCM_UNDEFINED); - scm_primitive_eval(expr); + scm_primitive_eval (expr); } scopes_ = scm_cons (module, scopes_); @@ -155,7 +155,7 @@ My_lily_lexer::lookup_identifier (String s) { SCM var = ly_module_lookup (gh_car (s), sym); if (var != SCM_BOOL_F) - return scm_variable_ref(var); + return scm_variable_ref (var); } return SCM_UNDEFINED; @@ -241,5 +241,5 @@ My_lily_lexer::here_input () const void My_lily_lexer::prepare_for_next_token () { - last_input_ = here_input(); + last_input_ = here_input (); } diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index a3b2ec86cb..f000e678be 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -30,7 +30,7 @@ My_lily_parser::~My_lily_parser () { delete lexer_; if (default_header_) - scm_gc_unprotect_object (default_header_->self_scm()); + scm_gc_unprotect_object (default_header_->self_scm ()); } /* Process one .ly file, or book. */ @@ -97,7 +97,7 @@ My_lily_parser::here_input () const { /* Parsing looks ahead , so we really want the previous location of the - lexer, not lexer_->here_input(). + lexer, not lexer_->here_input (). */ /* Actually, that gets very icky when there are white space, because diff --git a/lily/new-fingering-engraver.cc b/lily/new-fingering-engraver.cc index e23fd23db3..18103a3b4a 100644 --- a/lily/new-fingering-engraver.cc +++ b/lily/new-fingering-engraver.cc @@ -49,13 +49,13 @@ class New_fingering_engraver : public Engraver Grob *stem_; public: - TRANSLATOR_DECLARATIONS(New_fingering_engraver); + TRANSLATOR_DECLARATIONS (New_fingering_engraver); protected: virtual void stop_translation_timestep (); virtual void acknowledge_grob (Grob_info); void add_fingering (Grob*, Music*,Music*); void add_script (Grob*, Music*,Music*); - void position_scripts(); + void position_scripts (); }; void @@ -134,7 +134,7 @@ New_fingering_engraver::add_fingering (Grob * head, Finger_tuple ft; ft.script_ = make_item ("Fingering"); - announce_grob (ft.script_, event->self_scm()); + announce_grob (ft.script_, event->self_scm ()); Side_position_interface::add_support (ft.script_, head); @@ -152,7 +152,7 @@ New_fingering_engraver::add_fingering (Grob * head, /* music for the softenon children? */ - event->origin()->warning (_("music for the martians.")); + event->origin ()->warning (_("music for the martians.")); } SCM sstr = scm_number_to_string (gh_int2scm (d), gh_int2scm (10)) ; ft.script_->set_property ("text", sstr); @@ -177,17 +177,17 @@ New_fingering_engraver::position_scripts () to the note head, and write a more flexible function for positioning the fingerings, setting both X and Y coordinates. */ - for (int i = 0; i < fingerings_.size(); i++) + for (int i = 0; i < fingerings_.size (); i++) { - fingerings_[i].position_ = gh_scm2int (fingerings_[i].head_ -> get_property( "staff-position")); + fingerings_[i].position_ = gh_scm2int (fingerings_[i].head_ -> get_property ( "staff-position")); } - for (int i = fingerings_.size(); i--;) - for (int j = heads_.size() ; j--;) + for (int i = fingerings_.size (); i--;) + for (int j = heads_.size () ; j--;) Side_position_interface::add_support (fingerings_[i].script_, heads_[j]); Array up, down, horiz; - for (int i = fingerings_.size(); i--;) + for (int i = fingerings_.size (); i--;) { SCM d = fingerings_[i].finger_event_->get_property ("direction"); if (to_dir (d)) @@ -208,21 +208,21 @@ New_fingering_engraver::position_scripts () if (left_p || right_p) { if (up_p && !up.size () && fingerings_.size ()) - up.push (fingerings_.pop()); + up.push (fingerings_.pop ()); - if (down_p && !down.size () && fingerings_.size()) + if (down_p && !down.size () && fingerings_.size ()) { down.push (fingerings_[0]); - fingerings_.del(0); + fingerings_.del (0); } horiz.concat (fingerings_); } else if (up_p && down_p) { - int center = fingerings_.size() / 2; + int center = fingerings_.size () / 2; down.concat (fingerings_.slice (0,center)); - up.concat (fingerings_.slice (center, fingerings_.size())); + up.concat (fingerings_.slice (center, fingerings_.size ())); } else if (up_p) { @@ -232,12 +232,12 @@ New_fingering_engraver::position_scripts () else { if (!down_p) - warning(_ ("Fingerings are also not down?! Putting them down anyway.")); + warning (_ ("Fingerings are also not down?! Putting them down anyway.")); down.concat (fingerings_); - fingerings_.clear(); + fingerings_.clear (); } - for (int i = 0; i < horiz.size(); i++) + for (int i = 0; i < horiz.size (); i++) { Finger_tuple ft = horiz[i]; Grob* f = ft.script_; @@ -252,7 +252,7 @@ New_fingering_engraver::position_scripts () } int finger_prio = 200; - for (int i = 0; i < up.size(); i++) + for (int i = 0; i < up.size (); i++) { Finger_tuple ft = up[i]; Grob* f = ft.script_; @@ -268,13 +268,13 @@ New_fingering_engraver::position_scripts () typeset_grob (f); } - for (int i = 0; i < down.size(); i++) + for (int i = 0; i < down.size (); i++) { Finger_tuple ft = down[i]; Grob* f = ft.script_; f->set_parent (ft.head_, X_AXIS); f->set_property ("script-priority", - gh_int2scm (finger_prio + down.size() - i)); + gh_int2scm (finger_prio + down.size () - i)); f->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, X_AXIS); f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, X_AXIS); @@ -289,15 +289,15 @@ New_fingering_engraver::stop_translation_timestep () { if (fingerings_.size ()) { - position_scripts(); + position_scripts (); fingerings_.clear (); } - for (int i = articulations_.size(); i--;) + for (int i = articulations_.size (); i--;) { Grob *sc = articulations_[i].script_; - for (int j = heads_.size() ; j--;) + for (int j = heads_.size () ; j--;) Side_position_interface::add_support (sc, heads_[j]); if (stem_ && to_dir (sc->get_property ("side-relative-direction"))) @@ -314,16 +314,16 @@ New_fingering_engraver::stop_translation_timestep () stem_ = 0; heads_.clear (); - articulations_.clear(); + articulations_.clear (); } -New_fingering_engraver::New_fingering_engraver() +New_fingering_engraver::New_fingering_engraver () { stem_ = 0; } -ENTER_DESCRIPTION(New_fingering_engraver, +ENTER_DESCRIPTION (New_fingering_engraver, /* descr */ "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", diff --git a/lily/new-lyric-combine-music-iterator.cc b/lily/new-lyric-combine-music-iterator.cc index fef21dde29..4977c0019f 100644 --- a/lily/new-lyric-combine-music-iterator.cc +++ b/lily/new-lyric-combine-music-iterator.cc @@ -19,11 +19,11 @@ class New_lyric_combine_music_iterator : public Music_iterator public: New_lyric_combine_music_iterator (); New_lyric_combine_music_iterator (New_lyric_combine_music_iterator const&src); - DECLARE_SCHEME_CALLBACK(constructor, ()); + DECLARE_SCHEME_CALLBACK (constructor, ()); protected: virtual void construct_children (); virtual Moment pending_moment () const; - virtual void do_quit(); + virtual void do_quit (); virtual void process (Moment); virtual Music_iterator *try_music_in_children (Music *) const; virtual bool run_always ()const; @@ -112,7 +112,7 @@ New_lyric_combine_music_iterator::ok () const } void -New_lyric_combine_music_iterator::derived_mark()const +New_lyric_combine_music_iterator::derived_mark ()const { if (lyric_iter_) scm_gc_mark (lyric_iter_->self_scm ()); @@ -219,7 +219,7 @@ void New_lyric_combine_music_iterator::do_quit () { if (lyric_iter_) - lyric_iter_->quit(); + lyric_iter_->quit (); } diff --git a/lily/note-collision.cc b/lily/note-collision.cc index dad75f982c..1432c27564 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -286,10 +286,10 @@ Note_collision_interface::do_shifts (Grob* me) Real wid = 0.0; do { - if(cg[d].size()) + if (cg[d].size ()) { Grob *h = cg[d][0]; - wid = Note_column::first_head (h)->extent (h,X_AXIS).length() ; + wid = Note_column::first_head (h)->extent (h,X_AXIS).length () ; } } while (flip (&d) != UP); diff --git a/lily/note-head-line-engraver.cc b/lily/note-head-line-engraver.cc index 6cb90f4e71..fee6c1e63c 100644 --- a/lily/note-head-line-engraver.cc +++ b/lily/note-head-line-engraver.cc @@ -28,7 +28,7 @@ class Note_head_line_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Note_head_line_engraver); + TRANSLATOR_DECLARATIONS (Note_head_line_engraver); protected: virtual void acknowledge_grob (Grob_info); @@ -92,7 +92,7 @@ Note_head_line_engraver::process_acknowledged_grobs () line_->set_bound (LEFT, last_head_); line_->set_bound (RIGHT, head_); - announce_grob(line_, head_->self_scm ()); + announce_grob (line_, head_->self_scm ()); follow_ = false; } @@ -114,7 +114,7 @@ Note_head_line_engraver::stop_translation_timestep () -ENTER_DESCRIPTION(Note_head_line_engraver, +ENTER_DESCRIPTION (Note_head_line_engraver, /* descr */ "Engrave a line between two note heads, for example a glissando. If " " followVoice is set, staff switches also generate a line.", /* creats*/ "Glissando VoiceFollower", diff --git a/lily/note-head.cc b/lily/note-head.cc index 3e2761b83c..9c06332658 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -75,7 +75,7 @@ Note_head::brew_ledger_lines (Grob *me, int line_count = (abs (pos) < interspaces) ? 0 : (abs (pos) - interspaces) / 2; - Stencil stencil = Stencil(); + Stencil stencil = Stencil (); if (line_count) @@ -148,7 +148,7 @@ internal_print (Grob *me, bool with_ledgers) ledger_size.widen ( ledger_size.length ()/4); Real left_shorten =0.0; - if (Grob * g = unsmob_grob(me->get_property ("accidental-grob"))) + if (Grob * g = unsmob_grob (me->get_property ("accidental-grob"))) { /* make a little room for accidentals. @@ -159,8 +159,10 @@ internal_print (Grob *me, bool with_ledgers) Grob *common = g->common_refpoint (me, X_AXIS); Real d = - (me->extent (common, X_AXIS)[LEFT] - +g->extent (common, X_AXIS)[RIGHT]) /2; + linear_combination (Drul_array (me->extent (common, X_AXIS)[LEFT], + g->extent (common, X_AXIS)[RIGHT]), + + 0.5); left_shorten = (-ledger_size[LEFT] + d) >? 0 ; @@ -220,7 +222,7 @@ Note_head::head_extent (Grob *me, Axis a) /* This is necessary to prevent a cyclic dependency: the appearance of - the ledgers depends on positioning, so the Grob::get_stencil() can + the ledgers depends on positioning, so the Grob::get_stencil () can not be used for determining the note head extent. */ @@ -300,7 +302,7 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a) Offset wxwy = fm->get_indexed_wxwy (k); Interval v = b[a]; if (!v.is_empty ()) - return 2 * (wxwy[a] - v.center()) / v.length (); + return 2 * (wxwy[a] - v.center ()) / v.length (); } } @@ -311,7 +313,7 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a) if (!gh_procedure_p (v)) return 0.0; - SCM result = scm_call_2 (v, me->self_scm(), gh_int2scm (a)); + SCM result = scm_call_2 (v, me->self_scm (), gh_int2scm (a)); if (!gh_pair_p (result)) return 0.0; diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 8189a01ba4..e1fdc813c7 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -22,7 +22,7 @@ class Note_heads_engraver : public Engraver Link_array note_reqs_; public: - TRANSLATOR_DECLARATIONS(Note_heads_engraver); + TRANSLATOR_DECLARATIONS (Note_heads_engraver); protected: virtual bool try_music (Music *req) ; @@ -31,7 +31,7 @@ protected: virtual void stop_translation_timestep (); }; -Note_heads_engraver::Note_heads_engraver() +Note_heads_engraver::Note_heads_engraver () { } @@ -86,7 +86,7 @@ Note_heads_engraver::process_music () pos += gh_scm2int (c0); note->set_property ("staff-position", gh_int2scm (pos)); - announce_grob (note,req->self_scm()); + announce_grob (note,req->self_scm ()); notes_.push (note); } } @@ -110,7 +110,7 @@ Note_heads_engraver::stop_translation_timestep () -ENTER_DESCRIPTION(Note_heads_engraver, +ENTER_DESCRIPTION (Note_heads_engraver, /* descr */ "Generate noteheads.", /* creats*/ "NoteHead Dots", /* accepts */ "note-event busy-playing-event", diff --git a/lily/note-name-engraver.cc b/lily/note-name-engraver.cc index 171bc102b7..a0c904e562 100644 --- a/lily/note-name-engraver.cc +++ b/lily/note-name-engraver.cc @@ -14,7 +14,7 @@ class Note_name_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Note_name_engraver); + TRANSLATOR_DECLARATIONS (Note_name_engraver); Link_array events_; Link_array texts_; @@ -53,7 +53,7 @@ Note_name_engraver::process_music () { Item * t = make_item ("NoteName"); t->set_property ("text", scm_makfrom0str (s.to_str0 ())); - announce_grob (t, events_[0]->self_scm()); + announce_grob (t, events_[0]->self_scm ()); texts_.push (t); } } @@ -70,11 +70,11 @@ Note_name_engraver::stop_translation_timestep () } -Note_name_engraver::Note_name_engraver() +Note_name_engraver::Note_name_engraver () { } -ENTER_DESCRIPTION(Note_name_engraver, +ENTER_DESCRIPTION (Note_name_engraver, /* descr */ "", /* creats*/ "NoteName", /* accepts */ "note-event", diff --git a/lily/note-performer.cc b/lily/note-performer.cc index ab6f6a1887..4d938dee65 100644 --- a/lily/note-performer.cc +++ b/lily/note-performer.cc @@ -18,7 +18,7 @@ Convert evs to audio notes. */ class Note_performer : public Performer { public: - TRANSLATOR_DECLARATIONS(Note_performer); + TRANSLATOR_DECLARATIONS (Note_performer); protected: virtual bool try_music (Music *ev) ; @@ -115,9 +115,9 @@ Note_performer::try_music (Music* ev) return false; } -ENTER_DESCRIPTION(Note_performer,"","", +ENTER_DESCRIPTION (Note_performer,"","", "note-event busy-playing-event","","",""); -Note_performer::Note_performer() +Note_performer::Note_performer () { } diff --git a/lily/note-spacing.cc b/lily/note-spacing.cc index 706e9418ca..9f767ab54c 100644 --- a/lily/note-spacing.cc +++ b/lily/note-spacing.cc @@ -33,7 +33,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col, Real base_space, Real increment, Real *space, Real *fixed) { - Drul_array props(me->get_property ("left-items"), + Drul_array props (me->get_property ("left-items"), me->get_property ("right-items")); Direction d = LEFT; Direction col_dir = right_col->break_status_dir (); @@ -44,7 +44,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col, { for (SCM s = props[d]; gh_pair_p (s); s = gh_cdr (s)) { - Item * it= dynamic_cast (unsmob_grob (gh_car(s))); + Item * it= dynamic_cast (unsmob_grob (gh_car (s))); if (d == RIGHT && it->break_status_dir () != col_dir) { @@ -80,7 +80,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col, first note head will be. */ if (g) - left_head_wid = g->extent(it_col, X_AXIS); + left_head_wid = g->extent (it_col, X_AXIS); } extents[d].unite (it->extent (it_col, X_AXIS)); @@ -164,7 +164,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col, Item * Note_spacing::left_column (Grob *me) { - if (!me->live()) + if (!me->live ()) return 0; return dynamic_cast (me)->get_column (); @@ -181,7 +181,7 @@ prune RIGHT-ITEMS. Item * Note_spacing::right_column (Grob*me) { - if (!me->live()) + if (!me->live ()) return 0; SCM right = me->get_property ("right-items"); @@ -222,7 +222,7 @@ Note_spacing::right_column (Grob*me) { /* int r = Paper_column::get_rank (dynamic_cast(me)->get_column ()); - programming_error (_f("Spacing wish column %d has no right item.", r)); + programming_error (_f ("Spacing wish column %d has no right item.", r)); */ return 0; @@ -244,14 +244,14 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, Real increment, Real * space, Real *fixed) { - Drul_array stem_dirs(CENTER,CENTER); + Drul_array stem_dirs (CENTER,CENTER); Drul_array stem_posns; Drul_array head_posns; - Drul_array props(me->get_property ("left-items"), + Drul_array props (me->get_property ("left-items"), me->get_property ("right-items")); - Drul_array beams_drul(0,0); - Drul_array stems_drul(0,0); + Drul_array beams_drul (0,0); + Drul_array stems_drul (0,0); stem_dirs[LEFT] = stem_dirs[RIGHT] = CENTER; Interval intersect; @@ -266,7 +266,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, { for (SCM s = props[d]; gh_pair_p (s); s = gh_cdr (s)) { - Item * it= dynamic_cast (unsmob_grob (gh_car(s))); + Item * it= dynamic_cast (unsmob_grob (gh_car (s))); if (d == RIGHT) acc_right = acc_right || Note_column::accidentals (it); @@ -293,7 +293,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, return ; } - if(Stem::is_invisible (stem)) + if (Stem::is_invisible (stem)) { correct_stem_dirs = false; continue; @@ -325,7 +325,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, Real chord_start = hp[sd]; Real stem_end = Stem::stem_end_position (stem); - stem_posns[d] = Interval(chord_start? stem_end); + stem_posns[d] = Interval (chord_start? stem_end); head_posns[d].unite (hp); } } @@ -381,7 +381,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, else { intersect = stem_posns[LEFT]; - intersect.intersect(stem_posns[RIGHT]); + intersect.intersect (stem_posns[RIGHT]); correct_stem_dirs = correct_stem_dirs && !intersect.is_empty (); if (correct_stem_dirs) @@ -443,7 +443,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, *space += correction; - /* there used to be a correction for bar_xextent() here, but + /* there used to be a correction for bar_xextent () here, but it's unclear what that was good for ? */ diff --git a/lily/ottava-bracket.cc b/lily/ottava-bracket.cc index efbac77ea0..d77a6b6e2d 100644 --- a/lily/ottava-bracket.cc +++ b/lily/ottava-bracket.cc @@ -49,7 +49,7 @@ Ottava_bracket::print (SCM smob) Interval span_points; Grob *common = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS); - Paper_def * paper = me->get_paper(); + Paper_def * paper = me->get_paper (); Drul_array broken; diff --git a/lily/ottava-engraver.cc b/lily/ottava-engraver.cc index 0cf14c160a..cc4ac41cf7 100644 --- a/lily/ottava-engraver.cc +++ b/lily/ottava-engraver.cc @@ -15,7 +15,7 @@ class Ottava_spanner_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Ottava_spanner_engraver); + TRANSLATOR_DECLARATIONS (Ottava_spanner_engraver); protected: virtual void finalize (); virtual void acknowledge_grob (Grob_info); @@ -114,11 +114,11 @@ Ottava_spanner_engraver::finalize () typeset_all (); if (span_) finished_ = span_; - typeset_all(); + typeset_all (); last_ottavation_ = SCM_EOL; } -ENTER_DESCRIPTION(Ottava_spanner_engraver, +ENTER_DESCRIPTION (Ottava_spanner_engraver, /* descr */ "Create a text spanner when the ottavation property changes..", /* creats*/ "OttavaBracket", /* accepts */ "", diff --git a/lily/output-property-engraver.cc b/lily/output-property-engraver.cc index ee17d82b07..ebe2c47771 100644 --- a/lily/output-property-engraver.cc +++ b/lily/output-property-engraver.cc @@ -14,7 +14,7 @@ class Output_property_engraver : public Engraver { -TRANSLATOR_DECLARATIONS(Output_property_engraver); +TRANSLATOR_DECLARATIONS (Output_property_engraver); protected: Link_array props_; @@ -68,9 +68,9 @@ Output_property_engraver::acknowledge_grob (Grob_info inf) SCM proc = o->get_property ("procedure"); scm_call_3 (proc, - inf.grob_->self_scm(), - d->self_scm(), - daddy_context_->self_scm()); + inf.grob_->self_scm (), + d->self_scm (), + daddy_context_->self_scm ()); } } } @@ -81,11 +81,11 @@ Output_property_engraver::stop_translation_timestep () props_.clear (); } -Output_property_engraver::Output_property_engraver() +Output_property_engraver::Output_property_engraver () { } -ENTER_DESCRIPTION(Output_property_engraver, +ENTER_DESCRIPTION (Output_property_engraver, /* descr */ "Interpret Music of Output_property type, and apply a function " " to any Graphic objects that satisfies the predicate.", /* creats*/ "", diff --git a/lily/output-property-music-iterator.cc b/lily/output-property-music-iterator.cc index fc76c976d4..af85ee2d00 100644 --- a/lily/output-property-music-iterator.cc +++ b/lily/output-property-music-iterator.cc @@ -13,7 +13,7 @@ class Output_property_music_iterator : public Simple_music_iterator { public: - DECLARE_SCHEME_CALLBACK(constructor, ()); + DECLARE_SCHEME_CALLBACK (constructor, ()); protected: virtual void process (Moment); }; diff --git a/lily/paper-column.cc b/lily/paper-column.cc index 04cc897b99..69e49a77d9 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -108,7 +108,7 @@ Paper_column::is_used (Grob*me) Print a vertical line and the rank number, to aid debugging. */ -MAKE_SCHEME_CALLBACK(Paper_column,print,1); +MAKE_SCHEME_CALLBACK (Paper_column,print,1); SCM Paper_column::print (SCM p) { @@ -138,7 +138,7 @@ Paper_column::print (SCM p) THIS IS BROKEN KLUDGE. WE SHOULD INVENT SOMETHING BETTER. */ -MAKE_SCHEME_CALLBACK(Paper_column,before_line_breaking,1); +MAKE_SCHEME_CALLBACK (Paper_column,before_line_breaking,1); SCM Paper_column::before_line_breaking (SCM grob) { diff --git a/lily/paper-score.cc b/lily/paper-score.cc index 4c2e2b68e8..f392455a89 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -42,7 +42,7 @@ Paper_score::typeset_line (System *l) main_smob_ = gh_cons (l->self_scm (), main_smob_); l->pscore_ = this; - scm_gc_unprotect_object (l->self_scm()); + scm_gc_unprotect_object (l->self_scm ()); } diff --git a/lily/parse-scm.cc b/lily/parse-scm.cc index d5628707e6..f909b5aa2c 100644 --- a/lily/parse-scm.cc +++ b/lily/parse-scm.cc @@ -17,7 +17,7 @@ SCM internal_ly_parse_scm (Parse_start * ps, bool safe) { Source_file* sf =ps->start_location_.source_file_; - SCM port = sf->get_port(); + SCM port = sf->get_port (); int off = ps->start_location_.defined_str0_ - sf->to_str0(); @@ -76,7 +76,7 @@ parse_handler (void * data, SCM tag, SCM args) ps->start_location_.error (_("GUILE signaled an error for the expression beginning here")); if (scm_ilength (args) > 2) - scm_display_error_message (gh_cadr (args), gh_caddr(args), scm_current_error_port()); + scm_display_error_message (gh_cadr (args), gh_caddr (args), scm_current_error_port ()); /* The following is a kludge; we should probably search for diff --git a/lily/parser.yy b/lily/parser.yy index c1a98226f3..d1b40819d9 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -195,7 +195,7 @@ ly_input_procedure_p (SCM x) Music* set_property_music (SCM sym, SCM value) { - Music * p = MY_MAKE_MUSIC("PropertySet"); + Music * p = MY_MAKE_MUSIC ("PropertySet"); p->set_property ("symbol", sym); p->set_property ("value", value); return p; @@ -225,7 +225,7 @@ yylex (YYSTYPE *s, void * v) My_lily_lexer * lex = pars->lexer_; lex->lexval = (void*) s; - lex->prepare_for_next_token(); + lex->prepare_for_next_token (); return lex->yylex (); } @@ -441,7 +441,7 @@ toplevel_expression: SCM outname = scm_makfrom0str (p.to_string ().to_str0()); for (int i=0; i < sc->defs_.size (); i++) - default_rendering (sc->music_, sc->defs_[i]->self_scm(), head, outname); + default_rendering (sc->music_, sc->defs_[i]->self_scm (), head, outname); if (sc->defs_.is_empty ()) { @@ -451,11 +451,11 @@ toplevel_expression: id = id ? id->clone () : new Paper_def; - default_rendering (sc->music_, id->self_scm(), head, outname); + default_rendering (sc->music_, id->self_scm (), head, outname); scm_gc_unprotect_object (id->self_scm ()); } - scm_gc_unprotect_object (sc->self_scm()); + scm_gc_unprotect_object (sc->self_scm ()); } | output_def { SCM id = SCM_EOL; @@ -489,7 +489,7 @@ lilypond_header_body: lilypond_header: HEADER '{' lilypond_header_body '}' { - $$ = THIS->lexer_-> remove_scope(); + $$ = THIS->lexer_-> remove_scope (); } ; @@ -578,7 +578,7 @@ context_def_spec_body: unsmob_context_def ($$)->set_spot (THIS->here_input ()); } | context_def_spec_body GROBDESCRIPTIONS embedded_scm { - Context_def*td = unsmob_context_def($$); + Context_def*td = unsmob_context_def ($$); for (SCM p = $3; gh_pair_p (p); p = ly_cdr (p)) { SCM tag = gh_caar (p); @@ -715,7 +715,7 @@ music_output_def_body: tempo_event: TEMPO steno_duration '=' bare_unsigned { - $$ = MY_MAKE_MUSIC("MetronomeChangeEvent"); + $$ = MY_MAKE_MUSIC ("MetronomeChangeEvent"); $$->set_property ("tempo-unit", $2); $$->set_property ("metronome-count", gh_int2scm ( $4)); } @@ -812,7 +812,7 @@ Repeated_music: shift -= 1; r->compress (Moment (Rational (1,list_len))); } - gh_call3 (func, r->self_scm (), gh_int2scm(shift),gh_int2scm(dots)); + gh_call3 (func, r->self_scm (), gh_int2scm (shift),gh_int2scm (dots)); } r->set_spot (*$4->origin ()); @@ -823,28 +823,28 @@ Repeated_music: Sequential_music: SEQUENTIAL '{' Music_list '}' { - $$ = MY_MAKE_MUSIC("SequentialMusic"); + $$ = MY_MAKE_MUSIC ("SequentialMusic"); $$->set_property ("elements", ly_car ($3)); - $$->set_spot(THIS->here_input()); + $$->set_spot (THIS->here_input ()); } | '{' Music_list '}' { - $$ = MY_MAKE_MUSIC("SequentialMusic"); + $$ = MY_MAKE_MUSIC ("SequentialMusic"); $$->set_property ("elements", ly_car ($2)); - $$->set_spot(THIS->here_input()); + $$->set_spot (THIS->here_input ()); } ; Simultaneous_music: SIMULTANEOUS '{' Music_list '}'{ - $$ = MY_MAKE_MUSIC("SimultaneousMusic"); + $$ = MY_MAKE_MUSIC ("SimultaneousMusic"); $$->set_property ("elements", ly_car ($3)); - $$->set_spot(THIS->here_input()); + $$->set_spot (THIS->here_input ()); } | simul_open Music_list simul_close { - $$ = MY_MAKE_MUSIC("SimultaneousMusic"); + $$ = MY_MAKE_MUSIC ("SimultaneousMusic"); $$->set_property ("elements", ly_car ($2)); - $$->set_spot(THIS->here_input()); + $$->set_spot (THIS->here_input ()); } ; @@ -855,14 +855,14 @@ Simple_music: THIS->parser_error (_ ("\\applycontext takes function argument")); $$ = MY_MAKE_MUSIC ("ApplyOutputEvent"); $$->set_property ("procedure", $2); - $$->set_spot (THIS->here_input()); + $$->set_spot (THIS->here_input ()); } | APPLYCONTEXT embedded_scm { if (!ly_input_procedure_p ($2)) THIS->parser_error (_ ("\\applycontext takes function argument")); $$ = MY_MAKE_MUSIC ("ApplyContext"); $$->set_property ("procedure", $2); - $$->set_spot (THIS->here_input()); + $$->set_spot (THIS->here_input ()); } | MUSIC_IDENTIFIER { $$ = unsmob_music ($1); @@ -900,7 +900,7 @@ Composite_music: scm_gc_unprotect_object ($2->self_scm ()); $$ = unsmob_music (res); scm_gc_protect_object (res); - $$->set_spot (THIS->here_input()); + $$->set_spot (THIS->here_input ()); } | PARTCOMBINE Music Music { static SCM proc; @@ -913,7 +913,7 @@ Composite_music: scm_gc_unprotect_object ($2->self_scm ()); $$ = unsmob_music (res); scm_gc_protect_object (res); - $$->set_spot (THIS->here_input()); + $$->set_spot (THIS->here_input ()); } | grace_head Music { #if 1 @@ -945,22 +945,22 @@ basic music objects too, since the meaning is different. scm_gc_unprotect_object (stopm->self_scm ()); } ms = scm_cons ($2->self_scm (), ms); - scm_gc_unprotect_object ($2->self_scm()); + scm_gc_unprotect_object ($2->self_scm ()); if (startm) { startm = startm->clone (); ms = scm_cons (startm->self_scm () , ms); scm_gc_unprotect_object (startm->self_scm ()); } - Music* seq = MY_MAKE_MUSIC("SequentialMusic"); + Music* seq = MY_MAKE_MUSIC ("SequentialMusic"); seq->set_property ("elements", ms); - $$ = MY_MAKE_MUSIC("GraceMusic"); + $$ = MY_MAKE_MUSIC ("GraceMusic"); $$->set_property ("element", seq->self_scm ()); scm_gc_unprotect_object (seq->self_scm ()); #else - $$ = MY_MAKE_MUSIC("GraceMusic"); + $$ = MY_MAKE_MUSIC ("GraceMusic"); $$->set_property ("element", $2->self_scm ()); scm_gc_unprotect_object ($2->self_scm ()); #endif @@ -987,7 +987,7 @@ basic music objects too, since the meaning is different. int n = gh_scm2int (ly_car ($3)); int d = gh_scm2int (ly_cdr ($3)); Music *mp = $4; - $$= MY_MAKE_MUSIC("TimeScaledMusic"); + $$= MY_MAKE_MUSIC ("TimeScaledMusic"); $$->set_spot (THIS->pop_spot ()); $$->set_property ("element", mp->self_scm ()); @@ -1001,7 +1001,7 @@ basic music objects too, since the meaning is different. | Simultaneous_music { $$ = $1; } | Sequential_music { $$ = $1; } | TRANSPOSE pitch_also_in_chords pitch_also_in_chords Music { - $$ = MY_MAKE_MUSIC("TransposedMusic"); + $$ = MY_MAKE_MUSIC ("TransposedMusic"); Music *p = $4; Pitch from = *unsmob_pitch ($2); Pitch to = *unsmob_pitch ($3); @@ -1022,7 +1022,7 @@ basic music objects too, since the meaning is different. Music *m = unsmob_music (ret); if (!m) { THIS->parser_error ("\\apply must return a Music"); - m = MY_MAKE_MUSIC("Music"); + m = MY_MAKE_MUSIC ("Music"); } $$ = m; } @@ -1049,10 +1049,10 @@ basic music objects too, since the meaning is different. { THIS->lexer_->push_figuredbass_state (); } Music { - Music * chm = MY_MAKE_MUSIC("UntransposableMusic"); + Music * chm = MY_MAKE_MUSIC ("UntransposableMusic"); chm->set_property ("element", $3->self_scm ()); $$ = chm; - scm_gc_unprotect_object ($3->self_scm()); + scm_gc_unprotect_object ($3->self_scm ()); THIS->lexer_->pop_state (); } @@ -1063,9 +1063,9 @@ basic music objects too, since the meaning is different. THIS->lexer_->push_chord_state (alist_to_hashq (nn)); } Music { - Music * chm = MY_MAKE_MUSIC("UnrelativableMusic"); + Music * chm = MY_MAKE_MUSIC ("UnrelativableMusic"); chm->set_property ("element", $3->self_scm ()); - scm_gc_unprotect_object ($3->self_scm()); + scm_gc_unprotect_object ($3->self_scm ()); $$ = chm; THIS->lexer_->pop_state (); @@ -1089,7 +1089,7 @@ relative_music: RELATIVE absolute_pitch Music { Music * p = $3; Pitch pit = *unsmob_pitch ($2); - $$ = MY_MAKE_MUSIC("RelativeOctaveMusic"); + $$ = MY_MAKE_MUSIC ("RelativeOctaveMusic"); $$->set_property ("element", p->self_scm ()); scm_gc_unprotect_object (p->self_scm ()); @@ -1103,14 +1103,14 @@ relative_music: re_rhythmed_music: ADDLYRICS Music Music { - Music*l =MY_MAKE_MUSIC("LyricCombineMusic"); + Music*l =MY_MAKE_MUSIC ("LyricCombineMusic"); l->set_property ("elements", gh_list ($2->self_scm (), $3->self_scm (), SCM_UNDEFINED)); scm_gc_unprotect_object ($3->self_scm ()); scm_gc_unprotect_object ($2->self_scm ()); $$ = l; } | NEWADDLYRICS string Music { - Music*l =MY_MAKE_MUSIC("NewLyricCombineMusic"); + Music*l =MY_MAKE_MUSIC ("NewLyricCombineMusic"); l->set_property ("element", $3->self_scm ()); scm_gc_unprotect_object ($3->self_scm ()); $$ = l; @@ -1120,7 +1120,7 @@ re_rhythmed_music: context_change: CHANGE STRING '=' STRING { - Music*t= MY_MAKE_MUSIC("ContextChange"); + Music*t= MY_MAKE_MUSIC ("ContextChange"); t-> set_property ("change-to-type", scm_string_to_symbol ($2)); t-> set_property ("change-to-id", $4); @@ -1265,12 +1265,12 @@ event_chord: note_chord_element: chord_body optional_notemode_duration post_events { - SCM dur = unsmob_duration ($2)->smobbed_copy(); + SCM dur = unsmob_duration ($2)->smobbed_copy (); SCM es = $1->get_property ("elements"); SCM postevs = scm_reverse_x ($3, SCM_EOL); for (SCM s = es; gh_pair_p (s); s = gh_cdr (s)) - unsmob_music (gh_car(s))->set_property ("duration", dur); + unsmob_music (gh_car (s))->set_property ("duration", dur); es = gh_append2 (es, postevs); $1-> set_property ("elements", es); @@ -1293,7 +1293,7 @@ simul_close: MOREMORE chord_body: chord_open chord_body_elements chord_close { - $$ = MY_MAKE_MUSIC("EventChord"); + $$ = MY_MAKE_MUSIC ("EventChord"); $$->set_property ("elements", scm_reverse_x ($2, SCM_EOL)); } @@ -1302,15 +1302,15 @@ chord_body: chord_body_elements: /* empty */ { $$ = SCM_EOL; } | chord_body_elements chord_body_element { - $$ = gh_cons ($2->self_scm(), $1); - scm_gc_unprotect_object ($2->self_scm()); + $$ = gh_cons ($2->self_scm (), $1); + scm_gc_unprotect_object ($2->self_scm ()); } ; chord_body_element: pitch exclamations questions post_events { - Music * n = MY_MAKE_MUSIC("NoteEvent"); + Music * n = MY_MAKE_MUSIC ("NoteEvent"); n->set_property ("pitch", $1); if ($3 % 2) n->set_property ("cautionary", SCM_BOOL_T); @@ -1324,10 +1324,10 @@ chord_body_element: $$ = n; } | DRUM_PITCH post_events { - Music *n = MY_MAKE_MUSIC("NoteEvent"); + Music *n = MY_MAKE_MUSIC ("NoteEvent"); n->set_property ("duration" ,$2); n->set_property ("drum-type" , $1); - n->set_spot (THIS->here_input()); + n->set_spot (THIS->here_input ()); if (gh_pair_p ($2)) { SCM arts = scm_reverse_x ($2, SCM_EOL); @@ -1350,15 +1350,15 @@ add_quote: command_element: command_req { - $$ = MY_MAKE_MUSIC("EventChord"); + $$ = MY_MAKE_MUSIC ("EventChord"); $$->set_property ("elements", scm_cons ($1->self_scm (), SCM_EOL)); - scm_gc_unprotect_object ($1->self_scm()); + scm_gc_unprotect_object ($1->self_scm ()); $$-> set_spot (THIS->here_input ()); $1-> set_spot (THIS->here_input ()); } | SKIP duration_length { - Music * skip = MY_MAKE_MUSIC("SkipMusic"); + Music * skip = MY_MAKE_MUSIC ("SkipMusic"); skip->set_property ("duration", $2); $$ = skip; @@ -1374,7 +1374,7 @@ command_element: Music * quote = 0; if (gh_vector_p (evs)) { - quote = MY_MAKE_MUSIC("QuoteMusic"); + quote = MY_MAKE_MUSIC ("QuoteMusic"); quote->set_property ("duration", $3); quote->set_property ("quoted-events", evs); } else { @@ -1386,38 +1386,38 @@ command_element: } | OCTAVE { THIS->push_spot (); } pitch { - Music *l = MY_MAKE_MUSIC("RelativeOctaveCheck"); + Music *l = MY_MAKE_MUSIC ("RelativeOctaveCheck"); $$ = l; $$->set_spot (THIS->pop_spot ()); $$->set_property ("pitch", $3); } | E_LEFTSQUARE { - Music *l = MY_MAKE_MUSIC("LigatureEvent"); + Music *l = MY_MAKE_MUSIC ("LigatureEvent"); l->set_property ("span-direction", gh_int2scm (START)); l->set_spot (THIS->here_input ()); - $$ = MY_MAKE_MUSIC("EventChord"); + $$ = MY_MAKE_MUSIC ("EventChord"); $$->set_property ("elements", scm_cons (l->self_scm (), SCM_EOL)); - scm_gc_unprotect_object (l->self_scm()); + scm_gc_unprotect_object (l->self_scm ()); $$->set_spot (THIS->here_input ()); } | E_RIGHTSQUARE { - Music *l = MY_MAKE_MUSIC("LigatureEvent"); + Music *l = MY_MAKE_MUSIC ("LigatureEvent"); l->set_property ("span-direction", gh_int2scm (STOP)); l->set_spot (THIS->here_input ()); - $$ = MY_MAKE_MUSIC("EventChord"); + $$ = MY_MAKE_MUSIC ("EventChord"); $$->set_property ("elements", scm_cons (l->self_scm (), SCM_EOL)); $$->set_spot (THIS->here_input ()); - scm_gc_unprotect_object (l->self_scm()); + scm_gc_unprotect_object (l->self_scm ()); } | E_BACKSLASH { - $$ = MY_MAKE_MUSIC("VoiceSeparator"); + $$ = MY_MAKE_MUSIC ("VoiceSeparator"); $$->set_spot (THIS->here_input ()); } | '|' { - $$ = MY_MAKE_MUSIC("BarCheck"); + $$ = MY_MAKE_MUSIC ("BarCheck"); $$->set_spot (THIS->here_input ()); } | TRANSPOSITION pitch { @@ -1477,29 +1477,29 @@ command_element: command_req: BREATHE { - $$ = MY_MAKE_MUSIC("BreathingSignEvent"); + $$ = MY_MAKE_MUSIC ("BreathingSignEvent"); } | E_TILDE { - $$ = MY_MAKE_MUSIC("PesOrFlexaEvent"); + $$ = MY_MAKE_MUSIC ("PesOrFlexaEvent"); } | MARK DEFAULT { - Music * m = MY_MAKE_MUSIC("MarkEvent"); + Music * m = MY_MAKE_MUSIC ("MarkEvent"); $$ = m; } | tempo_event { $$ = $1; } | KEY DEFAULT { - Music *key= MY_MAKE_MUSIC("KeyChangeEvent"); + Music *key= MY_MAKE_MUSIC ("KeyChangeEvent"); $$ = key; } | KEY NOTENAME_PITCH SCM_IDENTIFIER { - Music *key= MY_MAKE_MUSIC("KeyChangeEvent"); + Music *key= MY_MAKE_MUSIC ("KeyChangeEvent"); if (scm_ilength ($3) > 0) { key->set_property ("pitch-alist", $3); - key->set_property ("tonic", Pitch (0,0,0).smobbed_copy()); + key->set_property ("tonic", Pitch (0,0,0).smobbed_copy ()); ((Music*)key)->transpose (* unsmob_pitch ($2)); } else { THIS->parser_error (_("Second argument must be pitch list.")); @@ -1515,13 +1515,13 @@ post_events: } | post_events post_event { $2->set_spot (THIS->here_input ()); - $$ = gh_cons ($2->self_scm(), $$); - scm_gc_unprotect_object ($2->self_scm()); + $$ = gh_cons ($2->self_scm (), $$); + scm_gc_unprotect_object ($2->self_scm ()); } | post_events tagged_post_event { $2 -> set_spot (THIS->here_input ()); - $$ = scm_cons ($2->self_scm(), $$); - scm_gc_unprotect_object ($2->self_scm()); + $$ = scm_cons ($2->self_scm (), $$); + scm_gc_unprotect_object ($2->self_scm ()); } ; @@ -1540,12 +1540,12 @@ post_event: | HYPHEN { if (!THIS->lexer_->is_lyric_state ()) THIS->parser_error (_ ("Have to be in Lyric mode for lyrics")); - $$ = MY_MAKE_MUSIC("HyphenEvent"); + $$ = MY_MAKE_MUSIC ("HyphenEvent"); } | EXTENDER { if (!THIS->lexer_->is_lyric_state ()) THIS->parser_error (_ ("Have to be in Lyric mode for lyrics")); - $$ = MY_MAKE_MUSIC("ExtenderEvent"); + $$ = MY_MAKE_MUSIC ("ExtenderEvent"); } | script_dir direction_reqd_event { if ($1) @@ -1562,8 +1562,8 @@ post_event: string_number_event: E_UNSIGNED { - Music * s = MY_MAKE_MUSIC("StringNumberEvent"); - s->set_property ("string-number", gh_int2scm($1)); + Music * s = MY_MAKE_MUSIC ("StringNumberEvent"); + s->set_property ("string-number", gh_int2scm ($1)); s->set_spot (THIS->here_input ()); $$ = s; } @@ -1584,19 +1584,19 @@ configurable, i.e. */ Music * m = MY_MAKE_MUSIC ("BeamEvent"); - m->set_spot (THIS->here_input()); + m->set_spot (THIS->here_input ()); m->set_property ("span-direction" , gh_int2scm (START)); $$ = m; } | ']' { Music * m = MY_MAKE_MUSIC ("BeamEvent"); - m->set_spot (THIS->here_input()); + m->set_spot (THIS->here_input ()); m->set_property ("span-direction" , gh_int2scm (STOP)); $$ = m; } | '~' { Music * m = MY_MAKE_MUSIC ("TieEvent"); - m->set_spot (THIS->here_input()); + m->set_spot (THIS->here_input ()); $$ = m; } | close_event { @@ -1613,7 +1613,7 @@ configurable, i.e. $$ = unsmob_music ($1); } | tremolo_type { - Music * a = MY_MAKE_MUSIC("TremoloEvent"); + Music * a = MY_MAKE_MUSIC ("TremoloEvent"); a->set_spot (THIS->here_input ()); a->set_property ("tremolo-type", gh_int2scm ($1)); $$ = a; @@ -1626,7 +1626,7 @@ direction_reqd_event: } | script_abbreviation { SCM s = THIS->lexer_->lookup_identifier ("dash" + ly_scm2string ($1)); - Music *a = MY_MAKE_MUSIC("ArticulationEvent"); + Music *a = MY_MAKE_MUSIC ("ArticulationEvent"); if (gh_string_p (s)) a->set_property ("articulation-type", s); else THIS->parser_error (_ ("Expecting string as script definition")); @@ -1709,65 +1709,65 @@ pitch_also_in_chords: close_event: '(' { - Music * s= MY_MAKE_MUSIC("SlurEvent"); + Music * s= MY_MAKE_MUSIC ("SlurEvent"); $$ = s; - s->set_spot (THIS->here_input()); + s->set_spot (THIS->here_input ()); } | E_OPEN { - Music * s= MY_MAKE_MUSIC("PhrasingSlurEvent"); + Music * s= MY_MAKE_MUSIC ("PhrasingSlurEvent"); $$ = s; - s->set_spot (THIS->here_input()); + s->set_spot (THIS->here_input ()); } | E_SMALLER { - Music *s =MY_MAKE_MUSIC("CrescendoEvent"); + Music *s =MY_MAKE_MUSIC ("CrescendoEvent"); $$ = s; - s->set_spot (THIS->here_input()); + s->set_spot (THIS->here_input ()); } | E_BIGGER { - Music *s =MY_MAKE_MUSIC("DecrescendoEvent"); + Music *s =MY_MAKE_MUSIC ("DecrescendoEvent"); $$ = s; - s->set_spot (THIS->here_input()); + s->set_spot (THIS->here_input ()); } ; open_event: E_EXCLAMATION { - Music *s = MY_MAKE_MUSIC("CrescendoEvent"); - s->set_spot (THIS->here_input()); + Music *s = MY_MAKE_MUSIC ("CrescendoEvent"); + s->set_spot (THIS->here_input ()); $$ = s; } | ')' { - Music * s= MY_MAKE_MUSIC("SlurEvent"); + Music * s= MY_MAKE_MUSIC ("SlurEvent"); $$ = s; - s->set_spot (THIS->here_input()); + s->set_spot (THIS->here_input ()); } | E_CLOSE { - Music * s= MY_MAKE_MUSIC("PhrasingSlurEvent"); + Music * s= MY_MAKE_MUSIC ("PhrasingSlurEvent"); $$ = s; s->set_property ("span-type", scm_makfrom0str ( "phrasing-slur")); - s->set_spot (THIS->here_input()); + s->set_spot (THIS->here_input ()); } ; gen_text_def: full_markup { - Music *t = MY_MAKE_MUSIC("TextScriptEvent"); + Music *t = MY_MAKE_MUSIC ("TextScriptEvent"); t->set_property ("text", $1); t->set_spot (THIS->here_input ()); $$ = t; } | string { - Music *t = MY_MAKE_MUSIC("TextScriptEvent"); + Music *t = MY_MAKE_MUSIC ("TextScriptEvent"); t->set_property ("text", make_simple_markup ($1)); t->set_spot (THIS->here_input ()); $$ = t; } | DIGIT { - Music * t = MY_MAKE_MUSIC("FingerEvent"); + Music * t = MY_MAKE_MUSIC ("FingerEvent"); t->set_property ("digit", gh_int2scm ($1)); t->set_spot (THIS->here_input ()); $$ = t; @@ -1919,13 +1919,13 @@ bass_mod: bass_figure: FIGURE_SPACE { - Music *bfr = MY_MAKE_MUSIC("BassFigureEvent"); - $$ = bfr->self_scm(); + Music *bfr = MY_MAKE_MUSIC ("BassFigureEvent"); + $$ = bfr->self_scm (); scm_gc_unprotect_object ($$); } | bass_number { - Music *bfr = MY_MAKE_MUSIC("BassFigureEvent"); - $$ = bfr->self_scm(); + Music *bfr = MY_MAKE_MUSIC ("BassFigureEvent"); + $$ = bfr->self_scm (); bfr->set_property ("figure", $1); @@ -1969,7 +1969,7 @@ figure_list: figure_spec: FIGURE_OPEN figure_list FIGURE_CLOSE { - Music * m = MY_MAKE_MUSIC("EventChord"); + Music * m = MY_MAKE_MUSIC ("EventChord"); $2 = scm_reverse_x ($2, SCM_EOL); m->set_property ("elements", $2); $$ = m->self_scm (); @@ -1991,9 +1991,9 @@ simple_element: Music *n = 0; if ($6) - n = MY_MAKE_MUSIC("RestEvent"); + n = MY_MAKE_MUSIC ("RestEvent"); else - n = MY_MAKE_MUSIC("NoteEvent"); + n = MY_MAKE_MUSIC ("NoteEvent"); n->set_property ("pitch", $1); n->set_property ("duration", $5); @@ -2009,9 +2009,9 @@ simple_element: if ($2 % 2 || $3 % 2) n->set_property ("force-accidental", SCM_BOOL_T); - Music *v = MY_MAKE_MUSIC("EventChord"); + Music *v = MY_MAKE_MUSIC ("EventChord"); v->set_property ("elements", scm_list_1 (n->self_scm ())); - scm_gc_unprotect_object (n->self_scm()); + scm_gc_unprotect_object (n->self_scm ()); v->set_spot (i); n->set_spot (i); @@ -2020,13 +2020,13 @@ simple_element: | DRUM_PITCH optional_notemode_duration { Input i = THIS->pop_spot (); - Music *n = MY_MAKE_MUSIC("NoteEvent"); + Music *n = MY_MAKE_MUSIC ("NoteEvent"); n->set_property ("duration" ,$2); n->set_property ("drum-type" , $1); - Music *v = MY_MAKE_MUSIC("EventChord"); + Music *v = MY_MAKE_MUSIC ("EventChord"); v->set_property ("elements", scm_list_1 (n->self_scm ())); - scm_gc_unprotect_object (n->self_scm()); + scm_gc_unprotect_object (n->self_scm ()); v->set_spot (i); n->set_spot (i); $$ = v; @@ -2048,19 +2048,19 @@ simple_element: Music * ev = 0; if (ly_scm2string ($1) =="s") { /* Space */ - ev = MY_MAKE_MUSIC("SkipEvent"); + ev = MY_MAKE_MUSIC ("SkipEvent"); } else { - ev = MY_MAKE_MUSIC("RestEvent"); + ev = MY_MAKE_MUSIC ("RestEvent"); } ev->set_property ("duration" ,$2); ev->set_spot (i); - Music * velt = MY_MAKE_MUSIC("EventChord"); + Music * velt = MY_MAKE_MUSIC ("EventChord"); velt->set_property ("elements", scm_list_1 (ev->self_scm ())); velt->set_spot (i); - scm_gc_unprotect_object (ev->self_scm()); + scm_gc_unprotect_object (ev->self_scm ()); $$ = velt; } @@ -2072,7 +2072,7 @@ simple_element: proc = scm_c_eval_string ("make-multi-measure-rest"); SCM mus = scm_call_2 (proc, $2, - make_input (THIS->here_input())); + make_input (THIS->here_input ())); scm_gc_protect_object (mus); $$ = unsmob_music (mus); } @@ -2082,11 +2082,11 @@ simple_element: if (!THIS->lexer_->is_lyric_state ()) THIS->parser_error (_ ("Have to be in Lyric mode for lyrics")); - Music * lreq = MY_MAKE_MUSIC("LyricEvent"); + Music * lreq = MY_MAKE_MUSIC ("LyricEvent"); lreq->set_property ("text", $1); lreq->set_property ("duration",$2); lreq->set_spot (i); - Music * velt = MY_MAKE_MUSIC("EventChord"); + Music * velt = MY_MAKE_MUSIC ("EventChord"); velt->set_property ("elements", scm_list_1 (lreq->self_scm ())); $$= velt; @@ -2419,7 +2419,7 @@ My_lily_lexer::try_special_identifiers (SCM * destination, SCM sid) *destination = sid; return NUMBER_IDENTIFIER; } else if (unsmob_context_def (sid)) { - *destination = unsmob_context_def (sid)->clone_scm(); + *destination = unsmob_context_def (sid)->clone_scm (); return CONTEXT_DEF_IDENTIFIER; } else if (unsmob_score (sid)) { Score *sc = new Score (*unsmob_score (sid)); @@ -2427,19 +2427,19 @@ My_lily_lexer::try_special_identifiers (SCM * destination, SCM sid) return SCORE_IDENTIFIER; } else if (Music * mus =unsmob_music (sid)) { mus = mus->clone (); - *destination = mus->self_scm(); + *destination = mus->self_scm (); unsmob_music (*destination)-> set_property ("origin", make_input (last_input_)); return dynamic_cast (mus) ? EVENT_IDENTIFIER : MUSIC_IDENTIFIER; } else if (unsmob_duration (sid)) { - *destination = unsmob_duration (sid)->smobbed_copy(); + *destination = unsmob_duration (sid)->smobbed_copy (); return DURATION_IDENTIFIER; } else if (unsmob_music_output_def (sid)) { Music_output_def *p = unsmob_music_output_def (sid); p = p->clone (); - *destination = p->self_scm(); + *destination = p->self_scm (); return MUSIC_OUTPUT_DEF_IDENTIFIER; } else if (Text_item::markup_p (sid)) { *destination = sid; @@ -2462,20 +2462,20 @@ property_op_to_music (SCM op) if (tag == ly_symbol2scm ("assign")) { - m = MY_MAKE_MUSIC("PropertySet"); + m = MY_MAKE_MUSIC ("PropertySet"); val = gh_car (args); } else if (tag == ly_symbol2scm ("unset")) - m = MY_MAKE_MUSIC("PropertyUnset"); + m = MY_MAKE_MUSIC ("PropertyUnset"); else if (tag == ly_symbol2scm ("poppush") || tag == ly_symbol2scm ("push")) { - m = MY_MAKE_MUSIC("OverrideProperty"); + m = MY_MAKE_MUSIC ("OverrideProperty"); grob_sym = gh_car (args); grob_val = gh_cadr (args); } else if (tag == ly_symbol2scm ("pop")) { - m = MY_MAKE_MUSIC("RevertProperty"); + m = MY_MAKE_MUSIC ("RevertProperty"); grob_sym = gh_car (args); } @@ -2509,7 +2509,7 @@ property_op_to_music (SCM op) Music* context_spec_music (SCM type, SCM id, Music * m, SCM ops) { - Music * csm = MY_MAKE_MUSIC("ContextSpeccedMusic"); + Music * csm = MY_MAKE_MUSIC ("ContextSpeccedMusic"); csm->set_property ("element", m->self_scm ()); scm_gc_unprotect_object (m->self_scm ()); diff --git a/lily/part-combine-engraver.cc b/lily/part-combine-engraver.cc index 61cf5404dd..a941876ef3 100644 --- a/lily/part-combine-engraver.cc +++ b/lily/part-combine-engraver.cc @@ -19,7 +19,7 @@ class Part_combine_engraver : public Engraver { - TRANSLATOR_DECLARATIONS(Part_combine_engraver); + TRANSLATOR_DECLARATIONS (Part_combine_engraver); protected: virtual void acknowledge_grob (Grob_info); @@ -99,7 +99,7 @@ Part_combine_engraver::stop_translation_timestep () event_ = 0; } -ENTER_DESCRIPTION(Part_combine_engraver, +ENTER_DESCRIPTION (Part_combine_engraver, /* descr */ "Part combine engraver for orchestral scores: " "Print markings a2, Solo, Solo II, and unisono ", /* creats*/ "CombineTextScript", diff --git a/lily/part-combine-iterator.cc b/lily/part-combine-iterator.cc index 7927732cec..39e3ea2ecf 100644 --- a/lily/part-combine-iterator.cc +++ b/lily/part-combine-iterator.cc @@ -19,7 +19,7 @@ class Part_combine_iterator : public Music_iterator public: Part_combine_iterator (); - DECLARE_SCHEME_CALLBACK(constructor, ()); + DECLARE_SCHEME_CALLBACK (constructor, ()); protected: virtual void derived_substitute (Context *f, Context *t) ; virtual void derived_mark () const; @@ -27,7 +27,7 @@ protected: virtual void construct_children (); virtual Moment pending_moment () const; - virtual void do_quit(); + virtual void do_quit (); virtual void process (Moment); virtual Music_iterator *try_music_in_children (Music *) const; @@ -82,9 +82,9 @@ void Part_combine_iterator::derived_mark () const { if (first_iter_) - scm_gc_mark (first_iter_->self_scm()); + scm_gc_mark (first_iter_->self_scm ()); if (second_iter_) - scm_gc_mark(second_iter_->self_scm()); + scm_gc_mark (second_iter_->self_scm ()); } void @@ -101,9 +101,9 @@ void Part_combine_iterator::do_quit () { if (first_iter_) - first_iter_->quit(); + first_iter_->quit (); if (second_iter_) - second_iter_->quit(); + second_iter_->quit (); null_.set_translator (0); one_ .set_translator (0); @@ -141,7 +141,7 @@ Part_combine_iterator::chords_together () playing_state_ = TOGETHER; state_ = TOGETHER; - substitute_both (shared_.get_outlet (), shared_.get_outlet()); + substitute_both (shared_.get_outlet (), shared_.get_outlet ()); } } diff --git a/lily/percent-repeat-engraver.cc b/lily/percent-repeat-engraver.cc index a7cc0f44da..3090e9b615 100644 --- a/lily/percent-repeat-engraver.cc +++ b/lily/percent-repeat-engraver.cc @@ -37,7 +37,7 @@ class Percent_repeat_engraver : public Engraver { void typeset_perc (); public: - TRANSLATOR_DECLARATIONS(Percent_repeat_engraver); + TRANSLATOR_DECLARATIONS (Percent_repeat_engraver); protected: Repeated_music * repeat_; @@ -136,12 +136,12 @@ Percent_repeat_engraver::process_music () perc_ = make_spanner ("PercentRepeat"); SCM col =get_property ("currentCommandColumn"); perc_->set_bound (LEFT, unsmob_grob (col)); - announce_grob(perc_, repeat_->self_scm()); + announce_grob (perc_, repeat_->self_scm ()); } else if (repeat_sign_type_ == DOUBLE_MEASURE) { double_percent_ = make_item ("DoublePercentRepeat"); - announce_grob(double_percent_, repeat_->self_scm()); + announce_grob (double_percent_, repeat_->self_scm ()); /* forbid breaks on a % line. Should forbid all breaks, really. @@ -213,7 +213,7 @@ Percent_repeat_engraver::stop_translation_timestep () -ENTER_DESCRIPTION(Percent_repeat_engraver, +ENTER_DESCRIPTION (Percent_repeat_engraver, /* descr */ "Make whole bar and double bar repeats.", /* creats*/ "PercentRepeat DoublePercentRepeat", /* accepts */ "repeated-music", diff --git a/lily/percent-repeat-item.cc b/lily/percent-repeat-item.cc index f927b923f8..2c0ae42d20 100644 --- a/lily/percent-repeat-item.cc +++ b/lily/percent-repeat-item.cc @@ -57,7 +57,7 @@ Percent_repeat_item_interface::x_percent (Grob *me, int count, return m; } -MAKE_SCHEME_CALLBACK(Percent_repeat_item_interface,double_percent,1); +MAKE_SCHEME_CALLBACK (Percent_repeat_item_interface,double_percent,1); SCM Percent_repeat_item_interface::double_percent (SCM grob) { @@ -67,7 +67,7 @@ Percent_repeat_item_interface::double_percent (SCM grob) return m.smobbed_copy (); } -MAKE_SCHEME_CALLBACK(Percent_repeat_item_interface,beat_slash,1); +MAKE_SCHEME_CALLBACK (Percent_repeat_item_interface,beat_slash,1); SCM Percent_repeat_item_interface::beat_slash (SCM grob) { diff --git a/lily/percent-repeat-iterator.cc b/lily/percent-repeat-iterator.cc index 8bb34c4e66..bd7a36b9a0 100644 --- a/lily/percent-repeat-iterator.cc +++ b/lily/percent-repeat-iterator.cc @@ -20,10 +20,10 @@ Percent_repeat_iterator::Percent_repeat_iterator () } void -Percent_repeat_iterator::do_quit() +Percent_repeat_iterator::do_quit () { if (child_iter_) - child_iter_->quit(); + child_iter_->quit (); } bool @@ -58,7 +58,7 @@ Percent_repeat_iterator::process (Moment m) if (finish_mom_ <= m ) { - child_iter_->quit(); + child_iter_->quit (); child_iter_ = 0; } } @@ -79,14 +79,14 @@ Percent_repeat_iterator::try_music_in_children (Music *m) const } void -Percent_repeat_iterator::derived_mark()const +Percent_repeat_iterator::derived_mark ()const { if (child_iter_) - scm_gc_mark (child_iter_->self_scm()); + scm_gc_mark (child_iter_->self_scm ()); } void -Percent_repeat_iterator::derived_substitute(Context *f,Context *t ) +Percent_repeat_iterator::derived_substitute (Context *f,Context *t ) { if (child_iter_) child_iter_->substitute_outlet (f,t); diff --git a/lily/performer-group-performer.cc b/lily/performer-group-performer.cc index 6844cce7a6..8a09796430 100644 --- a/lily/performer-group-performer.cc +++ b/lily/performer-group-performer.cc @@ -13,7 +13,7 @@ #include "warn.hh" -ENTER_DESCRIPTION(Performer_group_performer, +ENTER_DESCRIPTION (Performer_group_performer, /* descr */ "", /* creats*/ "", /* accepts */ "", @@ -67,7 +67,7 @@ Performer_group_performer::do_announces () } } -Performer_group_performer::Performer_group_performer() +Performer_group_performer::Performer_group_performer () { } diff --git a/lily/phrasing-slur-engraver.cc b/lily/phrasing-slur-engraver.cc index 9ae400b2b6..f6779595e2 100644 --- a/lily/phrasing-slur-engraver.cc +++ b/lily/phrasing-slur-engraver.cc @@ -37,7 +37,7 @@ protected: virtual void process_acknowledged_grobs (); public: - TRANSLATOR_DECLARATIONS(Phrasing_slur_engraver); + TRANSLATOR_DECLARATIONS (Phrasing_slur_engraver); }; @@ -143,7 +143,7 @@ Phrasing_slur_engraver::process_acknowledged_grobs () start_phrasing_slurs.push (phrasing_slur); eventses_.push (phrasing_slur_ev); - announce_grob(phrasing_slur, phrasing_slur_ev->self_scm()); + announce_grob (phrasing_slur, phrasing_slur_ev->self_scm ()); } } for (int i=0; i < start_phrasing_slurs.size (); i++) @@ -169,7 +169,7 @@ Phrasing_slur_engraver::start_translation_timestep () -ENTER_DESCRIPTION(Phrasing_slur_engraver, +ENTER_DESCRIPTION (Phrasing_slur_engraver, /* descr */ "Print phrasing slurs. Similar to @ref{Slur_engraver}", /* creats*/ "PhrasingSlur", /* accepts */ "phrasing-slur-event", diff --git a/lily/piano-pedal-bracket.cc b/lily/piano-pedal-bracket.cc index 26dbbc790d..52afd47c53 100644 --- a/lily/piano-pedal-bracket.cc +++ b/lily/piano-pedal-bracket.cc @@ -14,12 +14,12 @@ source file of the GNU LilyPond music typesetter struct Piano_pedal_bracket { - DECLARE_SCHEME_CALLBACK(print,(SCM)); + DECLARE_SCHEME_CALLBACK (print,(SCM)); static bool has_interface (Grob*); }; -MAKE_SCHEME_CALLBACK(Piano_pedal_bracket,print,1); +MAKE_SCHEME_CALLBACK (Piano_pedal_bracket,print,1); SCM Piano_pedal_bracket::print (SCM smob) { @@ -35,7 +35,7 @@ Piano_pedal_bracket::print (SCM smob) Grob *common = me->get_bound (LEFT) ->common_refpoint (me->get_bound (RIGHT), X_AXIS); - Grob *textbit = unsmob_grob (me->get_property("pedal-text")); + Grob *textbit = unsmob_grob (me->get_property ("pedal-text")); if (textbit) common = common->common_refpoint (textbit, X_AXIS); diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 234cd5c852..b26d280600 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -238,7 +238,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed) String msg = _ ("Need 3 strings for piano pedals. No pedal made. "); if (m) - m->origin()->warning (msg); + m->origin ()->warning (msg); else warning (msg); @@ -272,7 +272,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed) { s = ly_caddr (strings); if (previous_.size ()) - previous_.pop(); + previous_.pop (); } p->start_ev_ = 0; } @@ -329,8 +329,8 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed) { if (!p->event_drul_[START]) { - if (previous_.size()) - previous_.pop(); + if (previous_.size ()) + previous_.pop (); } assert (!p->finished_bracket_); @@ -421,8 +421,8 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed) // position new pedal spanner below the current one */ - if (previous_.size()) - Side_position_interface::add_support (p->line_spanner_, previous_.top()); + if (previous_.size ()) + Side_position_interface::add_support (p->line_spanner_, previous_.top ()); previous_.push (p->line_spanner_); } @@ -441,7 +441,7 @@ Piano_pedal_engraver::finalize () suicide? */ if (p->line_spanner_ - && !p->line_spanner_->live()) + && !p->line_spanner_->live ()) p->line_spanner_ = 0; if (p->line_spanner_) @@ -450,7 +450,7 @@ Piano_pedal_engraver::finalize () typeset_all (); } if (p->bracket_ - && !p->bracket_->live()) + && !p->bracket_->live ()) p->bracket_ = 0; if (p->bracket_) @@ -498,7 +498,7 @@ Piano_pedal_engraver::typeset_all () && !p->finished_line_spanner_->live ()) p->finished_line_spanner_ = 0; if (p->finished_bracket_ - && !p->finished_bracket_->live()) + && !p->finished_bracket_->live ()) p->finished_bracket_ = 0; diff --git a/lily/piano-pedal-performer.cc b/lily/piano-pedal-performer.cc index f9b1aca616..af5d54f065 100644 --- a/lily/piano-pedal-performer.cc +++ b/lily/piano-pedal-performer.cc @@ -24,7 +24,7 @@ class Piano_pedal_performer : public Performer }; public: - TRANSLATOR_DECLARATIONS(Piano_pedal_performer); + TRANSLATOR_DECLARATIONS (Piano_pedal_performer); ~Piano_pedal_performer (); protected: diff --git a/lily/pitch-squash-engraver.cc b/lily/pitch-squash-engraver.cc index e3641fa121..d2b8f8d3f2 100644 --- a/lily/pitch-squash-engraver.cc +++ b/lily/pitch-squash-engraver.cc @@ -13,7 +13,7 @@ class Pitch_squash_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Pitch_squash_engraver); + TRANSLATOR_DECLARATIONS (Pitch_squash_engraver); virtual void acknowledge_grob (Grob_info); }; @@ -31,11 +31,11 @@ Pitch_squash_engraver::acknowledge_grob (Grob_info i) -Pitch_squash_engraver::Pitch_squash_engraver() +Pitch_squash_engraver::Pitch_squash_engraver () { } -ENTER_DESCRIPTION(Pitch_squash_engraver, +ENTER_DESCRIPTION (Pitch_squash_engraver, /* descr */ "Set the vertical position of noteheads to " "@code{squashedPosition}, if that " diff --git a/lily/property-iterator.cc b/lily/property-iterator.cc index 84c237cbcd..def29de765 100644 --- a/lily/property-iterator.cc +++ b/lily/property-iterator.cc @@ -11,7 +11,7 @@ #include "context-def.hh" #include "global-context.hh" -bool check_grob(Music *mus, SCM sym); +bool check_grob (Music *mus, SCM sym); /** There is no real processing to a property: just lookup the @@ -43,9 +43,9 @@ Property_unset_iterator::process (Moment m) Simple_music_iterator::process (m); } -MAKE_SCHEME_CALLBACK(Property_iterator,once_finalization, 2); +MAKE_SCHEME_CALLBACK (Property_iterator,once_finalization, 2); SCM -Property_iterator::once_finalization(SCM translator, SCM music ) +Property_iterator::once_finalization (SCM translator, SCM music ) { Music * m = unsmob_music (music); Context * tg @@ -61,8 +61,8 @@ Property_iterator::do_quit () { if (to_boolean (get_music ()->get_property ("once"))) { - SCM trans = get_outlet ()->self_scm(); - SCM music = get_music()->self_scm(); + SCM trans = get_outlet ()->self_scm (); + SCM music = get_music ()->self_scm (); Global_context * tg = get_outlet ()->get_global_context (); tg->add_finalization (scm_list_n (once_finalization_proc, @@ -78,7 +78,7 @@ SCM list_p = 0; property is a list. */ bool -check_grob(Music *mus, SCM sym) +check_grob (Music *mus, SCM sym) { if (!list_p) { @@ -91,7 +91,7 @@ check_grob(Music *mus, SCM sym) if (!ok) { - mus->origin()->warning (_f("Not a grob name, `%s'." , ly_symbol2string (sym))); + mus->origin ()->warning (_f ("Not a grob name, `%s'." , ly_symbol2string (sym))); } return ok; } @@ -115,7 +115,7 @@ Push_property_iterator::process (Moment m) Simple_music_iterator::process (m); } -MAKE_SCHEME_CALLBACK(Push_property_iterator,once_finalization, 2); +MAKE_SCHEME_CALLBACK (Push_property_iterator,once_finalization, 2); SCM Push_property_iterator::once_finalization (SCM trans, SCM music) { @@ -137,8 +137,8 @@ Push_property_iterator::do_quit () { if (to_boolean (get_music ()->get_property ("once"))) { - SCM trans = get_outlet ()->self_scm(); - SCM music = get_music ()->self_scm(); + SCM trans = get_outlet ()->self_scm (); + SCM music = get_music ()->self_scm (); Global_context * tg= get_outlet ()->get_global_context (); tg->add_finalization (scm_list_n (once_finalization_proc, diff --git a/lily/quote-iterator.cc b/lily/quote-iterator.cc index 8b4a7d59ec..0dc7210485 100644 --- a/lily/quote-iterator.cc +++ b/lily/quote-iterator.cc @@ -29,7 +29,7 @@ public: SCM transposed_musics_; - DECLARE_SCHEME_CALLBACK(constructor, ()); + DECLARE_SCHEME_CALLBACK (constructor, ()); protected: virtual void derived_mark (); @@ -72,7 +72,7 @@ binsearch_scm_vector (SCM vec, SCM key, bool (*is_less)(SCM a,SCM b)) { int cmp = (lo + hi) / 2; - SCM when = gh_caar (SCM_VECTOR_REF(vec, cmp)); + SCM when = gh_caar (SCM_VECTOR_REF (vec, cmp)); bool result = (*is_less) (key, when); if (result) hi = cmp; @@ -178,7 +178,7 @@ Quote_iterator::process (Moment m) bool b = get_outlet ()->try_music (mus); if (!b) - mus->origin ()->warning (_f ("In quotation: junking event %s", mus->name())); + mus->origin ()->warning (_f ("In quotation: junking event %s", mus->name ())); } else programming_error ("need music in quote."); diff --git a/lily/recording-group-engraver.cc b/lily/recording-group-engraver.cc index 0b8b87da00..16dce16468 100644 --- a/lily/recording-group-engraver.cc +++ b/lily/recording-group-engraver.cc @@ -15,7 +15,7 @@ class Recording_group_engraver : public Engraver_group_engraver { void start (); public: - TRANSLATOR_DECLARATIONS(Recording_group_engraver); + TRANSLATOR_DECLARATIONS (Recording_group_engraver); virtual bool try_music (Music *m); virtual void start_translation_timestep (); virtual void stop_translation_timestep (); @@ -31,19 +31,19 @@ Recording_group_engraver::initialize () start (); } -Recording_group_engraver::Recording_group_engraver() +Recording_group_engraver::Recording_group_engraver () { } void Recording_group_engraver::start_translation_timestep () { - Engraver_group_engraver::start_translation_timestep(); + Engraver_group_engraver::start_translation_timestep (); /* - We have to do this both in initialize() and - start_translation_timestep(), since start_translation_timestep() + We have to do this both in initialize () and + start_translation_timestep (), since start_translation_timestep () isn't called on the first time-step. */ start () ; @@ -68,7 +68,7 @@ Recording_group_engraver::start () void Recording_group_engraver::stop_translation_timestep () { - Engraver_group_engraver::stop_translation_timestep(); + Engraver_group_engraver::stop_translation_timestep (); scm_set_cdr_x (accumulator_, gh_cons (gh_car (accumulator_), gh_cdr (accumulator_))); scm_set_car_x (accumulator_, SCM_EOL); @@ -81,7 +81,7 @@ Recording_group_engraver::finalize () SCM proc = get_property ("recordEventSequence"); if (gh_procedure_p (proc)) - scm_call_2 (proc, daddy_context_->self_scm(), gh_cdr (accumulator_)); + scm_call_2 (proc, daddy_context_->self_scm (), gh_cdr (accumulator_)); accumulator_ = SCM_EOL; } @@ -92,7 +92,7 @@ Recording_group_engraver::try_music (Music *m) bool retval = Translator_group::try_music (m); SCM seq = gh_cdar (accumulator_); - seq = gh_cons (gh_cons (m->self_scm(), gh_bool2scm (retval)), + seq = gh_cons (gh_cons (m->self_scm (), gh_bool2scm (retval)), seq); scm_set_cdr_x (gh_car (accumulator_), seq); @@ -101,7 +101,7 @@ Recording_group_engraver::try_music (Music *m) } -ENTER_DESCRIPTION(Recording_group_engraver, +ENTER_DESCRIPTION (Recording_group_engraver, "Engraver_group_engraver that records all music events " "for this context. Calls the procedure " "in @code{recordEventSequence} when finished.", diff --git a/lily/relative-octave-check.cc b/lily/relative-octave-check.cc index 51de14b849..fedc58b9be 100644 --- a/lily/relative-octave-check.cc +++ b/lily/relative-octave-check.cc @@ -16,7 +16,7 @@ Relative_octave_check::to_relative_octave (Pitch p) { Pitch no_octave (-1, check_p->get_notename (), - check_p->get_alteration()); + check_p->get_alteration ()); Pitch result = no_octave.to_relative_octave (p); @@ -35,4 +35,4 @@ Relative_octave_check::to_relative_octave (Pitch p) p.get_notename (), p.get_alteration ()); } -ADD_MUSIC(Relative_octave_check); +ADD_MUSIC (Relative_octave_check); diff --git a/lily/repeat-acknowledge-engraver.cc b/lily/repeat-acknowledge-engraver.cc index 11619e2b78..0b3752eecd 100644 --- a/lily/repeat-acknowledge-engraver.cc +++ b/lily/repeat-acknowledge-engraver.cc @@ -27,7 +27,7 @@ class Repeat_acknowledge_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Repeat_acknowledge_engraver); + TRANSLATOR_DECLARATIONS (Repeat_acknowledge_engraver); virtual void start_translation_timestep (); virtual void process_music (); @@ -109,7 +109,7 @@ Repeat_acknowledge_engraver::process_music () } } -ENTER_DESCRIPTION(Repeat_acknowledge_engraver, +ENTER_DESCRIPTION (Repeat_acknowledge_engraver, /* descr */ "Acknowledge repeated music, and convert the contents of " "repeatCommands ainto an appropriate setting for whichBar.", /* creats*/ "", diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc index 27070c9032..37bcfd3de9 100644 --- a/lily/repeated-music.cc +++ b/lily/repeated-music.cc @@ -168,10 +168,10 @@ Repeated_music::minimum_start (SCM m) Music * body = unsmob_music (me->get_property ("element")); if (body) - return body->start_mom ().smobbed_copy(); + return body->start_mom ().smobbed_copy (); else { - return Music_sequence::minimum_start (me->get_property ("elements")).smobbed_copy(); + return Music_sequence::minimum_start (me->get_property ("elements")).smobbed_copy (); } } diff --git a/lily/rest-collision-engraver.cc b/lily/rest-collision-engraver.cc index 893a781501..149ad79831 100644 --- a/lily/rest-collision-engraver.cc +++ b/lily/rest-collision-engraver.cc @@ -21,7 +21,7 @@ protected: virtual void process_acknowledged_grobs (); virtual void stop_translation_timestep (); public: - TRANSLATOR_DECLARATIONS(Rest_collision_engraver); + TRANSLATOR_DECLARATIONS (Rest_collision_engraver); }; Rest_collision_engraver::Rest_collision_engraver () @@ -42,7 +42,7 @@ Rest_collision_engraver::process_acknowledged_grobs () rest_collision_ = make_item ("RestCollision"); - announce_grob(rest_collision_, SCM_EOL); + announce_grob (rest_collision_, SCM_EOL); for (int i=0; i < note_columns_.size (); i++) Rest_collision::add_column (rest_collision_,note_columns_[i]); } @@ -70,7 +70,7 @@ Rest_collision_engraver::stop_translation_timestep () rest_count_ = 0; } -ENTER_DESCRIPTION(Rest_collision_engraver, +ENTER_DESCRIPTION (Rest_collision_engraver, /* descr */ "Handles collisions of rests.", /* creats*/ "RestCollision", /* accepts */ "", diff --git a/lily/rest-engraver.cc b/lily/rest-engraver.cc index c89715c5b9..b87a913cb1 100644 --- a/lily/rest-engraver.cc +++ b/lily/rest-engraver.cc @@ -25,7 +25,7 @@ protected: virtual void process_music (); public: - TRANSLATOR_DECLARATIONS(Rest_engraver); + TRANSLATOR_DECLARATIONS (Rest_engraver); }; @@ -100,7 +100,7 @@ Rest_engraver::process_music () rest_->set_property ("staff-position", gh_int2scm (pos)); } - announce_grob(rest_, rest_req_->self_scm()); + announce_grob (rest_, rest_req_->self_scm ()); } } @@ -115,7 +115,7 @@ Rest_engraver::try_music (Music *m) return false; } -ENTER_DESCRIPTION(Rest_engraver, +ENTER_DESCRIPTION (Rest_engraver, /* descr */ "", /* creats*/ "Rest Dots", /* accepts */ "rest-event", diff --git a/lily/rest.cc b/lily/rest.cc index a7475e452e..16b5032ec1 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -24,7 +24,7 @@ Rest::after_line_breaking (SCM smob) int bt = gh_scm2int (me->get_property ("duration-log")); int lc = Staff_symbol_referencer::line_count (me); Real ss = Staff_symbol_referencer::staff_space (me); - if(lc % 2) + if (lc % 2) { if (bt == 0 && lc > 1) { @@ -140,7 +140,7 @@ Rest::brew_internal_stencil (SCM smob) me->warning (_f ("rest `%s' not found, ", font_char.to_str0 ())); } - return out.smobbed_copy(); + return out.smobbed_copy (); } SCM @@ -170,7 +170,7 @@ Rest::polyphonic_offset_callback (SCM smob, SCM) Direction d = get_grob_direction (me); Real off = 2* d ; - if(off) + if (off) off *= Staff_symbol_referencer::staff_space (me); return gh_double2scm (off); } diff --git a/lily/rhythmic-column-engraver.cc b/lily/rhythmic-column-engraver.cc index d2ef56522f..5e4b5385b8 100644 --- a/lily/rhythmic-column-engraver.cc +++ b/lily/rhythmic-column-engraver.cc @@ -55,7 +55,7 @@ class Rhythmic_column_engraver :public Engraver Grob * last_spacing_; Grob * spacing_; - TRANSLATOR_DECLARATIONS(Rhythmic_column_engraver); + TRANSLATOR_DECLARATIONS (Rhythmic_column_engraver); protected: virtual void acknowledge_grob (Grob_info); @@ -84,7 +84,7 @@ Rhythmic_column_engraver::process_acknowledged_grobs () if (!note_column_) { note_column_ = make_item ("NoteColumn"); - announce_grob(note_column_, rheads_[0]->self_scm ()); + announce_grob (note_column_, rheads_[0]->self_scm ()); spacing_ = make_item ("NoteSpacing"); spacing_->set_property ("left-items", gh_cons (note_column_->self_scm (), SCM_EOL)); @@ -170,7 +170,7 @@ Rhythmic_column_engraver::stop_translation_timestep () -ENTER_DESCRIPTION(Rhythmic_column_engraver, +ENTER_DESCRIPTION (Rhythmic_column_engraver, /* descr */ "Generates NoteColumn, an objects that groups stems, noteheads and rests.", /* creats*/ "NoteColumn NoteSpacing", /* accepts */ "", diff --git a/lily/scm-hash.cc b/lily/scm-hash.cc index 9fbd7c5153..bc0874392f 100644 --- a/lily/scm-hash.cc +++ b/lily/scm-hash.cc @@ -19,7 +19,7 @@ copy_scm_hashes (SCM dest, SCM src) { int k = 0; for (int i = SCM_VECTOR_LENGTH (src); i--;) - for (SCM s = scm_vector_ref (src, SCM_MAKINUM (i)); ly_pair_p(s); s = ly_cdr (s)) + for (SCM s = scm_vector_ref (src, SCM_MAKINUM (i)); ly_pair_p (s); s = ly_cdr (s)) { scm_hashq_set_x (dest, ly_caar (s), ly_cdar (s)); k++; @@ -71,7 +71,7 @@ Scheme_hash_table::print_smob (SCM s, SCM p, scm_print_state*) { assert (unsmob (s)); char str[1000]; - sprintf (str, "#hash_tab_, p); scm_puts ("> ",p); @@ -128,7 +128,7 @@ Scheme_hash_table::get (SCM k)const /* 42 will stick out like a sore thumb, hopefully. */ - return scm_hashq_ref (hash_tab_, k, SCM_MAKINUM(42)); + return scm_hashq_ref (hash_tab_, k, SCM_MAKINUM (42)); } void @@ -150,7 +150,7 @@ Scheme_hash_table::to_alist () const { SCM l = SCM_EOL; for (int i = SCM_VECTOR_LENGTH (hash_tab_); i--;) - for (SCM s = scm_vector_ref (hash_tab_, gh_int2scm (i)); ly_pair_p(s); s = ly_cdr (s)) + for (SCM s = scm_vector_ref (hash_tab_, gh_int2scm (i)); ly_pair_p (s); s = ly_cdr (s)) { l = scm_acons (ly_caar (s), ly_cdar (s), l); } diff --git a/lily/scm-option.cc b/lily/scm-option.cc index 64302127c8..3a3ce3edb3 100644 --- a/lily/scm-option.cc +++ b/lily/scm-option.cc @@ -118,7 +118,7 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val), } else if (var == ly_symbol2scm ("parse-protect" )) { - parse_protect_global = to_boolean(val); + parse_protect_global = to_boolean (val); } else if (var == ly_symbol2scm ("internal-type-checking")) { diff --git a/lily/score-context.cc b/lily/score-context.cc index 4048df84de..0ffef5660e 100644 --- a/lily/score-context.cc +++ b/lily/score-context.cc @@ -32,7 +32,7 @@ Score_context::one_time_step () { Translator* t = unsmob_translator (implementation_); Score_translator * s = dynamic_cast (t); - s->one_time_step(); + s->one_time_step (); } diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index e69db174c9..5eef0cb6ee 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -98,7 +98,7 @@ Score_engraver::finish () void Score_engraver::initialize () { - Font_metric *fm = all_fonts_global->find_afm("feta20"); + Font_metric *fm = all_fonts_global->find_afm ("feta20"); if (!fm) error (_f ("can't find `%s'", "feta20.afm") + "\n" +_ ("Fonts have not been installed properly. Aborting")); @@ -183,7 +183,7 @@ Score_engraver::typeset_all () /* don't warn for empty/suicided spanners, it makes real warningsinvisible. maybe should be junked earlier? */ - if (!elem->live()) + if (!elem->live ()) ; // gdb hook else elem->warning (_f ("unbound spanner `%s'", s->name ().to_str0 ())); @@ -312,7 +312,7 @@ Score_engraver::acknowledge_grob (Grob_info gi) -ENTER_DESCRIPTION(Score_engraver, +ENTER_DESCRIPTION (Score_engraver, /* descr */ "Top level engraver. Takes care of generating columns and the complete system (ie. System) " "\n\n " "This engraver decides whether a column is breakable. The default is " diff --git a/lily/score-performer.cc b/lily/score-performer.cc index 927563a575..909ca131ac 100644 --- a/lily/score-performer.cc +++ b/lily/score-performer.cc @@ -18,7 +18,7 @@ -ENTER_DESCRIPTION(Score_performer, +ENTER_DESCRIPTION (Score_performer, /* descr */ "", /* creats*/ "", /* accepts */ "", diff --git a/lily/score.cc b/lily/score.cc index 04f0aa013e..4350d8854a 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -98,7 +98,7 @@ Score::Score (Score const &s) -LY_DEFINE(ly_run_translator, "ly:run-translator", +LY_DEFINE (ly_run_translator, "ly:run-translator", 2, 0, 0, (SCM mus, SCM output_def), "Process @var{mus} according to @var{output_def}. A interpretation " @@ -136,7 +136,7 @@ LY_DEFINE(ly_run_translator, "ly:run-translator", } trans->run_iterator_on_me (iter); - iter->quit(); + iter->quit (); scm_remember_upto_here_1 (protected_iter); trans->finish (); @@ -148,7 +148,7 @@ LY_DEFINE(ly_run_translator, "ly:run-translator", } -LY_DEFINE(ly_render_output, "ly:render-output", +LY_DEFINE (ly_render_output, "ly:render-output", 3,0,0, (SCM context, SCM header, SCM out_filename), "Given a Score context in its final state, calculate the output, " @@ -157,11 +157,11 @@ LY_DEFINE(ly_render_output, "ly:render-output", { Global_context * gt = dynamic_cast (unsmob_context (context)); - SCM_ASSERT_TYPE(gt, context, SCM_ARG1, __FUNCTION__, + SCM_ASSERT_TYPE (gt, context, SCM_ARG1, __FUNCTION__, "Global context"); - SCM_ASSERT_TYPE(ly_module_p(header), header, SCM_ARG2, __FUNCTION__, + SCM_ASSERT_TYPE (ly_module_p (header), header, SCM_ARG2, __FUNCTION__, "module"); - SCM_ASSERT_TYPE(gh_string_p (out_filename), out_filename, SCM_ARG3, __FUNCTION__, + SCM_ASSERT_TYPE (gh_string_p (out_filename), out_filename, SCM_ARG3, __FUNCTION__, "output filename"); Music_output * output = gt->get_output (); diff --git a/lily/script-column-engraver.cc b/lily/script-column-engraver.cc index 45a2d4d6b0..9fd77afb47 100644 --- a/lily/script-column-engraver.cc +++ b/lily/script-column-engraver.cc @@ -21,7 +21,7 @@ class Script_column_engraver : public Engraver Link_array scripts_; public: - TRANSLATOR_DECLARATIONS(Script_column_engraver); + TRANSLATOR_DECLARATIONS (Script_column_engraver); protected: virtual void acknowledge_grob (Grob_info); virtual void process_acknowledged_grobs (); @@ -65,7 +65,7 @@ Script_column_engraver::process_acknowledged_grobs () if (!scol_ && scripts_.size () > 1) { scol_ = make_item ("ScriptColumn"); - announce_grob(scol_, SCM_EOL); + announce_grob (scol_, SCM_EOL); } if (scol_) @@ -77,7 +77,7 @@ Script_column_engraver::process_acknowledged_grobs () } -ENTER_DESCRIPTION(Script_column_engraver, +ENTER_DESCRIPTION (Script_column_engraver, /* descr */ "", /* creats*/ "ScriptColumn", /* accepts */ "", diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index 19eddfed09..542f59fcc9 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -32,7 +32,7 @@ class Script_engraver : public Engraver { Array scripts_; public: - TRANSLATOR_DECLARATIONS(Script_engraver); + TRANSLATOR_DECLARATIONS (Script_engraver); protected: virtual bool try_music (Music*); virtual void stop_translation_timestep (); @@ -146,7 +146,7 @@ Script_engraver::process_music () p->set_property ("direction", force_dir); if (p) - announce_grob (p, l->self_scm()); + announce_grob (p, l->self_scm ()); } } @@ -231,9 +231,9 @@ Script_engraver::stop_translation_timestep () -Script_engraver::Script_engraver(){} +Script_engraver::Script_engraver (){} -ENTER_DESCRIPTION(Script_engraver, +ENTER_DESCRIPTION (Script_engraver, /* descr */ "Handles note scripted articulations.", /* creats*/ "Script", /* accepts */ "script-event articulation-event", diff --git a/lily/separating-group-spanner.cc b/lily/separating-group-spanner.cc index 88a07d6d72..a6100f17a1 100644 --- a/lily/separating-group-spanner.cc +++ b/lily/separating-group-spanner.cc @@ -28,9 +28,9 @@ Separating_group_spanner::find_rods (Item * r, SCM next, Real padding) return; - for(; gh_pair_p (next); next = ly_cdr (next)) + for (; gh_pair_p (next); next = ly_cdr (next)) { - Item *l = dynamic_cast (unsmob_grob (ly_car( next))); + Item *l = dynamic_cast (unsmob_grob (ly_car ( next))); Item *lb = l->find_prebroken_piece (RIGHT); if (lb) diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc index 59fdc72119..93b3ccdda3 100644 --- a/lily/separating-line-group-engraver.cc +++ b/lily/separating-line-group-engraver.cc @@ -36,7 +36,7 @@ struct Spacings } void clear () { staff_spacing_ = 0; - note_spacings_.clear(); + note_spacings_.clear (); } }; @@ -59,7 +59,7 @@ protected: virtual void stop_translation_timestep (); virtual void start_translation_timestep (); public: - TRANSLATOR_DECLARATIONS(Separating_line_group_engraver); + TRANSLATOR_DECLARATIONS (Separating_line_group_engraver); }; Separating_line_group_engraver::Separating_line_group_engraver () @@ -77,7 +77,7 @@ Separating_line_group_engraver::process_music () { sep_span_ = make_spanner ("SeparatingGroupSpanner"); - announce_grob(sep_span_, SCM_EOL); + announce_grob (sep_span_, SCM_EOL); sep_span_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); } } @@ -94,14 +94,14 @@ Separating_line_group_engraver::finalize () typeset_grob (sep_span_); sep_span_ =0; - for (int i= 0 ; i < last_spacings_.note_spacings_.size(); i++) + for (int i= 0 ; i < last_spacings_.note_spacings_.size (); i++) { Pointer_group_interface::add_grob (last_spacings_.note_spacings_[i], ly_symbol2scm ("right-items" ), column); } - if(last_spacings_.staff_spacing_ + if (last_spacings_.staff_spacing_ && last_spacings_.staff_spacing_->get_column () == column) { last_spacings_.staff_spacing_->suicide (); @@ -116,7 +116,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i) return; if (it->get_parent (X_AXIS) && it->get_parent (X_AXIS) - ->has_extent_callback(Axis_group_interface::group_extent_callback_proc, X_AXIS)) + ->has_extent_callback (Axis_group_interface::group_extent_callback_proc, X_AXIS)) return; @@ -142,7 +142,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i) p_ref_->set_property ("breakable", SCM_BOOL_T); daddy_context_->set_property ("breakableSeparationItem", p_ref_->self_scm ()); } - announce_grob(p_ref_, SCM_EOL); + announce_grob (p_ref_, SCM_EOL); if (p_ref_ == break_item_) { @@ -150,7 +150,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i) current_spacings_.staff_spacing_ = it; it->set_property ("left-items", gh_cons (break_item_->self_scm (), SCM_EOL)); - announce_grob(it, SCM_EOL); + announce_grob (it, SCM_EOL); if (int i = last_spacings_.note_spacings_.size ()) { @@ -164,7 +164,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i) { last_spacings_.staff_spacing_->set_property ("right-items", - gh_cons (break_item_->self_scm(), SCM_EOL)); + gh_cons (break_item_->self_scm (), SCM_EOL)); } } } @@ -223,7 +223,7 @@ Separating_line_group_engraver::stop_translation_timestep () } -ENTER_DESCRIPTION(Separating_line_group_engraver, +ENTER_DESCRIPTION (Separating_line_group_engraver, /* descr */ "Generates objects for computing spacing parameters.", /* creats*/ "SeparationItem SeparatingGroupSpanner", /* accepts */ "", diff --git a/lily/sequential-iterator.cc b/lily/sequential-iterator.cc index f1c8fee84d..6aed08927c 100644 --- a/lily/sequential-iterator.cc +++ b/lily/sequential-iterator.cc @@ -55,7 +55,7 @@ void Sequential_iterator::do_quit () { if (iter_) - iter_->quit(); + iter_->quit (); } @@ -65,7 +65,7 @@ void Sequential_iterator::derived_mark ()const { if (iter_) - scm_gc_mark (iter_->self_scm()); + scm_gc_mark (iter_->self_scm ()); scm_gc_mark (list_); scm_gc_mark (cursor_); } @@ -109,7 +109,7 @@ get_grace_fixups (SCM cursor) here.grace_part_ = s.grace_part_; } - if (l.to_bool()) + if (l.to_bool ()) { last = here; here += l; @@ -201,7 +201,7 @@ Sequential_iterator::next_element (bool) cursor_ = ly_cdr (cursor_); - iter_->quit(); + iter_->quit (); if (gh_pair_p (cursor_)) iter_ = unsmob_iterator (get_iterator (unsmob_music (ly_car (cursor_)))); else diff --git a/lily/sequential-music-iterator.cc b/lily/sequential-music-iterator.cc index 775318febe..bc00a33e12 100644 --- a/lily/sequential-music-iterator.cc +++ b/lily/sequential-music-iterator.cc @@ -19,7 +19,7 @@ IMPLEMENT_CTOR_CALLBACK (Sequential_music_iterator); SCM -Sequential_music_iterator::get_music_list()const +Sequential_music_iterator::get_music_list ()const { return dynamic_cast (get_music ())->music_list (); } diff --git a/lily/simple-spacer.cc b/lily/simple-spacer.cc index 4a33adb258..b953c524d6 100644 --- a/lily/simple-spacer.cc +++ b/lily/simple-spacer.cc @@ -212,7 +212,7 @@ Simple_spacer::my_solve_natural_len () void Simple_spacer::add_columns (Link_array const &icols) { - Link_array cols(icols); + Link_array cols (icols); for (int i = cols.size (); i--;) if (gh_pair_p (cols[i]->get_property ("between-cols"))) @@ -245,7 +245,7 @@ Simple_spacer::add_columns (Link_array const &icols) } else { - programming_error (_f("No spring between column %d and next one", + programming_error (_f ("No spring between column %d and next one", Paper_column::get_rank (cols[i]) )); desc.hooke_ = 1.0; @@ -368,7 +368,7 @@ Simple_spacer::solve (Column_x_positions *positions, bool ragged) int sz = positions->cols_.size (); for (int i = sz; i--; ) { - SCM p = positions->cols_[i]->get_property( "penalty"); + SCM p = positions->cols_[i]->get_property ( "penalty"); if (gh_number_p (p)) { if (gh_scm2double (p) < -9999) diff --git a/lily/simultaneous-music-iterator.cc b/lily/simultaneous-music-iterator.cc index ab35920c21..766efa44e7 100644 --- a/lily/simultaneous-music-iterator.cc +++ b/lily/simultaneous-music-iterator.cc @@ -29,7 +29,7 @@ Simultaneous_music_iterator::derived_mark () const void Simultaneous_music_iterator::derived_substitute (Context *f,Context *t) { - for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr(s)) + for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s)) unsmob_iterator (gh_car (s))-> substitute_outlet (f,t); } @@ -92,7 +92,7 @@ Simultaneous_music_iterator::process (Moment until) } else { - proc = SCM_CDRLOC(*proc); + proc = SCM_CDRLOC (*proc); } } } @@ -103,7 +103,7 @@ Simultaneous_music_iterator::pending_moment () const Moment next; next.set_infinite (1); - for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr(s)) + for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s)) { Music_iterator * it = unsmob_iterator (gh_car (s)); next = next pending_moment (); @@ -116,7 +116,7 @@ bool Simultaneous_music_iterator::ok () const { bool run_always_ok = false; - for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr(s)) + for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s)) { Music_iterator * it = unsmob_iterator (gh_car (s)); if (!it->run_always ()) @@ -130,7 +130,7 @@ Simultaneous_music_iterator::ok () const bool Simultaneous_music_iterator::run_always () const { - for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr(s)) + for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s)) { Music_iterator * it = unsmob_iterator (gh_car (s)); if (it->run_always ()) @@ -143,7 +143,7 @@ Music_iterator* Simultaneous_music_iterator::try_music_in_children (Music *m) const { Music_iterator * b=0; - for (SCM s = children_list_; !b && gh_pair_p (s); s = gh_cdr(s)) + for (SCM s = children_list_; !b && gh_pair_p (s); s = gh_cdr (s)) b =unsmob_iterator (gh_car (s))->try_music (m); return b; } @@ -151,8 +151,8 @@ Simultaneous_music_iterator::try_music_in_children (Music *m) const void Simultaneous_music_iterator::do_quit () { - for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr(s)) - unsmob_iterator (gh_car (s))->quit(); + for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s)) + unsmob_iterator (gh_car (s))->quit (); } IMPLEMENT_CTOR_CALLBACK (Simultaneous_music_iterator); diff --git a/lily/simultaneous-music.cc b/lily/simultaneous-music.cc index 6a4d1f1e1a..ba79169dbd 100644 --- a/lily/simultaneous-music.cc +++ b/lily/simultaneous-music.cc @@ -25,7 +25,7 @@ Simultaneous_music::start_mom () const return Music_sequence::minimum_start (get_property ("elements")); } -Simultaneous_music::Simultaneous_music() +Simultaneous_music::Simultaneous_music () { } @@ -36,7 +36,7 @@ Simultaneous_music::to_relative_octave (Pitch p) if (lily_1_8_relative) lily_1_8_compatibility_used = true; - return music_list_to_relative (music_list(), p, lily_1_8_relative); + return music_list_to_relative (music_list (), p, lily_1_8_relative); } ADD_MUSIC (Simultaneous_music); @@ -47,4 +47,4 @@ Event_chord::to_relative_octave (Pitch p) return music_list_to_relative (music_list (), p, true); } -ADD_MUSIC(Event_chord); +ADD_MUSIC (Event_chord); diff --git a/lily/skyline.cc b/lily/skyline.cc index 718200c012..33447faeb8 100644 --- a/lily/skyline.cc +++ b/lily/skyline.cc @@ -32,7 +32,7 @@ skyline[...].width_ forms a partition of the real interval, where the segments are adjacent, and ascending. Hence we have - skyline.top().width_[RIGHT] = inf + skyline.top ().width_[RIGHT] = inf skyline[0].width_[LEFT] = -inf */ @@ -43,7 +43,7 @@ const Real EPS = 1e-12; /* TODO: avoid unnecessary fragmentation. - This is O(n^2), searching and insertion. Could be O(n log n) with + This is O (n^2), searching and insertion. Could be O (n log n) with binsearch. */ void @@ -59,29 +59,29 @@ insert_extent_into_skyline (Array *line, Box b, Axis line_axis, /* Intersect each segment of LINE with EXTENT, and if non-empty, insert relevant segments. */ - for (int i = line->size(); i--;) + for (int i = line->size (); i--;) { - Interval w = line->elem(i).width_; + Interval w = line->elem (i).width_; w.intersect (extent); if (extent[LEFT] >= w[RIGHT]) break; - Real my_height = line->elem(i).height_; + Real my_height = line->elem (i).height_; if (!w.is_empty () && - w.length() > EPS + w.length () > EPS && d* (my_height - stick_out) < 0) { - Interval e1 (line->elem(i).width_[LEFT], extent[LEFT]); - Interval e3 (extent[RIGHT], line->elem(i).width_[RIGHT]); + Interval e1 (line->elem (i).width_[LEFT], extent[LEFT]); + Interval e3 (extent[RIGHT], line->elem (i).width_[RIGHT]); - if (!e3.is_empty () && e3.length() > EPS) + if (!e3.is_empty () && e3.length () > EPS) line->insert (Skyline_entry (e3, my_height), i+1); - line->elem_ref(i).height_ = stick_out; - line->elem_ref(i).width_ = w; - if (!e1.is_empty () && e1.length() > EPS) + line->elem_ref (i).height_ = stick_out; + line->elem_ref (i).width_ = w; + if (!e1.is_empty () && e1.length () > EPS) line->insert (Skyline_entry (e1, my_height), i ); } @@ -94,7 +94,7 @@ merge_skyline (Array * a1, Array const & a2, Direction dir) { - for (int i = 0; i < a2.size(); i++) + for (int i = 0; i < a2.size (); i++) { Box b; b[X_AXIS] = a2[i].width_; @@ -112,8 +112,8 @@ empty_skyline (Direction d) Array skyline; Interval i; - i.set_empty(); - i.swap(); + i.set_empty (); + i.swap (); Skyline_entry e; e.width_ = i; e.height_ = -d * infinity_f; @@ -125,16 +125,16 @@ Array extents_to_skyline (Array const &extents, Axis a, Direction d) { - Array skyline = empty_skyline(d); + Array skyline = empty_skyline (d); /* - This makes a cubic algorithm (array insertion is O(n), - searching the array dumbly is O(n), and for n items, we get O(n^3).) + This makes a cubic algorithm (array insertion is O (n), + searching the array dumbly is O (n), and for n items, we get O (n^3).) We could do a lot better (n log (n), using a balanced tree) but that seems overkill for now. */ - for (int j = extents.size(); j--; ) + for (int j = extents.size (); j--; ) insert_extent_into_skyline (&skyline, extents[j], a, d); return skyline; @@ -146,21 +146,21 @@ extents_to_skyline (Array const &extents, Axis a, Direction d) minimum distance that can be achieved between baselines. "Clouds" is a skyline pointing down. - This is an O(n) algorithm. + This is an O (n) algorithm. */ Real skyline_meshing_distance (Array const &buildings, Array const &clouds) { int i = buildings.size () -1; - int j = clouds.size() -1; + int j = clouds.size () -1; Real distance = - infinity_f; while (i > 0 || j > 0) { Interval w = buildings[i].width_; - w.intersect(clouds[j].width_); + w.intersect (clouds[j].width_); if (!w.is_empty ()) distance = distance >? (buildings[i].height_ - clouds[j].height_); @@ -178,7 +178,7 @@ skyline_meshing_distance (Array const &buildings, return distance; } -Skyline_entry::Skyline_entry() +Skyline_entry::Skyline_entry () { height_ = 0.0; } diff --git a/lily/slash-repeat-engraver.cc b/lily/slash-repeat-engraver.cc index 4c21ae0168..2ba59b6250 100644 --- a/lily/slash-repeat-engraver.cc +++ b/lily/slash-repeat-engraver.cc @@ -36,7 +36,7 @@ class Slash_repeat_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Slash_repeat_engraver); + TRANSLATOR_DECLARATIONS (Slash_repeat_engraver); protected: Repeated_music * repeat_; @@ -111,7 +111,7 @@ Slash_repeat_engraver::process_music () if (repeat_ && now_mom () == next_moment_) { beat_slash_ = make_item ("RepeatSlash"); - announce_grob(beat_slash_, repeat_->self_scm()); + announce_grob (beat_slash_, repeat_->self_scm ()); next_moment_ = next_moment_ + body_length_; get_global_context ()->add_moment_to_process (next_moment_); @@ -141,7 +141,7 @@ Slash_repeat_engraver::stop_translation_timestep () -ENTER_DESCRIPTION(Slash_repeat_engraver, +ENTER_DESCRIPTION (Slash_repeat_engraver, /* descr */ "Make beat repeats.", /* creats*/ "RepeatSlash", /* accepts */ "repeated-music", diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index ba4c795b92..4a6a49305b 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -70,7 +70,7 @@ Slur_engraver::try_music (Music *ev) /* Swallow other events. */ - for (int j = new_slur_evs_.size(); j--;) + for (int j = new_slur_evs_.size (); j--;) { Direction nd = to_dir (new_slur_evs_[j]->get_property ("span-direction")); diff --git a/lily/slur-performer.cc b/lily/slur-performer.cc index 4c8b23b69a..4a154d5673 100644 --- a/lily/slur-performer.cc +++ b/lily/slur-performer.cc @@ -19,7 +19,7 @@ class Slur_performer : public Performer { public: - TRANSLATOR_DECLARATIONS(Slur_performer); + TRANSLATOR_DECLARATIONS (Slur_performer); protected: virtual bool try_music (Music *ev) ; @@ -86,10 +86,10 @@ Slur_performer::try_music (Music *m) return false; } -ENTER_DESCRIPTION(Slur_performer,"","", +ENTER_DESCRIPTION (Slur_performer,"","", "slur-event","","",""); -Slur_performer::Slur_performer() +Slur_performer::Slur_performer () { slur_ = false; } diff --git a/lily/slur.cc b/lily/slur.cc index 606aff5f64..d5ffc85aad 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -218,7 +218,7 @@ Slur::get_boundary_notecolumn_y (Grob *me, Direction dir) { SCM cols = me->get_property ("note-columns"); - if(!gh_pair_p (cols)) + if (!gh_pair_p (cols)) { programming_error ("No note-columns in slur?"); me->suicide (); @@ -226,7 +226,7 @@ Slur::get_boundary_notecolumn_y (Grob *me, Direction dir) } if (dir == LEFT) - cols = scm_reverse(cols); + cols = scm_reverse (cols); Grob *col = unsmob_grob (ly_car (cols)); Grob *common[] = @@ -651,7 +651,7 @@ Slur::get_curve (Grob*me) SCM attach = me->get_property ("attachment"); if (!gh_pair_p (attach)) - attach = set_extremities(me); + attach = set_extremities (me); if (!get_grob_direction (me) diff --git a/lily/source-file.cc b/lily/source-file.cc index f4e1ddcfd4..79f2321412 100644 --- a/lily/source-file.cc +++ b/lily/source-file.cc @@ -81,9 +81,9 @@ Source_file::Source_file (String filename, String data) name_ = filename; istream_ = 0; contents_str0_ = data.get_copy_str0(); - length_ = data.length(); + length_ = data.length (); pos_str0_ = to_str0 (); - init_port(); + init_port (); } Source_file::Source_file (String filename_string) @@ -99,7 +99,7 @@ Source_file::Source_file (String filename_string) pos_str0_ = to_str0 (); - init_port(); + init_port (); for (int i = 0; i < length_; i++) if (contents_str0_[i] == '\n') @@ -261,11 +261,11 @@ Source_file::get_line (char const* pos_str0) const if (!contains (pos_str0)) return 0; - if (!newline_locations_.size()) + if (!newline_locations_.size ()) return 1; int lo=0; - int hi = newline_locations_.size(); + int hi = newline_locations_.size (); if (newline_locations_[lo] > pos_str0) return 1; diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index a8f19e1674..6985a7903a 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -46,7 +46,7 @@ class Spacing_engraver : public Engraver Moment now_; Spanner * spacing_; - TRANSLATOR_DECLARATIONS(Spacing_engraver); + TRANSLATOR_DECLARATIONS (Spacing_engraver); protected: virtual void acknowledge_grob (Grob_info); virtual void start_translation_timestep (); @@ -80,7 +80,7 @@ Spacing_engraver::process_music () { spacing_ = make_spanner ("SpacingSpanner"); spacing_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); - announce_grob(spacing_, SCM_EOL); + announce_grob (spacing_, SCM_EOL); } } @@ -180,7 +180,7 @@ Spacing_engraver::start_translation_timestep () -ENTER_DESCRIPTION(Spacing_engraver, +ENTER_DESCRIPTION (Spacing_engraver, /* descr */ "make a SpacingSpanner and do bookkeeping of shortest starting and playing notes ", /* creats*/ "SpacingSpanner", /* accepts */ "", diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index ba8fcc352e..139ba29f0f 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -121,7 +121,7 @@ loose_column (Grob *l, Grob *c, Grob *r) some cases (two isolated, consecutive clef changes) won't be nicely folded, but hey, then don't do that. */ - if(! ((Paper_column::is_musical (l_neighbor) || Item::is_breakable (l_neighbor)) + if (! ((Paper_column::is_musical (l_neighbor) || Item::is_breakable (l_neighbor)) && (Paper_column::is_musical (r_neighbor) || Item::is_breakable (r_neighbor))) ) { return false; @@ -167,13 +167,13 @@ Spacing_spanner::prune_loose_columns (Grob*me,Link_array *cols, Rational s Real increment = robust_scm2double (me->get_property ("spacing-increment"), 1.2); for (int i=0; i < cols->size (); i++) { - if (Item::is_breakable (cols->elem(i)) || Paper_column::is_musical (cols->elem (i))) + if (Item::is_breakable (cols->elem (i)) || Paper_column::is_musical (cols->elem (i))) { - newcols.push (cols->elem(i)); + newcols.push (cols->elem (i)); continue; } - Grob *c = cols->elem(i); + Grob *c = cols->elem (i); if (loose_column (cols->elem (i-1), c, cols->elem (i+1))) { SCM lns = c->get_property ("left-neighbors"); @@ -197,7 +197,7 @@ Spacing_spanner::prune_loose_columns (Grob*me,Link_array *cols, Rational s next_door[LEFT] =cols->elem (i - 1); next_door[RIGHT] =cols->elem (i + 1); Direction d = LEFT; - Drul_array dists(0,0); + Drul_array dists (0,0); do { @@ -246,7 +246,7 @@ Spacing_spanner::prune_loose_columns (Grob*me,Link_array *cols, Rational s Rod r; r.distance_ = dists[LEFT] + dists[RIGHT]; - r.item_l_drul_[LEFT] = dynamic_cast (cols->elem(i-1)); + r.item_l_drul_[LEFT] = dynamic_cast (cols->elem (i-1)); r.item_l_drul_[RIGHT] = dynamic_cast (cols->elem (i+1)); r.add_to_cols (); @@ -266,7 +266,7 @@ Spacing_spanner::prune_loose_columns (Grob*me,Link_array *cols, Rational s void Spacing_spanner::set_explicit_neighbor_columns (Link_array cols) { - for (int i=0; i < cols.size(); i++) + for (int i=0; i < cols.size (); i++) { SCM right_neighbors = SCM_EOL; int min_rank = 100000; // inf. @@ -350,13 +350,13 @@ Spacing_spanner::set_implicit_neighbor_columns (Link_array cols) SCM ln = cols[i] ->get_property ("left-neighbors"); if (!gh_pair_p (ln) && i ) { - cols[i]->set_property ("left-neighbors", gh_cons (cols[i-1]->self_scm(), SCM_EOL)); + cols[i]->set_property ("left-neighbors", gh_cons (cols[i-1]->self_scm (), SCM_EOL)); } SCM rn = cols[i] ->get_property ("right-neighbors"); if (!gh_pair_p (rn) && i < cols.size () - 1) { - cols[i]->set_property ("right-neighbors", gh_cons (cols[i + 1]->self_scm(), SCM_EOL)); + cols[i]->set_property ("right-neighbors", gh_cons (cols[i + 1]->self_scm (), SCM_EOL)); } } } @@ -383,7 +383,7 @@ Spacing_spanner::set_springs (SCM smob) global_shortest = find_shortest (me, all); if (verbose_global_b) { - progress_indication (_f("Global shortest duration is %s\n", global_shortest.to_string ())); + progress_indication (_f ("Global shortest duration is %s\n", global_shortest.to_string ())); } } prune_loose_columns (me, &all, global_shortest); @@ -442,14 +442,14 @@ Spacing_spanner::find_shortest (Grob *me, Link_array const &cols) SCM st = cols[i]->get_property ("shortest-starter-duration"); Moment this_shortest = *unsmob_moment (st); - assert (this_shortest.to_bool()); + assert (this_shortest.to_bool ()); shortest_in_measure = shortest_in_measure shortest_in_measure) { @@ -464,19 +464,19 @@ Spacing_spanner::find_shortest (Grob *me, Link_array const &cols) } } - if (durations.size() == j) + if (durations.size () == j) { durations.push (shortest_in_measure); counts.push (1); } - shortest_in_measure.set_infinite(1); + shortest_in_measure.set_infinite (1); } } int max_idx = -1; int max_count = 0; - for (int i =durations.size(); i--;) + for (int i =durations.size (); i--;) { if (counts[i] >= max_count) { @@ -670,7 +670,7 @@ Spacing_spanner::standard_breakable_column_spacing (Grob * me, Item*l, Item*r, { *fixed = 0.0; Direction d = LEFT; - Drul_array cols(l,r); + Drul_array cols (l,r); do { diff --git a/lily/span-arpeggio-engraver.cc b/lily/span-arpeggio-engraver.cc index 66c1e46da3..e9a45412f8 100644 --- a/lily/span-arpeggio-engraver.cc +++ b/lily/span-arpeggio-engraver.cc @@ -24,7 +24,7 @@ class Span_arpeggio_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Span_arpeggio_engraver); + TRANSLATOR_DECLARATIONS (Span_arpeggio_engraver); protected: virtual void acknowledge_grob (Grob_info); @@ -66,7 +66,7 @@ Span_arpeggio_engraver::process_acknowledged_grobs () && to_boolean (get_property ("connectArpeggios"))) { span_arpeggio_ = make_item ("Arpeggio"); - announce_grob(span_arpeggio_, SCM_EOL); + announce_grob (span_arpeggio_, SCM_EOL); } } @@ -103,7 +103,7 @@ Span_arpeggio_engraver::stop_translation_timestep () -ENTER_DESCRIPTION(Span_arpeggio_engraver, +ENTER_DESCRIPTION (Span_arpeggio_engraver, /* descr */ "", /* creats*/ "Arpeggio", /* accepts */ "", diff --git a/lily/span-bar-engraver.cc b/lily/span-bar-engraver.cc index c8d0b1527a..a75ef41fe1 100644 --- a/lily/span-bar-engraver.cc +++ b/lily/span-bar-engraver.cc @@ -29,7 +29,7 @@ class Span_bar_engraver : public Engraver Link_array bars_; public: - TRANSLATOR_DECLARATIONS(Span_bar_engraver); + TRANSLATOR_DECLARATIONS (Span_bar_engraver); protected: virtual void acknowledge_grob (Grob_info); virtual void stop_translation_timestep (); @@ -88,7 +88,7 @@ Span_bar_engraver::stop_translation_timestep () -ENTER_DESCRIPTION(Span_bar_engraver, +ENTER_DESCRIPTION (Span_bar_engraver, /* descr */ "This engraver makes cross-staff barlines: It catches all normal " "bar lines, and draws a single span-bar across them.", /* creats*/ "SpanBar", diff --git a/lily/span-dynamic-performer.cc b/lily/span-dynamic-performer.cc index 640fb12875..caea219c38 100644 --- a/lily/span-dynamic-performer.cc +++ b/lily/span-dynamic-performer.cc @@ -28,7 +28,7 @@ struct Audio_dynamic_tuple class Span_dynamic_performer : public Performer { public: - TRANSLATOR_DECLARATIONS(Span_dynamic_performer); + TRANSLATOR_DECLARATIONS (Span_dynamic_performer); protected: virtual bool try_music (Music*); diff --git a/lily/spanner.cc b/lily/spanner.cc index c7e333b9f2..69ed46231c 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -119,7 +119,7 @@ Spanner::do_break_processing () } } broken_intos_.sort (Spanner::compare); - for (int i= broken_intos_.size();i--;) + for (int i= broken_intos_.size ();i--;) broken_intos_[i]->break_index_ = i; } @@ -365,7 +365,7 @@ unsmob_spanner (SCM s ) return dynamic_cast (unsmob_grob (s)); } -ADD_INTERFACE(Spanner, +ADD_INTERFACE (Spanner, "spanner-interface", "Some objects are horizontally spanned between objects. For\n" "example, slur, beam, tie, etc. These grobs form a subtype called\n" diff --git a/lily/spring-smob.cc b/lily/spring-smob.cc index bab14e8418..502fc13f71 100644 --- a/lily/spring-smob.cc +++ b/lily/spring-smob.cc @@ -11,7 +11,7 @@ #include "warn.hh" #include "ly-smobs.icc" -Spring_smob::Spring_smob() +Spring_smob::Spring_smob () { distance_ =0.; strength_ =1.0; @@ -20,7 +20,7 @@ Spring_smob::Spring_smob() } -IMPLEMENT_SIMPLE_SMOBS(Spring_smob); +IMPLEMENT_SIMPLE_SMOBS (Spring_smob); SCM Spring_smob::mark_smob (SCM) { return SCM_UNSPECIFIED; } @@ -29,7 +29,7 @@ int Spring_smob::print_smob (SCM s, SCM p, scm_print_state *) { Spring_smob *ss = unsmob_spring (s); - scm_puts (_f("#", ss->distance_).to_str0 (), p); + scm_puts (_f ("#", ss->distance_).to_str0 (), p); return 1; } diff --git a/lily/staff-collecting-engraver.cc b/lily/staff-collecting-engraver.cc index 553e0a2d75..509ff6ae34 100644 --- a/lily/staff-collecting-engraver.cc +++ b/lily/staff-collecting-engraver.cc @@ -15,7 +15,7 @@ source file of the GNU LilyPond music typesetter class Staff_collecting_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Staff_collecting_engraver); + TRANSLATOR_DECLARATIONS (Staff_collecting_engraver); virtual void acknowledge_grob (Grob_info); }; @@ -37,7 +37,7 @@ Staff_collecting_engraver::acknowledge_grob (Grob_info gi) } -ENTER_DESCRIPTION(Staff_collecting_engraver, +ENTER_DESCRIPTION (Staff_collecting_engraver, /* descr */ "Maintain the stavesFound variable", /* creats*/ "", diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc index f7ff09da20..adacd1c6c0 100644 --- a/lily/staff-performer.cc +++ b/lily/staff-performer.cc @@ -21,7 +21,7 @@ class Staff_performer : public Performer_group_performer { public: - TRANSLATOR_DECLARATIONS(Staff_performer); + TRANSLATOR_DECLARATIONS (Staff_performer); ~Staff_performer (); String new_instrument_string (); diff --git a/lily/staff-spacing.cc b/lily/staff-spacing.cc index 587a5f7466..124cb36488 100644 --- a/lily/staff-spacing.cc +++ b/lily/staff-spacing.cc @@ -44,7 +44,7 @@ Staff_spacing::next_note_correction (Grob * me, Interval v; if (Accidental_placement::has_interface (a)) { - v = Accidental_placement::get_relevant_accidental_extent(a, col, me); + v = Accidental_placement::get_relevant_accidental_extent (a, col, me); } else v = a->extent (col, X_AXIS); @@ -96,7 +96,7 @@ Interval Staff_spacing::bar_y_positions (Grob *bar_grob) { Interval bar_size; - bar_size.set_empty(); + bar_size.set_empty (); if (Bar_line::has_interface (bar_grob)) { SCM glyph = bar_grob->get_property ("glyph"); @@ -104,7 +104,7 @@ Staff_spacing::bar_y_positions (Grob *bar_grob) String glyph_string = gh_string_p (glyph) ? ly_scm2string (glyph) : ""; if (glyph_string.left_string (1) == "|" || glyph_string.left_string (1) == ".") { - SCM sz = Bar_line::get_staff_bar_size (bar_grob->self_scm()); + SCM sz = Bar_line::get_staff_bar_size (bar_grob->self_scm ()); bar_size = Interval (-1,1); bar_size *= robust_scm2double (sz, 1) / Staff_symbol_referencer::staff_space (bar_grob); @@ -152,9 +152,9 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed) Item * me_item = dynamic_cast (me); for (SCM s = me->get_property ("left-items"); - gh_pair_p (s); s = gh_cdr(s)) + gh_pair_p (s); s = gh_cdr (s)) { - Grob * cand = unsmob_grob(gh_car (s)); + Grob * cand = unsmob_grob (gh_car (s)); if (cand && Separation_item::has_interface (cand)) separation_item = cand ; } @@ -227,11 +227,11 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed) *fixed += distance / 2; *space = *fixed + distance/2; } - else if (type == ly_symbol2scm("minimum-space")) + else if (type == ly_symbol2scm ("minimum-space")) { *space = last_ext[LEFT] + (last_ext.length () >? distance); } - else if (type == ly_symbol2scm("minimum-fixed-space")) + else if (type == ly_symbol2scm ("minimum-fixed-space")) { *space = last_ext[LEFT] + (last_ext.length () >? distance); *fixed = *space; diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index 17e96949b4..cfd92d8a56 100644 --- a/lily/staff-symbol-engraver.cc +++ b/lily/staff-symbol-engraver.cc @@ -19,7 +19,7 @@ */ class Staff_symbol_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Staff_symbol_engraver); + TRANSLATOR_DECLARATIONS (Staff_symbol_engraver); protected: Spanner *span_; @@ -50,7 +50,7 @@ Staff_symbol_engraver::process_music () span_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); - announce_grob(span_, SCM_EOL); + announce_grob (span_, SCM_EOL); } } @@ -77,7 +77,7 @@ Staff_symbol_engraver::acknowledge_grob (Grob_info s) -ENTER_DESCRIPTION(Staff_symbol_engraver, +ENTER_DESCRIPTION (Staff_symbol_engraver, /* descr */ "Create the constellation of five (default) " "staff lines.", /* creats*/ "StaffSymbol", @@ -92,7 +92,7 @@ ENTER_DESCRIPTION(Staff_symbol_engraver, class Tab_staff_symbol_engraver : public Staff_symbol_engraver { public: - TRANSLATOR_DECLARATIONS(Tab_staff_symbol_engraver); + TRANSLATOR_DECLARATIONS (Tab_staff_symbol_engraver); protected: virtual void process_music (); }; @@ -101,7 +101,7 @@ void Tab_staff_symbol_engraver::process_music () { bool init = !span_; - Staff_symbol_engraver::process_music(); + Staff_symbol_engraver::process_music (); if (init) { int k = scm_ilength (get_property ("stringTunings")); @@ -110,11 +110,11 @@ Tab_staff_symbol_engraver::process_music () } } -Tab_staff_symbol_engraver::Tab_staff_symbol_engraver() +Tab_staff_symbol_engraver::Tab_staff_symbol_engraver () { } -ENTER_DESCRIPTION(Tab_staff_symbol_engraver, +ENTER_DESCRIPTION (Tab_staff_symbol_engraver, /* descr */ "Create a staff-symbol, but look at stringTunings for the number of lines." "staff lines.", /* creats*/ "StaffSymbol", diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index 0b15a94cfc..4df7c43e0d 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -63,7 +63,7 @@ Staff_symbol::print (SCM smob) } Real t = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")); - t *= robust_scm2double ( me->get_property("thickness"), 1.0); + t *= robust_scm2double ( me->get_property ("thickness"), 1.0); int l = Staff_symbol::line_count (me); @@ -117,7 +117,7 @@ Staff_symbol::get_ledger_line_thickness (Grob * me) SCM lt_pair = me->get_property ("ledger-line-thickness"); Offset z = robust_scm2offset (lt_pair, Offset (1.0, 0.1)); - return z[X_AXIS] * get_line_thickness(me) + z[Y_AXIS]* staff_space (me); + return z[X_AXIS] * get_line_thickness (me) + z[Y_AXIS]* staff_space (me); } diff --git a/lily/stanza-number-align-engraver.cc b/lily/stanza-number-align-engraver.cc index 3115ac3012..194064f8fd 100644 --- a/lily/stanza-number-align-engraver.cc +++ b/lily/stanza-number-align-engraver.cc @@ -21,7 +21,7 @@ source file of the GNU LilyPond music typesetter class Stanza_number_align_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Stanza_number_align_engraver); + TRANSLATOR_DECLARATIONS (Stanza_number_align_engraver); protected: Link_array lyrics_; @@ -49,7 +49,7 @@ Stanza_number_align_engraver::acknowledge_grob (Grob_info gi) void Stanza_number_align_engraver::stop_translation_timestep () { - for (int i= lyrics_.size(); i--;) + for (int i= lyrics_.size (); i--;) for (int j = stanza_numbers_.size (); j--;) Side_position_interface::add_support (stanza_numbers_[j], lyrics_[i]); @@ -58,7 +58,7 @@ Stanza_number_align_engraver::stop_translation_timestep () } -ENTER_DESCRIPTION(Stanza_number_align_engraver, +ENTER_DESCRIPTION (Stanza_number_align_engraver, "This engraver ensures that stanza numbers are neatly aligned. ", "", "", diff --git a/lily/stanza-number-engraver.cc b/lily/stanza-number-engraver.cc index c51c66327f..68c09bfa93 100644 --- a/lily/stanza-number-engraver.cc +++ b/lily/stanza-number-engraver.cc @@ -22,7 +22,7 @@ class Stanza_number_engraver : public Engraver */ SCM last_stanza_; public: - TRANSLATOR_DECLARATIONS(Stanza_number_engraver); + TRANSLATOR_DECLARATIONS (Stanza_number_engraver); virtual void process_music (); virtual void stop_translation_timestep (); virtual void acknowledge_grob (Grob_info); @@ -77,7 +77,7 @@ Stanza_number_engraver::stop_translation_timestep () } -ENTER_DESCRIPTION(Stanza_number_engraver, +ENTER_DESCRIPTION (Stanza_number_engraver, /* descr */ "", /* creats*/ "StanzaNumber", /* accepts */ "", diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index 8f122d473b..8427064c87 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -24,7 +24,7 @@ */ class Stem_engraver : public Engraver { - TRANSLATOR_DECLARATIONS(Stem_engraver); + TRANSLATOR_DECLARATIONS (Stem_engraver); protected: virtual void acknowledge_grob (Grob_info); virtual void stop_translation_timestep (); @@ -94,14 +94,14 @@ Stem_engraver::acknowledge_grob (Grob_info i) - (duration_log > 2 ? duration_log - 2 : 0); if (tremolo_flags <= 0) { - tremolo_ev_->origin()->warning (_("tremolo duration is too long")); + tremolo_ev_->origin ()->warning (_("tremolo duration is too long")); tremolo_flags = 0; } if (tremolo_flags) { tremolo_ = make_item ("StemTremolo"); - announce_grob(tremolo_, tremolo_ev_->self_scm()); + announce_grob (tremolo_, tremolo_ev_->self_scm ()); /* The number of tremolo flags is the number of flags of @@ -118,7 +118,7 @@ Stem_engraver::acknowledge_grob (Grob_info i) /* We announce the cause of the head as cause of the stem. The stem needs a rhythmic structure to fit it into a beam. */ - announce_grob(stem_, i.music_cause ()->self_scm()); + announce_grob (stem_, i.music_cause ()->self_scm ()); } if (Stem::duration_log (stem_) != duration_log) @@ -176,7 +176,7 @@ Stem_engraver::try_music (Music* r) return false; } -ENTER_DESCRIPTION(Stem_engraver, +ENTER_DESCRIPTION (Stem_engraver, /* descr */ "Create stems and single-stem tremolos. It also works together with " "the beam engraver for overriding beaming.", /* creats*/ "Stem StemTremolo", diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index 05634c92e5..4eae91b91f 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -51,7 +51,7 @@ Stem_tremolo::height (SCM smob, SCM ax) if (Stencil *m = unsmob_stencil (mol)) return ly_interval2scm (m->extent (a)); else - return ly_interval2scm (Interval()); + return ly_interval2scm (Interval ()); } @@ -99,7 +99,7 @@ Stem_tremolo::raw_stencil (Grob *me) { programming_error ("No tremolo flags?"); - me->suicide(); + me->suicide (); return Stencil (); } diff --git a/lily/stem.cc b/lily/stem.cc index 4b94623763..fdedb4d22a 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -47,7 +47,7 @@ Stem::set_beaming (Grob*me, int beam_count, Direction d) } SCM l = index_get_cell (pair, d); - for( int i = 0; i< beam_count; i++) + for (int i = 0; i< beam_count; i++) { l = gh_cons (gh_int2scm (i), l); } @@ -345,7 +345,7 @@ Stem::get_default_stem_end_position (Grob*me) Crude hack: add extra space if tremolo flag is there. We can't do this for the beam, since we get into a loop - (Stem_tremolo::raw_stencil() looks at the beam.) + (Stem_tremolo::raw_stencil () looks at the beam.) --hwn */ @@ -495,7 +495,7 @@ Stem::position_noteheads (Grob*me) Real reverse_overlap =0.5; heads[i]->translate_axis ((l-thick*reverse_overlap) * d, X_AXIS); - if (is_invisible(me)) + if (is_invisible (me)) heads[i]->translate_axis (-thick*(2 - reverse_overlap) * d , X_AXIS); @@ -608,7 +608,7 @@ Stem::flag (Grob*me) { /* Urrgh! We have to detect wether this stem ends on a staff line or between two staff lines. But we can not call - stem_end_position(me) or get_default_stem_end_position(me), + stem_end_position (me) or get_default_stem_end_position (me), since this encounters the flag and hence results in an infinite recursion. However, in pure mensural notation, there are no multiple note heads attached to a single stem, @@ -786,7 +786,7 @@ Stem::off_callback (SCM element_smob, SCM) if (Grob * f = first_head (me)) { - Interval head_wid = Note_head::head_extent(f, X_AXIS); + Interval head_wid = Note_head::head_extent (f, X_AXIS); Real attach =0.0; @@ -795,7 +795,7 @@ Stem::off_callback (SCM element_smob, SCM) 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_direction (me); @@ -995,7 +995,7 @@ ADD_INTERFACE (Stem,"stem-interface", /****************************************************************/ -Stem_info::Stem_info() +Stem_info::Stem_info () { ideal_y_ = shortest_y_ =0; dir_ = CENTER; diff --git a/lily/stencil-scheme.cc b/lily/stencil-scheme.cc index b4e92ffae2..2832da7554 100644 --- a/lily/stencil-scheme.cc +++ b/lily/stencil-scheme.cc @@ -40,7 +40,7 @@ LY_DEFINE (ly_translate_stencil_axis, "ly:stencil-translate-axis", Stencil q (*s); q.translate_axis (gh_scm2double (amount), Axis (gh_scm2int (axis))); - return q.smobbed_copy(); + return q.smobbed_copy (); } LY_DEFINE (ly_translate_stencil,"ly:stencil-translate", @@ -55,7 +55,7 @@ LY_DEFINE (ly_translate_stencil,"ly:stencil-translate", Stencil q (*s); q.translate (o); - return q.smobbed_copy(); + return q.smobbed_copy (); } LY_DEFINE (ly_stencil_get_expr, "ly:stencil-get-expr", @@ -102,13 +102,13 @@ LY_DEFINE (ly_stencil_combined_at_edge, Real p = 0.0; if (padding != SCM_UNDEFINED) { - SCM_ASSERT_TYPE(gh_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number"); + SCM_ASSERT_TYPE (gh_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number"); p = gh_scm2double (padding); } Real m = 0.0; if (minimum != SCM_UNDEFINED) { - SCM_ASSERT_TYPE(gh_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number"); + SCM_ASSERT_TYPE (gh_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number"); m = gh_scm2double (minimum); } @@ -157,7 +157,7 @@ LY_DEFINE (ly_make_stencil, SCM_ASSERT_TYPE (is_number_pair (xext), xext, SCM_ARG2, __FUNCTION__, "number pair"); SCM_ASSERT_TYPE (is_number_pair (yext), yext, SCM_ARG3, __FUNCTION__, "number pair"); - Box b (ly_scm2interval (xext), ly_scm2interval(yext)); + Box b (ly_scm2interval (xext), ly_scm2interval (yext)); Stencil s (b, expr); return s.smobbed_copy (); } @@ -177,7 +177,7 @@ LY_DEFINE (ly_fontify_atom,"ly:fontify-atom", 2, 0, 0, "Add a font selection command for the font metric @var{met} " "to @var{f}.") { - SCM_ASSERT_TYPE(unsmob_metrics (met), met, SCM_ARG1, __FUNCTION__, "font metric"); + SCM_ASSERT_TYPE (unsmob_metrics (met), met, SCM_ARG1, __FUNCTION__, "font metric"); return fontify_atom (unsmob_metrics (met), f); } diff --git a/lily/string-number-engraver.cc b/lily/string-number-engraver.cc index 5fdc4e79f1..c05649d6bb 100644 --- a/lily/string-number-engraver.cc +++ b/lily/string-number-engraver.cc @@ -8,7 +8,7 @@ class String_number_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(String_number_engraver); + TRANSLATOR_DECLARATIONS (String_number_engraver); protected: virtual bool try_music (Music* m); }; @@ -31,7 +31,7 @@ String_number_engraver::String_number_engraver () */ -ENTER_DESCRIPTION(String_number_engraver, +ENTER_DESCRIPTION (String_number_engraver, /* descr */ "Swallow string-number-events - the purpose of this engraver is to" " process tab for normal notation. To provent warnings for unprocessed " " string-number-event to obscure real error messages, this engraver " diff --git a/lily/swallow-engraver.cc b/lily/swallow-engraver.cc index 4bda0a7ebf..92ced08887 100644 --- a/lily/swallow-engraver.cc +++ b/lily/swallow-engraver.cc @@ -13,7 +13,7 @@ class Swallow_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Swallow_engraver); + TRANSLATOR_DECLARATIONS (Swallow_engraver); protected: bool try_music (Music*) ; }; @@ -30,7 +30,7 @@ Swallow_engraver::Swallow_engraver () { } -ENTER_DESCRIPTION(Swallow_engraver, +ENTER_DESCRIPTION (Swallow_engraver, /* descr */ "This engraver swallows everything given to it silently. The purpose of " "this is to prevent spurious \"event junked\" warnings.", /* creats*/ "", diff --git a/lily/swallow-perf.cc b/lily/swallow-perf.cc index dbeb4cc515..e70149069f 100644 --- a/lily/swallow-perf.cc +++ b/lily/swallow-perf.cc @@ -11,7 +11,7 @@ class Swallow_performer : public Performer { public: - TRANSLATOR_DECLARATIONS(Swallow_performer); + TRANSLATOR_DECLARATIONS (Swallow_performer); protected: virtual bool try_music (Music*); }; @@ -26,10 +26,10 @@ Swallow_performer::try_music (Music *m) return true; } -Swallow_performer::Swallow_performer() +Swallow_performer::Swallow_performer () {} -ENTER_DESCRIPTION(Swallow_performer, +ENTER_DESCRIPTION (Swallow_performer, /* descr */ "", /* creats*/ "", /* accepts */ "general-music", diff --git a/lily/system-start-delimiter-engraver.cc b/lily/system-start-delimiter-engraver.cc index ccbb0eb3e7..67964f6f49 100644 --- a/lily/system-start-delimiter-engraver.cc +++ b/lily/system-start-delimiter-engraver.cc @@ -18,7 +18,7 @@ class System_start_delimiter_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(System_start_delimiter_engraver); + TRANSLATOR_DECLARATIONS (System_start_delimiter_engraver); protected: Spanner * delim_; @@ -56,7 +56,7 @@ System_start_delimiter_engraver::acknowledge_grob (Grob_info inf) { inf.grob_->translate_axis ( -0.8, X_AXIS); // ugh inf.grob_->set_property ("arch-height", - gh_double2scm (gh_scm2double(inf.grob_->get_property + gh_double2scm (gh_scm2double (inf.grob_->get_property ("arch-height"))+0.5)); } } @@ -89,7 +89,7 @@ System_start_delimiter_engraver::finalize () } } -ENTER_DESCRIPTION(System_start_delimiter_engraver, +ENTER_DESCRIPTION (System_start_delimiter_engraver, /* descr */ "Creates a system start delimiter (ie. SystemStart@{Bar,Brace,Bracket@} spanner", /* creats*/ "SystemStartBar SystemStartBrace SystemStartBracket", /* accepts */ "", diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index be97cdcfce..b460c4f57f 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -171,10 +171,10 @@ System_start_delimiter::staff_brace (Grob*me, Real y) while (hi - lo > 1); Stencil m (fm->get_indexed_char_stencil (lo)); // ugh. ascii? - b=m.extent_box(); + b=m.extent_box (); b[X_AXIS] = Interval (0,0); - return Stencil (b, m.get_expr()); + return Stencil (b, m.get_expr ()); } diff --git a/lily/system.cc b/lily/system.cc index 8988fa288a..61ab2ebbec 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -53,7 +53,7 @@ System::spanner_count () const for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s)) { - if (dynamic_cast (unsmob_grob (gh_car(s)))) + if (dynamic_cast (unsmob_grob (gh_car (s)))) k++; } @@ -82,8 +82,8 @@ uniquify_list (SCM l) int len = scm_ilength (l); SCM * arr = new SCM[len]; int k = 0; - for (SCM s =l ; SCM_NNULLP (s); s = SCM_CDR(s)) - arr[k++] = SCM_CAR(s); + for (SCM s =l ; SCM_NNULLP (s); s = SCM_CDR (s)) + arr[k++] = SCM_CAR (s); assert (k == len); qsort (arr, len, sizeof (SCM), &scm_default_compare); @@ -95,13 +95,13 @@ uniquify_list (SCM l) if (i && arr[i] == arr[i-1]) continue; - SCM_SETCAR(s, arr[i]); + SCM_SETCAR (s, arr[i]); if (i < len - 1) - s = SCM_CDR(s); + s = SCM_CDR (s); } - SCM_SETCDR(s, SCM_EOL); + SCM_SETCDR (s, SCM_EOL); delete[] arr; return l; @@ -133,8 +133,8 @@ System::output_lines () Item * it = dynamic_cast (g); if (it && Item::is_breakable (it)) { - it->find_prebroken_piece (LEFT)->suicide(); - it->find_prebroken_piece (RIGHT)->suicide(); + it->find_prebroken_piece (LEFT)->suicide (); + it->find_prebroken_piece (RIGHT)->suicide (); } g->suicide (); } @@ -174,7 +174,7 @@ System::output_lines () Because the this->get_property (all-elements) contains items in 3 versions, handle_broken_dependencies () will leave duplicated items in all-elements. Strictly speaking this is harmless, but it - leads to duplicated symbols in the output. uniquify_list() makes + leads to duplicated symbols in the output. uniquify_list () makes sure that no duplicates are in the list. */ for (int i=0; i < broken_intos_.size (); i++) @@ -277,8 +277,8 @@ set_loose_columns (System* which, Column_x_positions const *posns) */ Grob * common = right->common_refpoint (left, X_AXIS); - Real rx = right->extent(common, X_AXIS)[LEFT]; - Real lx = left->extent(common, X_AXIS)[RIGHT]; + Real rx = right->extent (common, X_AXIS)[LEFT]; + Real lx = left->extent (common, X_AXIS)[RIGHT]; Real total_dx = rx - lx; Interval cval =col->extent (col, X_AXIS); @@ -476,7 +476,7 @@ System::post_processing (bool last_line) This might seem inefficient, but Stencils are cached per grob anyway. */ - this->get_stencil(); + this->get_stencil (); for (SCM s = all; gh_pair_p (s); s = ly_cdr (s)) { Grob * g = unsmob_grob (ly_car (s)); @@ -505,9 +505,9 @@ System::post_processing (bool last_line) /* Output elements in three layers, 0, 1, 2. The default layer is 1. */ { - Stencil *m = this->get_stencil(); + Stencil *m = this->get_stencil (); if (m) - output_stencil (m->get_expr (), Offset(0,0)); + output_stencil (m->get_expr (), Offset (0,0)); } for (int i = 0; i < 3; i++) diff --git a/lily/tab-note-heads-engraver.cc b/lily/tab-note-heads-engraver.cc index b3f96b55ec..1472e7104f 100644 --- a/lily/tab-note-heads-engraver.cc +++ b/lily/tab-note-heads-engraver.cc @@ -27,7 +27,7 @@ class Tab_note_heads_engraver : public Engraver Link_array note_events_; Link_array tabstring_events_; public: - TRANSLATOR_DECLARATIONS(Tab_note_heads_engraver); + TRANSLATOR_DECLARATIONS (Tab_note_heads_engraver); protected: virtual bool try_music (Music *event) ; @@ -37,7 +37,7 @@ protected: }; -Tab_note_heads_engraver::Tab_note_heads_engraver() +Tab_note_heads_engraver::Tab_note_heads_engraver () { } @@ -70,8 +70,8 @@ Tab_note_heads_engraver::process_music () for (int i=0; i < note_events_.size (); i++) { SCM stringTunings = get_property ("stringTunings"); - int number_of_strings = ((int) gh_length(stringTunings)); - bool high_string_one = to_boolean(get_property ("highStringOne")); + int number_of_strings = ((int) gh_length (stringTunings)); + bool high_string_one = to_boolean (get_property ("highStringOne")); Item * note = make_item ("TabNoteHead"); @@ -92,7 +92,7 @@ Tab_note_heads_engraver::process_music () if (!tabstring_event && j < tabstring_events_.size ()) { tabstring_event = tabstring_events_[j]; - if (j +1 < tabstring_events_.size()) + if (j +1 < tabstring_events_.size ()) j++; } @@ -100,7 +100,7 @@ Tab_note_heads_engraver::process_music () bool string_found; if (tabstring_event) { - tab_string = gh_scm2int(tabstring_event->get_property ("string-number")); + tab_string = gh_scm2int (tabstring_event->get_property ("string-number")); string_found = true; } else @@ -131,13 +131,13 @@ Tab_note_heads_engraver::process_music () SCM scm_pitch = event->get_property ("pitch"); SCM proc = get_property ("tablatureFormat"); SCM min_fret_scm = get_property ("minimumFret"); - int min_fret = gh_number_p(min_fret_scm) ? gh_scm2int(min_fret_scm) : 0; + int min_fret = gh_number_p (min_fret_scm) ? gh_scm2int (min_fret_scm) : 0; - while(!string_found) + while (!string_found) { - int fret = unsmob_pitch(scm_pitch)->semitone_pitch() - - gh_scm2int(gh_list_ref(stringTunings,gh_int2scm(tab_string-1))); - if(fretsemitone_pitch () + - gh_scm2int (gh_list_ref (stringTunings,gh_int2scm (tab_string-1))); + if (fretset_property ("text", text); note->set_property ("staff-position", gh_int2scm (pos)); - announce_grob (note, event->self_scm()); + announce_grob (note, event->self_scm ()); notes_.push (note); } } @@ -177,7 +177,7 @@ Tab_note_heads_engraver::stop_translation_timestep () } -ENTER_DESCRIPTION(Tab_note_heads_engraver, +ENTER_DESCRIPTION (Tab_note_heads_engraver, /* descr */ "Generate one or more tablature noteheads from Music of type NoteEvent.", /* creats*/ "TabNoteHead Dots", /* accepts */ "note-event string-number-event busy-playing-event", diff --git a/lily/tempo-performer.cc b/lily/tempo-performer.cc index 77058f8ee4..80821732e7 100644 --- a/lily/tempo-performer.cc +++ b/lily/tempo-performer.cc @@ -13,7 +13,7 @@ class Tempo_performer : public Performer { public: - TRANSLATOR_DECLARATIONS(Tempo_performer); + TRANSLATOR_DECLARATIONS (Tempo_performer); ~Tempo_performer (); protected: diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index 14a0180fed..e87234978e 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -24,7 +24,7 @@ class Text_engraver : public Engraver Link_array reqs_; Link_array texts_; public: - TRANSLATOR_DECLARATIONS(Text_engraver); + TRANSLATOR_DECLARATIONS (Text_engraver); protected: virtual bool try_music (Music* m); virtual void stop_translation_timestep (); @@ -131,7 +131,7 @@ Text_engraver::Text_engraver () { } -ENTER_DESCRIPTION(Text_engraver, +ENTER_DESCRIPTION (Text_engraver, /* descr */ "Create text-scripts", /* creats*/ "TextScript", /* accepts */ "text-script-event", diff --git a/lily/text-item.cc b/lily/text-item.cc index 29273cf662..31d3402410 100644 --- a/lily/text-item.cc +++ b/lily/text-item.cc @@ -57,7 +57,7 @@ Text_item::interpret_markup (SCM paper, SCM props, SCM markup) return SCM_EOL; } -MAKE_SCHEME_CALLBACK(Text_item,print,1); +MAKE_SCHEME_CALLBACK (Text_item,print,1); SCM Text_item::print (SCM grob) { diff --git a/lily/text-spanner-engraver.cc b/lily/text-spanner-engraver.cc index 0b0b0239b7..c5fb70991a 100644 --- a/lily/text-spanner-engraver.cc +++ b/lily/text-spanner-engraver.cc @@ -14,7 +14,7 @@ class Text_spanner_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Text_spanner_engraver); + TRANSLATOR_DECLARATIONS (Text_spanner_engraver); protected: virtual void finalize (); virtual void acknowledge_grob (Grob_info); @@ -76,7 +76,7 @@ Text_spanner_engraver::process_music () { if (current_req_) { - req_drul_[START]->origin ()->warning(_ ("already have a text spanner")); + req_drul_[START]->origin ()->warning (_ ("already have a text spanner")); } else { @@ -85,7 +85,7 @@ Text_spanner_engraver::process_music () Side_position_interface::set_axis (span_, Y_AXIS); - announce_grob (span_, req_drul_[START]->self_scm()); + announce_grob (span_, req_drul_[START]->self_scm ()); req_drul_[START] = 0; } } @@ -146,7 +146,7 @@ Text_spanner_engraver::finalize () } } -ENTER_DESCRIPTION(Text_spanner_engraver, +ENTER_DESCRIPTION (Text_spanner_engraver, /* descr */ "Create text spanner from a Music.", /* creats*/ "TextSpanner", /* accepts */ "text-span-event", diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index 2ec0391b36..77321cbf6e 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -42,7 +42,7 @@ Text_spanner::print (SCM smob) /* Ugh, must be same as Hairpin::print. */ Grob *common = spanner->get_bound (LEFT)->common_refpoint (spanner->get_bound (RIGHT), X_AXIS); - Paper_def * paper = me->get_paper(); + Paper_def * paper = me->get_paper (); SCM flare = me->get_property ("bracket-flare"); SCM shorten = me->get_property ("shorten-pair"); @@ -116,7 +116,7 @@ Text_spanner::print (SCM smob) Real dy = - dir * edge_height[d] ; if (dy) - edge_line[d] = Line_spanner::line_stencil (me, Offset(0,0), Offset (dx, dy)); + edge_line[d] = Line_spanner::line_stencil (me, Offset (0,0), Offset (dx, dy)); } while (flip (&d) != LEFT); } @@ -135,7 +135,7 @@ Text_spanner::print (SCM smob) while (flip (&d) != LEFT); do { - if (d* span_points[d] > d * edge[-d].extent(X_AXIS)[d]) + if (d* span_points[d] > d * edge[-d].extent (X_AXIS)[d]) { edge_line[d].translate_axis (span_points[d], X_AXIS); m.add_stencil (edge_line[d]); diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index 6b48a88173..b176a34092 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -48,7 +48,7 @@ protected: virtual void process_music (); void typeset_tie (Grob*); public: - TRANSLATOR_DECLARATIONS(Tie_engraver); + TRANSLATOR_DECLARATIONS (Tie_engraver); }; @@ -106,14 +106,14 @@ Tie_engraver::acknowledge_grob (Grob_info i) Tie::set_head (p, RIGHT, h); ties_.push (p); - announce_grob(p, last_event_->self_scm()); + announce_grob (p, last_event_->self_scm ()); } } if (ties_.size () && ! tie_column_) { tie_column_ = make_spanner ("TieColumn"); - announce_grob(tie_column_, SCM_EOL); + announce_grob (tie_column_, SCM_EOL); } if (tie_column_) @@ -141,7 +141,7 @@ Tie_engraver::stop_translation_timestep () typeset_tie (ties_[i]); } - ties_.clear(); + ties_.clear (); last_event_ = 0; if (tie_column_) { @@ -181,7 +181,7 @@ Tie_engraver::typeset_tie (Grob *her) } -ENTER_DESCRIPTION(Tie_engraver, +ENTER_DESCRIPTION (Tie_engraver, /* descr */ "Generate ties between noteheads of equal pitch.", /* creats*/ "Tie TieColumn", /* accepts */ "tie-event", diff --git a/lily/tie-performer.cc b/lily/tie-performer.cc index bfb0435eea..92cde85eb5 100644 --- a/lily/tie-performer.cc +++ b/lily/tie-performer.cc @@ -29,7 +29,7 @@ protected: virtual bool try_music (Music*); virtual void process_music (); public: - TRANSLATOR_DECLARATIONS(Tie_performer); + TRANSLATOR_DECLARATIONS (Tie_performer); }; @@ -108,7 +108,7 @@ Tie_performer::stop_translation_timestep () now_heads_.clear (); } -ENTER_DESCRIPTION(Tie_performer, +ENTER_DESCRIPTION (Tie_performer, /* descr */ "Generate ties between noteheads of equal pitch.", /* creats*/ "", /* accepts */ "tie-event", diff --git a/lily/tie.cc b/lily/tie.cc index 2b388c3238..92daec75b1 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -228,7 +228,7 @@ Tie::get_control_points (SCM smob) if (Note_head::has_interface (l) && Rhythmic_head::get_dots (l)) { Grob* dots = Rhythmic_head::get_dots (l); - if(fabs (staff_space * Staff_symbol_referencer::get_position (dots) /2 + if (fabs (staff_space * Staff_symbol_referencer::get_position (dots) /2 - ypos) < 0.5) { ypos += 0.5 * dir ; diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index 55b339566e..017dd42b7b 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -25,7 +25,7 @@ protected: virtual void stop_translation_timestep (); virtual void process_music (); public: - TRANSLATOR_DECLARATIONS(Time_signature_engraver); + TRANSLATOR_DECLARATIONS (Time_signature_engraver); }; @@ -54,7 +54,7 @@ Time_signature_engraver::process_music () OTOH, Tristan Keuris writes 8/20 in his Intermezzi. */ - warning (_f("Found strange time signature %d/%d.", + warning (_f ("Found strange time signature %d/%d.", den, gh_scm2int (gh_car (fr)) )); @@ -66,7 +66,7 @@ Time_signature_engraver::process_music () time_signature_->set_property ("fraction",fr); if (time_signature_) - announce_grob(time_signature_, SCM_EOL); + announce_grob (time_signature_, SCM_EOL); } } @@ -81,7 +81,7 @@ Time_signature_engraver::stop_translation_timestep () } -ENTER_DESCRIPTION(Time_signature_engraver, +ENTER_DESCRIPTION (Time_signature_engraver, /* descr */ "Create a TimeSignature whenever @code{timeSignatureFraction} changes", /* creats*/ "TimeSignature", /* accepts */ "", diff --git a/lily/time-signature-performer.cc b/lily/time-signature-performer.cc index efab395ee2..2bc27ef556 100644 --- a/lily/time-signature-performer.cc +++ b/lily/time-signature-performer.cc @@ -14,7 +14,7 @@ class Time_signature_performer : public Performer { public: - TRANSLATOR_DECLARATIONS(Time_signature_performer); + TRANSLATOR_DECLARATIONS (Time_signature_performer); ~Time_signature_performer (); protected: @@ -67,4 +67,4 @@ Time_signature_performer::stop_translation_timestep () } } -ENTER_DESCRIPTION(Time_signature_performer,"","","","","",""); +ENTER_DESCRIPTION (Time_signature_performer,"","","","","",""); diff --git a/lily/time-signature.cc b/lily/time-signature.cc index 9c2ab3822c..b92028b161 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -104,10 +104,10 @@ Time_signature::numbered_time_signature (Grob*me,int num, int den) me->set_property ("font-family", ly_symbol2scm ("number")); SCM sn = - Text_item::interpret_markup (me->get_paper ()->self_scm(), chain, + Text_item::interpret_markup (me->get_paper ()->self_scm (), chain, scm_makfrom0str (to_string (num).to_str0 ())); SCM sd = - Text_item::interpret_markup (me->get_paper ()->self_scm(), chain, + Text_item::interpret_markup (me->get_paper ()->self_scm (), chain, scm_makfrom0str (to_string (den).to_str0 ())); Stencil n = *unsmob_stencil (sn); diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index f2ff5c4fea..e097d93197 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -148,4 +148,4 @@ Timing_translator::start_translation_timestep () daddy_context_->set_property ("measurePosition", measposp.smobbed_copy ()); } -ENTER_DESCRIPTION(Timing_translator,"","","","","",""); +ENTER_DESCRIPTION (Timing_translator,"","","","","",""); diff --git a/lily/translator-ctors.cc b/lily/translator-ctors.cc index abac03a986..480f7d84bd 100644 --- a/lily/translator-ctors.cc +++ b/lily/translator-ctors.cc @@ -16,7 +16,7 @@ Scheme_hash_table *global_translator_dict=0; -LY_DEFINE(get_all_translators,"ly:get-all-translators", 0, 0, 0, (), +LY_DEFINE (get_all_translators,"ly:get-all-translators", 0, 0, 0, (), "Return an list of a all translator objects that may be instantiated " " during a lilypond run.") { diff --git a/lily/translator-group.cc b/lily/translator-group.cc index cc54f00733..bd33135e10 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -46,7 +46,7 @@ bool translator_accepts_any_of (Translator*tr, SCM ifaces) { SCM ack_ifs = scm_assoc (ly_symbol2scm ("events-accepted"), - tr->translator_description()); + tr->translator_description ()); ack_ifs = gh_cdr (ack_ifs); for (SCM s = ifaces; ly_pair_p (s); s = ly_cdr (s)) if (scm_memq (ly_car (s), ack_ifs) != SCM_BOOL_F) diff --git a/lily/translator.cc b/lily/translator.cc index 62b5a6c450..d8211a24c1 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -94,7 +94,7 @@ Translator::stop_translation_timestep () /* this function has 2 properties - - It is called before try_music() + - It is called before try_music () - It is called before any user information enters the translators. (i.e. any \property or event is not processed yet.) @@ -158,4 +158,4 @@ Translator::static_translator_description ()const IMPLEMENT_SMOBS (Translator); IMPLEMENT_DEFAULT_EQUAL_P (Translator); -IMPLEMENT_TYPE_P(Translator,"ly:translator?"); +IMPLEMENT_TYPE_P (Translator,"ly:translator?"); diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index 2e76226bfd..be0e0a2294 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -63,7 +63,7 @@ Tuplet_bracket::parallel_beam (Grob *me, Link_array const &cols, bool *equ ugh: code dup. */ Grob *s1 = Note_column::get_stem (cols[0]); - Grob *s2 = Note_column::get_stem (cols.top()); + Grob *s2 = Note_column::get_stem (cols.top ()); Grob*b1 = s1 ? Stem::get_beam (s1) : 0; Grob*b2 = s2 ? Stem::get_beam (s2) : 0; @@ -77,14 +77,14 @@ Tuplet_bracket::parallel_beam (Grob *me, Link_array const &cols, bool *equ Link_array beam_stems = Pointer_group_interface__extract_grobs (b1, (Grob*)0, "stems"); - if (beam_stems.size() == 0) + if (beam_stems.size () == 0) { programming_error ("Beam under tuplet bracket has no stems!"); *equally_long = 0; return 0; } - *equally_long = (beam_stems[0] == s1 && beam_stems.top() == s2); + *equally_long = (beam_stems[0] == s1 && beam_stems.top () == s2); return b1; } @@ -154,13 +154,13 @@ Tuplet_bracket::print (SCM smob) Tuplet brackets are normally not broken, but we shouldn't crash if they are. */ - commonx = commonx->common_refpoint (sp->get_bound(LEFT), X_AXIS); - commonx = commonx->common_refpoint (sp->get_bound(RIGHT), X_AXIS); + commonx = commonx->common_refpoint (sp->get_bound (LEFT), X_AXIS); + commonx = commonx->common_refpoint (sp->get_bound (RIGHT), X_AXIS); Direction dir = get_grob_direction (me); Grob * lgr = get_x_bound_grob (columns[0], dir); - Grob * rgr = get_x_bound_grob (columns.top(), dir); + Grob * rgr = get_x_bound_grob (columns.top (), dir); Real x0 = lgr->extent (commonx,X_AXIS)[LEFT]; Real x1 = rgr->extent (commonx,X_AXIS)[RIGHT]; @@ -245,7 +245,7 @@ Tuplet_bracket::make_bracket (Grob *me, // for line properties. Drul_array flare, Drul_array shorten) { - Drul_array corners (Offset(0,0), dz); + Drul_array corners (Offset (0,0), dz); Real length = dz.length (); Drul_array gap_corners; @@ -354,7 +354,7 @@ Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy) Grob * lgr = get_x_bound_grob (columns[0], dir); - Grob * rgr = get_x_bound_grob (columns.top(), dir); + Grob * rgr = get_x_bound_grob (columns.top (), dir); Real x0 = lgr->extent (commonx,X_AXIS)[LEFT]; Real x1 = rgr->extent (commonx,X_AXIS)[RIGHT]; @@ -414,7 +414,7 @@ Tuplet_bracket::before_line_breaking (SCM smob) Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns"); - for (int i = columns.size(); i--;) + for (int i = columns.size (); i--;) { Grob * s =Note_column::get_stem (columns[i]); Grob * b = s ? Stem::get_beam (s): 0; @@ -441,7 +441,7 @@ Tuplet_bracket::after_line_breaking (SCM smob) if (dynamic_cast (me)->is_broken ()) { me->warning (_("Killing tuplet bracket across linebreak.")); - me->suicide(); + me->suicide (); return SCM_UNSPECIFIED; } @@ -509,7 +509,7 @@ Tuplet_bracket::after_line_breaking (SCM smob) Direction Tuplet_bracket::get_default_dir (Grob*me) { - Drul_array dirs(0,0); + Drul_array dirs (0,0); for (SCM s = me->get_property ("note-columns"); gh_pair_p (s); s = ly_cdr (s)) { Grob * nc = unsmob_grob (ly_car (s)); diff --git a/lily/tuplet-engraver.cc b/lily/tuplet-engraver.cc index 128238a343..82ef13dbdf 100644 --- a/lily/tuplet-engraver.cc +++ b/lily/tuplet-engraver.cc @@ -20,7 +20,7 @@ class Tuplet_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Tuplet_engraver); + TRANSLATOR_DECLARATIONS (Tuplet_engraver); protected: Link_array time_scaled_musics_; @@ -85,7 +85,7 @@ Tuplet_engraver::process_acknowledged_grobs () glep->set_property ("text", t); } - announce_grob(glep, time_scaled_musics_ [i]->self_scm()); + announce_grob (glep, time_scaled_musics_ [i]->self_scm ()); } } @@ -150,9 +150,9 @@ Tuplet_engraver::finalize () -Tuplet_engraver::Tuplet_engraver(){} +Tuplet_engraver::Tuplet_engraver (){} -ENTER_DESCRIPTION(Tuplet_engraver, +ENTER_DESCRIPTION (Tuplet_engraver, /* descr */ "Catch Time_scaled_music and generate appropriate bracket ", /* creats*/ "TupletBracket", /* accepts */ "time-scaled-music", diff --git a/lily/type-swallow-translator.cc b/lily/type-swallow-translator.cc index b5832f93ce..c14581e099 100644 --- a/lily/type-swallow-translator.cc +++ b/lily/type-swallow-translator.cc @@ -15,7 +15,7 @@ protected: virtual bool try_music (Music*) { return true; } public: - TRANSLATOR_DECLARATIONS(Skip_event_swallow_translator); + TRANSLATOR_DECLARATIONS (Skip_event_swallow_translator); }; @@ -25,13 +25,13 @@ protected: virtual bool try_music (Music*) { return true; } public: - TRANSLATOR_DECLARATIONS(Rest_swallow_translator); + TRANSLATOR_DECLARATIONS (Rest_swallow_translator); }; -Skip_event_swallow_translator::Skip_event_swallow_translator(){} +Skip_event_swallow_translator::Skip_event_swallow_translator (){} -ENTER_DESCRIPTION(Skip_event_swallow_translator, +ENTER_DESCRIPTION (Skip_event_swallow_translator, "Swallow \\skip.", "", "skip-event", @@ -40,9 +40,9 @@ ENTER_DESCRIPTION(Skip_event_swallow_translator, ""); -Rest_swallow_translator::Rest_swallow_translator(){} +Rest_swallow_translator::Rest_swallow_translator (){} -ENTER_DESCRIPTION(Rest_swallow_translator, +ENTER_DESCRIPTION (Rest_swallow_translator, "Swallow rest", "", "rest-event", @@ -58,12 +58,12 @@ protected: virtual bool try_music (Music*) { return true; } public: - TRANSLATOR_DECLARATIONS(Note_swallow_translator); + TRANSLATOR_DECLARATIONS (Note_swallow_translator); }; -Note_swallow_translator::Note_swallow_translator(){} +Note_swallow_translator::Note_swallow_translator (){} -ENTER_DESCRIPTION(Note_swallow_translator, +ENTER_DESCRIPTION (Note_swallow_translator, "Swallow notes", "", "note-event", diff --git a/lily/un-relativable-music.cc b/lily/un-relativable-music.cc index fa6ee090fb..8565c17250 100644 --- a/lily/un-relativable-music.cc +++ b/lily/un-relativable-music.cc @@ -20,5 +20,5 @@ Un_relativable_music::to_relative_octave (Pitch p) return p; } -ADD_MUSIC(Un_relativable_music); +ADD_MUSIC (Un_relativable_music); diff --git a/lily/unfolded-repeat-iterator.cc b/lily/unfolded-repeat-iterator.cc index 8eb234c3b4..70ee5a4dfb 100644 --- a/lily/unfolded-repeat-iterator.cc +++ b/lily/unfolded-repeat-iterator.cc @@ -15,7 +15,7 @@ source file of the GNU LilyPond music typesetter class Unfolded_repeat_iterator : public Sequential_iterator { public: - DECLARE_SCHEME_CALLBACK(constructor, ()); + DECLARE_SCHEME_CALLBACK (constructor, ()); protected: virtual SCM get_music_list () const; }; @@ -55,14 +55,14 @@ Unfolded_repeat_iterator::get_music_list () const class Volta_repeat_iterator : public Sequential_iterator { public: - DECLARE_SCHEME_CALLBACK(constructor, ()); - Volta_repeat_iterator(); + DECLARE_SCHEME_CALLBACK (constructor, ()); + Volta_repeat_iterator (); void add_repeat_command (SCM); protected: virtual SCM get_music_list () const; virtual void next_element (bool); - virtual void construct_children(); + virtual void construct_children (); virtual void process (Moment); bool first_time_; @@ -72,14 +72,14 @@ protected: }; -Volta_repeat_iterator::Volta_repeat_iterator() +Volta_repeat_iterator::Volta_repeat_iterator () { done_count_ = alt_count_ = rep_count_= 0; first_time_ = true; } SCM -Volta_repeat_iterator::get_music_list()const +Volta_repeat_iterator::get_music_list ()const { return gh_cons (get_music ()->get_property ("element"), get_music ()->get_property ("elements")); @@ -88,7 +88,7 @@ Volta_repeat_iterator::get_music_list()const void Volta_repeat_iterator::construct_children () { - Sequential_iterator::construct_children(); + Sequential_iterator::construct_children (); SCM alts = get_music ()->get_property ("elements"); @@ -164,9 +164,9 @@ Volta_repeat_iterator::process (Moment m) add_repeat_command (ly_symbol2scm ("start-repeat")); first_time_ = false; } - Sequential_iterator::process(m); + Sequential_iterator::process (m); } -IMPLEMENT_CTOR_CALLBACK(Volta_repeat_iterator); -IMPLEMENT_CTOR_CALLBACK(Unfolded_repeat_iterator); +IMPLEMENT_CTOR_CALLBACK (Volta_repeat_iterator); +IMPLEMENT_CTOR_CALLBACK (Unfolded_repeat_iterator); diff --git a/lily/untransposable-music.cc b/lily/untransposable-music.cc index a6c3024fa4..754ad97333 100644 --- a/lily/untransposable-music.cc +++ b/lily/untransposable-music.cc @@ -25,9 +25,9 @@ Untransposable_music::to_relative_octave (Pitch p) return p; } -ADD_MUSIC(Untransposable_music); +ADD_MUSIC (Untransposable_music); -Untransposable_music::Untransposable_music() +Untransposable_music::Untransposable_music () { } diff --git a/lily/vaticana-ligature-engraver.cc b/lily/vaticana-ligature-engraver.cc index 66acf675bd..8fd1a60d90 100644 --- a/lily/vaticana-ligature-engraver.cc +++ b/lily/vaticana-ligature-engraver.cc @@ -33,7 +33,7 @@ private: Real thickness); public: - TRANSLATOR_DECLARATIONS(Vaticana_ligature_engraver); + TRANSLATOR_DECLARATIONS (Vaticana_ligature_engraver); protected: virtual Spanner *create_ligature_spanner (); @@ -277,7 +277,7 @@ Vaticana_ligature_engraver::align_heads (Array primitives, else { prev_primitive->set_property ("add-join", - gh_bool2scm(true)); + gh_bool2scm (true)); /* * Create a small overlap of adjacent heads so that the join @@ -339,7 +339,7 @@ check_for_prefix_loss (Item *primitive) if (prefix_set & ~PES_OR_FLEXA) { String prefs = Gregorian_ligature::prefixes_to_str (primitive); - primitive->warning (_f ("ignored prefix(es) `%s' of this head according " + primitive->warning (_f ("ignored prefix (es) `%s' of this head according " "to restrictions of the selected ligature style", prefs.to_str0 ())); } @@ -358,7 +358,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, int prev_context_info = 0; int prev_delta_pitch = 0; String prev_glyph_name = ""; - for (int i = 0; i < primitives.size(); i++) { + for (int i = 0; i < primitives.size (); i++) { Item *primitive = dynamic_cast (primitives[i].grob_); int delta_pitch; @@ -397,7 +397,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, if (prefix_set & VIRGA) { glyph_name = "vaticana_punctum"; - primitive->set_property ("add-stem", gh_bool2scm(true)); + primitive->set_property ("add-stem", gh_bool2scm (true)); } else if (prefix_set & QUILISMA) glyph_name = "vaticana_quilisma"; @@ -459,7 +459,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, * placed somewhere else. */ prev_primitive->set_property ("add-cauda", - gh_bool2scm(false)); + gh_bool2scm (false)); } glyph_name = "vaticana_reverse_plica"; } @@ -490,7 +490,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, */ if ((context_info & FLEXA_LEFT) && !(context_info & PES_UPPER)) if (!String::compare (glyph_name, "vaticana_punctum")) - primitive->set_property ("add-cauda", gh_bool2scm(true)); + primitive->set_property ("add-cauda", gh_bool2scm (true)); /* * Execptional rule for porrectus: @@ -565,15 +565,15 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, align_heads (primitives, flexa_width, thickness); #if 0 // experimental code to collapse spacing after ligature - /* TODO: set to max(old/new spacing-increment), since other + /* TODO: set to max (old/new spacing-increment), since other voices/staves also may want to set this property. */ Item *first_primitive = dynamic_cast (primitives[0].grob_); - Paper_column *paper_column = first_primitive->get_column(); + 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)); paper_column-> - set_property("forced-spacing", gh_double2scm (ligature_width)); + set_property ("forced-spacing", gh_double2scm (ligature_width)); #endif } diff --git a/lily/vaticana-ligature.cc b/lily/vaticana-ligature.cc index a851202510..8d2d941b87 100644 --- a/lily/vaticana-ligature.cc +++ b/lily/vaticana-ligature.cc @@ -100,14 +100,14 @@ 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 * and right endings due to curved shape. */ - Real ypos_correction = -0.1*staff_space * sign(interval); - Real interval_correction = 0.2*staff_space * sign(interval); + Real ypos_correction = -0.1*staff_space * sign (interval); + Real interval_correction = 0.2*staff_space * sign (interval); Real corrected_interval = interval*staff_space + interval_correction; /* @@ -139,13 +139,13 @@ vaticana_brew_flexa (Grob *me, inner_top_curve.translate (Offset (0.0, -line_thickness)); Stencil top_edge = Lookup::bezier_sandwich (top_curve, inner_top_curve); - stencil.add_stencil(top_edge); + 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); - stencil.add_stencil(bottom_edge); + stencil.add_stencil (bottom_edge); /* * TODO: Use horizontal slope with proper slope value rather @@ -158,14 +158,14 @@ vaticana_brew_flexa (Grob *me, Box left_edge_box (Interval (0, line_thickness), Interval (-0.5*left_height, +0.5*left_height)); Stencil left_edge = Lookup::filled_box (left_edge_box); - stencil.add_stencil(left_edge); + stencil.add_stencil (left_edge); Box right_edge_box (Interval (-line_thickness, 0), 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); - stencil.add_stencil(right_edge); + stencil.add_stencil (right_edge); } stencil.translate_axis (ypos_correction, Y_AXIS); return stencil; @@ -302,11 +302,11 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space) out.add_stencil (join); } - vaticana_add_ledger_lines(me, &out, pos, 0, ledger_take_space); + vaticana_add_ledger_lines (me, &out, pos, 0, ledger_take_space); if (!String::compare (glyph_name, "flexa")) { pos += flexa_height; - vaticana_add_ledger_lines(me, &out, pos, 0.5*flexa_height, + vaticana_add_ledger_lines (me, &out, pos, 0.5*flexa_height, ledger_take_space); } diff --git a/lily/vertical-align-engraver.cc b/lily/vertical-align-engraver.cc index f4d24c71f0..b703745c4b 100644 --- a/lily/vertical-align-engraver.cc +++ b/lily/vertical-align-engraver.cc @@ -18,7 +18,7 @@ class Vertical_align_engraver : public Engraver Spanner * valign_; bool qualifies (Grob_info) const; public: - TRANSLATOR_DECLARATIONS(Vertical_align_engraver); + TRANSLATOR_DECLARATIONS (Vertical_align_engraver); protected: virtual void acknowledge_grob (Grob_info); virtual void process_music (); @@ -71,7 +71,7 @@ Vertical_align_engraver::acknowledge_grob (Grob_info i) } -ENTER_DESCRIPTION(Vertical_align_engraver, +ENTER_DESCRIPTION (Vertical_align_engraver, /* descr */ "Catch Vertical axis groups and stack them.", /* creats*/ "VerticalAlignment", /* accepts */ "", diff --git a/lily/virtual-font-metric.cc b/lily/virtual-font-metric.cc index 744da20afd..ba4580e929 100644 --- a/lily/virtual-font-metric.cc +++ b/lily/virtual-font-metric.cc @@ -27,13 +27,13 @@ Virtual_font_metric::Virtual_font_metric (SCM name_list, SCM nm = gh_car (s); Font_metric *fm = def->find_font (nm, mag); - *tail = scm_cons (fm->self_scm(),SCM_EOL); + *tail = scm_cons (fm->self_scm (),SCM_EOL); tail = SCM_CDRLOC (*tail); } } void -Virtual_font_metric::derived_mark()const +Virtual_font_metric::derived_mark ()const { scm_gc_mark (font_list_); } @@ -68,14 +68,14 @@ Box Virtual_font_metric::get_ascii_char (int) const { programming_error ("Virtual font metric cannot be indexed by ASCII."); - return Box(); + return Box (); } Stencil Virtual_font_metric::get_ascii_char_stencil (int ) const { programming_error ("Virtual font metric cannot be indexed by ASCII."); - return Stencil(); + return Stencil (); } @@ -112,7 +112,7 @@ Virtual_font_metric::get_indexed_char (int code) const } - return Box(); + return Box (); } @@ -144,7 +144,7 @@ Virtual_font_metric::get_indexed_char_stencil (int code) const for (SCM s = font_list_; gh_pair_p (s); s = gh_cdr (s)) { Font_metric* fm = unsmob_metrics (gh_car (s)); - if (code < total + fm->count()) + if (code < total + fm->count ()) { m = fm->get_indexed_char_stencil (code - total); // ugh. break; diff --git a/lily/volta-bracket.cc b/lily/volta-bracket.cc index ed83d76e28..119868b189 100644 --- a/lily/volta-bracket.cc +++ b/lily/volta-bracket.cc @@ -53,18 +53,18 @@ Volta_bracket_interface::print (SCM smob) bool no_vertical_end = orig_span && !broken_last_bracket; SCM s = me->get_property ("bars"); Grob * endbar = unsmob_grob (ly_car (s)); - SCM glyph = endbar->get_property("glyph"); + SCM glyph = endbar->get_property ("glyph"); String str; if (gh_string_p (glyph)) - str = ly_scm2string(glyph); + str = ly_scm2string (glyph); else return SCM_EOL; const char* cs = str.to_str0 (); no_vertical_end |= - (strcmp(cs,":|")!=0 && strcmp(cs,"|:")!=0 && strcmp(cs,"|.")!=0 - && strcmp(cs,":|:")!=0 && strcmp(cs,".|")!=0); + (strcmp (cs,":|")!=0 && strcmp (cs,"|:")!=0 && strcmp (cs,"|.")!=0 + && strcmp (cs,":|:")!=0 && strcmp (cs,".|")!=0); Paper_def * paper =me->get_paper (); Real half_space = 0.5; diff --git a/lily/volta-engraver.cc b/lily/volta-engraver.cc index 50839bf5bd..d0bf956419 100644 --- a/lily/volta-engraver.cc +++ b/lily/volta-engraver.cc @@ -24,7 +24,7 @@ class Volta_engraver : public Engraver { public: - TRANSLATOR_DECLARATIONS(Volta_engraver); + TRANSLATOR_DECLARATIONS (Volta_engraver); protected: virtual void acknowledge_grob (Grob_info); @@ -200,7 +200,7 @@ Volta_engraver::acknowledge_grob (Grob_info i) staff_ = SCM_UNDEFINED; if (staff_ != SCM_UNDEFINED) - staff_ = i.grob_->self_scm(); + staff_ = i.grob_->self_scm (); } } @@ -228,10 +228,10 @@ Volta_engraver::stop_translation_timestep () THIS IS A KLUDGE. we need to do this here, because STAFF_ is not initialized yet - in the 1st call of process_music() + in the 1st call of process_music () */ - volta_span_->suicide( ); + volta_span_->suicide ( ); volta_span_ = 0; } @@ -246,7 +246,7 @@ Volta_engraver::stop_translation_timestep () TODO: should attach volta to paper-column if no bar is found. */ -ENTER_DESCRIPTION(Volta_engraver, +ENTER_DESCRIPTION (Volta_engraver, /* descr */ "Make volta brackets", /* creats*/ "VoltaBracket", /* accepts */ "", diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index a06502de5c..ab66bf798f 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -25,11 +25,11 @@ (AccidentalPlacement . ( (X-extent-callback . ,Axis_group_interface::group_extent_callback) - (left-padding . 0.3) + (left-padding . 0.2) ;; this is quite small, but it is very ugly to have ;; accs closer to the previous note than to the next one. - (right-padding . 0.25) + (right-padding . 0.15) (meta . ((interfaces . (item-interface accidental-placement-interface)))) )) -- 2.39.2