]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.1.18 release/1.1.18
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 4 Jan 1999 09:25:45 +0000 (10:25 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 4 Jan 1999 09:25:45 +0000 (10:25 +0100)
213 files changed:
BUGS
Documentation/README-W32.yo
Documentation/man/out/ly2dvi.1
Documentation/ntweb/index.yo
INSTALL.txt
NEWS
README.txt
TODO
VERSION
aclocal.m4
configure
flower/dictionary.cc [deleted file]
flower/dstream.cc
flower/file-path.cc
flower/hash.cc
flower/include/assoc-iter.hh [deleted file]
flower/include/assoc.hh [deleted file]
flower/include/dictionary-iter.hh
flower/include/dictionary.hh
flower/include/dstream.hh
flower/include/fproto.hh
flower/include/parray.hh
init/engraver.ly
init/property.ly
init/table11.ly
init/table13.ly
init/table16.ly
init/table20.ly
init/table26.ly
input/test/chords.ly
input/test/spacing-2.ly [new file with mode: 0644]
lily/abbrev.cc
lily/abbreviation-beam.cc
lily/afm-list.cc [new file with mode: 0644]
lily/afm-reader.cc
lily/afm.cc
lily/atom.cc
lily/bar-column-engraver.cc
lily/bar-engraver.cc
lily/bar-number-engraver.cc
lily/bar.cc
lily/beam-engraver.cc
lily/beam.cc
lily/bow.cc
lily/cbeam-engraver.cc [deleted file]
lily/chord-name-engraver.cc
lily/clef-engraver.cc
lily/clef-item.cc
lily/col-info.cc
lily/command-request.cc
lily/crescendo.cc
lily/ctie-engraver.cc [deleted file]
lily/dimension-cache.cc [new file with mode: 0644]
lily/directional-spanner.cc
lily/dot-column.cc
lily/dots.cc
lily/dynamic-engraver.cc
lily/encompass-info.cc
lily/extender-spanner.cc
lily/font-size-engraver.cc
lily/g-staff-side.cc [new file with mode: 0644]
lily/g-text-item.cc [new file with mode: 0644]
lily/graphical-axis-group.cc
lily/graphical-element.cc
lily/horizontal-group-item.cc
lily/horizontal-vertical-group-element.cc
lily/horizontal-vertical-group-item.cc
lily/include/abbrev.hh
lily/include/abbreviation-beam.hh
lily/include/afm.hh
lily/include/all-fonts.hh [new file with mode: 0644]
lily/include/bar.hh
lily/include/beam-engraver.hh
lily/include/beam.hh
lily/include/bow.hh
lily/include/break-caching.hh [deleted file]
lily/include/cbeam-engraver.hh [deleted file]
lily/include/chord-name-engraver.hh
lily/include/clef-item.hh
lily/include/command-request.hh
lily/include/crescendo.hh
lily/include/ctie-engraver.hh [deleted file]
lily/include/dimension-cache.hh [new file with mode: 0644]
lily/include/dots.hh
lily/include/dynamic-engraver.hh
lily/include/extender-spanner.hh
lily/include/g-staff-side.hh [new file with mode: 0644]
lily/include/g-text-item.hh [new file with mode: 0644]
lily/include/graphical-axis-group.hh
lily/include/graphical-element.hh
lily/include/ineq-constrained-qp.hh
lily/include/key-item.hh
lily/include/lily-proto.hh
lily/include/linear-programming.hh [deleted file]
lily/include/local-key-item.hh
lily/include/lookup.hh
lily/include/lyric-engraver.hh
lily/include/main.hh
lily/include/multi-measure-rest.hh
lily/include/music-list-iterator.hh
lily/include/musical-request.hh
lily/include/note-column.hh
lily/include/note-head.hh
lily/include/paper-def.hh
lily/include/plet-swallow-engraver.hh [deleted file]
lily/include/qlpsolve.hh
lily/include/request.hh
lily/include/rest.hh
lily/include/score-element.hh
lily/include/score-priority-engraver.hh
lily/include/script.hh
lily/include/sequential-music-iterator.hh
lily/include/simultaneous-music-iterator.hh
lily/include/span-bar.hh
lily/include/spanner.hh
lily/include/staff-sym.hh
lily/include/stem-engraver.hh
lily/include/stem.hh
lily/include/symtable.hh
lily/include/text-item.hh
lily/include/text-spanner.hh
lily/include/tie-engraver.hh [new file with mode: 0644]
lily/include/ties-engraver.hh [deleted file]
lily/include/time-signature.hh
lily/include/translator.hh
lily/include/tuplet-spanner.hh
lily/include/volta-spanner.hh
lily/ineq-constrained-qp.cc
lily/item.cc
lily/key-engraver.cc
lily/key-item.cc
lily/line-group-group-engraver.cc
lily/line-of-score.cc
lily/linear-programming.cc [deleted file]
lily/local-key-item.cc
lily/lookup.cc
lily/lyric-engraver.cc
lily/main.cc
lily/mark-engraver.cc
lily/midi-def.cc
lily/misc.cc
lily/multi-measure-rest.cc
lily/music-list-iterator.cc
lily/musical-request.cc
lily/my-lily-lexer.cc
lily/note-column.cc
lily/note-head.cc
lily/note-performer.cc
lily/p-score.cc
lily/paper-def.cc
lily/paper-outputter.cc
lily/parser.yy
lily/plet-engraver.cc [deleted file]
lily/plet-swallow-engraver.cc [deleted file]
lily/repeat-engraver.cc
lily/rest.cc
lily/rhythmic-column-engraver.cc
lily/rhythmic-head.cc
lily/score-element.cc
lily/score-engraver.cc
lily/score-priority-engraver.cc
lily/script-engraver.cc
lily/script.cc
lily/separating-line-group-engraver.cc
lily/sequential-music-iterator.cc
lily/simultaneous-music-iterator.cc
lily/single-malt-grouping-item.cc
lily/slur-engraver.cc
lily/slur.cc
lily/span-bar-engraver.cc
lily/span-bar.cc
lily/spanner.cc
lily/spring-spacer.cc
lily/staff-margin-engraver.cc
lily/staff-performer.cc
lily/staff-side.cc
lily/staff-sym-engraver.cc
lily/staff-sym.cc
lily/stem-engraver.cc
lily/stem.cc
lily/super-element.cc
lily/symtable.cc
lily/template4.cc
lily/template8.cc
lily/text-engraver.cc [new file with mode: 0644]
lily/text-item.cc
lily/text-spanner.cc
lily/tie-engraver.cc [new file with mode: 0644]
lily/tie.cc
lily/ties-engraver.cc [deleted file]
lily/time-signature-engraver.cc
lily/time-signature.cc
lily/timing-translator.cc
lily/translator.cc
lily/tuplet-spanner.cc
lily/vertical-align-engraver.cc
lily/vertical-group-spanner.cc
lily/volta-spanner.cc
make/out/lelievijver.lsm
make/out/lilypond.lsm
make/out/lilypond.spec
mf/cmbase.mf [new file with mode: 0644]
mi2mu/mudela-item.cc
mi2mu/mudela-staff.cc
mutopia/D.Scarlatti/GNUmakefile [new file with mode: 0644]
mutopia/GNUmakefile
mutopia/J.S.Bach/wtk1-fugue1.ly
mutopia/J.S.Bach/wtk1-fugue2.ly
scm/lily.scm
scripts/ly2dvi.py
stepmake/aclocal.m4
stepmake/bin/package-zip32.sh
stepmake/stepmake/generic-targets.make

diff --git a/BUGS b/BUGS
index 1651e800d6de2645b96bb1c12d9c065dc7031491..76d8f8e1a038dd627127ea6a0b3323260dcc279b 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -3,12 +3,6 @@ This documents serious bugs
 
 ********
 
 
 ********
 
-[Linux Intel, EGCS-1.1b]
-
-Compiling with -O2 -finline-functions will cause crashes during
-parsing stage.
-
-
 [Linux ppc, egcs-1.0.2]
 
 All compiling with -O2 is suspect, in particular guile-1.3, and
 [Linux ppc, egcs-1.0.2]
 
 All compiling with -O2 is suspect, in particular guile-1.3, and
index 579642fc231232d6ed412032e46282f28c51ae6c..41b0412403dfe0db0e5cad0c0e0624ae7e878758 100644 (file)
@@ -145,17 +145,17 @@ lurl(http://www.cygnus.com/misc/gnu-win32/)
 
 Please follow the documentation Cygnus has on there web site for
 downloading and installing.  The important part is that you down load
 
 Please follow the documentation Cygnus has on there web site for
 downloading and installing.  The important part is that you down load
-the entire development kit.  I believe it is file(cdk.exe).  The
+the entire development kit.  I believe it is file(full.exe).  The
 installation will ask you where you want to install it.  I will refer
 installation will ask you where you want to install it.  I will refer
-to Cygnus installation directory as file(/gnuwin32/b19).  There should be a
-file(README) file that contains installation instructions.  After the
-installation is complete you should have a em(Cygnus) shortcut in your
-em(Program) section of your em(Start Menu).  This shortcut is your
-door to the tt(UNIX) world and I will refer to the resulting window
-as a file(bash) shell.
+to Cygnus installation directory as file(/gnuwin32/cygwin-b20).  There
+should be a file(README) file that contains installation instructions.
+After the installation is complete you should have a em(Cygnus)
+shortcut in your em(Program) section of your em(Start Menu).  This
+shortcut is your door to the tt(UNIX) world and I will refer to the
+resulting window as a file(bash) shell.
 
 
-The shortcut points to file(/gnuwin32/b19/cygnus.bat).  The following
-is my file(cygnus.bat) file.  
+The shortcut points to file(/gnuwin32/cygwin-b20/cygnus.bat).  The
+following is my file(cygnus.bat) file.
 
 verb(
 @ECHO OFF
 
 verb(
 @ECHO OFF
@@ -167,26 +167,26 @@ SET CYGREL=B19.1
 SET MAKE_MODE=unix
 SET LOCAL_ROOT=d:\gnuwin32
 SET LOCAL_FS=d:/gnuwin32
 SET MAKE_MODE=unix
 SET LOCAL_ROOT=d:\gnuwin32
 SET LOCAL_FS=d:/gnuwin32
-SET LOCAL_DIR=/gnuwin32
-SET CYGROOT=%LOCAL_ROOT%\b19
-SET CYGFS=%LOCAL_FS%/b19
-SET GCC_EXEC_PREFIX=%CYGROOT%\H-i386-cygwin32\lib\gcc-lib\
+SET LOCAL_DIR=d:/gnuwin32/cygwin-b20
+SET CYGROOT=%LOCAL_ROOT%\cygwin-b20
+SET CYGFS=%LOCAL_FS%/cygwin-b20
 SET TCL_LIBRARY=%CYGROOT%\share\tcl8.0\
 SET TCL_LIBRARY=%CYGROOT%\share\tcl8.0\
-SET GDBTK_LIBRARY=%CYGFS%/share/gdbtcl
 
 
+rem
 rem This was not in the original but is needed by lots of packages
 rem This was not in the original but is needed by lots of packages
+rem
 SET BISON_SIMPLE=%CYGFS%/share/bison.simple
 
 SET BISON_SIMPLE=%CYGFS%/share/bison.simple
 
+rem
 rem I place the cygnus stuff in front of /WINNT 
 rem I place the cygnus stuff in front of /WINNT 
-SET PATH=d:\bin;%CYGROOT%\H-i386-cygwin32\bin;%PATH%
-SET MANPATH=%LOCAL_ROOT%\man;%LOCAL_ROOT%\b19\man;%LOCAL_ROOT%\b19\cdk-man\man;%LOCAL_ROOT%\a2ps-4.10\man
-SET INFOPATH=%LOCAL_FS%/b19/cdk-man/info;%LOCAL_FS%/b19/info;%LOCAL_DIR%/info
-SET PATH=%PATH%;%LOCAL_ROOT%\bin
+rem
 
 
+SET PATH=d:\bin;%LOCAL_ROOT%\bin;%CYGROOT%\H-i586-cygwin32\bin;%PATH%
+SET MANPATH=%LOCAL_ROOT%\man;%LOCAL_ROOT%\cygwin-b20\full-man\man
+SET INFOPATH=%LOCAL_FS%/cygwin-b20/full-man/info;%LOCAL_FS%/cygwin-b20/info;%LOCAL_DIR%/info
 
 rem General tools not included with Cygnus Development Kit
 
 
 rem General tools not included with Cygnus Development Kit
 
-
 rem CVS
 
 SET PATH=%PATH%;%LOCAL_ROOT%\cvs-1.9.28\bin
 rem CVS
 
 SET PATH=%PATH%;%LOCAL_ROOT%\cvs-1.9.28\bin
@@ -238,31 +238,21 @@ that the generic file(cygnus.bat) you will be looking at does not
 include alot of the packages listed.  We will be installing some of
 these.
 
 include alot of the packages listed.  We will be installing some of
 these.
 
-There is also some discussion of how you want to em(mount) the Cygnus
-development kit.  em(mount) is a tt(UNIX) term that refers to the
-mechanism used to provide a disk resource to the filesystem.  Cygnus
-supplies a mechinism for em(mounting) a filesystem as a tt(DOS) like
-resource or a tt(UNIX) like resource.  Among other things this
-attempts to deal with the text file carriage return line feed on
-tt(DOS) versus the line feed on tt(UNIX) and the issue that tt(DOS)
-has two file types, text and binary.  Where tt(UNIX) deals with a
-single streams type.  I have used the default out of the box
-configuration with no problems.  We will however later discuss
-mounting a directory as a binary resource ref(binary).
 
 The installation also suggests that you create a directory file(/bin)
 
 The installation also suggests that you create a directory file(/bin)
-and copy file(/gnuwin32/b19/H-i386-cygwin32/bin/sh.exe) to file(/bin).
-The file(sh.exe) shell provided by Cygnus is a descendant of the
-file(ash) shell and I have found that some of the tt(GNU) products
-configure/installations work better with the file(bash) shell.  So
-this is my recommendation for post installation steps.  From a
+and copy file(/gnuwin32/cygwin-b20/H-i586-cygwin32/bin/sh.exe) to
+file(/bin).  The file(sh.exe) shell provided by Cygnus is a descendant
+of the file(ash) shell.  The file(sh.exe) shell has improved greatly
+and is much faster than the file(bash) shell for script invocations.
+So this is my recommendation for post installation steps.  From a
 file(bash) shell:
 
 itemize(
 it()code(cd /)
 it()code(mkdir bin)
 it()code(cd /bin)
 file(bash) shell:
 
 itemize(
 it()code(cd /)
 it()code(mkdir bin)
 it()code(cd /bin)
-it()code(cp /gnuwin32/b19/H-i386-cygwin32/bin/bash.exe sh.exe)
+it()code(cp /gnuwin32/cygwin-b20/H-i586-cygwin32/bin/sh.exe sh.exe)
+it()code(cp /gnuwin32/cygwin-b20/H-i586-cygwin32/bin/bash.exe bash.exe)
 it()code(cd /)
 it()code(mkdir /tmp)
 it()code(chmod a+rwx tmp)
 it()code(cd /)
 it()code(mkdir /tmp)
 it()code(chmod a+rwx tmp)
@@ -272,42 +262,33 @@ it()code(mkpasswd -l > passwd)
 it()code(mkgroup -l > group)
 )
 
 it()code(mkgroup -l > group)
 )
 
-subsubsect(Ecgs Compiler, assembler, and linker)
-lurl(http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs.html)
-
-
-Cygnus recommends using the ecgs compiler.  I do too.  Follow the
-instructions from the above site to install ecgs compiler/linker and
-the gas assembler.  We have attempted to compile lilypond with the
-Cygnus default compiler/linker with poor results.  So for lilypond
-anyway this step is a requirement.
+subsubsubsect(Binary Mounts) label(binary)
 
 
-I took the following steps to download and install the ecgs suite.
-Keep in mind that it is better to follow the instructions from the
-indicated website.
+There is also some discussion of how you want to em(mount) the Cygnus
+development kit.  em(mount) is a tt(UNIX) term that refers to the
+mechanism used to provide a disk resource to the filesystem.  Cygnus
+supplies a mechinism for em(mounting) a filesystem as a tt(DOS) like
+resource or a tt(UNIX) like resource.  Among other things this
+attempts to deal with the text file carriage return line feed on
+tt(DOS) versus the line feed on tt(UNIX) and the issue that tt(DOS)
+has two file types, text and binary.  Where tt(UNIX) deals with a
+single streams type.  My opinion on this matter currently is to use
+binary mounts only.  This can be accomplished by:
 
 itemize(
 
 itemize(
-it()download
-url(egcs-1.0.2-cygb19.tar.gz)(ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin32/b19-releases/egcs-1.0.2-cygb19.tar.gz)
-to /tmp
-it()download
-url(gas-980303-cygb19.tar.gz)(ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin32/b19-releases/gas-980303-cygb19.tar.gz)
-to /tmp
-it() read
-url(INSTALL)(http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs-cygb19-install.html)
+it() From a bash shell, umount /
+it() mount -b d: /
 )
 
 )
 
-In a bash shell
-itemize(
-it() cd $CYGFS/include
-it() mv g++ g++-b19
-it() cd $CYGFS
-it() tar zxf /tmp/gas-980303-cygb19.tar.gz
-it() tar zxf /tmp/egcs-1.0.2-cygb19.tar.gz
-)
+If you have other disks that you intend to use for data generated by
+cygnus tools you will have to mount those devices with the em(-b)
+switch. 
+
+
+subsubsect(Ecgs Compiler, assembler, and linker)
+lurl(http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs.html)
 
 
-You now have a compiler, assembler, linker combination capable of
-compiling lilypond.  
+Cygnus now distributes the ecgs compiler with cygwin-b20.
 
 subsubsect(bf(GNU)'s Internationalization Package) 
 lurl(http://www.gnu.org/order/ftp.html)
 
 subsubsect(bf(GNU)'s Internationalization Package) 
 lurl(http://www.gnu.org/order/ftp.html)
@@ -323,7 +304,7 @@ used to help alleviate this problem.
 verb(
 #!/bin/sh
 
 verb(
 #!/bin/sh
 
-realinstall=/gnuwin32/b19/H-i386-cygwin32/bin/install.exe
+realinstall=/gnuwin32/cygwin-b20/H-i586-cygwin32/bin/install.exe
 args=''
 while [ $# -ne 0 ] 
 do
 args=''
 while [ $# -ne 0 ] 
 do
@@ -355,7 +336,7 @@ it() download the package from one of the ftp sites.
 it() From a bash shell, cd ~/usr/src.
 it() tar zxf gettext-0.10.tar.gz
 it() cd gettext-0.10
 it() From a bash shell, cd ~/usr/src.
 it() tar zxf gettext-0.10.tar.gz
 it() cd gettext-0.10
-it() ./configure --prefix=$CYGFS/H-i386-cygwin32
+it() ./configure --prefix=$CYGFS/H-i586-cygwin32
 it() make
 it() make install
 )
 it() make
 it() make install
 )
@@ -402,12 +383,10 @@ $HOME/usr/src/
 description(
 
 dit(releases/) Downloaded and generated releases live here.  For
 description(
 
 dit(releases/) Downloaded and generated releases live here.  For
-example file(yodl-1.30.0.pre12.tar.gz) and
-file(lilypond-0.1.81.tar.gz).
+example file(yodl-1.31.7.tar.gz) and file(lilypond-1.1.17.tar.gz).
 
 dit(patches/) Downloaded and generated patches live here.  For
 
 dit(patches/) Downloaded and generated patches live here.  For
-example file(yodl-1.30.0.pre12.diff.gz) and
-file(lilypond-0.1.81.diff.gz).
+example file(yodl-1.31.7.diff.gz) and file(lilypond-1.1.17.diff.gz).
 
 dit(test/) This directory is used to generate releases and patches.
 
 
 dit(test/) This directory is used to generate releases and patches.
 
@@ -434,17 +413,37 @@ For example:
 verb(\
 rem yodl
 
 verb(\
 rem yodl
 
-SET PATH=%PATH%;%LOCAL_ROOT%\yodl-1.30.0.pre12\bin
+SET PATH=%PATH%;%LOCAL_ROOT%\yodl-1.31.7\bin
 
 )
 )
 
 
 )
 )
 
-subsubsubsect(Yodl build CAVEAT)
+subsubsect(guile) 
+
+GUILE, GNU's Ubiquitous Intelligent Language for Extension, is a
+library that implements the Scheme language plus various convenient
+facilities. It's designed so that you can link it into an application
+or utility to make it extensible. GNU's plan is to link this library
+into all GNU programs that call for extensibility.
+
+itemize(
+it() download guile-1.3 patch from
+lurl(http://www.realtime.net/~daboys/lilypond/guile.patch) and save it
+to file(/tmp/guile.patch).
+it() download guile-1.3 from one of GNU's ftp sites.  
+it() From a bash shell, tar zxf guile-1.3.tar.gz
+it() cd guile-1.3
+it() patch -p2 < /tmp/guile.patch
+it() LD=/gnuwin32/cygwin-b20/H-i586-cygwin32/bin/ld \ nl() 
+       ./configure --prefix=$CYGFS/H-i586-cygwin32
+it() make sure bin_PROGRAMS macro in libguile/Makefile does em(not) have the
+.exe extension during the build
+it() make
+it() make sure bin_PROGRAMS in libguile/Makefile em(does) have the
+.exe extension during the install. Yuck. 
+it() make install
+)
 
 
-em(yodl) uses the em(stepmake) package for it's build methodology.
-The build of em(stepmake) documentation will fail due to the fact
-that em(yodl) is not yet installed.  This is normal and shouldn't be a
-problem.
 
 subsubsect(LilyPond) label(lilybuild)
 itemize(
 
 subsubsect(LilyPond) label(lilybuild)
 itemize(
@@ -455,10 +454,7 @@ it() From a bash shell, cd file($HOME/usr/src).
 it() tar zxf releases/lilypond-em(<version>).tar.gz 
 it() cd lilypond-em(<version>)
 it() ./configure --prefix=/gnuwin32/lilypond-em(<version>) \ nl()
 it() tar zxf releases/lilypond-em(<version>).tar.gz 
 it() cd lilypond-em(<version>)
 it() ./configure --prefix=/gnuwin32/lilypond-em(<version>) \ nl()
-        --srcdir=. \ nl()
-        --enable-tex-prefix=/gnuwin32/lilypond-em(<version>)/texmf \ nl()
-        --enable-tex-dir=/gnuwin32/lilypond-em(<version>)/texmf/tex \ nl()
-        --enable-mf-dir=/gnuwin32/lilypond-em(<version>)/texmf/mf nl()
+        --srcdir=. nl()
 Since em(lilypond) is under development I choose to install it in a
 version rooted directory.  This allows me to test newly released
 versions without losing a known working version.
 Since em(lilypond) is under development I choose to install it in a
 version rooted directory.  This allows me to test newly released
 versions without losing a known working version.
@@ -469,7 +465,7 @@ For example:
 verb(\
 rem lilypond
 
 verb(\
 rem lilypond
 
-SET PATH=%PATH%;%LOCAL_ROOT%\lilypond-0.1.80\bin
+SET PATH=%PATH%;%LOCAL_ROOT%\lilypond-1.1.17\bin
 
 )
 )
 
 )
 )
@@ -489,7 +485,7 @@ itemize(
 it() obtain python source from lurl(http://www.python.org)
 it() tar zxf /tmp/python-em(<version>).tar.gz 
 it() cd python-em(<version>)
 it() obtain python source from lurl(http://www.python.org)
 it() tar zxf /tmp/python-em(<version>).tar.gz 
 it() cd python-em(<version>)
-it() configure --prefix=/gnuwin32/python-em(<version>)
+it() configure --prefix=/gnuwin32/Python-em(<version>)
 it() edit toplevel file(Makefile) code(EXE) macro so it reads code(EXE=.exe)
 it() make
 it() make install
 it() edit toplevel file(Makefile) code(EXE) macro so it reads code(EXE=.exe)
 it() make
 it() make install
index 941b15e780c6fe3e1dcc61b4df06d667d17f5e39..f2f8b0a8183b0cf29b5c49d3626e8f7868614166 100644 (file)
@@ -1,22 +1,25 @@
-.TH "LilyPond" "1" "1998" "The LilyPond package" "Ly2dvi" 
+.TH "LilyPond" "1" "1998" "The LilyPond package" "Ly2dvi32
 .PP 
 .PP 
 .SH "NAME" 
 .PP 
 .PP 
 .SH "NAME" 
-Ly2dvi \- convert mudela to DVI
+Ly2dvi32 \- Python utility to convert mudela to DVI
 .PP 
 .SH "DESCRIPTION" 
 .PP 
 .SH "DESCRIPTION" 
-ly2dvi is a shell script which creates input file for LaTeX,
-based on information from the output files from lilypond\&.
+ly2dvi is a Python script which creates input file for LaTeX,
+based on information from the output files from LilyPond\&.
 The script handles multiple files\&. If a mudela file name is
 The script handles multiple files\&. If a mudela file name is
-specified lilypond is run to make an output (TeX) file\&.
+specified LilyPond is run to make an output (TeX) file\&.
 .PP 
 One or more LaTeX files are created, based on information found
 in the output (TeX) files, and latex is finally run to create
 one or more DVI files\&.
 .PP 
 .PP 
 One or more LaTeX files are created, based on information found
 in the output (TeX) files, and latex is finally run to create
 one or more DVI files\&.
 .PP 
+The majority of this utility came from a bourne script written by Jan
+Arne Fagertun name \fBly2dvi\fP\&. 
+.PP 
 .SH "SYNOPSIS" 
 .PP 
 .SH "SYNOPSIS" 
 .PP 
-ly2dvi [options] inputfile[\&.ly] [\&.\&.\&.\&.]
+ly2dvi32 [options] inputfile[\&.ly] [\&.\&.\&.\&.]
 .PP 
 .SH "OPTIONS" 
 .PP 
 .PP 
 .SH "OPTIONS" 
 .PP 
@@ -42,6 +45,8 @@ Set landscape orientation - portrait is the default\&.
 Switch off page numbering\&.
 .IP "-O,--orientation=" 
 Set orientation landscape - obsolete, use \fB-L\fP instead\&.
 Switch off page numbering\&.
 .IP "-O,--orientation=" 
 Set orientation landscape - obsolete, use \fB-L\fP instead\&.
+.IP "-P,--postscript" 
+In addition to the DVI file, also Generate a postsript file\&.
 .IP "-W,--Width=" 
 Set paper width (points)\&. Used together with heigth and LaTeX name of
 papersize in case of papersize unknown to ly2dvi\&.
 .IP "-W,--Width=" 
 Set paper width (points)\&. Used together with heigth and LaTeX name of
 papersize in case of papersize unknown to ly2dvi\&.
@@ -82,6 +87,8 @@ Specify name of papersize\&.
 .PP 
 .SH "Environment" 
 .PP 
 .PP 
 .SH "Environment" 
 .PP 
+.IP "LILYPONDPREFIX" 
+Sets the root directory of the LilyPond installation
 .IP "LILYINCLUDE" 
 Additional directories for input files\&.
 .IP "TMP" 
 .IP "LILYINCLUDE" 
 Additional directories for input files\&.
 .IP "TMP" 
@@ -97,37 +104,117 @@ version the following are defined:
 The title of the music\&. Centered on top of the first page\&.
 .IP "subtitle" 
 Subtitle, centered below the title\&.
 The title of the music\&. Centered on top of the first page\&.
 .IP "subtitle" 
 Subtitle, centered below the title\&.
+.IP "poet" 
+Name of the poet, leftflushed below the below subtitle\&.
 .IP "composer" 
 Name of the composer, rightflushed below the subtitle\&.
 .IP "composer" 
 Name of the composer, rightflushed below the subtitle\&.
+.IP "metre" 
+Meter string, leftflushed below the below poet\&.
+.IP "opus" 
+Name of the opus, rightflushed below the below composer\&.
 .IP "arranger" 
 .IP "arranger" 
-Name of the arranger, rightflushed below the composer\&.
+Name of the arranger, rightflushed below the opus\&.
 .IP "instrument" 
 .IP "instrument" 
-Name of the instrument, leftflushed at same level as the composer\&.
+Name of the instrument, centered below the arranger
+.IP "piece" 
+Name of the piece, leftflushed below the instrument
 .PP 
 .PP 
-\fB/usr/local/share/lilyrc /etc/lilyrc $HOME/\&.lilyrc \&./\&.lilyrc\fP
-are files to set up default running conditions/variables, Bourne shell
-syntax\&. All files are parsed, in the shown sequence\&. The variables are
-overridden by variables in the mudela file, and by command line options\&.
-In the current version the following are allowed:
+\fB$LILYPONDPREFIX/share/\&.lilyrc $HOME/\&.lilyrc \&./\&.lilyrc\fP are files
+to set up default running conditions\&.  On Windows OS initialization
+files are named \fB_lilyrc\fP\&. The file syntax is as follows:
 .PP 
 .PP 
-.IP "LANGUAGE=" 
-Specify LaTeX language\&.
-.IP "LATEXHF=" 
-Specify additional LaTeX headers file
-.IP "LILYINCLUDE=" 
-Additional directories for input files\&.
-.IP "ORIENTATION=" 
-Set orientation - portrait is the default\&.
-.IP "OUTPUTDIR=" 
-Set output directory\&.
-.IP "PAPERSIZE=" 
-Specify name of papersize\&.
-.IP "PHEIGTH=" 
+
+.DS 
+VARIABLE-NAME=VALUE
+.DE 
+.PP 
+Where \fBVARIABLE-NAME\fP is the name of the variable documented below
+and \fBVALUE\fP is either a string, a 1, or a 0\&.  All files are parsed,
+in the shown sequence\&. In the current version the following are
+allowed:
+.PP 
+.IP "DEBUG=value" 
+This turns off (default) or on the debug capabilities\&.  Possible
+values are 0 (off) and 1 (on)\&.
+.IP "DEPENDENCIES=value" 
+This turns off (default) or on the ability to generate a Makefile
+dependency list\&.  Possible values are 0 (off) and 1 (on)\&.
+.IP "KEEPLILYPOND=value" 
+This turns off (default) or on the ability to keep the log file
+associated with the LilyPond job\&.  Possible values are 0 (off) and 1
+(on)\&.
+.IP "KEEPLY2DVI=value" 
+This turns off (default) or on the ability to keep the temporary files
+that are generated by the ly2dvi job\&.  Possible values are 0 (off) and
+1 (on)
+.IP "LANGUAGE=value" 
+Specify LaTeX language\&.  Possible value is a valid LaTeX language\&.
+.IP "LATEXHF=value" 
+Specify additional LaTeX headers file\&.  Possible value is a file
+specification\&. 
+.IP "LILYINCLUDE=value" 
+Additional directories for input files\&.  Possible value is a delimited
+directory path list\&.
+.IP "LILYPONDPREFIX=value" 
+This defines the LilyPond root directory\&.  Possible value is a valid
+directory specification to the LilyPond distribution location\&.
+.IP "NONUMBER=value" 
+This turns off (default) or on the page numbering capability\&.
+Possible values are 0 (page numbering enabled) and 1 (page numbering
+disabled)\&. 
+.IP "ORIENTATION=value" 
+This sets the image orientation\&.  Possible values are
+portrait (default) and landscape\&.
+.IP "OUTPUTDIR=value" 
+This defines the directory where the resultant files will be
+generated\&.  Possible value is a valid directory specification\&.
+Default is the current working directory\&.
+.IP "PAPERSIZE=value" 
+This defines the papersize the image will be sized to fit\&.  Possible
+values are a0, a1, a2, a3, a4 (default), a5, a6, a7, a8, a9, a10, b0,
+b1, b2, b3, b4, b5, archA, archB, archC, archD, archE, flsa, flse,
+halfletter, ledger, legal, letter, or note\&.
+.IP "PHEIGHT=value" 
 Specify paperheight (points - an inch is 72\&.27, a cm is 28\&.453 points)\&.
 Specify paperheight (points - an inch is 72\&.27, a cm is 28\&.453 points)\&.
-.IP "TMP=" 
-Temporary directory name\&.
-.IP "PWIDTH=" 
+.IP "POSTSCRIPT=value" 
+This turns off (default) or on the capability of additionally
+generating a postscript file\&.  Possible values are 0 (off) and 1 (on)\&.
+.IP "PWIDTH=value" 
 Specify paperwidth (points - an inch is 72\&.27, a cm is 28\&.453 points)\&.
 Specify paperwidth (points - an inch is 72\&.27, a cm is 28\&.453 points)\&.
+.IP "SEPARATE=value" 
+This turns off (default) or on the capability of generating multiple
+dvi and postscript files from multiple source files\&.  The default is
+to generate a concatenation of the source files\&.  Possible values are
+0 (single file) and 1 (separate files)\&.
+.IP "TMP=value" 
+This defines the emporary directory\&.  Actually this is not used at the
+present\&.  Possible value is a valid directory specification that is
+writable to the user\&.
+.PP 
+.SH "Initialization Sequence" 
+The initialization process reads inputs for several sources\&.  Below is
+a list of priorities for lowest to hightest proirity\&.
+.PP 
+.IP o 
+Program\'s defaults
+.IP o 
+Values found in LilyPond output file
+.IP o 
+Environment variables
+.IP o 
+$LILYPONDPREFIX/share/lilypond/\&.lilyrc
+.IP o 
+$HOME/\&.lilyrc
+.IP o 
+\&./\&.lilyrc
+.IP o 
+command line options
+.PP 
+Note that this differs slightly from the original bourne shell
+version\&. 
 .PP 
 .SH "See Also" 
 .PP 
 .PP 
 .SH "See Also" 
 .PP 
@@ -162,6 +249,11 @@ archE, b0, b1, b2, b3, b4, b5, flsa, flse, halfletter, ledger, legal,
 letter, note
 .PP 
 .SH "AUTHOR" 
 letter, note
 .PP 
 .SH "AUTHOR" 
+Python Version author:
+Jeffrey B\&. Reed <daboys@bga\&.com>,
+http://www\&.realtime\&.net/~daboys/lilypond/
 .PP 
 .PP 
-Jan Arne Fagertun <Jan\&.A\&.Fagertun@energy\&.sintef\&.no>, http://www\&.termo\&.unit\&.no/mtf/people/janaf/
+Original bourne shell version author:
+Jan Arne Fagertun <Jan\&.A\&.Fagertun@energy\&.sintef\&.no>,
+http://www\&.termo\&.unit\&.no/mtf/people/janaf/
 .PP 
 .PP 
index 1a3a8df1f19444ff8aad11028e15cceb4529e7e9..81d5f2bea36656a5b5d83d97349599b719ca0c22 100644 (file)
@@ -16,6 +16,18 @@ includefile(../BLURB.in)
 link(Back to top)(contents)
 clearpage()
 
 link(Back to top)(contents)
 clearpage()
 
+I'm back from the dead!  There have been many changes since my last
+update.  Please read information on batch files and update as needed.
+The fonts have changed so you will also need to remove any cached
+fonts. In addition please bring music sources up to date by using
+convert-mudela utility.  I used:
+
+verb(
+% bf(convert-mudela.py -e angels.ly)
+)
+
+Also please refer to LilyPond documentation for new and changed
+features.
 
 subsect(NEWS) label(news)
 This is what the version @TOPLEVEL_VERSION@ brings:
 
 subsect(NEWS) label(news)
 This is what the version @TOPLEVEL_VERSION@ brings:
@@ -52,6 +64,8 @@ clearpage()
 subsect(Download) label(download)
 
 itemize(
 subsect(Download) label(download)
 
 itemize(
+    it() pre-guile version lurl(lilypond-1.0.17.jbr1.bin.zip) nl()
+       NOTE: LILYPONDPREFIX=em(LilyPond-dir) for this version
     it()lurl(lilypond-@TOPLEVEL_VERSION@.bin.zip)
 )
 
     it()lurl(lilypond-@TOPLEVEL_VERSION@.bin.zip)
 )
 
@@ -68,10 +82,11 @@ itemize(
   description(
     dit(batch file)
       In a batch file you can add the following entries: nl()
   description(
     dit(batch file)
       In a batch file you can add the following entries: nl()
-      bf(set LILYPONDPREFIX=em(LilyPond-dir)) nl()
-      bf(set path=%path%;%LILYPONDPREFIX%\bin;em(MiKTeX-dir)\miktex\bin) nl()
-      bf(set TEXINPUTS=%LILYPONDPREFIX%\share\lilypond\tex;;) nl()
-      bf(set MFINPUTS=%LILYPONDPREFIX%\share\lilypond\mf;;) nl()
+      bf(set LILYPONDHOME=em(LilyPond-dir)) nl()
+      bf(set LILYPONDPREFIX=%LILYPONDHOME%\share\lilypond) nl()
+      bf(set path=%path%;%LILYPONDHOME%\bin;em(MiKTeX-dir)\miktex\bin) nl()
+      bf(set TEXINPUTS=%LILYPONDPREFIX%\tex;%LILYPONDPREFIX%\ps;;) nl()
+      bf(set MFINPUTS=%LILYPONDPREFIX%\mf;;) nl()
 COMMENT(    dit(Windows Environment)
       In the Windows environment you can select
       properties menu of the My Computer icon. Click on
 COMMENT(    dit(Windows Environment)
       In the Windows environment you can select
       properties menu of the My Computer icon. Click on
index 2747f7e0e154be71c3fbbcff2edbc959e8374d99..68b87c02153119592c37d478f901fcb90a476253 100644 (file)
@@ -33,10 +33,10 @@ Contents
 
 This  document  explains  what you need to install LilyPond,
 and what you should do.  If you are  going  to  compile  and
 
 This  document  explains  what you need to install LilyPond,
 and what you should do.  If you are  going  to  compile  and
-install  LilyPond very often you might want to check out the
-buildscripts/set-lily.sh script.  It sets  some  environment
-variables  and symlinks, which comes in handly when you have
-to compile LilyPond more often.
+install  LilyPond  often,  e.g.  when doing development, you
+might want to check out the buildscripts/set-lily.sh script.
+It sets some environment variables and symlinks, which comes
+in handly when you have to compile LilyPond more often.
 
 
 2: PREREQUISITES
 
 
 2: PREREQUISITES
@@ -67,7 +67,7 @@ o    Python  1.5  (Strictly  speaking,  you  shouldn't  need
      to regenerate the font tables, e.g.).
 
 o    GUILE  1.3  (no,  GUILE  1.2  won't  work),  check  out
      to regenerate the font tables, e.g.).
 
 o    GUILE  1.3  (no,  GUILE  1.2  won't  work),  check  out
-     http://www.gnu.org/programs/guile.html.
+     http://www.gnu.org/software/guile/guile.html.
 
 
 3: RUNNING
 
 
 3: RUNNING
@@ -153,35 +153,35 @@ o    The geometry package for LaTeX is needed to use ly2dvi.
      mirror site ftp://ftp.dante.de
 
 
      mirror site ftp://ftp.dante.de
 
 
-o    A fast computer (a full page of music typically takes 1
+o    A fast computera full page of music typically takes 1
      minute on my 486/133, using the --enable-checking  com-
      minute on my 486/133, using the --enable-checking  com-
-     pile. It's lot slower than most MusiXTeX preprocessors)
+     pile.
 
 
 5: WEBSITE
 
 
 
 
 5: WEBSITE
 
 
-If you want to auto-generate  Lily's  website,  you'll  need
+If  you  want  to  auto-generate Lily's website, you'll need
 some additional conversion tools.
 
 
 o    xpmtoppm (from the Portable Bitmap Utilities) (For Red-
 some additional conversion tools.
 
 
 o    xpmtoppm (from the Portable Bitmap Utilities) (For Red-
-     Hat Linux users: it  is  included  within  the  package
+     Hat  Linux  users:  it  is  included within the package
      libgr-progs).
 
 o    Bib2html http://pertsserver.cs.uiuc.edu/~hull/bib2html.
      Which, in turn depends on man2html for proper installa-
      libgr-progs).
 
 o    Bib2html http://pertsserver.cs.uiuc.edu/~hull/bib2html.
      Which, in turn depends on man2html for proper installa-
-     tion.    man2html   can   be  had  from  http://askdon-
+     tion.   man2html  can  be   had   from   http://askdon-
      ald.ask.uni-karlsruhe.de/hppd/hpux/Network-
      ing/WWW/Man2html-1.05.
 
      TeTeX users should not forget to rerun texhash.
 
 Building the website requires pnmtopng.  The version of pnm-
      ald.ask.uni-karlsruhe.de/hppd/hpux/Network-
      ing/WWW/Man2html-1.05.
 
      TeTeX users should not forget to rerun texhash.
 
 Building the website requires pnmtopng.  The version of pnm-
-topng that is distributed with RedHat  5.1  contains  a  bug
-(pnmtopng  is  dynamically  linked  to  the wrong version of
-libpng).  Recompile it from source, and make sure  that  the
-pnmtopng  binary  is linked statically to the libpng that is
+topng  that  is  distributed  with RedHat 5.1 contains a bug
+(pnmtopng is dynamically linked  to  the  wrong  version  of
+libpng).   Recompile  it from source, and make sure that the
+pnmtopng binary is linked statically to the libpng  that  is
 included in libgr.
 
 
 included in libgr.
 
 
@@ -236,9 +236,9 @@ This will install a number of files, something close to:
 
 
 
 
 
 
-The above assumes that you are root and have the GNU  devel-
+The  above assumes that you are root and have the GNU devel-
 opment tools, and your make is GNU make.  If this is not the
 opment tools, and your make is GNU make.  If this is not the
-case, you can adjust  your  environment  variables  to  your
+case,  you  can  adjust  your  environment variables to your
 
 
 taste:
 
 
 taste:
@@ -258,7 +258,7 @@ taste:
 CPPFLAGS are the preprocessor flags.
 
 The configure script is Cygnus configure, and it will accept
 CPPFLAGS are the preprocessor flags.
 
 The configure script is Cygnus configure, and it will accept
---help. If you are not root, you will probably have to  make
+--help.  If you are not root, you will probably have to make
 it with a different --prefix option.  Our favourite location
 is
 
 it with a different --prefix option.  Our favourite location
 is
 
@@ -273,10 +273,10 @@ is
 
 
 
 
 
 
-In this case, you will have to set up MFINPUTS,  and  TEXIN-
+In  this  case, you will have to set up MFINPUTS, and TEXIN-
 PUTS accordingly.
 
 PUTS accordingly.
 
-Since  GNU  LilyPond  currently  is beta, you are advised to
+Since GNU LilyPond currently is beta,  you  are  advised  to
 also use
 
 
 also use
 
 
@@ -301,18 +301,18 @@ Options to configure include:
      Enable debugging print routines (lilypond -D option)
 
 --enable-optimise
      Enable debugging print routines (lilypond -D option)
 
 --enable-optimise
-     Set maximum optimisation: compile with -O2.   This  can
-     be  unreliable  on  some compiler/platform combinations
+     Set  maximum  optimisation: compile with -O2.  This can
+     be unreliable on  some  compiler/platform  combinations
      (eg, DEC Alpha and PPC)
 
 --enable-profiling
      Compile with support for profiling.
 
 --enable-config
      (eg, DEC Alpha and PPC)
 
 --enable-profiling
      Compile with support for profiling.
 
 --enable-config
-     Output to a different configuration file.   Needed  for
+     Output  to  a different configuration file.  Needed for
      multi-platform builds
 
      multi-platform builds
 
-All  options are documented in the configure help The option
+All options are documented in the configure help The  option
 --enable-optimise is recommended for Real Life usage.
 
 If you do
 --enable-optimise is recommended for Real Life usage.
 
 If you do
@@ -328,8 +328,8 @@ If you do
 
 
 
 
 
 
-everything will be compiled, but nothing will be  installed.
-The  resulting  binaries  can be found in the subdirectories
+everything  will be compiled, but nothing will be installed.
+The resulting binaries can be found  in  the  subdirectories
 out/ (which contain all files generated during compilation).
 
 
 out/ (which contain all files generated during compilation).
 
 
@@ -337,8 +337,8 @@ out/ (which contain all files generated during compilation).
 
 
 If you want to compile LilyPond with different configuration
 
 
 If you want to compile LilyPond with different configuration
-settings, then, you  can  use  the  --enable-config  option.
-Example:  suppose I want to build with and   without profil-
+settings,  then,  you  can  use  the --enable-config option.
+Example: suppose I want to build with and   without  profil-
 ing.  Then I'd use the following for the normal build,
 
 
 ing.  Then I'd use the following for the normal build,
 
 
@@ -386,7 +386,7 @@ If you have done a successful make, then a simple
 should do the trick.
 
 If you are doing an upgrade, please remember to remove obso-
 should do the trick.
 
 If you are doing an upgrade, please remember to remove obso-
-lete .pk and .tfm files of the fonts.   A  script  has  been
+lete  .pk  and  .tfm  files of the fonts.  A script has been
 provided to do the work for you, see bin/clean-fonts.sh.
 
 
 provided to do the work for you, see bin/clean-fonts.sh.
 
 
@@ -394,8 +394,8 @@ CAVEATS
 
 
 
 
 
 
-o    The  -O2  option to gcc triggers a gcc bug on DEC Alpha
-     in dstream.cc. You should turn off this flag  for  this
+o    The -O2 option to gcc triggers a gcc bug on  DEC  Alpha
+     in  dstream.cc.  You should turn off this flag for this
 
 
      file.
 
 
      file.
@@ -452,8 +452,8 @@ refer to the man page for more information.
 9: REDHAT LINUX
 
 
 9: REDHAT LINUX
 
 
-RedHat Linux users can compile an RPM. A  spec  file  is  in
-make/out/lilypond.spec,  it  is  distributed  along with the
+RedHat  Linux  users  can  compile an RPM. A spec file is in
+make/out/lilypond.spec, it is  distributed  along  with  the
 sources.
 
 You can make the rpm by issuing
 sources.
 
 You can make the rpm by issuing
@@ -473,7 +473,7 @@ You can make the rpm by issuing
 10: DEBIAN GNU/LINUX
 
 
 10: DEBIAN GNU/LINUX
 
 
-A Debian package is  also  available;  contact  Anthony  Fok
+A  Debian  package  is  also  available; contact Anthony Fok
 foka@debian.org <foka@debian.org>.  The build scripts are in
 the subdirectory debian/.
 
 foka@debian.org <foka@debian.org>.  The build scripts are in
 the subdirectory debian/.
 
diff --git a/NEWS b/NEWS
index aea1b1fcb3f70eac56cac1bd067fd0f9c8288057..6b8d0fb1192cac302bd103eafa14b0ec2fee95fd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,36 @@
-pl 17.mb1
-       - center the number of multi-bar rests
-       - Ugly fix to make \mark work and give better placement of dynamics.
+pl 17.jbr2
+        - Documentation/README-W32: Brought my stuff up to date
+        - Documentation/ntweb: updated for realease
+        - stepmake/bin/package-zip32.sh: cygwin-b20 changes
+        - scripts/ly2dvi.py: LILYPONDPREFIX fixes
 
 
+pl 17.jbr1
+        - scripts/ly2dvi.py root is now the shared directory path not the
+          root of the lily installation.  Environment variable LILYPONDPREFIX
+          is also the path to shared directory.
+        - lily/main.cc WINNT conditional added to avoid a casting of 
+          main_prog
+
+pl 17.hwn1
+       - bfs wtk1-fugue1
+       - spacing tweak: very widely and tightly spaced lines look
+better.
+       - allow Beam settings to be overriden: property
+       stemLeftBeamCount, stemRightBeamCount
+       - junked Assoc, Assoc_iter
+       - junked Graphical_element::{width,height}
+       - junked Plet_swallow_engraver, Plet_engraver
+       - Command_tie_engraver -> Tie_engraver, Command_beam_engraver -> Beam_engraver
+       - naming  brew_molecule_p / do_brew_molecule -> output_processing,  do_brew_molecule_p 
+       - experimental Text_item, Staff_side
+       - junked old Beam_engraver and old Tie_engraver.
+       - AFM administration cleanup.
+       - cache brewed molecules.  Speed up ?
+       - rehacked Graphical_element, introduced Dimension_cache
+
+********
+
+pl 17
 pl 16.jcn2
        - fix: TEMPO 4., well urg, "TEMPO 4 ."
        - beginning of violino/violoncello (viola) duet
 pl 16.jcn2
        - fix: TEMPO 4., well urg, "TEMPO 4 ."
        - beginning of violino/violoncello (viola) duet
@@ -9,6 +38,12 @@ pl 16.jcn2
 pl 16.jcn1
        - resurrected po-stuff
 
 pl 16.jcn1
        - resurrected po-stuff
 
+********
+pl 16
+
+*********
+pl 16
+
 pl 15.uu1
        - dynamic fix.  
        - junked abbrev stuff from parser.
 pl 15.uu1
        - dynamic fix.  
        - junked abbrev stuff from parser.
index 9a521b0afbf012ba300044d7fc5ae1246ea5d2fc..e14181b913d1c7997d3d97392884d3cc933df51a 100644 (file)
 
 
 
 
 
 
-This  is the toplevel README to LilyPond LilyPond is the GNU
-Project music typesetter.  This program can print  beautiful
-sheet  music from a music definition file.  It can also play
-mechanical performances to a MIDI  file.   Features  include
-multiple  staffs,  meters,  clefs,  keys,  lyrics, versatile
-input language, cadenzas, beams, slurs, triplets, formatting
+
+
+
+          This is the toplevel README to LilyPond
+
+
+LilyPond  is the GNU Project music typesetter.  This program
+can print beautiful sheet  music  from  a  music  definition
+file.   It  can  also play mechanical performances to a MIDI
+file.  Features  include  multiple  staffs,  meters,  clefs,
+keys,  lyrics,  versatile  input  language, cadenzas, beams,
+slurs,  triplets,  named  chords,  transposing,   formatting
 scores, part extraction.  It includes a nice font of musical
 symbols.
 
 scores, part extraction.  It includes a nice font of musical
 symbols.
 
+
 1: VERSIONING
 
 1: VERSIONING
 
-     if you have downloaded a *.pre* version, then  this  is
-version  is  *not*  meant  for producing nice output (but to
-keep your patchsets up to date).  It might not even compile.
-The  same  goes  for a version with a 4th version number, eg
-1.2.3.mypatch2 It will be safer if  you  download  1.2.3  or
-wait for 1.2.4.
+
+LilyPond uses a versioning scheme similar to the Linux  ker-
+nel.   In  a  version  "x.y.z",  an  even  second number 'y'
+denotes a stable version.  For development versions  'y'  is
+odd.  For using straightforward score production, please use
+the latest stable version.   Development  versions  may  not
+produce good or nice scores.
+
+If you have downloaded a
+
+*.pre*
+
+version,  then  this is version is *not* meant for producing
+nice output (but to keep your patchsets  up  to  date).   It
+might  not even compile.  The same goes for a version with a
+4th version number, eg
+
+1.2.3.mypatch2
+
+It will be safer if you download 1.2.3 or wait for 1.2.4.
+
 
 2: REQUIREMENTS
 
 
 2: REQUIREMENTS
 
-     For  the  compilation  and running of LilyPond you need
-some additional packages.  Please refer to the  installation
-instructions.   NOTE:  If you downloaded a binary (.rpm or a
-W95/NT .zip file), then you don't have to compile  LilyPond.
+
+For the compilation and running of LilyPond  you  need  some
+additional  packages.   Please  refer  to  the  installation
+instructions.
+
+NOTE: If you downloaded a binary  (.rpm  or  a  W95/NT  .zip
+file), then you don't have to compile LilyPond.
+
 
 3: INSTALLATION
 
 
 3: INSTALLATION
 
-     For  your  convenience, a formatted copy of the INSTALL
-instructions are in the toplevel directory,  as  INSTALL.txt
-The  process is fairly straightforward, but chances are that
-you have to specify directories for  to configure:  this  is
+
+For  your  convenience,  a  formatted  copy  of  the INSTALL
+instructions are in the toplevel directory, as INSTALL.txt
+
+The process is fairly straightforward, but chances are  that
+you  have  to specify directories for  to configure: this is
 done with the options --enable-tex-dir and --enable-mf-dir
 
 done with the options --enable-tex-dir and --enable-mf-dir
 
+
 4: DOCUMENTATION
 
 4: DOCUMENTATION
 
-     The  real documentation is the directory Documentation/
+
+The real documentation is the directory Documentation/
+
 To generate the pretty-printed docs, you have to run config-
 To generate the pretty-printed docs, you have to run config-
-ure  first,  and  then do this: make doc You can also simply
-read the .yo sources.  They are ASCII  text.   The  complete
-documentation is accessible in formatted form at the website
-http://www.cs.uu.nl/people/hanwen/lilypond/index.html
+ure first, and then do this:
+
+make doc
+
+You  can  also  simply read the .yo sources.  They are ASCII
+text.  The complete documentation is accessible in formatted
+form  at the website http://www.cs.uu.nl/people/hanwen/lily-
+pond/index.html
+
 
 5: COMMENTS
 
 
 5: COMMENTS
 
-     LilyPond is a long way from finished and polished.   We
-do appreciate criticism, comments, bugreports, patches, etc.
-Please send your e-mail to one of the MAILING LISTS and  not
-to us personally.  See Documentation/links.yo for more info.
+
+LilyPond is a long way from finished and  polished.   We  do
+appreciate criticism, comments, bugreports, patches, etc.
+
+Please send your e-mail to one of the MAILING LISTS
+
+and  not  to  us personally.  See Documentation/links.yo for
+more info.
+
 
 6: WINDOWS 32
 
 
 6: WINDOWS 32
 
-     If you have received this file as part  of  a  DOS/Win-
-dow32 distribution (lilypond-*.zip), then it is advisable to
-also download the source package,  since  it  might  contain
 
 
+If you have received this file as  part  of  a  DOS/Window32
+distribution  (lilypond-*.zip), then it is advisable to also
+download the source package, since  it  might  contain  more
+documentation ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/
 
 
-more  documentation  ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/ If
-you decide to build LilyPond from source,  please  read  the
-INSTALL.txt  document  first,  especially  the Windows NT/95
+If you decide to build LilyPond from source, please read the
+INSTALL.txt document first,  especially  the  Windows  NT/95
 section.
 
 section.
 
+
 7: CAVEATS
 
 7: CAVEATS
 
-     * Please read the file BUGS for some ugly  bugs.   This
-especially  applies  Linux-Intel  unix users.  * If you have
-installed a previous version, be sure  to  remove  old  font
-files, eg
+
+*  Please read the file BUGS for some ugly bugs.  This espe-
+cially applies Linux-Intel unix users.
+
+* If you have installed  a  previous  version,  be  sure  to
+remove old font files, eg
 
 
 
 
 
 
@@ -80,13 +124,14 @@ files, eg
 
 
 
 
 
 
-a script to do this for you is in bin/cleanfonts.sh
+a  script  to  do  this  for  you  is in buildscripts/clean-
+fonts.sh
 
 
 8: CDROM DISTRIBUTIONS
 
 
 
 
 8: CDROM DISTRIBUTIONS
 
 
-If  you  have received LilyPond on a cdrom, chances are that
-development has moved a some patchlevels up.   If  possible,
+If you have received LilyPond on a cdrom, chances  are  that
+development  has  moved a some patchlevels up.  If possible,
 please check the latest version of LilyPond before reporting
 bugs.
 please check the latest version of LilyPond before reporting
 bugs.
diff --git a/TODO b/TODO
index dc0db2f26ef38d0901e47f642eead8adf8d81aa6..59f23ce0ca72ada7509cda356797a0735fba33d7 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,4 +1,5 @@
-Features you cannot find in the doco as working, should be mentioned here.
+Features you cannot find in the doco as working, should be mentioned
+here.
 
 This is an assorted collection of stuff that will be done, might be
 done, or is an idea that I want to think about
 
 This is an assorted collection of stuff that will be done, might be
 done, or is an idea that I want to think about
@@ -6,7 +7,22 @@ done, or is an idea that I want to think about
 Most of the items are marked in the code as well, with full explanation. 
 grep for TODO and ugh/ugr/urg
 
 Most of the items are marked in the code as well, with full explanation. 
 grep for TODO and ugh/ugr/urg
 
+       * scm-ify \property values.
+
+       * move class Lookup {} into scm
+
+       * read tfms too.
+
+       * update mi2mu for lilypond 1.1
+
 BUGS:
 BUGS:
+
+       * fix braces
+
+       * ly2dvi barfs on linewidth = -1.
+
+       * fix midi output.
+
        * c4 \! \> c4
 
        * tremolo stuff
        * c4 \! \> c4
 
        * tremolo stuff
@@ -27,10 +43,6 @@ BUGS:
 
        * \breathmark TeX macro 
 
 
        * \breathmark TeX macro 
 
-       * configure error if GUILE 1.3 not found
-
-       * configure error if no rtti (gcc 2.8 or egcs-1.1)
-
        * catch GUILE errors?
 
        * add new glyphs to font.ly
        * catch GUILE errors?
 
        * add new glyphs to font.ly
@@ -128,8 +140,6 @@ STUFF
 
        * $DEPENDENCIES_OUTPUT support
 
 
        * $DEPENDENCIES_OUTPUT support
 
-       * fix BUGs
-
        * fix weird behaviour when .AFMs/.SCMs not found.
 
        * Xdvi zooming ?! Try to understand GS garbage collection.
        * fix weird behaviour when .AFMs/.SCMs not found.
 
        * Xdvi zooming ?! Try to understand GS garbage collection.
@@ -545,9 +555,6 @@ SMALLISH PROJECTS
 
        * midi esp.: use I32 iso int where 32 bits are needed (or assumed...)
 
 
        * midi esp.: use I32 iso int where 32 bits are needed (or assumed...)
 
-       * Flower types:
-       - A decent scalar type
-
        * stafftypes: voice names/ instrument names.
 
        * lily \tempo
        * stafftypes: voice names/ instrument names.
 
        * lily \tempo
diff --git a/VERSION b/VERSION
index 03e50b5e80c35c1af35b35f5135522b0e75e503e..c3e453065e2b29cf6f4d1b9db4fd5556c3dabbb0 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=1
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=1
-PATCH_LEVEL=17
-MY_PATCH_LEVEL=mb1
+PATCH_LEVEL=18
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 50748a506a352e63f39f83ebfb3dccd1922190f4..9928822b00c2ee6c5c38ec59c705f51863d5cbcf 100644 (file)
@@ -1,5 +1,9 @@
 dnl WARNING WARNING WARNING WARNING
 dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
 dnl WARNING WARNING WARNING WARNING
 dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
+dnl WARNING WARNING WARNING WARNING
+dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
+dnl WARNING WARNING WARNING WARNING
+dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
 dnl aclocal.m4   -*-shell-script-*-
 dnl StepMake subroutines for configure.in
 
 dnl aclocal.m4   -*-shell-script-*-
 dnl StepMake subroutines for configure.in
 
@@ -145,13 +149,13 @@ AC_DEFUN(AC_STEPMAKE_END, [
 AC_DEFUN(AC_STEPMAKE_GXX, [
     # ugh autoconf
     changequote(<<, >>)dnl
 AC_DEFUN(AC_STEPMAKE_GXX, [
     # ugh autoconf
     changequote(<<, >>)dnl
-    if $CXX --version | grep '2\.[78]' > /dev/null ||
+    if $CXX --version | grep '2\.8' > /dev/null ||
        $CXX --version | grep 'egcs' > /dev/null
     changequote([, ])dnl
     then
            true
     else
        $CXX --version | grep 'egcs' > /dev/null
     changequote([, ])dnl
     then
            true
     else
-           AC_STEPMAKE_WARN(can\'t find g++ 2.7, 2.8 or egcs)
+           AC_STEPMAKE_WARN(can\'t find g++ 2.8 or egcs)
     fi
 ])
 
     fi
 ])
 
@@ -160,17 +164,19 @@ AC_DEFUN(AC_STEPMAKE_GUILE, [
     # others need readline, dl (or even more)
     # urg, must check for different functions in libguile
     # to force new check iso reading from cache
     # others need readline, dl (or even more)
     # urg, must check for different functions in libguile
     # to force new check iso reading from cache
-    AC_CHECK_LIB(guile, scm_shell, \
+
+    # gh_scm2doubles,gh_doubles2scm are new in 1.3
+    AC_CHECK_LIB(guile, gh_scm2doubles, \
       LIBS="-lguile $LIBS"; AC_DEFINE(HAVE_LIBGUILE), \
       AC_CHECK_LIB(readline, readline) \
       AC_CHECK_LIB(dl, dlopen) \
       AC_CHECK_LIB(socket, socket)\
       AC_CHECK_LIB(termcap,tgetent)\
       AC_CHECK_LIB(m, fabs)\
       LIBS="-lguile $LIBS"; AC_DEFINE(HAVE_LIBGUILE), \
       AC_CHECK_LIB(readline, readline) \
       AC_CHECK_LIB(dl, dlopen) \
       AC_CHECK_LIB(socket, socket)\
       AC_CHECK_LIB(termcap,tgetent)\
       AC_CHECK_LIB(m, fabs)\
-      AC_CHECK_LIB(guile, scm_boot_guile)\
+      AC_CHECK_LIB(guile, gh_doubles2scm)\
     )
     )
-    if test "$ac_cv_lib_guile_scm_shell" != yes -a \
-      "$ac_cv_lib_guile_scm_boot_guile" != yes ; then
+    if test "$ac_cv_lib_guile_gh_scm2doubles" != yes -a \
+      "$ac_cv_lib_guile_gh_doubles2scm" != yes ; then
            AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
     fi
 ])
            AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
     fi
 ])
index 683d723e9a210dc3ba28cf63c856e29ea8c95eed..da4480ea7bbe8fd0ec7efdbf9d489d488bdaefb2 100755 (executable)
--- a/configure
+++ b/configure
@@ -1553,13 +1553,13 @@ fi
 
 
     # ugh autoconf
 
 
     # ugh autoconf
-        if $CXX --version | grep '2\.[78]' > /dev/null ||
+        if $CXX --version | grep '2\.8' > /dev/null ||
        $CXX --version | grep 'egcs' > /dev/null
         then
            true
     else
            
        $CXX --version | grep 'egcs' > /dev/null
         then
            true
     else
            
-    echo "configure: warning: can\'t find g++ 2.7" 1>&2
+    echo "configure: warning: can\'t find g++ 2.8 or egcs" 1>&2
     warn_b=yes
 
     fi
     warn_b=yes
 
     fi
@@ -2487,16 +2487,18 @@ test -n "$YODL2TXT" || YODL2TXT="-echo no yodl"
     # others need readline, dl (or even more)
     # urg, must check for different functions in libguile
     # to force new check iso reading from cache
     # others need readline, dl (or even more)
     # urg, must check for different functions in libguile
     # to force new check iso reading from cache
-    echo $ac_n "checking for scm_shell in -lguile""... $ac_c" 1>&6
-echo "configure:2492: checking for scm_shell in -lguile" >&5
-ac_lib_var=`echo guile'_'scm_shell | sed 'y%./+-%__p_%'`
+
+    # gh_scm2doubles,gh_doubles2scm are new in 1.3
+    echo $ac_n "checking for gh_scm2doubles in -lguile""... $ac_c" 1>&6
+echo "configure:2494: checking for gh_scm2doubles in -lguile" >&5
+ac_lib_var=`echo guile'_'gh_scm2doubles | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lguile  $LIBS"
 cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lguile  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2500 "configure"
+#line 2502 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2504,13 +2506,13 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char scm_shell();
+char gh_scm2doubles();
 
 int main() {
 
 int main() {
-scm_shell()
+gh_scm2doubles()
 ; return 0; }
 EOF
 ; return 0; }
 EOF
-if { (eval echo configure:2514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2534,7 +2536,7 @@ else
   echo "$ac_t""no" 1>&6
 \
       echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
   echo "$ac_t""no" 1>&6
 \
       echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:2538: checking for readline in -lreadline" >&5
+echo "configure:2540: checking for readline in -lreadline" >&5
 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2542,7 +2544,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lreadline  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lreadline  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2546 "configure"
+#line 2548 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2556,7 +2558,7 @@ int main() {
 readline()
 ; return 0; }
 EOF
 readline()
 ; return 0; }
 EOF
-if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2584,7 +2586,7 @@ else
 fi
  \
       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
 fi
  \
       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2588: checking for dlopen in -ldl" >&5
+echo "configure:2590: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2592,7 +2594,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2596 "configure"
+#line 2598 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2606,7 +2608,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2634,7 +2636,7 @@ else
 fi
  \
       echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
 fi
  \
       echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:2638: checking for socket in -lsocket" >&5
+echo "configure:2640: checking for socket in -lsocket" >&5
 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2642,7 +2644,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2646 "configure"
+#line 2648 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2656,7 +2658,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:2660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2684,7 +2686,7 @@ else
 fi
 \
       echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
 fi
 \
       echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:2688: checking for tgetent in -ltermcap" >&5
+echo "configure:2690: checking for tgetent in -ltermcap" >&5
 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2692,7 +2694,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2696 "configure"
+#line 2698 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2706,7 +2708,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:2710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2734,7 +2736,7 @@ else
 fi
 \
       echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6
 fi
 \
       echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6
-echo "configure:2738: checking for fabs in -lm" >&5
+echo "configure:2740: checking for fabs in -lm" >&5
 ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2742,7 +2744,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2746 "configure"
+#line 2748 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2756,7 +2758,7 @@ int main() {
 fabs()
 ; return 0; }
 EOF
 fabs()
 ; return 0; }
 EOF
-if { (eval echo configure:2760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2783,16 +2785,16 @@ else
   echo "$ac_t""no" 1>&6
 fi
 \
   echo "$ac_t""no" 1>&6
 fi
 \
-      echo $ac_n "checking for scm_boot_guile in -lguile""... $ac_c" 1>&6
-echo "configure:2788: checking for scm_boot_guile in -lguile" >&5
-ac_lib_var=`echo guile'_'scm_boot_guile | sed 'y%./+-%__p_%'`
+      echo $ac_n "checking for gh_doubles2scm in -lguile""... $ac_c" 1>&6
+echo "configure:2790: checking for gh_doubles2scm in -lguile" >&5
+ac_lib_var=`echo guile'_'gh_doubles2scm | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lguile  $LIBS"
 cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lguile  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2796 "configure"
+#line 2798 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2800,13 +2802,13 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 #endif
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char scm_boot_guile();
+char gh_doubles2scm();
 
 int main() {
 
 int main() {
-scm_boot_guile()
+gh_doubles2scm()
 ; return 0; }
 EOF
 ; return 0; }
 EOF
-if { (eval echo configure:2810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2836,8 +2838,8 @@ fi
     
 fi
 
     
 fi
 
-    if test "$ac_cv_lib_guile_scm_shell" != yes -a \
-      "$ac_cv_lib_guile_scm_boot_guile" != yes ; then
+    if test "$ac_cv_lib_guile_gh_scm2doubles" != yes -a \
+      "$ac_cv_lib_guile_gh_doubles2scm" != yes ; then
            
     echo "configure: warning: You should install guile 1.3 or newer" 1>&2
     warn_b=yes
            
     echo "configure: warning: You should install guile 1.3 or newer" 1>&2
     warn_b=yes
@@ -2849,7 +2851,7 @@ CXXFLAGS="$CXXFLAGS -fhandle-signatures"
 
 
 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
 
 
 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:2853: checking for 8-bit clean memcmp" >&5
+echo "configure:2855: checking for 8-bit clean memcmp" >&5
 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2857,7 +2859,7 @@ else
   ac_cv_func_memcmp_clean=no
 else
   cat > conftest.$ac_ext <<EOF
   ac_cv_func_memcmp_clean=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 2861 "configure"
+#line 2863 "configure"
 #include "confdefs.h"
 #ifdef __cplusplus
 extern "C" void exit(int);
 #include "confdefs.h"
 #ifdef __cplusplus
 extern "C" void exit(int);
@@ -2870,7 +2872,7 @@ main()
 }
 
 EOF
 }
 
 EOF
-if { (eval echo configure:2874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_memcmp_clean=yes
 else
 then
   ac_cv_func_memcmp_clean=yes
 else
@@ -2888,12 +2890,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:2892: checking for vprintf" >&5
+echo "configure:2894: checking for vprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2897 "configure"
+#line 2899 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -2919,7 +2921,7 @@ vprintf();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
@@ -2943,12 +2945,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:2947: checking for _doprnt" >&5
+echo "configure:2949: checking for _doprnt" >&5
 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2952 "configure"
+#line 2954 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -2974,7 +2976,7 @@ _doprnt();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
@@ -3001,12 +3003,12 @@ fi
 for ac_func in memmem snprintf vsnprintf gettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 for ac_func in memmem snprintf vsnprintf gettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3005: checking for $ac_func" >&5
+echo "configure:3007: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3010 "configure"
+#line 3012 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3032,7 +3034,7 @@ $ac_func();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:3036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3071,7 +3073,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
 # 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:3075: checking for $ac_word" >&5
+echo "configure:3077: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
diff --git a/flower/dictionary.cc b/flower/dictionary.cc
deleted file mode 100644 (file)
index 2d200f2..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-
-#if 0
-
-
-/**
-   Dictionary implementation.  Please fix me.
-
-   (neuk. hsearch_* is te dom.)
- */
-template<class T>
-class Dictionary<T>
-{
-  hsearch_data * hash_p_;
-  
-public:
-  Dictionary ();
-  ~Dictionary ();
-  Dictionary (Dictionary const&);
-  T &elem (String s);
-  T const &elem (String s) const;
-  bool elem_b (String s) const;
-  void add (String, T);
-  void clear ();
-}
-
-Dictionary::Dictionary ()
-{
-  hash_p_ = new hsearch_data;
-  hash_p_->table = 0;
-
-  int start_size = 51;
-  int retval = hcreate_r (start_size, hash_p_);
-
-  assert (retval);
-}
-
-
-
-#endif
index 10542ee06a52a6575a258104be20003241a8d5a9..de0e793e0803ef589004b6a9c63a47e2abc56297 100644 (file)
@@ -7,12 +7,11 @@
 */
 
 #include <fstream.h>
 */
 
 #include <fstream.h>
-#include "assoc.hh"
+#include "dictionary-iter.hh"
 #include "dstream.hh"
 #include "scalar.hh"
 #include "text-db.hh"
 #include "string-convert.hh"
 #include "dstream.hh"
 #include "scalar.hh"
 #include "text-db.hh"
 #include "string-convert.hh"
-#include "assoc-iter.hh"
 #include "rational.hh"
 
 /// indent of each level
 #include "rational.hh"
 
 /// indent of each level
@@ -53,19 +52,19 @@ Dstream::identify_as (String name)
   String cl (strip_member (mem));
   String idx = cl;
 
   String cl (strip_member (mem));
   String idx = cl;
 
-  if (silent_assoc_p_->elem_b (mem))
+  if (silent_dict_p_->elem_b (mem))
     idx  = mem;
     idx  = mem;
-  else if (silent_assoc_p_->elem_b (cl))
+  else if (silent_dict_p_->elem_b (cl))
     idx = cl;
   else
     {
     idx = cl;
   else
     {
-      (*silent_assoc_p_)[idx] = default_silence_b_;
+      (*silent_dict_p_)[idx] = default_silence_b_;
     }
     }
-  local_silence_b_ = (*silent_assoc_p_)[idx];
+  local_silence_b_ = (*silent_dict_p_)[idx];
   if (current_classname_str_ != idx && !local_silence_b_)
     {
       current_classname_str_=idx;
   if (current_classname_str_ != idx && !local_silence_b_)
     {
       current_classname_str_=idx;
-      if (!(*silent_assoc_p_)["Dstream"])
+      if (!(*silent_dict_p_)["Dstream"])
        *os_l_ << "[" << current_classname_str_ << ":]"; // messy.
     }
   return *this;
        *os_l_ << "[" << current_classname_str_ << ":]"; // messy.
     }
   return *this;
@@ -74,9 +73,9 @@ Dstream::identify_as (String name)
 bool
 Dstream::silent_b (String s) const
 {
 bool
 Dstream::silent_b (String s) const
 {
-  if (!silent_assoc_p_->elem_b (s))
+  if (!silent_dict_p_->elem_b (s))
     return false;
     return false;
-  return (*silent_assoc_p_)[s];
+  return (*silent_dict_p_)[s];
 }
 
 Dstream &
 }
 
 Dstream &
@@ -138,7 +137,7 @@ Dstream::output (String s)
 Dstream::Dstream (ostream *r, char const * cfg_nm)
 {
   os_l_ = r;
 Dstream::Dstream (ostream *r, char const * cfg_nm)
 {
   os_l_ = r;
-  silent_assoc_p_ = new Assoc<String,bool>;
+  silent_dict_p_ = new Dictionary<bool>;
   default_silence_b_ = false;
   indent_level_i_ = 0;
   if (!os_l_)
   default_silence_b_ = false;
   indent_level_i_ = 0;
   if (!os_l_)
@@ -159,26 +158,26 @@ Dstream::Dstream (ostream *r, char const * cfg_nm)
        r.message (_ ("Not enough fields in Dstream init."));
        continue;
       }
        r.message (_ ("Not enough fields in Dstream init."));
        continue;
       }
-    (*silent_assoc_p_)[r[0]] = (bool)(int)(Scalar (r[1]));
+    (*silent_dict_p_)[r[0]] = (bool)(int)(Scalar (r[1]));
   }
 
   }
 
-  if ((*silent_assoc_p_).elem_b ("Dstream_default_silence"))
-    default_silence_b_ = (*silent_assoc_p_)["Dstream_default_silence"];
+  if ((*silent_dict_p_).elem_b ("Dstream_default_silence"))
+    default_silence_b_ = (*silent_dict_p_)["Dstream_default_silence"];
 }
 
 
 Dstream::~Dstream()
 {
 }
 
 
 Dstream::~Dstream()
 {
-  delete silent_assoc_p_;
+  delete silent_dict_p_;
   assert (!indent_level_i_) ;
 }
 
 void
 Dstream::clear_silence()
 {
   assert (!indent_level_i_) ;
 }
 
 void
 Dstream::clear_silence()
 {
-  for (Assoc_iter<String, bool> i (*silent_assoc_p_); i.ok(); i++)
+  for (Dictionary_iter<bool> i (*silent_dict_p_); i.ok(); i++)
     {
     {
-      i.val() = false;
+      i.val_ref() = false;
     }
 }
 
     }
 }
 
index 61dbd64e9b0ed8ccfdb9d0e0eba7a5e48bc29f54..e6408a1d15e347fd1a5e843d6c03fab551066903 100644 (file)
@@ -1,7 +1,9 @@
 /*
    path.cc - manipulation of paths and filenames.
 */
 /*
    path.cc - manipulation of paths and filenames.
 */
+
 #include <stdio.h>
 #include <stdio.h>
+
 #include "config.hh"
 #include "file-path.hh"
 #include "flower-debug.hh"
 #include "config.hh"
 #include "file-path.hh"
 #include "flower-debug.hh"
@@ -72,7 +74,7 @@ File_path::parse_path (String p)
 
 
 
 
 
 
-/** find a file.
+/** Find a file.
   It will search in the current dir, in the construction-arg, and
   in any other added path, in this order.
 
   It will search in the current dir, in the construction-arg, and
   in any other added path, in this order.
 
index 1e2debd13b4fbef8a313cc9cfaf1026b5e067676..b541681e87364a77be3de64f1d35fc5d45d092cd 100644 (file)
@@ -31,3 +31,13 @@ unsigned int hash (String s)
   return result;
 }
 
   return result;
 }
 
+
+unsigned int hash (unsigned int i)
+{
+  return i;
+}
+
+unsigned int hash (int i)
+{
+  return (unsigned) i;
+}
diff --git a/flower/include/assoc-iter.hh b/flower/include/assoc-iter.hh
deleted file mode 100644 (file)
index f1ba2f8..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  associter.hh -- part of flowerlib
-
-  (c) 1996 Han-Wen Nienhuys
-*/
-
-#ifndef ASSOCITER_HH
-#define ASSOCITER_HH
-
-#include "assoc.hh"
-
-/// an iterator for the #Assoc# class
-template<class K, class V>
-struct Assoc_iter {
-    int i;
-    Assoc<K,V> &assoc_;
-    /// we don't want to be bothered by const correctness
-    Assoc_iter (const Assoc<K,V> &a) :
-       assoc_((Assoc<K,V> &)a)
-    {  
-       i= next (0);
-    }
-    int next (int j) {
-       while (j < assoc_.arr.size() && assoc_.arr[j].free)
-           j++;
-       return j;
-    }
-    bool ok() const {
-       return i < assoc_.arr.size();
-    }
-    void OK() const {
-       assert (!ok() || !assoc_.arr[i].free);
-    }
-    void operator++(int) { i++; i = next (i); }
-    K key() { return assoc_.arr[i].key; }
-    V &val() { return assoc_.arr[i].val; }    
-};
-
-#endif
diff --git a/flower/include/assoc.hh b/flower/include/assoc.hh
deleted file mode 100644 (file)
index c0b3f5f..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-#ifndef ASSOC_HH
-#define ASSOC_HH
-
-#include "array.hh"
-#include <assert.h>
-
-/**
-  A helper for Assoc
- */
-template<class K, class V>
-struct Assoc_ent_ {
-  bool free;
-  K key;
-  V val;
-};
-
-
-/** mindblowingly stupid Associative array implementation.
-  Hungarian: map
-
-  TODO: a decent hash for strings.
- */
-template<class K, class V>
-struct Assoc {
-  Array< Assoc_ent_<K,V> > arr;
-
-  /* ************** */
-    
-  int find (K key) const {
-    for (int i = 0; i < arr.size(); i++) {
-      if (!arr[i].free && key == arr[i].key)
-       return i;
-    }
-    return -1;
-  }
-  int find_creat (K key) {
-    int free = -1;
-    for (int i = 0; i < arr.size(); i++) {
-      if (!arr[i].free && key == arr[i].key) {         
-       return i;
-      } else if (arr[i].free) {
-       free = i;
-      }
-    }
-    if (free >= 0){
-      arr[free].free = false;
-      arr[free].key = key;
-      return free;
-    }
-
-    Assoc_ent_<K,V> ae;
-    ae.free = false;
-    ae.key = key;
-    arr.push (ae);
-    return arr.size() -1;
-  }
-public:
-  bool elem_b (K key) const {
-    return find (key) >= 0;
-  }
-  void del (K key) {
-    assert (elem_b (key));
-    int i= find (key);
-    arr[i].free = true;
-  }
-  void add (K key, V val) {
-    int i = find_creat (key);
-    arr[i].val = val;
-  }
-  V& elem (K key) {
-    return arr[find_creat (key)].val;
-  }
-  V& operator[](K key) {
-    return elem (key);
-  }
-  V const & operator[](K key) const {
-    return elem (key);
-  }
-  V const & elem (K key) const { 
-    assert (elem_b (key));
-    return arr[find (key)].val;
-  }
-  void clear () 
-  {
-    for (int i=0 ;  i < arr.size (); i++)
-      arr[i].free = true;
-  }
-};
-
-#endif
index da6e64b391794279538bdbfc5a56003cce3a7f04..33531e584c442b402d9d6adf807cc93ae434d15b 100644 (file)
 
 #include "dictionary.hh"
 
 
 #include "dictionary.hh"
 
-
-
-#include "dictionary.hh"
-
-template<class V>
-class Dictionary_iter
+template<class K, class V>
+class Hash_table_iter
 {
 {
-  Dictionary<V> *dict_l_;
+  Hash_table<K,V> *dict_l_;
   int i;
 public:
   int i;
 public:
-  Dictionary_iter(Dictionary<V> const &dict)
+  Hash_table_iter(Hash_table<K,V> const &dict)
     {
       i =0;
     {
       i =0;
-      dict_l_ =(Dictionary<V> *) & dict;
+      dict_l_ =(Hash_table<K,V> *) & dict;
       next_used ();
     }
 
       next_used ();
     }
 
@@ -47,14 +43,30 @@ public:
       next_used ();
     }
 
       next_used ();
     }
 
-  String key ()
+  K key ()
+    {
+      return dict_l_->fixed_p_->dict_arr_[i].key_;
+    }
+  V val () 
     {
     {
-      return dict_l_->fixed_p_->dict_arr_[i].name_;
+      return dict_l_->fixed_p_->dict_arr_[i].value_;      
     }
     }
-  V val ()
+  V &val_ref ()
     {
       return dict_l_->fixed_p_->dict_arr_[i].value_;      
     }
 };
 
     {
       return dict_l_->fixed_p_->dict_arr_[i].value_;      
     }
 };
 
-#endif // DICTIONARY_ITER_HH
+template<class V>
+class Dictionary_iter<V> : public Hash_table_iter<String,V>
+{
+public:
+  Dictionary_iter (Dictionary<V> const &d)
+    : Hash_table_iter<String,V> (d)
+    {
+
+    }
+  
+  
+};
+#endif // Hash_table_ITER_HH
index e9caa46d64be7ed59e2f8688605427a03f79fe87..c9b5775f1b7d43ba5460e22dd4874eba23ddeef3 100644 (file)
 #include "array.hh"
 
 unsigned long prime_list (int idx);
 #include "array.hh"
 
 unsigned long prime_list (int idx);
-template<class V>
-struct Dict_entry
+template<class K, class V>
+struct Hash_table_entry
 {
 {
-  String name_;
+  K key_;
   V value_;
   bool free_b_;
 
   V value_;
   bool free_b_;
 
-  Dict_entry() {
+  Hash_table_entry() {
     free_b_ = true;
   }
     free_b_ = true;
   }
-  Dict_entry (String s, V v)
+  Hash_table_entry (K s, V v)
     {
     {
-      name_ = s;
+      key_ = s;
       value_ = v;
       free_b_ = false;
     }
 };
 
 unsigned int hash (String);
       value_ = v;
       free_b_ = false;
     }
 };
 
 unsigned int hash (String);
+unsigned int hash (int);
+
+template<class V>
+struct Dict_initialiser
+{
+  char *key_;
+  V value_;
+};
 
 /**
    A hash table of prime size.
 
    We use quadratic probing.  
  */
 
 /**
    A hash table of prime size.
 
    We use quadratic probing.  
  */
-template<class V>
-class Fixed_size_dictionary
+template<class K, class V>
+class Fixed_size_hash_table
 {
 public:
 {
 public:
-  Array<Dict_entry<V> > dict_arr_; 
+  Array<Hash_table_entry<K,V> > dict_arr_; 
   int size_idx_;
   int size_idx_;
-  Fixed_size_dictionary (int size_idx)
+  Fixed_size_hash_table (int size_idx)
     {
       size_idx_ = size_idx;
       int sz = prime_list(size_idx_);
     {
       size_idx_ = size_idx;
       int sz = prime_list(size_idx_);
@@ -53,7 +61,7 @@ public:
     }
 
   /// find #s#, or find first empty entry corresponding to #s#
     }
 
   /// find #s#, or find first empty entry corresponding to #s#
-  int lookup  (String s)
+  int lookup  (K s)
     {
       int sz =dict_arr_.size ();
       int i = hash (s) % sz;
     {
       int sz =dict_arr_.size ();
       int i = hash (s) % sz;
@@ -62,7 +70,7 @@ public:
        if (dict_arr_[i].free_b_)
          return i;
            
        if (dict_arr_[i].free_b_)
          return i;
            
-       if (dict_arr_[i].name_ == s)
+       if (dict_arr_[i].key_ == s)
          return i;
 
        j++;
          return i;
 
        j++;
@@ -73,14 +81,14 @@ public:
     }
 
   /// remove #s# from the hash table.  
     }
 
   /// remove #s# from the hash table.  
-  V remove (String s)
+  V remove (K s)
     {
       assert (false);          // Untested routine.
       int sz =dict_arr_.size ();
       int i = hash (s) % sz;
       int j = 0;
       V retval;
     {
       assert (false);          // Untested routine.
       int sz =dict_arr_.size ();
       int i = hash (s) % sz;
       int j = 0;
       V retval;
-      while (j <= sz/2 && dict_arr_[i].name_ != s)
+      while (j <= sz/2 && dict_arr_[i].key_ != s)
        {
          assert (!dict_arr_[i].free_b_);
            
        {
          assert (!dict_arr_[i].free_b_);
            
@@ -107,50 +115,57 @@ public:
 /**
    Hash table with sliding sizes. 
  */
 /**
    Hash table with sliding sizes. 
  */
-template<class V>
-class Dictionary
+template<class K, class V>
+class Hash_table
 {
 {
-  Fixed_size_dictionary<V> * fixed_p_;
+  Fixed_size_hash_table<K,V> * fixed_p_;
 
   /// set size to next prime, and copy contents
   void enlarge ()
     {
 
   /// set size to next prime, and copy contents
   void enlarge ()
     {
-      Fixed_size_dictionary<V> *f = new Fixed_size_dictionary<V> (fixed_p_->size_idx_ +1);
+      Fixed_size_hash_table<K,V> *f = new Fixed_size_hash_table<K,V> (fixed_p_->size_idx_ +1);
       for (int i=0; i < fixed_p_->dict_arr_.size(); i++)
        {
          if (fixed_p_->dict_arr_[i].free_b_)
            continue;
 
       for (int i=0; i < fixed_p_->dict_arr_.size(); i++)
        {
          if (fixed_p_->dict_arr_[i].free_b_)
            continue;
 
-         String nm (fixed_p_->dict_arr_[i].name_);
+         K nm (fixed_p_->dict_arr_[i].key_);
          int nl = f->lookup (nm);
          
          int nl = f->lookup (nm);
          
-         f->dict_arr_[nl] = Dict_entry<V> (nm, fixed_p_->dict_arr_[i].value_);
+         f->dict_arr_[nl] = Hash_table_entry<K,V> (nm, fixed_p_->dict_arr_[i].value_);
        }
       delete fixed_p_;
       fixed_p_ = f;
     }
 public:
        }
       delete fixed_p_;
       fixed_p_ = f;
     }
 public:
-  Dictionary ()
+  Hash_table ()
     {
     {
-      fixed_p_ = new Fixed_size_dictionary<V> (0);
+      fixed_p_ = new Fixed_size_hash_table<K,V> (0);
     }
     }
-  ~Dictionary ()
+  ~Hash_table ()
     {
       delete fixed_p_;
     }
     {
       delete fixed_p_;
     }
-  void operator = (Dictionary<V> const &src)
+  void operator = (Hash_table<K,V> const &src)
     {
       if (&src == this)
        return;
       
       delete fixed_p_;
     {
       if (&src == this)
        return;
       
       delete fixed_p_;
-      fixed_p_ = new Fixed_size_dictionary<V> (*src.fixed_p_);
+      fixed_p_ = new Fixed_size_hash_table<K,V> (*src.fixed_p_);
     }
     }
-  Dictionary (Dictionary<V> const &src)
+  Hash_table (Hash_table<K,V> const &src)
     {
     {
-      fixed_p_ = new Fixed_size_dictionary<V> (*src.fixed_p_);
+      fixed_p_ = new Fixed_size_hash_table<K,V> (*src.fixed_p_);
     }
     }
-  bool elem_b (String s) const
+
+  void clear ()
+    {
+      int i= fixed_p_->size_idx_;
+      delete fixed_p_;
+      fixed_p_ = new Fixed_size_hash_table<K,V> (i);
+    }
+  bool elem_b (K s) const
     {
       int l =  fixed_p_->lookup (s);
 
     {
       int l =  fixed_p_->lookup (s);
 
@@ -160,7 +175,7 @@ public:
   /**
      Find and return element.  If #s# is not in the table, create an entry in the table, and init
    */
   /**
      Find and return element.  If #s# is not in the table, create an entry in the table, and init
    */
-  V& elem (String s)
+  V& elem (K s)
     {
       int l;
       while ((l= fixed_p_->lookup (s)) <0)
     {
       int l;
       while ((l= fixed_p_->lookup (s)) <0)
@@ -170,34 +185,50 @@ public:
 
       
        fixed_p_->dict_arr_[l].free_b_ = false;
 
       
        fixed_p_->dict_arr_[l].free_b_ = false;
-       fixed_p_->dict_arr_[l].name_ = s;
+       fixed_p_->dict_arr_[l].key_ = s;
        return fixed_p_->dict_arr_[l].value_;
     }
        return fixed_p_->dict_arr_[l].value_;
     }
-  V elem (String s) const
+  V elem (K s) const
     {
       return const_elem (s);
     }
     {
       return const_elem (s);
     }
-  V const_elem (String k) const
+  V const_elem (K k) const
   {
       V retval;
       if (elem_b (k))
   {
       V retval;
       if (elem_b (k))
-       retval = ((Dictionary<V>*)this)->elem (k);
+       retval = ((Hash_table<K,V>*)this)->elem (k);
       return retval;
   }
       return retval;
   }
-  V& operator [] (String k)
+  V& operator [] (K k)
     {
       return elem (k);
     }
 
     {
       return elem (k);
     }
 
-  V operator [] (String k) const
+  V operator [] (K k) const
     {
       return const_elem (k);
     }
 
     {
       return const_elem (k);
     }
 
-  V remove (String s)
+  V remove (K s)
     {
       return fixed_p_->remove (s);      
     }
     {
       return fixed_p_->remove (s);      
     }
+  friend class Hash_table_iter<K,V>;
+};
+
+template<class V>
+class Dictionary : public Hash_table<String, V>
+{
+public:
+  Dictionary ()
+    {}
+  Dictionary (Dict_initialiser<V> *p)
+    {
+      for (Dict_initialiser<V> *q = p; q->key_; q++)
+       elem (q->key_) = q->value_;
+         
+    }
+
   friend class Dictionary_iter<V>;
 };
 
   friend class Dictionary_iter<V>;
 };
 
index a7379268ebcfae2c71f3ae4189ff871155680625..0217450b9ffb5ee09e5adf6524c052c53126bc42 100644 (file)
@@ -14,9 +14,6 @@
 
 const char eol= '\n';
 
 
 const char eol= '\n';
 
-template<class K,class V>
-struct Assoc;
-
 /**  Debug stream. 
    a class for providing debug output of nested structures,
    with indents according to \{\}()[].
 /**  Debug stream. 
    a class for providing debug output of nested structures,
    with indents according to \{\}()[].
@@ -41,7 +38,7 @@ class Dstream
   bool default_silence_b_;
   String current_classname_str_;
   void output (String s);
   bool default_silence_b_;
   String current_classname_str_;
   void output (String s);
-  Assoc<String, bool> *silent_assoc_p_;
+  Dictionary<bool> *silent_dict_p_;
 
 public:
   void clear_silence();
 
 public:
   void clear_silence();
index 96cbfc5db6ca640ac8a5e408626a1178ef562f11..d149d5f0229343be0e05a61ded75d8a6e81acfe9 100644 (file)
@@ -21,6 +21,9 @@ template<class T> struct Link_array;
 template<class T> struct Array;
 template<class T> struct sstack;
 template<class T,class K> struct Assoc;
 template<class T> struct Array;
 template<class T> struct sstack;
 template<class T,class K> struct Assoc;
+template<class K, class V> struct Hash_table;
+template<class K, class V> struct Hash_table_iter;
+template<class T> struct Dictionary_iter;
 template<class T> struct Dictionary;
 template<class T> struct Dictionary_iter;
 template<class T> struct List;
 template<class T> struct Dictionary;
 template<class T> struct Dictionary_iter;
 template<class T> struct List;
index b737d7bb47ce2e4ae8d5b25b7efb1e3b0db27441..77a69b519a1d87bd4725cb745e813b718c848042 100644 (file)
 template<class T>
 class Link_array : public Array<T*>
 {
 template<class T>
 class Link_array : public Array<T*>
 {
-    static default_compare (T *const& p1, T  *const&p2) {
-       /* can't do p1 -p2, since T might be an incomplete type */
-       if (p1 < p2)
-           return -1 ;
-       if (p2 < p1)
-           return 1;
-       return 0;
-    }
+  static default_compare (T *const& p1, T  *const&p2) {
+    /* can't do p1 -p2, since T might be an incomplete type */
+    if (p1 < p2)
+      return -1 ;
+    if (p2 < p1)
+      return 1;
+    return 0;
+  }
 public:
 public:
-    void substitute (T *old, T*new_l)
+  void substitute (T *old, T*new_l)
     {
     {
-       int i;
-       while ((i = find_i (old)) >=0) 
-           if (new_l)
-               elem (i) =new_l;
-           else
-               del (i);
+      int i;
+      while ((i = find_i (old)) >=0) 
+       if (new_l)
+         elem (i) =new_l;
+       else
+         del (i);
     }
     }
-    void unordered_substitute (T* old, T * new_l)
+  void unordered_substitute (T* old, T * new_l)
     {
     {
-       int i;
-       while ((i = find_i (old)) >=0) 
-           if (new_l)
-               elem (i) =new_l;
-           else {
-               unordered_del (i);
-           }
+      int i;
+      while ((i = find_i (old)) >=0) 
+       if (new_l)
+         elem (i) =new_l;
+       else {
+         unordered_del (i);
+       }
     
     }
     
     }
-    void default_sort() {
-       sort (default_compare);
-    }
-    void uniq() {
-       Link_array<T> l_arr;
-       for (int i=0; i < size(); i++) 
-           if (!i || elem (i-1) != elem (i))
-               l_arr.push (elem (i)); 
-       *this = l_arr;
-    }
+  void default_sort() {
+    sort (default_compare);
+  }
+  void uniq() {
+    Link_array<T> l_arr;
+    for (int i=0; i < size(); i++) 
+      if (!i || elem (i-1) != elem (i))
+       l_arr.push (elem (i)); 
+    *this = l_arr;
+  }
 
 
-    int find_i (T const * t) const {
-       for (int i=0; i < size(); i++)
-           if (elem (i) == t)
-               return i;
-       return -1;
-    }
-    T *find_l (T const *t) const
+  int find_i (T const * t) const {
+    for (int i=0; i < size(); i++)
+      if (elem (i) == t)
+       return i;
+    return -1;
+  }
+  T *find_l (T const *t) const
     {
     {
-       int i = find_i (t);
-       if (i >= 0)
-           return elem (i);
-       else
-           return 0;
+      int i = find_i (t);
+      if (i >= 0)
+       return elem (i);
+      else
+       return 0;
     }
 };
 
     }
 };
 
+template<class T, class V>
+Link_array<T>
+typecast_array (Link_array<V> const &a, T * /* dummy */ )
+{
+  Link_array<T> ret;
+  for (int i=a.size (); i-- ; )
+       ret.push (dynamic_cast<T*> (a[i]));     // ugh?
+  return ret;
+}
+
+
 #endif // PARRAY_HH
 #endif // PARRAY_HH
+
index c15b6ae4760b7140e1d8f5a429dc26381fdabd9e..11f088408155292bbd2ecf9a5f2777337dc8765d 100644 (file)
@@ -56,6 +56,7 @@ StaffContext=\translator {
        \consists "Separating_line_group_engraver";
          
        \accepts "Voice";
        \consists "Separating_line_group_engraver";
          
        \accepts "Voice";
+       dynamicStyle = "dynamic";
 };
 
 \translator{\StaffContext }
 };
 
 \translator{\StaffContext }
@@ -94,15 +95,17 @@ VoiceContext = \translator {
        \consists "Rest_engraver";
        \consists "Dot_column_engraver";
        \consists "Stem_engraver";
        \consists "Rest_engraver";
        \consists "Dot_column_engraver";
        \consists "Stem_engraver";
-%      \consists "Plet_engraver";
-       \consists "Command_beam_engraver";
+       \consists "Beam_engraver";
        \consists "Abbreviation_beam_engraver";
        \consists "Multi_measure_rest_engraver";
        \consists "Abbreviation_beam_engraver";
        \consists "Multi_measure_rest_engraver";
+
+       % ugh.  Order matters here.
+       \consists "Text_engraver";
        \consists "Script_engraver";
        \consists "Rhythmic_column_engraver";
        \consists "Font_size_engraver";
        \consists "Slur_engraver";
        \consists "Script_engraver";
        \consists "Rhythmic_column_engraver";
        \consists "Font_size_engraver";
        \consists "Slur_engraver";
-       \consists "Command_tie_engraver";
+       \consists "Tie_engraver";
        \consists "Tuplet_engraver";    
        \consists "Note_heads_engraver" ;       
        \consists "Skip_req_swallow_translator";
        \consists "Tuplet_engraver";    
        \consists "Note_heads_engraver" ;       
        \consists "Skip_req_swallow_translator";
@@ -144,7 +147,6 @@ GrandStaffContext=\translator{
        \consists "Lyric_engraver";
        \consists "Extender_engraver";
        \consists "Beam_req_swallow_translator";
        \consists "Lyric_engraver";
        \consists "Extender_engraver";
        \consists "Beam_req_swallow_translator";
-       \consists "Plet_swallow_engraver";
 }
 
 \translator {
 }
 
 \translator {
index 0c8cbb637b7ac2afa03c13d4d280bb551cc7da26..0a06045445489a8abc684309ba96228d30139085 100644 (file)
@@ -80,19 +80,11 @@ chordInversion              0/1     Find and display chord with inversion?
 %hmm, (these) abbrevs suck, imo
 % i guess they're meant as some form of doco
 % that's what i use them for...
 %hmm, (these) abbrevs suck, imo
 % i guess they're meant as some form of doco
 % that's what i use them for...
-stemup = \notes {
-       s1*0
-       % Stupid hack to make < { \stemup } > work
+stemup = 
        \property Voice.ydirection = \up 
        \property Voice.ydirection = \up 
-       }
-stemboth= \notes {
-       s1*0
-       \property Voice.ydirection = \center
-}
-stemdown = \notes {    
-       s1*0
-       \property Voice.ydirection = \down
-}
+stemboth=      \property Voice.ydirection = \center
+stemdown =     \property Voice.ydirection = \down
+
 slurup = \notes {
        s1*0
        \property Voice.slurydirection = \up 
 slurup = \notes {
        s1*0
        \property Voice.slurydirection = \up 
index b28e661056d58567a9c0ccdce8da193cf61f3234..257395ea6d5ccbfbd46edd94d3977ebf6d1196cd 100644 (file)
@@ -6,7 +6,7 @@
 
 table_eleven  = \symboltables {
 
 
 table_eleven  = \symboltables {
 
-   \font       "feta11.afm"
+   \font       "feta11"
 
     % index symbol #parameters         xmin xmax ymin ymax
 
 
     % index symbol #parameters         xmin xmax ymin ymax
 
index 78ae676aa50855adc05e2187f9177a3f58b9ed8c..20cb23c70b4b24ee6977cf3840f87658b31f5929 100644 (file)
@@ -6,7 +6,7 @@
 
 table_thirteen  = \symboltables {
 
 
 table_thirteen  = \symboltables {
 
-   \font       "feta13.afm"
+   \font       "feta13"
 
     % index symbol #parameters         xmin xmax ymin ymax
 
 
     % index symbol #parameters         xmin xmax ymin ymax
 
index b2a6813d9f2a8b2be71ccd0b7e1d5472133d4d39..a3460fa9bf26263ecc8fe98abee5110aa049e6b4 100644 (file)
@@ -7,7 +7,7 @@
 
 table_sixteen= 
 \symboltables {
 
 table_sixteen= 
 \symboltables {
-   \font       "feta16.afm"
+   \font       "feta16"
 
    % index symbol #parameters          xmin xmax ymin ymax
 
 
    % index symbol #parameters          xmin xmax ymin ymax
 
index ccb9bcbef43186663b676939b400a5301f5b30c9..b9b1deec9c0c14cca3dbe13661bb54318f15bb47 100644 (file)
@@ -7,7 +7,7 @@
 table_twenty = 
 \symboltables {
 
 table_twenty = 
 \symboltables {
 
-   \font       "feta20.afm"
+   \font       "feta20"
 
     % index symbol #parameters         xmin xmax ymin ymax
 
 
     % index symbol #parameters         xmin xmax ymin ymax
 
index 76925b35bb4a7f2b8a3ed437fa7f2400de3fc52b..2b95f42698adcc8f6387deefe4e1d4eb84f65b52 100644 (file)
@@ -6,7 +6,7 @@
 
 table_twentysix  = \symboltables {
 
 
 table_twentysix  = \symboltables {
 
-   \font       "feta26.afm"
+   \font       "feta26"
 
     % index symbol #parameters         xmin xmax ymin ymax
 
 
     % index symbol #parameters         xmin xmax ymin ymax
 
index 2295120799bc2b57f7bdf5030dfed255a953eb1c..84f1511fa12ec3ba1c220fdeb305787db10523cd 100644 (file)
@@ -15,7 +15,7 @@ Would this be acceptable/good enough/convenient for entry?
    Csus; Csus4            c-4; c-sus
 %}
 
    Csus; Csus4            c-4; c-sus
 %}
 
-scales = \notes\transpose c''\chords{
+scales = \notes \transpose c'' \chords{
                %<c1 e g>
                c1-m c-min c4-dim c-aug c-sus c-maj
                 c1-6 c4-7 c-9 c-11 c-13
                %<c1 e g>
                c1-m c-min c4-dim c-aug c-sus c-maj
                 c1-6 c4-7 c-9 c-11 c-13
diff --git a/input/test/spacing-2.ly b/input/test/spacing-2.ly
new file mode 100644 (file)
index 0000000..8e1bece
--- /dev/null
@@ -0,0 +1,36 @@
+\header {
+opus = "BWV 937 (prelude)";
+composer = "J. S. Bach";
+source = "Petits Preludes et Fugues.  Urtext. Editions Henry Lemoine, Paris.";
+}
+
+%{
+1. upon stretching: every note should stretch according to duration
+
+2. 8th notes should be spaced equidistantly.
+%}
+
+\score { 
+    \notes \relative c''
+       \type GrandStaff <
+       \type Staff = SA <
+               \type Voice = VA { \property Voice.ydirection= 1
+                       e4 dis4 e2 }
+               \type Voice = VB { \property Voice.ydirection= -1
+                       [cis8 a] [fis b] gis2 }
+               {\key e; }
+               >
+       \type Staff = SB { \clef "bass"; \key e;
+               [a,,16 e dis e] [b'8 b,] [e16 e, gis b] e4
+       } 
+> 
+
+\paper 
+{
+}
+\paper 
+{
+%      linewidth = 5.0 \cm; % ly2dvi barfs on -1
+       linewidth = 8.0 \cm;
+}
+}
index f9f8b89dff9b27cd47d757718ce004c039d46ef5..04eb7dec728b6a204171349f84259336a8bf1ea9 100644 (file)
@@ -27,7 +27,7 @@ Abbreviation::do_print () const
 }
 
 Molecule*
 }
 
 Molecule*
-Abbreviation::brew_molecule_p () const
+Abbreviation::do_brew_molecule_p () const
 {
   Real interbeam_f = paper ()->interbeam_f (stem_l_->mult_i_);
   Real w = 1.5 * lookup_l ()->ball (2).dim_.x ().length ();
 {
   Real interbeam_f = paper ()->interbeam_f (stem_l_->mult_i_);
   Real w = 1.5 * lookup_l ()->ball (2).dim_.x ().length ();
index 341a0e8d82ca4be41c00748ec80a4f56e298d6f9..94aa9f4d08b777b55c92ce5b0f73212b7fd7f5e4 100644 (file)
@@ -30,12 +30,12 @@ Abbreviation_beam::Abbreviation_beam ()
 }
 
 Molecule*
 }
 
 Molecule*
-Abbreviation_beam::brew_molecule_p () const 
+Abbreviation_beam::do_brew_molecule_p () const 
 {
   /* 
    todo
    */
 {
   /* 
    todo
    */
-  return Beam::brew_molecule_p ();
+  return Beam::do_brew_molecule_p ();
 #if 0
   Molecule *mol_p = new Molecule;
   // huh? inter-what
 #if 0
   Molecule *mol_p = new Molecule;
   // huh? inter-what
diff --git a/lily/afm-list.cc b/lily/afm-list.cc
new file mode 100644 (file)
index 0000000..d22ff0b
--- /dev/null
@@ -0,0 +1,49 @@
+#include "pointer.hh"
+#include "main.hh"
+#include "all-fonts.hh"
+#include "debug.hh"
+#include "warn.hh"
+#include "afm.hh"
+
+const char * default_font_sz_ = "cmr10";
+
+
+
+All_font_metrics::All_font_metrics (String path)
+{
+  search_path_.parse_path (path);
+  
+  String f = default_font_sz_ + String (".afm");
+  f = search_path_.find (f);
+  if (f.empty_b ())
+    error (_f("Can't find default font (PATH = %s)", path));
+  
+
+  afm_p_dict_[default_font_sz_] = new Adobe_font_metric (read_afm_file (f));
+}
+
+Adobe_font_metric *
+All_font_metrics::find_font (String name)
+{
+  if (!afm_p_dict_.elem_b (name))
+    {
+      String path = name  + ".afm";
+      path = search_path_.find (path);
+      if (path.empty_b ())
+       {
+         warning (_f ("Can't find `%s'", name));
+         return afm_p_dict_[default_font_sz_];
+       }
+      
+      *mlog << "[" << path;
+      Adobe_font_metric
+       * afm_p = new Adobe_font_metric (read_afm_file (path));
+      *mlog << "]" << flush ;
+
+      afm_p_dict_[name] = afm_p;
+    }
+
+  return afm_p_dict_[name];
+}
+
+
index ba3adae70f6fdd903755c8730c99dacffa2128ba..3b186d3558f9d6caefe34dfea4bcbf33aafe6e11 100644 (file)
@@ -58,7 +58,7 @@ read_char_metric (String s)
 }
 
 void
 }
 
 void
-read_char_metrics (Array<Adobe_font_char_metric> &mets, Data_file &input)
+Adobe_font_metric::read_char_metrics (Data_file &input)
 {
   while (!input.eof_b ())
     {
 {
   while (!input.eof_b ())
     {
@@ -66,7 +66,11 @@ read_char_metrics (Array<Adobe_font_char_metric> &mets, Data_file &input)
       String s= input.get_line ();
       if (s == "EndCharMetrics")
        return ;
       String s= input.get_line ();
       if (s == "EndCharMetrics")
        return ;
-      mets.push (read_char_metric (s));
+      Adobe_font_char_metric afm_char =read_char_metric (s);
+      char_metrics_.push (afm_char);
+      int i = char_metrics_.size ()-1;
+      ascii_to_metric_idx_ [afm_char.C_] = i;
+      name_to_metric_dict_ [afm_char.N_] = i;
     }
 }
 
     }
 }
 
@@ -98,14 +102,19 @@ read_box ( Data_file &d)
 }
 
 Adobe_font_metric
 }
 
 Adobe_font_metric
-read_afm (String fn)
+read_afm_file (String fn)
 {
   Data_file input (fn);
 
   assert (!input.eof_b ());
   
   Adobe_font_metric afm;
 {
   Data_file input (fn);
 
   assert (!input.eof_b ());
   
   Adobe_font_metric afm;
-  
+
+  for (int i=0; i < 256; i++)
+    {
+      afm.ascii_to_metric_idx_.push (-1);
+    }
+
   while (!input.eof_b ())
     {
       input.gobble_leading_white ();
   while (!input.eof_b ())
     {
       input.gobble_leading_white ();
@@ -136,7 +145,7 @@ read_afm (String fn)
       if (key == "StartCharMetrics")
        {
          input.get_line ();
       if (key == "StartCharMetrics")
        {
          input.get_line ();
-         read_char_metrics (afm.char_metrics_, input);
+         afm.read_char_metrics (input);
        }
       if (key == "EndFontMetrics")
        break;
        }
       if (key == "EndFontMetrics")
        break;
index ac38313de73bcaeadfd86d31b1e1ad84e75280f8..e81bf3ad106d96a392019406c44cadc6343b5a01 100644 (file)
@@ -107,12 +107,13 @@ Adobe_font_metric::str () const
 Adobe_font_char_metric
 Adobe_font_metric::find_char (String nm, bool warn) const
 {
 Adobe_font_char_metric
 Adobe_font_metric::find_char (String nm, bool warn) const
 {
-  for (int i=0; i < char_metrics_.size (); i++)
-    if (char_metrics_[i].N_ == nm)
-      return char_metrics_[i];
-  if (warn)
-    warning (_f ("can't find character called `%s'", nm.ch_C()));
-
- Adobe_font_char_metric a;
return a;
+  if (warn && !name_to_metric_dict_.elem_b (nm))
+    {
+      Adobe_font_char_metric m;
+      warning (_f ("can't find character called `%s'", nm.ch_C()));
+      return m;
+    }
+  
 return char_metrics_[name_to_metric_dict_ [nm]];
 }
 }
+
index be150860370baa775723b30cb384db9c8b800b71..efe4bf30f137244cff9f06caf3c07d1355325d46 100644 (file)
@@ -91,6 +91,7 @@ Atom::str () const
 Offset
 Atom::offset () const
 {
 Offset
 Atom::offset () const
 {
+  check_infinity_b ();
   return off_;
 }
 
   return off_;
 }
 
index 96dee1b25c6583645dffebe7c9c2d9e7460fc477..d3c0a1af5675a36ac23d6d8ab9d516f63ed069f4 100644 (file)
@@ -30,7 +30,7 @@ Bar_column_engraver::do_creation_processing ()
 void
 Bar_column_engraver::do_process_requests ()
 {
 void
 Bar_column_engraver::do_process_requests ()
 {
-  Scalar pri = get_property ("barColumnPriority");
+  Scalar pri = get_property ("barColumnPriority", 0);
   if (pri.length_i() && pri.isnum_b ())
     {
       break_priority_i_ = int(pri);
   if (pri.length_i() && pri.isnum_b ())
     {
       break_priority_i_ = int(pri);
index 91c23feb2caa12d78ea21fefd783bac7c99b923b..2f1e8ee051b78360eb4d564fed347606b89cdfaa 100644 (file)
@@ -45,7 +45,7 @@ Bar_engraver::create_bar ()
     {
       bar_p_ = new Bar;
       bar_p_->break_priority_i_  = 0;
     {
       bar_p_ = new Bar;
       bar_p_->break_priority_i_  = 0;
-      String default_type = get_property ("defaultBarType");
+      String default_type = get_property ("defaultBarType", 0);
       if (default_type.length_i ())
        {
          bar_p_->type_str_ = default_type;
       if (default_type.length_i ())
        {
          bar_p_->type_str_ = default_type;
@@ -85,7 +85,7 @@ Bar_engraver::do_process_requests()
   else 
     {
       Time_description const *time = get_staff_info().time_C_;
   else 
     {
       Time_description const *time = get_staff_info().time_C_;
-      String always = get_property ("barAlways");
+      String always = get_property ("barAlways", 0);
       if ((time && !time->whole_in_measure_) || always.length_i ()) 
        create_bar ();
     }
       if ((time && !time->whole_in_measure_) || always.length_i ()) 
        create_bar ();
     }
index 67e4dc2fc49659378b65c562a3c9930161a02029..2d0412f42741fb4b8a12e8da47820a03a761deb5 100644 (file)
@@ -50,7 +50,7 @@ Bar_number_engraver::acknowledge_element (Score_element_info i)
   script_p_->specs_p_ = td_p->clone ();
   script_p_->breakable_b_ = true;
 
   script_p_->specs_p_ = td_p->clone ();
   script_p_->breakable_b_ = true;
 
-  Scalar pri = get_property ("barNumberBreakPriority");
+  Scalar pri = get_property ("barNumberBreakPriority", 0);
   if (pri.length_i () && pri.isnum_b ())
     {
       script_p_->break_priority_i_ = int (pri);
   if (pri.length_i () && pri.isnum_b ())
     {
       script_p_->break_priority_i_ = int (pri);
@@ -58,7 +58,7 @@ Bar_number_engraver::acknowledge_element (Score_element_info i)
   else
     script_p_->break_priority_i_ = b->break_priority_i_;
 
   else
     script_p_->break_priority_i_ = b->break_priority_i_;
 
-  Scalar padding = get_property ("barScriptPadding");
+  Scalar padding = get_property ("barScriptPadding", 0);
   if (padding.length_i() && padding.isnum_b ())
     {
       script_p_->padding_f_ = Real(padding);
   if (padding.length_i() && padding.isnum_b ())
     {
       script_p_->padding_f_ = Real(padding);
index 7e49b7088fe0a2e72b80ce1bfe96571d818bdbb4..58e4ab9ed650f2df7d61220064801e664454084d 100644 (file)
@@ -30,7 +30,7 @@ Bar::do_print () const
 }
 
 Molecule*
 }
 
 Molecule*
-Bar::brew_molecule_p () const
+Bar::do_brew_molecule_p () const
 {    
   Paper_def *p = paper ();
   Atom s = lookup_l ()->bar (type_str_, p->get_var ("barsize"));
 {    
   Paper_def *p = paper ();
   Atom s = lookup_l ()->bar (type_str_, p->get_var ("barsize"));
index c8357fa38842d84bfae0fe9657e29b8d9413a325..7353da47f8738ce684fef026628b0307646a2520 100644 (file)
-/*
-  beam-grav.cc -- implement Beam_engraver
-
+/*   
+  beam-engraver.cc --  implement Beam_engraver
+  
   source file of the GNU LilyPond music typesetter
   source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
 
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-#include "duration-convert.hh"
-#include "time-description.hh"
 #include "beam-engraver.hh"
 #include "beam-engraver.hh"
-#include "stem.hh"
-#include "beam.hh"
 #include "musical-request.hh"
 #include "musical-request.hh"
+#include "beam.hh"
 #include "grouping.hh"
 #include "grouping.hh"
-#include "p-col.hh"
+#include "stem.hh"
 #include "warn.hh"
 #include "warn.hh"
+#include "time-description.hh"
 
 
-Beam_engraver::Beam_engraver()
+Beam_engraver::Beam_engraver ()
 {
 {
-  span_reqs_drul_[LEFT] = span_reqs_drul_[RIGHT] =0;
-  beam_p_ =0;
-  current_grouping_p_ =0;
+  beam_p_ = 0;
+  finished_beam_p_ =0;
+  finished_grouping_p_ = 0;
+  grouping_p_ =0;
+  reqs_drul_[LEFT] = reqs_drul_[RIGHT] =0;
 }
 
 bool
 }
 
 bool
-Beam_engraver::do_try_music (Music*r)
+Beam_engraver::do_try_music (Music *m)
 {
 {
-  Beam_req* b = dynamic_cast <Beam_req *> (r);
-  if (!b)
-    return false;
-
-  if (bool (beam_p_) == bool (b->spantype_ == START))
-    return false;
-
-  Direction d = (!beam_p_) ? LEFT : RIGHT;
-  if (span_reqs_drul_[d] && !span_reqs_drul_[d]->equal_b (b))
-    return false;
-
-  span_reqs_drul_[d] = b;
-  return true;
+  if (Beam_req * c = dynamic_cast<Beam_req*>(m))
+    {
+      reqs_drul_[c->spantype_] = c;
+      return true;
+    }
+  return false;
 }
 
 }
 
+
 void
 void
-Beam_engraver::do_process_requests()
+Beam_engraver::do_process_requests ()
 {
 {
-  if (beam_p_ || !span_reqs_drul_[LEFT])
-    return;
+  if (reqs_drul_[STOP])
+    {
+      if (!beam_p_)
+       reqs_drul_[STOP]->warning (_("No beam to stop"));
+      finished_beam_p_ = beam_p_;
+      finished_grouping_p_ = grouping_p_;
 
 
-  current_grouping_p_ = new Rhythmic_grouping;
-  beam_p_ = new Beam;
+      beam_p_ = 0;
+      grouping_p_ = 0;
+    }
+  
+  if (reqs_drul_[START])
+    {
+      beam_p_ = new Beam;
+      grouping_p_ = new Rhythmic_grouping;
 
 
-  Scalar prop = get_property ("beamslopedamping");
-  if (prop.isnum_b ()) 
-    beam_p_->damping_i_ = prop;
+      Scalar prop = get_property ("beamslopedamping", 0);
+      if (prop.isnum_b ()) 
+       beam_p_->damping_i_ = prop;
 
 
-  prop = get_property ("beamquantisation");
-  if (prop.isnum_b ()) 
-    beam_p_->quantisation_ = (Beam::Quantisation)(int)prop;
+      prop = get_property ("beamquantisation", 0);
+      if (prop.isnum_b ()) 
+       beam_p_->quantisation_ = (Beam::Quantisation)(int)prop;
  
  
-  announce_element (Score_element_info (beam_p_, span_reqs_drul_[LEFT]));
+      announce_element (Score_element_info (beam_p_, reqs_drul_[START]));
+    }
 }
 
 void
 }
 
 void
-Beam_engraver::do_pre_move_processing()
+Beam_engraver::typeset_beam ()
 {
 {
-  if (!beam_p_ || !span_reqs_drul_[RIGHT]) 
-    return;
-
-  Rhythmic_grouping const * rg_C = get_staff_info().rhythmic_C_;
-  rg_C->extend (current_grouping_p_->interval());
-  beam_p_->set_grouping (*rg_C, *current_grouping_p_);
-  typeset_element (beam_p_);
-  beam_p_ = 0;
-
-  delete current_grouping_p_;
-  current_grouping_p_ = 0;
-
-  span_reqs_drul_[RIGHT] = span_reqs_drul_[LEFT] = 0;
+  if (finished_beam_p_)
+    {
+      Rhythmic_grouping const * rg_C = get_staff_info().rhythmic_C_;
+      rg_C->extend (finished_grouping_p_->interval());
+      finished_beam_p_->set_grouping (*rg_C, *finished_grouping_p_);
+      typeset_element (finished_beam_p_);
+      finished_beam_p_ = 0;
+    
+      delete finished_grouping_p_;
+      finished_grouping_p_= 0;
+    
+      reqs_drul_[STOP] = 0;
+    }
 }
 
 void
 }
 
 void
-Beam_engraver::do_removal_processing()
+Beam_engraver::do_post_move_processing ()
 {
 {
-  if (beam_p_)
-    {
-      span_reqs_drul_[LEFT]->warning (_("unterminated beam"));
-      typeset_element (beam_p_);
-      beam_p_ =0;
-    }
+  reqs_drul_ [START] =0;
 }
 
 }
 
-
 void
 void
-Beam_engraver::acknowledge_element (Score_element_info i)
+Beam_engraver::do_pre_move_processing ()
 {
 {
-  Stem* s = dynamic_cast<Stem *> (i.elem_l_);
-  if (!beam_p_ || !s)
-    return;
+  typeset_beam ();
+}
 
 
-  if (!dynamic_cast <Rhythmic_req *> (i.req_l_))
-    {
-      ::warning ( _("Stem must have Rhythmic structure."));
-      return;
-    }
+void
+Beam_engraver::do_removal_processing ()
+{
+  typeset_beam ();
+  finished_beam_p_ = beam_p_;
+  finished_grouping_p_ = grouping_p_;
+  typeset_beam ();
+}
 
 
-  Rhythmic_req *rhythmic_req = dynamic_cast <Rhythmic_req *> (i.req_l_);
-  if (rhythmic_req->duration_.durlog_i_<= 2)
-    {
-      rhythmic_req->warning (_ ("stem doesn't fit in beam"));
-      return;
-    }
+void
+Beam_engraver::acknowledge_element (Score_element_info info)
+{
+    if (beam_p_)
+      {
+       Stem* stem_l = dynamic_cast<Stem *> (info.elem_l_);
+       if (!stem_l)
+         return;
+
+
+       Rhythmic_req *rhythmic_req = dynamic_cast <Rhythmic_req *> (info.req_l_);
+       if (!rhythmic_req)
+         {
+           String s=_("Stem must have Rhythmic structure.");
+           if (info.req_l_)
+             info.req_l_->warning(s);
+           else
+             ::warning (s);
+         
+           return;
+         }
+      
+
+       if (rhythmic_req->duration_.durlog_i_<= 2)
+         {
+           rhythmic_req->warning (_ ("stem doesn't fit in beam"));
+           return;
+         }
+
+       /*
+         TODO: do something sensible if it doesn't fit in the beam.
+       */
+       Moment start = get_staff_info().time_C_->whole_in_measure_;
+
+       if (!grouping_p_->child_fit_b (start))
+         {
+           String s (_("please fix me") + ": " 
+                     + _f ("stem at %s doesn't fit in beam", now_moment ().str ()));
+
+           if (info.req_l_)
+             info.req_l_->warning(s);
+           else 
+             warning (s);
+         }
+       else
+         {
+           grouping_p_->add_child (start, rhythmic_req->duration ());
+           stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_;
+           beam_p_->add_stem (stem_l);
+         }
+      }
+}
 
 
-  /*
-    TODO: do something sensible if it doesn't fit in the beam.
-   */
-  Moment start = get_staff_info().time_C_->whole_in_measure_;
 
 
-  if (!current_grouping_p_->child_fit_b (start))
-    {
-      String s (_("please fix me") + ": " 
-       + _f ("stem at %s doesn't fit in beam", now_moment ().str ()));
-      if (i.req_l_)
-       i.req_l_->warning(s);
-      else 
-       warning (s);
-    }
-  else
-    {
-      current_grouping_p_->add_child (start, rhythmic_req->duration ());
-      s->flag_i_ = rhythmic_req->duration_.durlog_i_;
-      beam_p_->add_stem (s);
-    }
-}
 
 ADD_THIS_TRANSLATOR(Beam_engraver);
 
 ADD_THIS_TRANSLATOR(Beam_engraver);
index 6e50bbf30b2487ae1e4bc6b46db1651e8a9e13a7..ec41c7a964b5b76b8ca4b6c4d1f813f8291da323 100644 (file)
@@ -62,10 +62,9 @@ Beam::add_stem (Stem*s)
 }
 
 Molecule*
 }
 
 Molecule*
-Beam::brew_molecule_p () const
+Beam::do_brew_molecule_p () const
 {
   Molecule *mol_p = new Molecule;
 {
   Molecule *mol_p = new Molecule;
-
   Real internote_f = paper ()->internote_f ();
 
   Real x0 = stems_[0]->hpos_f ();
   Real internote_f = paper ()->internote_f ();
 
   Real x0 = stems_[0]->hpos_f ();
@@ -89,7 +88,7 @@ Beam::brew_molecule_p () const
 Offset
 Beam::center () const
 {
 Offset
 Beam::center () const
 {
-  Real w= (paper ()->note_width () + width ().length ())/2.0;
+  Real w= (paper ()->note_width () + extent (X_AXIS).length ())/2.0;
   return Offset (w, (left_y_ + w* slope_f_)*paper ()->internote_f ());
 }
 
   return Offset (w, (left_y_ + w* slope_f_)*paper ()->internote_f ());
 }
 
@@ -610,12 +609,17 @@ Beam::set_grouping (Rhythmic_grouping def, Rhythmic_grouping cur)
     assert (stems_.size () == b.size ()/2);
   }
 
     assert (stems_.size () == b.size ()/2);
   }
 
-  for (int j=0, i=0; i < b.size () && j <stems_.size (); i+= 2, j++)
+  for (int j=0, i=0; i < b.size () && j <stems_.size (); j++)
     {
       Stem *s = stems_[j];
     {
       Stem *s = stems_[j];
-      s->beams_i_drul_[LEFT] = b[i];
-      s->beams_i_drul_[RIGHT] = b[i+1];
-      multiple_i_ = multiple_i_ >? (b[i] >? b[i+1]);
+      Direction d = LEFT;
+      do {
+       if (s->beams_i_drul_[d] < 0)
+         s->beams_i_drul_[d] = b[i];
+
+       multiple_i_ = multiple_i_ >? s->beams_i_drul_[d];
+       i++;
+      } while ((flip (&d)) != LEFT);
     }
 }
 
     }
 }
 
index 016308a23359fabbcb805135b52c2225bf475aa5..935eae60b3930c28a8c0020c54b9211d61c1bd79 100644 (file)
@@ -25,7 +25,7 @@ Bow::Bow ()
 }
 
 Molecule*
 }
 
 Molecule*
-Bow::brew_molecule_p () const
+Bow::do_brew_molecule_p () const
 {
   Real thick = paper ()->get_var ("slur_thickness");
   Array<Offset> c = get_controls ();
 {
   Real thick = paper ()->get_var ("slur_thickness");
   Array<Offset> c = get_controls ();
@@ -63,7 +63,7 @@ Bow::center () const
 {
   Real dy = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT];
 
 {
   Real dy = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT];
 
-  Real dx = width ().length ();
+  Real dx =  extent(X_AXIS).length ();
 
   return Offset (dx / 2, dy);
 }
 
   return Offset (dx / 2, dy);
 }
@@ -115,7 +115,7 @@ Bow::get_encompass_offset_arr () const
 {
   Offset d (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
     dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
 {
   Offset d (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
     dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
-  d.x() += width (). length ();
+  d.x() += extent (X_AXIS). length ();
 
   Array<Offset> notes;
   notes.push (Offset (0, 0));
 
   Array<Offset> notes;
   notes.push (Offset (0, 0));
diff --git a/lily/cbeam-engraver.cc b/lily/cbeam-engraver.cc
deleted file mode 100644 (file)
index 1b65892..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-/*   
-  cbeam-engraver.cc --  implement Command_beam_engraver
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#include "cbeam-engraver.hh"
-#include "musical-request.hh"
-#include "beam.hh"
-#include "grouping.hh"
-#include "stem.hh"
-#include "warn.hh"
-#include "time-description.hh"
-
-Command_beam_engraver::Command_beam_engraver ()
-{
-  beam_p_ = 0;
-  finished_beam_p_ =0;
-  finished_grouping_p_ = 0;
-  grouping_p_ =0;
-  reqs_drul_[LEFT] = reqs_drul_[RIGHT] =0;
-}
-
-bool
-Command_beam_engraver::do_try_music (Music *m)
-{
-  if (Beam_req * c = dynamic_cast<Beam_req*>(m))
-    {
-      reqs_drul_[c->spantype_] = c;
-      return true;
-    }
-  return false;
-}
-
-
-void
-Command_beam_engraver::do_process_requests ()
-{
-  if (reqs_drul_[STOP])
-    {
-      if (!beam_p_)
-       reqs_drul_[STOP]->warning (_("No beam to stop"));
-      finished_beam_p_ = beam_p_;
-      finished_grouping_p_ = grouping_p_;
-
-      beam_p_ = 0;
-      grouping_p_ = 0;
-    }
-  
-  if (reqs_drul_[START])
-    {
-      beam_p_ = new Beam;
-      grouping_p_ = new Rhythmic_grouping;
-
-      Scalar prop = get_property ("beamslopedamping");
-      if (prop.isnum_b ()) 
-       beam_p_->damping_i_ = prop;
-
-      prop = get_property ("beamquantisation");
-      if (prop.isnum_b ()) 
-       beam_p_->quantisation_ = (Beam::Quantisation)(int)prop;
-      announce_element (Score_element_info (beam_p_, reqs_drul_[START]));
-    }
-}
-
-void
-Command_beam_engraver::typeset_beam ()
-{
-  if (finished_beam_p_)
-    {
-      Rhythmic_grouping const * rg_C = get_staff_info().rhythmic_C_;
-      rg_C->extend (finished_grouping_p_->interval());
-      finished_beam_p_->set_grouping (*rg_C, *finished_grouping_p_);
-      typeset_element (finished_beam_p_);
-      finished_beam_p_ = 0;
-    
-      delete finished_grouping_p_;
-      finished_grouping_p_= 0;
-    
-      reqs_drul_[STOP] = 0;
-    }
-}
-
-void
-Command_beam_engraver::do_post_move_processing ()
-{
-  reqs_drul_ [START] =0;
-}
-
-void
-Command_beam_engraver::do_pre_move_processing ()
-{
-  typeset_beam ();
-}
-
-void
-Command_beam_engraver::do_removal_processing ()
-{
-  typeset_beam ();
-  finished_beam_p_ = beam_p_;
-  finished_grouping_p_ = grouping_p_;
-  typeset_beam ();
-}
-
-void
-Command_beam_engraver::acknowledge_element (Score_element_info info)
-{
-    if (beam_p_)
-      {
-       Stem* stem_l = dynamic_cast<Stem *> (info.elem_l_);
-       if (!stem_l)
-         return;
-
-
-       Rhythmic_req *rhythmic_req = dynamic_cast <Rhythmic_req *> (info.req_l_);
-       if (!rhythmic_req)
-         {
-           String s=_("Stem must have Rhythmic structure.");
-           if (info.req_l_)
-             info.req_l_->warning(s);
-           else
-             ::warning (s);
-         
-           return;
-         }
-      
-
-       if (rhythmic_req->duration_.durlog_i_<= 2)
-         {
-           rhythmic_req->warning (_ ("stem doesn't fit in beam"));
-           return;
-         }
-
-       /*
-         TODO: do something sensible if it doesn't fit in the beam.
-       */
-       Moment start = get_staff_info().time_C_->whole_in_measure_;
-
-       if (!grouping_p_->child_fit_b (start))
-         {
-           String s (_("please fix me") + ": " 
-                     + _f ("stem at %s doesn't fit in beam", now_moment ().str ()));
-
-           if (info.req_l_)
-             info.req_l_->warning(s);
-           else 
-             warning (s);
-         }
-       else
-         {
-           grouping_p_->add_child (start, rhythmic_req->duration ());
-           stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_;
-           beam_p_->add_stem (stem_l);
-         }
-      }
-}
-
-
-
-ADD_THIS_TRANSLATOR(Command_beam_engraver);
index b9d87032e1043ac32a3d62bd2ed1c73c58a1c605..79190f393ba793d15f787f5d8e8b5eb3314b1d37 100644 (file)
@@ -14,6 +14,7 @@
 #include "paper-def.hh"
 #include "main.hh"
 #include "dimensions.hh"
 #include "paper-def.hh"
 #include "main.hh"
 #include "dimensions.hh"
+#include "g-text-item.hh"
 
 ADD_THIS_TRANSLATOR (Chord_name_engraver);
 
 
 ADD_THIS_TRANSLATOR (Chord_name_engraver);
 
@@ -39,6 +40,11 @@ Chord_name_engraver::do_try_music (Music* m)
   return false;
 }
 
   return false;
 }
 
+/*
+  UGH.
+
+  Split this routine into neat packets
+ */
 void
 Chord_name_engraver::do_process_requests ()
 {
 void
 Chord_name_engraver::do_process_requests ()
 {
@@ -53,28 +59,19 @@ Chord_name_engraver::do_process_requests ()
      - move this stuff to new Item class Chord_name
      - switch on property, add american (?) chordNameStyle
 
      - move this stuff to new Item class Chord_name
      - switch on property, add american (?) chordNameStyle
 
-  Scalar chordNameStyle = get_property ("chordNameStyle");
+  Scalar chordNameStyle = get_property ("chordNameStyle", 0);
   if (chordNameStyle == "Banter")
      chord = pitches_to_banter (pitch_arr_));
 
    */
 
   if (chordNameStyle == "Banter")
      chord = pitches_to_banter (pitch_arr_));
 
    */
 
-  Scalar style = get_property ("textstyle");
-  Scalar alignment = get_property ("textalignment");
-  Text_def* text_p = new Text_def;
-  text_p->align_dir_ = LEFT;
-  if (style.length_i ())
-    text_p->style_str_ = style;
-  if (alignment.isnum_b())
-    text_p->align_dir_= (Direction)(int)alignment;
-
-
+  
   /*
     find tonic: after longest line of triads
    */
 
   int tonic_i = 0;
   /*
     find tonic: after longest line of triads
    */
 
   int tonic_i = 0;
-  Scalar chord_inversions = get_property ("chordInversion");
+  Scalar chord_inversions = get_property ("chordInversion", 0);
   if (chord_inversions.to_bool ())
     {
       int longest_i = 0;
   if (chord_inversions.to_bool ())
     {
       int longest_i = 0;
@@ -190,10 +187,15 @@ Chord_name_engraver::do_process_requests ()
        + acc[tonic.accidental_i_ + 2];
 
     }
        + acc[tonic.accidental_i_ + 2];
 
     }
-  text_p->text_str_ = tonic_str + "$^{" + add_str + "}$" + inversion_str;
-  Text_item* item_p =  new Text_item (text_p);
-  item_p->dir_ = DOWN;
-  item_p->fat_b_ = true;
+  
+  G_text_item* item_p =  new G_text_item;
+
+
+  item_p->text_str_ = tonic_str + "$^{" + add_str + "}$" + inversion_str;
+  Scalar style = get_property ("textstyle", 0);
+  if (style.length_i ())
+    item_p->style_str_ = style;
+  
   text_p_arr_.push (item_p);
   announce_element (Score_element_info (item_p, 0));
 }
   text_p_arr_.push (item_p);
   announce_element (Score_element_info (item_p, 0));
 }
index 775a1885f3000610ffcd528b5511e87ac7b508e1..ca50b0dab2acdc1e4ad333467c8fd04f08e59455 100644 (file)
@@ -166,7 +166,7 @@ Clef_engraver::acknowledge_element (Score_element_info info)
 void
 Clef_engraver::do_creation_processing()
 {
 void
 Clef_engraver::do_creation_processing()
 {
-  Scalar def = get_property ("defaultClef");
+  Scalar def = get_property ("defaultClef", 0);
   if (def.to_bool ()) // egcs: Scalar to bool is ambiguous
     set_type (def);
   
   if (def.to_bool ()) // egcs: Scalar to bool is ambiguous
     set_type (def);
   
index d860b494f2c9f2836b691adb079eb2abb8350ef6..e65cd806760114bced5163a3077c90dbd60a2709 100644 (file)
@@ -50,7 +50,7 @@ Clef_item::Clef_item()
 
 
 Molecule*
 
 
 Molecule*
-Clef_item::brew_molecule_p() const
+Clef_item::do_brew_molecule_p() const
 {
   String t = symbol_;
   if  (change_b_)
 {
   String t = symbol_;
   if  (change_b_)
index 581a9491b74db9a14cee9babe7a2179000cb2e59..fcacaf53ecaf5f99735553c865bbdca3e188d9bb 100644 (file)
@@ -35,7 +35,7 @@ Column_info::Column_info (Paper_column *col_l, Real const *fixed_C)
     fixpos_p_.set_l (fixed_C);
   ugh_b_ = false;
   pcol_l_ = col_l;
     fixpos_p_.set_l (fixed_C);
   ugh_b_ = false;
   pcol_l_ = col_l;
-  width_ = pcol_l_->width();
+  width_ = pcol_l_->extent(X_AXIS);
   if (width_.empty_b())
     width_ = Interval(0,0);
 }
   if (width_.empty_b())
     width_ = Interval(0,0);
 }
index 0ce2b67d6cdc5b95b81ed30dbe4e9da739f87fa7..1ab0353bc558ab32d3c74da961a4e5e34e09e678 100644 (file)
@@ -50,9 +50,6 @@ Bar_req::do_equal_b (Request*r) const
   return b && type_str_ == b->type_str_;
 }
 
   return b && type_str_ == b->type_str_;
 }
 
-void
-Command_tie_req::do_print () const
-{}
 
 
 
 
 
 
index 1e9b804a1f28b3226e99358f5e09dc0b6a8d940c..47eff97b90bc308bab4722999612d962772f390e 100644 (file)
@@ -32,7 +32,7 @@ static Real absdyn_dim = 10 PT;       // ugh
 Atom
 Crescendo::get_symbol() const
 {
 Atom
 Crescendo::get_symbol() const
 {
-  Real w_dim = width().length ();
+  Real w_dim = extent(X_AXIS).length ();
   if (dyn_b_drul_[LEFT])
     {
       w_dim -= absdyn_dim;
   if (dyn_b_drul_[LEFT])
     {
       w_dim -= absdyn_dim;
@@ -61,7 +61,7 @@ Crescendo::get_symbol() const
 }
 
 Molecule*
 }
 
 Molecule*
-Crescendo::brew_molecule_p() const
+Crescendo::do_brew_molecule_p() const
 {
   Molecule* m_p =0;
   Real x_off_dim=0.0;
 {
   Molecule* m_p =0;
   Real x_off_dim=0.0;
diff --git a/lily/ctie-engraver.cc b/lily/ctie-engraver.cc
deleted file mode 100644 (file)
index 662a554..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*   
-  ctie-engraver.cc --  implement Command_tie_engraver
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#include "ctie-engraver.hh"
-#include "command-request.hh"
-#include "note-head.hh"
-#include "musical-request.hh"
-#include "tie.hh"
-
-Command_tie_engraver::Command_tie_engraver()
-{
-  req_l_ = 0;
-}
-
-
-bool
-Command_tie_engraver::do_try_music (Music *m)
-{
-  if (Command_tie_req * c = dynamic_cast<Command_tie_req*> (m))
-    {
-      req_l_ = c;
-      return true;
-    }
-  return false;
-}
-
-void
-Command_tie_engraver::acknowledge_element (Score_element_info i)
-{
-  if (Note_head *nh = dynamic_cast<Note_head *> (i.elem_l_))
-    {
-      Note_req * m = dynamic_cast<Note_req* > (i.req_l_);
-      now_heads_.push (CHead_melodic_tuple (nh, m, now_moment()+ m->duration ()));
-    }
-}
-
-void
-Command_tie_engraver::do_process_requests ()
-{
-  if (req_l_)
-    {
-      Moment now = now_moment ();
-      Link_array<Note_head> nharr;
-      
-      stopped_heads_.clear ();
-      while (past_notes_pq_.size ()
-            && past_notes_pq_.front ().end_ == now)
-       stopped_heads_.push (past_notes_pq_.get ());
-
-    }
-}
-
-void
-Command_tie_engraver::process_acknowledged ()
-{
-  if (req_l_)
-    {
-      if (now_heads_.size () != stopped_heads_.size ())
-       {
-         req_l_->warning ("Unequal number of note heads for tie");
-       }
-      int sz = now_heads_.size () <? stopped_heads_.size ();
-
-      // hmm. Should do something more sensible.
-      // because, we assume no more noteheads come along after the 1st pass.
-      if (sz > tie_p_arr_.size ())
-       {
-         now_heads_.sort (CHead_melodic_tuple::pitch_compare);
-         stopped_heads_.sort(CHead_melodic_tuple::pitch_compare);
-
-         for (int i=0; i < sz; i++)
-           {
-             Tie * p = new Tie;
-             p->set_head (LEFT, stopped_heads_[i].head_l_);
-             p->set_head (RIGHT, now_heads_[i].head_l_);
-             tie_p_arr_.push (p);
-             announce_element (Score_element_info (p, req_l_));
-           }
-       }
-    }
-}
-
-void
-Command_tie_engraver::do_pre_move_processing ()
-{
-  for (int i=0; i < now_heads_.size (); i++)
-    {
-      past_notes_pq_.insert (now_heads_[i]);
-    }
-  now_heads_.clear( );
-  
-  for (int i=0; i<  tie_p_arr_.size (); i++)
-    {
-      typeset_element (tie_p_arr_[i]);
-    }
-  tie_p_arr_.clear ();
-}
-
-void
-Command_tie_engraver::do_post_move_processing ()
-{
-  req_l_ =0;
-  Moment now = now_moment ();
-  while (past_notes_pq_.size () && past_notes_pq_.front ().end_ < now)
-    past_notes_pq_.delmin ();
-}
-
-
-
-ADD_THIS_TRANSLATOR(Command_tie_engraver);
-
-
-CHead_melodic_tuple::CHead_melodic_tuple ()
-{
-  head_l_ =0;
-  mel_l_ =0;
-  end_ = 0;
-}
-
-CHead_melodic_tuple::CHead_melodic_tuple (Note_head *h, Melodic_req*m, Moment mom)
-{
-  head_l_ = h;
-  mel_l_ = m;
-  end_ = mom;
-}
-
-int
-CHead_melodic_tuple::pitch_compare (CHead_melodic_tuple const&h1,
-                            CHead_melodic_tuple const &h2)
-{
-  return Melodic_req::compare (*h1.mel_l_, *h2.mel_l_);
-}
-
-int
-CHead_melodic_tuple::time_compare (CHead_melodic_tuple const&h1,
-                            CHead_melodic_tuple const &h2)
-{
-  return (h1.end_ - h2.end_ ).sign ();
-}
diff --git a/lily/dimension-cache.cc b/lily/dimension-cache.cc
new file mode 100644 (file)
index 0000000..8746337
--- /dev/null
@@ -0,0 +1,151 @@
+/*   
+  dimension-cache.cc --  implement Dimension_cache
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ */
+
+#include "dimension-cache.hh"
+#include "parray.hh"
+
+Dimension_cache::Dimension_cache (Dimension_cache const &d)
+{
+  init();
+  empty_b_ = d.empty_b_;
+}
+
+Dimension_cache::Dimension_cache ()
+{
+  init();
+}
+
+void
+Dimension_cache::init()
+{
+  offset_ =0.0;
+  elt_l_ = 0;
+  dim_.set_empty ();
+  parent_l_ =0;
+  valid_b_ = false;
+  empty_b_ = false;
+}
+
+
+void
+Dimension_cache::invalidate ()
+{
+  valid_b_ = false;
+  invalidate_dependencies ();
+}
+
+void
+Dimension_cache::invalidate_dependencies ()
+{
+  for (int i=0; i < dependencies_l_arr_.size (); i++)
+    {
+      Dimension_cache * g = dependencies_l_arr_[i];
+      if (g->valid_b_)
+       {
+         g->invalidate ();
+       }
+    }
+}
+
+void
+Dimension_cache::set_offset (Real x)
+{
+  invalidate_dependencies ();
+  offset_ = x;
+}
+
+void
+Dimension_cache::translate (Real x)
+{
+  invalidate_dependencies ();
+  offset_ += x;
+}
+
+
+Real
+Dimension_cache::absolute_coordinate () const
+{
+  Real r = offset_;
+  for (Dimension_cache * c = parent_l_;
+       c; c = c->parent_l_)
+    r += c->offset_;
+  return r;
+}
+
+Real
+Dimension_cache::relative_coordinate (Dimension_cache *d) const
+{
+  Real r =0.0;
+
+  for (Dimension_cache* c = parent_l_;
+       c != d;
+       c = c->parent_l_)
+    r +=  c->offset_;
+  return r;
+}
+
+Dimension_cache *
+Dimension_cache::common_group (Dimension_cache const* s) const
+{
+  Link_array<Dimension_cache const> my_groups;
+  for (Dimension_cache const *c = this;
+       c ; c = c->parent_l_)
+    my_groups.push (c);
+  
+  
+  Dimension_cache const *common=0;
+  
+  for (Dimension_cache const * d = s;
+       !common && d;
+       d = d->parent_l_)
+    common = my_groups.find_l (d);
+
+  return (Dimension_cache*)common;
+}
+
+
+
+void
+Dimension_cache::set_empty (bool b)
+{
+  if (empty_b_ != b)
+    {
+      empty_b_ = b;
+      if (!empty_b_)
+       invalidate ();
+    }
+}  
+
+void
+Dimension_cache::set_dim (Interval v)
+{
+  dim_ = v;
+  valid_b_ = true;
+}
+  
+
+Interval
+Dimension_cache::get_dim () const
+{
+  Interval r;
+  if (empty_b_)
+    {
+      r.set_empty ();
+      return r;
+    }
+      
+  assert (valid_b_);
+
+  r=dim_;
+  if (!r.empty_b()) // float exception on DEC Alpha
+    r += offset_;
+
+  return r;
+}
+
+
index bd4954920b80f7ad097b482015283a4c290020e3..2be0a8c774fdf0bece535fbfaa33c43f5522b160 100644 (file)
@@ -21,7 +21,7 @@ Directional_spanner::Directional_spanner()
 Offset
 Directional_spanner::center () const
 {
 Offset
 Directional_spanner::center () const
 {
-  Real w= width ().length ();
+  Real w= extent (X_AXIS).length ();
   Offset o (w/2, 0);  
   return o;
 }
   Offset o (w/2, 0);  
   return o;
 }
index 97afd43bf25f747d247ff003a26598cc76e40616..a802c5cfa21802e7767fb2adb4f28b5e2cb91c7b 100644 (file)
@@ -47,10 +47,10 @@ Dot_column::do_pre_processing ()
 {
   Interval w;
   for (int i=0; i < head_l_arr_.size (); i++)
 {
   Interval w;
   for (int i=0; i < head_l_arr_.size (); i++)
-    w.unite (head_l_arr_[i]->width ());
+    w.unite (head_l_arr_[i]->extent (X_AXIS));
   
   if (!w.empty_b ())
   
   if (!w.empty_b ())
-    translate_axis (w[RIGHT] - width() [LEFT],X_AXIS);
+    translate_axis (w[RIGHT] - extent(X_AXIS) [LEFT],X_AXIS);
 }
 
 
 }
 
 
index 8b39c3e56628490396b154be30991e0011d06588..1a40a51570dc0a2ddc813bd60d9d59993a0658d6 100644 (file)
@@ -30,7 +30,7 @@ Dots::do_post_processing ()
 }
 
 Molecule* 
 }
 
 Molecule* 
-Dots::brew_molecule_p () const
+Dots::do_brew_molecule_p () const
 {
   Molecule *out = new Molecule;
   Atom fill = lookup_l ()->fill (Box (Interval (0,0),
 {
   Molecule *out = new Molecule;
   Atom fill = lookup_l ()->fill (Box (Interval (0,0),
index bf4b890c7035e49841d11682d5f48f2a08d8d1ce..dd36db400b7215294dea6a6ba2df4acad8ba43ed 100644 (file)
 #include "score-column.hh"
 #include "staff-sym.hh"
 #include "note-column.hh"
 #include "score-column.hh"
 #include "staff-sym.hh"
 #include "note-column.hh"
+#include "g-text-item.hh"
+#include "g-staff-side.hh"
+#include "engraver.hh"
+#include "stem.hh"
+#include "note-head.hh"
+
+/**
+   print text & hairpin dynamics.
+ */
+class Dynamic_engraver : public Engraver
+{
+  G_text_item * text_p_;
+  G_staff_side_item * staff_side_p_;
+  
+  Crescendo * to_end_cresc_p_;
+  Crescendo * cresc_p_;
+  Span_dynamic_req * cresc_req_l_;
+  Array<Dynamic_req*> dynamic_req_l_arr_;
+  void  typeset_all ();
+public:
+  VIRTUAL_COPY_CONS(Translator);
+  Dynamic_engraver();
+  
+protected:
+  virtual void do_removal_processing ();
+  virtual void acknowledge_element (Score_element_info);
+  virtual bool do_try_music (Music *req_l);
+  virtual void do_process_requests();
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
+};
+
+
 
 Dynamic_engraver::Dynamic_engraver()
 {
   do_post_move_processing();
 
 Dynamic_engraver::Dynamic_engraver()
 {
   do_post_move_processing();
-  dir_ = CENTER;
-  dynamic_p_ =0;
+  text_p_ =0;
+  staff_side_p_ =0;
   to_end_cresc_p_ = cresc_p_ = 0;
   cresc_req_l_ = 0;
 }
   to_end_cresc_p_ = cresc_p_ = 0;
   cresc_req_l_ = 0;
 }
@@ -54,24 +87,33 @@ Dynamic_engraver::do_process_requests()
       Dynamic_req *dreq_l = dynamic_req_l_arr_[i];
       if (Absolute_dynamic_req *absd = dynamic_cast<Absolute_dynamic_req *> (dreq_l))
        {
       Dynamic_req *dreq_l = dynamic_req_l_arr_[i];
       if (Absolute_dynamic_req *absd = dynamic_cast<Absolute_dynamic_req *> (dreq_l))
        {
-
-         if (dynamic_p_)
+         if (text_p_)
            {
              dynamic_req_l_arr_[i]->warning (_("Got a dynamic already.  Continuing dazed and confused"));
              continue;
            }
          
            {
              dynamic_req_l_arr_[i]->warning (_("Got a dynamic already.  Continuing dazed and confused"));
              continue;
            }
          
-         Text_def * td_p = new Text_def;
          String loud = absd->loudness_str ();
          String loud = absd->loudness_str ();
-         td_p->text_str_ =  paper ()->lookup_l (0)->dynamic (loud).str_; // ugh
-         td_p->style_str_ = "dynamic";
-         td_p->align_dir_ = RIGHT; // Ugh, Doesn't give any effect?
-         Real nw_f = paper ()->note_width () * 0.8;
 
 
-         dynamic_p_ = new Text_item (td_p);
-         //      dynamic_p_->translate (Offset (nw_f, 0)); // Removed, Mats B
+         text_p_ = new G_text_item;
+         text_p_->text_str_ =  paper ()->lookup_l (0)->dynamic (loud).str_;
+         Scalar prop = get_property ("dynamicStyle", 0);
+
+         text_p_->style_str_ = prop.length_i () ? prop :  "dynamic";
+
+         staff_side_p_ = new G_staff_side_item;
+         staff_side_p_->set_victim (text_p_);
+         
 
 
-         announce_element (Score_element_info (dynamic_p_, dreq_l));
+         prop = get_property ("dynamicDir", 0);
+         if (prop.isnum_b ())
+           {
+             staff_side_p_->dir_ = (Direction) (int) prop;
+           }
+
+
+         announce_element (Score_element_info (text_p_, dreq_l));
+         announce_element (Score_element_info (staff_side_p_, dreq_l));
        }
       else if (Span_dynamic_req *span_l = dynamic_cast <Span_dynamic_req *> (dreq_l))
        {
        }
       else if (Span_dynamic_req *span_l = dynamic_cast <Span_dynamic_req *> (dreq_l))
        {
@@ -86,6 +128,12 @@ Dynamic_engraver::do_process_requests()
                  assert (!to_end_cresc_p_);
                  to_end_cresc_p_ =cresc_p_;
                  cresc_p_ = 0;
                  assert (!to_end_cresc_p_);
                  to_end_cresc_p_ =cresc_p_;
                  cresc_p_ = 0;
+                 Scalar prop = get_property ("dynamicDir", 0);
+                 if (prop.isnum_b ())
+                   {
+                     to_end_cresc_p_->dir_ = (Direction) (int) prop;
+                   }
+                 
                }
            }
          else if (span_l->spantype_ == START)
                }
            }
          else if (span_l->spantype_ == START)
@@ -110,9 +158,11 @@ Dynamic_engraver::do_process_requests()
       
       cresc_p_ = new_cresc_p;
       cresc_p_->set_bounds(LEFT,get_staff_info().musical_l ());
       
       cresc_p_ = new_cresc_p;
       cresc_p_->set_bounds(LEFT,get_staff_info().musical_l ());
-      if (dynamic_p_)
+      if (text_p_)
        {
          cresc_p_->dyn_b_drul_[LEFT] = true;
        {
          cresc_p_->dyn_b_drul_[LEFT] = true;
+         if (to_end_cresc_p_)
+           to_end_cresc_p_->dyn_b_drul_[RIGHT] = true;
        }
     }
 }
        }
     }
 }
@@ -122,33 +172,12 @@ Dynamic_engraver::do_pre_move_processing()
 {
   Staff_symbol* s_l = get_staff_info().staff_sym_l_;
   if (to_end_cresc_p_)
 {
   Staff_symbol* s_l = get_staff_info().staff_sym_l_;
   if (to_end_cresc_p_)
-    {
-      if (dynamic_p_)
-       to_end_cresc_p_->dyn_b_drul_[RIGHT]=true;
+    to_end_cresc_p_->add_support (s_l);
+  if (staff_side_p_)
+    staff_side_p_->add_support (s_l);
 
 
 
 
-      Scalar prop = get_property ("dynamicdir");
-      if (prop.isnum_b ())
-       {
-         to_end_cresc_p_->dir_ = (Direction) (int) prop;
-       }
-      to_end_cresc_p_->set_bounds(RIGHT,get_staff_info().musical_l ());
-      to_end_cresc_p_->add_support (s_l);
-      typeset_element (to_end_cresc_p_);
-      to_end_cresc_p_ = 0;
-    }
-  if (dynamic_p_)
-    {
-      Scalar prop = get_property ("dynamicdir");
-      if (prop.isnum_b ())
-       {
-         dynamic_p_->dir_ = (Direction) (int) prop;
-       }
-      
-      dynamic_p_->add_support (s_l);
-      typeset_element (dynamic_p_);
-      dynamic_p_ = 0;
-    }
+  typeset_all ();
 }
 
 
 }
 
 
@@ -161,29 +190,41 @@ Dynamic_engraver::do_removal_processing ()
   if (cresc_p_)
     {
       typeset_element (cresc_p_ );
   if (cresc_p_)
     {
       typeset_element (cresc_p_ );
-      
       cresc_req_l_->warning (_ ("unended crescendo"));
       cresc_p_ =0;
     }
       cresc_req_l_->warning (_ ("unended crescendo"));
       cresc_p_ =0;
     }
+  typeset_all ();
+}
+
+
+void
+Dynamic_engraver::typeset_all ()
+{  
   if (to_end_cresc_p_)
     {
   if (to_end_cresc_p_)
     {
+      to_end_cresc_p_->set_bounds(RIGHT,get_staff_info().musical_l ());
       typeset_element (to_end_cresc_p_);
       to_end_cresc_p_ =0;
     }
       typeset_element (to_end_cresc_p_);
       to_end_cresc_p_ =0;
     }
-  if (dynamic_p_)
+  if (text_p_)
     {
     {
-      typeset_element (dynamic_p_);
-      dynamic_p_ =0;
+      typeset_element (text_p_);
+      typeset_element (staff_side_p_);
+      text_p_ =0;
+      staff_side_p_ =0;
     }
 }
 
     }
 }
 
+
 void
 Dynamic_engraver::acknowledge_element (Score_element_info i)
 {
 void
 Dynamic_engraver::acknowledge_element (Score_element_info i)
 {
-  if (dynamic_cast<Note_column *> (i.elem_l_))
+  if (dynamic_cast<Stem *> (i.elem_l_)
+      || dynamic_cast<Note_head *> (i.elem_l_)
+      )
     {
     {
-      if (dynamic_p_)
-       dynamic_p_->add_support (i.elem_l_);
+      if (staff_side_p_)
+       staff_side_p_->add_support (i.elem_l_);
 
       if (to_end_cresc_p_)
        to_end_cresc_p_->add_support (i.elem_l_);
 
       if (to_end_cresc_p_)
        to_end_cresc_p_->add_support (i.elem_l_);
index 163287b6556e417b0f99bb51e0d0d4275883c3a8..1a352c49a76c677c876482babe55414830695135 100644 (file)
@@ -45,7 +45,7 @@ Encompass_info::Encompass_info (Note_column const* note, Direction dir)
   if (stem->dir_ != dir)
     o_.x () -= 0.5 * notewidth * stem->dir_;
 
   if (stem->dir_ != dir)
     o_.x () -= 0.5 * notewidth * stem->dir_;
 
-  o_.y () = stem->height ()[dir];
+  o_.y () = stem->extent (Y_AXIS)[dir];
   /*
    leave a gap: slur mustn't touch head/stem
    */
   /*
    leave a gap: slur mustn't touch head/stem
    */
index 98190d67483022ac96c5d00e2ac1a01fe4978ea0..1ba1f66f792596f03129efeb975313dc9f860232 100644 (file)
@@ -40,17 +40,17 @@ Extender_spanner::~Extender_spanner ()
 Offset
 Extender_spanner::center () const
 {
 Offset
 Extender_spanner::center () const
 {
-  Real dx = width ().length ();
+  Real dx = extent (X_AXIS).length ();
 
   return Offset (dx / 2, 0);
 }
 
 Molecule*
 
   return Offset (dx / 2, 0);
 }
 
 Molecule*
-Extender_spanner::brew_molecule_p () const
+Extender_spanner::do_brew_molecule_p () const
 {
   Molecule* mol_p = new Molecule;
 
 {
   Molecule* mol_p = new Molecule;
 
-  Real w = width ().length ();
+  Real w = extent (X_AXIS).length ();
   
   w += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
   
   
   w += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
   
@@ -94,9 +94,9 @@ Extender_spanner::do_post_processing ()
     {
       Text_item* t = textitem_l_drul_[d] ? textitem_l_drul_[d] : textitem_l_drul_[(Direction)-d];
 
     {
       Text_item* t = textitem_l_drul_[d] ? textitem_l_drul_[d] : textitem_l_drul_[(Direction)-d];
 
-      dy_f_drul_[d] += t->height ().length () / 2;
+      dy_f_drul_[d] += t->extent (Y_AXIS).length () / 2;
       if (d == LEFT)
       if (d == LEFT)
-        dx_f_drul_[d] += t->width ().length ();
+        dx_f_drul_[d] += t->extent (X_AXIS).length ();
       else
        dx_f_drul_[d] -= d * nw_f / 2;
 
       else
        dx_f_drul_[d] -= d * nw_f / 2;
 
index e67c90a287b6031b75d54ff3b7c4dec42d339382..d71b5fddb6e1f824b679a2e1cf1131b86d06e37e 100644 (file)
@@ -18,7 +18,7 @@ Font_size_engraver::Font_size_engraver ()
 void
 Font_size_engraver::do_process_requests ()
 {
 void
 Font_size_engraver::do_process_requests ()
 {
-  Scalar s (get_property ("fontsize"));
+  Scalar s (get_property ("fontsize", 0));
   
   if (s.length_i ()  && s.isnum_b ())
     {
   
   if (s.length_i ()  && s.isnum_b ())
     {
diff --git a/lily/g-staff-side.cc b/lily/g-staff-side.cc
new file mode 100644 (file)
index 0000000..357f585
--- /dev/null
@@ -0,0 +1,78 @@
+/*   
+  g-staff-side.cc --  implement G_staff_side_item
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "g-staff-side.hh"
+
+void
+G_staff_side_item::do_pre_processing ()
+{
+  if (!dir_)
+    set_default_direction ();
+}
+
+void
+G_staff_side_item::set_default_direction ()
+{
+  dir_ = DOWN;
+}
+
+G_staff_side_item::G_staff_side_item ()
+{
+  dir_ = CENTER;
+  to_position_l_ = 0;
+  transparent_b_ = true;
+}
+
+void
+G_staff_side_item::set_victim (Score_element *e)
+{
+  add_dependency (e);
+  to_position_l_ = e;
+  to_position_l_->dim_cache_[Y_AXIS].parent_l_ = &dim_cache_[Y_AXIS];
+}
+
+void
+G_staff_side_item::add_support (Score_element*e)
+{
+  add_dependency (e);
+  support_l_arr_.push (e);
+}
+
+
+void
+G_staff_side_item::do_substitute_dependency (Score_element*o, Score_element*n)
+{
+  if (o == to_position_l_)
+    to_position_l_ = n;
+  else
+    support_l_arr_.unordered_substitute (o,n);
+}
+
+
+void
+G_staff_side_item::do_post_processing ()
+{
+  Dimension_cache *common = common_group (typecast_array (support_l_arr_, (Graphical_element*)0),
+                                         Y_AXIS);
+
+  Interval dim;
+  for (int i=0; i < support_l_arr_.size (); i++)
+    {
+      Score_element * e = support_l_arr_ [i];
+      Real coord = e->relative_coordinate (common, Y_AXIS);
+      dim.unite (coord + e->extent (Y_AXIS));
+    }
+  if (!support_l_arr_.size ())
+    dim = Interval (0,0);
+
+  Interval sym_dim = to_position_l_->extent (Y_AXIS);
+  Real off = dim_cache_[Y_AXIS].relative_coordinate (common);
+  
+  dim_cache_[Y_AXIS].set_offset (dim[dir_] - sym_dim[-dir_] - off);
+}
diff --git a/lily/g-text-item.cc b/lily/g-text-item.cc
new file mode 100644 (file)
index 0000000..26751ae
--- /dev/null
@@ -0,0 +1,26 @@
+/*   
+  g-text-item.cc -- implement G_text_item
+
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "g-text-item.hh"
+#include "atom.hh"
+#include "molecule.hh"
+#include "paper-def.hh"
+#include "lookup.hh"
+
+Molecule*
+G_text_item::do_brew_molecule_p () const
+{
+  Atom a= paper ()->lookup_l(0)->text (style_str_,text_str_); 
+  return new Molecule (a);
+}
+
+G_text_item::G_text_item ()
+{
+  style_str_ = "roman";
+}
index 0912244897e55713a259c2135907a9ced1dbf571..2f38a8be7f9eaff9a0e1bba2a2fe7e969e6f368b 100644 (file)
@@ -15,8 +15,8 @@
   Graphical_axis_group at one time.  */
 Graphical_axis_group::Graphical_axis_group (Graphical_axis_group const&s)
 {
   Graphical_axis_group at one time.  */
 Graphical_axis_group::Graphical_axis_group (Graphical_axis_group const&s)
 {
-  axis1_ = s.axis1_;
-  axis2_ = s.axis2_;
+  axes_[0] = s.axes_[0];
+  axes_[1] = s.axes_[1];
 }
 
 bool 
 }
 
 bool 
@@ -37,13 +37,15 @@ Graphical_axis_group::extent (Axis axis) const
 void
 Graphical_axis_group::add_element (Graphical_element*e)
 {
 void
 Graphical_axis_group::add_element (Graphical_element*e)
 {
-  Graphical_axis_group *& g1 = e->axis_group_l_a_[axis1_];
-  Graphical_axis_group *& g2 = e->axis_group_l_a_[axis2_];
-  
-  assert (!g1 || g1 == this);
-  assert (!g2 || g2 == this);
-  g1 = this;
-  g2 = this;
+  for (int i = 0; i < 2; i++)
+    {
+      Axis a = axes_[i];
+      Dimension_cache * &d = e->dim_cache_[a].parent_l_;
+      assert (!d || d == &dim_cache_[a]);
+      d = &dim_cache_[a];
+      d->dependencies_l_arr_.push (&dim_cache_[a]);
+    }
+
   elem_l_arr_.push (e);
 }
 
   elem_l_arr_.push (e);
 }
 
@@ -55,8 +57,13 @@ Graphical_axis_group::remove_element (Graphical_element*e)
   assert (contains_b (e));
   elem_l_arr_.unordered_substitute (e,0);
   
   assert (contains_b (e));
   elem_l_arr_.unordered_substitute (e,0);
   
-  e->axis_group_l_a_[axis1_] = 0;
-  e->axis_group_l_a_[axis2_] = 0;    
+  for (int i=0; i<  2; i++)
+    {
+      Axis a=axes_[i];
+      Dimension_cache * d = &e->dim_cache_[a];
+      d->parent_l_ = 0;
+      d->dependencies_l_arr_.unordered_substitute (&dim_cache_[a], 0);
+    }
 }
 
 void
 }
 
 void
@@ -65,8 +72,14 @@ Graphical_axis_group::remove_all ()
   for (int i=0; i < elem_l_arr_.size(); i++) 
     {
       Graphical_element*e=elem_l_arr_[i];
   for (int i=0; i < elem_l_arr_.size(); i++) 
     {
       Graphical_element*e=elem_l_arr_[i];
-      e->axis_group_l_a_[axis1_] = 0;
-      e->axis_group_l_a_[axis2_] = 0;  
+      for (int i=0; i<  2; i++)
+       {
+         Axis a=axes_[i];
+         Dimension_cache * d = &e->dim_cache_[a];
+         d->parent_l_ = 0;
+         d->dependencies_l_arr_.clear ();
+       }
+      
     }
   elem_l_arr_.clear ();
 }
     }
   elem_l_arr_.clear ();
 }
@@ -83,8 +96,8 @@ Graphical_axis_group::do_print() const
 
 Graphical_axis_group::Graphical_axis_group (Axis a1, Axis a2)
 {
 
 Graphical_axis_group::Graphical_axis_group (Axis a1, Axis a2)
 {
-  axis1_ =a1;
-  axis2_ = a2;
+  axes_[0] = a1;
+  axes_[1] = a2;
 }
 
 
 }
 
 
index de60a0b584ed8c2cba0432475e0303fb5040f63c..921608e9aed2252571cc6069cdace6ea14157b09 100644 (file)
@@ -13,7 +13,7 @@
 bool
 Graphical_element::empty_b () const
 {
 bool
 Graphical_element::empty_b () const
 {
-  return empty_b_; 
+  return dim_cache_[X_AXIS].empty_b () && dim_cache_[Y_AXIS].empty_b ();
 }
 
 Graphical_element::Graphical_element ()
 }
 
 Graphical_element::Graphical_element ()
@@ -22,42 +22,21 @@ Graphical_element::Graphical_element ()
 }
 
 Graphical_element::Graphical_element (Graphical_element const &s)
 }
 
 Graphical_element::Graphical_element (Graphical_element const &s)
+  : dim_cache_ (s.dim_cache_)
 {
   init ();
 {
   init ();
-  empty_b_ = s.empty_b_;
-  axis_group_l_a_[0] = axis_group_l_a_[1] =0;
-  offset_ = Offset (0,0);      // Hmmmm.... Should copy?
 } 
 
 void
 Graphical_element::init ()
 {
 } 
 
 void
 Graphical_element::init ()
 {
-  empty_b_ = false;
-  axis_group_l_a_[X_AXIS] = axis_group_l_a_[Y_AXIS] =0;
-  offset_ = Offset (0,0);
-  cached_valid_b_a_ [X_AXIS] = cached_valid_b_a_[Y_AXIS] = false;
-}
-
-void
-Graphical_element::invalidate_cache (Axis a)
-{
-  Graphical_element * g = this;
-  while (g && g->cached_valid_b_a_[a])
-    {
-      g->cached_valid_b_a_ [a] = false;  
-      g = g->axis_group_l_a_[a];
-    }
+  dim_cache_[X_AXIS].elt_l_ = dim_cache_[Y_AXIS].elt_l_ = this;  
 }
 
 Real
 Graphical_element::absolute_coordinate (Axis a) const
 {
 }
 
 Real
 Graphical_element::absolute_coordinate (Axis a) const
 {
-  Real r = offset_[a];
-  for (Graphical_axis_group * axis_group_l = axis_group_l_a_[a];
-       axis_group_l; axis_group_l = axis_group_l->axis_group_l_a_[a])
-       
-    r += axis_group_l->offset_[a];
-  return r;
+  return dim_cache_[a].absolute_coordinate ();
 }
  
 
 }
  
 
@@ -67,46 +46,26 @@ Graphical_element::absolute_offset() const
   return Offset (absolute_coordinate (X_AXIS), absolute_coordinate (Y_AXIS));
 }
 
   return Offset (absolute_coordinate (X_AXIS), absolute_coordinate (Y_AXIS));
 }
 
+
+
 void
 Graphical_element::translate_axis (Real y, Axis a)
 {
 void
 Graphical_element::translate_axis (Real y, Axis a)
 {
-  if (axis_group_l_a_[a])
-    axis_group_l_a_[a]->invalidate_cache (a);
-  offset_[a] += y;
-}
+  dim_cache_[a].translate (y);
+}  
 
 Real
 
 Real
-Graphical_element::relative_coordinate (Graphical_axis_group*e, Axis a) const
+Graphical_element::relative_coordinate (Dimension_cache*e, Axis a) const
 {
 {
-  Real r =0.0;
-  for (Graphical_axis_group * axis_group_l = axis_group_l_a_[a];
-       axis_group_l != e;
-       axis_group_l = axis_group_l->axis_group_l_a_[a])
-    r +=  axis_group_l->offset_[a];
-
-  return r;
+  return dim_cache_[a].relative_coordinate (e);
 }
 
 }
 
-Graphical_axis_group
+Dimension_cache 
 Graphical_element::common_group (Graphical_element const* s, Axis a) const
 {
 Graphical_element::common_group (Graphical_element const* s, Axis a) const
 {
-  Link_array<Graphical_axis_group> my_groups;
-  for (Graphical_axis_group * axis_group_l = axis_group_l_a_[a];
-       axis_group_l;
-       axis_group_l = axis_group_l->axis_group_l_a_[a])
-    my_groups.push (axis_group_l);
-
-  Graphical_axis_group* common_l=0;
-  for (Graphical_axis_group * axis_group_l = s->axis_group_l_a_[a];
-       !common_l && axis_group_l;
-       axis_group_l = axis_group_l->axis_group_l_a_[a])
-    common_l = my_groups.find_l (axis_group_l);
-
-  return common_l;
+  return dim_cache_[a].common_group (&s->dim_cache_[a]);
 }
 
 }
 
-
-
 void
 Graphical_element::translate (Offset offset)
 {
 void
 Graphical_element::translate (Offset offset)
 {
@@ -114,76 +73,88 @@ Graphical_element::translate (Offset offset)
   translate_axis (offset[X_AXIS], X_AXIS);
 }
 
   translate_axis (offset[X_AXIS], X_AXIS);
 }
 
-Interval
-Graphical_element::width() const
-{
-  return extent (X_AXIS);
-}
 
 void
 Graphical_element::set_empty (bool b)
 {
 
 void
 Graphical_element::set_empty (bool b)
 {
-  if (empty_b_ != b)
-    {
-      empty_b_ = b;
-      if (!empty_b_)
-       {
-         invalidate_cache (X_AXIS);
-         invalidate_cache (Y_AXIS);
-       }
-    }
-  
+  dim_cache_[X_AXIS].set_empty (b);
+  dim_cache_[Y_AXIS].set_empty (b);
 }
 
 Interval
 Graphical_element::extent (Axis a) const
 {
 }
 
 Interval
 Graphical_element::extent (Axis a) const
 {
-  if (empty_b_)
+  Dimension_cache const * d = //(Dimension_cache*)
+    &dim_cache_[a];
+
+  if (d->empty_b ())
     return Interval ();
   
     return Interval ();
   
-  if (!cached_valid_b_a_[a])
-    {
-      Graphical_element *self = (Graphical_element*)this;
-      self->cached_dimension_a_[a] = (a == X_AXIS)? do_width(): do_height ();
-      self->cached_valid_b_a_[a] = true;
-    }
+  if (!d->valid_b ())
+    ((Dimension_cache*)d)->set_dim  ((a == X_AXIS)? do_width(): do_height ());
   
   
-  Interval r(cached_dimension_a_[a]);
-  if (!r.empty_b()) // float exception on DEC Alpha
-    r+=offset_[a];
 
 
-  return r;
-}
-
-Interval
-Graphical_element::height() const
-{
-  return extent (Y_AXIS);
+  return d->get_dim ();
 }
 
 void
 Graphical_element::unlink ()
 {
 }
 
 void
 Graphical_element::unlink ()
 {
-  for (int j=0; j < 2; j++)
-    if (axis_group_l_a_[j])
-      axis_group_l_a_[j]->remove_element (this);
+  for (int a=X_AXIS; a < NO_AXES; a++)
+    if (Dimension_cache * d = dim_cache_[a].parent_l_)
+      {
+       if (Graphical_axis_group * eg
+           = dynamic_cast<Graphical_axis_group*> (d->elt_l_))
+         eg->remove_element (this);
+      }
 }
 
 void
 Graphical_element::junk_links ()
 {
 }
 
 void
 Graphical_element::junk_links ()
 {
-    axis_group_l_a_[X_AXIS] = axis_group_l_a_[Y_AXIS] =0;
 }
 
 void
 Graphical_element::do_print () const
 {
 #ifndef NPRINT
 }
 
 void
 Graphical_element::do_print () const
 {
 #ifndef NPRINT
-  if (offset_.x() || offset_.y ())
-    DOUT << "offset: " << offset_.str() ;
   DOUT << '\n';
 #endif
 }
 
 
 
   DOUT << '\n';
 #endif
 }
 
 
 
+void
+Graphical_element::invalidate_cache (Axis a)
+{
+  dim_cache_[a].invalidate ();
+}
+
+Graphical_element*
+Graphical_element::parent_l (Axis a) const
+{
+  Dimension_cache*d= dim_cache_[a].parent_l_;
+  return d ? d->elt_l_ : 0;
+}
+
+Graphical_element::~Graphical_element ()
+{
+}
+
+Dimension_cache *
+Graphical_element::common_group (Link_array<Graphical_element> gs, Axis a) const
+{
+  Dimension_cache * common = &dim_cache_[a];
+  for (int i=0; i < gs.size (); i++)
+    {
+      common = common->common_group (&gs[i]->dim_cache_[a]);
+    }
+
+  return common;
+}
+
+char const *
+Graphical_element::name () const
+{
+  return classname (this);
+}
index 46b06131e353cabd6e861e23b148aa0d3609babd..796ab7c9455353b2d42428546cc06a3483208363 100644 (file)
@@ -19,5 +19,5 @@ Horizontal_group_item::do_print() const
 
 Horizontal_group_item::Horizontal_group_item ()
 {
 
 Horizontal_group_item::Horizontal_group_item ()
 {
-  axis1_ = axis2_ = X_AXIS;
+  axes_[0] = axes_[1] = X_AXIS;
 }
 }
index 6a47d82966eda940a0aca662c3117d9264132546..b8b09b7bdad6c782c64ec8da03d21018cab8a6d8 100644 (file)
@@ -6,8 +6,8 @@
 
 Horizontal_vertical_group_element::Horizontal_vertical_group_element()
 {
 
 Horizontal_vertical_group_element::Horizontal_vertical_group_element()
 {
-  axis1_ = X_AXIS;
-  axis2_ = Y_AXIS;    
+  axes_[0] = X_AXIS;
+  axes_[1] = Y_AXIS;    
 }
 
 
 }
 
 
index c3f4c03d9e4b5d3d8ec62b424e959400d11d9d2c..0c267e5651ae6b57323a3b34309a1df9a8d6e689 100644 (file)
@@ -20,6 +20,6 @@ Horizontal_vertical_group_item::do_print() const
 
 Horizontal_vertical_group_item::Horizontal_vertical_group_item ()
 {
 
 Horizontal_vertical_group_item::Horizontal_vertical_group_item ()
 {
-  axis1_ = X_AXIS;
-  axis2_ = Y_AXIS;    
+  axes_[0] = X_AXIS;
+  axes_[1] = Y_AXIS;    
 }
 }
index f0df714af25cf9be8825d5515fef1dca67fe0fc3..edc2b3b68ddc1685768e40b29c1612ff0b4ce37a 100644 (file)
@@ -15,7 +15,7 @@ class Abbreviation : public Item {
   Stem * stem_l_;
 protected:
   virtual void do_print () const;
   Stem * stem_l_;
 protected:
   virtual void do_print () const;
-  virtual Molecule *brew_molecule_p () const;
+  virtual Molecule *do_brew_molecule_p () const;
   virtual void do_substitute_dependent (Score_element*, Score_element*);
 public:
   int abbrev_flags_i_;
   virtual void do_substitute_dependent (Score_element*, Score_element*);
 public:
   int abbrev_flags_i_;
index cdb7b1d96c7a3a4ce4ad46236921aa451f0f6333..9f8b998a2412850cf9dc8dc7f7474aaa8c1348b7 100644 (file)
@@ -26,7 +26,7 @@ public:
 protected:
   virtual void do_print() const;
   virtual Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const;
 protected:
   virtual void do_print() const;
   virtual Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const;
-  virtual Molecule* brew_molecule_p() const;
+  virtual Molecule* do_brew_molecule_p() const;
 };
 
 #endif // ABBREVIATION_BEAM_HH
 };
 
 #endif // ABBREVIATION_BEAM_HH
index 4f5d85c8d562c74256446d8316605d5e230b91fc..3be52df478b9425f4eaa151ae41b8dad4b4142b7 100644 (file)
@@ -13,6 +13,7 @@
 #include "string.hh"
 #include "box.hh"
 #include "array.hh"
 #include "string.hh"
 #include "box.hh"
 #include "array.hh"
+#include "dictionary.hh"
 
 struct Adobe_font_char_metric {
   int C_;
 
 struct Adobe_font_char_metric {
   int C_;
@@ -42,13 +43,17 @@ struct Adobe_font_metric {
   String Notice_;
   String EncodingScheme_;
   Array<Adobe_font_char_metric> char_metrics_;
   String Notice_;
   String EncodingScheme_;
   Array<Adobe_font_char_metric> char_metrics_;
-
+  Array<int> ascii_to_metric_idx_;
+  Dictionary<int> name_to_metric_dict_;
+  
   Adobe_font_char_metric find_char (String name, bool warn=true) const;
   Adobe_font_char_metric find_char (String name, bool warn=true) const;
+  Adobe_font_char_metric find_ascii (int ascii) const;
   String str () const;
   Adobe_font_metric ();
   String str () const;
   Adobe_font_metric ();
+  void read_char_metrics (Data_file &input);
 };
 
 };
 
-Adobe_font_metric read_afm (String fn);
+Adobe_font_metric read_afm_file (String fn);
 
 
 
 
 
 
diff --git a/lily/include/all-fonts.hh b/lily/include/all-fonts.hh
new file mode 100644 (file)
index 0000000..da9f91e
--- /dev/null
@@ -0,0 +1,34 @@
+/*   
+  all-fonts.hh -- declare All_font_metrics
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef ALL_FONTS_HH
+#define ALL_FONTS_HH
+
+#include "dictionary.hh"
+#include "file-path.hh"
+#include "lily-proto.hh"
+
+/**
+   Interface to all .afm files living in the filesystem.
+ */
+class All_font_metrics
+{
+  Dictionary<Adobe_font_metric*> afm_p_dict_;
+  File_path search_path_;
+public:
+  
+  Adobe_font_metric *find_font (String name);
+  All_font_metrics (String search_path);
+};
+
+
+
+
+#endif /* ALL_FONTS_HH */
+
index a221be0fd5f68da677c55344762c550b1e7b8eeb..1bd1d6d8e6572f46c078d544f0f5e351b46645d8 100644 (file)
@@ -22,7 +22,7 @@ public:
 
 protected:
   virtual void do_pre_processing ();
 
 protected:
   virtual void do_pre_processing ();
-  Molecule* brew_molecule_p () const;
+  virtual Molecule* do_brew_molecule_p () const;
 
 private:
   void do_print () const;
 
 private:
   void do_print () const;
index bab1e82f8a5739e1f632515dc8faf522c8eb21a7..834467858f9ec4c90d0e2202da7b1df08ecae357 100644 (file)
@@ -1,37 +1,39 @@
-/*
-  beam-engraver.hh -- declare Beam_engraver
-
+/*   
+  cbeam-engraver.hh -- declare Beam_engraver
+  
   source file of the GNU LilyPond music typesetter
   source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
 
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef BEAM_GRAV_HH
-#define BEAM_GRAV_HH
+#ifndef CBEAM_ENGRAVER_HH
+#define CBEAM_ENGRAVER_HH
 
 #include "engraver.hh"
 #include "drul-array.hh"
 
 
 #include "engraver.hh"
 #include "drul-array.hh"
 
-/**
-  Generate a beam. Eats stems.
- */
-class Beam_engraver : public Engraver
-{
-  Drul_array<Beam_req *> span_reqs_drul_;
+class Beam_engraver : public Engraver {
+  Drul_array<Beam_req*> reqs_drul_;
+
+  Beam *finished_beam_p_;
   Beam *beam_p_;
   Beam *beam_p_;
-  Rhythmic_grouping *current_grouping_p_;
 
 
-public:
-  VIRTUAL_COPY_CONS(Translator);
+  Rhythmic_grouping*grouping_p_;
+  Rhythmic_grouping*finished_grouping_p_;
   
   
-  Beam_engraver();
+  void typeset_beam ();
 protected:
 protected:
-  virtual void do_removal_processing();
-  virtual void do_process_requests();
-  virtual bool do_try_music (Music*);
+  virtual void do_pre_move_processing ();
+  virtual void do_post_move_processing ();
+  virtual void do_removal_processing ();
   virtual void acknowledge_element (Score_element_info);
   virtual void acknowledge_element (Score_element_info);
-  virtual void do_pre_move_processing();
+  virtual bool do_try_music (Music*);
+  virtual void do_process_requests ();
+public:
+  Beam_engraver ();
+  VIRTUAL_COPY_CONS (Translator);
 };
 
 };
 
-#endif // BEAM_GRAV_HH
+#endif /* CBEAM_ENGRAVER_HH */
+
index 1e69dd7398376c7d146b46b594cf0192f70f1665..29fa7049b41d7488f5102b5a1285852459af933a 100644 (file)
@@ -61,7 +61,7 @@ protected:
   virtual Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const;
   virtual void solve_slope ();
   virtual void quantise_dy ();
   virtual Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const;
   virtual void solve_slope ();
   virtual void quantise_dy ();
-  virtual Molecule*brew_molecule_p () const;
+  virtual Molecule*do_brew_molecule_p () const;
 };
 
 #endif // BEAM_HH
 };
 
 #endif // BEAM_HH
index 6398942b988a1fbb9c8a0454804015694d8f8642..e8e8d54dc9d9b1c94bfb03431b88857744b31aac 100644 (file)
@@ -28,7 +28,7 @@ public:
   int dash_i_;
 
 protected:
   int dash_i_;
 
 protected:
-  virtual Molecule* brew_molecule_p () const;
+  virtual Molecule* do_brew_molecule_p () const;
   virtual Interval do_width () const;    
   Array<Offset> get_controls () const;
   virtual Array<Offset> get_encompass_offset_arr () const;
   virtual Interval do_width () const;    
   Array<Offset> get_controls () const;
   virtual Array<Offset> get_encompass_offset_arr () const;
diff --git a/lily/include/break-caching.hh b/lily/include/break-caching.hh
deleted file mode 100644 (file)
index 706c5c3..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-  break-caching.hh -- declare Break_caching
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef BREAK_CACHING_HH
-#define BREAK_CACHING_HH
-
-/**
-  TODO : store breakpoints on the disk.
- */
-struct Break_caching : Break_algorithm
-{
-    void do_set_pscore();
-    Array<Column_x_positions> do_solve() const;
-};
-
-    
-#endif // BREAK_CACHING_HH
diff --git a/lily/include/cbeam-engraver.hh b/lily/include/cbeam-engraver.hh
deleted file mode 100644 (file)
index d041f41..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*   
-  cbeam-engraver.hh -- declare Command_beam_engraver
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#ifndef CBEAM_ENGRAVER_HH
-#define CBEAM_ENGRAVER_HH
-
-#include "engraver.hh"
-#include "drul-array.hh"
-
-class Command_beam_engraver : public Engraver {
-  Drul_array<Beam_req*> reqs_drul_;
-
-  Beam *finished_beam_p_;
-  Beam *beam_p_;
-
-  Rhythmic_grouping*grouping_p_;
-  Rhythmic_grouping*finished_grouping_p_;
-  
-  void typeset_beam ();
-protected:
-  virtual void do_pre_move_processing ();
-  virtual void do_post_move_processing ();
-  virtual void do_removal_processing ();
-  virtual void acknowledge_element (Score_element_info);
-  virtual bool do_try_music (Music*);
-  virtual void do_process_requests ();
-public:
-  Command_beam_engraver ();
-  VIRTUAL_COPY_CONS (Translator);
-};
-
-#endif /* CBEAM_ENGRAVER_HH */
-
index f7b44b588fe6af8c965f68b46dc912b782dff6b6..fb45ae53d2c123d3df698f17ed9c9ac8a9269230 100644 (file)
@@ -29,7 +29,7 @@ public:
 
 private:
   Array<Musical_pitch> pitch_arr_;
 
 private:
   Array<Musical_pitch> pitch_arr_;
-  Link_array<Text_item> text_p_arr_;
+  Link_array<Item> text_p_arr_;
 };
 
 #endif // CHORD_NAME_ENGRAVER_HH
 };
 
 #endif // CHORD_NAME_ENGRAVER_HH
index d9fa6fbdf849c3958961b93a5e9fd175ece18fa6..c634382a80a50db63fff116865598fd12950b627 100644 (file)
@@ -17,7 +17,7 @@
 class Clef_item : public Item {
 protected:
   virtual void do_pre_processing();
 class Clef_item : public Item {
 protected:
   virtual void do_pre_processing();
-  virtual Molecule* brew_molecule_p() const;
+  virtual Molecule* do_brew_molecule_p() const;
 public:
     
   String symbol_;
 public:
     
   String symbol_;
index 81990b4f3f29f864aa343c42aeff569b068536e1..7d539fb6660711336c865bb8fffccada7820191a 100644 (file)
@@ -47,10 +47,6 @@ public:
   REQUESTMETHODS(Command_script_req);
 };
 
   REQUESTMETHODS(Command_script_req);
 };
 
-class Command_tie_req : public Command_req {
-public:
-  REQUESTMETHODS(Command_tie_req);
-};
 
 /** Baseclass for time_signature/partial req. It has to be handled by
   Staff_{walker,column} baseclass.  */
 
 /** Baseclass for time_signature/partial req. It has to be handled by
   Staff_{walker,column} baseclass.  */
index 28f42dbb61633db6e7f923ba17a41ead45de6afb..f39f1dbaf732871e012650e365d9eb308b24a463 100644 (file)
@@ -25,7 +25,7 @@ public:
   Crescendo();
 protected:
   VIRTUAL_COPY_CONS(Score_element);
   Crescendo();
 protected:
   VIRTUAL_COPY_CONS(Score_element);
-  virtual Molecule*brew_molecule_p() const;
+  virtual Molecule*do_brew_molecule_p() const;
   virtual Interval symbol_height() const;
   
     
   virtual Interval symbol_height() const;
   
     
diff --git a/lily/include/ctie-engraver.hh b/lily/include/ctie-engraver.hh
deleted file mode 100644 (file)
index 0242fd0..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*   
-  ctie-engraver.hh -- declare Command_tie_engraver
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#ifndef CTIE_ENGRAVER_HH
-#define CTIE_ENGRAVER_HH
-
-#include "pqueue.hh"
-#include "engraver.hh"
-
-struct CHead_melodic_tuple {
-  Melodic_req *mel_l_ ;
-  Note_head *head_l_;
-  Moment end_;
-  CHead_melodic_tuple ();
-  CHead_melodic_tuple (Note_head*, Melodic_req*, Moment);
-  static int pitch_compare (CHead_melodic_tuple const &, CHead_melodic_tuple const &);
-  static int time_compare (CHead_melodic_tuple const &, CHead_melodic_tuple const &);  
-};
-
-inline int compare (CHead_melodic_tuple const &a, CHead_melodic_tuple const &b)
-{
-  return CHead_melodic_tuple::time_compare (a,b);
-}
-
-
-class Command_tie_engraver : public Engraver
-{
-  PQueue<CHead_melodic_tuple> past_notes_pq_;
-  Command_tie_req *req_l_;
-  Array<CHead_melodic_tuple> now_heads_;
-  Array<CHead_melodic_tuple> stopped_heads_;
-  Link_array<Tie> tie_p_arr_;
-  
-protected:
-  virtual void do_post_move_processing ();
-  virtual void do_pre_move_processing ();
-  virtual void acknowledge_element (Score_element_info);
-  virtual bool do_try_music (Music*);
-  virtual void do_process_requests ();
-  virtual void process_acknowledged ();
-public:
-  VIRTUAL_COPY_CONS(Translator);
-  Command_tie_engraver();
-  
-};
-
-#endif /* CTIE_ENGRAVER_HH */
-
diff --git a/lily/include/dimension-cache.hh b/lily/include/dimension-cache.hh
new file mode 100644 (file)
index 0000000..9962cc2
--- /dev/null
@@ -0,0 +1,57 @@
+/*   
+  dimension-cache.hh -- declare Dimension_cache
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef DIMENSION_CACHE_HH
+#define DIMENSION_CACHE_HH
+#include "interval.hh"
+#include "real.hh"
+#include "lily-proto.hh"
+#include "parray.hh"
+
+
+
+class Dimension_cache
+{
+  bool valid_b_;
+  /** Is this element dimensionless?.
+    This is private to guarantee correctness of the cache
+   */
+  bool empty_b_;
+  Interval dim_;
+  Real offset_;
+  Graphical_element *elt_l_;
+  friend class Graphical_element;
+
+  void init ();
+public:
+  Dimension_cache * parent_l_;
+  Link_array<Dimension_cache> dependencies_l_arr_;
+  
+  Real absolute_coordinate () const;
+  void invalidate ();
+  void invalidate_dependencies ();
+  
+  Dimension_cache(Dimension_cache const&);
+  Dimension_cache ();
+  void set_group_l (Graphical_axis_group*);
+  Real relative_coordinate (Dimension_cache *d) const;
+  Dimension_cache*common_group (Dimension_cache const* s) const;
+  Dimension_cache*common_group (Link_array<Dimension_cache> caches) const;
+  void set_empty (bool);
+  void translate (Real);
+  void set_offset (Real);
+  bool valid_b () const { return valid_b_; }
+  bool empty_b() const { return empty_b_; }
+  void set_dim (Interval);
+  Interval get_dim () const;
+};
+
+
+#endif /* DIMENSION_CACHE_HH */
+
index bb7ab8489f7cd18c9ddd6ab4bdddc68c5e41219e..6456dcfe0c624381e253664b9a0770d825cf0970 100644 (file)
@@ -19,7 +19,7 @@
 class Dots : public Item
 {
 protected:
 class Dots : public Item
 {
 protected:
-  virtual Molecule * brew_molecule_p () const;
+  virtual Molecule * do_brew_molecule_p () const;
   virtual void do_post_processing ();
 public:
   int no_dots_i_;
   virtual void do_post_processing ();
 public:
   int no_dots_i_;
index c23020436b57829dce1256d497affec2a8efbfc9..7bea37c49ee54d676b3303c6f2a72bd1c7eb0f92 100644 (file)
 #ifndef DYNAMIC_GRAV_HH
 #define DYNAMIC_GRAV_HH
 
 #ifndef DYNAMIC_GRAV_HH
 #define DYNAMIC_GRAV_HH
 
-#include "engraver.hh"
-
-class Dynamic_engraver : public Engraver {
-  Direction dir_;
-  Text_item * dynamic_p_;
-  Crescendo * to_end_cresc_p_;
-  Crescendo * cresc_p_;
-  Span_dynamic_req * cresc_req_l_;
-  Array<Dynamic_req*> dynamic_req_l_arr_;
-public:
-  VIRTUAL_COPY_CONS(Translator);
-  Dynamic_engraver();
-  
-protected:
-  virtual void do_removal_processing ();
-  virtual void acknowledge_element (Score_element_info);
-  virtual bool do_try_music (Music *req_l);
-  virtual void do_process_requests();
-  virtual void do_pre_move_processing();
-  virtual void do_post_move_processing();
-};
-
 #endif // DYNAMIC_GRAV_HH
 #endif // DYNAMIC_GRAV_HH
index 19947342becb432d1b31f893d19efaabfdd5971e..8e0f657fb5ff777004a3e107158591a7eef3eeb9 100644 (file)
@@ -40,7 +40,7 @@ public:
   Drul_array<Text_item *> textitem_l_drul_;
  
 protected:
   Drul_array<Text_item *> textitem_l_drul_;
  
 protected:
-  virtual Molecule* brew_molecule_p () const;
+  virtual Molecule* do_brew_molecule_p () const;
   void do_add_processing ();
   Interval do_height () const;
   void do_substitute_dependency (Score_element* o, Score_element* n);
   void do_add_processing ();
   Interval do_height () const;
   void do_substitute_dependency (Score_element* o, Score_element* n);
diff --git a/lily/include/g-staff-side.hh b/lily/include/g-staff-side.hh
new file mode 100644 (file)
index 0000000..c39dcd9
--- /dev/null
@@ -0,0 +1,40 @@
+/*   
+  g-staff-side.hh -- declare G_staff_side_item
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef G_STAFF_SIDE_HH
+#define G_STAFF_SIDE_HH
+
+#include "item.hh"
+
+/*
+  DO NOT USE AS BREAKABLE ITEM!
+
+  (-> core dump!)
+ */
+class G_staff_side_item : public Item
+{
+public:
+  Score_element * to_position_l_;
+  Direction dir_;
+  Link_array<Score_element> support_l_arr_;
+  
+  G_staff_side_item ();
+  void set_victim (Score_element*);
+  void add_support (Score_element*);
+
+  virtual void set_default_direction ();
+  VIRTUAL_COPY_CONS(Score_element);
+protected:
+  virtual void do_substitute_dependency (Score_element*,Score_element*);
+  virtual void do_pre_processing ();
+  virtual void do_post_processing ();
+};
+
+#endif /* G_STAFF_SIDE_HH */
+
diff --git a/lily/include/g-text-item.hh b/lily/include/g-text-item.hh
new file mode 100644 (file)
index 0000000..5f6af59
--- /dev/null
@@ -0,0 +1,28 @@
+/*   
+  g-text-item.hh -- declare G_text_item
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef G_TEXT_ITEM_HH
+#define G_TEXT_ITEM_HH
+
+#include "item.hh"
+
+class G_text_item : public Item
+{
+public:
+  String text_str_;
+  String style_str_;
+
+  G_text_item ();
+  VIRTUAL_COPY_CONS (Score_element);
+protected:
+  virtual Molecule *do_brew_molecule_p () const;
+};
+
+#endif /* G_TEXT_ITEM_HH */
+
index f9df7df3e8fb2fc2a57fdd9d05c7f6c0e09db9b5..90f0799b4b0683df9e3ada5bbd4403eb2d92b00e 100644 (file)
@@ -23,7 +23,7 @@
 class Graphical_axis_group : public virtual Graphical_element {
 public:
   Link_array<Graphical_element> elem_l_arr_;
 class Graphical_axis_group : public virtual Graphical_element {
 public:
   Link_array<Graphical_element> elem_l_arr_;
-  Axis axis1_, axis2_;
+  Axis axes_[2];
     
   Interval extent (Axis) const;
   virtual void do_print() const;
     
   Interval extent (Axis) const;
   virtual void do_print() const;
index b74fe14535108f73c0da083bb93f6cb37c6e4542..465fe357001ac384593a6245aa98350615349e46 100644 (file)
 #include "lily-proto.hh"
 #include "interval.hh"
 #include "virtual-methods.hh"
 #include "lily-proto.hh"
 #include "interval.hh"
 #include "virtual-methods.hh"
+#include "dimension-cache.hh"
+
+
 
 /** The 2d geometric aspects of a score-element.  It was put in a
   separate class, because Score_element got quite big.
 
 /** The 2d geometric aspects of a score-element.  It was put in a
   separate class, because Score_element got quite big.
-
   */
 class Graphical_element 
 {
   void init ();
   */
 class Graphical_element 
 {
   void init ();
-  /** Is this element dimensionless?.
-    This is private to guarantee correctness of the cache
-   */
-  bool empty_b_;
-  
-  Offset offset_;
-  Interval cached_dimension_a_[NO_AXES];
-  bool cached_valid_b_a_[NO_AXES];
 public:
 public:
+  Dimension_cache dim_cache_[NO_AXES];
 
 
+  char const * name () const;
   void set_empty (bool);
   void set_empty (bool);
-
   bool empty_b () const;
   
   bool empty_b () const;
   
-  
-  
-  Graphical_axis_group * axis_group_l_a_[NO_AXES];
-  
   Graphical_element ();
   Graphical_element (Graphical_element const&);
   Graphical_element ();
   Graphical_element (Graphical_element const&);
+  virtual ~Graphical_element ();
   
   void invalidate_cache (Axis);
   Interval extent (Axis) const;
   
   void invalidate_cache (Axis);
   Interval extent (Axis) const;
-  Interval width() const;
-  Interval height() const;
  
   /**
     translate the symbol. The symbol does not have to be created yet. 
  
   /**
     translate the symbol. The symbol does not have to be created yet. 
@@ -58,13 +48,17 @@ public:
     
   void translate_axis (Real, Axis);
 
     
   void translate_axis (Real, Axis);
 
-  Real relative_coordinate (Graphical_axis_group*group, Axis) const;
+  Real relative_coordinate (Dimension_cache*group, Axis) const;
   Offset absolute_offset() const;
   Real absolute_coordinate (Axis) const;
   /**
     Find the group-element which has both #this# and #s#
    */
   Offset absolute_offset() const;
   Real absolute_coordinate (Axis) const;
   /**
     Find the group-element which has both #this# and #s#
    */
-  Graphical_axis_group*common_group (Graphical_element const* s, Axis a) const;
+  Dimension_cache*common_group (Graphical_element const* s, Axis a) const;
+  Dimension_cache*common_group (Link_array<Graphical_element> elems, Axis a) const;
+  
+  Graphical_element *parent_l (Axis a) const;
+  
   void unlink ();
   void junk_links ();
   virtual void do_print () const;
   void unlink ();
   void junk_links ();
   virtual void do_print () const;
index 5686d9e361efa94fe244457aeeb7ea828647fa37..7097cf4c8fce63d4ec5b7d493b4b70a0e8793e93 100644 (file)
 
 #include "matrix.hh"
 
 
 #include "matrix.hh"
 
-/// inequality constrained quadratic program
+/** inequality constrained quadratic program
+
+    It takes the form of
+
+    optimise for x : x*quad_ *x + lin_* x + const_term_
+
+    subject to for all i:  cons_[i] * x >= consrhs_[i]
+
+
+    @usage:
+    instantiate Ineq_constrained_qp.
+    
+    Modify quad_, lin_ and const_term_ directly. Use
+    add_inequality_cons () to add constraints.  Call solve () with a
+    feasible solution
+
+    
+ */
 class Ineq_constrained_qp {
     friend class Active_constraints;
 
 class Ineq_constrained_qp {
     friend class Active_constraints;
 
index b6d72f83b124c13a8344275a6e502ce652b4c4e5..2984d563200460242b4fd71727d4fffaa5b896f6 100644 (file)
@@ -36,7 +36,7 @@ struct Key_item : Item {
 
 protected:
   virtual void do_pre_processing();
 
 protected:
   virtual void do_pre_processing();
-  Molecule* brew_molecule_p() const;
+  virtual Molecule* do_brew_molecule_p() const;
 };
 
 #endif // KEYITEM_HH
 };
 
 #endif // KEYITEM_HH
index 7ae5f935f785c49e426d4af371c0a97d9e05a2a0..b44dab422342896ccb8aac43a6a438ce9bee5e02 100644 (file)
@@ -15,7 +15,12 @@ struct Abbreviation;
 struct Abbreviation_beam; 
 struct Abbreviation_beam_req;
 struct Abbreviation_beam_engraver;
 struct Abbreviation_beam; 
 struct Abbreviation_beam_req;
 struct Abbreviation_beam_engraver;
+struct G_staff_side_item;
+struct G_text_item;
 struct Abbreviation_req;
 struct Abbreviation_req;
+struct Adobe_font_metric;
+struct Adobe_font_char_metric;
+struct All_font_metrics;
 struct Atom;
 struct Audio_element;
 struct Audio_column;
 struct Atom;
 struct Audio_element;
 struct Audio_column;
diff --git a/lily/include/linear-programming.hh b/lily/include/linear-programming.hh
deleted file mode 100644 (file)
index 6ba38ea..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*   
-  linear-programming.hh -- declare Linear_programming
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#ifndef LINEAR_PROGRAMMING_HH
-#define LINEAR_PROGRAMMING_HH
-
-#include "linear-programming.hh"
-
-/**
-
-   Solve the following problem:
-   
-   min c* x
-
-   constraints_[i] * x = constraint_rhss_ [i]
-   
-   x[j] >= 0
-*/
-
-class Linear_programming
-{
-  Array<Vector> constraints_;
-  Array<Real> constraint_rhss_;
-  Vector cost_vec_;
-  int dim_;
-public:
-  Vector constraint_solve (Vector initial_basic_solution) const;
-
-  int dim () const;
-  Vector solve (Vector) const;
-  void add_constraint (Vector c, double r);
-
-  
-  Linear_programming (int n);
-  void set_cost (Vector);
-  void print () const;
-  void OK () const;
-}
-
-#endif /* LINEAR_PROGRAMMING_HH */
-
index 5d79466feb4c32983209211b4ab382e7f026e4bf..3e8b531e0e07ca3da35e1b489aa4d8effe87ddeb 100644 (file)
@@ -33,7 +33,7 @@ public:
 protected:
     virtual void do_pre_processing();    
     virtual void do_substitute_dependency (Score_element*,Score_element*);
 protected:
     virtual void do_pre_processing();    
     virtual void do_substitute_dependency (Score_element*,Score_element*);
-    virtual Molecule* brew_molecule_p() const;
+    virtual Molecule* do_brew_molecule_p() const;
 };
 #endif // LOCALKEYITEM_HH
 
 };
 #endif // LOCALKEYITEM_HH
 
index e236e56f66802fb859cd375849acffe3ccaf7a27..9526c07cc4ce240249c4b4654124ba7d2eab5759 100644 (file)
@@ -16,7 +16,6 @@
 #include "scalar.hh"
 #include "direction.hh"
 #include "curve.hh"
 #include "scalar.hh"
 #include "direction.hh"
 #include "curve.hh"
-#include "afm.hh"
 #include "symtable.hh"
 #include "box.hh"
 
 #include "symtable.hh"
 #include "box.hh"
 
@@ -61,9 +60,9 @@ public:
 
   Paper_def * paper_l_;
   Symtables *symtables_p_;
 
   Paper_def * paper_l_;
   Symtables *symtables_p_;
-  String font_;
-  String font_path_;  
-  Adobe_font_metric * afm_p_;
+
+  String font_name_;
+  Adobe_font_metric * afm_l_;
 };
 
 #endif // LOOKUP_HH
 };
 
 #endif // LOOKUP_HH
index 0087e21e5e7e20de9fe5f76370d27107bdf2046f..99a1aa1462a4e62fd42e734df8445e02363458a0 100644 (file)
 
 #include "lily-proto.hh"
 
 
 #include "lily-proto.hh"
 
-class Lyric_engraver : public Engraver 
-{
-protected:
-  virtual void do_pre_move_processing();
-  virtual bool do_try_music (Music*);
-  virtual void do_process_requests();
-
-public:
-  Lyric_engraver();
-  VIRTUAL_COPY_CONS(Translator);
-
-private:
-  Link_array<Lyric_req> lyric_req_l_arr_;
-  Link_array<Text_item> text_p_arr_;
-};
 
 #endif // LYRIC_ENGRAVER_HH
 
 #endif // LYRIC_ENGRAVER_HH
index 0b7340bb7541e5ab7a67d7387aac678103b2bf29..2b63cb16049a329fc5e8dedbfcc668993fb7914a 100644 (file)
@@ -40,4 +40,7 @@ extern File_path global_path;
 extern String default_outname_base_global;
 extern String default_outname_suffix_global;
 extern int default_count_global;
 extern String default_outname_base_global;
 extern String default_outname_suffix_global;
 extern int default_count_global;
+extern All_font_metrics *all_fonts_global_p;
+
+
 #endif
 #endif
index 01b1c09e235201ab4600a04a90e3f031c8cdbc30..8be84d3002352cb7328669b23166237054011179 100644 (file)
@@ -22,7 +22,7 @@ public:
 
 protected:
   virtual void do_print () const;
 
 protected:
   virtual void do_print () const;
-  virtual Molecule *brew_molecule_p () const;
+  virtual Molecule *do_brew_molecule_p () const;
 };
 
 #endif /* MULTI_MEASURE_REST_HH */
 };
 
 #endif /* MULTI_MEASURE_REST_HH */
index 6cc15b5763b94b20496e05e190127d529a7d5ea9..c1e889b9dee4887b24e02773d074bf336fb661be 100644 (file)
@@ -25,8 +25,6 @@ public:
   virtual bool ok () const;
 
 protected:
   virtual bool ok () const;
 
 protected:
-  Music_list* music_list_l () const;
-
   virtual void do_print () const;
   virtual void do_process_and_next (Moment);
 };
   virtual void do_print () const;
   virtual void do_process_and_next (Moment);
 };
index c88ef382c4ba0921214526c3c03e0a9f4bbcdf56..b3b5b2959b162d77f4c4578bf87ad59eea0a3597 100644 (file)
@@ -141,11 +141,6 @@ public:
   
 };
 
   
 };
 
-/** Start / stop a beam at this note */
-class Beam_req  : public Musical_span_req  {
-public:
-  REQUESTMETHODS(Beam_req);
-};
 
 /** 
  Start / stop an abbreviation beam at this note. 
 
 /** 
  Start / stop an abbreviation beam at this note. 
@@ -159,13 +154,7 @@ public:
   int type_i_;
 };
 
   int type_i_;
 };
 
-/**
-  Start a tie at this note, end it at the next
- */
-class Tie_req : public Musical_req {
-public:
-  REQUESTMETHODS(Tie_req);
-};
+
 
 /// a slur
 class Slur_req  : public Musical_span_req  {
 
 /// a slur
 class Slur_req  : public Musical_span_req  {
@@ -174,15 +163,6 @@ public:
 
 };
 
 
 };
 
-/// a tuplet (bracket with) number
-class Plet_req : public Musical_span_req  {
-public:
-  int plet_i_;
-
-  REQUESTMETHODS(Plet_req);
-  Plet_req ();
-};
-
 /// an extender line
 class Extender_req : public Musical_span_req  {
 public:
 /// an extender line
 class Extender_req : public Musical_span_req  {
 public:
index 23aff88156d2add2d3cc84b22debf9786bce3060..b9fc8952bdc10c03eea517d5977ae2a2a5303b0b 100644 (file)
@@ -34,7 +34,7 @@ public:
   Link_array<Rest> rest_l_arr_;
     
   Interval_t<int> head_positions_interval() const;
   Link_array<Rest> rest_l_arr_;
     
   Interval_t<int> head_positions_interval() const;
-  Interval width () const;
+  //  Interval width () const;
 
   void translate_rests(int dy);
         
 
   void translate_rests(int dy);
         
index 173cf33ea66db937ce8eb429ca8302828bb703a9..1a34c99f2330ed41deac29c3cab1c3a705a13738 100644 (file)
@@ -37,7 +37,7 @@ public:
 protected:
   virtual Interval do_width () const;
   virtual void do_pre_processing();
 protected:
   virtual Interval do_width () const;
   virtual void do_pre_processing();
-  virtual Molecule* brew_molecule_p() const;
+  virtual Molecule* do_brew_molecule_p() const;
 };
 #endif // NOTEHEAD_HH
 
 };
 #endif // NOTEHEAD_HH
 
index 67436644c4969e4936a2e2246bf02e0962209cdb..898c2b6082504393eb8b1bee324763efcf3a4b5b 100644 (file)
@@ -36,7 +36,7 @@
  */
 class Paper_def : public Music_output_def 
 {
  */
 class Paper_def : public Music_output_def 
 {
-  Assoc<int, Lookup *> *lookup_p_assoc_p_;
+  Hash_table<int, Lookup *> *lookup_p_tab_p_;
   static int default_count_i_;
 
 protected:
   static int default_count_i_;
 
 protected:
diff --git a/lily/include/plet-swallow-engraver.hh b/lily/include/plet-swallow-engraver.hh
deleted file mode 100644 (file)
index 1458589..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-  plet-swallow-engraver.hh -- declare Swallow_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef PLET_SWALLOW_ENGRAVER_HH
-#define PLET_SWALLOW_ENGRAVER_HH
-
-#include "swallow-engraver.hh"
-
-/**
-  This engraver swallows plets silently.
- */
-class Plet_swallow_engraver : public Swallow_engraver 
-{
-public:
-  VIRTUAL_COPY_CONS(Translator);
-  
-
-protected:
-  virtual bool do_try_music (Music*);
-};
-
-#endif // PLET_SWALLOW_ENGRAVER_HH
index bf04b55d843de97cd6d7edad9e61bb319e5967d5..1d61c5faf15a35d148f21b0ee9443c8eae223836 100644 (file)
@@ -35,7 +35,9 @@ class Active_constraints {
   Ineq_constrained_qp const *opt;
 
 public:
   Ineq_constrained_qp const *opt;
 
 public:
-
+  
+  /** This counts the number of errors the algorithms makes.  The
+      optimum search should be abandoned if it becomes too high.  */
   int degenerate_count_i_;
   String status() const;
     
   int degenerate_count_i_;
   String status() const;
     
index 4d0a5f2a0a8fd30daa367a684895a2343ba0a67e..23c2ce41456d7fd26007789945f558ab079ab3b1 100644 (file)
@@ -79,5 +79,18 @@ public:
   Span_req();
 };
 
   Span_req();
 };
 
+/**
+  Start a tie at this note, end it at the next
+ */
+class Tie_req : public Request {
+public:
+  REQUESTMETHODS(Tie_req);
+};
+
+/** Start / stop a beam at this note */
+class Beam_req  : public Span_req  {
+public:
+  REQUESTMETHODS(Beam_req);
+};
 
 #endif
 
 #endif
index 2e0b3938c1c13628bfaed3e3f191a48f6dc0e006..aa33701c9ac979d03bdda2560c29cf6139bce04c 100644 (file)
@@ -22,6 +22,6 @@ public:
   void add_dots (Dots*);
 protected:
   virtual void do_add_processing ();
   void add_dots (Dots*);
 protected:
   virtual void do_add_processing ();
-  virtual Molecule * brew_molecule_p () const;
+  virtual Molecule * do_brew_molecule_p () const;
 };
 #endif // REST_HH
 };
 #endif // REST_HH
index 2828e00fae0cea0a36c80f389734f39b83224b52..c36e446816e8333eb08f75cf4ea49883ca54c546 100644 (file)
@@ -27,7 +27,7 @@ typedef void (Score_element::*Score_element_method_pointer) (void);
 class Score_element : private Directed_graph_node, public virtual Graphical_element {
 public:
   Paper_score *pscore_l_;    
 class Score_element : private Directed_graph_node, public virtual Graphical_element {
 public:
   Paper_score *pscore_l_;    
-
+  Molecule * output_p_;
   Score_element ();
   Score_element (Score_element const&);
   virtual void print () const;
   Score_element ();
   Score_element (Score_element const&);
   virtual void print () const;
@@ -80,7 +80,7 @@ protected:
   int dependent_size () const;
   int dependency_size () const;
   
   int dependent_size () const;
   int dependency_size () const;
   
-  virtual void do_brew_molecule ();
+  virtual void output_processing ();
   void junk_links ();
   virtual Interval do_height () const;
   virtual Interval do_width () const;
   void junk_links ();
   virtual Interval do_height () const;
   virtual Interval do_width () const;
@@ -88,7 +88,7 @@ protected:
   /// do printing of derived info.
   virtual void do_print () const {}
   /// generate the molecule    
   /// do printing of derived info.
   virtual void do_print () const {}
   /// generate the molecule    
-  virtual Molecule* brew_molecule_p () const;
+  virtual Molecule* do_brew_molecule_p () const;
   ///executed directly after the item is added to the Paper_score
   virtual void do_add_processing ();
   /// do calculations before determining horizontal spacing
   ///executed directly after the item is added to the Paper_score
   virtual void do_add_processing ();
   /// do calculations before determining horizontal spacing
index d9d87a127eaf8cee67196f5f5a9d43e5121079c9..4b857c7662531739095d1521415fe91c7b907b9b 100644 (file)
 #define SCOREF_ALIGN_GRAV_HH
 
 #include "engraver.hh"
 #define SCOREF_ALIGN_GRAV_HH
 
 #include "engraver.hh"
-#include "assoc.hh"
 
 /**
   Group  a number of items across staffs
  */
 class Score_priority_engraver : public Engraver
 {
 
 /**
   Group  a number of items across staffs
  */
 class Score_priority_engraver : public Engraver
 {
-  Assoc<int, Horizontal_group_item  *> align_p_assoc_;
+  Hash_table<int, Horizontal_group_item  *> align_p_tab_;
 public:
   VIRTUAL_COPY_CONS(Translator);
   Score_priority_engraver ();
 public:
   VIRTUAL_COPY_CONS(Translator);
   Score_priority_engraver ();
index 51b74a29f5edbb75b03ac8cc00b830ce346578be..f13a6a18402ae4dfa40fb62994a4871291ef792e 100644 (file)
@@ -17,7 +17,7 @@ class Script : public Item, public Staff_side {
   Stem *stem_l_;
 
 protected:
   Stem *stem_l_;
 
 protected:
-  Molecule *brew_molecule_p() const;
+  Molecule *do_brew_molecule_p() const;
   virtual void do_substitute_dependency (Score_element*,Score_element*);
   virtual void do_print() const;
   virtual Interval symbol_height() const;
   virtual void do_substitute_dependency (Score_element*,Score_element*);
   virtual void do_print() const;
   virtual Interval symbol_height() const;
index 8cf39854c840dec1b9f929545a1b2016325d60ae..a7e9c9323e9fef66fff56ffb5d974f0b4184466e 100644 (file)
@@ -26,8 +26,6 @@ public:
   virtual bool ok () const;
 
 protected:
   virtual bool ok () const;
 
 protected:
-  Sequential_music* sequential_music_l () const;
-
   virtual void do_print() const;
   virtual void do_process_and_next (Moment);
 
   virtual void do_print() const;
   virtual void do_process_and_next (Moment);
 
index e2c1eb4ee6ff405b086a7ce6b3ac0a4c733c91f9..c2213b51954b55865a694c7d6e341ce7e177622b 100644 (file)
@@ -23,8 +23,6 @@ public:
   virtual bool ok () const;
 
 protected:
   virtual bool ok () const;
 
 protected:
-  Simultaneous_music* simultaneous_music_l () const;
-
   virtual void do_print () const;
   virtual void do_process_and_next (Moment);
 
   virtual void do_print () const;
   virtual void do_process_and_next (Moment);
 
index 3a4f01732093c510a1a2f8b5936279064698f736..22a710d7f5208aaf171e4f84d5126825ac472c5f 100644 (file)
@@ -30,7 +30,7 @@ protected:
     virtual void do_post_processing();
     
     virtual void do_substitute_dependency (Score_element*,Score_element*);
     virtual void do_post_processing();
     
     virtual void do_substitute_dependency (Score_element*,Score_element*);
-    virtual Molecule * brew_molecule_p() const;
+    virtual Molecule * do_brew_molecule_p() const;
     virtual Atom get_bar_sym (Real dy) const;
 };
 
     virtual Atom get_bar_sym (Real dy) const;
 };
 
index a43eff9855a338e6c355a31e6efe78a2ed80c2b9..09e37a8962406818f8e729abfcc61afe9a287f8f 100644 (file)
@@ -57,7 +57,7 @@ protected:
 
   virtual void do_unlink ();
   virtual void do_junk_links ();
 
   virtual void do_unlink ();
   virtual void do_junk_links ();
-  virtual void do_brew_molecule ();
+  virtual void output_processing ();
   virtual void do_space_processing ();
   virtual void do_break_processing ();
   virtual Interval do_width () const;
   virtual void do_space_processing ();
   virtual void do_break_processing ();
   virtual Interval do_width () const;
index a98d1b1d44dea3c87c6682f437ad16e157f7eb3a..b4e919106525a69f439285cb65e8db2e26fd9c6b 100644 (file)
@@ -29,7 +29,7 @@ public:
 protected:
   VIRTUAL_COPY_CONS(Score_element);
   virtual Interval do_height () const;
 protected:
   VIRTUAL_COPY_CONS(Score_element);
   virtual Interval do_height () const;
-  virtual Molecule* brew_molecule_p() const;
+  virtual Molecule* do_brew_molecule_p() const;
   virtual void do_print() const;
 };
 #endif // STAFFSYM_HH
   virtual void do_print() const;
 };
 #endif // STAFFSYM_HH
index f039fce3195017b70dafb443bb3a6fe316b77010..1213936ab2fe9220f3a19fef1079329132992fc0 100644 (file)
@@ -17,7 +17,6 @@
  */
 class Stem_engraver : public Engraver
 {
  */
 class Stem_engraver : public Engraver
 {
-  Direction dir_;
   int default_abbrev_i_;
   Stem *stem_p_;
   Abbreviation *abbrev_p_;
   int default_abbrev_i_;
   Stem *stem_p_;
   Abbreviation *abbrev_p_;
index f33038822b97d1107b76239272582a7cfb5ca4e8..267be4f67a217639f58ba514679d57ae3c87d4b8 100644 (file)
@@ -114,6 +114,6 @@ protected:
   virtual void do_substitute_dependency (Score_element*,Score_element*);
   virtual void do_pre_processing();
   virtual Interval do_width() const;
   virtual void do_substitute_dependency (Score_element*,Score_element*);
   virtual void do_pre_processing();
   virtual Interval do_width() const;
-  Molecule* brew_molecule_p() const;
+  virtual Molecule* do_brew_molecule_p() const;
 };
 #endif
 };
 #endif
index 2c19d3e9b0854a7d6d9adc70752c35f825258200..b0f8a77bf6994d79508b773410d14cf9fd594041 100644 (file)
 #include "atom.hh"
 
 struct  Symtable : public Dictionary<Atom> {
 #include "atom.hh"
 
 struct  Symtable : public Dictionary<Atom> {
-    String id_str;
+  String id_str;
     
     
-    Atom lookup (String) const;
-    void print() const;
+  Atom lookup (String) const;
+  void print() const;
 };
 
 
 };
 
 
@@ -32,8 +32,7 @@ struct Symtables : private Dictionary<Symtable*>
   void add (String, Symtable*);
   void print() const;
 
   void add (String, Symtable*);
   void print() const;
 
-  String font_;
-  String font_path_;  
+  String font_name_;
 };
 
 
 };
 
 
index ca8600fac48deb82eff77ea8fea62121d82368ec..536fbd86eff2c7842dc909081c5d3346ff854e60 100644 (file)
 class Text_item : public Item ,public Staff_side
 {
 public:
 class Text_item : public Item ,public Staff_side
 {
 public:
-
     /// do I have width?
     bool fat_b_;
     /// do I have width?
     bool fat_b_;
-    
-
-    Text_item (General_script_def* ,Direction dir=CENTER);
-    virtual ~Text_item ();
-    
 
 
-//protected:
-    // ugh: so, are we a text-def, or can this vary?
+  Text_item (General_script_def* ,Direction dir=CENTER);
     General_script_def* tdef_p_;
     General_script_def* tdef_p_;
-protected:
 
 
+protected:
+    virtual ~Text_item ();
     virtual Interval symbol_height () const;
     virtual Interval symbol_height () const;
-
-    virtual Molecule* brew_molecule_p () const;
+    virtual Molecule* do_brew_molecule_p () const;
     virtual void do_pre_processing ();
     virtual Real get_position_f () const;
     virtual void do_pre_processing ();
     virtual Real get_position_f () const;
-
-private:
-//    void init (Text_def* tdef_l); 
 };
 
 
 };
 
 
index 42dc01483f39cd1bb54e3979ad9fcf7e27e2287b..ce68ae17a262f4801b855ec88439a55a40e7162f 100644 (file)
@@ -31,7 +31,7 @@ protected:
   virtual void do_pre_processing();
   virtual void do_post_processing();
   virtual Interval height() const ;
   virtual void do_pre_processing();
   virtual void do_post_processing();
   virtual Interval height() const ;
-  virtual Molecule* brew_molecule_p() const;
+  virtual Molecule* do_brew_molecule_p() const;
   virtual void do_print() const;
 };
 #endif // TEXTSPANNER_HH
   virtual void do_print() const;
 };
 #endif // TEXTSPANNER_HH
diff --git a/lily/include/tie-engraver.hh b/lily/include/tie-engraver.hh
new file mode 100644 (file)
index 0000000..b581015
--- /dev/null
@@ -0,0 +1,54 @@
+/*   
+  ctie-engraver.hh -- declare Tie_engraver
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef CTIE_ENGRAVER_HH
+#define CTIE_ENGRAVER_HH
+
+#include "pqueue.hh"
+#include "engraver.hh"
+
+struct CHead_melodic_tuple {
+  Melodic_req *mel_l_ ;
+  Note_head *head_l_;
+  Moment end_;
+  CHead_melodic_tuple ();
+  CHead_melodic_tuple (Note_head*, Melodic_req*, Moment);
+  static int pitch_compare (CHead_melodic_tuple const &, CHead_melodic_tuple const &);
+  static int time_compare (CHead_melodic_tuple const &, CHead_melodic_tuple const &);  
+};
+
+inline int compare (CHead_melodic_tuple const &a, CHead_melodic_tuple const &b)
+{
+  return CHead_melodic_tuple::time_compare (a,b);
+}
+
+
+class Tie_engraver : public Engraver
+{
+  PQueue<CHead_melodic_tuple> past_notes_pq_;
+  Tie_req *req_l_;
+  Array<CHead_melodic_tuple> now_heads_;
+  Array<CHead_melodic_tuple> stopped_heads_;
+  Link_array<Tie> tie_p_arr_;
+  
+protected:
+  virtual void do_post_move_processing ();
+  virtual void do_pre_move_processing ();
+  virtual void acknowledge_element (Score_element_info);
+  virtual bool do_try_music (Music*);
+  virtual void do_process_requests ();
+  virtual void process_acknowledged ();
+public:
+  VIRTUAL_COPY_CONS(Translator);
+  Tie_engraver();
+  
+};
+
+#endif /* CTIE_ENGRAVER_HH */
+
diff --git a/lily/include/ties-engraver.hh b/lily/include/ties-engraver.hh
deleted file mode 100644 (file)
index 900c7db..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-  tie-engraver.hh -- declare Ties_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef Ties_GRAV_HH
-#define Ties_GRAV_HH
-
-#include "engraver.hh"
-
-struct Head_melodic_tuple {
-  Melodic_req *mel_l_ ;
-  Note_head *head_l_;
-
-  Head_melodic_tuple ();
-  Head_melodic_tuple (Note_head*, Melodic_req*);
-  static int compare (Head_melodic_tuple const &, Head_melodic_tuple const &);
-};
-
-class Ties_engraver : public Engraver {
-  Link_array<Tie> end_tie_p_arr_;
-  Link_array<Tie> tie_p_arr_;
-
-  Tie_req *req_l_;
-  Tie_req *end_req_l_;
-  Array<Head_melodic_tuple> head_mel_tuple_arr_;
-  Array<Head_melodic_tuple> left_head_mel_tuple_arr_;  
-  int processed_ack_pass_i_;
-  
-  Link_array<Melodic_req *> end_melodic_req_l_arr_;
-  Link_array<Melodic_req *> melodic_req_l_arr_;
-    
-protected:
-  virtual void do_removal_processing ();
-  virtual void acknowledge_element (Score_element_info);
-  virtual bool do_try_music (Music*);
-  virtual void do_process_requests();
-  virtual void process_acknowledged ();
-  virtual void do_post_move_processing();
-  virtual void do_pre_move_processing();
-public:
-  VIRTUAL_COPY_CONS(Translator);
-  Ties_engraver();
-  
-};
-
-#endif // Ties_GRAV_HH
index 1fd90719c54711b5e2dd7ebf481c04115e4c32af..093ba3c700803207395597baa3d6fdbc93a76c76 100644 (file)
@@ -23,7 +23,7 @@ class Time_signature: public Item {
   
 
 protected:
   
 
 protected:
-  virtual Molecule*brew_molecule_p() const;
+  virtual Molecule*do_brew_molecule_p() const;
 public:
   Time_signature () ;
   Array<int> args_;
 public:
   Time_signature () ;
   Array<int> args_;
index f3a96da1abb1c68225ca61c766bb9016aea643b9..7671f96aa5f9b2c5703c03c6150a4f8a47541dc7 100644 (file)
@@ -60,7 +60,7 @@ public:
   /**
     ask daddy for a feature
     */
   /**
     ask daddy for a feature
     */
-  Scalar get_property (String type_str);
+  Scalar get_property (String type_str, Translator const **where_found_l) const;
   void set_property (String var_name, Scalar value);
   Music_output_def *output_def_l () const;
   
   void set_property (String var_name, Scalar value);
   Music_output_def *output_def_l () const;
   
index 2d97897d5c35071bf46a6fe3979503c365045ee1..356e4a51e0ffaebe5de892bb21f4b1eb88553138 100644 (file)
@@ -27,7 +27,7 @@ protected:
   Beam *beam_l_;
   Link_array<Note_column> column_arr_;
 
   Beam *beam_l_;
   Link_array<Note_column> column_arr_;
 
-  virtual Molecule* brew_molecule_p () const;
+  virtual Molecule* do_brew_molecule_p () const;
   VIRTUAL_COPY_CONS(Score_element);
 
   virtual void do_add_processing ();
   VIRTUAL_COPY_CONS(Score_element);
 
   virtual void do_add_processing ();
index 1a9a2803c457c02937fa5754ac1ff4db9fb155b0..92dc770812a03c73e3d7daaf2a4a7f2473923192 100644 (file)
@@ -28,7 +28,7 @@ public:
   bool last_b_;
  
 protected:
   bool last_b_;
  
 protected:
-  virtual Molecule* brew_molecule_p () const;
+  virtual Molecule* do_brew_molecule_p () const;
   VIRTUAL_COPY_CONS(Score_element);
 
   virtual void do_add_processing ();
   VIRTUAL_COPY_CONS(Score_element);
 
   virtual void do_add_processing ();
index f0e66c0793b5e522f9c966a8c6fead403d3b547b..450edad0e860c334464c729c809021ee9a52460c 100644 (file)
@@ -128,10 +128,8 @@ Ineq_constrained_qp::constraint_solve (Vector start) const
 
   while (iterations++ < MAXITER && act.degenerate_count_i_ < MAXDEGEN)
     {
 
   while (iterations++ < MAXITER && act.degenerate_count_i_ < MAXDEGEN)
     {
-      //#ifdef PARANOID
       if (experimental_features_global_b)
        assert_solution (x);
       if (experimental_features_global_b)
        assert_solution (x);
-      //#endif
       
       Vector direction= - act.find_active_optimum (gradient);
 
       
       Vector direction= - act.find_active_optimum (gradient);
 
@@ -155,9 +153,13 @@ Ineq_constrained_qp::constraint_solve (Vector start) const
          for (Inactive_iter ia (act); ia.ok(); ia++)
            {
              Real dot = ia.vec() * direction;
          for (Inactive_iter ia (act); ia.ok(); ia++)
            {
              Real dot = ia.vec() * direction;
-             if (dot >= 0)
+             Real mindot =  (experimental_features_global_b)
+               ? -EPS
+               : 0;
+             
+             if (dot >= mindot)
                continue;
                continue;
-
+             
              
              Real numerator = ia.rhs () - ia.vec()*x;
              if (numerator >= 0)
              
              Real numerator = ia.rhs () - ia.vec()*x;
              if (numerator >= 0)
index 2428f6655ab60c635d2033d57dd144044188168a..7ae4f06b53647c8a73835103057896f2a5a571df 100644 (file)
@@ -10,7 +10,6 @@
 #include "debug.hh"
 #include "item.hh"
 #include "p-col.hh"
 #include "debug.hh"
 #include "item.hh"
 #include "p-col.hh"
-// #include "elem-group.hh"
 #include "spanner.hh"
 
 Item::Item ()
 #include "spanner.hh"
 
 Item::Item ()
@@ -43,13 +42,10 @@ Item::hpos_f() const
 Line_of_score *
 Item::line_l() const
 {
 Line_of_score *
 Item::line_l() const
 {
-  Graphical_axis_group *ga = axis_group_l_a_[X_AXIS];
-  
-  if (!ga)
+  Graphical_element *g =parent_l (X_AXIS);
+  if (!g)
     return 0;
     return 0;
-  
-  assert (dynamic_cast <Score_element *> (ga));
-  return dynamic_cast <Score_element *> (ga)-> line_l ();
+  return dynamic_cast <Score_element *> (g)-> line_l ();
 }
 
 Direction
 }
 
 Direction
@@ -129,13 +125,8 @@ Item::handle_prebroken_dependencies()
 int
 Item::left_right_compare(Item const *l, Item const *r)
 {
 int
 Item::left_right_compare(Item const *l, Item const *r)
 {
-  while (!(dynamic_cast<Paper_column const *> (l)))
-    l = dynamic_cast<Item const*> (l->axis_group_l_a_[X_AXIS]);
-  while (!(dynamic_cast<Paper_column const *> (r)))
-    r = dynamic_cast<Item const*> (r->axis_group_l_a_[X_AXIS]);
-
-  Paper_column *p1 = (Paper_column*)l;
-  Paper_column* p2 = (Paper_column*)r;
+  Paper_column *p1 = l->column_l ();
+  Paper_column* p2 = r->column_l ();
   return p1->rank_i () - p2->rank_i ();
 }
 
   return p1->rank_i () - p2->rank_i ();
 }
 
@@ -176,7 +167,7 @@ Item::do_unlink()
 Paper_column *
 Item::column_l () const
 {
 Paper_column *
 Item::column_l () const
 {
-  return dynamic_cast<Item*> (axis_group_l_a_[X_AXIS]) ->column_l ();
+  return dynamic_cast<Item*> (parent_l (X_AXIS))->column_l ();
 }
 
 Item::Item (Item const &s)
 }
 
 Item::Item (Item const &s)
index 4ac49a3032deff4b80ddaa54a76f924937fba4ee..cbe73efe9586673ac788b7a4358490813b36e291 100644 (file)
@@ -74,7 +74,7 @@ Key_engraver::acknowledge_element (Score_element_info info)
 {
   if (dynamic_cast <Clef_change_req *> (info.req_l_)) 
     {
 {
   if (dynamic_cast <Clef_change_req *> (info.req_l_)) 
     {
-      int i= get_property ("createKeyOnClefChange").length_i ();
+      int i= get_property ("createKeyOnClefChange", 0).length_i ();
       if (i)
        create_key ();
     }
       if (i)
        create_key ();
     }
@@ -117,7 +117,7 @@ Key_engraver::read_req (Key_change_req const * r)
 {
   old_accidental_idx_arr_ = accidental_idx_arr_;
   key_.clear ();
 {
   old_accidental_idx_arr_ = accidental_idx_arr_;
   key_.clear ();
-  Scalar prop = get_property ("keyoctaviation");
+  Scalar prop = get_property ("keyoctaviation", 0);
   if (prop.length_i () > 0)
     {
       key_.multi_octave_b_ = ! prop.to_bool ();
   if (prop.length_i () > 0)
     {
       key_.multi_octave_b_ = ! prop.to_bool ();
index d6e9aecb8652c2d5dd5ac88bc45866efe6011d9a..268d847686328adc356a6ce75e71794f731d1993 100644 (file)
@@ -76,7 +76,7 @@ Key_item::calculate_position(int p, int a) const
   TODO space the `natural' signs wider
  */
 Molecule*
   TODO space the `natural' signs wider
  */
 Molecule*
-Key_item::brew_molecule_p() const
+Key_item::do_brew_molecule_p() const
 {
   Molecule*output = new Molecule;
   Real inter = paper()->internote_f ();
 {
   Molecule*output = new Molecule;
   Real inter = paper()->internote_f ();
index 0fd424aa928a31563884da7587ad89fe3596eb7f..ca487f83807a97db5520adb9fede6a038898615d 100644 (file)
@@ -23,7 +23,7 @@ Line_group_engraver_group::Line_group_engraver_group()
 void
 Line_group_engraver_group::typeset_element (Score_element *elem)
 {
 void
 Line_group_engraver_group::typeset_element (Score_element *elem)
 {
-  if (!elem->axis_group_l_a_[Y_AXIS])
+  if (!elem->parent_l (Y_AXIS))      
     staffline_p_->add_element (elem);
   Engraver_group_engraver::typeset_element (elem);
 }
     staffline_p_->add_element (elem);
   Engraver_group_engraver::typeset_element (elem);
 }
index c91627ffb04fd13398979bee7f064f33b051c409..ba549cb99de6bb57159e3c76aeff981549b7e466 100644 (file)
@@ -26,7 +26,7 @@ void
 Line_of_score::add_element (Score_element*e)
 {
   // avoid excess dependencies.
 Line_of_score::add_element (Score_element*e)
 {
   // avoid excess dependencies.
-  if (!(e->axis_group_l_a_[0] || e->axis_group_l_a_[1]))
+  if (! (e->parent_l (X_AXIS) || e->parent_l (Y_AXIS)) )
     add_dependency (e);
 }
 
     add_dependency (e);
 }
 
diff --git a/lily/linear-programming.cc b/lily/linear-programming.cc
deleted file mode 100644 (file)
index 727d3fc..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*   
-  linear-programming.cc --  implement 
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#if 0
-#include "linear-programming.hh"
-
-Linear_programming::Linear_programming (int n)
-  : cost_vec_ (n)
-{
-  dim_ = n;  
-}
-int
-Linear_programming::dim () const
-{
-  return dim_;
-}
-
-
-void
-Linear_programming::add_constraint (Vector c, double r)
-{
-  assert (c.dim () == cost_vec_);
-  constraints_.push (c);
-  constraint_rhss_.push (r);
-}
-
-void
-Linear_programming::set_cost (Vector c)
-{
-  assert (dim_ == c.dim ());
-  cost_vec_ = c;
-}
-
-void
-Linear_programming::print () const
-{
-  DOUT << "cost: " << cost_vec_;
-  for (int i=0; constraints_.size (); i++)
-    {
-      DOUT << constraints_[i] << ". x = " << constraint_rhss_[i];
-    }
-}
-
-void
-Linear_programming::OK () const
-{
-  assert (constraint_rhss_.size () == constraints_.size ());
-  for (int i=0; constraints_.size (); i++)
-    constraints_[i].dim () == cost_vec_.dim ();
-}
-
-
-bool
-Linear_programming::check_constraints (Vector v) const
-{
-  bool is_cool = true;
-  assert (v.dim () == dim_);
-  
-  for (int i=0; is_cool && i < v.dim (); i++)
-    is_cool = is_cool && v[i] >= 0;
-  for (int i=0; is_cool && i < constraints_.size (); i++)  
-    is_cool = is_cool && (constraints_[i] * v <= constraint_rhss_[i]);
-
-
-
-  return is_cool;
-}
-
-Vector
-Linear_programming::solve (Vector initial_basic_solution) const
-{
-  assert (check_constraints (initial_basic_solution));
-  
-  Array<bool> basis; 
-  for (int i=0; i < dim_; i++)
-    basis.push (bool(initial_basic_solution[i]));
-
-  Vector x = initial_basic_solution;
-  Real current_cost = x * cost_vec_;
-  while (iter < MAXITER)
-    {
-      // select pivot
-      
-
-      iter ++;
-    }
-
-
-
-      
-  
-  Array<int> binding, nonbinding;
-  
-  assert (check_constraints (initial));
-  OK ();
-
-  Vector x (initial);
-  Real value (x * cost_vec_):
-  
-  for (int i=0; i < constraints_.size ())
-    nonbinding.push (i);
-
-  while  ()
-    {
-      get_negative_index (
-    }
-  
-}
-#endif
index 3e0a90e89075a8bdc4301c9a71cdffeb2fc23f5b..43177a7322958231fe7838c4690bd9b8e8a98cbe 100644 (file)
@@ -45,7 +45,7 @@ Local_key_item::do_pre_processing()
 }
 
 Molecule*
 }
 
 Molecule*
-Local_key_item::brew_molecule_p() const
+Local_key_item::do_brew_molecule_p() const
 {
   Molecule*output = new Molecule;
 
 {
   Molecule*output = new Molecule;
 
@@ -95,13 +95,13 @@ Local_key_item::brew_molecule_p() const
   Interval x_int;
   for (int i=0; i < support_items_.size(); i++) 
     {
   Interval x_int;
   for (int i=0; i < support_items_.size(); i++) 
     {
-      Graphical_axis_group *common = 
+      Dimension_cache *common = 
        common_group (support_items_[i], X_AXIS);
 
        common_group (support_items_[i], X_AXIS);
 
-      Real x = support_items_[i]->relative_coordinate (common, X_AXIS)  
-       -relative_coordinate (common, X_AXIS);
+      Real x = support_items_[i]->relative_coordinate (common, X_AXIS)
+       - relative_coordinate (common, X_AXIS);
 
 
-      x_int.unite (x + support_items_[i]->width());
+      x_int.unite (x + support_items_[i]->extent (X_AXIS));
     }
   if (x_int.empty_b ())
     x_int = Interval(0,0);
     }
   if (x_int.empty_b ())
     x_int = Interval(0,0);
index c512fcfb7b0b613238986cafd63362697fc74776..35367f5e0e807b37c8d7f6eca7f0a08b95c1d733 100644 (file)
@@ -8,7 +8,6 @@
   Jan Nieuwenhuizen <janneke@gnu.org>
 
   TODO
   Jan Nieuwenhuizen <janneke@gnu.org>
 
   TODO
-      Read spacing info from AFMs
       Glissando
 */
 
       Glissando
 */
 
@@ -23,6 +22,8 @@
 #include "file-path.hh"
 #include "main.hh"
 #include "lily-guile.hh"
 #include "file-path.hh"
 #include "main.hh"
 #include "lily-guile.hh"
+#include "all-fonts.hh"
+#include "afm.hh"
 
 SCM
 array_to_list (SCM *a , int l)
 
 SCM
 array_to_list (SCM *a , int l)
@@ -40,30 +41,27 @@ Lookup::Lookup ()
 {
   paper_l_ = 0;
   symtables_p_ = new Symtables;
 {
   paper_l_ = 0;
   symtables_p_ = new Symtables;
-  afm_p_ =0;
+  afm_l_ = 0;  
 }
 
 Lookup::Lookup (Lookup const& s)
 {
 }
 
 Lookup::Lookup (Lookup const& s)
 {
-  font_ = s.font_;
-  font_path_ = s.font_path_;
+  font_name_ = s.font_name_;
   paper_l_ = s.paper_l_;
   symtables_p_ = new Symtables (*s.symtables_p_);
   paper_l_ = s.paper_l_;
   symtables_p_ = new Symtables (*s.symtables_p_);
-  afm_p_ = 0;
+  afm_l_ = 0;  
 }
 
 Lookup::Lookup (Symtables const& s)
 {
 }
 
 Lookup::Lookup (Symtables const& s)
 {
-  font_ = s.font_;
-  font_path_ = s.font_path_;
+  font_name_ = s.font_name_;
   paper_l_ = 0;
   symtables_p_ = new Symtables (s);
   paper_l_ = 0;
   symtables_p_ = new Symtables (s);
-  afm_p_ = 0;
+  afm_l_ = 0;
 }
 
 Lookup::~Lookup ()
 {
 }
 
 Lookup::~Lookup ()
 {
-  delete afm_p_;
   delete symtables_p_;
 }
 
   delete symtables_p_;
 }
 
@@ -89,17 +87,14 @@ Lookup::add (String s, Symtable*p)
   symtables_p_->add (s, p);
 }
 
   symtables_p_->add (s, p);
 }
 
+
 Atom
 Lookup::afm_find (String s, bool warn) const
 {
 Atom
 Lookup::afm_find (String s, bool warn) const
 {
-  if (!afm_p_)
-    {
-      *mlog << "[" << font_path_;
-      ( (Lookup*)this)->afm_p_ = new Adobe_font_metric (read_afm (font_path_));
-      *mlog << "]" << flush ;
-      DOUT << this->afm_p_->str ();
-    }
-  Adobe_font_char_metric m = afm_p_->find_char (s, warn);
+  if (!afm_l_)      
+    ((Lookup*)this)->afm_l_ = all_fonts_global_p->find_font (font_name_);
+  
+  Adobe_font_char_metric m = afm_l_->find_char (s, warn);
 
   Atom a;
   if (m.code () < 0)
 
   Atom a;
   if (m.code () < 0)
@@ -114,7 +109,7 @@ Lookup::afm_find (String s, bool warn) const
                       gh_int2scm (m.code ()),
                       SCM_UNDEFINED);
   a.str_ = "afm_find: " + s;
                       gh_int2scm (m.code ()),
                       SCM_UNDEFINED);
   a.str_ = "afm_find: " + s;
-  a.font_ = font_;
+  a.font_ = font_name_;
   return a;
 }
 
   return a;
 }
 
@@ -140,7 +135,7 @@ Lookup::bar (String str, Real h) const
 
 
   a.dim_.y () = Interval (-h/2, h/2);
 
 
   a.dim_.y () = Interval (-h/2, h/2);
-  a.font_ = font_;
+  a.font_ = font_name_;
   return a;
 }
 
   return a;
 }
 
@@ -186,7 +181,7 @@ Lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
   Real dy = d[Y_AXIS];
 
   Atom a;
   Real dy = d[Y_AXIS];
 
   Atom a;
-  a.font_ = font_;
+  a.font_ = font_name_;
   a.dim_[X_AXIS] = Interval (0, dx);
   a.dim_[Y_AXIS] = Interval (0 <? dy,  0 >? dy);
 
   a.dim_[X_AXIS] = Interval (0, dx);
   a.dim_[Y_AXIS] = Interval (0 <? dy,  0 >? dy);
 
@@ -227,7 +222,7 @@ Lookup::extender (Real width) const
                       gh_double2scm (width),
                       SCM_UNDEFINED);
   a.str_ = "extender";
                       gh_double2scm (width),
                       SCM_UNDEFINED);
   a.str_ = "extender";
-  a.font_ = font_;
+  a.font_ = font_name_;
   return a;
 }
 
   return a;
 }
 
@@ -326,7 +321,7 @@ Lookup::stem (Real y1, Real y2) const
                       gh_double2scm(-y1),
                       SCM_UNDEFINED);
 
                       gh_double2scm(-y1),
                       SCM_UNDEFINED);
 
-  a.font_ = font_;
+  a.font_ = font_name_;
   return a;
 }
 
   return a;
 }
 
@@ -339,8 +334,16 @@ Lookup::streepje (int type) const
   return  afm_find ("balls" + String ("-") +to_str (type) + "l");
 }
 
   return  afm_find ("balls" + String ("-") +to_str (type) + "l");
 }
 
-Dictionary<String> cmr_dict;
-Dictionary<Adobe_font_metric*> afm_p_dict;
+static Dict_initialiser<char const*> cmr_init[] = {
+  {"bold", "cmbx"},
+  {"dynamic", "feta-din"},
+  {"finger", "feta-nummer"},
+  {"italic", "cmti"},
+  {"roman", "cmr"},
+  {0,0}
+};
+
+static Dictionary<char const *> cmr_dict (cmr_init);
 
 Atom
 Lookup::text (String style, String text) const
 
 Atom
 Lookup::text (String style, String text) const
@@ -354,38 +357,14 @@ Lookup::text (String style, String text) const
   Real font_w = a.dim_.x ().length ();
   Real font_h = a.dim_.y ().length ();
 
   Real font_w = a.dim_.x ().length ();
   Real font_h = a.dim_.y ().length ();
 
-  if (!cmr_dict.elem_b ("roman"))
-    {
-      //brrrr
-      cmr_dict.elem ("bold") = "cmbx";
-      cmr_dict.elem ("dynamic") = "feta-din";
-      cmr_dict.elem ("finger") = "feta-nummer";
-      cmr_dict.elem ("italic") = "cmti";
-      cmr_dict.elem ("roman") = "cmr";
-    }
-
-  if (!afm_p_dict.elem_b (style))
+  if (cmr_dict.elem_b (style))
     {
     {
-      Adobe_font_metric* afm_p = 0;
-      String cmr_str = cmr_dict.elem (style) + to_str ((int) font_h) + ".afm";
-      String font_path = global_path.find (cmr_str);
-      if (!font_path.length_i ())
-        {
-         warning (_f("can't open file: `%s'", cmr_str.ch_C ()));
-         warning (_f("guessing dimensions for font style: `%s'", style.ch_C ()));
-       }
-      else
-        {
-         *mlog << "[" << font_path;
-         afm_p = new Adobe_font_metric (read_afm (font_path));
-         DOUT << afm_p->str ();
-         *mlog << "]" << flush ;
-       }
-      afm_p_dict.elem (style) = afm_p;
+      style = String (cmr_dict [style]) + to_str  ((int)font_h); // ugh
     }
   Real w = 0;
     }
   Real w = 0;
-  Adobe_font_metric* afm_p = afm_p_dict.elem (style);
+  Adobe_font_metric* afm_l = all_fonts_global_p->find_font (style);
   DOUT << "\nChars: ";
   DOUT << "\nChars: ";
+  
   for (int i = 0; i < text.length_i (); i++) 
     {
       if (text[i]=='\\')
   for (int i = 0; i < text.length_i (); i++) 
     {
       if (text[i]=='\\')
@@ -394,19 +373,18 @@ Lookup::text (String style, String text) const
       else
        {
          int c = text[i];
       else
        {
          int c = text[i];
-         if (afm_p && ((c >= 0) && (c < afm_p->char_metrics_.size ())))
+         int code = afm_l->ascii_to_metric_idx_[c];
+         if (code >=0)
            {
            {
-             Adobe_font_char_metric m = afm_p->char_metrics_[c];
+             Adobe_font_char_metric m = afm_l->char_metrics_[code];
              w += m.B_.x ().length ();
              DOUT << to_str (m.B_.x ().length ()) << " ";
            }
              w += m.B_.x ().length ();
              DOUT << to_str (m.B_.x ().length ()) << " ";
            }
-         else
-             w += font_w;
        }
     }
   DOUT << "\n" << to_str (w) << "\n";
   a.dim_.x () = Interval (0, w);
        }
     }
   DOUT << "\n" << to_str (w) << "\n";
   a.dim_.x () = Interval (0, w);
-  a.font_ = font_;
+  a.font_ = font_name_;
   return a;
 }
   
   return a;
 }
   
@@ -431,7 +409,7 @@ Lookup::vbrace (Real &y) const
                       SCM_UNDEFINED
                       );
   a.dim_[Y_AXIS] = Interval (-y/2,y/2);
                       SCM_UNDEFINED
                       );
   a.dim_[Y_AXIS] = Interval (-y/2,y/2);
-  a.font_ = font_;
+  a.font_ = font_name_;
   return a;
 }
 
   return a;
 }
 
@@ -449,7 +427,7 @@ Lookup::hairpin (Real width, bool decresc, bool continued) const
                       SCM_UNDEFINED);
   a.dim_.x () = Interval (0, width);
   a.dim_.y () = Interval (-2*height, 2*height);
                       SCM_UNDEFINED);
   a.dim_.x () = Interval (0, width);
   a.dim_.y () = Interval (-2*height, 2*height);
-  a.font_ = font_;
+  a.font_ = font_name_;
   return a;
 }
 
   return a;
 }
 
@@ -486,7 +464,7 @@ Lookup::slur (Array<Offset> controls) const
 
   a.dim_[X_AXIS] = Interval (0, dx);
   a.dim_[Y_AXIS] = Interval (0 <? dy,  0 >? dy);
 
   a.dim_[X_AXIS] = Interval (0, dx);
   a.dim_[Y_AXIS] = Interval (0 <? dy,  0 >? dy);
-  a.font_ = font_;
+  a.font_ = font_name_;
   return a;
 }
 
   return a;
 }
 
@@ -494,14 +472,6 @@ Atom
 Lookup::vbracket (Real &y) const
 {
   Atom a;
 Lookup::vbracket (Real &y) const
 {
   Atom a;
-  Real min_y = paper_l_->staffheight_f ();
-  if (y < min_y)
-    {
-      warning (_ ("bracket")
-              + " " + _ ("too small") +  " (" + print_dimen (y) + ")");
-      //      y = min_y;
-    }
-
   a.lambda_ =  gh_list (ly_symbol ("bracket"),
                        gh_double2scm (y),
                        SCM_UNDEFINED);
   a.lambda_ =  gh_list (ly_symbol ("bracket"),
                        gh_double2scm (y),
                        SCM_UNDEFINED);
@@ -521,7 +491,7 @@ Lookup::volta (Real w, bool last_b) const
                       SCM_UNDEFINED);
   a.str_ = "volta";
   Real interline_f = paper_l_->interline_f ();
                       SCM_UNDEFINED);
   a.str_ = "volta";
   Real interline_f = paper_l_->interline_f ();
-//  a.dim_[Y_AXIS] = Interval (0, 2 * interline_f);
+
   a.dim_[Y_AXIS] = Interval (-interline_f, interline_f);
   a.dim_[X_AXIS] = Interval (0, w);
   return a;
   a.dim_[Y_AXIS] = Interval (-interline_f, interline_f);
   a.dim_[X_AXIS] = Interval (0, w);
   return a;
index 9fb403f2da0d2c264553e05c6f687017515f0bf5..c5447ad97ed05200baea881cc766d9d06e0baadf 100644 (file)
@@ -7,7 +7,6 @@
   Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
   Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
-#include "lyric-engraver.hh"
 #include "musical-request.hh"
 #include "text-item.hh"
 #include "paper-def.hh"
 #include "musical-request.hh"
 #include "text-item.hh"
 #include "paper-def.hh"
 #include "paper-def.hh"
 #include "main.hh"
 #include "dimensions.hh"
 #include "paper-def.hh"
 #include "main.hh"
 #include "dimensions.hh"
+#include "g-text-item.hh"
+
+
+#include "engraver.hh"
+#include "array.hh"
+#include "lily-proto.hh"
+
+class Lyric_engraver : public Engraver 
+{
+protected:
+  virtual void do_pre_move_processing();
+  virtual bool do_try_music (Music*);
+  virtual void do_process_requests();
+
+public:
+  Lyric_engraver();
+  VIRTUAL_COPY_CONS(Translator);
+
+private:
+  Link_array<Lyric_req> lyric_req_l_arr_;
+  Link_array<Item> text_p_arr_;
+};
+
 
 ADD_THIS_TRANSLATOR(Lyric_engraver);
 
 
 ADD_THIS_TRANSLATOR(Lyric_engraver);
 
+
 Lyric_engraver::Lyric_engraver()
 {
 }
 Lyric_engraver::Lyric_engraver()
 {
 }
@@ -39,27 +62,16 @@ Lyric_engraver::do_process_requests()
   if (text_p_arr_.size ())
     return;
 
   if (text_p_arr_.size ())
     return;
 
-  Scalar style = get_property ("textstyle");
-  Scalar alignment = get_property ("textalignment");
   for (int i=0; i < lyric_req_l_arr_.size (); i++)
     {
       Lyric_req* request_l = lyric_req_l_arr_[i];
   for (int i=0; i < lyric_req_l_arr_.size (); i++)
     {
       Lyric_req* request_l = lyric_req_l_arr_[i];
-      Text_def* text_p = new Text_def;
-      text_p->text_str_ = request_l->text_str_;
-      text_p->align_dir_ = LEFT;
+      G_text_item* item_p =  new G_text_item;
+      item_p->text_str_ = request_l->text_str_;
+
+      Scalar style = get_property ("textstyle", 0);
       if (style.length_i ())
       if (style.length_i ())
-       text_p->style_str_ = style;
-      if (alignment.isnum_b())
-       text_p->align_dir_= (Direction)(int)alignment;
+       item_p->style_str_ = style;
       
       
-      Text_item* item_p =  new Text_item (text_p);
-      item_p->dir_ = DOWN;
-      item_p->fat_b_ = true;
-      // urg
-      // item_p->translate (Offset (0, (i - 1) * item_p->height ().length_i ()));
-//      if (i && ((Text_def*)text_p_arr_[i - 1]->tdef_p_)->text_str_.length_i ())
-      // urg, when/how can one get the heigt of this thing?
-      item_p->translate (Offset (0, - i * 12 PT));
       text_p_arr_.push (item_p);
       announce_element (Score_element_info (item_p, request_l));
     }
       text_p_arr_.push (item_p);
       announce_element (Score_element_info (item_p, request_l));
     }
index 38dc2cb17315baa411a1f57aa1705c516bc4c4de..b5ca92806110ab31d99fee3302fb3d4031b9214c 100644 (file)
@@ -12,6 +12,7 @@
 #include <locale.h>
 #include "lily-guile.hh"
 
 #include <locale.h>
 #include "lily-guile.hh"
 
+#include "all-fonts.hh"
 #include "proto.hh"
 #include "dimensions.hh"
 #include "plist.hh"
 #include "proto.hh"
 #include "dimensions.hh"
 #include "plist.hh"
@@ -38,6 +39,7 @@ bool no_timestamps_global_b = false;
 bool find_old_relative_b = false;
 
 char const* output_global_ch = "tex";
 bool find_old_relative_b = false;
 
 char const* output_global_ch = "tex";
+All_font_metrics *all_fonts_global_p;
 
 String default_outname_base_global =  "lelie";
 String outname_str_global;
 
 String default_outname_base_global =  "lelie";
 String outname_str_global;
@@ -246,7 +248,8 @@ void
 main_prog (int argc, char **argv)
 {
   default_outname_base_global = "lelie";
 main_prog (int argc, char **argv)
 {
   default_outname_base_global = "lelie";
-
+  all_fonts_global_p = new All_font_metrics (global_path.str ());
+  
   int p=0;
   const char *arg ;
   while ((arg= oparser_global_p->get_next_arg ()))
   int p=0;
   const char *arg ;
   while ((arg= oparser_global_p->get_next_arg ()))
@@ -361,7 +364,12 @@ main (int argc, char **argv)
        }
     }
 
        }
     }
 
+#ifdef WINNT
+  gh_enter (argc, argv, main_prog);
+#else
   gh_enter (argc, argv, (void(*)())main_prog);
   gh_enter (argc, argv, (void(*)())main_prog);
+#endif
+
   return 0;                    // unreachable
 }
 
   return 0;                    // unreachable
 }
 
index b3f9bf9f0c93f76fec4ea6fcd92ba1798d3cd9e9..d3c736e96b34b8b3f67ceeb9bafb6faeaccc9120 100644 (file)
@@ -41,7 +41,7 @@ Mark_engraver::do_process_requests ()
     return;
 
   script_p_ = new Script;
     return;
 
   script_p_ = new Script;
-  //  script_p_->breakable_b_ = true;
+  script_p_->breakable_b_ = true;
 
   Text_def *td_p = new Text_def;
 
 
   Text_def *td_p = new Text_def;
 
@@ -51,16 +51,16 @@ Mark_engraver::do_process_requests ()
   td_p->style_str_ = td_p->text_str_.index_any_i ("0123456789") >= 0 
     ? "mark" : "Large";
 
   td_p->style_str_ = td_p->text_str_.index_any_i ("0123456789") >= 0 
     ? "mark" : "Large";
 
-  script_p_->dir_ = UP;
+  script_p_->dir_ = LEFT;
   script_p_->specs_p_ = td_p->clone ();
   script_p_->specs_p_ = td_p->clone ();
-  // script_p_->postbreak_only_b_ = false;
+  script_p_->postbreak_only_b_ = true;
   
   
-  Scalar padding = get_property ("markScriptPadding");
+  Scalar padding = get_property ("markScriptPadding", 0);
   if (padding.length_i() && padding.isnum_b ())
     {
       script_p_->padding_f_ = Real(padding);
     }
   if (padding.length_i() && padding.isnum_b ())
     {
       script_p_->padding_f_ = Real(padding);
     }
-  Scalar break_priority = get_property ("markBreakPriority");
+  Scalar break_priority = get_property ("markBreakPriority", 0);
   if (break_priority.length_i() && break_priority.isnum_b ())
     {
       script_p_->break_priority_i_ = int(break_priority);
   if (break_priority.length_i() && break_priority.isnum_b ())
     {
       script_p_->break_priority_i_ = int(break_priority);
index 88ccea73a779dd455f068315063617baf5b00d44..e12162159305f57b3dff512cbd25f6626af34fea 100644 (file)
@@ -11,7 +11,6 @@
 #include "midi-def.hh"
 #include "translator.hh"
 #include "performance.hh"
 #include "midi-def.hh"
 #include "translator.hh"
 #include "performance.hh"
-#include "assoc-iter.hh"
 #include "score-performer.hh"
 #include "debug.hh"
 
 #include "score-performer.hh"
 #include "debug.hh"
 
@@ -67,10 +66,8 @@ Midi_def::print() const
 #endif
 }
 
 #endif
 }
 
-
-
-
 int Midi_def::default_count_i_=0;
 int Midi_def::default_count_i_=0;
+
 int
 Midi_def::get_next_default_count () const
 {
 int
 Midi_def::get_next_default_count () const
 {
index 381635b46dee4553c9dd4df732adfa6916454379..5ba96e3272e8244eb696969ce37e9547f05404d1 100644 (file)
@@ -41,7 +41,7 @@ itemlist_width (const Array<Item*> &its)
    
   for (int j =0; j < its.size(); j++)
     {
    
   for (int j =0; j < its.size(); j++)
     {
-       iv.unite (its[j]->width());
+       iv.unite (its[j]->extent (X_AXIS));
 
     }
   return iv;
 
     }
   return iv;
index b6c8b5d5b3a54e58e3c1a545afaa0a0cc1d19c61..a6144ffc0df7d15fc296b593c31eb2fcc9cc1aaf 100644 (file)
@@ -30,7 +30,7 @@ Multi_measure_rest::do_print () const
 }
 
 Molecule*
 }
 
 Molecule*
-Multi_measure_rest::brew_molecule_p () const
+Multi_measure_rest::do_brew_molecule_p () const
 {
   /*
    [TODO]                                     3
 {
   /*
    [TODO]                                     3
@@ -48,7 +48,6 @@ Multi_measure_rest::brew_molecule_p () const
       Text_def text;
       text.text_str_ = to_str (measures_i_);
       text.style_str_ = "number";
       Text_def text;
       text.text_str_ = to_str (measures_i_);
       text.style_str_ = "number";
-      text.align_dir_ = CENTER;
       Atom s = text.get_atom (paper (), UP);
       s.translate_axis (3.0 * interline_f, Y_AXIS);
       mol_p->add_atom (s);
       Atom s = text.get_atom (paper (), UP);
       s.translate_axis (3.0 * interline_f, Y_AXIS);
       mol_p->add_atom (s);
index d243aed3f1e0025d32ba17d0d4842054f955dd0c..6ebb409db815c9f7da9a2addc4da53641e249edc 100644 (file)
@@ -32,12 +32,6 @@ Music_list_iterator::do_process_and_next (Moment)
 {
 }
 
 {
 }
 
-Music_list*
-Music_list_iterator::music_list_l () const
-{
-  return (Music_list *) music_l_;
-}
-
 Moment
 Music_list_iterator::next_moment () const
 {
 Moment
 Music_list_iterator::next_moment () const
 {
index 34d4fdaf733efda49b3598c72ffaf275bd4442c4..1e531211ebc0b4b6179bba4d9dfad2ebd32791b5 100644 (file)
@@ -234,15 +234,7 @@ Slur_req::do_print () const
 
 
 
 
 
 
-Plet_req::Plet_req ()
-{
-  plet_i_ = 0;
-}
 
 
-void
-Plet_req::do_print () const
-{
-}
 
 Extender_req::Extender_req ()
 {
 
 Extender_req::Extender_req ()
 {
index 6446083926c2f2afbb43fd690eb6d4fb9ac7c100..059ab68dddde627a3199c5c9537fb52f9a2a672c 100644 (file)
 #include "notename-table.hh"
 #include "interval.hh"
 #include "identifier.hh"
 #include "notename-table.hh"
 #include "interval.hh"
 #include "identifier.hh"
-#include "assoc-iter.hh"
 #include "parser.hh"
 #include "keyword.hh"
 #include "parser.hh"
 #include "keyword.hh"
-#include "assoc.hh"
 #include "my-lily-lexer.hh"
 #include "debug.hh"
 #include "source-file.hh"
 #include "my-lily-lexer.hh"
 #include "debug.hh"
 #include "source-file.hh"
index 3894bd6e2bcb81659b3fdebac2b8d388cb28f570..826b18a113f61e8506b20db3782c6cff8d637378 100644 (file)
@@ -38,37 +38,38 @@ Interval_t<int>
 Note_column::head_positions_interval() const
 {
   ((Note_column*)this)->sort();
 Note_column::head_positions_interval() const
 {
   ((Note_column*)this)->sort();
- Interval_t<int>  iv;
 Interval_t<int>  iv;
 
 
- iv.set_empty ();
 iv.set_empty ();
 
 
- if (head_l_arr_.size ())
-   iv = Interval_t<int>(head_l_arr_[0]->position_i_, 
-                         head_l_arr_.top()->position_i_);
 if (head_l_arr_.size ())
+    iv = Interval_t<int>(head_l_arr_[0]->position_i_, 
+                        head_l_arr_.top()->position_i_);
   
   return iv;
 }
 
   
   return iv;
 }
 
+/*
 Interval 
 Interval 
-Note_column::width () const
+Note_column::do_width () const
 {
   if (head_l_arr_.size ())
 {
   if (head_l_arr_.size ())
-    return head_l_arr_[0]->width ();
+    return head_l_arr_[0]->extent (X_AXIS);
   else
     return Interval (0,0);
 }
   else
     return Interval (0,0);
 }
-
+*/
 void
 Note_column::do_pre_processing()
 {
 void
 Note_column::do_pre_processing()
 {
-
   if (!dir_)
     {
       if (stem_l_)
        dir_ = stem_l_->dir_;
       else if (head_l_arr_.size ())
        {
   if (!dir_)
     {
       if (stem_l_)
        dir_ = stem_l_->dir_;
       else if (head_l_arr_.size ())
        {
-         dir_ = (head_positions_interval().center () >=  5) ? DOWN:UP;
+         assert (false);       // looks obsolete?
+         dir_ = sign (head_positions_interval().center ());
        }
     }
   Script_column::do_pre_processing();
        }
     }
   Script_column::do_pre_processing();
@@ -83,7 +84,7 @@ Note_column::set_stem (Stem * stem_l)
   stem_l_ = stem_l;
   /* 
      don't add stem to support; mostly invisible for rest-columns (and possibly taken . .)
   stem_l_ = stem_l;
   /* 
      don't add stem to support; mostly invisible for rest-columns (and possibly taken . .)
-   */
+  */
   Score_element::add_dependency (stem_l);
   for (int i=0; i < script_l_arr_.size(); i++)
     script_l_arr_[i]->set_stem (stem_l);
   Score_element::add_dependency (stem_l);
   for (int i=0; i < script_l_arr_.size(); i++)
     script_l_arr_[i]->set_stem (stem_l);
index b8c5668bd090b1ff401dc7be77453d3977dc0b7b..cbd0c6983975c949a8d379e359a3846e67e7d9f6 100644 (file)
@@ -53,7 +53,7 @@ Note_head::do_width () const
 }
 
 Molecule*
 }
 
 Molecule*
-Note_head::brew_molecule_p() const 
+Note_head::do_brew_molecule_p() const 
 {
   Molecule*out = 0;
   Paper_def *p = paper();
 {
   Molecule*out = 0;
   Paper_def *p = paper();
index bda50b6188a6e9712b9087c286b84e51ff7a24bf..f537469850285c54978658113ea508e1dce64493 100644 (file)
@@ -35,7 +35,7 @@ Note_performer::do_process_requests ()
     {
       int transposing_i = 0;
       //urg
     {
       int transposing_i = 0;
       //urg
-      Scalar prop = get_property ("transposing");
+      Scalar prop = get_property ("transposing", 0);
       if (!prop.empty_b () && prop.isnum_b ()) 
        transposing_i = prop;
 
       if (!prop.empty_b () && prop.isnum_b ()) 
        transposing_i = prop;
 
index 2afdbc129c206728fe5a470b23f9ece2a75ef769..aed825ed878ad952f9c1d986851b94e4295e76db 100644 (file)
@@ -313,12 +313,16 @@ Paper_score::broken_col_range (Item const*l_item_l, Item const*r_item_l) const
   Item const*r=r_item_l;
 
   // huh? see Item::left_right_compare ()
   Item const*r=r_item_l;
 
   // huh? see Item::left_right_compare ()
+  /*
   while (! (dynamic_cast<Paper_column const *> (l)))
     l = dynamic_cast<Item*> (l->axis_group_l_a_[X_AXIS]);
 
   while (! (dynamic_cast<Paper_column const *> (r)))
     r = dynamic_cast<Item*>(r->axis_group_l_a_[X_AXIS]);
   while (! (dynamic_cast<Paper_column const *> (l)))
     l = dynamic_cast<Item*> (l->axis_group_l_a_[X_AXIS]);
 
   while (! (dynamic_cast<Paper_column const *> (r)))
     r = dynamic_cast<Item*>(r->axis_group_l_a_[X_AXIS]);
-
+  */
+  l = l->column_l ();
+  r = r->column_l ();
+  
   PCursor<Paper_column*> start (l ? find_col ((Paper_column*)l)+1 : col_p_list_.top ());
   PCursor<Paper_column*> stop (r ? find_col ((Paper_column*)r) : col_p_list_.bottom ());
 
   PCursor<Paper_column*> start (l ? find_col ((Paper_column*)l)+1 : col_p_list_.top ());
   PCursor<Paper_column*> stop (r ? find_col ((Paper_column*)r) : col_p_list_.bottom ());
 
index 93193f1508211b615d28eed5fdb12e7b1c1e592e..e347d9d96490d9609fed45d8052a4442364de9bb 100644 (file)
@@ -8,12 +8,10 @@
 
 #include <math.h>
 #include "string.hh"
 
 #include <math.h>
 #include "string.hh"
-#include "assoc.hh"
 #include "misc.hh"
 #include "paper-def.hh"
 #include "debug.hh"
 #include "lookup.hh"
 #include "misc.hh"
 #include "paper-def.hh"
 #include "debug.hh"
 #include "lookup.hh"
-#include "assoc-iter.hh"
 #include "score-engraver.hh"
 #include "p-score.hh"
 #include "identifier.hh"
 #include "score-engraver.hh"
 #include "p-score.hh"
 #include "identifier.hh"
 
 Paper_def::Paper_def ()
 {
 
 Paper_def::Paper_def ()
 {
-  lookup_p_assoc_p_ = new Assoc<int, Lookup*>;
+  lookup_p_tab_p_ = new Hash_table<int, Lookup*>;
 }
 
 
 Paper_def::~Paper_def ()
 {
 }
 
 
 Paper_def::~Paper_def ()
 {
-  for (Assoc_iter<int, Lookup*> ai(*lookup_p_assoc_p_); ai.ok (); ai++)
+  for (Hash_table_iter<int, Lookup*> ai(*lookup_p_tab_p_); ai.ok (); ai++)
     {
       delete ai.val ();
     }
   
     {
       delete ai.val ();
     }
   
-  delete lookup_p_assoc_p_;
+  delete lookup_p_tab_p_;
 }
 
 Paper_def::Paper_def (Paper_def const&s)
   : Music_output_def (s)
 {
 }
 
 Paper_def::Paper_def (Paper_def const&s)
   : Music_output_def (s)
 {
-  lookup_p_assoc_p_ = new Assoc<int, Lookup*>;
-  for (Assoc_iter<int, Lookup*> ai(*s.lookup_p_assoc_p_); ai.ok (); ai++)
+  lookup_p_tab_p_ = new Hash_table<int, Lookup*>;
+  for (Hash_table_iter<int, Lookup*> ai(*s.lookup_p_tab_p_); ai.ok (); ai++)
     {
       Lookup * l = new Lookup (*ai.val ());
       l->paper_l_ = this;
     {
       Lookup * l = new Lookup (*ai.val ());
       l->paper_l_ = this;
@@ -125,12 +123,12 @@ Paper_def::arithmetic_spacing (Moment d ,Real k) const
 void
 Paper_def::set_lookup (int i, Lookup*l)
 {
 void
 Paper_def::set_lookup (int i, Lookup*l)
 {
-  if (lookup_p_assoc_p_->elem_b (i))
+  if (lookup_p_tab_p_->elem_b (i))
     {
     {
-      delete lookup_p_assoc_p_->elem (i);
+      delete lookup_p_tab_p_->elem (i);
     }
   l ->paper_l_ = this;
     }
   l ->paper_l_ = this;
-  (*lookup_p_assoc_p_)[i] = l;
+  (*lookup_p_tab_p_)[i] = l;
 }
 
 Real
 }
 
 Real
@@ -185,7 +183,7 @@ Paper_def::print () const
   Music_output_def::print ();
   DOUT << "Paper {";
 
   Music_output_def::print ();
   DOUT << "Paper {";
 
-  for (Assoc_iter<int, Lookup*> ai(*lookup_p_assoc_p_); ai.ok (); ai++)
+  for (Hash_table_iter<int, Lookup*> ai(*lookup_p_tab_p_); ai.ok (); ai++)
     {
       DOUT << "Lookup: " << ai.key () ;
       ai.val ()->print ();
     {
       DOUT << "Lookup: " << ai.key () ;
       ai.val ()->print ();
@@ -198,7 +196,7 @@ Paper_def::print () const
 Lookup const *
 Paper_def::lookup_l (int i) const
 {
 Lookup const *
 Paper_def::lookup_l (int i) const
 {
-  return (*lookup_p_assoc_p_)[i];
+  return (*lookup_p_tab_p_)[i];
 }
 
 
 }
 
 
index b7074ad29548350d3145b614ce07d26ee0792e07..b023ea14eaf521e1c7fbe20c1af2633b97a8dad5 100644 (file)
@@ -43,7 +43,7 @@ Paper_outputter::output_header ()
   if (safe_global_b)
     {
       ly_set_scm ("security-paranoia", SCM_BOOL_T);
   if (safe_global_b)
     {
       ly_set_scm ("security-paranoia", SCM_BOOL_T);
-      gh_eval_str ("(set! security-paranoia #t)");
+      //      gh_eval_str ("(set! security-paranoia #t)");
     }
   String s = String ("(eval (") + output_global_ch + "-scm 'all-definitions))";
   gh_eval_str (s.ch_C());
     }
   String s = String ("(eval (") + output_global_ch + "-scm 'all-definitions))";
   gh_eval_str (s.ch_C());
index 7898b1c67601bf2f46dac7180a8be65f9d771f8b..405d9c1e30c40ff2ee018c7d16a80f4b41dfb437 100644 (file)
@@ -906,7 +906,7 @@ abbrev_command_req:
                $$ = $1->access_content_Request (true);
        }
        | '~'   {
                $$ = $1->access_content_Request (true);
        }
        | '~'   {
-               $$ = new Command_tie_req;
+               $$ = new Tie_req;
        }
        | '['           {
                Beam_req*b= new Beam_req;
        }
        | '['           {
                Beam_req*b= new Beam_req;
@@ -1555,11 +1555,7 @@ symtables_body:
                $$ = $1->access_content_Symtables (true);
        }
        | symtables_body FONT STRING            {
                $$ = $1->access_content_Symtables (true);
        }
        | symtables_body FONT STRING            {
-               $$->font_ = *$3;
-               $$->font_path_ = global_path.find (*$3);
-               if  (!$$->font_path_.length_i ())
-                       THIS->here_input ().error (_f("can't open file: `%s'", $3->ch_C()));
-
+               $$->font_name_ = *$3;
                delete $3;
        }
        | symtables_body STRING '=' symtable            {
                delete $3;
        }
        | symtables_body STRING '=' symtable            {
diff --git a/lily/plet-engraver.cc b/lily/plet-engraver.cc
deleted file mode 100644 (file)
index ff85567..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-#if 0
-/*
-  plet-engraver.cc -- implement Plet_engraver
-
-  (c)  1997--1998 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#include "proto.hh"
-#include "musical-request.hh"
-#include "plet-engraver.hh"
-#include "plet-spanner.hh"
-#include "text-def.hh"
-#include "beam.hh"
-#include "score-column.hh"
-#include "stem.hh"
-
-
-ADD_THIS_TRANSLATOR (Plet_engraver);
-
-Plet_engraver::Plet_engraver ()
-{
-  beam_mom_drul_[LEFT] = span_mom_drul_[LEFT] = INT_MAX;
-  beam_mom_drul_[RIGHT] = span_mom_drul_[LEFT] = -INT_MAX;
-  plet_spanner_p_ = 0;
-  span_reqs_drul_[RIGHT] = span_reqs_drul_[LEFT] = 0;
-}
-
-void
-Plet_engraver::acknowledge_element (Score_element_info i)
-{
-
-  Stem * st = (dynamic_cast<Stem *> (i.elem_l_));
-  if (!st)
-    return;
-  if (!plet_spanner_p_)
-    return;
-  if (!span_reqs_drul_[LEFT])
-    return;
-
-  if (!plet_spanner_p_->stem_l_drul_[LEFT])
-    plet_spanner_p_->set_stem (LEFT, st);
-  else
-    if (span_reqs_drul_[RIGHT] && !plet_spanner_p_->stem_l_drul_[RIGHT]) 
-      plet_spanner_p_->set_stem (RIGHT, st);
-}
-
-bool
-Plet_engraver::do_try_music (Music* req_l)
-{
-  /*
-    UGH! This is incorrect!
-    Beam_req might not reach the Plet_engraver if ordering is wrong!
-   */
-  Beam_req* b = dynamic_cast <Beam_req *> (req_l);
-  if (b)
-    {
-      if (b->spantype_)
-        {
-          Direction d = (Direction)(((int)(b->spantype_ - 1)) * 2 - 1);
-          beam_mom_drul_[d] = get_staff_info ().musical_l ()->when ();
-       }
-      return false;
-    }
-    
-  Plet_req* p = dynamic_cast <Plet_req *> (req_l);
-  if (!p)
-    return false;
-
-  if (bool (plet_spanner_p_) == bool (p->spantype_ == START))
-    return false;
-
-  Direction d = (!plet_spanner_p_) ? LEFT : RIGHT;
-  if (span_reqs_drul_[d] && !span_reqs_drul_[d]->equal_b (p))
-    return false;
-
-  span_reqs_drul_[d] = p;
-  span_mom_drul_[d] = get_staff_info ().musical_l ()->when ();
-  return true;
-}
-
-void
-Plet_engraver::do_removal_processing ()
-{
-  if (plet_spanner_p_)
-    {
-      span_reqs_drul_[LEFT]->warning (_ ("unterminated plet"));
-      plet_spanner_p_->unlink ();
-      delete plet_spanner_p_;
-      plet_spanner_p_ = 0;
-      span_reqs_drul_[RIGHT] = span_reqs_drul_[LEFT] = 0;
-    }
-}
-
-void
-Plet_engraver::do_process_requests ()
-{
-  if (plet_spanner_p_ || !span_reqs_drul_[LEFT])
-    return;
-
-  plet_spanner_p_ = new Plet_spanner;
-  plet_spanner_p_->tdef_p_->text_str_ = to_str (span_reqs_drul_[LEFT]->plet_i_);
-
-  announce_element (Score_element_info (plet_spanner_p_, span_reqs_drul_[LEFT]));
-}
-
-void
-Plet_engraver::do_pre_move_processing ()
-{
-  if (!plet_spanner_p_ || !span_reqs_drul_[RIGHT]) 
-    return;
-
-  Scalar prop = get_property ("pletvisibility");
-  if (prop.isnum_b ()) 
-    plet_spanner_p_->visibility_i_ = prop;
-
-  if ((beam_mom_drul_[LEFT] <= span_mom_drul_[LEFT])
-     && (beam_mom_drul_[RIGHT] >= span_mom_drul_[RIGHT]))
-     plet_spanner_p_->visibility_i_ &= ~2;
-
-  if (plet_spanner_p_->visibility_i_)
-    typeset_element (plet_spanner_p_);
-  else
-    {
-      plet_spanner_p_->unlink ();
-      delete plet_spanner_p_;
-    }
-  
-  plet_spanner_p_ = 0;
-  span_reqs_drul_[RIGHT] = span_reqs_drul_[LEFT] = 0;
-}
-
-#endif
diff --git a/lily/plet-swallow-engraver.cc b/lily/plet-swallow-engraver.cc
deleted file mode 100644 (file)
index 3144ebc..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-  plet-swallow-engraver.cc -- implement Plet_swallow_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "musical-request.hh"
-#include "plet-swallow-engraver.hh"
-
-
-ADD_THIS_TRANSLATOR(Plet_swallow_engraver);
-
-bool
-Plet_swallow_engraver::do_try_music (Music* req_l)
-{
-  return dynamic_cast<Plet_req *> (req_l);
-}
index a28a3caedc08c44c1ed4cf5545a0fb99d70258f2..e365ba503cdd0a27c664ed9bd5a561f194b0e003 100644 (file)
@@ -29,7 +29,7 @@ Repeat_engraver::do_try_music (Music* m)
 {
   if (Repeated_music* r = dynamic_cast<Repeated_music *> (m))
     {
 {
   if (Repeated_music* r = dynamic_cast<Repeated_music *> (m))
     {
-      r->unfold_b_ = get_property ("unfoldRepeats").to_bool ();
+      r->unfold_b_ = get_property ("unfoldRepeats", 0).to_bool ();
       if (r->unfold_b_)
         return true;
  
       if (r->unfold_b_)
         return true;
  
index d9d2b765d004a3e4a835ce18a4b8ec2fa24bce17..0c527bd9ba8d9595f6d8d13bc51031645937b43f 100644 (file)
@@ -35,7 +35,7 @@ Rest::Rest ()
 }
 
 Molecule *
 }
 
 Molecule *
-Rest::brew_molecule_p () const
+Rest::do_brew_molecule_p () const
 {
   int staff_size_i_ = 8;
   bool streepjes_b = abs(position_i_) > staff_size_i_ /2 &&  
 {
   int staff_size_i_ = 8;
   bool streepjes_b = abs(position_i_) > staff_size_i_ /2 &&  
index 388e54cab64af1d975325da40362bca521ad012c..28e3cf89c4be93e84154ab31f78b2f76aa90fea2 100644 (file)
@@ -97,9 +97,9 @@ Rhythmic_column_engraver::do_pre_move_processing()
     {
       if (! ncol_p_->h_shift_b_)
        // egcs
     {
       if (! ncol_p_->h_shift_b_)
        // egcs
-       ncol_p_->h_shift_b_  = get_property ("hshift").operator bool ();
+       ncol_p_->h_shift_b_  = get_property ("hshift", 0).operator bool ();
       if (! ncol_p_->dir_)
       if (! ncol_p_->dir_)
-       ncol_p_->dir_ =(Direction) int(get_property ("ydirection"));
+       ncol_p_->dir_ =(Direction) int(get_property ("ydirection", 0));
 
       typeset_element (ncol_p_);
       ncol_p_ =0;
 
       typeset_element (ncol_p_);
       ncol_p_ =0;
index b2c72a65dd24cace9f40cab956e021d2f55b299a..2b2064c0671f6941d0761d5a0d6ef96f1767466a 100644 (file)
@@ -21,11 +21,15 @@ Rhythmic_head::do_add_processing ()
 {
   if (dots_i_ && !dots_l_)
     {
 {
   if (dots_i_ && !dots_l_)
     {
-      Dots *d = new Dots;
+      assert (false);
+      /*      Dots *d = new Dots;
       add_dots (d);
       pscore_l_->typeset_element (d);
       add_dots (d);
       pscore_l_->typeset_element (d);
+
+
+      
       axis_group_l_a_[Y_AXIS]->add_element (d);
       axis_group_l_a_[Y_AXIS]->add_element (d);
-      axis_group_l_a_[X_AXIS]->add_element (d);
+      axis_group_l_a_[X_AXIS]->add_element (d);*/
     }
   if (dots_l_)
     {
     }
   if (dots_l_)
     {
index 6bdc9d990285f8a07451aaa8f9b48d509f4ab73c..c5e5fed03c78eec68dbfb8dbac15d17d9ea23e4c 100644 (file)
 #include "misc.hh"
 #include "paper-outputter.hh"
 
 #include "misc.hh"
 #include "paper-outputter.hh"
 
-#define PARANOID
-
 Score_element::Score_element()
 {
 Score_element::Score_element()
 {
+  output_p_ =0;
   transparent_b_ = false;
   size_i_ = 0;
   pscore_l_=0;
   transparent_b_ = false;
   size_i_ = 0;
   pscore_l_=0;
@@ -41,6 +40,7 @@ Score_element::Score_element (Score_element const&s)
      dependents.      
    */
   copy_edges_out (s);
      dependents.      
    */
   copy_edges_out (s);
+  output_p_ =0;
   transparent_b_ = s.transparent_b_;
   status_i_ = s.status_i_;
   pscore_l_ = s.pscore_l_;
   transparent_b_ = s.transparent_b_;
   status_i_ = s.status_i_;
   pscore_l_ = s.pscore_l_;
@@ -52,6 +52,7 @@ Score_element::Score_element (Score_element const&s)
 
 Score_element::~Score_element()
 {
 
 Score_element::~Score_element()
 {
+  delete output_p_; 
   assert (status_i_ >=0);
 }
 
   assert (status_i_ >=0);
 }
 
@@ -86,9 +87,11 @@ Score_element::do_width() const
 {
   Interval r;
 
 {
   Interval r;
 
-  Molecule*m = brew_molecule_p();
+  Molecule*m = output_p_ ?  output_p_ : do_brew_molecule_p();
   r = m->extent().x ();
   r = m->extent().x ();
-  delete m;
+
+  if (!output_p_)
+    delete m;
   
   return r;
 }
   
   return r;
 }
@@ -97,9 +100,11 @@ Interval
 Score_element::do_height() const 
 {
   Interval r;
 Score_element::do_height() const 
 {
   Interval r;
-  Molecule*m = brew_molecule_p();
+  Molecule*m = output_p_ ?  output_p_ : do_brew_molecule_p();
   r = m->extent().y ();
   r = m->extent().y ();
-  delete m;
+  if (!output_p_)
+    delete m;
+
   return r;
 }
 
   return r;
 }
 
@@ -171,18 +176,22 @@ Score_element::calculate_dependencies (int final, int busy,
 }
 
 void
 }
 
 void
-Score_element::do_brew_molecule () 
+Score_element::output_processing () 
 {
   if (transparent_b_)
     return;
 {
   if (transparent_b_)
     return;
-  Molecule *output= brew_molecule_p ();
-  for (PCursor<Atom*> i(output->atoms_); i.ok(); i++)
+  if (output_p_)
+    delete output_p_;
+  
+  output_p_ = do_brew_molecule_p ();
+  for (PCursor<Atom*> i(output_p_->atoms_); i.ok(); i++)
     {
       i->origin_l_ = this;
     }
   
     {
       i->origin_l_ = this;
     }
   
-  pscore_l_->outputter_l_->output_molecule (output, absolute_offset (), classname(this));
-  delete output;
+  pscore_l_->outputter_l_->output_molecule (output_p_,
+                                           absolute_offset (),
+                                           classname(this));
 }
 
 /*
 }
 
 /*
@@ -245,7 +254,7 @@ Score_element::do_junk_links()
 
 
 Molecule*
 
 
 Molecule*
-Score_element::brew_molecule_p() const
+Score_element::do_brew_molecule_p() const
 {
   Atom a (lookup_l ()->fill (Box (Interval (0,0), Interval (0,0))));
   return new Molecule (a);
 {
   Atom a (lookup_l ()->fill (Box (Interval (0,0), Interval (0,0))));
   return new Molecule (a);
index 296a129465568befa8525eb07b20fd056d6c01a8..e1ab3ab2fb5ea2e055d531f17ac289792b8c35df 100644 (file)
@@ -148,12 +148,13 @@ Score_engraver::typeset_all()
        {
          Item *item_p = dynamic_cast <Item *> (elem_p);
          pscore_p_->typeset_element (item_p);
        {
          Item *item_p = dynamic_cast <Item *> (elem_p);
          pscore_p_->typeset_element (item_p);
-         if (!item_p->axis_group_l_a_[X_AXIS]) {
-           if (item_p->breakable_b_) 
-             command_column_l_->add_element(item_p);
-           else
-             musical_column_l_->add_element(item_p);
-         }
+         if (!item_p->parent_l (X_AXIS))
+           {
+             if (item_p->breakable_b_) 
+               command_column_l_->add_element(item_p);
+             else
+               musical_column_l_->add_element(item_p);
+           }
        }
       scoreline_l_->add_element (elem_p);
     }
        }
       scoreline_l_->add_element (elem_p);
     }
index fb0f0784d8da97edd879b0214196574206d9c26e..264ed283a58a2a4c79adecc476deff9ad724e60f 100644 (file)
@@ -10,7 +10,7 @@
 #include "horizontal-group-item.hh"
 #include "score-priority-engraver.hh"
 #include "item.hh"
 #include "horizontal-group-item.hh"
 #include "score-priority-engraver.hh"
 #include "item.hh"
-#include "assoc-iter.hh"
+#include "dictionary-iter.hh"
 #include "break-align-item.hh"
 
 
 #include "break-align-item.hh"
 
 
@@ -21,15 +21,16 @@ Score_priority_engraver::Score_priority_engraver()
 void
 Score_priority_engraver::do_pre_move_processing()
 {
 void
 Score_priority_engraver::do_pre_move_processing()
 {
-  for (Assoc_iter<int, Horizontal_group_item*> i(align_p_assoc_); i.ok() ; i++)
+  for (Hash_table_iter<int, Horizontal_group_item*> i(align_p_tab_);
+       i.ok() ; i++)
     {
       if (i.val ())
        {
          typeset_element (i.val ());
     {
       if (i.val ())
        {
          typeset_element (i.val ());
-         i.val () = 0;
+         i.val_ref () = 0;
        }
     }
        }
     }
-  align_p_assoc_.clear ();
+  align_p_tab_.clear ();
 }
 
 void
 }
 
 void
@@ -48,27 +49,31 @@ Score_priority_engraver::acknowledge_element (Score_element_info inf)
       
       int priority =item_l->break_priority_i_;
       Horizontal_group_item * hg =0;
       
       int priority =item_l->break_priority_i_;
       Horizontal_group_item * hg =0;
-      if (!align_p_assoc_.elem_b(priority))
+      if (!align_p_tab_.elem_b(priority))
        {
          hg = new Horizontal_group_item;
          announce_element (Score_element_info (hg,0));
        {
          hg = new Horizontal_group_item;
          announce_element (Score_element_info (hg,0));
-         align_p_assoc_[priority] = hg;
+         align_p_tab_[priority] = hg;
          hg->break_priority_i_ = priority;
          hg->breakable_b_ = true;
        }
       else
          hg->break_priority_i_ = priority;
          hg->breakable_b_ = true;
        }
       else
-       hg = align_p_assoc_[priority];
+       hg = align_p_tab_[priority];
       
       Score_element * unbound_elem = inf.elem_l_;
 
       
       Score_element * unbound_elem = inf.elem_l_;
 
-      while (unbound_elem->axis_group_l_a_[X_AXIS])
+      /*
+       ugh
+       */
+      while (unbound_elem->parent_l (X_AXIS))
        {
          /* We might have added inf.elem_l_ earlier because we added one
             of its children.  We don't want to add ourselves to ourself
          */
        {
          /* We might have added inf.elem_l_ earlier because we added one
             of its children.  We don't want to add ourselves to ourself
          */
-         if (unbound_elem->axis_group_l_a_[X_AXIS] == hg)
+         Graphical_element * e = unbound_elem->parent_l (X_AXIS);
+         if (e == hg)
            return;
            return;
-         unbound_elem = dynamic_cast<Score_element*> (unbound_elem->axis_group_l_a_[X_AXIS]);
+         unbound_elem = dynamic_cast<Score_element*> (e);
        }
 
       hg->add_element (unbound_elem);
        }
 
       hg->add_element (unbound_elem);
index 3cc7914dc39fc98bfa95eeb3f6863c6ae7f74a3f..2012f053ba47bb1f461d0f99f3bab9d86b3dd07f 100644 (file)
@@ -66,12 +66,12 @@ Script_engraver::do_pre_move_processing()
          Text_def * td_l = (Text_def*)script_p->specs_p_;
          if (!td_l->style_str_.length_i ())
            {
          Text_def * td_l = (Text_def*)script_p->specs_p_;
          if (!td_l->style_str_.length_i ())
            {
-             Scalar style = get_property ("textstyle");
+             Scalar style = get_property ("textstyle", 0);
              if (style.to_bool ())
                td_l->style_str_= style;
            }
          // urg, what if this is already set? in-band signaling...
              if (style.to_bool ())
                td_l->style_str_= style;
            }
          // urg, what if this is already set? in-band signaling...
-         Scalar alignment = get_property ("textalignment");
+         Scalar alignment = get_property ("textalignment", 0);
          if (alignment.isnum_b())
            {
              td_l->align_dir_= (Direction)(int)alignment;
          if (alignment.isnum_b())
            {
              td_l->align_dir_= (Direction)(int)alignment;
index 26900c5c2e138c82a9a61378d554fe04e26ba62d..73c731190ee96387b78357136dfc9a421f9027cf 100644 (file)
@@ -103,7 +103,7 @@ Script::symbol_width () const
 }
 
 Molecule*
 }
 
 Molecule*
-Script::brew_molecule_p () const
+Script::do_brew_molecule_p () const
 {
   Real dx =0.;
 
 {
   Real dx =0.;
 
index 4545618efe41a21d0c24908b6a8cda169b72d8f6..43b83ff33e4c0c29dbe097526d56b2048e0c01ce 100644 (file)
@@ -39,7 +39,7 @@ void
 Separating_line_group_engraver::acknowledge_element (Score_element_info i)
 {
   Item * it = dynamic_cast <Item *> (i.elem_l_);
 Separating_line_group_engraver::acknowledge_element (Score_element_info i)
 {
   Item * it = dynamic_cast <Item *> (i.elem_l_);
-  if (it && !it->axis_group_l_a_[X_AXIS])
+  if (it && !it->parent_l (X_AXIS))
     {
       Single_malt_grouping_item *&p_ref_ (it->breakable_b_
                                          ? break_malt_p_ : nobreak_malt_p_);
     {
       Single_malt_grouping_item *&p_ref_ (it->breakable_b_
                                          ? break_malt_p_ : nobreak_malt_p_);
index 69c1eed1243fc4ce45ee0e6c925581645a00b750..5ec0a76cd98588483c468654e1b5d02177d3c31a 100644 (file)
@@ -11,7 +11,6 @@
 #include "sequential-music-iterator.hh"
 #include "music-list.hh"
 
 #include "sequential-music-iterator.hh"
 #include "music-list.hh"
 
-
 void
 Sequential_music_iterator::do_print() const
 {
 void
 Sequential_music_iterator::do_print() const
 {
@@ -26,16 +25,10 @@ Sequential_music_iterator::Sequential_music_iterator ()
   iter_p_ =0;
 }
 
   iter_p_ =0;
 }
 
-Sequential_music*
-Sequential_music_iterator::sequential_music_l () const
-{
-  return (Sequential_music *)music_l_;
-}
-
 void
 Sequential_music_iterator::construct_children()
 {
 void
 Sequential_music_iterator::construct_children()
 {
-  cursor_p_ = new PCursor<Music*> (sequential_music_l ()->music_p_list_p_->top ());
+  cursor_p_ = new PCursor<Music*> (dynamic_cast<Sequential_music const*> (music_l_)->music_p_list_p_->top ());
   
   while (cursor_p_->ok()) 
     {
   
   while (cursor_p_->ok()) 
     {
index 764bcdfe8b0a7657ff6986a7f90ff149e92dfa7f..2f28eb32af8ab71f279657e4303d3bc1d4b3f4e9 100644 (file)
@@ -24,14 +24,15 @@ void
 Simultaneous_music_iterator::construct_children()
 {
   int j = 0;
 Simultaneous_music_iterator::construct_children()
 {
   int j = 0;
-  for (PCursor<Music*> i (simultaneous_music_l ()->music_p_list_p_->top());  
+  Simultaneous_music const *sim = dynamic_cast<Simultaneous_music const*> (music_l_);
+  for (PCursor<Music*> i (sim->music_p_list_p_->top());  
        i.ok(); j++, i++) 
     {
       Music_iterator * mi = get_iterator_p (i.ptr());
       if (mi->ok()) 
        {
        i.ok(); j++, i++) 
     {
       Music_iterator * mi = get_iterator_p (i.ptr());
       if (mi->ok()) 
        {
-         if  (simultaneous_music_l ()->translator_type_str_.empty_b ())
-           set_translator (mi->report_to_l()->ancestor_l (0));
+         if  (sim->translator_type_str_.empty_b ())
+           set_translator (mi->report_to_l()->ancestor_l (0)); // huh?
          children_p_list_.bottom().add (mi);
        }
       else 
          children_p_list_.bottom().add (mi);
        }
       else 
@@ -89,8 +90,3 @@ Simultaneous_music_iterator::ok() const
   return children_p_list_.size();
 }
 
   return children_p_list_.size();
 }
 
-Simultaneous_music*
-Simultaneous_music_iterator::simultaneous_music_l ()const
-{
-  return (  Simultaneous_music *) music_l_;
-}
index c030ffafe68f1b47294dac46aac58479e4e81399..bd5101039ab8cf7ce375876678b4f98f8f07228a 100644 (file)
@@ -34,7 +34,7 @@ Single_malt_grouping_item::my_width () const
     {
       Item *il = item_l_arr_[i];
       assert (pc == il->column_l ());
     {
       Item *il = item_l_arr_[i];
       assert (pc == il->column_l ());
-      w.unite  (il->width () + il->relative_coordinate (pc, X_AXIS));
+      w.unite  (il->extent (X_AXIS) + il->relative_coordinate (&pc->dim_cache_[X_AXIS], X_AXIS));
     }
 
   return w;
     }
 
   return w;
index 308cc419354aec64447810f188c675644a744dcd..e0e4253f8601508cf925bb759d717bd4f6158989 100644 (file)
@@ -75,7 +75,7 @@ Slur_engraver::do_process_requests()
          // push a new slur onto stack.
          //(use temp. array to wait for all slur STOPs)
          Slur * s_p =new Slur;
          // push a new slur onto stack.
          //(use temp. array to wait for all slur STOPs)
          Slur * s_p =new Slur;
-         Scalar prop = get_property ("slurdash");
+         Scalar prop = get_property ("slurdash", 0);
          if (prop.isnum_b ()) 
            s_p->dash_i_ = prop;
          requests_arr_.push (slur_req_l);
          if (prop.isnum_b ()) 
            s_p->dash_i_ = prop;
          requests_arr_.push (slur_req_l);
@@ -90,8 +90,8 @@ Slur_engraver::do_process_requests()
 void
 Slur_engraver::do_pre_move_processing()
 {
 void
 Slur_engraver::do_pre_move_processing()
 {
-  Scalar dir (get_property ("slurydirection"));
-  Scalar dir2 (get_property ("ydirection"));
+  Scalar dir (get_property ("slurydirection", 0));
+  Scalar dir2 (get_property ("ydirection", 0));
 
   Direction slurdir = CENTER;
   if (dir.length_i () && dir.isnum_b ())
 
   Direction slurdir = CENTER;
   if (dir.length_i () && dir.isnum_b ())
index f02f5826d4615afab53bf5f1bf86efba7065be4e..465102e6af68084b38c3da7c9fe4e32bdd6e65d9 100644 (file)
@@ -132,12 +132,12 @@ Slur::do_post_processing ()
        {
          // ugh -- check if needed
          dx_f_drul_[d] = -d 
        {
          // ugh -- check if needed
          dx_f_drul_[d] = -d 
-           *(spanned_drul_[d]->width ().length () - 0.5 * notewidth_f);
+           *(spanned_drul_[d]->extent (X_AXIS).length () - 0.5 * notewidth_f);
 
          // prebreak
          if (d == RIGHT)
            {
 
          // prebreak
          if (d == RIGHT)
            {
-             dx_f_drul_[LEFT] = spanned_drul_[LEFT]->width ().length ();
+             dx_f_drul_[LEFT] = spanned_drul_[LEFT]->extent (X_AXIS).length ();
 
              // urg -- check if needed
              if (encompass_arr_.size () > 1)
 
              // urg -- check if needed
              if (encompass_arr_.size () > 1)
@@ -150,8 +150,8 @@ Slur::do_post_processing ()
       else if (extrema[d]->stem_l_ && !extrema[d]->stem_l_->transparent_b_ 
               && extrema[d]->head_l_arr_.size ()) 
         {
       else if (extrema[d]->stem_l_ && !extrema[d]->stem_l_->transparent_b_ 
               && extrema[d]->head_l_arr_.size ()) 
         {
-         Real notewidth_f = extrema[d]->width ().length ();
-         dy_f_drul_[d] = (int)rint (extrema[d]->stem_l_->height ()[dir_]);
+         Real notewidth_f = extrema[d]->extent (X_AXIS).length ();
+         dy_f_drul_[d] = (int)rint (extrema[d]->stem_l_-> extent (Y_AXIS)[dir_]);
          dx_f_drul_[d] += 0.5 * notewidth_f - d * gap_f;
          if (dir_ == extrema[d]->stem_l_->dir_)
            {
          dx_f_drul_[d] += 0.5 * notewidth_f - d * gap_f;
          if (dir_ == extrema[d]->stem_l_->dir_)
            {
@@ -163,7 +163,7 @@ Slur::do_post_processing ()
        }
        else 
          {
        }
        else 
          {
-           Real notewidth_f = extrema[d]->width ().length ();
+           Real notewidth_f = extrema[d]->extent (X_AXIS).length ();
            dy_f_drul_[d] = (int)rint (extrema[d]->head_positions_interval ()
                                       [dir_]) * internote_f;
            dx_f_drul_[d] += 0.5 * notewidth_f - d * gap_f;
            dy_f_drul_[d] = (int)rint (extrema[d]->head_positions_interval ()
                                       [dir_]) * internote_f;
            dx_f_drul_[d] += 0.5 * notewidth_f - d * gap_f;
@@ -209,7 +209,7 @@ Slur::do_post_processing ()
   Real damp_f = paper ()->get_var ("slur_slope_damping");
   Offset d_off = Offset (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
     dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
   Real damp_f = paper ()->get_var ("slur_slope_damping");
   Offset d_off = Offset (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
     dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
-  d_off.x () += width ().length ();
+  d_off.x () += extent (X_AXIS).length ();
 
   Real ratio_f = abs (d_off.y () / d_off.x ());
   if (ratio_f > damp_f)
 
   Real ratio_f = abs (d_off.y () / d_off.x ());
   if (ratio_f > damp_f)
@@ -252,7 +252,7 @@ Slur::get_encompass_offset_arr () const
 
   Offset d = Offset (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
     dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
 
   Offset d = Offset (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
     dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
-  d.x () += width ().length ();
+  d.x () += extent (X_AXIS).length ();
 
   int first = 1;
   int last = encompass_arr_.size () - 1;
 
   int first = 1;
   int last = encompass_arr_.size () - 1;
index ff7bdd65dc4466eb55b1578243f383d85f505cab..0e1e00841faa12bd8b3f890f2e5add9b2b915034 100644 (file)
@@ -52,7 +52,7 @@ Span_bar_engraver::acknowledge_element (Score_element_info i)
 
        /*
 
 
        /*
 
-         use a property?  get_property ("singleStaffBracket") ?
+         use a property?  get_property ("singleStaffBracket", 0) ?
 
          --hwn
         */
 
          --hwn
         */
index 47813dc1eaf9092a1d91eb039e6853e62223b4af..4b37e846ee6a667da8a76f51a7e7fd52fc77955d 100644 (file)
@@ -90,18 +90,18 @@ Span_bar::get_bar_sym (Real dy) const
 }
 
 Molecule*
 }
 
 Molecule*
-Span_bar::brew_molecule_p () const
+Span_bar::do_brew_molecule_p () const
 {
   Interval y_int;
   for (int i=0; i < spanning_l_arr_.size (); i++) 
     {
 {
   Interval y_int;
   for (int i=0; i < spanning_l_arr_.size (); i++) 
     {
-      Graphical_axis_group *common = 
+      Dimension_cache*common = 
        common_group (spanning_l_arr_[i], Y_AXIS);
        
        common_group (spanning_l_arr_[i], Y_AXIS);
        
-      Real y = spanning_l_arr_[i]->relative_coordinate (common, Y_AXIS)  
-       -relative_coordinate (common,Y_AXIS);
+      Real y = spanning_l_arr_[i]->dim_cache_[Y_AXIS].relative_coordinate (common)  
+       -dim_cache_[Y_AXIS].relative_coordinate (common);
 
 
-      y_int.unite (y + spanning_l_arr_[i]->height ());
+      y_int.unite (y + spanning_l_arr_[i]->extent(Y_AXIS));
     }
 
   Atom s = get_bar_sym (y_int.length ());
     }
 
   Atom s = get_bar_sym (y_int.length ());
index 28f49f22af124915f3ed6e5def5c4cfaea3c2824..2248bf046f3e52431911e45c451fd76c0829b23c 100644 (file)
@@ -133,15 +133,14 @@ Spanner::Spanner (Spanner const &s)
 }
 
 void
 }
 
 void
-Spanner::do_brew_molecule () 
+Spanner::output_processing () 
 {
   if (transparent_b_)
     return ;
 {
   if (transparent_b_)
     return ;
-  Molecule *output= brew_molecule_p ();
+  output_p_ = do_brew_molecule_p ();
   Offset left_off (spanned_drul_[LEFT]->absolute_coordinate(X_AXIS), 0);
   Offset o = absolute_offset() + left_off;
   Offset left_off (spanned_drul_[LEFT]->absolute_coordinate(X_AXIS), 0);
   Offset o = absolute_offset() + left_off;
-  pscore_l_->outputter_l_->output_molecule (output, o, classname (this));
-  delete output;
+  pscore_l_->outputter_l_->output_molecule (output_p_, o, classname (this));
 }
 
 Interval
 }
 
 Interval
index 65a7c1336d352478733c7d8d3002ffd0b4035201..167940a687264948ff5fa1b88218c8f5663ac338 100644 (file)
@@ -546,11 +546,12 @@ Spring_spacer::get_ruling_durations(Array<Moment> &shortest_playing_arr,
 
 /*
   TODO: take out the refs to width
 
 /*
   TODO: take out the refs to width
+
  */
 /**
   generate springs between columns.
 
  */
 /**
   generate springs between columns.
 
-  TODO: This needs rethinking.
+  TODO: This needs rethinking....... 
 
   *  Spacing should take optical
   effects into account
 
   *  Spacing should take optical
   effects into account
@@ -574,11 +575,11 @@ Spring_spacer::calc_idealspacing()
   Real interline_f = paper_l ()->interline_f ();
 
 
   Real interline_f = paper_l ()->interline_f ();
 
 
-  Array<Real> ideal_arr_;
-  Array<Real> hooke_arr_;
+  Array<Real> ideal_arr;
+  Array<Real> hooke_arr;
   for (int i=0; i < cols_.size() - 1; i++){
   for (int i=0; i < cols_.size() - 1; i++){
-    ideal_arr_.push (-1.0);
-    hooke_arr_.push (1.0);
+    ideal_arr.push (-1.0);
+    hooke_arr.push (1.0);
   }
 
   /* 
   }
 
   /* 
@@ -590,11 +591,8 @@ Spring_spacer::calc_idealspacing()
        {
          Real symbol_distance =cols_[i].width_[RIGHT] + 2 PT;
          Real durational_distance = 0;
        {
          Real symbol_distance =cols_[i].width_[RIGHT] + 2 PT;
          Real durational_distance = 0;
-
-         
          Moment delta_t =  scol_l (i+1)->when() - scol_l (i)->when () ;
 
          Moment delta_t =  scol_l (i+1)->when() - scol_l (i)->when () ;
 
-
          /*
            ugh should use shortest_playing distance
          */
          /*
            ugh should use shortest_playing distance
          */
@@ -606,8 +604,8 @@ Spring_spacer::calc_idealspacing()
          symbol_distance += -cols_[i+1].width_[LEFT];
  
 
          symbol_distance += -cols_[i+1].width_[LEFT];
  
 
-         ideal_arr_[i] = symbol_distance >? durational_distance;
-         hooke_arr_[i] = 1; //2.0;
+         ideal_arr[i] = symbol_distance >? durational_distance;
+         hooke_arr[i] = 1; //2.0;
        }
     }
 
        }
     }
 
@@ -642,6 +640,7 @@ Spring_spacer::calc_idealspacing()
             
            * whitespace at the begin of the bar should be fixed at 
            (about) one interline.
             
            * whitespace at the begin of the bar should be fixed at 
            (about) one interline.
+
            [Ross]:
            when spacing gets real tight, a smaller fixed value may be 
            used, so that there are two discrete amounts of whitespace 
            [Ross]:
            when spacing gets real tight, a smaller fixed value may be 
            used, so that there are two discrete amounts of whitespace 
@@ -651,13 +650,16 @@ Spring_spacer::calc_idealspacing()
            * whitespace at the end of the bar is the normal amount of 
            "hinterfleish" that would have been used, had there been
            yet another note in the bar.  
            * whitespace at the end of the bar is the normal amount of 
            "hinterfleish" that would have been used, had there been
            yet another note in the bar.  
+
            [Ross]:
            some editors argue that the bar line should not take any 
            space, not to hinder the flow of music spaced around a bar 
            line.  
            [Ross]:
            some editors argue that the bar line should not take any 
            space, not to hinder the flow of music spaced around a bar 
            line.  
+
            [Ross] and [Wanske] do not suggest this, however.  Further, 
            [Ross] and [Wanske] do not suggest this, however.  Further, 
-           it introduces some spacing problems and think that it is ugly 
+           it introduces some spacing problems and think that it is ugly 
            too.
            too.
+           
            [jcn]
          */
 
            [jcn]
          */
 
@@ -669,7 +671,7 @@ Spring_spacer::calc_idealspacing()
              // fixed: probably should set minimum (rod/spring)?
              cols_[i-1].width_[RIGHT] += interline_f;
              // should adjust dist too?
              // fixed: probably should set minimum (rod/spring)?
              cols_[i-1].width_[RIGHT] += interline_f;
              // should adjust dist too?
-             ideal_arr_[i-1] = ideal_arr_[i-1] >? (2 * interline_f);
+             ideal_arr[i-1] = ideal_arr[i-1] >? (2 * interline_f);
            }
 
          /* 
            }
 
          /* 
@@ -697,13 +699,25 @@ Spring_spacer::calc_idealspacing()
                + interline_f / 2;
              dist = dist >? minimum;
            }
                + interline_f / 2;
              dist = dist >? minimum;
            }
-         ideal_arr_[i] = dist;
+         ideal_arr[i] = dist;
        }
     }
 
        }
     }
 
-  for (int i=0; i < ideal_arr_.size(); i++)
+  /*
+    shorter distances should stretch less.
+
+    (and how bout
+
+      hooke[i] = 2 * max_ideal_space - ideal[i]
+
+    ?)
+  */
+  for (int i=0; i < ideal_arr.size(); i++)
+    hooke_arr[i] = 1/ideal_arr[i];
+
+  for (int i=0; i < ideal_arr.size(); i++)
     {
     {
-      assert (ideal_arr_[i] >=0 && hooke_arr_[i] >=0);
-      connect (i, i+1, ideal_arr_[i], hooke_arr_[i]);
+      assert (ideal_arr[i] >=0 && hooke_arr[i] >=0);
+      connect (i, i+1, ideal_arr[i], hooke_arr[i]);
     }
 }
     }
 }
index 9b51b97c7c0fae918ee9c9548b4e74387224ae4e..f1f8aa10da7d2c25fd2f25c0a1c7456fd9d015dd 100644 (file)
@@ -48,8 +48,8 @@ Staff_margin_engraver::acknowledge_element (Score_element_info i)
       || (i.origin_grav_l_arr_.size() != 1))
     return;
 
       || (i.origin_grav_l_arr_.size() != 1))
     return;
 
-  String string = get_property ("instrument");
-  String str = get_property ("instr");
+  String string = get_property ("instrument", 0);
+  String str = get_property ("instr", 0);
   if (now_moment () > Moment (0))
     string = str;
 
   if (now_moment () > Moment (0))
     string = str;
 
@@ -68,7 +68,7 @@ Staff_margin_engraver::acknowledge_element (Score_element_info i)
   script_p_->breakable_b_ = true;
 
   
   script_p_->breakable_b_ = true;
 
   
-  Scalar pri = get_property ("marginBreakPriority");
+  Scalar pri = get_property ("marginBreakPriority", 0);
   if (pri.length_i () && pri.isnum_b ())
     {
       script_p_->break_priority_i_ = int (pri);
   if (pri.length_i () && pri.isnum_b ())
     {
       script_p_->break_priority_i_ = int (pri);
index 801912bd8900a57fc058143cda23aeca96947963..4c8cc8d6f799ce53b79167c18917352c684e252e 100644 (file)
@@ -77,9 +77,9 @@ String
 Staff_performer::new_instrument_str () 
 { 
   // mustn't ask Score for instrument: it will return piano!
 Staff_performer::new_instrument_str () 
 { 
   // mustn't ask Score for instrument: it will return piano!
-  String str = get_property ("midi_instrument");
+  String str = get_property ("midi_instrument", 0);
   if (!str.length_i ())
   if (!str.length_i ())
-    str = get_property ("instrument");
+    str = get_property ("instrument", 0);
   if (str == instrument_str_)
     return "";
 
   if (str == instrument_str_)
     return "";
 
index 5133465bee91000c365408d543d94959b8a413d0..31180f0f6e9b2992cf774c65d5cae66f1e3b1d31 100644 (file)
@@ -30,7 +30,7 @@ Staff_side::support_extent() const
   Interval y_int;
   for (int i=0; i < support_l_arr_.size(); i++) 
     {
   Interval y_int;
   for (int i=0; i < support_l_arr_.size(); i++) 
     {
-    Graphical_axis_group *common = 
+      Dimension_cache *common = 
        common_group (support_l_arr_[i], axis_);
        
       Real y = support_l_arr_[i]->relative_coordinate (common, axis_)  
        common_group (support_l_arr_[i], axis_);
        
       Real y = support_l_arr_[i]->relative_coordinate (common, axis_)  
@@ -76,11 +76,8 @@ Staff_side::get_position_f () const
   // ugh: 5 -> staff_lines
   if (axis_ == Y_AXIS && abs (coordinate_offset_f_i) < 5)
     {
   // ugh: 5 -> staff_lines
   if (axis_ == Y_AXIS && abs (coordinate_offset_f_i) < 5)
     {
-      /* I don't understand how this is supposed to work, 
-        simple patch below. Mats B
-        if (!(abs (coordinate_offset_f_i) % 2))
-        y += (Real)dir_ * inter_f; */
-      y = (Real)dir_ * 6 * inter_f;
+      if (!(abs (coordinate_offset_f_i) % 2))
+       y += (Real)dir_ * inter_f;
     }
 //  else
 //    y = v[dir_] + 1 * dir_ * inter_f;
     }
 //  else
 //    y = v[dir_] + 1 * dir_ * inter_f;
index d18374277bb9e59785b859bec0e0b857bdd6b9c1..d95569ab8e3092cd391c8664730155e290ca8b0e 100644 (file)
@@ -39,7 +39,7 @@ Staff_symbol_engraver::do_creation_processing()
 void
 Staff_symbol_engraver::do_removal_processing()
 {
 void
 Staff_symbol_engraver::do_removal_processing()
 {
-  Scalar l (get_property ("numberOfStaffLines"));
+  Scalar l (get_property ("numberOfStaffLines", 0));
   if (l.isnum_b ())
     {
       span_p_->no_lines_i_ = l;
   if (l.isnum_b ())
     {
       span_p_->no_lines_i_ = l;
index b640d3f54ba07f8d45eaf852a7d8398452368114..45bc674b8dc78cda2105996a1f28293abf7a970e 100644 (file)
@@ -41,9 +41,9 @@ Staff_symbol::do_height() const
 }
 
 Molecule*
 }
 
 Molecule*
-Staff_symbol::brew_molecule_p() const
+Staff_symbol::do_brew_molecule_p() const
 {
 {
-  Real w = width ().length ();
+  Real w = extent (X_AXIS).length ();
   Real left_dx = -spanned_drul_[LEFT]->extent (X_AXIS)[LEFT];
   Real right_dx = spanned_drul_[RIGHT]->extent (X_AXIS)[RIGHT];
   //  w += right_dx+ left_dx;
   Real left_dx = -spanned_drul_[LEFT]->extent (X_AXIS)[LEFT];
   Real right_dx = spanned_drul_[RIGHT]->extent (X_AXIS)[RIGHT];
   //  w += right_dx+ left_dx;
index b8f3984c5b4355c2131e3a90f00bc31e4e0fc7b5..ae32b12ba185af882beb69b7c9895c5aae0b6c4d 100644 (file)
@@ -20,13 +20,12 @@ Stem_engraver::Stem_engraver()
   stem_p_ = 0;
   abbrev_p_ = 0;
   default_abbrev_i_ = 16;
   stem_p_ = 0;
   abbrev_p_ = 0;
   default_abbrev_i_ = 16;
-  dir_ = CENTER;
 }
 
 void
 Stem_engraver::do_creation_processing ()
 {
 }
 
 void
 Stem_engraver::do_creation_processing ()
 {
-  Scalar prop = get_property ("abbrev");
+  Scalar prop = get_property ("abbrev", 0);
   if (prop.isnum_b ()) 
     {
       default_abbrev_i_  = prop;
   if (prop.isnum_b ()) 
     {
       default_abbrev_i_  = prop;
@@ -84,16 +83,32 @@ Stem_engraver::do_pre_move_processing()
       typeset_element (abbrev_p_);
       abbrev_p_ = 0;
     }
       typeset_element (abbrev_p_);
       abbrev_p_ = 0;
     }
+
   if (stem_p_)
     {
   if (stem_p_)
     {
-      Scalar prop = get_property ("ydirection");
-      dir_ = prop.isnum_b () ? (Direction)int(prop) : CENTER;
-      if (dir_)
+      Scalar prop = get_property ("ydirection", 0);
+      Direction dir = prop.isnum_b () ? (Direction)int(prop) : CENTER;
+      if (dir)
        {
        {
-         stem_p_->dir_ = dir_;
+         stem_p_->dir_ = dir;
          stem_p_->dir_forced_b_ = true;
        }
 
          stem_p_->dir_forced_b_ = true;
        }
 
+      Translator const *which;
+      prop = get_property ("stemLeftBeamCount", &which);
+      if (prop.isnum_b ())
+       {
+         stem_p_->beams_i_drul_[LEFT] = prop;
+         ((Translator*)which)->set_property ("stemLeftBeamCount", "");
+       }
+      prop = get_property ("stemRightBeamCount", &which);
+      if (prop.isnum_b ())
+       {
+         stem_p_->beams_i_drul_[RIGHT] = prop;
+         ((Translator*)which)->set_property ("stemRightBeamCount", "");
+       }
+
+
       typeset_element(stem_p_);
       stem_p_ = 0;
     }
       typeset_element(stem_p_);
       stem_p_ = 0;
     }
@@ -103,17 +118,12 @@ Stem_engraver::do_pre_move_processing()
 bool
 Stem_engraver::do_try_music (Music* r)
 {
 bool
 Stem_engraver::do_try_music (Music* r)
 {
-  Musical_req* mus_l = dynamic_cast <Musical_req *> (r);
-  if (!mus_l)
-    return false;
-  
-  Abbreviation_req* a = dynamic_cast <Abbreviation_req *> (mus_l);
-  if (!a)
-    return false;
-
-  abbrev_req_l_ = a;
-
-  return true;
+  if (Abbreviation_req* a = dynamic_cast <Abbreviation_req *> (r))
+    {
+      abbrev_req_l_ = a;
+      return true;
+    }
+  return false;
 }
 
 
 }
 
 
index 69dbd337769e1000be38bb3915ad831d9c3c0fcb..90a12ae5555f998fca08951f9aebcd5ed44df793 100644 (file)
@@ -31,7 +31,7 @@ Stem::Stem ()
   /*
     TODO: staff-size
     */
   /*
     TODO: staff-size
     */
-  beams_i_drul_[LEFT] = beams_i_drul_[RIGHT] = 0;
+  beams_i_drul_[LEFT] = beams_i_drul_[RIGHT] = -1;
   mult_i_ = 0;
 
   yextent_drul_[DOWN] = yextent_drul_[UP] = 0;
   mult_i_ = 0;
 
   yextent_drul_[DOWN] = yextent_drul_[UP] = 0;
@@ -280,7 +280,7 @@ Stem::do_width () const
 const Real ANGLE = 20* (2.0*M_PI/360.0); // ugh!
 
 Molecule*
 const Real ANGLE = 20* (2.0*M_PI/360.0); // ugh!
 
 Molecule*
-Stem::brew_molecule_p () const
+Stem::do_brew_molecule_p () const
 {
   Molecule *mol_p =new Molecule;
   Drul_array<Real> stem_y = yextent_drul_;
 {
   Molecule *mol_p =new Molecule;
   Drul_array<Real> stem_y = yextent_drul_;
@@ -288,7 +288,7 @@ Stem::brew_molecule_p () const
 
   Real head_wid = 0;
   if (head_l_arr_.size ())
 
   Real head_wid = 0;
   if (head_l_arr_.size ())
-    head_wid = head_l_arr_[0]->width ().length ();
+    head_wid = head_l_arr_[0]->extent (X_AXIS).length ();
   stem_y[Direction(-dir_)] += dir_ * head_wid * tan(ANGLE)/(2*dy);
   
   if (!invisible_b ())
   stem_y[Direction(-dir_)] += dir_ * head_wid * tan(ANGLE)/(2*dy);
   
   if (!invisible_b ())
@@ -318,7 +318,7 @@ Stem::note_delta_f () const
   Real r=0;
   if (head_l_arr_.size())
     {
   Real r=0;
   if (head_l_arr_.size())
     {
-      Interval head_wid(0,  head_l_arr_[0]->width ().length ());
+      Interval head_wid(0,  head_l_arr_[0]->extent (X_AXIS).length ());
       Real rule_thick(paper ()->rule_thickness ());
       Interval stem_wid(-rule_thick/2, rule_thick/2);
       if (stem_xdir_ == CENTER)
       Real rule_thick(paper ()->rule_thickness ());
       Interval stem_wid(-rule_thick/2, rule_thick/2);
       if (stem_xdir_ == CENTER)
@@ -339,10 +339,10 @@ Stem::hpos_f () const
   TODO:  head_l_arr_/rest_l_arr_ in  do_substitute_dependent ()
  */
 void
   TODO:  head_l_arr_/rest_l_arr_ in  do_substitute_dependent ()
  */
 void
- Stem::do_substitute_dependency (Score_element*o,Score_element*n)
+Stem::do_substitute_dependency (Score_element*o,Score_element*n)
 {
 {
-  Item * o_l = dynamic_cast <Item *> (o);
-  Item * n_l = n? dynamic_cast <Item *> (n) : 0;
-  head_l_arr_.substitute ((Note_head*)o_l, (Note_head*)n_l);
-  rest_l_arr_.substitute ((Rest*)o_l, (Rest*)n_l);
+  if (Note_head*h=dynamic_cast<Note_head*> (o))
+  head_l_arr_.substitute (h, dynamic_cast<Note_head*>(n));
+  if (Rest *r=dynamic_cast<Rest*> (o))
+    rest_l_arr_.substitute (r, dynamic_cast<Rest*>(n));
 }
 }
index 5c4a9de8819079158b2ed7decb4d4285b9e02432..095ee454be6ffe44089d05a88fd73fe6ed39d0e4 100644 (file)
@@ -77,7 +77,7 @@ void
 Super_element::output_all () 
 {
   pscore_l_->outputter_l_->start_line ();
 Super_element::output_all () 
 {
   pscore_l_->outputter_l_->start_line ();
-  calculate_dependencies (BREWING, BREWED, &Score_element::do_brew_molecule);
+  calculate_dependencies (BREWING, BREWED, &Score_element::output_processing);
   pscore_l_->outputter_l_->stop_line ();
 }
 
   pscore_l_->outputter_l_->stop_line ();
 }
 
index dd9cb2f732107caa62b335fc45e9f3465fef5fb4..ccf1eb16102584041048253f83486af0a9154f39 100644 (file)
@@ -21,8 +21,8 @@ Symtables::Symtables()
 Symtables::Symtables (Symtables const &s)
   : Dictionary<Symtable*> (s)
 {
 Symtables::Symtables (Symtables const &s)
   : Dictionary<Symtable*> (s)
 {
-  font_ = s.font_;
-  font_path_ = s.font_path_;
+  font_name_ = s.font_name_;
+
   for (Dictionary_iter< Symtable*>  i (s); i.ok(); i++)
     {
       add (i.key(), new Symtable (*i.val ()));
   for (Dictionary_iter< Symtable*>  i (s); i.ok(); i++)
     {
       add (i.key(), new Symtable (*i.val ()));
index 65f9617165d7e2382128ed2b8f740d5210c14ce5..d33baffddcf1ac9daa2b803489d76fc1369040aa 100644 (file)
@@ -21,8 +21,4 @@
 #include "pcursor.tcc"
 #include "plist.tcc"
 
 #include "pcursor.tcc"
 #include "plist.tcc"
 
-POINTERLIST_INSTANTIATE(Audio_item);
-POINTERLIST_INSTANTIATE(Audio_staff);
-POINTERLIST_INSTANTIATE(Paper_column);
-POINTERLIST_INSTANTIATE(Paper_score);
 #endif
 #endif
index 9433757adcce38907d8cb1bee42103b36cea8563..79d955451207397e76b51c7767b6a98aa104ab79 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "proto.hh"
 #include "plist.hh"
 
 #include "proto.hh"
 #include "plist.hh"
-#include "audio-item.hh"
+#include "audio-element.hh"
 #include "audio-column.hh"
 #include "midi-item.hh"
 #include "cursor.tcc"
 #include "audio-column.hh"
 #include "midi-item.hh"
 #include "cursor.tcc"
diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc
new file mode 100644 (file)
index 0000000..792c3aa
--- /dev/null
@@ -0,0 +1,112 @@
+/*   
+  text-engraver.cc --  implement Text_engraver
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "engraver.hh"
+#include "g-staff-side.hh"
+#include "g-text-item.hh"
+#include "text-def.hh"
+#include "note-head.hh"
+#include "stem.hh"
+
+class Text_engraver : public Engraver
+{
+  Link_array<Script_req> reqs_;
+  Link_array<G_staff_side_item> positionings_;
+  Link_array<G_text_item> texts_;
+public:
+  Text_engraver();
+  VIRTUAL_COPY_CONS(Translator);
+protected:
+  virtual bool do_try_music (Music* m);
+  virtual void do_pre_move_processing ();
+  virtual void do_post_move_processing ();
+  virtual void do_process_requests ();
+  virtual void acknowledge_element (Score_element_info);
+};
+
+Text_engraver::Text_engraver ()
+{
+  
+}
+
+bool
+Text_engraver::do_try_music (Music *m)
+{
+  if (Script_req *r = dynamic_cast<Script_req*> (m))
+    {
+      Text_def * t = dynamic_cast<Text_def*> (r->scriptdef_p_);
+      if (!t)
+       return false;
+      reqs_.push (r);
+      return true;
+    }
+  return false;
+}
+
+
+void
+Text_engraver::acknowledge_element (Score_element_info i)
+{
+  if (Note_head *n = dynamic_cast<Note_head*> (i.elem_l_))
+    {
+      for (int i=0; i < positionings_.size (); i++)
+       {
+         positionings_[i]->add_support (n);
+       }
+    }
+  if (Stem *n = dynamic_cast<Stem*> (i.elem_l_))
+    {
+      for (int i=0; i < positionings_.size (); i++)
+       {
+         positionings_[i]->add_support (n);
+       }
+    }
+}
+
+void
+Text_engraver::do_process_requests ()
+{
+  for (int i=0; i < reqs_.size (); i++)
+    {
+      Script_req * r = reqs_[i];
+      Text_def * t= dynamic_cast<Text_def*> (r->scriptdef_p_);
+
+      G_text_item *text = new G_text_item;
+      G_staff_side_item *ss = new G_staff_side_item;
+      ss->set_victim (text);
+
+      text->text_str_ = t->text_str_;
+
+      announce_element (Score_element_info (text, r));
+      announce_element (Score_element_info (ss, r));
+
+      texts_.push (text);
+      positionings_.push (ss);
+    }
+}
+
+void
+Text_engraver::do_pre_move_processing ()
+{
+  for (int i=0; i < texts_.size (); i++)
+    {
+      typeset_element (texts_[i]);
+      typeset_element (positionings_[i]);
+    }
+  texts_.clear ();
+  positionings_.clear ();
+}
+
+void
+Text_engraver::do_post_move_processing ()
+{
+  reqs_.clear ();
+}
+
+ADD_THIS_TRANSLATOR(Text_engraver);
index 04f6ec6997cce3db73a6a0ed8ad2f89b16ef1981..ba8e2911bb617ffe40c9dec2da589292ae6cc656 100644 (file)
@@ -63,7 +63,7 @@ Text_item::symbol_height () const
 }
   
 Molecule*
 }
   
 Molecule*
-Text_item::brew_molecule_p () const
+Text_item::do_brew_molecule_p () const
 {
   Atom a (tdef_p_->get_atom (paper (), dir_));
 
 {
   Atom a (tdef_p_->get_atom (paper (), dir_));
 
index e8d2f612bca1cbf91cecdfa2e7a33e0e5f86a0e3..4768d9f96e9dde07bbc0fb67d8174b486f36e36e 100644 (file)
@@ -55,7 +55,7 @@ Text_spanner::do_post_processing()
 }
 
 Molecule*
 }
 
 Molecule*
-Text_spanner::brew_molecule_p() const
+Text_spanner::do_brew_molecule_p() const
 {
   Atom tsym (spec_p_->get_atom (paper(),CENTER));
   tsym.translate (text_off_);
 {
   Atom tsym (spec_p_->get_atom (paper(),CENTER));
   tsym.translate (text_off_);
@@ -74,7 +74,7 @@ Text_spanner::do_pre_processing()
 Interval
 Text_spanner::height() const
 {
 Interval
 Text_spanner::height() const
 {
-  return brew_molecule_p()->extent ().y ();
+  return do_brew_molecule_p()->extent ().y ();
 }
 
 void
 }
 
 void
diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc
new file mode 100644 (file)
index 0000000..cf9dd50
--- /dev/null
@@ -0,0 +1,145 @@
+/*   
+  ctie-engraver.cc --  implement Tie_engraver
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "tie-engraver.hh"
+#include "command-request.hh"
+#include "note-head.hh"
+#include "musical-request.hh"
+#include "tie.hh"
+
+Tie_engraver::Tie_engraver()
+{
+  req_l_ = 0;
+}
+
+
+bool
+Tie_engraver::do_try_music (Music *m)
+{
+  if (Tie_req * c = dynamic_cast<Tie_req*> (m))
+    {
+      req_l_ = c;
+      return true;
+    }
+  return false;
+}
+
+void
+Tie_engraver::acknowledge_element (Score_element_info i)
+{
+  if (Note_head *nh = dynamic_cast<Note_head *> (i.elem_l_))
+    {
+      Note_req * m = dynamic_cast<Note_req* > (i.req_l_);
+      now_heads_.push (CHead_melodic_tuple (nh, m, now_moment()+ m->duration ()));
+    }
+}
+
+void
+Tie_engraver::do_process_requests ()
+{
+  if (req_l_)
+    {
+      Moment now = now_moment ();
+      Link_array<Note_head> nharr;
+      
+      stopped_heads_.clear ();
+      while (past_notes_pq_.size ()
+            && past_notes_pq_.front ().end_ == now)
+       stopped_heads_.push (past_notes_pq_.get ());
+
+    }
+}
+
+void
+Tie_engraver::process_acknowledged ()
+{
+  if (req_l_)
+    {
+      if (now_heads_.size () != stopped_heads_.size ())
+       {
+         req_l_->warning ("Unequal number of note heads for tie");
+       }
+      int sz = now_heads_.size () <? stopped_heads_.size ();
+
+      // hmm. Should do something more sensible.
+      // because, we assume no more noteheads come along after the 1st pass.
+      if (sz > tie_p_arr_.size ())
+       {
+         now_heads_.sort (CHead_melodic_tuple::pitch_compare);
+         stopped_heads_.sort(CHead_melodic_tuple::pitch_compare);
+
+         for (int i=0; i < sz; i++)
+           {
+             Tie * p = new Tie;
+             p->set_head (LEFT, stopped_heads_[i].head_l_);
+             p->set_head (RIGHT, now_heads_[i].head_l_);
+             tie_p_arr_.push (p);
+             announce_element (Score_element_info (p, req_l_));
+           }
+       }
+    }
+}
+
+void
+Tie_engraver::do_pre_move_processing ()
+{
+  for (int i=0; i < now_heads_.size (); i++)
+    {
+      past_notes_pq_.insert (now_heads_[i]);
+    }
+  now_heads_.clear( );
+  
+  for (int i=0; i<  tie_p_arr_.size (); i++)
+    {
+      typeset_element (tie_p_arr_[i]);
+    }
+  tie_p_arr_.clear ();
+}
+
+void
+Tie_engraver::do_post_move_processing ()
+{
+  req_l_ =0;
+  Moment now = now_moment ();
+  while (past_notes_pq_.size () && past_notes_pq_.front ().end_ < now)
+    past_notes_pq_.delmin ();
+}
+
+
+
+ADD_THIS_TRANSLATOR(Tie_engraver);
+
+
+CHead_melodic_tuple::CHead_melodic_tuple ()
+{
+  head_l_ =0;
+  mel_l_ =0;
+  end_ = 0;
+}
+
+CHead_melodic_tuple::CHead_melodic_tuple (Note_head *h, Melodic_req*m, Moment mom)
+{
+  head_l_ = h;
+  mel_l_ = m;
+  end_ = mom;
+}
+
+int
+CHead_melodic_tuple::pitch_compare (CHead_melodic_tuple const&h1,
+                            CHead_melodic_tuple const &h2)
+{
+  return Melodic_req::compare (*h1.mel_l_, *h2.mel_l_);
+}
+
+int
+CHead_melodic_tuple::time_compare (CHead_melodic_tuple const&h1,
+                            CHead_melodic_tuple const &h2)
+{
+  return (h1.end_ - h2.end_ ).sign ();
+}
index 0aead695368b6b9ee48c917f9e2e258ab4512b3e..1483196b2eb14c56f5294c7366f1d2a67f3c312b 100644 (file)
@@ -109,7 +109,7 @@ Tie::do_post_processing()
       // uhm? loose end of tie // tie attached to stem
       else
        {
       // uhm? loose end of tie // tie attached to stem
       else
        {
-         dx_f_drul_[d] = -d * (spanned_drul_[d]->width ().length () 
+         dx_f_drul_[d] = -d * (spanned_drul_[d]->extent (X_AXIS).length () 
                                -0.5 * notewidth);
        }
     }
                                -0.5 * notewidth);
        }
     }
@@ -140,7 +140,7 @@ Tie::do_post_processing()
   Real damp_f = paper ()->get_var ("tie_slope_damping");
   Offset d_off = Offset (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
     dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
   Real damp_f = paper ()->get_var ("tie_slope_damping");
   Offset d_off = Offset (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
     dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
-  d_off.x () += width ().length ();
+  d_off.x () += extent (X_AXIS).length ();
 
   Real ratio_f = abs (d_off.y () / d_off.x ());
   if (ratio_f > damp_f)
 
   Real ratio_f = abs (d_off.y () / d_off.x ());
   if (ratio_f > damp_f)
diff --git a/lily/ties-engraver.cc b/lily/ties-engraver.cc
deleted file mode 100644 (file)
index 63a0390..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
-  tie-reg.cc -- implement Ties_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "ties-engraver.hh"
-#include "tie.hh"
-#include "note-head.hh"
-#include "musical-request.hh"
-#include "music-list.hh"
-
-Ties_engraver::Ties_engraver()
-{
-  req_l_ = end_req_l_ =0;
-  processed_ack_pass_i_ = 0;
-  
-}
-
-void
-Ties_engraver::do_post_move_processing()
-{
-  processed_ack_pass_i_ =0;
-}
-
-bool
-Ties_engraver::do_try_music (Music*req)
-{
-  if (Tie_req * r = dynamic_cast <Tie_req *> (req))
-    {  
-      req_l_ = r;
-      return true;
-    }
-  return false;
-}
-
-
-void
-Ties_engraver::acknowledge_element (Score_element_info i)
-{
-  if (!req_l_ && ! end_req_l_)
-    return;
-  if (Note_head * h = dynamic_cast <Note_head *> (i.elem_l_))
-    {
-      Melodic_req *m = dynamic_cast <Melodic_req *> (i.req_l_);
-      
-      head_mel_tuple_arr_.push (Head_melodic_tuple (h, m));
-    }
-}
-
-void
-Ties_engraver::process_acknowledged ()
-{
-  if (!head_mel_tuple_arr_.size () || processed_ack_pass_i_ ++)
-    return;
-
-  head_mel_tuple_arr_.sort (Head_melodic_tuple::compare);
-  if (req_l_ && !tie_p_arr_.size ())
-    {
-      for (int i=0; i < head_mel_tuple_arr_.size (); i++)
-       {
-         Tie*  p = new Tie;
-         p->set_head (LEFT,head_mel_tuple_arr_[i].head_l_);
-         //      announce_element (Score_element_info (p, req_l_));
-         tie_p_arr_.push (p);
-       }
-    }
-
-  if (end_req_l_)
-    {
-      for (int i=0; i < end_tie_p_arr_.size (); i++)
-       {
-         int j = i;
-         if (j >= head_mel_tuple_arr_.size ())
-           {
-             left_head_mel_tuple_arr_[i].mel_l_->warning (_( "Can't find a note head at the right to attach Tie"));
-             j = head_mel_tuple_arr_.size () -1;
-           }
-         
-         Tie*p=end_tie_p_arr_[i];
-         p->set_head (RIGHT, head_mel_tuple_arr_[j].head_l_);
-         if (!Melodic_req::compare (*head_mel_tuple_arr_[j].mel_l_,
-                                    *left_head_mel_tuple_arr_[j].mel_l_))
-           p->same_pitch_b_ = true;
-         announce_element ( Score_element_info (p, end_req_l_));
-       }
-    }
-}
-
-
-void
-Ties_engraver::do_pre_move_processing()
-{
-  if (!head_mel_tuple_arr_.size ())
-    return;
-
-
-  for (int i =0; i < end_tie_p_arr_.size (); i++)
-    {
-      Scalar tie_dir (get_property ("tieYDirection"));
-      Scalar y_dir (get_property ("ydirection"));      
-      Direction dir = CENTER;
-      if (tie_dir.length_i () && tie_dir.isnum_b ())
-       dir = (Direction) sign (int (tie_dir));
-      else if (y_dir.length_i () && y_dir.isnum_b ())
-       dir = (Direction) sign (int (y_dir));
-      
-      end_tie_p_arr_[i]->dir_ = dir;
-      typeset_element (end_tie_p_arr_[i]);
-    }
-
-  end_tie_p_arr_ = tie_p_arr_;
-  left_head_mel_tuple_arr_ = head_mel_tuple_arr_;
-  end_req_l_ = req_l_;
-  
-  req_l_ =0;
-  head_mel_tuple_arr_.clear ();
-  tie_p_arr_.clear ();
-}
-
-void
-Ties_engraver::do_removal_processing ()
-{
-}
-
-void
-Ties_engraver::do_process_requests ()
-{}
-
-
-
-ADD_THIS_TRANSLATOR(Ties_engraver);
-
-
-Head_melodic_tuple::Head_melodic_tuple ()
-{
-  head_l_ =0;
-  mel_l_ =0;
-}
-
-Head_melodic_tuple::Head_melodic_tuple (Note_head *h, Melodic_req*m)
-{
-  head_l_ = h;
-  mel_l_ = m;
-}
-
-int
-Head_melodic_tuple::compare (Head_melodic_tuple const&h1,
-                            Head_melodic_tuple const &h2)
-{
-  return Melodic_req::compare (*h1.mel_l_, *h2.mel_l_);
-}
index 2045dcb4b07f0509ff8a9a1685d1ad8758ff8482..abf70356e227d8cf925ca8d4f95451110659721c 100644 (file)
@@ -54,7 +54,7 @@ Time_signature_engraver::do_pre_move_processing()
 {
   if (time_signature_p_) 
     {
 {
   if (time_signature_p_) 
     {
-      Scalar sigstyle = get_property ("timeSignatureStyle");
+      Scalar sigstyle = get_property ("timeSignatureStyle", 0);
       if (sigstyle.length_i ())
        {
          time_signature_p_->time_sig_type_str_ = sigstyle;
       if (sigstyle.length_i ())
        {
          time_signature_p_->time_sig_type_str_ = sigstyle;
index 58adb32966a6de49a4a4b5bfb0e41cc60da9cd46..de236c0c6e2bc8a0ba50d64b72f3901cd5a739e0 100644 (file)
@@ -19,7 +19,7 @@ Time_signature::Time_signature ()
 }
 
 Molecule*
 }
 
 Molecule*
-Time_signature::brew_molecule_p () const
+Time_signature::do_brew_molecule_p () const
 {
   Atom s;
   if (time_sig_type_str_.length_i ())
 {
   Atom s;
   if (time_sig_type_str_.length_i ())
index d5da1d64023e9ac0d0015d91d94dc247a2398345..71c3eb09e1ed5f22f962a47a5c39b96e7aed70c2 100644 (file)
@@ -119,7 +119,7 @@ Timing_translator::do_pre_move_processing()
 
 
   /* allbars == ! skipbars */
 
 
   /* allbars == ! skipbars */
-  bool allbars = ! get_property ("SkipBars").to_bool ();
+  bool allbars = ! get_property ("SkipBars", 0).to_bool ();
 
 
   if (!time_.cadenza_b_ && allbars)
 
 
   if (!time_.cadenza_b_ && allbars)
index 35ef5a7abe321d92a688f50169b65c0e16d69e99..1629bf5e560ba481ce9cc9a21d71ae9cd826ab0d 100644 (file)
@@ -155,16 +155,20 @@ Translator::pre_move_processing ()
 }
 
 Scalar
 }
 
 Scalar
-Translator::get_property (String id)
+Translator::get_property (String id, Translator const **where_l) const
 {
   if (properties_dict_.elem_b (id))
     {
 {
   if (properties_dict_.elem_b (id))
     {
+      if (where_l)
+       *where_l = this;
       return properties_dict_[id];
     }
   
   if (daddy_trans_l_)
       return properties_dict_[id];
     }
   
   if (daddy_trans_l_)
-    return daddy_trans_l_->get_property (id);
+    return daddy_trans_l_->get_property (id, where_l);
 
 
+  if (where_l)
+    *where_l = 0;
   return "";
 }
 
   return "";
 }
 
index 96590d31403f105ac169947649c39c88b3bf8534..e6d43c2b33011bd8bd2ceb1dd4d8fe6c08e381d0 100644 (file)
@@ -33,7 +33,7 @@ Plet_spanner::Plet_spanner ()
 }
 
 Molecule*
 }
 
 Molecule*
-Plet_spanner::brew_molecule_p () const
+Plet_spanner::do_brew_molecule_p () const
 {
   Molecule* mol_p = new Molecule;
 
 {
   Molecule* mol_p = new Molecule;
 
@@ -51,7 +51,7 @@ Plet_spanner::brew_molecule_p () const
       {
        Real dy = column_arr_.top ()->extent (Y_AXIS) [dir_]
          - column_arr_[0]->extent (Y_AXIS) [dir_];
       {
        Real dy = column_arr_.top ()->extent (Y_AXIS) [dir_]
          - column_arr_[0]->extent (Y_AXIS) [dir_];
-       Real w = width ().length () + ncw;
+       Real w = extent (X_AXIS).length () + ncw;
 
        num.translate (Offset (w/2, dy/2));
        mol_p->add_atom (lookup_l ()->plet (dy, w, dir_));
 
        num.translate (Offset (w/2, dy/2));
        mol_p->add_atom (lookup_l ()->plet (dy, w, dir_));
index 6fa9794f883860a027dabfe598c446ebf6358a87..f94bfe5efd941fefbbd658b1d19068a95cba8eac 100644 (file)
@@ -27,13 +27,13 @@ Vertical_align_engraver::do_creation_processing()
 void
 Vertical_align_engraver::do_removal_processing()
 {
 void
 Vertical_align_engraver::do_removal_processing()
 {
-  Scalar dist (get_property ("maxVerticalAlign"));
+  Scalar dist (get_property ("maxVerticalAlign", 0));
   if (dist.length_i () && dist.isnum_b ())
     {
       valign_p_->threshold_interval_[BIGGER]  = Real (dist);
     }
 
   if (dist.length_i () && dist.isnum_b ())
     {
       valign_p_->threshold_interval_[BIGGER]  = Real (dist);
     }
 
-  dist = get_property ("minVerticalAlign");
+  dist = get_property ("minVerticalAlign", 0);
   if (dist.length_i () && dist.isnum_b ())
     {
       valign_p_->threshold_interval_[SMALLER]  = Real (dist);
   if (dist.length_i () && dist.isnum_b ())
     {
       valign_p_->threshold_interval_[SMALLER]  = Real (dist);
@@ -47,9 +47,9 @@ Vertical_align_engraver::do_removal_processing()
 void
 Vertical_align_engraver::acknowledge_element (Score_element_info i)
 {
 void
 Vertical_align_engraver::acknowledge_element (Score_element_info i)
 {
-  if (i.origin_grav_l_arr_.size() == 1 && 
-      dynamic_cast<Vertical_group_spanner *> (i.elem_l_) &&
-      !i.elem_l_->axis_group_l_a_[Y_AXIS]) 
+  if (i.origin_grav_l_arr_.size() == 1
+      && dynamic_cast<Vertical_group_spanner *> (i.elem_l_)
+      && !i.elem_l_->parent_l (Y_AXIS))
     {
       assert (!valign_p_->contains_b (i.elem_l_));
 
     {
       assert (!valign_p_->contains_b (i.elem_l_));
 
index 638afa364d399177fa3a3640e37cccbc88b017a3..1178a44bb06ed8fcc4994885c1f1a645c01c5585 100644 (file)
 #include "item.hh"
 #include "p-col.hh"
 
 #include "item.hh"
 #include "p-col.hh"
 
-
-
-
 Vertical_group_spanner::Vertical_group_spanner ()
 {
 Vertical_group_spanner::Vertical_group_spanner ()
 {
-  axis1_ = axis2_ = Y_AXIS;
+  axes_[0] = axes_[1] = Y_AXIS;
 }
 }
index d40848a56ea1c301a67e4ccf7b000a2a3fdae1aa..a5b6f629a03e44d9b15a1ee1a0b417c25bf7802d 100644 (file)
@@ -36,7 +36,7 @@ Volta_spanner::Volta_spanner ()
 }
 
 Molecule*
 }
 
 Molecule*
-Volta_spanner::brew_molecule_p () const
+Volta_spanner::do_brew_molecule_p () const
 {
   Molecule* mol_p = new Molecule;
 
 {
   Molecule* mol_p = new Molecule;
 
@@ -44,7 +44,7 @@ Volta_spanner::brew_molecule_p () const
     {
       Real internote_f = paper ()->internote_f ();
       Real dx = internote_f;
     {
       Real internote_f = paper ()->internote_f ();
       Real dx = internote_f;
-      Real w = width ().length () - 2 * dx;
+      Real w = extent (X_AXIS).length () - 2 * dx;
       Atom volta (lookup_l ()->volta (w, last_b_));
       Real h = volta.dim_.y ().length ();
       Atom num (number_p_->get_atom (paper (), LEFT));
       Atom volta (lookup_l ()->volta (w, last_b_));
       Real h = volta.dim_.y ().length ();
       Atom num (number_p_->get_atom (paper (), LEFT));
@@ -52,8 +52,12 @@ Volta_spanner::brew_molecule_p () const
       Real dy = column_arr_.top ()->extent (Y_AXIS) [dir_] > 
        column_arr_[0]->extent (Y_AXIS) [dir_];
       dy += 2 * h;
       Real dy = column_arr_.top ()->extent (Y_AXIS) [dir_] > 
        column_arr_[0]->extent (Y_AXIS) [dir_];
       dy += 2 * h;
+
+      /*
+       UGH.  Must use extent  ()[dir_]
+       */
       for (int i = 0; i < note_column_arr_.size (); i++)
       for (int i = 0; i < note_column_arr_.size (); i++)
-        dy = dy >? note_column_arr_[i]->height ().max ();
+        dy = dy >? note_column_arr_[i]->extent (Y_AXIS).max ();
       dy -= h;
 
       Real gap = num.dim_.x ().length () / 2;
       dy -= h;
 
       Real gap = num.dim_.x ().length () / 2;
index b2536253c1dfe65aab3e808416bf640e2ff8acf1..b948faf809807a0b60863863b151bcfa95f11fd3 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Titel: LilyPond
 Begin3
 Titel: LilyPond
-Versie: 1.1.17
-Inschrijf datum: 24DEC98
+Versie: 1.1.18
+Inschrijf datum: 04JAN99
 Beschrijving: @FLAPTEKST@
 Trefwoorden: muziek typezetten midi notatie
 Auteur: hanwen@stack.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Onderhouden door: hanwen@cs.ruu.nl (Han-Wen Nienhuys)
 Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
 Beschrijving: @FLAPTEKST@
 Trefwoorden: muziek typezetten midi notatie
 Auteur: hanwen@stack.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Onderhouden door: hanwen@cs.ruu.nl (Han-Wen Nienhuys)
 Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
-       770k lilypond-1.1.17.tar.gz 
+       770k lilypond-1.1.18.tar.gz 
 Oorspronkelijke plek: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
 Oorspronkelijke plek: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       770k lilypond-1.1.17.tar.gz 
+       770k lilypond-1.1.18.tar.gz 
 Copi-eer voorwaarden: GPL
 End
 Copi-eer voorwaarden: GPL
 End
index 7c75763323191362dd6a404e59f84f6a2b45f451..9dccfd57447fc43c7bc52c86868f7082a83cb26f 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title: LilyPond
 Begin3
 Title: LilyPond
-Version: 1.1.17
-Entered-date: 24DEC98
+Version: 1.1.18
+Entered-date: 04JAN99
 Description: 
 LilyPond is the GNU Project music typesetter.  This program can print
 beautiful sheet music from a music definition file.  It can also play
 Description: 
 LilyPond is the GNU Project music typesetter.  This program can print
 beautiful sheet music from a music definition file.  It can also play
@@ -14,8 +14,8 @@ Author: hanwen@cs.ruu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       770k lilypond-1.1.17.tar.gz 
+       770k lilypond-1.1.18.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       770k lilypond-1.1.17.tar.gz 
+       770k lilypond-1.1.18.tar.gz 
 Copying-policy: GPL
 End
 Copying-policy: GPL
 End
index 2124ea5c2ea3ce3f46379dcc9dff9bf3bc95e4d3..8a8e9f987741e413bcc81866c62b0b22c51e0941 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
 Name: lilypond
-Version: 1.1.17
+Version: 1.1.18
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.17.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.18.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@cs.uu.nl>
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@cs.uu.nl>
diff --git a/mf/cmbase.mf b/mf/cmbase.mf
new file mode 100644 (file)
index 0000000..22c4a27
--- /dev/null
@@ -0,0 +1,697 @@
+% The base file for Computer Modern (a supplement to {\tt plain.mf})
+
+cmbase:=1; % when |cmbase| is known, this file has been input
+
+let cmchar=\; % `|cmchar|' should precede each character
+let generate=input; % `|generate|' should follow the parameters
+
+autorounding:=0; smoothing:=0; % we do our own rounding
+def autorounded = interim autorounding:=2 enddef;
+
+newinternal slant,fudge,math_spread,superness,superpull,beak_darkness,ligs;
+boolean square_dots,hefty,serifs,
+ monospace,variant_g,low_asterisk,math_fitting;
+
+boolean dark,dark.dark,skewed,skewed.skewed; % for fast option testing
+dark=skewed=false; dark.dark=skewed.skewed=true;
+
+vardef Vround primary y = y_:=vround y;
+ if y_<min_Vround: min_Vround else: y_ fi enddef;
+newinternal y_,min_Vround;
+
+vardef serif(suffix $,$$,@)  % serif at |z$| for stroke from |z$$|
+  (expr darkness,jut) suffix modifier =
+ pickup crisp.nib; numeric bracket_height; pair downward;
+ bracket_height=if dark.modifier: 1.5 fi\\ bracket;
+ if y$<y$$: y@2=min(y$+bracket_height,y$$);
+  top y@1-slab=bot y@0+eps=tiny.bot y$; downward=z$-z$$;
+  if y@1>y@2: y@2:=y@1; fi
+ else: y@2=max(y$-bracket_height,y$$);
+  bot y@1+slab=top y@0-eps=tiny.top y$; downward=z$$-z$;
+  if y@1<y@2: y@2:=y@1; fi fi
+ y@3=y@2; z@3=whatever[z$,z$$];
+ if jut<0: z@2+penoffset downward of currentpen =
+   z$l+penoffset downward of pen_[tiny.nib]+whatever*downward;
+  lft x@0=lft x@1=tiny.lft x$l+jut;
+  if x@3<x@2+eps: x@3:=x@2+eps; fi
+ else: z@2-penoffset downward of currentpen =
+   z$r-penoffset downward of pen_[tiny.nib]+whatever*downward;
+   rt x@0=rt x@1=tiny.rt x$r+jut;
+   if x@3>x@2-eps: x@3:=x@2-eps; fi fi
+ pair corner; ypart corner=y@1; corner=z@2+whatever*downward;
+ filldraw z@2{z$-z$$}
+  ...darkness[corner,.5[z@1,z@2] ]{z@1-z@2}
+  ...{jut,0}z@1--z@0--(x$,y@0)--z@3--cycle; % the serif
+ labels (@1,@2); enddef;
+
+def dish_serif(suffix $,$$,@)(expr left_darkness,left_jut)
+  (suffix @@)(expr right_darkness,right_jut) suffix modifier =
+ serif($,$$,@,left_darkness,-left_jut) modifier;
+ serif($,$$,@@,right_darkness,right_jut) modifier;
+ if dish>0: pickup tiny.nib; numeric dish_out,dish_in;
+  if y$<y$$: dish_out=bot y$; dish_in=dish_out+dish; let rev_=reverse;
+  else: dish_out=top y$; dish_in=dish_out-dish; let rev_=relax; fi
+  erase fill rev_
+   ((x@1,dish_out)..(x$,dish_in){right}..(x@@1,dish_out)--cycle);
+ fi enddef;
+
+def nodish_serif(suffix $,$$,@)(expr left_darkness,left_jut)
+  (suffix @@)(expr right_darkness,right_jut) suffix modifier =
+ serif($,$$,@,left_darkness,-left_jut) modifier;
+ serif($,$$,@@,right_darkness,right_jut) modifier; enddef;
+
+vardef sloped_serif.l(suffix $,$$,@)(expr darkness,jut,drop) =
+ pickup crisp.nib; pos@2(slab,90);
+ lft x@0=tiny.lft x$l; rt x@1=tiny.rt x$r; top y@1=tiny.top y$r;
+ lft x@2=lft x@0-jut; y@2r=y@1-drop;
+ y@0=max(y@2l-bracket,y$$)-eps;
+ if drop>0: erase fill z@1--top z@1
+   --(x@2r,top y@1)--z@2r--cycle; fi % erase excess at top
+ filldraw z@1--z@2r--z@2l{right}
+  ...darkness[(x@0,y@2l),.5[z@2l,z@0] ]{z@0-z@2l}
+  ...{down}z@0--(x@1,y@0)--cycle;  % sloped serif
+ labels(@0,@1,@2); enddef;
+
+vardef sloped_serif.r(suffix $,$$,@)(expr darkness,jut,drop) =
+ pickup crisp.nib; pos@2(slab,-90);
+ rt x@0=tiny.rt x$r; lft x@1=tiny.lft x$l; bot y@1=tiny.bot y$l;
+ rt x@2=rt x@0+jut; y@2r=y@1+drop;
+ y@0=min(y@2l+bracket,y$$)+eps;
+if drop>0: erase fill z@1--bot z@1
+  --(x@2r,bot y@1)--z@2r--cycle; fi % erase excess at bottom
+ filldraw z@1--z@2r--z@2l{left}
+  ...darkness[(x@0,y@2l),.5[z@2l,z@0] ]{z@0-z@2l}
+  ...{up}z@0--(x@1,y@0)--cycle;  % sloped serif
+ labels(@0,@1,@2); enddef;
+
+vardef term.l(suffix $,$$)(expr d,t,s)= % ``robust'' sans-serif terminal
+ path p_; p_=z$l{d}..tension t..z$$l;
+ pair d_; d_=(x$$l-x$l,s*(y$$l-y$l));
+ if (abs angle direction 1 of p_ < abs angle d_)<>(x$l<x$$l):
+  p_:=z$l{d}..tension atleast t..{d_}z$$l; fi
+ p_ enddef;
+vardef term.r(suffix $,$$)(expr d,t,s)=
+ path p_; p_=z$r{d}..tension t..z$$r;
+ pair d_; d_=(x$$r-x$r,s*(y$$r-y$r));
+ if (abs angle direction 1 of p_ < abs angle d_)<>(x$r<x$$r):
+  p_:=z$r{d}..tension atleast t..{d_}z$$r; fi
+ p_ enddef;
+def rterm=reverse term enddef;
+
+vardef arm(suffix $,$$,@)(expr darkness,jut) =  % arm from |z$| to |z$$|
+ x@0=good.x(x$$r-jut); y@0=y$r;
+ if serifs: y@1=y$l; z@1=z$$l+whatever*(z$$r-z@0);
+  z@2=.5[z$l,z@1];
+  filldraw z$$l{z@1-z$$l}...darkness[z@1,.5[z@2,z$$l] ]...z@2
+   ---z$l--z$r--z@0--z$$r--cycle; % arm and beak
+ else: filldraw z$l--z$r--z@0--z$$r--cycle; fi  % sans-serif arm
+ penlabels(@0,@1,@2); enddef;
+
+def pi_stroke = pickup fine.nib;
+ pos1(hair,0); pos2(vstem,-90); pos3(vstem,-90);
+ x1-.5hair=hround -.5hair; x2=2u; x3=w-1.5u;
+ y1=x_height-x_height/3.141592653589793; y2=y3; top y3l=x_height;
+ filldraw circ_stroke z3e---z2e...{x1-x2,3.14159(y1-y2)}z1e enddef;
+
+def bulb(suffix $,$$,$$$) =
+ z$$$r=z$$r;
+ path_.l:=z$l{x$$r-x$r,0}...{0,y$$r-y$r}z$$l;
+ filldraw path_.l--z$$r{0,y$r-y$$r}...{x$r-x$$r,0}z$r--cycle; % link
+ path_.r:=z$$$l{0,y$r-y$$r}..z$$$r{0,y$$r-y$r}; % near-circle
+ filldraw subpath(0,xpart(path_.r intersectiontimes path_.l)) of path_.r
+  --z$$r{0,y$$r-y$r}..cycle; % bulb
+ enddef;
+
+def v_bulb(suffix $,$$)= % |pos$| is known
+ y$$+.5curve=x_height+oo; x$$+.5curve=w-u;
+ numeric theta; theta=angle(4(x$-x$$),y$-y$$); pos$$(curve,theta+90);
+ filldraw z$$l{dir theta}..tension atleast 1 and 1..{down}z$l
+  --z$r{up}...{-dir theta}z$$r..cycle;  % bulb
+ enddef;
+
+def dot(suffix $,$$) =
+ filldraw if square_dots: (x$l,y$$l)--(x$r,y$$l)
+   --(x$r,y$$r)--(x$l,y$$r)--cycle  % squarish dot
+  else: z$l...z$$l...z$r...z$$r...cycle  fi % roundish dot
+ enddef;
+
+def comma(suffix $,@)(expr dot_size,jut,depth) =
+ pickup fine.nib; pos$(dot_size,90);
+ if square_dots: pos$'(dot_size,0); z$'=z$; dot($',$);  % squarish dot
+  comma_join_:=max(fine.breadth,floor .7dot_size);
+  comma_bot_:=max(fine.breadth,floor .5dot_size);
+  pos@0(comma_join_,0); pos@1(comma_join_,0);
+  pos@2(comma_bot_,0); y@0=y$; y@1=y$l; y@2=y@1-depth;
+  x@0r=x@1r=x$'r; rt x@2r=good.x(x$-eps);
+  filldraw stroke z@0e--z@1e..z@2e;  % tail
+ else: pos@1(vair,90); pos@2(vair,0); pos@3(vair,-45);
+  z@1r=z$r; rt x@2r=hround(x$+.5dot_size+jut)+2eps; x@3=x$-.5u;
+  y@2=1/3[y@1,y@3]; bot y@3r=vround(y$-.5dot_size-depth);
+  y_:=ypart((z@1{right}...z@2{down}...z@3)
+   intersectiontimes (z$l{right}..{left}z$r)); if y_<0: y_:=1; fi
+  filldraw z$r{left}..subpath (0,y_) of (z$l{right}..{left}z$r)--cycle; % dot
+  filldraw stroke z@1e{right}...z@2e{down}...z@3e; fi  % tail
+ penlabels(@1,@2,@3); enddef;
+
+def ammoc(suffix $,@)(expr dot_size,jut,depth) = % reversed comma
+ pickup fine.nib; pos$(dot_size,90);
+ if square_dots: pos$'(dot_size,0); z$'=z$; dot($',$);  % squarish dot
+  comma_join_:=max(fine.breadth,floor .7dot_size);
+  comma_top_:=max(fine.breadth,floor .5dot_size);
+  pos@0(comma_join_,0); pos@1(comma_join_,0);
+  pos@2(comma_top_,0); y@0=y$; y@1=y$r; y@2=y@1+depth;
+  x@0l=x@1l=x$'l; lft x@2l=good.x(x$+eps);
+  filldraw stroke z@0e--z@1e..z@2e;  % tail
+ else: pos@1(vair,90); pos@2(vair,0); pos@3(vair,-45);
+  z@1l=z$l; lft x@2l=hround(x$-.5dot_size-jut)-2eps; x@3=x$+.5u;
+  y@2=1/3[y@1,y@3]; top y@3l=vround(y$+.5dot_size+depth);
+  y_:=ypart((z@1{left}...z@2{up}...z@3)
+   intersectiontimes (z$r{left}..{right}z$l)); if y_<0: y_:=1; fi
+  filldraw z$l{right}..subpath (0,y_) of (z$r{left}..{right}z$l)--cycle; % dot
+  filldraw stroke z@1e{left}...z@2e{up}...z@3e; fi  % tail
+ penlabels(@1,@2,@3); enddef;
+
+%%% @ from to %%%% temporary formatting change
+vardef diag_in(suffix from,$)(expr sharpness)(suffix $$) =
+ pickup tiny.nib; save from_x,y_;
+ if y.from>y$: bot else: top fi\\ y_=y$;
+ (from_x,y_)=whatever[z.from,z$];
+ sharpness[z$,(from_x,y_)]{z$-z.from}
+  ...{z$$-z$}z$+sharpness*length(z$-(from_x,y_))*unitvector(z$$-z$) enddef;
+
+vardef diag_out(suffix $)(expr sharpness)(suffix $$,to) =
+ pickup tiny.nib; save to_x,y_;
+ if y.to>y$: bot else: top fi\\ y_=y$;
+ (to_x,y_)=whatever[z$$,z.to];
+ z$$-sharpness*length(z$$-(to_x,y_))*unitvector(z$$-z$){z$$-z$}
+  ...{z.to-z$$}sharpness[z$$,(to_x,y_)] enddef;
+
+vardef diag_end(suffix from,$)(expr sharpness_in,sharpness_out)(suffix $$,to)=
+ save from_x,to_x,y_,x_,xx_;
+ if y.from>y$: tiny.bot else: tiny.top fi\\ y_=y$; % we assume that |y$=y$$|
+ (from_x,y_)=whatever[z.from,z$]; (to_x,y_)=whatever[z$$,z.to];
+ if x$$>x$: x_=x$+sharpness_in*length(z$-(from_x,y_));
+  xx_=x$$-sharpness_out*length(z$$-(to_x,y_));
+  if xx_<x_: xx_:=x_:=.5[xx_,x_]; fi
+ else: x_=x$-sharpness_in*length(z$-(from_x,y_));
+  xx_=x$$+sharpness_out*length(z$$-(to_x,y_));
+  if xx_>x_: xx_:=x_:=.5[xx_,x_]; fi fi
+ sharpness_in[z$,(from_x,y_)]{z$-z.from}
+  ...{z$$-z$}(x_,y$)..(xx_,y$){z$$-z$}
+  ...{z.to-z$$}sharpness_out[z$$,(to_x,y_)] enddef;
+%%% at from to %%%% restore normal formatting
+
+vardef special_diag_end(suffix $$,$,@,@@) = % for top middle of w's
+ if x@r<=x$r: diag_end($$r,$r,1,1,@l,@@l)
+ else: z0=whatever[z$$l,z$l]=whatever[z@l,z@@l];
+  diag_end($$r,$r,1,1,$l,0)--z0 fi enddef;
+
+def prime_points_inside(suffix $,$$) =
+ theta_:=angle(z$r-z$l);
+ penpos$'(whatever,theta_);
+ if y$$>y$: z$'=(0,pen_top) rotated theta_ + whatever[z$l,z$r];
+  theta_:=angle(z$$-z$)-90;
+ else: z$'=(0,pen_bot) rotated theta_ + whatever[z$l,z$r];
+  theta_:=angle(z$$-z$)+90; fi
+ z$'l+(pen_lft,0) rotated theta_=z$l+whatever*(z$-z$$);
+ z$'r+(pen_rt,0) rotated theta_=z$r+whatever*(z$-z$$);
+ enddef;
+
+def ellipse_set(suffix $,@,@@,$$) = % given |z$,x@,z$$|, find |y@| and |z@@|
+% such that the path |z${x@-x$,0}..z@{0,y@-y$}..{z$$-z@@}z@@|
+% is consistent with an ellipse
+% and such that the line |z@@--z$$| has a given |slope|
+ alpha_:=slope*(x@-x$); beta_:=y$$-y$-slope*(x$$-x$);
+ gamma_:=alpha_/beta_;
+ y@-y$=.5(beta_-alpha_*gamma_);
+ x@@-x$=-2gamma_*(x@-x$)/(1+gamma_*gamma_);
+ y@@-y$$=slope*(x@@-x$$) enddef;
+
+vardef diag_ratio(expr a,b,y,c) = % assuming that $a>\vert b/y\vert$,
+% compute the value $\alpha=(x\6{++}y)/y$ such that $ax+b\alpha=c$
+ numeric a_,b_,c_; b_=b/y; c_=c/y; a_=a*a-b_*b_;
+ (a*(c_++sqrt a_)-b_*c_)/a_ enddef;
+
+def f_stroke(suffix $,$$,@,left_serif,right_serif)(expr left_jut,right_jut)=
+ pickup tiny.nib; bot y$=0;
+ penpos@0(x$r-x$l,0); x@0l=x$l; top y@0=x_height;
+ filldraw stroke z$e--z@0e;  % stem
+ pickup fine.nib; pos@0'(x$r-x$l-(hround stem_corr)+tiny,180);
+ y@0'=y@0; lft x@0'r=tiny.lft x$l;
+ penpos@1(x@0'l-x@0'r,180); x@1=x@0'; y@1+.5vair=.5[x_height,h];
+ pos@2(vair,90); top y@2r=h+oo;
+ if serifs: x@2=.6[x@1,x$$r]; (x@,y@2r)=whatever[z@2l,z@1l];
+  x@2r:=min(x@,.5[x@2,x$$r]); pos@3(hair,0); bulb(@2,@3,$$);  % bulb
+  filldraw stroke z@0'e--z@1e & super_arc.e(@1,@2);  % arc
+  dish_serif($,@0,left_serif,1/3,left_jut,right_serif,1/3,right_jut); % serif
+ else: x@2=.6[x@1,x$$]; y@1l:=1/3[y@1l,y@2l];
+  filldraw stroke z@0'e--z@1e & super_arc.e(@1,@2)
+   & term.e(@2,$$,right,.9,4); fi  % arc and terminal
+ penlabels(@0,@1,@2); enddef;
+
+def h_stroke(suffix $,@,@@,$$) =
+ penpos$$(x@@r-x@@l,0); x$$=x@@; bot y$$=0;
+ y@@=1/3[bar_height,x_height];
+ penpos$''(x$r-x$l,0); x$''=x$; y$''=1/8[bar_height,x_height];
+ filldraw stroke z$''e--z$e;  % thicken the lower left stem
+ penpos@0(min(rt x$r-lft x$l,thin_join)-fine,180); pickup fine.nib;
+ rt x@0l=tiny.rt x$r; y@0=y$'';
+ pos@1(vair,90); pos@@'(x@@r-x@@l+tiny,0); z@@'=z@@;
+ x@1=.5[rt x@0l,rt x@@'r]; top y@1r=x_height+oo;
+ (x@,y@1l)=whatever[z@1r,z@0l]; x@1l:=x@;
+ filldraw stroke z@0e{up}...{right}z@1e
+  &{{interim superness:=hein_super; super_arc.e(@1,@@')}};  % arch
+ pickup tiny.nib; filldraw stroke z@@e--z$$e;  % right stem
+ labels(@0); penlabels(@1); enddef;
+
+def hook_out(suffix $,$$,$$$)suffix modifier= % |x$| and |x$$$| (only) are known
+ pos$(stem,0); pos$$(vair,90);
+ x$$$:=hround(x$$$+.5hair-eps)-.5hair; pos$$$(hair,180);
+ y$=1/4x_height; bot y$$l=-oo; y$$$=1/3x_height;
+ if skewed.modifier: x$$=x$+1.25u;
+  filldraw stroke z$e{-u,-x_height}...z$$e{right}...{up}z$$$e;  % hook
+ else: x$$=x$+1.5u;
+  filldraw stroke z$e{down}...z$$e{right}
+   ...{x$$$-(x$+2.5u),x_height}z$$$e; fi enddef;  % hook
+
+def hook_in(suffix $,$$,$$$)suffix modifier= % |x$| and |x$$$| (only) are known
+ x$:=hround(x$-.5hair)+.5hair; pos$(hair,180);
+ pos$$(vair,90); pos$$$(stem,0);
+ y$=2/3x_height; top y$$r=x_height+oo; y$$$=3/4x_height;
+ if skewed.modifier: x$$=x$$$-1.25u;
+  filldraw stroke z$e{up}...z$$e{right}...{-u,-x_height}z$$$e;  % hook
+ else: x$$=x$$$-1.5u;
+  filldraw stroke z$e{x$$$-2.5u-x$,x_height}
+   ...z$$e{right}...{down}z$$$e; fi enddef;  % hook
+
+def ital_arch(suffix $,$$,$$$) = % |z$| and |z$$$| (only) are known
+ pos$'(hair,180); z$'=z$;
+ pos$$(vair,90); pos$$$(stem,0);
+ {{interim superness := more_super; x$$=.6[x$,x$$$];
+ top y$$r=x_height+oo; y$$$=.65x_height;
+ filldraw stroke z$'e{up}...super_arc.e($$,$$$);}} enddef;  % stroke
+
+def compute_spread(expr normal_spread,big_spread)=
+ spread#:=math_spread[normal_spread,big_spread];
+ spread:=2ceiling(spread#*hppp/2)+eps; enddef;
+
+def v_center(expr h_sharp) =
+ .5h_sharp+math_axis#, .5h_sharp-math_axis# enddef;
+
+def circle_points =
+ x4=x8=.5[x2,x6]; x1=x3=superness[x4,x2]; x5=x7=superness[x4,x6];
+ y2=y6=.5[y4,y8]; y1=y7=superness[y2,y8]; y3=y5=superness[y2,y4];
+ enddef;
+def draw_circle =
+ draw z8{right}...z1{z2-z8}...z2{down}...z3{z4-z2}...z4{left}
+  ...z5{z6-z4}...z6{up}...z7{z8-z6}...cycle enddef;
+
+def left_paren(expr min_breadth, max_breadth) =
+ pickup fine.nib; pos1(hround min_breadth,0);
+ pos2(hround max_breadth,0); pos3(hround min_breadth,0);
+ rt x1r=rt x3r=hround(w-1.25u+.5min_breadth); lft x2l=hround 1.25u;
+ top y1=h; y2=.5[y1,y3]; bot y3=1-d;
+ filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e
+  ...{3(x3e-x2e),y3-y2}z3e;  % arc
+ penlabels(1,2,3); enddef;
+
+def right_paren(expr min_breadth, max_breadth) =
+ pickup fine.nib; pos1(hround min_breadth,0);
+ pos2(hround max_breadth,0); pos3(hround min_breadth,0);
+ lft x1l=lft x3l=hround(1.25u-.5min_breadth); rt x2r=hround(w-1.25u);
+ top y1=h; y2=.5[y1,y3]; bot y3=1-d;
+ filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e
+  ...{3(x3e-x2e),y3-y2}z3e;  % arc
+ penlabels(1,2,3); enddef;
+
+def left_bracket(expr breadth,do_top,do_bot) =
+ pickup crisp.nib;
+ numeric thickness; thickness=hround breadth;
+ pos1(thickness,0); pos2(thickness,0);
+ top y1=h; bot y2=1-d; lft x1l=lft x2l=hround(2.5u-.5thickness);
+ filldraw stroke z1e--z2e;  % stem
+ pos3(thickness,90); pos4(thickness,90);
+ pos5(thickness,90); pos6(thickness,90);
+ x3=x5=x1l; rt x4=rt x6=hround(w-.75u+.5thickness);
+ y3r=y4r=y1; y5l=y6l=y2;
+ if do_top: filldraw stroke z3e--z4e; fi  % upper bar
+ if do_bot: filldraw stroke z5e--z6e; fi  % lower bar
+ penlabels(1,2,3,4,5,6); enddef;
+
+def right_bracket(expr breadth,do_top,do_bot) =
+ pickup crisp.nib;
+ numeric thickness; thickness=hround breadth;
+ pos1(thickness,0); pos2(thickness,0);
+ top y1=h; bot y2=1-d; rt x1r=rt x2r=hround(w-2.5u+.5thickness);
+ filldraw stroke z1e--z2e;  % stem
+ pos3(thickness,90); pos4(thickness,90);
+ pos5(thickness,90); pos6(thickness,90);
+ x3=x5=x1r; lft x4=lft x6=hround(.75u-.5thickness);
+ y3r=y4r=y1; y5l=y6l=y2;
+ if do_top: filldraw stroke z3e--z4e; fi  % upper bar
+ if do_bot: filldraw stroke z5e--z6e; fi  % lower bar
+ penlabels(1,2,3,4,5,6); enddef;
+
+def left_curly(expr min_breadth, max_breadth) =
+ pickup fine.nib;
+ forsuffixes $=1,1',4,4',7,7': pos$(hround min_breadth,0); endfor
+ forsuffixes $=2,3,5,6: pos$(hround max_breadth,0); endfor
+ x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4';
+ lft x4l=hround(1.5u-.5min_breadth); lft x2l=hround(.5w-.5max_breadth);
+ top y1=h; bot y7=1-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5];
+ y1-y2=y3-y4=(y1-y4)/4;
+ y1-y1'=y4-y4'=y7'-y7=vround(min_breadth-fine);
+ filldraw z1l{3(x2l-x1l),y2-y1}...z2l---z3l...{3(x4l-x3l),y4-y3}z4l
+  --z4'l{3(x5l-x4l),y5-y4'}...z5l---z6l...{3(x7l-x6l),y7-y6}z7l
+  --z7r--z7'r{3(x6r-x7r),y6-y7'}...z6r---z5r
+  ...{3(x4r-x5r),.5[y4,y4']-y5}.5[z4r,z4'r]{3(x3r-x4r),y3-.5[y4,y4']}
+  ...z3r---z2r...{3(x1r-x2r),y1'-y2}z1'r--z1r--cycle;  % stroke
+ penlabels(1,2,3,4,5,6,7); enddef;
+
+def right_curly(expr min_breadth, max_breadth) =
+ pickup fine.nib;
+ forsuffixes $=1,1',4,4',7,7': pos$(hround min_breadth,0); endfor
+ forsuffixes $=2,3,5,6: pos$(hround max_breadth,0); endfor
+ x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4';
+ lft x1l=hround(1.5u-.5min_breadth); lft x2l=hround(.5w-.5max_breadth);
+ top y1=h; bot y7=1-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5];
+ y1-y2=y3-y4=(y1-y4)/4;
+ y1-y1'=y4-y4'=y7'-y7=vround(min_breadth-fine);
+ filldraw z1r{3(x2r-x1r),y2-y1}...z2r---z3r...{3(x4r-x3r),y4-y3}z4r
+  --z4'r{3(x5r-x4r),y5-y4'}...z5r---z6r...{3(x7r-x6r),y7-y6}z7r
+  --z7l--z7'l{3(x6l-x7l),y6-y7'}...z6l---z5l
+  ...{3(x4l-x5l),.5[y4,y4']-y5}.5[z4l,z4'l]{3(x3l-x4l),y3-.5[y4,y4']}
+  ...z3l---z2l...{3(x1l-x2l),y1'-y2}z1'l--z1l--cycle;  % stroke
+ penlabels(1,2,3,4,5,6,7); enddef;
+
+def left_angle(expr breadth) =
+ pickup pencircle scaled breadth;
+ x1=x3=good.x(w-u)+eps; lft x2=hround u-eps;
+ top y1=h+eps; .5[y1,y3]=y2=good.y .5[-d+eps,h];
+ draw z1--z2--z3;  % diagonals
+ labels(1,2,3); enddef;
+
+def right_angle(expr breadth) =
+ pickup pencircle scaled breadth;
+ x1=x3=good.x u-eps; rt x2=hround(w-u)+eps;
+ top y1=h+eps; .5[y1,y3]=y2=good.y .5[-d+eps,h];
+ draw z1--z2--z3;  % diagonals
+ labels(1,2,3); enddef;
+
+def big_slash(expr breadth) =
+ adjust_fit(-letter_fit#,-letter_fit#); pickup pencircle scaled breadth;
+ rt x1=hround(w-u); lft x2=hround u; top y1=h+eps; bot y2=1-d-eps;
+ draw z1--z2;  % diagonal
+ labels(1,2); enddef;
+
+def big_blash(expr breadth) =
+ adjust_fit(-letter_fit#,-letter_fit#); pickup pencircle scaled breadth;
+ lft x1=hround u; rt x2=hround(w-u); top y1=h+eps; bot y2=1-d-eps;
+ draw z1--z2;  % diagonal
+ labels(1,2); enddef;
+
+def big_sqrt =
+ adjust_fit(0,-letter_fit#); pickup rule.nib;
+ x1=good.x 4/9w; x2=good.x(w+.5); bot y1=-d; bot y2=0;
+ draw z1--z2;  % diagonal
+ pickup crisp.nib; pos3(max(curve,rule_thickness),0);
+ x3l=1.5[x2,x1]; y3=.5[y1,y2];
+ pos4(rule_thickness,0); x4=x1; bot y4=-d;
+ pos5(vair,-45); x5l=good.x(x3l-u); z5l=whatever[z3r,z2];
+ z6=z5r+whatever*(z2-z3r)=whatever[z3l,z4l];
+ z7=whatever[z1,z2]=z3r+whatever*(z4l-z3l);
+ filldraw z5r--z6--z4l--z4--z7--z3r--z5l--cycle;  % left diagonal and serif
+ penlabels(1,2,3,4,5,6,7); enddef;
+
+def big_hat =
+ adjust_fit(0,0);
+ pickup crisp.nib; pos2(.6[vair,curve],90); top y2r=h+o; x2=.5w;
+ x1=w-x3=good.x -eps; y1=y3=.5[x_height,y2];
+ pos1(hair,angle(z2-z1)+90); pos3(hair,angle(z3-z2)+90);
+ filldraw stroke z1e--z2e--z3e;  % diagonals
+ penlabels(1,2,3); enddef;
+
+def big_tilde =
+ adjust_fit(0,0); pickup crisp.nib;
+ numeric theta; theta=angle(1/6(w-vair),1/4(h-x_height));
+ numeric mid_width; mid_width=.4[vair,stem];
+ pos1(vair,theta+90); pos2(vair,theta+90);
+ pos3(vair,theta+90); pos4(vair,theta+90);
+ z2-z1=z4-z3=(mid_width-crisp)*dir theta;
+ lft x1r=w-rt x4l=0; top y4r=h;
+ bot y1l=vround(bot y1l+min(2/3[x_height,h],y3l-.25vair)-top y1r);
+ pair delta; ypart delta=3(y3l-y1l); delta=whatever*dir theta;
+ filldraw z1l..controls(z1l+delta)and(z3l-delta)..z3l..z4l
+  --z4r..controls(z4r-delta)and(z2r+delta)..z2r..z1r--cycle;  % stroke
+ penlabels(1,2,3,4); enddef;
+
+def beginarithchar(expr c) = % ensure consistent dimensions for $+$, $-$, etc.
+ if monospace: beginchar(c,14u#,27/7u#+math_axis#,27/7u#-math_axis#);
+ else: beginchar(c,14u#,6u#+math_axis#,6u#-math_axis#); fi
+ italcorr math_axis#*slant-.5u#;
+ adjust_fit(0,0); enddef;
+
+newinternal l,r,shrink_fit; % adjustments to spacing
+
+def do_expansion(expr expansion_factor) =
+ forsuffixes $=u,jut,cap_jut,beak_jut,apex_corr:
+   $:=$.#*expansion_factor*hppp; endfor
+enddef;
+
+def normal_adjust_fit(expr left_adjustment,right_adjustment) =
+ numeric charwd_in; charwd_in=charwd;
+ l:=-hround(left_adjustment*hppp)-letter_fit;
+ interim xoffset:=-l;
+ charwd:=charwd+2letter_fit#+left_adjustment+right_adjustment;
+ r:=l+hround(charwd*hppp)-shrink_fit;
+ w:=r-hround(right_adjustment*hppp)-letter_fit;
+ do_expansion(w/(charwd_in*hppp));
+ enddef;
+
+def mono_adjust_fit(expr left_adjustment,right_adjustment) =
+ numeric charwd_in; charwd_in=charwd;
+ numeric expansion_factor;
+ mono_charwd#=2letter_fit#
+   +expansion_factor*(charwd+left_adjustment+right_adjustment);
+ l:=-hround(left_adjustment*expansion_factor*hppp)-letter_fit;
+ interim xoffset:=-l;
+ r:=l+mono_charwd-shrink_fit;
+ w:=r-hround(right_adjustment*expansion_factor*hppp)-letter_fit;
+ charwd:=mono_charwd#; charic:=mono_charic#;
+ do_expansion(w/(charwd_in*hppp));
+ enddef;
+
+extra_endchar:=extra_endchar&"r:=r+shrink_fit;w:=r-l;";
+
+def ignore_math_fit(expr left_adjustment,right_adjustment) = enddef;
+def do_math_fit(expr left_adjustment,right_adjustment) =
+ l:=l-hround(left_adjustment*hppp); interim xoffset:=-l;
+ charwd:=charwd+left_adjustment+right_adjustment;
+ r:=l+hround(charwd*hppp)-shrink_fit;
+ charic:=charic-right_adjustment;
+ if charic<0: charic:=0; fi enddef;
+def zero_width = charwd:=0; r:=l-shrink_fit enddef;
+def change_width = if not monospace: % change width by $\pm1$
+ if r+shrink_fit-l=floor(charwd*hppp): w:=w+1; r:=r+1;
+ else: w:=w-1; r:=r-1; fi fi enddef;
+def center_on(expr x) = if not monospace: % change width for symmetric fit
+ r:=r+2x-w; w:=2x; fi enddef;
+def padded expr del_sharp =
+ charht:=charht+del_sharp; chardp:=chardp+del_sharp enddef;
+
+def font_setup =
+ if monospace: let adjust_fit=mono_adjust_fit;
+  def mfudged=fudged enddef;
+  mono_charic#:=body_height#*slant;
+  if mono_charic#<0: mono_charic#:=0; fi
+  mono_charwd#:=9u#; define_whole_pixels(mono_charwd);
+ else: let adjust_fit=normal_adjust_fit;
+  def mfudged= enddef; fi
+ if math_fitting: let math_fit=do_math_fit
+ else: let math_fit=ignore_math_fit fi;
+ define_pixels(u,width_adj,serif_fit,cap_serif_fit,jut,cap_jut,beak,
+  bar_height,dish,bracket,beak_jut,stem_corr,vair_corr,apex_corr);
+ define_blacker_pixels(notch_cut,cap_notch_cut);
+ forsuffixes $=notch_cut,cap_notch_cut: if $<3: $:=3; fi endfor
+ define_whole_pixels(letter_fit,fine,crisp,tiny);
+ define_whole_vertical_pixels(body_height,asc_height,
+  cap_height,fig_height,x_height,comma_depth,desc_depth,serif_drop);
+ define_whole_blacker_pixels(thin_join,hair,stem,curve,flare,
+  dot_size,cap_hair,cap_stem,cap_curve);
+ define_whole_vertical_blacker_pixels(vair,bar,slab,cap_bar,cap_band);
+ define_corrected_pixels(o,apex_o);
+ forsuffixes $=hair,stem,cap_stem:
+  fudged$.#:=fudge*$.#; fudged$:=hround(fudged$.#*hppp+blacker);
+  forever: exitif fudged$>.9fudge*$; fudged$:=fudged$+1; endfor endfor
+ rule_thickness:=ceiling(rule_thickness#*hppp);
+ heavy_rule_thickness:=ceiling(3rule_thickness#*hppp);
+ oo:=vround(.5o#*hppp*o_correction)+eps;
+ apex_oo:=vround(.5apex_o#*hppp*o_correction)+eps;
+ lowres_fix(stem,curve,flare) 1.3;
+ lowres_fix(stem,curve) 1.2;
+ lowres_fix(cap_stem,cap_curve) 1.2;
+ lowres_fix(hair,cap_hair) 1.2;
+ lowres_fix(cap_band,cap_bar,bar,slab) 1.2;
+ stem':=hround(stem-stem_corr); cap_stem':=hround(cap_stem-stem_corr);
+ vair':=vround(vair+vair_corr);
+ vstem:=vround .8[vair,stem]; cap_vstem:=vround .8[vair,cap_stem];
+ ess:=(ess#/stem#)*stem; cap_ess:=(cap_ess#/cap_stem#)*cap_stem;
+ dw:=(curve#-stem#)*hppp; bold:=curve#*hppp+blacker;
+ dh#:=.6designsize;
+ stem_shift#:=if serifs: 2stem_corr# else: 0 fi;
+ more_super:=max(superness,sqrt .77superness);
+ hein_super:=max(superness,sqrt .81225258superness); % that's $2^{-.3}$
+ clear_pen_memory;
+ if fine=0: fine:=1; fi
+ forsuffixes $=fine,crisp,tiny:
+%%% fine $ %%%% temporary formatting convention for MFT
+  if $>fudged.hair: $:=fudged.hair; fi
+  $.breadth:=$;
+  pickup if $=0: nullpen else: pencircle scaled $; $:=$-eps fi;
+  $.nib:=savepen; breadth_[$.nib]:=$;
+  forsuffixes $$=lft,rt,top,bot: shiftdef($.$$,$$ 0); endfor endfor
+%%% @ $ %%%% restore ordinary formatting for $
+ min_Vround:=max(fine.breadth,crisp.breadth,tiny.breadth);
+ if min_Vround<vround min_Vround: min_Vround:=vround min_Vround; fi
+ if flare<vround flare: flare:=vround flare; fi
+ forsuffixes $=vair,bar,slab,cap_bar,cap_band,vair',vstem,cap_vstem,bold:
+  if $<min_Vround: $:=min_Vround; fi endfor
+ pickup pencircle scaled rule_thickness; rule.nib:=savepen;
+ math_axis:=good.y(math_axis#*hppp);
+ pickup pencircle scaled if hefty:(.6[vair,fudged.hair]) else:fudged.hair fi;
+ light_rule.nib:=savepen;
+ pickup pencircle xscaled cap_curve yscaled cap_hair rotated 30;
+ cal.nib:=savepen;
+ pair cal.extension; cal.extension:=(.75cap_curve,0) rotated 30;
+ pickup pencircle xscaled cap_curve yscaled cap_hair rotated 70;
+ tilted.nib:=savepen;
+ pickup pencircle xscaled curve yscaled cap_hair rotated 70;
+ med_tilted.nib:=savepen;
+ pickup pencircle xscaled cap_stem yscaled cap_hair rotated 30;
+ med_cal.nib:=savepen;
+ pickup pencircle xscaled stem yscaled cap_hair rotated 30;
+ light_cal.nib:=savepen;
+ pickup pencircle xscaled(cap_curve+dw) yscaled cap_hair rotated 30;
+ heavy_cal.nib:=savepen;
+ bot_flourish_line:=-.5u-o;
+ pair bend; bend=(.5u,0);
+ pair flourish_change; flourish_change=(4u,.2asc_height);
+ join_radius:=u;
+ currenttransform:=identity slanted slant
+  yscaled aspect_ratio scaled granularity;
+ if currenttransform=identity: let t_=relax
+ else: def t_ = transformed currenttransform enddef fi;
+ numeric paren_depth#; .5[body_height#,-paren_depth#]=math_axis#;
+ numeric asc_depth#; .5[asc_height#,-asc_depth#]=math_axis#;
+ body_depth:=desc_depth+body_height-asc_height;
+ shrink_fit:=1+hround(2letter_fit#*hppp)-2letter_fit;
+ if not string mode: if mode<=smoke: shrink_fit:=0; fi fi
+ enddef;
+
+def shiftdef(suffix $)(expr delta) =
+ vardef $ primary x = x+delta enddef enddef;
+
+def makebox(text rule) =
+ for y=0,asc_height,body_height,x_height,bar_height,-desc_depth,-body_depth:
+  rule((l,y)t_,(r,y)t_); endfor % horizontals
+ for x=l,r:   rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals
+ for x=u*(1+floor(l/u)) step u until r-1:
+  rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals
+ if charic<>0:
+  rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction
+ enddef;
+def maketicks(text rule) =
+ for y=0,h.o_,-d.o_:
+  rule((l,y),(l+10,y)); rule((r-10,y),(r,y)); endfor % horizontals
+ for x=l,r:
+  rule((x,10-d.o_),(x,-d.o_)); rule((x,h.o_-10),(x,h.o_)); endfor % verticals
+ if charic<>0:
+  rule((r+charic*pt,h.o_-10),(r+charic*pt,h.o_)); fi % italic correction
+ enddef;
+rulepen:=pensquare;
+
+vardef stroke text t =
+ forsuffixes e = l,r: path_.e:=t; endfor
+ if cycle path_.l:
+  errmessage "Beware: `stroke' isn't intended for cycles"; fi
+ path_.l -- reverse path_.r -- cycle enddef;
+
+vardef circ_stroke text t =
+ forsuffixes e = l,r: path_.e:=t; endfor
+ if cycle path_.l:
+  errmessage "Beware: `stroke' isn't intended for cycles"; fi
+ path_.l -- reverse path_.r .. cycle enddef;
+
+vardef super_arc.r(suffix $,$$) = % outside of super-ellipse
+ pair center,corner;
+ if y$=y$r: center=(x$$r,y$r); corner=(x$r,y$$r);
+ else: center=(x$r,y$$r); corner=(x$$r,y$r); fi
+ z$.r{corner-z$.r}...superness[center,corner]{z$$.r-z$.r}
+  ...{z$$.r-corner}z$$.r enddef;
+
+vardef super_arc.l(suffix $,$$) = % inside of super-ellipse
+ pair center,corner;
+ if y$=y$r: center=(x$$l,y$l); corner=(x$l,y$$l);
+ else: center=(x$l,y$$l); corner=(x$$l,y$l); fi
+ z$l{corner-z$l}...superness[center,corner]{z$$l-z$l}
+  ...{z$$l-corner}z$$l enddef;
+
+vardef pulled_super_arc.r(suffix $,$$)(expr superpull) =
+ pair center,corner;
+ if y$=y$r: center=(x$$r,y$r); corner=(x$r,y$$r);
+ else: center=(x$r,y$$r); corner=(x$$r,y$r); fi
+ z$r{corner-z$r}...superness[center,corner]{z$$r-z$r}
+  ...{z$$r-corner}z$$r enddef;
+
+vardef pulled_super_arc.l(suffix $,$$)(expr superpull) =
+ pair center,corner,outer_point;
+ if y$=y$r: center=(x$$l,y$l); corner=(x$l,y$$l);
+  outer_point=superness[(x$$r,y$r),(x$r,y$$r)];
+ else: center=(x$l,y$$l); corner=(x$$l,y$l);
+  outer_point=superness[(x$r,y$$r),(x$$r,y$r)]; fi
+ z$l{corner-z$l}
+  ...superpull[superness[center,corner],outer_point]{z$$l-z$l}
+  ...{z$$l-corner}z$$l enddef;
+
+vardef pulled_arc@#(suffix $,$$) =
+ pulled_super_arc@#($,$$)(superpull) enddef;
+
+vardef serif_arc(suffix $,$$) =
+ z${x$$-x$,0}...(.75[x$,x$$],.25[y$,y$$]){z$$-z$}...{0,y$$-y$}z$$ enddef;
+
+vardef penpos@#(expr b,d) =
+ if known b: if b<=0: errmessage "bad penpos"; fi fi
+ (x@#r-x@#l,y@#r-y@#l)=(b,0) rotated d;
+ x@#=.5(x@#l+x@#r); y@#=.5(y@#l+y@#r) enddef;
+
+newinternal currentbreadth;
+vardef pos@#(expr b,d) =
+ if known b: if b<=currentbreadth: errmessage "bad pos"; fi fi
+ (x@#r-x@#l,y@#r-y@#l)=(b-currentbreadth,0) rotated d;
+ x@#=.5(x@#l+x@#r); y@#=.5(y@#l+y@#r) enddef;
+def numeric_pickup_ primary q =
+ currentpen:=pen_[q];
+ pen_lft:=pen_lft_[q];  pen_rt:=pen_rt_[q];
+ pen_top:=pen_top_[q];  pen_bot:=pen_bot_[q];
+ currentpen_path:=pen_path_[q];
+ if known breadth_[q]: currentbreadth:=breadth_[q]; fi enddef;
+
+vardef ic# = charic enddef;
+vardef h# = charht enddef;
+vardef w# = charwd enddef;
+vardef d# = chardp enddef;
+
+let {{=begingroup; let }}=endgroup;
+def .... = .. tension atleast .9 .. enddef;
+def less_tense = save ...; let ...=.... enddef;
+def ?? = hide(showvariable x,y) enddef;
+
+let semi_ =;; let colon_ = :; let endchar_ = endchar;
+def iff expr b = if b:let next_=use_it else:let next_=lose_it fi; next_ enddef;
+def use_it = let : = restore_colon; enddef;
+def restore_colon = let : = colon_; enddef;
+def lose_it = let endchar=fi; inner cmchar; let ;=fix_ semi_ if false enddef;
+def fix_=let ;=semi_; let endchar=endchar_; outer cmchar; enddef;
+def always_iff = let : = endgroup; killboolean enddef;
+def killboolean text t = use_it enddef;
+outer cmchar;
index caf499ee4324cb082642b2e4973e0060d3c110ed..ff189fec01d0d5b9c7bcd340e3a43e4bf3afbc2a 100644 (file)
@@ -199,6 +199,7 @@ Mudela_note::str ()
     return name_str + Duration_convert::dur2_str (dur) + " ";
 
   String str;
     return name_str + Duration_convert::dur2_str (dur) + " ";
 
   String str;
+
   //ugh
   if (dur.plet_b ())
     str += String ("\\[")
   //ugh
   if (dur.plet_b ())
     str += String ("\\[")
index 5b326d966d6ff30153a9ddb11310efa72f4241b3..3c92577895a9c9ae7ff39ac5b51e6cf8ec814f75 100644 (file)
@@ -101,7 +101,7 @@ Mudela_staff::name_str()
 void
 Mudela_staff::output (Mudela_stream& mudela_stream_r)
 {
 void
 Mudela_staff::output (Mudela_stream& mudela_stream_r)
 {
-  mudela_stream_r << id_str() << " = \\melodic";
+  mudela_stream_r << id_str() << " = \\notes";
   mudela_stream_r <<  (mudela_voice_p_list_.size() > 1 ? "<" : "{");
   mudela_stream_r << '\n';
   mudela_stream_r << _ ("% midi copyright:") << copyright_str_ << '\n';
   mudela_stream_r <<  (mudela_voice_p_list_.size() > 1 ? "<" : "{");
   mudela_stream_r << '\n';
   mudela_stream_r << _ ("% midi copyright:") << copyright_str_ << '\n';
diff --git a/mutopia/D.Scarlatti/GNUmakefile b/mutopia/D.Scarlatti/GNUmakefile
new file mode 100644 (file)
index 0000000..2d7fc58
--- /dev/null
@@ -0,0 +1,10 @@
+# 
+
+depth = ../..
+
+examples=
+LOCALSTEPMAKE_TEMPLATES=mutopia
+
+include $(depth)/make/stepmake.make
+
+
index 6e12e84c647527a38bd5482cb0e8ff2e1f6125f8..ef9ffc6a94c68e244476291d940fb8f08fe56d74 100644 (file)
@@ -2,7 +2,7 @@
 
 depth = ..
 
 
 depth = ..
 
-SUBDIRS = J.S.Bach Coriolan W.A.Mozart F.Schubert D.Zipoli Hymns
+SUBDIRS = J.S.Bach Coriolan W.A.Mozart F.Schubert D.Zipoli Hymns D.Scarlatti
 
 examples= gallina
 LOCALSTEPMAKE_TEMPLATES=mutopia
 
 examples= gallina
 LOCALSTEPMAKE_TEMPLATES=mutopia
index 080cdef0210a90d9575e5904f451036b5ad76dec..229e4165cd0b12abeef864f206ce7e9770afd5ca 100644 (file)
@@ -18,13 +18,16 @@ global =
        \notes {
        \time 4/4;                % should be \time C
        }
        \notes {
        \time 4/4;                % should be \time C
        }
-       
+
+
+beamkludge = \property Voice. stemLeftBeamCount = "1"
+
 tenor =
        \notes \relative c' {
        \clef "violin";
 
        \stemdown
 tenor =
        \notes \relative c' {
        \clef "violin";
 
        \stemdown
-       r8 [c8 d e] [f. g32 f] [e8 a] |
+       r8 [c8 d e] [f. \beamkludge g32 f] [e8 a] |
        [d, g] ~ [g16 a g f] [e f e d] [c d c b ] |
        [a 8 fis'] g4 ~ [g8 fis16 e] [f8 d] |
        [g f! e d] c r r g' ~ |
        [d, g] ~ [g16 a g f] [e f e d] [c d c b ] |
        [a 8 fis'] g4 ~ [g8 fis16 e] [f8 d] |
        [g f! e d] c r r g' ~ |
@@ -33,20 +36,20 @@ tenor =
        [c8 f] r16 [g f e] [f8 d] g4 ~ |
        g4 r4 r2 |
        r1 |
        [c8 f] r16 [g f e] [f8 d] g4 ~ |
        g4 r4 r2 |
        r1 |
-       r8 [g8 a b] [c . d 32 c ] [b8 e ]
+       r8 [g8 a b] [c .  \beamkludge d 32 c ] [b8 e ]
 %% 10
        [a, d ] ~ [d 16 e  d  c ] b8 r8 r d, |
 %% 10
        [a, d ] ~ [d 16 e  d  c ] b8 r8 r d, |
-       [e fis] [g. a32 g] [fis8 b e, a] ~ |
+       [e fis] [g.  \beamkludge a32 g] [fis8 b e, a] ~ |
        [a16 b a gis] [fis8 f!] [e d] ~ [d16 e fis gis] |
        [a gis a b] [gis fis gis a] b8 r8 r4 |
        [a16 b a gis] [fis8 f!] [e d] ~ [d16 e fis gis] |
        [a gis a b] [gis fis gis a] b8 r8 r4 |
-       r8 [c,8 d e] \stemup [f. g32 f] [e8 a] |
+       r8 [c,8 d e] \stemup [f. \beamkludge g32 f] [e8 a] |
 %% 15
        [d, g] ~ [g16 a g f] e8 \stemdown [e fis g] ~ |
        [g8 fis] [gis8 a] ~ [a g! a b] |
        \stemboth
 %% 15
        [d, g] ~ [g16 a g f] e8 \stemdown [e fis g] ~ |
        [g8 fis] [gis8 a] ~ [a g! a b] |
        \stemboth
-       [c . 32 c ] [b8 e ] [a, d ] ~ [d 16 e  d  c ] |
+       [c .  \beamkludge  d32 c ] [b8 e ] [a, d ] ~ [d 16 e  d  c ] |
        [b8 g'  cis,  d ] [e  cis  d  e  ] |
        [b8 g'  cis,  d ] [e  cis  d  e  ] |
-       \stemdown a,8 r8 r e [fis g] \stemboth [a. b32 a] |
+       \stemdown a,8 r8 r e [fis g] \stemboth [a. \beamkludge b32 a] |
 %% 20
        [g8 c  fis, b] ~ [b16 c  b a] \stemdown [g fis e d] \stemboth |
        e4 \stemdown d ~ [d16 a' g f!] [e g f! a] |
 %% 20
        [g8 c  fis, b] ~ [b16 c  b a] \stemdown [g fis e d] \stemboth |
        e4 \stemdown d ~ [d16 a' g f!] [e g f! a] |
@@ -54,7 +57,7 @@ tenor =
        \stemboth g4. f8 ~ [f e] d4 |
        \stemdown e8 a4 g8 ~ [g8 f g a] |
 %% 25
        \stemboth g4. f8 ~ [f e] d4 |
        \stemdown e8 a4 g8 ~ [g8 f g a] |
 %% 25
-       [bes8. 32 b] [a8 d ] [g, c ] ~ [c 16 d  c  bes] |
+       [bes8. \beamkludge c32 b] [a8 d ] [g, c ] ~ [c 16 d  c  bes] |
        [a bes a g] [f g f e] d4 ~ [d8. g16] |
        a4 r16 [f' 16 d 8] e 2 |
        }
        [a bes a g] [f g f e] d4 ~ [d8. g16] |
        a4 r16 [f' 16 d 8] e 2 |
        }
@@ -66,12 +69,12 @@ soprane =
        \stemup
        r1 |
        r2 r8 [g'8 a b] |
        \stemup
        r1 |
        r2 r8 [g'8 a b] |
-       [c . 32 c ] [b8 e ] [a, d ] ~ [d 16 e  d  c ] |
+       [c . \beamkludge d32 c ] [b8 e ] [a, d ] ~ [d 16 e  d  c ] |
        [b g a b] [c  b c  d ] [e  d  e  fis ] [g 8 b,] |
 %% 5
        [c  a] [d 16 c  b a] [g8. g16] [f e f g] |
        [a g a b] c 2 b4 |
        [b g a b] [c  b c  d ] [e  d  e  fis ] [g 8 b,] |
 %% 5
        [c  a] [d 16 c  b a] [g8. g16] [f e f g] |
        [a g a b] c 2 b4 |
-       r8 [c8 d e] [f. g32 f] [e8 a] |
+       r8 [c8 d e] [f. \beamkludge g32 f] [e8 a] |
        [d, g] ~ [g16 a g f] [e8 a] ~ [a16 b a g] |
        f2 [e8. fis16] g4 ~
 %% 10
        [d, g] ~ [g16 a g f] [e8 a] ~ [a16 b a g] |
        f2 [e8. fis16] g4 ~
 %% 10
@@ -82,19 +85,19 @@ soprane =
        a 4 r4 r2 |
 %% 15
        r2 r8 [g 8 a  b ] |
        a 4 r4 r2 |
 %% 15
        r2 r8 [g 8 a  b ] |
-       [c8. d32 c] [b 8 c] [d e] [f!. g32 f!] |
+       [c8. \beamkludge d32 c] [b 8 c] [d e] [f!. \beamkludge g32 f!] |
        [e8 a d, g] ~ [g16 a g f] [e8 a] |
        [e8 a d, g] ~ [g16 a g f] [e8 a] |
-       [d,8 bes'] [a g16 f] [g f g e] [f g g f32 g] |
+       [d,8 bes'] [a g16 f] [g f g e] [f g g \beamkludge f32 g] |
        [a16 cis, d g] [e8. d16] d8 r8 r4 |
 %% 20
        r2 r4 r8 g,  |
        [a16 cis, d g] [e8. d16] d8 r8 r4 |
 %% 20
        r2 r4 r8 g,  |
-       [a  b ] [c. d32 c] [b 8 e a,  d] ~ |
+       [a  b ] [c. \beamkludge d32 c] [b 8 e a,  d] ~ |
        [e16 e d c] [b  c d e] [f g a g] [f e d c] |
        b 4 [c,8 d] g  c4 b 8 |
        c4 [b 8 bes 8] a  d4 c8 |
 %% 25
        [d8 e] f4 ~ [f16 a g f] [e f e d] |
        [e16 e d c] [b  c d e] [f g a g] [f e d c] |
        b 4 [c,8 d] g  c4 b 8 |
        c4 [b 8 bes 8] a  d4 c8 |
 %% 25
        [d8 e] f4 ~ [f16 a g f] [e f e d] |
-       c2 r16 [g 32 a  b !16 c] [d e f8] ~ |
+       c2 r16 [g32 a  b !16 c] [d e f8] ~ |
        [f32 c d e f16 g] [a8. b16] <g2 c 2> |
        }
 
        [f32 c d e f16 g] [a8. b16] <g2 c 2> |
        }
 
@@ -107,31 +110,31 @@ alt =
        r1 |
        r |
        r |
        r1 |
        r |
        r |
-       r8 [g'8 a b] [c . 32 c ] [b8 e ] |
+       r8 [g'8 a b] [c . \beamkludge d32 c ] [b8 e ] |
 %% 5
        [a, d ] ~ [d 16 e  d  c ] [b8 c  ~ c  bes8] |
        [a d  g, c ] r16 [a16 b c ] d 4 |
 %% 5
        [a, d ] ~ [d 16 e  d  c ] [b8 c  ~ c  bes8] |
        [a d  g, c ] r16 [a16 b c ] d 4 |
-       g,4 r8 g8 [a b] [c . 32 c ] |
+       g,4 r8 g8 [a b] [c . \beamkludge d32 c ] |
        [b8 e  a, d ] ~ [d 16 e  d  c !] [b!8 e ] ~ |
        e 4 d 4 [c 16 b c  a] [e'  d  c  b] |
 %% 10
        [c 16 a b c ] [d  c  b a] g4 r4 |
        r1 |
        [b8 e  a, d ] ~ [d 16 e  d  c !] [b!8 e ] ~ |
        e 4 d 4 [c 16 b c  a] [e'  d  c  b] |
 %% 10
        [c 16 a b c ] [d  c  b a] g4 r4 |
        r1 |
-       r8 [e8 fis gis] [a. b32 a] [gis8 c ] |
+       r8 [e8 fis gis] [a. \beamkludge b32 a] [gis8 c ] |
        [fis, b] ~ [b16 c  b a] gis8 a4 gis8 |
        [fis, b] ~ [b16 c  b a] gis8 a4 gis8 |
-       a4 r8 g8 [a b] c . [d 32 c ] |
+       a4 r8 g8 [a b] c . [d32 c ] |
 %% 15
        [b8 e  a, d ] ~ [d'  g,] d 4 |
        [c 8 a] e' 4 d 8 r8 r4 |
 %% 15
        [b8 e  a, d ] ~ [d'  g,] d 4 |
        [c 8 a] e' 4 d 8 r8 r4 |
-       r8 [a8 b cis ] [d . 32 d ] [c !8 f ] |
+       r8 [a8 b cis ] [d . \beamkludge e32 d ] [c !8 f ] |
        [b,8 e ] ~ [e 16 f  e  d ] cis 8 r8 r4 |
        [b,8 e ] ~ [e 16 f  e  d ] cis 8 r8 r4 |
-       r8 [a8 b cis ] [d . 32 d ] [c !8 fis ] |
+       r8 [a8 b cis ] [d . \beamkludge e32 d ] [c !8 fis ] |
 %% 20
        [b, e ] ~ [e 16 fis  e  d ] c 2 ~ |
        [c 16 d  c  b] [a g a fis] [g8 b c  d ] |
 %% 20
        [b, e ] ~ [e 16 fis  e  d ] c 2 ~ |
        [c 16 d  c  b] [a g a fis] [g8 b c  d ] |
-       [e . 32 e ] [d 8 g ] [c,  f ] ~ [f 16 g  f  e ] |
+       [e . \beamkludge f32 e ] [d 8 g ] [c,  f ] ~ [f 16 g  f  e ] |
        d 4 [e 8 d ] ~ [d  g,] g4 ~
        d 4 [e 8 d ] ~ [d  g,] g4 ~
-       [g8 c, d e] [f. g32 f] [e8 a] |
+       [g8 c, d e] [f. \beamkludge g32 f] [e8 a] |
 %% 25
        [d, g] ~ [g16 a g f] [e d e f] [g a bes g] |
        [a e f g] [a b c  a] b2 |
 %% 25
        [d, g] ~ [g16 a g f] [e d e f] [g a bes g] |
        [a e f g] [a b c  a] b2 |
@@ -150,21 +153,21 @@ bass =
        r |
 %% 5
        r2 r8 [c8 d e] |
        r |
 %% 5
        r2 r8 [c8 d e] |
-       [f. g32 f] [e8 a] [d, g] ~ [g16 a g f] |
+       [f. \beamkludge g32 f] [e8 a] [d, g] ~ [g16 a g f] |
        [e f e d] [c d c b ] [a' 8 d a fis] |
        [g16 a bes g] [cis,8 d] a'4 e4 |
        [a16 b c  d ] [c  b a g] c 8 r8 r4 |
 %% 10
        r2 r8 [g, 8 a  b ] |
        [e f e d] [c d c b ] [a' 8 d a fis] |
        [g16 a bes g] [cis,8 d] a'4 e4 |
        [a16 b c  d ] [c  b a g] c 8 r8 r4 |
 %% 10
        r2 r8 [g, 8 a  b ] |
-       [c. d32 c] [b 8 e] [a,  d] ~ [d16 e d c] |
+       [c. \beamkludge d32 c] [b 8 e] [a,  d] ~ [d16 e d c] |
        b 8 e4 d8 c f!4 e8 ~ |
        e d4 e8 [f! e16 d] e4 |
        a, 4 r4 r2 |
 %% 15
        b 8 e4 d8 c f!4 e8 ~ |
        e d4 e8 [f! e16 d] e4 |
        a, 4 r4 r2 |
 %% 15
-       r8 [g 8 a  b ] [c. d32 c] [b 8 e] |
+       r8 [g 8 a  b ] [c. \beamkludge d32 c] [b 8 e] |
        [a, 8 d] ~ [d16 e d c] [b 8 bes  a  g'' ] |
        [a,, 8 fis' g e] d4 [e8 f!] |
        [a, 8 d] ~ [d16 e d c] [b 8 bes  a  g'' ] |
        [a,, 8 fis' g e] d4 [e8 f!] |
-       [g8. a32 g] [f8 bes] [e, a] ~ [a16 bes a g] |
+       [g8. \beamkludge a32 g] [f8 bes] [e, a] ~ [a16 bes a g] |
        [f e f d] [g8 a] d,2 ~ |
 %% 20
        [d16 e d c] [b  a  g  fis ] [e' 8 e fis g] ~ |
        [f e f d] [g8 a] d,2 ~ |
 %% 20
        [d16 e d c] [b  a  g  fis ] [e' 8 e fis g] ~ |
@@ -195,7 +198,7 @@ bass =
 
        \paper{
        gourlay_maxmeasures =5.;
 
        \paper{
        gourlay_maxmeasures =5.;
-       castingalgorithme = \Wordwrap
+       castingalgorithme = \Wordwrap;
        }
 %      \midi { \tempo 4 = 84; }
 }
        }
 %      \midi { \tempo 4 = 84; }
 }
index 00b857b638e53a5ede8631971c2de6ea0c812e30..3c31452ff7e81a8a30b4f65555a08543e9e84869 100644 (file)
@@ -27,7 +27,8 @@ global = \notes {
 dux = \notes \relative c'' {
   \clef violin;
 
 dux = \notes \relative c'' {
   \clef violin;
 
-  \stemdown
+  \property Voice.ydirection = "-1"
+  
   r8 [c16 b] [c8 g] [as c16 b] [c8 d ] |
   [g, c16 b] [c8 d ] [f,16 g] as4 [g16 f] |
   [es c'  b a] [g f! es d] [c8 es'  d  c ] |
   r8 [c16 b] [c8 g] [as c16 b] [c8 d ] |
   [g, c16 b] [c8 d ] [f,16 g] as4 [g16 f] |
   [es c'  b a] [g f! es d] [c8 es'  d  c ] |
index 2085fe20f9b0b3d1de7c6f1067920fc89551c3be..2b7c61bb4619b3bfb11f4f7378765da6cde883c6 100644 (file)
@@ -78,9 +78,6 @@
 (define (settypewriter s) (text "typewriter" s))
 (define (setnumber s) (text "number" s))
 (define (setbold s) (text "bold" s))
 (define (settypewriter s) (text "typewriter" s))
 (define (setnumber s) (text "number" s))
 (define (setbold s) (text "bold" s))
-(define (setlarge s) (text "large" s))
-(define (setLarge s) (text "Large" s))
-(define (setmark s) (text "mark" s))
 (define (setfinger s) (text "finger" s))
 (define (setitalic s) (text "italic" s))
 (define (setnumber-1 s) (text "numberj" s))
 (define (setfinger s) (text "finger" s))
 (define (setitalic s) (text "italic" s))
 (define (setnumber-1 s) (text "numberj" s))
   (define (invoke-dim1 s d)
     (string-append
      "\n\\" s "{" (number->dim d) "}"))
   (define (invoke-dim1 s d)
     (string-append
      "\n\\" s "{" (number->dim d) "}"))
-
+  (define (pt->sp x)
+    (* 65536 x))
+  
   ;;
   ;; need to do something to make this really safe.
   ;;
   ;;
   ;; need to do something to make this really safe.
   ;;
 
   (define (number->dim x)
     (string-append 
 
   (define (number->dim x)
     (string-append 
-     (number->string (chop-decimal x)) "pt "))
+     (number->string  (chop-decimal x)) "pt "))
 
   (define (placebox x y s) 
     (string-append 
 
   (define (placebox x y s) 
     (string-append 
index b051fef3d5087a0b4c1c5327a23c49dbf43dc911..7c36e368e6dcb4d5488966d5246e14587d55abe5 100644 (file)
@@ -14,7 +14,7 @@ Output: DVI file
 """
 
 name = 'ly2dvi'
 """
 
 name = 'ly2dvi'
-version = '0.0.7'
+version = '0.0.9'
 errorlog = ''
 
 import sys
 errorlog = ''
 
 import sys
@@ -370,7 +370,7 @@ class Properties:
         # init          Initial default values
         # file          The values found in the lilypond generated TeX files
         # environment   Envrionment variables LILYINCLUDE, LILYPONDPREFIX
         # init          Initial default values
         # file          The values found in the lilypond generated TeX files
         # environment   Envrionment variables LILYINCLUDE, LILYPONDPREFIX
-        # rcfile        $LILYPONDPREFIX/share/lilypond/.lilyrc
+        # rcfile        $LILYPONDPREFIX/.lilyrc
         # rcfile        $HOME/.lilyrc
         # rcfile        ./.lilyrc
         # commandline   command line arguments
         # rcfile        $HOME/.lilyrc
         # rcfile        ./.lilyrc
         # commandline   command line arguments
@@ -424,7 +424,7 @@ class Properties:
             p=os.path.split(p[0])
            # bit silly. for ly2dvi, overrules compiled-in datadir...
            # how to do this better (without running lily, of course?
             p=os.path.split(p[0])
            # bit silly. for ly2dvi, overrules compiled-in datadir...
            # how to do this better (without running lily, of course?
-            this.setRoot(p[0] + '/share/lilypond', 'init')
+            this.setRoot(os.path.join(p[0],'share','lilypond'), 'init')
 
         if not os.environ.has_key('HOME'):
             if os.environ.has_key('HOMEDRIVE') and \
 
         if not os.environ.has_key('HOME'):
             if os.environ.has_key('HOMEDRIVE') and \
@@ -445,15 +445,15 @@ class Properties:
 
         t=''
        if os.environ.has_key ('TEXINPUTS'):
 
         t=''
        if os.environ.has_key ('TEXINPUTS'):
-               t = os.pathsep + os.environ['TEXINPUTS']
-        os.environ['TEXINPUTS'] = os.path.join(this.get('root'), 'share',
-                                              'lilypond', 'tex' ) + t
+               t = os.environ['TEXINPUTS'] + os.pathsep
+        os.environ['TEXINPUTS'] = t + \
+       os.path.join(this.get('root'), 'tex' ) + \
+       os.pathsep + os.path.join(this.get('root'), 'ps' )
 
         t=''
        if os.environ.has_key ('MFINPUTS'):
 
         t=''
        if os.environ.has_key ('MFINPUTS'):
-               t = os.pathsep + os.environ['MFINPUTS']
-        os.environ['MFINPUTS'] = os.path.join(this.get('root'), 'share',
-                                              'lilypond', 'mf' ) + t
+               t = os.environ['MFINPUTS'] + os.pathsep
+        os.environ['MFINPUTS'] = t + os.path.join(this.get('root'), 'mf' )
 
         if os.environ.has_key('TMP'):
             this.__set('tmp',os.environ['TMP'],'environment')
 
         if os.environ.has_key('TMP'):
             this.__set('tmp',os.environ['TMP'],'environment')
@@ -507,8 +507,7 @@ class Properties:
         """
 
         if os.name == 'nt':
         """
 
         if os.name == 'nt':
-            path = os.path.join(this.get('root'), 'share', 'lilypond',
-                                'tex', var)
+            path = os.path.join(this.get('root'), 'tex', var)
         else:
             path =''
             cmd =('kpsewhich tex %s %s' % (var,errorlog))
         else:
             path =''
             cmd =('kpsewhich tex %s %s' % (var,errorlog))
@@ -516,8 +515,7 @@ class Properties:
             path = pipe.readline ()[:-1] # chop off \n
             return_status =  pipe.close()
             if return_status and not path:
             path = pipe.readline ()[:-1] # chop off \n
             return_status =  pipe.close()
             if return_status and not path:
-                path = os.path.join(this.get('root'), 'share', 'lilypond',
-                                    'tex', var)
+                path = os.path.join(this.get('root'), 'tex', var)
        fd = open(path, 'r')
         return fd
 
        fd = open(path, 'r')
         return fd
 
@@ -556,7 +554,7 @@ class Properties:
         else: # Windows apps like edit choke on .lilyrc
             dotFilename='_lilyrc'
 
         else: # Windows apps like edit choke on .lilyrc
             dotFilename='_lilyrc'
 
-       for d in [os.path.join(this.get('root'),'share','lilypond','ly'), \
+       for d in [os.path.join(this.get('root'),'ly'), \
                   os.environ['HOME'], os.curdir ]:
            file=os.path.join(d,dotFilename)
            try:
                   os.environ['HOME'], os.curdir ]:
            file=os.path.join(d,dotFilename)
            try:
index 01156c40eced6a3e42b8c892b09d05079683fc89..a828ed9907877aaa257ca888eae9ddf5488204b2 100644 (file)
@@ -1,3 +1,7 @@
+dnl WARNING WARNING WARNING WARNING
+dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
+dnl WARNING WARNING WARNING WARNING
+dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
 dnl aclocal.m4   -*-shell-script-*-
 dnl StepMake subroutines for configure.in
 
 dnl aclocal.m4   -*-shell-script-*-
 dnl StepMake subroutines for configure.in
 
@@ -143,13 +147,13 @@ AC_DEFUN(AC_STEPMAKE_END, [
 AC_DEFUN(AC_STEPMAKE_GXX, [
     # ugh autoconf
     changequote(<<, >>)dnl
 AC_DEFUN(AC_STEPMAKE_GXX, [
     # ugh autoconf
     changequote(<<, >>)dnl
-    if $CXX --version | grep '2\.[78]' > /dev/null ||
+    if $CXX --version | grep '2\.8' > /dev/null ||
        $CXX --version | grep 'egcs' > /dev/null
     changequote([, ])dnl
     then
            true
     else
        $CXX --version | grep 'egcs' > /dev/null
     changequote([, ])dnl
     then
            true
     else
-           AC_STEPMAKE_WARN(can\'t find g++ 2.7, 2.8 or egcs)
+           AC_STEPMAKE_WARN(can\'t find g++ 2.8 or egcs)
     fi
 ])
 
     fi
 ])
 
@@ -158,17 +162,19 @@ AC_DEFUN(AC_STEPMAKE_GUILE, [
     # others need readline, dl (or even more)
     # urg, must check for different functions in libguile
     # to force new check iso reading from cache
     # others need readline, dl (or even more)
     # urg, must check for different functions in libguile
     # to force new check iso reading from cache
-    AC_CHECK_LIB(guile, scm_shell, \
+
+    # gh_scm2doubles,gh_doubles2scm are new in 1.3
+    AC_CHECK_LIB(guile, gh_scm2doubles, \
       LIBS="-lguile $LIBS"; AC_DEFINE(HAVE_LIBGUILE), \
       AC_CHECK_LIB(readline, readline) \
       AC_CHECK_LIB(dl, dlopen) \
       AC_CHECK_LIB(socket, socket)\
       AC_CHECK_LIB(termcap,tgetent)\
       AC_CHECK_LIB(m, fabs)\
       LIBS="-lguile $LIBS"; AC_DEFINE(HAVE_LIBGUILE), \
       AC_CHECK_LIB(readline, readline) \
       AC_CHECK_LIB(dl, dlopen) \
       AC_CHECK_LIB(socket, socket)\
       AC_CHECK_LIB(termcap,tgetent)\
       AC_CHECK_LIB(m, fabs)\
-      AC_CHECK_LIB(guile, scm_boot_guile)\
+      AC_CHECK_LIB(guile, gh_doubles2scm)\
     )
     )
-    if test "$ac_cv_lib_guile_scm_shell" != yes -a \
-      "$ac_cv_lib_guile_scm_boot_guile" != yes ; then
+    if test "$ac_cv_lib_guile_gh_scm2doubles" != yes -a \
+      "$ac_cv_lib_guile_gh_doubles2scm" != yes ; then
            AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
     fi
 ])
            AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
     fi
 ])
index 45574a1824884ab04386b845ee18f98a380d1c81..c766cab549e66b849398468f0399ac0691594c94 100644 (file)
@@ -63,7 +63,7 @@ fi
 #
 # Post install clean up
 #
 #
 # Post install clean up
 #
-CYGWIN_LIB=$PACKAGE_ROOTDIR/distfiles/winnt/cygwinb19.dll
+CYGWIN_LIB=$PACKAGE_ROOTDIR/distfiles/winnt/cygwin1.dll
 if [ ! -e $CYGWIN_LIB ]; then
     echo "Unable to locate $CYGWIN_LIB"
     exit 1
 if [ ! -e $CYGWIN_LIB ]; then
     echo "Unable to locate $CYGWIN_LIB"
     exit 1
index 193830eee036973c69daa24ce1afcfabe4d9758b..c66a7aa4bc3832581699bbcbd64f05414a373787 100644 (file)
@@ -135,7 +135,7 @@ $(outdir)/version.hh: $(outdir)/VERSION
 
 # should this be in Rules?
 configure: configure.in aclocal.m4
 
 # should this be in Rules?
 configure: configure.in aclocal.m4
-       autoconf - < $<> $@
+       autoconf 
        chmod +x configure
 
 localclean:
        chmod +x configure
 
 localclean: