From 1edc2436a028cb2d1be8786ab0972a95b0985d42 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 19 Sep 1997 13:34:15 +0200 Subject: [PATCH] release: 0.1.16 --- .dstreamrc | 4 +- BUGS | 2 +- Documentation/gnu-music.pod | 14 +- Documentation/mudela-man.doc | 167 +++++++++++--------- Documentation/other-packages.pod | 9 +- NEWS | 21 ++- TODO | 5 +- VERSION | 4 +- bin/make-website.in | 31 ++-- bin/mf-to-table.in | 127 --------------- configure | 85 ++++++---- configure.in | 8 +- flower/NEWS | 2 + flower/VERSION | 2 +- flower/dstream.cc | 2 +- flower/include/scalar.hh | 2 +- flower/include/string.hh | 14 +- flower/scalar.cc | 24 +-- flower/string.cc | 7 +- flower/text-stream.cc | 2 +- init/symbol.ly | 3 - init/table16.ly | 10 +- init/table20.ly | 28 ++-- input/collisions.ly | 63 ++++---- input/standchen-16.ly | 14 ++ input/standchen-20.ly | 12 ++ input/standchen.ly | 4 - input/toccata-fuga-E.ly | 10 +- lib/includable-lexer.cc | 3 +- lib/mapped-file-storage.cc | 2 +- lib/simple-file-storage.cc | 2 +- lily/chord-iterator.cc | 2 +- lily/clef-grav.cc | 4 +- lily/dimen.cc | 2 +- lily/grouping.cc | 260 +++++++++++++++---------------- lily/include/lily-proto.hh | 1 - lily/include/line-spacer.hh | 61 ++++---- lily/include/stem.hh | 3 +- lily/item.cc | 2 + lily/lexer.l | 188 +++++++++++----------- lily/line-spacer.cc | 4 + lily/main.cc | 6 +- lily/midi-stream.cc | 2 +- lily/music-iterator.cc | 2 +- lily/music.cc | 2 +- lily/musical-request.cc | 2 +- lily/my-lily-lexer.cc | 2 +- lily/outputter.cc | 2 +- lily/p-score.cc | 2 +- lily/parser.y | 1 + lily/performance.cc | 2 +- lily/property-iterator.cc | 2 +- lily/scoreline.cc | 1 + lily/span-bar.cc | 4 +- lily/spanner.cc | 13 +- lily/stem-grav.cc | 11 +- lily/stem.cc | 26 ++-- lily/tex-stream.cc | 4 +- lily/timing-translator.cc | 2 +- lily/translator-group.cc | 4 +- make/lilypond.lsm | 8 +- make/lilypond.spec | 4 +- mf/Makefile | 17 -- mf/TODO | 1 + mf/autometric.mf | 23 +-- mf/bolletjes.mf | 20 +-- mf/dyn10.mf | 7 +- mf/font-en-tja16.mf | 4 +- mf/font-en-tja20.mf | 2 - mi2mu/mudela-stream.cc | 118 +++++++------- tex/lilyponddefs.tex | 1 + tex/taupindefs.tex | 7 +- 72 files changed, 729 insertions(+), 783 deletions(-) delete mode 100644 bin/mf-to-table.in create mode 100644 input/standchen-16.ly create mode 100644 input/standchen-20.ly diff --git a/.dstreamrc b/.dstreamrc index dd4016464d..7669e1cdb3 100644 --- a/.dstreamrc +++ b/.dstreamrc @@ -5,7 +5,7 @@ Dstream 1 # yydebug InitParser 1 -Parser 1 +Parser 0 InitDeclarations 1 Declarations 1 # FlexLexer debug @@ -47,7 +47,7 @@ Midistrings 1 Mixed_qp 0 Music 0 Music_iterator 0 -My_lily_lexer 1 +My_lily_lexer 0 Note_head 0 Note_performer 0 Note_req 0 diff --git a/BUGS b/BUGS index 5977e0d3ce..433d3c5f3f 100644 --- a/BUGS +++ b/BUGS @@ -1,4 +1,4 @@ -Document Really Ugly Bugs (coredumps assert fails, etc) +Document Really Ugly Bugs (coredumps, assert fails, etc) [Solaris] diff --git a/Documentation/gnu-music.pod b/Documentation/gnu-music.pod index ae733b2667..07e30ba4ab 100644 --- a/Documentation/gnu-music.pod +++ b/Documentation/gnu-music.pod @@ -181,18 +181,6 @@ recognizing input. =item * -Gather a moderate number of test users and hackers - -=item * - -A website on GMP - -=item * - -Libs for r/w MIDI - -=item * - Think about interfaces for components. =item * @@ -217,7 +205,7 @@ The GNU Music project is a project which aims to create free software for music printing and composing. It was started in november '92 by a core team of four members (Bryan Ford , David Linn , Francois Pinard , -Neil Jerram and in January '93 Robert Strandh +Neil Jerram ) and in January '93 Robert Strandh joined. After serious disputes with Robert Strandh diff --git a/Documentation/mudela-man.doc b/Documentation/mudela-man.doc index 185823924a..ddf19760d6 100644 --- a/Documentation/mudela-man.doc +++ b/Documentation/mudela-man.doc @@ -42,7 +42,9 @@ and up-to-date definition, see \file{lily/parser.y} and As a related note, you should take a look at the examples and the init files, as this document does not cover every aspect of mudela yet, and may be out of date.\footnote{Ok, I am being pessimistic here. This - just is a disclaimer. Docs usually are written after the program itself.} + just is a disclaimer. Docs usually are written after the program + itself.} This document intends to give an idea of how it works, it +is not a guide on how to use it. \section{Basic elements} @@ -99,6 +101,7 @@ any characters (except whitespace, \verb+i'm_a_weird!!!identifier+). \verb+$+ Takes any sequence of characters which are not whitespace, \verb+$+ and \verb+%+. \verb+$i'm_a_weird!!!string+ +\def\foobar{$} % silly fontlock mode \subsection{Nesting characters} @@ -138,6 +141,15 @@ When using identifiers they have to be escaped: oboe = \melodic { ... } \score{ \melodic { \oboe }} \end{verbatim} + +The left-hand part of the assignment is really a string, so +\begin{verbatim} +"Foo bar 4 2 " = \melodic { .. } +\end{verbatim} + +is also a valid assignment (but you would have trouble referencing to it) + + \subsection{Hierarchical structures} The general structure consists of declarations: @@ -177,33 +189,42 @@ and manipulating them) Mudela has a number of different input "modes": At the start of parsing, Mudela assumes normal mode. In Normal mode, a word is looked up in the following order: -\begin{verbatim} -word string -\word keyword, identifier -\end{verbatim} -In normalmode, a word is assumed to start with an alphabetic +\begin{description} +\item{\verb+word+} string +\item{\verb|"string"|} string +\item{\verb|\word|} keyword, identifier +\end{description} +In normal mode, a word is assumed to start with an alphabetic character, followed by alpha-numeric characters. -\item[Note mode] - Note mode (and thus Simple mudela) is introduced by - the keyword \verb+\melodic+. In Note mode, a word is looked up in - the following order: +\item[Note mode] Note mode is introduced by the keyword + \verb+\melodic+. In Note mode, a word is looked up in the following + order: +\begin{description} +\item{\verb+word+} notename, string +\item{\verb|"string"|} string +\item{\verb|\word|} keyword, identifier +\end{description} -\begin{verbatim} -word notename, string -\word keyword, identifier -\end{verbatim} -In Note mode a word is considered to have alphabetic characters only. +In Note mode a word is considered to have alphabetic characters only, +so the underscore (\_) is illegal. If you accidently mistype a +notename, the parser will assume that you are entering a string (and +it will most likely complain that you should be in \verb|\lyrics| mode to +do lyrics) -\item[Lyric mode] -Lyrics mode (and thus Simple mudela) is introduced by the keyword \verb+\lyrics+. -In Lyrics mode, a word is looked up in the following order: +\item[Lyric mode] Lyrics mode (and thus Simple mudela) is introduced + by the keyword \verb+\lyrics+. Because of the various control + characters that can appear in lyrics, eg, ``foreign language'' + accents, the inputting a string containing these has been made very + easy. -\begin{verbatim} -word string -\word keyword, identifier -\end{verbatim} +In Lyrics mode, a word is looked up in the following order: +\begin{description} +\item{\verb+word+} string (thus a lyric) +\item{\verb|"string"|} string +\item{\verb|\word|} keyword, identifier +\end{description} In Lyric mode every sequence of non-digit and non-white characters starting with an alphabetic character or the \_ is considered a word. @@ -232,12 +253,12 @@ is a A-1 pitched crotchet. The ' signifies an octave change. A-1 is 440 Hz concert-pitch. \verb+c'+ is also known as the central c. More examples: \begin[fragment,verbatim]{mudela} -'a % 110 + 'a % 110 a % 220 A % 110, uppercase octavates down a' % 440 -a'' % 880 -'as4.*2/3 + a'' % 880 + 'as4.*2/3 \end{mudela} The last one is an A flat, (just below 110 Hz concert-pitch). The \verb+*2/3+ @@ -283,10 +304,10 @@ Music is able to express more. generally speaking, the other requests) or attached to notes (eg. accents). The former are implemented as START and STOP stop features and then attached to the note. -\begin{verbatim} -[] START/STOP a beam -() START/STOP a slur -\end{verbatim} +\begin{description} +\item{[ and ]} start and stop a beam +\item{( and )} start and stop a slur +\end{description} example: \begin[verbatim,fragment]{mudela} @@ -297,8 +318,8 @@ example: \end{mudela} Please note that these two characters do \emph{not} necessarrily nest, -they should attached to the note \verb+[ ]+ will generate a parse -error for this reason. +they should be attached to the note. For this reason, the construct +\verb+[ ]+ will generate a parse error. \subsection{Slurs and Ties} @@ -320,13 +341,13 @@ a'4( )a''4 Symbols which can be put at either side (above or below) of a staff are entered as follows: \begin[verbatim,fragment]{mudela} -a-^ % marcato, direction: default + a-^ % marcato, direction: default a^- % portato, direction: above note a_. % staccato, direction: below note a^\fermata % predefined identifier c_"marcato" % add a text c^"marcato" -c-"marcato" + c-"marcato" \end{mudela} If you want to define your own scripts refer to \file{init/script.ly} for @@ -341,7 +362,7 @@ a4 \dynamic { 0 } % 0 = fff, 7 = ppp Mudela defines the following dynamic identifiers: \begin{verbatim} -ppp pp p mp mf f ff fff +ppp pp p mp mf f ff fff sfz fz fp \end{verbatim} and the following abbreviations: \begin{verbatim} @@ -453,9 +474,42 @@ The \verb+Request_chord+ is a special kind of chord which only allows Requests as its elements. The examples of the previous section were processed with \verb+{+ and \verb+}+ enclosing the input. +\subsection{Durations} + +A duration always starts with the duration type (1,2,4 etc), and then +any optional multipliers/dots + +\subsection{Meters/groupings} + +A meter has this form: +\begin{verbatim} +\meter 3/4 ; +\end{verbatim} + +Rhythmic grouping is a concept closely associated with this. For +example, in a 5/8 meter, the counts are grouped 2+3. In mudela this is +entered as +\begin{verbatim} +\grouping 8*2 8*3 ; +\end{verbatim} +You can start the piece with a partial measure, the command takes the +same syntax as grouping: +\begin{verbatim} +\partial 16*3 4; +\end{verbatim} + +Make the piece start with a upstep [english translation?] +lasting 1 3/4 quarter notes. + +These commands are also "voice elements", and constitute ``Music'' +(consisting of stuff with duration 0). + \subsection{Voicegroups} + +[OUTDATED] + If more than one "voice" is in a staff, then you have the option of putting the different voices into so called voicegroups: members of the same voicegroup share certain characteristics, among others: @@ -475,6 +529,7 @@ LilyPond try to set those lines as independently as possible. [adsolete. Has to be fixed in lily] You can set the voicegroup of a voice with the command \verb+\group+, e.g., + \begin{verbatim} oboeI = \melodic { \group "oboes"; @@ -517,48 +572,18 @@ The construct \end{verbatim} makes a chord (all horizontal parts are in the same voicegroup). The construct \begin{verbatim} -< \multi 2; { ....} { .... } > +\multi 2 < { ....} { .... } > \end{verbatim} creates horizontal parts which behave independently. You will have to set voicegroup features by hand (\verb+\stem+ and \verb+\hshift+. See examples) The construct \begin{verbatim} -< \multi 3; { ....} { .... } > +\multi 3 < { ....} { .... } > \end{verbatim} creates a chord with each part in a different staff -\subsection{Durations} - -A duration always starts with the duration type (1,2,4 etc), and then -any optional multipliers/dots - -\subsection{Meters/groupings} - -A meter has this form: -\begin{verbatim} -\meter 3/4 ; -\end{verbatim} - -Rhythmic grouping is a concept closely associated with this. For -example, in a 5/8 meter, the counts are grouped 2+3. In mudela this is -entered as -\begin{verbatim} -\grouping 8*2 8*3 ; -\end{verbatim} -You can start the piece with a partial measure, the command takes the -same syntax as grouping: -\begin{verbatim} -\partial 16*3 4; -\end{verbatim} - -Make the piece start with a partial measure [english translation?] -lasting 1 3/4 quarter notes. - -These commands are also "voice elements", and constitute simple mudela -(consisting of stuff with duration 0). - \subsection{Examples} Examples are included with the GNU LilyPond distribution. For the sake of @@ -567,11 +592,11 @@ maintenance no long examples are included in this document. \section{History} -This language has a number of roots. First and foremost, GNU LilyPond's -predecessor mpp was the inspiration of simple Mudela. Secondly, the -hierarchical structure looks a lot like Rayce's (Rayce is a raytracer -that I've written as a hobby project. ), which in turn owes a lot to -POVRay. +This language has a number of roots. First and foremost, GNU +LilyPond's predecessor mpp was the inspiration of the Note-mode input. +Secondly, the hierarchical structure looks a lot like Rayce's (Rayce +is a raytracer that I've written as a hobby project. ), which in turn +owes a lot to POVRay. Now, we know, musictypesetting and raytracing do not necessarily require the same input format, and we know that a lot more ways exist diff --git a/Documentation/other-packages.pod b/Documentation/other-packages.pod index 49c2e7dbe4..c0acbb555e 100644 --- a/Documentation/other-packages.pod +++ b/Documentation/other-packages.pod @@ -59,7 +59,7 @@ After quarrels, MusiXTeX has been split into two branches: Daniel Taupin's now maintains the branch that still carries the name MusiXTeX. -=item OpusTeX, http://www.inf.ethz.ch/people/achermann/opustex +=item OpusTeX, http://www.inf.ethz.ch/personal/achermann/ Andreas Egler's branch is called MusiXTeX. @@ -117,6 +117,10 @@ Notation editor for W95 and Mac Notation editor on Acorn machines. Their developers call it ``best notation program available''. +=item Ikarus, + +The music-engraving system described by [Wanske] + =item Finale =item Score @@ -142,11 +146,8 @@ batch program (like LilyPond). It is aimed at publishers. Its history is more than fifteen years and Amadeus has been running under different Unix clones. It uses MIDI-keyboard input - - =back - =head2 Unknown =item MusE diff --git a/NEWS b/NEWS index 7f22d8a840..e02e1d5a06 100644 --- a/NEWS +++ b/NEWS @@ -1,11 +1,26 @@ -pl 15.jcn2 - - mf-to-table.in: generate mozarella metric info tables - - autometric.mf: write metric info to mf logfile +pl 16 + - bf: doco about {Mus*,Opus}TeX + - ; optional after \musicidentifier + - bf: configure: MFDIR + - bf: String::operator bool () removed + - bf: String::operator char const * () removed + - bf: Line_spacer::~Line_spacer () added: plugged memleak + - bf: Line_of_score::do_unlink () call Spanner::do_unlink + - bf: rests in beams + - bfs: mudela-man + - bf: textnatural + - bf: 20 pt flags + - bf: longarest + pl 15.jcn1 - bf: typos whole and half notehead - de-uglyfied bolletjes.mf - ascii output of font metrics in mf logfile + +****** +sep 17 + pl 15 - put top of NEWS file in the webpage diff --git a/TODO b/TODO index 15869f6f39..67b807a4c2 100644 --- a/TODO +++ b/TODO @@ -17,6 +17,8 @@ grep for TODO and ugh/ugr this modifies \stem for the c2 + * Fix ledgerlines + * use properties for: - Text_style - default_octave @@ -160,7 +162,6 @@ languages: - Common Music Notation - PostScript output (esp. Beams, Slurs, etc) - Move all Score_elems, into libmutype.a - * Documentation - Doc Mutopia (Music To The People) @@ -345,6 +346,8 @@ SMALLISH PROJECTS IDEAS + * Output abstract data structures associated with +Mudela. * create libmudela, or liblily_frontend diff --git a/VERSION b/VERSION index b85f15066a..99ac08b1a1 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 1 -TOPLEVEL_PATCH_LEVEL = 15 +TOPLEVEL_PATCH_LEVEL = 16 # use to send patches, always empty for released version: -TOPLEVEL_MY_PATCH_LEVEL = .jcn2 +TOPLEVEL_MY_PATCH_LEVEL = diff --git a/bin/make-website.in b/bin/make-website.in index 7f25e76d9f..6c65e645dd 100644 --- a/bin/make-website.in +++ b/bin/make-website.in @@ -1,5 +1,10 @@ -#!@PERL@ -w -# stupid script to generate WWW site. -*-Perl-*- +#!@PERL@ -w +# -*-Perl-*- + + +# stupid script to generate WWW site. The WWW site is my +# test-suite for LilyPond, I usually don't distribute versions that +# fail to make the website use FileHandle; use Getopt::Long; @@ -27,9 +32,8 @@ sub get_version $lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL"; # stupid checks. - $lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL"; - - + $lily_version= $lily_version; + close V; } @@ -77,15 +81,20 @@ sub my_system local $base="lilypond/"; -local @examples=("twinkle-pop", "twinkle", "multi", "wtk1-fugue2", - #"standchen-16", - #"standchen-20", +local @examples=("twinkle-pop", + "wtk1-fugue2", + "standchen-16", + "standchen-20", "wtk1-prelude1", "toccata-fuga-E", "scsii-menuetto", - "cadenza", "scales", - "rhythm", - "gallina"); + "cadenza", + "gallina", + "twinkle", + "collisions", + "scales", + "rhythm", + "multi" ); sub gen_html diff --git a/bin/mf-to-table.in b/bin/mf-to-table.in deleted file mode 100644 index 17a7c2f7a8..0000000000 --- a/bin/mf-to-table.in +++ /dev/null @@ -1,127 +0,0 @@ -#!@PERL@ -w -# -*-perl-*- - -=head1 TODO - -rename me! - -Ugh . Perl sux. Anybody for Python? - -=cut - -$mf_to_table_version = 0.1; - -use Getopt::Long; - -sub last_conversion -{ - my @v = &versions; - return pop @v; -} -sub identify -{ - - print STDERR "This is mf-to-table " . $mf_to_table_version . "\n"; -} - -sub usage -{ - print STDERR "Usage: mf-to-table [options] LOG..\n" - . "Generate mozarella metrics table from preparated metafont log\n\n" - . "Options:\n" - . " -h, --help print this help\n" - . " -o, --output=FILE name output file\n" -} - -sub make_table -{ - my $line; - my $indent = 0; - while ($line = ) { - if ($line =~ /^@@/) { - $line =~ s/^@@(.*)@@/$1/; - chop ($line); - my @fields = split (/:/,$line); - my $label = $fields [0]; - my $name = $fields [1]; - print OUT "\t" x $indent; - if ($label eq "font") { - print OUT "% $name=\\symboltables {\n"; - $indent++; - } elsif ($label eq "group") { - print OUT "\"$name\" = \\table {\n"; - $indent++; - } elsif ($label eq "puorg") { - print OUT "}\n"; - $indent--; - } elsif ($label eq "tnof") { - print OUT "% } % $name\n"; - $indent--; - } elsif ($label eq "char") { - my $c = $fields [2]; - my $w = $fields [3]; - my $h = $fields [4]; - my $d = $fields [5]; - my $id = $fields [6]; - my $texstr = $fields [7]; - print OUT sprintf( "\"%s\"\t\"\\%s\"\t%.2f\\pt\t%.2f\\pt\t%.2f\\pt\t%.2f\\pt\n", $id, $texstr, 0, $w, $h, $d ); - } else { - print STDERR "mf-to-table: unknown label: \`$label\'\n"; - } - } - } -} - -sub set_files -{ - $infile = "-"; - $outfile = "-"; - $outfile = $opt_output if (defined($opt_output)); - - if ($ARGV [0]) { - $infile = $ARGV[0]; - } - if (( ! -f $infile) && (! $infile =~ /\\.log$/s ) ){ - $infile .= ".log"; - } - print STDERR "Input ", (($infile eq "-") ?"STDIN" : $infile), " .. \n"; -} - -sub do_one_arg -{ - set_files; - - die "can't open \`$infile\'" unless open IN,$infile ; - die "can't open \`$outfile\'" unless open OUT, ">$outfile"; - print OUT "% generated at " . localtime() . " from $infile\n"; - print OUT "% changes will be lost\n"; - - make_table; - - close IN; - close OUT; -} - -## "main" - -identify; - -#GetOptions ("help", "output=s", "from=i", "to=i", "minor=i", "edit", "show-rules"); -GetOptions ("help", "output=s"); - -if ($opt_help) { - usage(); - $opt_help = 0; # to extinguish typo check. - exit 0; -} - -local ($infile,$outfile); -my $processed_one=0; - -while (defined($ARGV[0])) { - do_one_arg; - shift @ARGV; - $processed_one = 1; -} -do_one_arg unless ($processed_one); - diff --git a/configure b/configure index 3042b7989d..f9b425a4f9 100755 --- a/configure +++ b/configure @@ -27,6 +27,8 @@ ac_help="$ac_help tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)" ac_help="$ac_help tex-dir=DIR set the directory to put LilyPond TeX files in. " +ac_help="$ac_help + mf-dir=DIR set the directory to put LilyPond MetaFont files in. (obsolete)" ac_help="$ac_help out-dir set the directory for machine generated files. Default out or out-HOST" @@ -632,7 +634,13 @@ else fi - +# Check whether --enable-mf-dir or --disable-mf-dir was given. +if test "${enable_mf_dir+set}" = set; then + enableval="$enable_mf_dir" + MFDIR=$enableval +else + MFDIR=auto +fi # Check whether --enable-out-dir or --disable-out-dir was given. @@ -686,7 +694,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:690: checking for $ac_word" >&5 +echo "configure:698: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -717,7 +725,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:721: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:729: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -727,11 +735,11 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -751,12 +759,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:755: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:763: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:760: checking whether we are using GNU C++" >&5 +echo "configure:768: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -765,7 +773,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -780,7 +788,7 @@ if test $ac_cv_prog_gxx = yes; then ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:784: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:792: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -810,7 +818,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:814: checking for $ac_word" >&5 +echo "configure:822: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -866,7 +874,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:870: checking for a BSD compatible install" >&5 +echo "configure:878: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -920,7 +928,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:924: checking for $ac_word" >&5 +echo "configure:932: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -954,7 +962,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:958: checking for $ac_word" >&5 +echo "configure:966: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1020,7 +1028,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1024: checking for $ac_word" >&5 +echo "configure:1032: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1054,7 +1062,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1058: checking for $ac_word" >&5 +echo "configure:1066: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1088,7 +1096,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1092: checking for $ac_word" >&5 +echo "configure:1100: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1120,7 +1128,7 @@ test -n "$MAKE" || MAKE="error" # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1124: checking for $ac_word" >&5 +echo "configure:1132: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1154,7 +1162,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1158: checking for $ac_word" >&5 +echo "configure:1166: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_PODMAN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1190,7 +1198,7 @@ if test "x$TEXPREFIX" = xauto ; then echo $ac_n "checking TeX/MF root dir directory""... $ac_c" 1>&6 -echo "configure:1194: checking TeX/MF root dir directory" >&5 +echo "configure:1202: checking TeX/MF root dir directory" >&5 find_root_prefix="$prefix" @@ -1225,13 +1233,38 @@ echo "configure:1194: checking TeX/MF root dir directory" >&5 else find_texprefix=$TEXPREFIX fi + +if test "x$MFDIR" = xauto; then + + + + echo $ac_n "checking MF input directory""... $ac_c" 1>&6 +echo "configure:1243: checking MF input directory" >&5 + find_dirdir=`(cd $find_texprefix; + $FIND ./ -type d -a -name source -print |sort|head -1|sed 's#^\./##')` + + + if test "x$find_dirdir" = x; then + find_dirdir="/source"; + + echo "configure: warning: Cannot determine MF input subdirectory. Please set from command-line" 1>&2 + warn_b=yes + + true + fi + MFDIR=$find_dirdir + echo "$ac_t""$find_texprefix/$find_dirdir" 1>&6 + + MFDIR="$TEXPREFIX/$MFDIR" + +fi if test "x$TEXDIR" = xauto ; then echo $ac_n "checking TeX input directory""... $ac_c" 1>&6 -echo "configure:1235: checking TeX input directory" >&5 +echo "configure:1268: checking TeX input directory" >&5 find_dirdir=`(cd $find_texprefix; $FIND ./ -type d -a -name tex -print |sort|head -1|sed 's#^\./##')` @@ -1334,7 +1367,7 @@ else fi echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:1338: checking how to run the C++ preprocessor" >&5 +echo "configure:1371: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1347,12 +1380,12 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1372,17 +1405,17 @@ echo "$ac_t""$CXXCPP" 1>&6 ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6 -echo "configure:1376: checking for FlexLexer.h" >&5 +echo "configure:1409: checking for FlexLexer.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* diff --git a/configure.in b/configure.in index e3e93c03bd..2e0c385e87 100644 --- a/configure.in +++ b/configure.in @@ -62,10 +62,10 @@ AC_ARG_ENABLE(tex-dir, [TEXDIR=$enableval], [TEXDIR=auto] ) -AC_JUNK_ARGS( AC_ARG_ENABLE(mf-dir, +AC_ARG_ENABLE(mf-dir, [ mf-dir=DIR set the directory to put LilyPond MetaFont files in. (obsolete)], [MFDIR=$enableval], - [MFDIR=auto] )) + [MFDIR=auto]) AC_ARG_ENABLE(out-dir, [ out-dir set the directory for machine generated files. Default out or out-HOST], @@ -153,6 +153,10 @@ if test "x$TEXPREFIX" = xauto ; then else find_texprefix=$TEXPREFIX fi + +if test "x$MFDIR" = xauto; then + AC_MF_SUBDIR(MFDIR) +fi if test "x$TEXDIR" = xauto ; then AC_TEX_SUBDIR(TEXDIR) diff --git a/flower/NEWS b/flower/NEWS index 7d080f2cd1..f9e06e0552 100644 --- a/flower/NEWS +++ b/flower/NEWS @@ -1,3 +1,5 @@ +pl 31 + - removed String::bool () [Sigh], String::operator char const * pl 30 - Cpu_timer pl 29 diff --git a/flower/VERSION b/flower/VERSION index ab5a2361a9..e139075ebb 100644 --- a/flower/VERSION +++ b/flower/VERSION @@ -1,6 +1,6 @@ MAJOR_VERSION = 1 MINOR_VERSION = 1 -PATCH_LEVEL = 30 +PATCH_LEVEL = 31 # use to send patches, always empty for released version: MY_PATCH_LEVEL = # include separator: "-1" or ".a" # diff --git a/flower/dstream.cc b/flower/dstream.cc index 16d83d6890..533cd13a7c 100644 --- a/flower/dstream.cc +++ b/flower/dstream.cc @@ -105,7 +105,7 @@ Dstream::output (String s) if (local_silence_b_|| !os_l_) return ; - for (char const *cp = s ; *cp; cp++) + for (char const *cp = s.ch_C (); *cp; cp++) switch (*cp) { case '{': diff --git a/flower/include/scalar.hh b/flower/include/scalar.hh index b00e25fc20..facc36ac73 100644 --- a/flower/include/scalar.hh +++ b/flower/include/scalar.hh @@ -24,7 +24,7 @@ struct Scalar : public String { Scalar (Rational); operator Rational(); Scalar() {} - bool isnum(); + bool isnum_b() const; operator Real(); operator int(); diff --git a/flower/include/string.hh b/flower/include/string.hh index b749b7ee06..9e60bf9858 100644 --- a/flower/include/string.hh +++ b/flower/include/string.hh @@ -83,21 +83,27 @@ public: Byte const* byte_C() const; char* ch_l(); Byte* byte_l(); - +#if 0 /// deprecated; use ch_C() operator char const*() const { return ch_C(); } - +#endif String &operator =(String const & source); /// concatenate s void operator += (char const* s) { strh_ += s; } void operator += (String s); - /// is the string empty? - operator bool () const + bool empty_b () const; +#if 0 + /** is the string empty? + + Ugh-ugh-thank-you-cygnus. W32 barfs on this + */ + operator bool () const; { return length_i (); } +#endif void append (String); void prepend (String); diff --git a/flower/scalar.cc b/flower/scalar.cc index fdffabd360..9d7ef22957 100644 --- a/flower/scalar.cc +++ b/flower/scalar.cc @@ -16,7 +16,7 @@ Scalar::Scalar (Rational r) } -Scalar::operator Rational() +Scalar::operator Rational () { int p = index_i ('/'); if (p == -1) @@ -25,25 +25,25 @@ Scalar::operator Rational() String s2 = right_str (len()-p-1); String s1 = left_str (p); - return Rational (s1.value_i(), s2.value_i ()); + return Rational (s1.value_i (), s2.value_i ()); } bool -Scalar::isnum() +Scalar::isnum_b () const { int conv = false; - if (len()) + if (len ()) { long l =0; - conv = sscanf (strh_.ch_C(), "%ld", &l); + conv = sscanf (strh_.ch_C (), "%ld", &l); } return len() && conv; } Scalar::operator Real() { - assert (isnum()); - return value_f(); + assert (isnum_b ()); + return value_f (); } Scalar::operator int() @@ -51,19 +51,19 @@ Scalar::operator int() if (!length_i ()) return 0; // ugh - assert (isnum()); - return value_i(); + assert (isnum_b()); + return value_i (); } -Scalar::operator bool() const +Scalar::operator bool () const { - if (!len()) + if (!len ()) return false; if (*this == "0") return false; String u (*this); - if (u.upper_str() == "FALSE") + if (u.upper_str () == "FALSE") return false; return true; } diff --git a/flower/string.cc b/flower/string.cc index a68afb5887..74ae9a7865 100644 --- a/flower/string.cc +++ b/flower/string.cc @@ -139,6 +139,11 @@ String::ch_l() return strh_.ch_l(); } +bool +String::empty_b () const +{ + return !length_i (); +} /** Do a signed comparison, analogous to memcmp; */ @@ -214,7 +219,7 @@ String::index_i (char c) const find the substring. @return - index of leftmost occurrence of #searchfor# +1 index of leftmost occurrence of #searchfor# */ int String::index_i (String searchfor) const diff --git a/flower/text-stream.cc b/flower/text-stream.cc index 530c6f8ecd..f9a8307226 100644 --- a/flower/text-stream.cc +++ b/flower/text-stream.cc @@ -12,7 +12,7 @@ Text_stream::Text_stream (String fn) else { name = fn; - f = fopen (fn, "r"); + f = fopen (fn.ch_C (), "r"); } if (!f) diff --git a/init/symbol.ly b/init/symbol.ly index 2ca0c7f7d9..115b6dbb14 100644 --- a/init/symbol.ly +++ b/init/symbol.ly @@ -35,17 +35,14 @@ center=0 stemup = { \skip 1*0; % Stupid hack to make < { \stemup } > work -% \property Thread.cocktailbar = 1 \property Voice.ydirection = \up } stemboth= { \skip 1*0; - % \property Thread.cocktailbar = 0 \property Voice.ydirection = \center } stemdown = { \skip 1*0; - %\property Thread.cocktailbar = -1 \property Voice.ydirection = \down } diff --git a/init/table16.ly b/init/table16.ly index 3869d070ad..5097530ac8 100644 --- a/init/table16.ly +++ b/init/table16.ly @@ -75,14 +75,18 @@ table_sixteen= "tenor_change" "\caltoclef" 0.0\pt 11.2\pt 0.0\pt 16.0\pt } - % ugh what's our outdir called? - \include "mf/out/font-en-tja16.ly" + "balls" = \table { + "-2" "\longaball" 0.0\pt 6.0\pt -2.0\pt 2.0\pt + "-1" "\breveball" 0.0\pt 6.0\pt -2.0\pt 2.0\pt + "0" "\wholeball" 0.0\pt 8.0\pt 0.0\pt 4.4\pt + "1" "\halfball" 0.0\pt 5.4\pt 0.0\pt 4.4\pt + "2" "\quartball" 0.0\pt 5.5\pt 0.0\pt 4.4\pt + } "slur" = \table { "whole" "\slurchar%{%}" "half" "\hslurchar%{%}" } - "accidentals" = \table { "-2" "\flatflat" 0.0\pt 8.16\pt -2.5\pt 7.5\pt "-1" "\flat" 0.0\pt 4.8\pt -2.5\pt 7.5\pt diff --git a/init/table20.ly b/init/table20.ly index 0abf1ac4b9..dc32462e8b 100644 --- a/init/table20.ly +++ b/init/table20.ly @@ -78,8 +78,12 @@ table_twenty = "tenor_change" "\caltoclef" 0.0\pt 16.0\pt 0.0\pt 20.0\pt } - % ugh what's our outdir called? - \include "mf/out/font-en-tja20.ly" + "balls" = \table { + "-1" "\breveball" 0.0\pt 7.5\pt -2.5\pt 2.5\pt + "0" "\wholeball" 0.0\pt 10.2\pt 0.0\pt 5.4\pt + "1" "\halfball" 0.0\pt 6.8\pt 0.0\pt 5.4\pt + "2" "\quartball" 0.0\pt 6.6\pt 0.0\pt 5.4\pt + } "slur" = \table { "whole" "\slurchar%{%}" 0.0\pt 0.0\pt 0.0\pt 0.0\pt @@ -153,16 +157,16 @@ table_twenty = } "flags" = \table { - "8" "\eighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt - "16" "\sixteenthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt - "32" "\thirtysecondflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt - "64" "\sixtyfourthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt - "128" "\hundredtwentyeighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt - "-8" "\deighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt - "-16" "\dsixteenthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt - "-32" "\dthirtysecondflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt - "-64" "\dsixtyfourthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt - "-128" "\dhundredtwentyeighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt + "u3" "\eighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt + "u4" "\sixteenthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt + "u5" "\thirtysecondflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt + "u6" "\sixtyfourthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt + "u7" "\hundredtwentyeighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt + "d3" "\deighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt + "d4" "\dsixteenthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt + "d5" "\dthirtysecondflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt + "d6" "\dsixtyfourthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt + "d7" "\dhundredtwentyeighthflag" 0.0\pt 5.0\pt 0.0\pt 0.0\pt } "beamslopes" = \table { diff --git a/input/collisions.ly b/input/collisions.ly index 15f5b3969e..d2c945889d 100644 --- a/input/collisions.ly +++ b/input/collisions.ly @@ -1,15 +1,10 @@ -%{MudelaHeader - - filename: collisions.ly - title: - description: random counterpoint to test collisions - composer(s): - entered-by: HWN,JCN - copyright: public domain - - Tested Features:test the Collision resolution -EndMudelaHeader -%} +\header{ +filename collisions.ly +description random counterpoint to test collisions +enteredby HWN,JCN +copyright public domain +Tested test the Collision resolution +} \version "0.1.6"; @@ -60,30 +55,34 @@ rests = \melodic restsII = \melodic { \octave c'; \multi 2 < - { \stemup g' f' e' d' c' b a g f e d c } - { \stemdown r r r r r r r r r r r r } - > + { \stemup g' f' e' d' c' b a g f e d c } + { \stemdown r r r r r r r r r r r r } + > \multi 2 < - { \stemup r r r r r r r r r r r r } - { \stemdown c d e f g a b c' d' e' f' g' } - > - r8 r4 - \multi 2 < r8 r8 > - \multi 2 < r8 r8 r8 > - \multi 2 < r8 r8 r8 r8 > - \multi 2 < r r > - \multi 2 < r r r > - \stemup - [c''8 r8 c''8 c''8] - [c8 r8 c8 c8] - \stemdown - [c8 r8 c8 c8] - [c''8 r8 c''8 c''8] + { \stemup r r r r r r r r r r r r } + { \stemdown c d e f g a b c' d' e' f' g' } + > + r8 r4 + \multi 2 < r8 r8 > + \multi 2 < r8 r8 r8 > + \multi 2 < r8 r8 r8 r8 > + \multi 2 < r r > + \multi 2 < r r r > + \stemup + [c''8 r8 c''8 c''8] + [c8 r8 c8 c8] + \stemdown + [c8 r8 c8 c8] + [c''8 r8 c''8 c''8] } \score{ - { \two_voice \two_voice_steminvert - \three_voice \rests \restsII } + { \two_voice + \two_voice_steminvert + \three_voice + \rests + %\restsII + } diff --git a/input/standchen-16.ly b/input/standchen-16.ly new file mode 100644 index 0000000000..67c461f127 --- /dev/null +++ b/input/standchen-16.ly @@ -0,0 +1,14 @@ +\header{ +filename standchen.ly +title St\"andchen (Serenade) "Leise flehen meine Lieder" +opus D. 957 No. 4 +composers Franz Schubert (1797-1828) + Text by Ludwig Rellstab (1799-1860) +enteredby JCN +copyright public domain + +} + + +% just a silly file to satisfy the make-website script +\include "standchen.ly" diff --git a/input/standchen-20.ly b/input/standchen-20.ly new file mode 100644 index 0000000000..41246d19af --- /dev/null +++ b/input/standchen-20.ly @@ -0,0 +1,12 @@ +\header{ +filename standchen.ly +title St\"andchen (Serenade) "Leise flehen meine Lieder" +opus D. 957 No. 4 +composers Franz Schubert (1797-1828) + Text by Ludwig Rellstab (1799-1860) +enteredby JCN +copyright public domain +} + +% just a silly file to satisfy the make-website script +% this should be run after standchen-16 diff --git a/input/standchen.ly b/input/standchen.ly index bbe4c65570..c8edb90140 100644 --- a/input/standchen.ly +++ b/input/standchen.ly @@ -495,16 +495,12 @@ themusic = % 20pt music uses whole pagewidth linewidth= 195.\mm; - % we want gourlay, don't set geometric - % geometric= 1.4; gourlay_maxmeasures = 9.; \output "standchen-20.out"; } \paper{ % 16pt mustn't use whole page width linewidth= 160.\mm; - % we want gourlay, don't set geometric - % geometric= 1.4; gourlay_maxmeasures = 9.; \output "standchen-16.out"; } diff --git a/input/toccata-fuga-E.ly b/input/toccata-fuga-E.ly index cb1f2fc770..9b9bb6fc92 100644 --- a/input/toccata-fuga-E.ly +++ b/input/toccata-fuga-E.ly @@ -139,12 +139,12 @@ break = \melodic{ % these should be two separate scores... \score{ - \multi 1 < - \type Grandstaff \multi 3 < - {\toccata_right \break \fuga2_right } - { \toccata_left \break \fuga2_left } + < + \type Grandstaff \multi 3 < + { \toccata_right \break \fuga2_right } + { \toccata_left \break \fuga2_left } > - { \toccata_pedal \break \fuga2_pedal } + \type Staff { \toccata_pedal \break \fuga2_pedal } > \paper{} \midi{ diff --git a/lib/includable-lexer.cc b/lib/includable-lexer.cc index 05d9d9aa42..fbb5c920d2 100644 --- a/lib/includable-lexer.cc +++ b/lib/includable-lexer.cc @@ -26,7 +26,8 @@ Includable_lexer::new_input(String s, Sources * global_sources) Source_file * sl = global_sources->get_file_l(s); if (!sl) { - LexerError("Can't find file `" + s+ "'"); + String msg ="Can't find file `" + s+ "'"; + LexerError(msg.ch_C ()); return; } diff --git a/lib/mapped-file-storage.cc b/lib/mapped-file-storage.cc index 2267164ae7..d260569570 100644 --- a/lib/mapped-file-storage.cc +++ b/lib/mapped-file-storage.cc @@ -53,7 +53,7 @@ Mapped_file_storage::map() void Mapped_file_storage::open(String name_str) { - fildes_i_ = ::open(name_str, O_RDONLY); + fildes_i_ = ::open(name_str.ch_C (), O_RDONLY); if (fildes_i_ == -1) { diff --git a/lib/simple-file-storage.cc b/lib/simple-file-storage.cc index b618e11634..3ef231a3e4 100644 --- a/lib/simple-file-storage.cc +++ b/lib/simple-file-storage.cc @@ -34,7 +34,7 @@ Simple_file_storage::Simple_file_storage(String s) let's hope that "b" opens anything binary, and does not apply CR/LF translation */ - FILE * f = (s) ? fopen (s.ch_C(), "rb") : stdin; + FILE * f = (s.length_i ()) ? fopen (s.ch_C(), "rb") : stdin; if (!f) { diff --git a/lily/chord-iterator.cc b/lily/chord-iterator.cc index 83c5435ed6..054990199f 100644 --- a/lily/chord-iterator.cc +++ b/lily/chord-iterator.cc @@ -32,7 +32,7 @@ Chord_iterator::construct_children() Music_iterator * mi = get_iterator_p (i.ptr()); if (mi->ok()) { - if (!chord_C_->translator_type_str_) + if (chord_C_->translator_type_str_.empty_b ()) set_translator (mi->report_to_l()->ancestor_l (chord_C_->multi_level_i_)); children_p_list_.bottom().add (mi); } diff --git a/lily/clef-grav.cc b/lily/clef-grav.cc index 5571327077..670e5d9cd0 100644 --- a/lily/clef-grav.cc +++ b/lily/clef-grav.cc @@ -63,7 +63,7 @@ Clef_engraver::read_req (Clef_change_req*c_l) void Clef_engraver::acknowledge_element (Score_elem_info info) { - if (info.elem_l_->name() == Bar::static_name () && clef_type_str_) + if (info.elem_l_->name() == Bar::static_name () && clef_type_str_.length_i()) { create_clef(); if (!clef_req_l_) @@ -77,7 +77,7 @@ Clef_engraver::do_creation_processing() Scalar def = get_property ("defaultclef"); if (def) set_type (def); - if (clef_type_str_) + if (clef_type_str_.length_i ()) create_clef(); clef_p_->default_b_ = false; } diff --git a/lily/dimen.cc b/lily/dimen.cc index 499d286cf2..4665221692 100644 --- a/lily/dimen.cc +++ b/lily/dimen.cc @@ -7,7 +7,7 @@ Real parse_dimen (String dim) { int i=dim.length_i()-1; - char const *s = dim; + char const *s = dim.ch_C (); while (i > 0 && (isspace (s[i]) || isalpha (s[i]))) { i--; diff --git a/lily/grouping.cc b/lily/grouping.cc index 15401fced9..2c073adc63 100644 --- a/lily/grouping.cc +++ b/lily/grouping.cc @@ -25,10 +25,10 @@ Rhythmic_grouping::OK() const for (int i= 0; i < children.size(); i++) { - children[i]->OK(); - if (i>0) - assert (children[i-1]->interval().right == - children[i]->interval().left); + children[i]->OK(); + if (i>0) + assert (children[i-1]->interval().right == + children[i]->interval().left); } #endif } @@ -43,29 +43,29 @@ MInterval Rhythmic_grouping::interval() const { if (interval_) - return *interval_; + return *interval_; else - return - MInterval (children[0]->interval().left, - children.top()->interval ().right); + return + MInterval (children[0]->interval().left, + children.top()->interval ().right); } void Rhythmic_grouping::split (Rhythmic_grouping r) { if (interval_) - return ; + return ; r.intersect (interval()); split (r.intervals()); for (int i= 0; i < children.size(); i++) { - if (!children[i]->interval_) - { - Rhythmic_grouping here (r); - children[i]->split (here); - } + if (!children[i]->interval_) + { + Rhythmic_grouping here (r); + children[i]->split (here); + } } } @@ -76,15 +76,15 @@ Rhythmic_grouping::intervals() Array r; if (interval_ || children.size() == 1) { - MInterval i (interval()); - MInterval r1(i), r2(i); - r1.right = r2.left = i.center(); - r.push (r1); r.push (r2); + MInterval i (interval()); + MInterval r1(i), r2(i); + r1.right = r2.left = i.center(); + r.push (r1); r.push (r2); } else { - for (int i=0; i < children.size(); i++) - r.push (children[i]->interval()); + for (int i=0; i < children.size(); i++) + r.push (children[i]->interval()); } return r; } @@ -94,29 +94,29 @@ Rhythmic_grouping::intersect (MInterval t) { if (interval_) { - interval_->intersect (t); - return; + interval_->intersect (t); + return; } for (int i=0; i < children.size(); i++) { - MInterval inter = intersection (t, children[i]->interval()); - if (inter.empty_b() || inter.length () <= Rational (0)) - { - delete children[i]; - children[i] =0; - } - else - { - children[i]->intersect (t); - } + MInterval inter = intersection (t, children[i]->interval()); + if (inter.empty_b() || inter.length () <= Rational (0)) + { + delete children[i]; + children[i] =0; + } + else + { + children[i]->intersect (t); + } } for (int i=0; i < children.size();) { - if (!children[i]) - children.del (i); - else - i++; + if (!children[i]) + children.del (i); + else + i++; } } @@ -138,44 +138,44 @@ Rhythmic_grouping::split (Array splitpoints) Array ch; while (1) { - if (i >= children.size() || j >= splitpoints.size ()) - break; + if (i >= children.size() || j >= splitpoints.size ()) + break; - assert ( - children[starti]->interval().left== splitpoints[startj].left); - if (children[i]->interval().right < splitpoints[j].right) - { - i ++; - } - else if (children[i]->interval().right > splitpoints[j].right) - { - j ++; - } - else - { - - if (i == starti) - { - ch.push (children[i]); - } - else - { - Rhythmic_grouping *newchild=new Rhythmic_grouping ( - children.slice (starti, i+1)); - - ch.push (newchild); - } - i ++; - j++; - starti = i; - startj = j; - - - } + assert ( + children[starti]->interval().left== splitpoints[startj].left); + if (children[i]->interval().right < splitpoints[j].right) + { + i ++; + } + else if (children[i]->interval().right > splitpoints[j].right) + { + j ++; + } + else + { + + if (i == starti) + { + ch.push (children[i]); + } + else + { + Rhythmic_grouping *newchild=new Rhythmic_grouping ( + children.slice (starti, i+1)); + + ch.push (newchild); + } + i ++; + j++; + starti = i; + startj = j; + + + } } if (ch.size() != 1) - children = ch; - } + children = ch; +} Rhythmic_grouping::Rhythmic_grouping (MInterval t, int n) @@ -183,13 +183,13 @@ Rhythmic_grouping::Rhythmic_grouping (MInterval t, int n) init(); if (n == 1 || !n) { - interval_ = new MInterval (t); - return; + interval_ = new MInterval (t); + return; } Moment dt = t.length()/Rational (n); MInterval basic = MInterval (t.left, t.left+dt); for (int i= 0; i < n; i++) - children.push (new Rhythmic_grouping (dt*Rational (i) + basic)); + children.push (new Rhythmic_grouping (dt*Rational (i) + basic)); } @@ -209,7 +209,7 @@ Rhythmic_grouping::copy (Rhythmic_grouping const&s) { interval_ = (s.interval_)? new MInterval (*s.interval_) : 0; for (int i=0; i < s.children.size(); i++) - children.push (new Rhythmic_grouping (*s.children[i])); + children.push (new Rhythmic_grouping (*s.children[i])); } void @@ -230,7 +230,7 @@ Rhythmic_grouping::junk() { delete interval_; for (int i=0; i < children.size(); i++) - delete children[i]; + delete children[i]; init(); } @@ -240,10 +240,10 @@ Rhythmic_grouping::print() const #ifndef NPRINT DOUT << "{ \n"; if (interval_) - DOUT <<" Interval "<< interval_->str(); + DOUT <<" Interval "<< interval_->str(); for (int i=0; i < children.size(); i++) { - children[i]->print(); + children[i]->print(); } DOUT << "}\n"; #endif @@ -253,7 +253,7 @@ bool Rhythmic_grouping::child_fit_b (Moment start) { if (children.size()) - return (children.top()->interval ().right== start); + return (children.top()->interval ().right== start); return true; } @@ -277,7 +277,7 @@ min_elt (Array v) { int i = 1000; // ugh for (int j = 0 ; j < v.size(); j++) - i = i flags, int &flagidx) Array< Array > children_beams; for (int i=0; i < children.size(); i++) { - Array child_beams; - if (children[i]->interval_) - { - int f = flags[flagidx++]; - child_beams.push (f); - } - else - { - child_beams = children[i]-> - generate_beams (flags, flagidx); - } - children_beams.push (child_beams); + Array child_beams; + if (children[i]->interval_) + { + int f = flags[flagidx++]; + child_beams.push (f); + } + else + { + child_beams = children[i]-> + generate_beams (flags, flagidx); + } + children_beams.push (child_beams); } Array beams; int lastm, m, nextm; for (int i=0; i < children_beams.size(); i++) { - bool add_left = (i >0); - bool add_right = (i < children_beams.size() -1); + bool add_left = (i >0); + bool add_right = (i < children_beams.size() -1); - if (!i) - m = min_elt (children_beams[i]); - if (add_right) - nextm = min_elt (children_beams[i+1]); + if (!i) + m = min_elt (children_beams[i]); + if (add_right) + nextm = min_elt (children_beams[i+1]); - if (children_beams[i].size() == 1) - { - if (add_right) - beams.push (m); - if (add_left) - beams.push (m); - } - else - { - if (add_left) - beams.push (lastm translate (m); + for (int i=0; i < children.size(); i++) + children[i]->translate (m); } void @@ -352,13 +352,13 @@ Rhythmic_grouping::extend (MInterval m) const assert (m.left >= interval().left); while (m.right >interval().right) { - Array a (children); - for (int i=0; i < a.size(); i++) - { - a[i] =new Rhythmic_grouping (*children[i]); - a[i]->translate (children.top()->interval ().right); - } - ((Rhythmic_grouping*)this)->children.concat (a); + Array a (children); + for (int i=0; i < a.size(); i++) + { + a[i] =new Rhythmic_grouping (*children[i]); + a[i]->translate (children.top()->interval ().right); + } + ((Rhythmic_grouping*)this)->children.concat (a); } assert (m.right <= interval().right); OK(); @@ -373,11 +373,11 @@ parse_grouping (Array beat_i_arr, Array elt_length_arr) Array children; for (int i=0; i < beat_i_arr.size(); i++) { - Moment last = here; - here += elt_length_arr[i] * Moment (beat_i_arr[i]); - children.push ( - new Rhythmic_grouping (MInterval (last, here), - beat_i_arr[i])); + Moment last = here; + here += elt_length_arr[i] * Moment (beat_i_arr[i]); + children.push ( + new Rhythmic_grouping (MInterval (last, here), + beat_i_arr[i])); } return Rhythmic_grouping (children); } diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index d8b5b3bddc..34059b4447 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -165,7 +165,6 @@ struct Engraver; struct Rest; struct Rest_collision; struct Rest_collision_engraver; -struct Rest_column; struct Rest_req; struct Rhythmic_grouping; struct Rhythmic_head; diff --git a/lily/include/line-spacer.hh b/lily/include/line-spacer.hh index 053e59a902..d91901bdfe 100644 --- a/lily/include/line-spacer.hh +++ b/lily/include/line-spacer.hh @@ -25,47 +25,48 @@ class Line_spacer { public: - Paper_def * paper_l_; - Paper_def *paper_l() const; - Line_spacer(); + Paper_def * paper_l_; + Paper_def *paper_l() const; + Line_spacer(); - /** solve the spacing problem - */ - virtual void solve (Col_hpositions *) const=0; + /** solve the spacing problem + */ + virtual void solve (Col_hpositions *) const=0; - /** - Approximate the spacing problem: - return a lower bound on the energy - */ - virtual void lower_bound_solution (Col_hpositions *) const=0; + /** + Approximate the spacing problem: + return a lower bound on the energy + */ + virtual void lower_bound_solution (Col_hpositions *) const=0; - /** add a col to the problem. columns have to be added left to - right. The column contains info on it's minimum width. */ - virtual void add_column (Paper_column *, bool fixed=false, Real fixpos=0.0)=0; + /** add a col to the problem. columns have to be added left to + right. The column contains info on it's minimum width. */ + virtual void add_column (Paper_column *, bool fixed=false, Real fixpos=0.0)=0; - /** - can the posed problem be solved? + /** + can the posed problem be solved? - @pre + @pre - prepare() was called + prepare() was called - */ - virtual bool check_constraints (Vector v) const=0; + */ + virtual bool check_constraints (Vector v) const=0; - /** - generate a solution which can't fail - */ - virtual Vector default_solution() const=0; + /** + generate a solution which can't fail + */ + virtual Vector default_solution() const=0; - virtual void OK() const{} - virtual void print() const{} + virtual void OK() const{} + virtual void print() const{} - /** - Call after construction before solving - */ - virtual void prepare(){} + /** + Call after construction before solving + */ + virtual void prepare(){} + virtual ~Line_spacer (); }; #endif diff --git a/lily/include/stem.hh b/lily/include/stem.hh index 7ed9e4615e..3a034df85e 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -75,8 +75,7 @@ public: Stem (); /// ensure that this Stem also encompasses the Notehead #n# - void add (Note_head*n); - void add (Rest*); + void add (Rhythmic_head*n); DECLARE_MY_RUNTIME_TYPEINFO; diff --git a/lily/item.cc b/lily/item.cc index 40df46783f..21c96bc273 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -145,6 +145,8 @@ Item::do_junk_links() void Item::do_unlink() { + Link_array attached = attached_span_l_arr_; + for (int i=0; i < attached_span_l_arr_.size (); i++) { Spanner *&s= attached_span_l_arr_[i]; if (s->spanned_drul_[LEFT] == this) diff --git a/lily/lexer.l b/lily/lexer.l index fa82ddd563..453ababc7f 100644 --- a/lily/lexer.l +++ b/lily/lexer.l @@ -33,17 +33,17 @@ #include "parseconstruct.hh" #include "main.hh" #include "identifier.hh" -void strip_trailing_white(String&); -void strip_leading_white(String&); +void strip_trailing_white (String&); +void strip_leading_white (String&); #define start_quote() \ - yy_push_state(quote);\ + yy_push_state (quote);\ yylval.string = new String #define yylval (*(YYSTYPE*)lexval_l) -#define YY_USER_ACTION add_lexed_char(YYLeng()); +#define YY_USER_ACTION add_lexed_char (YYLeng ()); %} %option c++ @@ -93,7 +93,7 @@ LYRICS ({AA}|{NATIONAL})[^0-9 \t\n\f]* { "%{" { - yy_push_state(longcomment); + yy_push_state (longcomment); } %[^{\n].*\n { } @@ -115,84 +115,84 @@ LYRICS ({AA}|{NATIONAL})[^0-9 \t\n\f]* } "%"+"}" { - yy_pop_state(); + yy_pop_state (); } <> { - LexerError("EOF found inside a comment"); - if (! close_input()) - yyterminate(); // can't move this, since it actually rets a YY_NULL + LexerError ("EOF found inside a comment"); + if (! close_input ()) + yyterminate (); // can't move this, since it actually rets a YY_NULL } }
{ [\{\}] { - return YYText()[0]; + return YYText ()[0]; } ^{WORD} { - String s=YYText(); - yylval.string = new String(s); + String s=YYText (); + yylval.string = new String (s); return FIELDNAME; } {HORIZONTALWHITE}+{BLACK}.*\n { - String s=YYText(); - strip_leading_white(s); - strip_trailing_white(s); - yylval.string = new String(s); + String s=YYText (); + strip_leading_white (s); + strip_trailing_white (s); + yylval.string = new String (s); return RECORDLINE; } {WHITE}* { } . { - return YYText()[0]; + return YYText ()[0]; } } \\include { - yy_push_state(incl); + yy_push_state (incl); } \"[^"]*\" { /* got the include file name */ - String s (YYText()+1); - s = s.left_str(s.length_i()-1); + String s (YYText ()+1); + s = s.left_str (s.length_i ()-1); DOUT << "#include `" << s << "\'\n"; - new_input(s,source_l_g); - yy_pop_state(); + new_input (s,source_l_g); + yy_pop_state (); } \"[^"]* { // backup rule cerr << "missing end quote" << endl; - exit( 1 ); + exit (1); } {RESTNAME} { - const char *s = YYText(); + const char *s = YYText (); yylval.string = new String (s); DOUT << "rest:"<< yylval.string; return RESTNAME; } \\\${BLACK}*{WHITE} { - String s=YYText() + 2; - s=s.left_str(s.length_i() - 1); - return scan_escaped_word(s); + String s=YYText () + 2; + s=s.left_str (s.length_i () - 1); + return scan_escaped_word (s); } \${BLACK}*{WHITE} { - String s=YYText() + 1; - s=s.left_str(s.length_i() - 1); - return scan_bare_word(s); + String s=YYText () + 1; + s=s.left_str (s.length_i () - 1); + return scan_bare_word (s); } \\\${BLACK}* { // backup rule cerr << "white expected" << endl; - exit( 1 ); + exit (1); } \${BLACK}* { // backup rule cerr << "white expected" << endl; - exit( 1 ); + exit (1); } { {ALPHAWORD}/\' { post_quotes_b_ = true; - return scan_bare_word(YYText()); + return scan_bare_word (YYText ()); } \'+ { - yylval.i = YYLeng(); + yylval.i = YYLeng (); if (post_quotes_b_) { post_quotes_b_ = false; return POST_QUOTES; @@ -200,26 +200,26 @@ LYRICS ({AA}|{NATIONAL})[^0-9 \t\n\f]* return PRE_QUOTES; } {ALPHAWORD} { - return scan_bare_word(YYText()); + return scan_bare_word (YYText ()); } {NOTECOMMAND} { - return scan_escaped_word(YYText()+1); + return scan_escaped_word (YYText ()+1); } {INT} { - yylval.i = String_convert::dec2_i( String( YYText() ) ); + yylval.i = String_convert::dec2_i (String (YYText ())); return INT; } \" { - start_quote(); + start_quote (); } } \" { - start_quote(); + start_quote (); } { \\\\ { @@ -229,11 +229,11 @@ LYRICS ({AA}|{NATIONAL})[^0-9 \t\n\f]* *yylval.string +='\"'; } [^"]+ { - *yylval.string += YYText(); + *yylval.string += YYText (); } \" { DOUT << "quoted string: `" << *yylval.string << "'\n"; - yy_pop_state(); + yy_pop_state (); return STRING; } } @@ -241,79 +241,79 @@ LYRICS ({AA}|{NATIONAL})[^0-9 \t\n\f]* { \" { - start_quote(); + start_quote (); } {INT} { - yylval.i = String_convert::dec2_i( String( YYText() ) ); + yylval.i = String_convert::dec2_i (String (YYText ())); return INT; } {NOTECOMMAND} { - return scan_escaped_word(YYText()+1); + return scan_escaped_word (YYText ()+1); } {LYRICS} { /* ugr. This sux. */ - String s (YYText()); + String s (YYText ()); int i = 0; - while ((i=s.index_i("_")) != -1) // change word binding "_" to " " - *(s.ch_l() + i) = ' '; - if ((i=s.index_i("\\,")) != -1) // change "\," to TeX's "\c " + while ((i=s.index_i ("_")) != -1) // change word binding "_" to " " + *(s.ch_l () + i) = ' '; + if ((i=s.index_i ("\\,")) != -1) // change "\," to TeX's "\c " { - *(s.ch_l() + i + 1) = 'c'; - s = s.left_str(i+2) + " " + s.right_str(s.length_i()-i-2); + *(s.ch_l () + i + 1) = 'c'; + s = s.left_str (i+2) + " " + s.right_str (s.length_i ()-i-2); } - yylval.string = new String(s); + yylval.string = new String (s); DOUT << "lyric : `" << s << "'\n"; return STRING; } . { - return yylval.c = YYText()[0]; + return yylval.c = YYText ()[0]; } } <> { DOUT << "<>"; - if (! close_input()) { - yyterminate(); // can't move this, since it actually rets a YY_NULL + if (! close_input ()) { + yyterminate (); // can't move this, since it actually rets a YY_NULL } } {WORD} { - return scan_bare_word(YYText()); + return scan_bare_word (YYText ()); } {KEYWORD} { - return scan_escaped_word(YYText()+1); + return scan_escaped_word (YYText ()+1); } {REAL} { Real r; - int cnv=sscanf (YYText(), "%lf", &r); - assert(cnv == 1); + int cnv=sscanf (YYText (), "%lf", &r); + assert (cnv == 1); DOUT << "REAL" << r<<'\n'; yylval.real = r; return REAL; } {INT} { - yylval.i = String_convert::dec2_i( String( YYText() ) ); + yylval.i = String_convert::dec2_i (String (YYText ())); return INT; } [{}] { DOUT << "parens\n"; - return YYText()[0]; + return YYText ()[0]; } [*:=] { - char c = YYText()[0]; + char c = YYText ()[0]; DOUT << "misc char" <. { - return yylval.c = YYText()[0]; + return yylval.c = YYText ()[0]; } \\. { - char c= YYText()[1]; + char c= YYText ()[1]; yylval.c = c; switch (c) { case '>': @@ -328,65 +328,67 @@ LYRICS ({AA}|{NATIONAL})[^0-9 \t\n\f]* } <*>. { - LexerError( String( "illegal character: " ) +String( YYText()[0] )); - return YYText()[0]; + String msg= String ("illegal character: ") +String (YYText ()[0]); + LexerError (msg.ch_C ()); + return YYText ()[0]; } %% void -My_lily_lexer::push_note_state() +My_lily_lexer::push_note_state () { - yy_push_state(notes); + yy_push_state (notes); } void -My_lily_lexer::push_lyric_state() +My_lily_lexer::push_lyric_state () { - yy_push_state(lyrics); + yy_push_state (lyrics); } void -My_lily_lexer::pop_state() +My_lily_lexer::pop_state () { - yy_pop_state(); + yy_pop_state (); } int -My_lily_lexer::scan_escaped_word(String str) +My_lily_lexer::scan_escaped_word (String str) { DOUT << "\\word: `" << str<<"'\n"; - int l = lookup_keyword(str); + int l = lookup_keyword (str); if (l != -1) { DOUT << "(keyword)\n"; return l; } - Identifier * id = lookup_identifier(str); + Identifier * id = lookup_identifier (str); if (id) { DOUT << "(identifier)\n"; yylval.id = id; return id->token_code_i_; } - if ( YYSTATE != notes ) { - Melodic_req * mel_l = lookup_melodic_req_l(str); + if (YYSTATE != notes) { + Melodic_req * mel_l = lookup_melodic_req_l (str); if (mel_l) { DOUT << "(notename)\n"; yylval.melreq = mel_l; return NOTENAME_ID; } } - LexerError( "Unknown escaped string: `" + str + "'"); + String msg ("Unknown escaped string: `" + str + "'"); + LexerError (msg.ch_C ()); DOUT << "(string)"; - String *sp = new String( str); + String *sp = new String (str); yylval.string=sp; return STRING; } int -My_lily_lexer::scan_bare_word(String str) +My_lily_lexer::scan_bare_word (String str) { DOUT << "word: `" << str<< "'\n"; if (YYSTATE == notes){ - Melodic_req * mel_l = lookup_melodic_req_l(str); + Melodic_req * mel_l = lookup_melodic_req_l (str); if (mel_l) { DOUT << "(notename)\n"; yylval.melreq = mel_l; @@ -394,44 +396,44 @@ My_lily_lexer::scan_bare_word(String str) } } - yylval.string=new String( str ); + yylval.string=new String (str); return STRING; } bool -My_lily_lexer::note_state_b() const +My_lily_lexer::note_state_b () const { return YY_START == notes; } bool -My_lily_lexer::lyric_state_b() const +My_lily_lexer::lyric_state_b () const { return YY_START == lyrics; } void -My_lily_lexer::push_header_state() +My_lily_lexer::push_header_state () { - yy_push_state(header); + yy_push_state (header); } -void strip_trailing_white(String&s) +void strip_trailing_white (String&s) { int i=0; - for (; i < s.length_i(); i++) - if (!isspace(s[i])) + for (; i < s.length_i (); i++) + if (!isspace (s[i])) break; - s = s.nomid_str(0, i); + s = s.nomid_str (0, i); } -void strip_leading_white(String&s) +void strip_leading_white (String&s) { - int i=s.length_i(); + int i=s.length_i (); while (i--) - if (!isspace(s[i])) + if (!isspace (s[i])) break; - s = s.left_str(i+1); + s = s.left_str (i+1); } diff --git a/lily/line-spacer.cc b/lily/line-spacer.cc index c59589481a..6f9c317fd9 100644 --- a/lily/line-spacer.cc +++ b/lily/line-spacer.cc @@ -18,3 +18,7 @@ Line_spacer::paper_l() const { return paper_l_ ; } + +Line_spacer::~Line_spacer () +{ +} diff --git a/lily/main.cc b/lily/main.cc index efba1f0c29..4727f337d6 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -106,12 +106,12 @@ static File_path path; void do_one_file (String init_str, String file_str) { - if (init_str && "" == path.find (init_str)) + if (init_str.length_i () && path.find (init_str).empty_b ()) { error ("Can not find `" + init_str +"\'"); return ; } - if (file_str && !path.find (file_str)) + if (file_str.length_i () && path.find (file_str).empty_b ()) { error ("Can not find `" + file_str + "'"); return ; @@ -216,7 +216,7 @@ destill_inname (String &name_str_r) split_path (name_str_r,a,b,c,d); // add extension if not present. - if (!d) + if (d.empty_b ()) d = ".ly"; name_str_r = a+b+c+d; } diff --git a/lily/midi-stream.cc b/lily/midi-stream.cc index 874f367a42..05d9421388 100644 --- a/lily/midi-stream.cc +++ b/lily/midi-stream.cc @@ -62,7 +62,7 @@ Midi_stream::operator <<(int i) void Midi_stream::open() { - os_p_ = new ofstream (filename_str_); + os_p_ = new ofstream (filename_str_.ch_C ()); if (!*os_p_) error ("can't open `" + filename_str_ + "\'"); } diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 9c1f2c733e..9c79248914 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -135,7 +135,7 @@ Music_iterator::static_get_iterator_p (Music *m, else if (m->is_type_b (Change_translator::static_name ())) p = new Change_iterator((Change_translator*) m); - if (m -> translator_type_str_) + if (m -> translator_type_str_.length_i ()) { Translator_group* a =report_l-> find_create_translator_l (m-> translator_type_str_, m->translator_id_str_); diff --git a/lily/music.cc b/lily/music.cc index 053275cc1f..93a3f093b0 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -24,7 +24,7 @@ Music::print() const if (! check_debug) return ; DOUT << name() << "{"; - if (translator_type_str_) + if (translator_type_str_.length_i ()) DOUT << translator_type_str_ << " = " << translator_id_str_; do_print(); DOUT << "}\n"; diff --git a/lily/musical-request.cc b/lily/musical-request.cc index 5b69a4f581..4c6ce789de 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -451,7 +451,7 @@ String Absolute_dynamic_req::loudness_str () const { String s = loudness_static_str (loudness_); - if (!s) + if (s.empty_b ()) { s = "mf"; warning (String ("Never heard of dynamic scale ") diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 13a479956c..4c7f72e598 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -79,7 +79,7 @@ My_lily_lexer::My_lily_lexer() int My_lily_lexer::lookup_keyword (String s) { - return keytable_p_->lookup (s); + return keytable_p_->lookup (s.ch_C ()); } Identifier* diff --git a/lily/outputter.cc b/lily/outputter.cc index a533ea8e48..81ef2c793e 100644 --- a/lily/outputter.cc +++ b/lily/outputter.cc @@ -23,7 +23,7 @@ void Tex_outputter::output_molecule (Molecule const*m, Offset o) { String t = m->TeX_string(); - if (!t) + if (t.empty_b ()) return ; String s ("\\placebox{%}{%}{%}"); diff --git a/lily/p-score.cc b/lily/p-score.cc index 0591e5cc1e..39de484d98 100644 --- a/lily/p-score.cc +++ b/lily/p-score.cc @@ -190,7 +190,7 @@ Paper_score::tex_output () { // output String outname = paper_l_->outfile_str_ ; - if (!outname) + if (outname.empty_b ()) outname = default_out_str_+ ".tex"; *mlog << "TeX output to " << outname << " ...\n"; diff --git a/lily/parser.y b/lily/parser.y index 8a60f8b3ab..c9b1dd4949 100644 --- a/lily/parser.y +++ b/lily/parser.y @@ -573,6 +573,7 @@ Music: | Chord { $$ = $1; } | transposed_music { $$ = $1; } | MUSIC_IDENTIFIER { $$ = $1->music (); } + | MUSIC_IDENTIFIER ';' { $$ = $1->music (); } | MELODIC { THIS->lexer_p_->push_note_state (); } Music diff --git a/lily/performance.cc b/lily/performance.cc index 439e6c7190..ed74df07b4 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -114,7 +114,7 @@ Performance::process() print (); String out=midi_l_->outfile_str_; - if (!out) + if (out.empty_b ()) out = default_out_str_ + ".midi"; Midi_stream midi_stream (out); diff --git a/lily/property-iterator.cc b/lily/property-iterator.cc index 7fbab5fe9d..2a191dead8 100644 --- a/lily/property-iterator.cc +++ b/lily/property-iterator.cc @@ -18,7 +18,7 @@ Property_iterator::Property_iterator (Translation_property *prop_l) void Property_iterator::process_and_next (Moment m) { - if (property_l_->var_str_) + if (property_l_->var_str_.length_i ()) report_to_l ()->set_property (property_l_->var_str_, property_l_->value_); Music_iterator::process_and_next (m); } diff --git a/lily/scoreline.cc b/lily/scoreline.cc index f65690cafb..9a6438a5ed 100644 --- a/lily/scoreline.cc +++ b/lily/scoreline.cc @@ -126,6 +126,7 @@ Line_of_score::get_extra_dependencies () const void Line_of_score::do_unlink () { + Spanner::do_unlink (); for (int i=0; i < cols.size (); i++) cols[i]->line_l_ =0; cols.set_size (0); diff --git a/lily/span-bar.cc b/lily/span-bar.cc index d4bd26f0a9..6076dd7d86 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -68,9 +68,9 @@ Span_bar::do_pre_processing() } else { - if (!type_str_) + if (type_str_.empty_b ()) type_str_ = spanning_l_arr_[0]->type_str_; - if (!type_str_) + if (type_str_.empty_b ()) { transparent_b_=true; set_empty (true); diff --git a/lily/spanner.cc b/lily/spanner.cc index 3685865b8f..1dafeadf86 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -78,7 +78,6 @@ Spanner::set_my_columns() void Spanner::set_bounds(Direction d, Item*i) { - if (spanned_drul_[d]) spanned_drul_[d]->attached_span_l_arr_.substitute(this,0); @@ -164,16 +163,8 @@ Spanner::broken_b() const void Spanner::do_unlink() { - if (spanned_drul_[LEFT]) - { - spanned_drul_[LEFT]->attached_span_l_arr_.substitute (this,0); - spanned_drul_[LEFT] =0; - } - if (spanned_drul_[RIGHT]) - { - spanned_drul_[RIGHT]->attached_span_l_arr_.substitute (this,0); - spanned_drul_[RIGHT] = 0; - } + set_bounds (LEFT, 0); + set_bounds (RIGHT, 0); } void diff --git a/lily/stem-grav.cc b/lily/stem-grav.cc index c2114bf972..4cef2a9594 100644 --- a/lily/stem-grav.cc +++ b/lily/stem-grav.cc @@ -25,7 +25,7 @@ void Stem_engraver::do_creation_processing () { Scalar prop = get_property ("abbrev"); - if (prop && prop.isnum ()) + if (prop.isnum_b ()) { default_abbrev_i_ = prop; } @@ -34,9 +34,9 @@ Stem_engraver::do_creation_processing () void Stem_engraver::acknowledge_element(Score_elem_info i) { - if (i.elem_l_->is_type_b (Note_head::static_name())) + if (i.elem_l_->is_type_b (Rhythmic_head::static_name())) { - Note_head *h = (Note_head*) i.elem_l_->item(); + Rhythmic_head *h = (Rhythmic_head*) i.elem_l_->item(); if (!stem_p_) { Rhythmic_req * r = i.req_l_->musical()->rhythmic(); @@ -52,7 +52,7 @@ Stem_engraver::acknowledge_element(Score_elem_info i) t = default_abbrev_i_; else default_abbrev_i_ = t; - stem_p_->abbrev_flag_i_ = intlog2 (t) - (durlog_i>? 2); + stem_p_->abbrev_flag_i_ =intlog2 (t) - (durlog_i>? 2); } announce_element (Score_elem_info (stem_p_, r)); } @@ -65,7 +65,8 @@ Stem_engraver::do_pre_move_processing() { if (stem_p_) { - dir_ = (Direction) int(get_property ("ydirection")); + Scalar prop = get_property ("ydirection"); + dir_ = prop.isnum_b () ? int(prop) : CENTER; if (dir_) stem_p_->dir_ = dir_; diff --git a/lily/stem.cc b/lily/stem.cc index a2aa5c55c4..6ddb44f685 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -110,17 +110,17 @@ Stem::type_i () const } void -Stem::add (Note_head *n) +Stem::add (Rhythmic_head *n) { - n->add_dependency (this); - head_l_arr_.push (n); -} - -void -Stem::add (Rest *r) -{ - rest_l_arr_.push (r); - r->add_dependency (this); // ? + n->add_dependency (this); // ? + if (n->is_type_b (Note_head::static_name ())) + { + head_l_arr_.push ((Note_head*)n); + } + else if (n->is_type_b (Rest::static_name ())) + { + rest_l_arr_.push ((Rest*)n); + } } bool @@ -210,7 +210,7 @@ Stem::set_default_extents () if (dir_ == UP) stem_xdir_ = RIGHT; - if (head_l_arr_[0]->balltype_i_ <= 0) + if (invisible_b ()) stem_xdir_ = CENTER; } @@ -373,7 +373,9 @@ Stem::hpos_f () const return note_delta_f () +Item::hpos_f (); } - +/* +TODO: head_l_arr_/rest_l_arr_ in do_substitute_dependent () + */ void Stem::do_substitute_dependency (Score_elem*o,Score_elem*n) { diff --git a/lily/tex-stream.cc b/lily/tex-stream.cc index a9d826c3c7..eed823e575 100644 --- a/lily/tex-stream.cc +++ b/lily/tex-stream.cc @@ -24,7 +24,7 @@ const int MAXLINELEN = 200; Tex_stream::Tex_stream (String filename) { - os = new ofstream (filename); + os = new ofstream (filename.ch_C ()); if (!*os) error ("can't open `" + filename+"\'"); nest_level = 0; @@ -51,7 +51,7 @@ Tex_stream & Tex_stream::operator<<(String s) { - for (char const *cp = s; *cp; cp++) + for (char const *cp = s.ch_C (); *cp; cp++) { if (outputting_comment) { diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index c282d0c608..8bb57faf35 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -73,7 +73,7 @@ Timing_translator::do_process_requests() { Moment m = tr_l->partial()->duration_; String error = time_.try_set_partial_str (m); - if (error) + if (error.length_i ()) { tr_l->warning (error); } diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 29bd652ded..1521ede70d 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -66,7 +66,7 @@ Translator_group::removable_b() const Translator_group * Translator_group::find_existing_translator_l (String n, String id) { - if (is_alias_b (n) && (id_str_ == id || !id)) + if (is_alias_b (n) && (id_str_ == id || id.empty_b ())) return this; Translator_group* r = 0; for (int i =0; !r && i < group_l_arr ().size(); i++) @@ -290,7 +290,7 @@ Translator_group::do_print() const } else { - if (id_str_) + if (id_str_.length_i ()) DOUT << "ID: " << id_str_ ; DOUT << " iterators: " << iterator_count_<< "\n"; } diff --git a/make/lilypond.lsm b/make/lilypond.lsm index 4d819522c0..db9a106acb 100644 --- a/make/lilypond.lsm +++ b/make/lilypond.lsm @@ -1,7 +1,7 @@ Begin3 Title: LilyPond -Version: 0.1.15 -Entered-date: 17SEP97 +Version: 0.1.16 +Entered-date: 18SEP97 Description: LilyPond is the GNU Project music typesetter. This program converts music definition files into visual or auditive output: it can typeset formatted @@ -14,8 +14,8 @@ Author: hanwen@stack.nl (Han-Wen Nienhuys) jan@digicash.com (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps - 395k lilypond-0.1.15.tar.gz + 395k lilypond-0.1.16.tar.gz Original-site: pcnov095.win.tue.nl /pub/lilypond/ - 395k lilypond-0.1.15.tar.gz + 395k lilypond-0.1.16.tar.gz Copying-policy: GPL End diff --git a/make/lilypond.spec b/make/lilypond.spec index f848370fdf..cde899ab22 100644 --- a/make/lilypond.spec +++ b/make/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 0.1.15 +Version: 0.1.16 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.15.tar.gz +Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.16.tar.gz Summary: A preprocessor to make TeX typeset music. URL: http://www.stack.nl/~hanwen/lilypond Packager: Han-Wen Nienhuys diff --git a/mf/Makefile b/mf/Makefile index 6bca9f001f..f3523f04c1 100644 --- a/mf/Makefile +++ b/mf/Makefile @@ -15,23 +15,6 @@ MFFILES = $(wildcard *.mf) EXTRA_DISTFILES = $(MFFILES) $(TEXFILES) TODO # -FONT_FILES = $(wildcard *[0-9].mf) -TABLES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.ly)) -# - -all: $(TABLES) - -localclean: - rm -f $(TABLES) - -$(outdir)/%.log: %.mf - mf $< - mv $(@F) $@ - rm $(shell basename $< .mf).*gf - -$(outdir)/%.ly: $(outdir)/%.log - mf-to-table -o $@ $< - localinstall: $(INSTALL) -d $(MFDIR)/lilypond $(INSTALL) -m 644 $(MFFILES) $(MFDIR)/lilypond/ diff --git a/mf/TODO b/mf/TODO index d826325920..53d83a7a87 100644 --- a/mf/TODO +++ b/mf/TODO @@ -1,3 +1,4 @@ + - add r to dynfont - move to OpusTeX fonts - make own font-en-tja{10,11,13,16,20} files diff --git a/mf/autometric.mf b/mf/autometric.mf index 4bdf68cf94..ae9a8edc85 100644 --- a/mf/autometric.mf +++ b/mf/autometric.mf @@ -1,30 +1,13 @@ -% autometric.mf +% metric.mf % part of LilyPond's pretty-but-neat music font -% font or database? def fet_beginfont(expr name,size) = message "@@font:"&name&":"&decimal size&"@@"; message ""; enddef; - -def fet_endfont(expr name) = - message "@@tnof:"&name&"@@"; - message ""; - enddef; - -% group or table? -def fet_begingroup(expr name) = - message "@@group:"&name&"@@"; - message ""; - enddef; - -def fet_endgroup(expr name) = - message "@@puorg:"&name&"@@"; - message ""; - enddef; -def fet_beginchar(expr code,w,h,d,name,id,texstr) = - message "@@char:"&name&":"&decimal code&":"&decimal w&":"&decimal h&":"&decimal d&":"&id&":"&texstr&"@@"; +def fet_beginchar(expr code,w,h,d,name) = + message "@@char:"&name&":"&decimal code&":"&decimal w&":"&decimal h&":"&decimal d&"@@"; beginchar(code,w,h,d) name; enddef; diff --git a/mf/bolletjes.mf b/mf/bolletjes.mf index c5b32625e2..849c9f9b6f 100644 --- a/mf/bolletjes.mf +++ b/mf/bolletjes.mf @@ -31,7 +31,7 @@ def begin_notehead = save b_h,a_w; enddef; -def end_notehead(expr code,interline,name,id,texstr) = +def end_notehead(expr code,interline,name) = save a,b,h,w,ai,bi; h#=interline; 2b#=h#*b_h; @@ -42,7 +42,7 @@ def end_notehead(expr code,interline,name,id,texstr) = define_pixels(a,b); define_pixels(w,h); define_pixels(ai,bi); - fet_beginchar(code,w#,h#,0,name,id,texstr); + fet_beginchar(code,w#,h#,0,name); path black,white; black=distorted_ellipse(a,b,a*err_y_a,0,super); white=distorted_ellipse(ai,bi,ai*err_y_ai,bi*err_x_bi,superi); @@ -65,8 +65,6 @@ fi endgroup; enddef; -% fet_begingroup("noteheads"); -fet_begingroup("balls"); % whole note % Wanske, p.38 % begin_notehead(incr code,interline#,"Whole notehead"); @@ -85,7 +83,7 @@ begin_notehead; superi:=0.69; b_h:=1; %no rotate-> no height correction a_w:=1; % no rotate-> no width correction - end_notehead(incr code,interline#,"Whole notehead","0","wholeball"); + end_notehead(incr code,interline#,"Whole notehead"); % half note % Wanske, p.39 @@ -103,7 +101,7 @@ begin_notehead; superi:=0.80; b_h:=0.935; a_w:=1.12; - end_notehead(incr code,interline#,"Half notehead","1","halfball"); + end_notehead(incr code,interline#,"Half notehead"); % quarter note % Wanske p.38 @@ -121,13 +119,7 @@ begin_notehead; superi:=0.707; b_h:=0.85; a_w:=1.09; - end_notehead(incr code,interline#,"Quarter notehead","2","quartball"); + end_notehead(incr code,interline#,"Quarter notehead"); -% silly tableXX.ly fillers, for now -fet_beginchar(incr code,2interline#,interline#,0,"Longa notehead","-2","longaball"); -endchar; -fet_beginchar(incr code,2interline#,interline#,0,"Brevis notehead","-1","breveball"); -endchar; - -fet_endgroup("noteheads"); +end. diff --git a/mf/dyn10.mf b/mf/dyn10.mf index 8ff51a1813..64ea7c7af2 100644 --- a/mf/dyn10.mf +++ b/mf/dyn10.mf @@ -112,9 +112,6 @@ flare#:=52/36pt#; % diameter of bulbs or breadth of terminals mode_setup; font_setup; -input autometric; -fet_beginfont("dyn", 10); - num=-1; input ital-f; @@ -152,6 +149,4 @@ input ital-s; input ital-z; font_slant slant; font_x_height x_height#; - -fet_endfont("dyn"); -end. +bye. diff --git a/mf/font-en-tja16.mf b/mf/font-en-tja16.mf index 5fc5cd8bfd..9531e570e0 100644 --- a/mf/font-en-tja16.mf +++ b/mf/font-en-tja16.mf @@ -3,6 +3,7 @@ mode_setup; + test:=0; staffsize#:=16pt#; @@ -11,11 +12,10 @@ stafflinethickness#:=0.4pt#; code:=-1; input autometric; +% fet_beginfont; fet_beginfont("font-en-tja", 16); input bolletjes; -fet_endfont("font-en-tja"); - end. diff --git a/mf/font-en-tja20.mf b/mf/font-en-tja20.mf index c5f7b39e5d..79c33835db 100644 --- a/mf/font-en-tja20.mf +++ b/mf/font-en-tja20.mf @@ -16,7 +16,5 @@ fet_beginfont("font-en-tja", 20); input bolletjes; -fet_endfont("font-en-tja"); - end. diff --git a/mi2mu/mudela-stream.cc b/mi2mu/mudela-stream.cc index 8ec278983e..447daf98e1 100644 --- a/mi2mu/mudela-stream.cc +++ b/mi2mu/mudela-stream.cc @@ -33,7 +33,7 @@ Mudela_stream::~Mudela_stream() { delete os_p_; if (indent_i_) - warning ("lily indent level: " + String (indent_i_)); + warning ("lily indent level: " + String (indent_i_)); } Mudela_stream& @@ -42,12 +42,12 @@ Mudela_stream::operator << (String str) static String word_sep_str = "{} \t\n"; while (str.length_i()) { - int i = str.index_any_i (word_sep_str) + 1; - if (!i) - i = str.length_i(); - String word = str.left_str (i); - str = str.mid_str (i, str.length_i()); - output_wrapped (word); + int i = str.index_any_i (word_sep_str) + 1; + if (!i) + i = str.length_i(); + String word = str.left_str (i); + str = str.mid_str (i, str.length_i()); + output_wrapped (word); } return *this; } @@ -87,9 +87,9 @@ Mudela_stream::header() void Mudela_stream::open() { - os_p_ = new ofstream (filename_str_); + os_p_ = new ofstream (filename_str_.ch_C ()); if (!*os_p_) - error ("can't open: `" + filename_str_ + "\'"); + error ("can't open: `" + filename_str_ + "\'"); } void @@ -97,50 +97,50 @@ Mudela_stream::output (String str) { for (int i = 0; i < str.length_i(); i++) { - char c = str[ i ]; - switch (c) - { - case '{' : - case '<' : - handle_pending_indent(); - if (column_i_ == indent_i_ * INDENT_i) - output ("\t"); - indent_i_++; - *os_p_ << c; - column_i_++; - break; - case '}' : - case '>' : - assert (indent_i_); - indent_i_--; - if (pending_indent_i_) - pending_indent_i_--; - handle_pending_indent(); - *os_p_ << c; - column_i_++; - break; - case '%' : - handle_pending_indent(); - comment_mode_b_ = true; - *os_p_ << c; - column_i_++; - break; - case '\t' : - handle_pending_indent(); - *os_p_ << c; - column_i_ += INDENT_i; - break; - case '\n' : - *os_p_ << endl; - pending_indent_i_ = indent_i_; - column_i_ = 0; - comment_mode_b_ = false; - break; - default : - handle_pending_indent(); - *os_p_ << c; - column_i_++; - break; + char c = str[ i ]; + switch (c) + { + case '{' : + case '<' : + handle_pending_indent(); + if (column_i_ == indent_i_ * INDENT_i) + output ("\t"); + indent_i_++; + *os_p_ << c; + column_i_++; + break; + case '}' : + case '>' : + assert (indent_i_); + indent_i_--; + if (pending_indent_i_) + pending_indent_i_--; + handle_pending_indent(); + *os_p_ << c; + column_i_++; + break; + case '%' : + handle_pending_indent(); + comment_mode_b_ = true; + *os_p_ << c; + column_i_++; + break; + case '\t' : + handle_pending_indent(); + *os_p_ << c; + column_i_ += INDENT_i; + break; + case '\n' : + *os_p_ << endl; + pending_indent_i_ = indent_i_; + column_i_ = 0; + comment_mode_b_ = false; + break; + default : + handle_pending_indent(); + *os_p_ << c; + column_i_++; + break; } } } @@ -151,23 +151,23 @@ Mudela_stream::output_wrapped (String str) // enough room left -> doit if (column_i_ + str.length_i() <= wrap_column_i_) { - output (str); - return; + output (str); + return; } // we're at BOL already; this will never fit -> doit if (column_i_ == indent_i_ * INDENT_i) { - output (str); - return; + output (str); + return; } // ok, let's wrap // preserve comment mode if (comment_mode_b_) - output (String ("\n%")); + output (String ("\n%")); else - output (String ("\n")); + output (String ("\n")); output (str); } diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex index f7b9191e5f..1094443b96 100644 --- a/tex/lilyponddefs.tex +++ b/tex/lilyponddefs.tex @@ -81,6 +81,7 @@ } \def\textsharp{\raise.4ex\hbox{\textmusic\char"5D}} +\def\textnatural{\raise.4ex\hbox{\textmusic\char"5C}} \def\textflat{\raise.2ex\hbox{\mus\char"5B}} diff --git a/tex/taupindefs.tex b/tex/taupindefs.tex index 0469356a63..769d2a4880 100644 --- a/tex/taupindefs.tex +++ b/tex/taupindefs.tex @@ -14,7 +14,7 @@ \font\italicfont=cmti10 \font\dynfont=dyn10 scaled \magstep2 \font\musicmathfont=cmsy10 - \font\fontentja=font-en-tja20 + \font\fontentja=font-en-tja20 } @@ -33,7 +33,7 @@ \font\dynfont=dyn10 scaled \magstep1 \font\musicdraw=musixsps \font\musicmathfont=cmsy8 - \font\fontentja=font-en-tja16 + \font\fontentja=font-en-tja16 } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % provide interface to musixtex fonts @@ -52,9 +52,8 @@ \musicdef\longaball{'047} \musicdef\halfrest{'074} \musicdef\wholerest{'075} - \musicdef\breverest{'072} -\musicdef\breverest{'073} %% <- Mats, is this cool? +\musicdef\longarest{'073} %% hmm \musicdef\outsidehalfrest{10} -- 2.39.5