]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 0.0.78 release/0.0.78
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 30 Jul 1997 21:45:03 +0000 (23:45 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 30 Jul 1997 21:45:03 +0000 (23:45 +0200)
203 files changed:
.version [deleted file]
ANNOUNCE
AUTHORS.text
BUGS
Documentation/AUTHORS.pod
Documentation/CodingStyle.pod
Documentation/Makefile
Documentation/Rules.make
Documentation/index.pod
Documentation/lilyliterature.pod
Documentation/links.pod
Documentation/mudela-course.doc
Documentation/mudela-man.doc
NEWS
TODO
VERSION [new file with mode: 0644]
bin/Makefile
bin/conflily
bin/convert-mudela [deleted file]
bin/convert-mudela.in [new file with mode: 0644]
bin/genheader [deleted file]
bin/genheader.in [new file with mode: 0644]
bin/make-version
bin/make-website [deleted file]
bin/make-website.in [new file with mode: 0644]
bin/mudela-book [deleted file]
bin/mudela-book.in [new file with mode: 0644]
bin/release
bin/show-latest [deleted file]
bin/show-latest.in [new file with mode: 0644]
configure
configure.in
flower/.version [deleted file]
flower/Makefile
flower/NEWS
flower/VERSION [new file with mode: 0644]
flower/choleski.cc
flower/configure
flower/configure.in
flower/diagonal-storage.cc [new file with mode: 0644]
flower/full-storage.cc
flower/include/Makefile
flower/include/choleski.hh
flower/include/diagonal-storage.hh [new file with mode: 0644]
flower/include/flower-debug.hh
flower/include/full-storage.hh
flower/include/matrix-storage.hh
flower/include/matrix.hh
flower/include/virtual-methods.hh
flower/matrix-debug.cc
flower/matrix-storage.cc [new file with mode: 0644]
flower/matrix.cc
flower/string-convert.cc
flower/test/Makefile
flower/test/mat-test.cc [new file with mode: 0644]
init/Makefile
init/bare.ly [deleted file]
init/engraver.ly
init/midi.ly
init/paper16.ly
init/performer.ly
init/table16.ly
input/beams.ly
input/cadenza.ly
input/collisions.ly
input/coriolan-alto.ly
input/error.ly [deleted file]
input/multi.ly
input/scsii-menuetto.ly
input/slurs.ly
input/standchen.ly
input/toccata-fuga-E.ly
input/wohltemperirt.ly
lily/.version [deleted file]
lily/Makefile
lily/VERSION [new file with mode: 0644]
lily/crescendo.cc
lily/debug.cc
lily/engraver-group.cc
lily/include/bar-grav.hh
lily/include/bar.hh
lily/include/beam.hh
lily/include/bow.hh
lily/include/break-align-item.hh
lily/include/clef-grav.hh
lily/include/clef-item.hh
lily/include/collision-grav.hh
lily/include/collision.hh
lily/include/const.hh
lily/include/crescendo.hh
lily/include/dynamic-grav.hh
lily/include/elem-group-item.hh
lily/include/elem-group.hh
lily/include/engraver-group.hh
lily/include/engraver.hh
lily/include/general-script-def.hh
lily/include/global-translator.hh
lily/include/head-column.hh
lily/include/head-grav.hh
lily/include/horizontal-align-item.hh
lily/include/identifier.hh
lily/include/ineq-constrained-qp.hh [new file with mode: 0644]
lily/include/item.hh
lily/include/key-grav.hh
lily/include/key-item.hh
lily/include/key-performer.hh
lily/include/line-group-grav.hh
lily/include/local-key-grav.hh
lily/include/local-key-item.hh
lily/include/lyric-engraver.hh
lily/include/lyric-performer.hh
lily/include/meter-grav.hh
lily/include/meter-performer.hh
lily/include/meter.hh
lily/include/midi-item.hh
lily/include/music-iterator.hh
lily/include/music-list.hh
lily/include/music.hh
lily/include/note-column-grav.hh
lily/include/note-column.hh
lily/include/note-head.hh
lily/include/note-performer.hh
lily/include/performer-group-performer.hh
lily/include/performer.hh
lily/include/qlp.hh
lily/include/qlpsolve.hh
lily/include/request.hh
lily/include/rest-collision-grav.hh
lily/include/rest-collision.hh
lily/include/rest-column.hh
lily/include/score-align-grav.hh
lily/include/score-elem.hh
lily/include/score-grav.hh
lily/include/score-halign-grav.hh
lily/include/score-performer.hh
lily/include/scoreline.hh
lily/include/script-column.hh
lily/include/script-def.hh
lily/include/script-grav.hh
lily/include/script.hh
lily/include/slur-grav.hh
lily/include/slur.hh
lily/include/span-bar-grav.hh
lily/include/span-bar.hh
lily/include/span-score-bar-grav.hh
lily/include/span-score-bar.hh
lily/include/spanner-elem-group.hh
lily/include/spanner.hh
lily/include/staff-performer.hh
lily/include/staff-side.hh
lily/include/staff-sym-grav.hh
lily/include/staff-sym.hh
lily/include/staffline.hh
lily/include/stem-beam-grav.hh
lily/include/stem.hh
lily/include/super-elem.hh
lily/include/swallow-grav.hh
lily/include/swallow-perf.hh
lily/include/text-def.hh
lily/include/text-grav.hh
lily/include/text-item.hh
lily/include/text-spanner.hh
lily/include/tie-grav.hh
lily/include/tie.hh
lily/include/translator.hh
lily/include/vertical-align-elem.hh
lily/include/vertical-align-grav.hh
lily/include/vertical-align-spanner.hh
lily/include/voice-group-gravs.hh
lily/include/voice-group-performer.hh [deleted file]
lily/ineq-constrained-qp.cc [new file with mode: 0644]
lily/item.cc
lily/lyric-grav.cc
lily/meter-performer.cc
lily/midi-item.cc
lily/midi-stream.cc
lily/music-iterator.cc
lily/parser.y
lily/qlp.cc
lily/qlpsolve.cc
lily/score-align-gravs.cc
lily/score-performer.cc
lily/staff-performer.cc
lily/template4.cc
lily/template5.cc
lily/tex-slur.cc
lily/voice-group-performer.cc [deleted file]
make/Configure_variables.make.in
make/Makefile
make/Targets.make
make/Template.make
make/Toplevel.make.in
make/Variables.make
make/lilypond.lsm
make/lilypond.lsm.in
make/lilypond.spec
make/lilypond.spec.in
mi2mu/.version [deleted file]
mi2mu/Makefile
mi2mu/VERSION [new file with mode: 0644]
mi2mu/midi-event.cc
mi2mu/my-midi-lexer.cc
tex/dimen.tex

diff --git a/.version b/.version
deleted file mode 100644 (file)
index 623bd9d..0000000
--- a/.version
+++ /dev/null
@@ -1,7 +0,0 @@
-TOPLEVEL_MAJOR_VERSION = 0
-TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 77
-# use to send patches, always empty for released version:
-# include separator: ".postfix", "-pl" makes rpm barf
-
-TOPLEVEL_MY_PATCH_LEVEL = .jcn1
index aadfe22abd5f46c222bd9ca5a57bad358978e0d1..a904214579af0ec325016dadd6f3dec5891d4857 100644 (file)
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,28 +1,31 @@
-       We are proud to announce the birth of "GNU LilyPond 0.1", a.k.a.
+Subject: LilyPond 0.1 released - GNU Project music typesetter
 
-               Lily 0.1
 
-       born August 1, 1997
+       BORN
+
+       August 1, 1997
+
+               Lily
+
+               (GNU LilyPond 0.1)
 
        daughter to Jan 'Janneke' Nieuwenhuizen and Han-Wen 'Wendy'
        Nienhuys
 
-Lily is a healthy, bouncing baby weighing 335 kilobytes
+Lily is a healthy, bouncing baby weighing 340 kilobytes
 
 Visiting hours: 24hrs a day at
 
-
        ftp://pcnov095.win.tue.nl/pub/lilypond/lilypond-0.1.0.tar.gz (Europe)
        ftp://alpha.gnu.ai.mit.edu/pub/lilypond/lilypond-0.1.0.tar.gz (US)
 
-you can see some babyfood, diapers and pictures at
+You can see some babyfood, diapers and pictures at
 
        http://www.stack.nl/~hanwen/lilypond/index.html
 
 You can send your congratulations to Janneke (jan@digicash.com) and
 Wendy (hanwen@stack.nl)
 
-
 [ And now the serious part ]
 
        Announcing
index a8c72e7a1200310c431986c884929ea302aeafde..5670db31ae600f44307d39495630d91a3d223c23 100644 (file)
@@ -36,6 +36,8 @@ C\bC\bC\bCO\bO\bO\bON\bN\bN\bNT\bT\bT\bTR\bR\bR\bRI\bI\bI\bIB\bB\bB\bBU\bU\bU\bUT\bT\bT\bTO\bO\bO\bOR\bR\bR\bRS\bS
        +\bo   Werner Lemberg <xlwy01@uxp1.hrz.uni-dortmund.de>, misc
            bugfixes, some Beam and Stem code.
 
+       +\bo   Alexandre Oliva <oliva@dcc.unicamp.br>
+
        Your name could be here! If you want to help, then take a
        look at the SMALLISH PROJECTS section of in the file _\bT_\bO_\bD_\bO.
        Some do not involve coding C++
@@ -59,8 +61,6 @@ C\bC\bC\bCO\bO\bO\bON\bN\bN\bNT\bT\bT\bTR\bR\bR\bRI\bI\bI\bIB\bB\bB\bBU\bU\bU\bUT\bT\bT\bTO\bO\bO\bOR\bR\bR\bRS\bS
 
 
 
-
-
-26/Jul/97                LilyPond 0.0.77                        1
+30/Jul/97                LilyPond 0.0.77                        1
 
 
diff --git a/BUGS b/BUGS
index 2f3755f292423350aca7fead8461ad68c09ac14a..4743ac694333310e377e46a10628cb74733b7a28 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -1,7 +1,14 @@
 
 [document reintroduced deficiencies.]
 
-midi instrument?
+wrong instrument:
+
+cad = \melodic { \id "Staff" "fr horn"; c4 }
+
+\score { 
+       \melodic {\cad}
+}
+
 *******************
  '.' -> lilypond: lexer.l:258: int My_lily_lexer::yylex(): Assertion `cnv == 1' failed.
 
index dd150709fcc6f524509eec4ccf86ff11e646f84b..cab146ee8062ecaac0ebb98d49ebac86c770363e 100644 (file)
@@ -43,6 +43,10 @@ testing, general comments.
 Werner Lemberg <xlwy01@uxp1.hrz.uni-dortmund.de>, misc bugfixes, some
 Beam and Stem code. 
 
+=item *
+
+Alexandre Oliva <oliva@dcc.unicamp.br>
+
 =back
 
 Your name could be here! If you want to help, then take a look at the
index 8cf64c424dff1a6ab94f9943a8a386a1da20168a..7fe901c18650f84b83b5c696a5360dcdd61e2386 100644 (file)
@@ -97,6 +97,9 @@ If you like using font-lock, you can also add this to your F<.emacs>:
 
 the C<type> is a Hungarian notation postfix for C<Type>. See below
 
+=head2 MACROS
+
+
 
 =head2 BROKEN CODE
 
index a44206b6521230b8fcec28f55b49285cb13161b9..ea4a7be9c09669ea909f1290159030c66e846161 100644 (file)
@@ -32,6 +32,7 @@ DVIFILES = $(addprefix $(outdir)/, $(DOCFILES:.doc=.dvi))
 # list of distribution files:
 #
 EXTRA_DISTFILES = lelie_icon.gif lelie_logo.gif  $(DOCFILES)
+
 default: do-doc
 
 # don't do DVI files. They can only be made if lily is installed
@@ -40,13 +41,14 @@ do-doc: $(TEXTFILES)
 html: $(HTMLFILES)
 
 htmldist: html
-       ./$(lily_bindir)/make_website
+       $(lily_bindir)/make_website
 
+dvi: $(DVIFILES)
 
 # generic targets and rules:
 #
-include ./$(depth)/make/Targets.make
-include ./$(depth)/make/Rules.make
+include $(depth)/make/Targets.make
+include $(depth)/make/Rules.make
 #
 
 localclean:
@@ -56,10 +58,9 @@ localclean:
 MAN1FILES = lilypond convert-mudela mi2mu mudela-book
 MAN1GROFF = $(addprefix $(outdir)/, $(addsuffix .1,$(MAN1FILES)))
 
-localinstall: $(outdir)/lilypond.1 $(outdir)/mudela.5
-       $(INSTALL) -d $(mandir)/man5
+localinstall: $(outdir)/lilypond.1
        $(INSTALL) -d $(mandir)/man1
-       $(INSTALL) -m 755 $(MAN1GROFF) $(mandir)/man1
+       $(INSTALL) -m 644 $(MAN1GROFF) $(mandir)/man1
 
 
 localuninstall:
index 9f1be188b4059e1587c0c1adc8537977d0ccd1ff..71388de3c4268114b68c80c12fcc88fc125aece5 100644 (file)
@@ -15,8 +15,7 @@ $(outdir)/%.dvi: $(outdir)/%.mudtex
        mv $(notdir $@) $(outdir)
 
 $(outdir)/%.mudtex: %.doc
-       $(depth)/bin/mudela-book --outdir=$(outdir)/ --outname=$(notdir $@) $<
-
+       $(binout)/mudela-book --outdir=$(outdir)/ --outname=$(notdir $@) $<
 
 $(outdir)/%.text: $(outdir)/%.1
        groff -man -Tascii $< > $@
index 10fdd592d0172b914aa73b9caca6cf7f98daa10e..cc50a8b5955dd6686f85e3edb65cf55c53bf26ab 100644 (file)
@@ -1,13 +1,9 @@
 =head1 NAME
 
-GNU LilyPond -- the Webpage
-
-Excuse me for this poor page. I don't really have time for doing this..
+The Homepage of LilyPond -- the GNU Project music typesetter
 
 =head1 DESCRIPTION
 
-
-
 GNU LilyPond is a program which converts music definition files into
 visual or auditive output: it can typeset formatted sheet music to a
 TeX file and and (mechanical) performances to MIDI files.
@@ -133,15 +129,10 @@ DEDICATION
 
 =back
 
-
 =head2 The program
 
-
 =over 5
 
-
-
-
 =item *
 <a href=TODO.txt
 >
@@ -204,14 +195,10 @@ Other packages for printing music.
 </a
 >
 
-=item *
-Get LilyPond at ftp://pcnov095.win.tue.nl/pub/lilypond !
-
-
 =item *
 <a href=links.html
 >
-B<download LilyPond> and other interesting links
+B<download> LilyPond and other interesting links
 </a
 >
 
index a4abb247a50010004ed6fc7e33cfc3330126f1f6..1ea51c9b450457798b765e6eec7ac3a946d918b5 100644 (file)
@@ -41,6 +41,9 @@ New York.
 [This is as close to the ``standard'' reference work for music
 notation issues as one is likely to get. MB]
 
+K. Hader. ``Aus der Werkstatt eines Notenstechers'' Waldheim--Eberle
+Verlag, Vienna 1948
+
 MPA. Standard music notation specifications for computer programming.
 December 1996
 
index e9ffba63ef469499bc51db2017a9cdfd553f96bf..9c7edf0a62833e34dcaab844bb51031864fb7969 100644 (file)
@@ -16,15 +16,6 @@ of interest to LilyPond users.
 LilyPond is part of the GNU Project started by the Free Software
 Foundation to create a system of free software for the world-community
 
-=item http://www.ssc.com/linux/
-
-The Number One Free OS-Kernel: Linux 
-
-=item http:// /linux_soundapps.html
-
-Dave Philips' Linux sound applications page
-
-
 =back
 
 =head2 Ftp 
@@ -104,10 +95,30 @@ For discussions concerning the GNU Music project, to subscribe: send
 mail with subject "subscribe" to
 gnu-music-discuss-request@vuse.vanderbilt.edu,
 
-
 =back
 
 Announces of new versions will be sent to info-gnu-music and
 gnu-music-discuss.
 
 
+=head2 Backlinks
+
+=over 4
+
+=item http://www.ssc.com/linux/
+
+The Number One Free OS-Kernel: Linux 
+
+=item http://www.bright.net/~dlphilp/linux_soundapps.html
+
+Dave Philips' Linux sound applications page
+
+=item http://www.medieval.org/emfaq/scores/software.html
+
+More software for (early) music.
+
+=item http://www.emry.net/
+
+Linux webwatcher.
+
+=back
index 23fc00cb4ec18b92fad69b7ca657ece0c3165393..089b74444c3bd5f6dd5a2951c04ec0aeb53607a4 100644 (file)
@@ -1,4 +1,8 @@
 % -*-LaTeX-*-
+% this document should be run through the mudela-book script after lilypond
+% has been installed.
+
+
 \documentclass{article}
 \usepackage{a4wide}
 \title{Mudela and LilyPond crash course}
@@ -33,10 +37,10 @@ chords by \verb+<+ and \verb+>+.
 
 \begin[verbatim]{mudela}
 \score {
-        \melodic {      % { means voice
-        c'4 g'4         % 4 means quaver, 1 beat in 4/4 meter
+        \melodic {      % {...} is a voice
+        c'4 g'4         % c and g are pitches, 4 is the duration (quaver)
         c''4 ''c4       % c' is 1 octave up, 'c 1 down.
-        <c'4 g'4>       % <> means a chord
+        <c'4 g'4>       % <...> is a chord
         }
 } 
 \end{mudela}
index c4e9c85398b6e4c0b491507272330af2d4372b9f..afcf5c4c19290d3c9b6cb60ba5faeed878839330 100644 (file)
@@ -1,4 +1,8 @@
 % -*-latex-*-
+
+% this document should be run through the mudela-book script after lilypond
+% has been installed. 
+
 \documentclass{article}
 \usepackage{a4wide}
 \title{GNU LilyPond input format 0.1}
@@ -232,7 +236,7 @@ signifies that this note is part of a triplet (3 in stead of 2). The
 duration is one and a half quaver (\verb+4.+) times 2/3.
 
 Notenames are just a special kind of identifiers, and can be declared
-for any language appropriate (see \file{dutch.ini}).  The default language
+for any language appropriate (see \file{init/dutch.ly}).  The default language
 for notenames is defined to be dutch. In dutch, the notenames are
 a,b,c,d,e,f and g. Sharps are formed by adding the extension "is",
 flats by adding ``es''
@@ -291,23 +295,22 @@ error for this reason.
 
 Ties connect the noteheads of adjacent notes. They are entered as follows:
 
-\begin[fragment]{mudela}
-a4 ~ a4
+\begin[verbatim,fragment]{mudela}
+a'4 ~ a''4
 \end{mudela}
 
 Slurs connect whole chords, and try to avoid crossing stems. They are
 entered as follows:
-\begin{verbatim}
 
-\begin[fragment]{mudela}
-a4(  )a4
+\begin[verbatim,fragment]{mudela}
+a'4(  )a''4
 \end{mudela}
 
 \subsection{Scripts}
 
 Symbols which can be put at either side (above or below) of a staff
 are entered as follows:
-\begin[fragment]{mudela}
+\begin[verbatim,fragment]{mudela}
 a-^     % marcato, direction: default
         a^-     % portato, direction: above note
         a_.     % staccato, direction: below note
@@ -317,7 +320,7 @@ a-^     % marcato, direction: default
 c-"marcato"
 \end{mudela}
 
-If you want to define your own scripts refer to \file{script.ini} for
+If you want to define your own scripts refer to \file{init/script.ly} for
 details.
 
 
@@ -453,7 +456,7 @@ the same voicegroup share certain characteristics, among others:
         - beams and stems
         - scripts
 
-For the actual list, see the init file \file{register.ini}
+For the actual list, see the init file \file{init/register.ly}
 
 Putting different musical lines in to the same voicegroup effectively
 makes LilyPond try to form chords of all those lines. Putting
diff --git a/NEWS b/NEWS
index e6d1201daee5e2a2bd1876ca5f0e67be63bd1c50..2d7ff005fb79769f5069ca5f0e7513b6c1b50090 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,21 @@
-pl 77.jcn1
-       - init/*.ly in dist
-       - bf: string-convert.cc: return local buf
-       - bf: debug.cc: <new.h>
-       - bf: template4.cc: #includes
 
+pl 78
+       - bf: Midi_instrument 
+       - added  enable/disable defaults to help.
+       - incredibly ugly NAME_MEMBERS(); bug. Immediately changed to 
+DECLARE_MY_RUNTIME_TYPEINFO;
+       - \stem -1 -> \stem \down in input      
+       - bf: slurchar index
+       - configure warnings 
+       - preliminary stuff for multiarch building
+       - #!/usr/bin/perl fixes (AO)
+       - some Makefile cleanups: now faster.
+
+pl 77.jcn2
+       - Midi_instrument
+
+******
+july 29
 pl 77  
        - some fixes for internal compiler errors 
 derive from Pointer_list with default dtor gives error with -O2
diff --git a/TODO b/TODO
index d0c00112f6eceaf7b302aa4a293b009bfadf4426..8a0802b5ef522ff7c077da2020459c803d739513 100644 (file)
--- a/TODO
+++ b/TODO
@@ -12,6 +12,10 @@ grep for TODO and ugh/ugr
 
        * dots into separate item.
 
+       * use String iso Text_def for lyrics.
+
+       * use position 0 for center of staff iso bottom.
+
        * return status
 
        * lyrics in chords still fuck up.
@@ -185,8 +189,6 @@ INPUTLANGUAGE
 
        * Raw request syntax
 
-       * subtime with Subtle_reqs
-
 PROJECTS
 
        * Do RTTI i.s.o. static_name(), name() and request-junk.
@@ -331,7 +333,7 @@ IDEAS
                - Translators
                - Complex mudela?
 
-       * y -dims in internote?
+       * y -dims in internote? Staff-space? X-dimensions?
 
        * merge Atom and Symbol?
 
diff --git a/VERSION b/VERSION
new file mode 100644 (file)
index 0000000..85b19ba
--- /dev/null
+++ b/VERSION
@@ -0,0 +1,7 @@
+TOPLEVEL_MAJOR_VERSION = 0
+TOPLEVEL_MINOR_VERSION = 0
+TOPLEVEL_PATCH_LEVEL = 78
+# use to send patches, always empty for released version:
+# include separator: ".postfix", "-pl" makes rpm barf
+
+TOPLEVEL_MY_PATCH_LEVEL = 
index 8a6b6654fee52a7dbe8a63a1400adc2947d222fc..5f98246cecfbf54893e6d98feac90bb293e5149f 100644 (file)
@@ -1,24 +1,31 @@
 # bin/Makefile
 
-# subdir level:
-#
 depth = ..
 include $(depth)/make/Include.make
-# list of distribution files:
 
-SCRIPTS = clearlily cpgento genheader make_patch \
-       lily.efence\
-       make-version make-website release convert-mudela show-latest \
-       mudela-book conflily
-EXTRA_DISTFILES = $(SCRIPTS)
+# list of distribution files:
+SCRIPTS = clearlily cpgento make_patch lily.efence \
+       make-version release conflily
+PERL_SCRIPTS_IN = $(wildcard *.in)
+PERL_SCRIPTS = $(addprefix $(outdir)/, $(PERL_SCRIPTS_IN:.in=))
+EXTRA_DISTFILES = $(SCRIPTS) $(PERL_SCRIPTS_IN)
 #
 
+all: $(PERL_SCRIPTS)
+
+$(outdir)/%: %.in
+#      cd .. && CONFIG_FILES=bin/$(notdir $@) CONFIG_HEADERS= ./config.status
+#      mv $(< :.in=) $@
+# this nukes make/out/Configure_variables.make.
+       sed 's!@PERL@!$(PERL)!' < $< > $@
+       chmod 755 $@
+
 
 EXECUTABLES=convert-mudela mudela-book
 localinstall: all
        $(INSTALL) -d $(bindir)
-       $(INSTALL) -m 755 convert-mudela $(bindir)
-       $(INSTALL) -m 755 mudela-book $(bindir)
+       $(INSTALL) -m 755 $(outdir)/convert-mudela $(bindir)
+       $(INSTALL) -m 755 $(outdir)/mudela-book $(bindir)
 
 localuninstall:
        rm -f $(bindir)/convert-mudela $(bindir)/mudela-book
index 4623edacf5c8c081e0631bd3135582ffbfa54fa4..2a495a1308a0c20f6e3576b0285c3c753b315b55 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # conflily
 # ugh: must be executed from lilypond-x.x.x (bin/conflily)
 
@@ -17,16 +17,18 @@ if [ ! -e $HOME/lelie ]; then
        ln -s $lelie $HOME/lelie
 fi
 
-rm $lelie/current >& /dev/null
+rm $lelie/current 2>&1 > /dev/null
 current=`basename \`pwd\``
 echo ln -s $lelie/$current $lelie/current
 ln -s $lelie/$current $lelie/current
 
-ln -sf $lelie/current/lily/out/lilypond bin/lilypond
-ln -sf $lelie/current/mi2mu/out/mi2mu bin/mi2mu
+ln -sf $lelie/current/lily/out/lilypond bin/out/lilypond
+ln -sf $lelie/current/mi2mu/out/mi2mu bin/out/mi2mu
 
 if [ "x$LILYINCLUDE" = "x" ]; then
-       export LILYINCLUDE=$lelie/current/init
+       echo you should make add the following to your login script
+       echo "export LILYINCLUDE=$lelie/current/init"
+       echo "export PATH=$PATH:$lelie/current/bin/out/"
 fi
 
 configure --prefix=$root --enable-debugging --enable-printing --enable-checking
diff --git a/bin/convert-mudela b/bin/convert-mudela
deleted file mode 100755 (executable)
index 000f505..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-#!/usr/bin/perl -w
-
-=head1 TODO
-
-    detect \lyrics and \melodic, and do substitution accordingly.
-    count <> and {} ?
-
-Ugh . Perl sux. Anybody for Python?
-    
-=cut    
-
-
-
-#
-# version of "supporting" engine, not mudela conversions.
-# 
-
-
-
-
-$convert_mudela_version = "0.1.1";
-
-use Getopt::Long;
-
-
-sub version_compare
-{
-    local ($a,$b)=@_;
-    return &cmpver;
-}
-    
-
-sub  cmpver 
-{      
-       my(@a)= split /\./,$a;
-       my(@b)= split /\./,$b;
-
-       for $i (0,1,2) {
-           return $a[$i] <=> $b[$i] if ($a[$i] != $b[$i]);
-       }
-       return $a cmp $b;
-}
-
-sub version_string_conv
-{
-    my ($from_version, $to_version) = @_;
-    s/\version \"$from_version\"/\version \"$to_version\"/g;
-}
-
-################################################################
-
-sub no_conv
-{
-}
-sub convert_0_0_52_to_0_0_53
-{
-
-    s/include \"/$1\\include \"/g;
-}
-
-  
-sub convert_0_0_54_to_0_0_55
-{
-    s/%{/% {/g;
-}
-
-  
-sub convert_0_0_53_to_0_0_54
-{
-    print STDERR "Not smart enough to convert \\transpose\n"    if (/\\transpose/) ;
-}
-
-# we-re not at 58 yet, but this is at least one of the rules
-sub convert_0_0_55_to_0_0_56
-{
-    s/\"\|\|\"/\"|.\"/g;
-}
-
-sub convert_0_0_56_to_0_0_57
-{
-    s/\(([ \]\[|\t-\.>]|\\[<!>a-z]+)*\)/\~ $1/g;
-}
-
-sub convert_0_0_57_to_0_0_58
-{
-    s/\[ *([^\[\]]*)\] *([1-9]*) *\/ *([1-9]*)/[$2\/$3 $1]1\/1/g;
-}
-
-sub convert_0_0_58_to_0_0_59
-{
-    die "Not smart enough to convert 0.0.58 to 0.0.59\n";
-}
-
-sub convert_0_0_59_to_0_0_60
-{
-    s/(\\unitspace [0-9.mcptin\\ ]+|\\geometric [0-9.]+|\\width [0-9.mcp\\tin]+)/$1;/g;
-    s/(\\output \"[^\"]+\")/$1;/;
-    s/(\\tempo  [0-9: ]+)/$1;/;
-}
-
-sub convert_0_0_60_to_0_0_61
-{
-    s/(\\unitspace|\\geometric|\\width)/$1=/g;
-   
-}
-
-###############################################################
-
-sub    last_conversion
-{
-    my @v = &versions;
-    return pop @v;
-}
-sub identify
-{
-    
-    print STDERR "This is convert-mudela " . $convert_mudela_version . 
-       " (up to mudela version ", last_conversion,     ")\n";
-}
-  
-  
- sub usage
-  {
-     print STDERR "Usage: convert-mudela [options] [mudela-file]...\n"
-     . "Convert old mudela source from mudela-file or stdin\n\n"
-     . "Options:\n"
-     . "  -e, --edit             perform in-place conversion\n"
-     . "  -f, --from=PATHLEVEL   use source version 0.0.PATCHLEVEL\n"
-     . "  -h, --help             print this help\n"
-     . "  -o, --output=FILE      name output file\n"
-     . "  -s, --show-rules       print all known conversion rules\n"
-     . "  -t, --to=VERSION    convert to version VERSION\n"
-  }
-      
-
-my %minor_conversions = ("0.0.50" => \&no_conv,
-                        "0.0.52" => \&convert_0_0_50_to_0_0_52,
-                        "0.0.53" => \&convert_0_0_52_to_0_0_53,
-                        "0.0.54" => \&convert_0_0_53_to_0_0_54,
-                        "0.0.55" => \&convert_0_0_54_to_0_0_55,
-                        "0.0.56" => \&convert_0_0_55_to_0_0_56,
-                        "0.0.57" => \&convert_0_0_56_to_0_0_57,
-                        "0.0.58" => \&convert_0_0_57_to_0_0_58,
-                        "0.0.59" => \&convert_0_0_58_to_0_0_59,
-                        "0.0.60" => \&convert_0_0_59_to_0_0_60,
-                        "0.0.61" => \&convert_0_0_60_to_0_0_61
-                        );
-
-sub versions 
-{
-    return (sort keys %minor_conversions);
-}
-    
-
-sub    show_rules
-{
-    print "Rules: ", join(", ", sort keys %minor_conversions), "\n";
-    
-}
-
-sub do_conversion
-{
-    my ($from,$to) = @_;
-
-    my @applicable_conversion;
-    my @mudela_levels;
-    
-#    die "This is too old  to convert " if $from < 50;
-    my @v = versions;
-    foreach $ver (@v) {
-       if (version_compare($ver, $from) > 0 && version_compare($ver,$to) <= 0 ){ 
-           push @applicable_conversion, $minor_conversions{$ver};
-           push @mudela_levels, $ver;
-       }
-    }
-    
-    print STDERR "Applying following rules: ", join(", ", @mudela_levels) , "\n";
-
-    while (<INLY>) {
-       foreach $subroutine (@applicable_conversion) {
-       
-           &$subroutine;
-           
-       }
-       version_string_conv $from, $to;
-       print OUTLY;
-    }
-}
-
-sub get_auto_from
-{
-    my ($fn)=@_;
-    my ($ver);
-    open INLY, $fn || die "Can't open";
-
-    while (<INLY>) {
-       s/^.*\\version \"([^\"]*)\".*$//;
-       if (defined ($1)) {
-           print STDERR "Guessing version: ", $1, ".. ";
-           $ver = $1;
-           last;
-       }
-    }
-    if (!defined($ver)){
-       print STDERR "can't determine mudela version in $fn.\n";
-       my $u;
-       return $u;
-    }
-    close INLY;
-    return $ver;
-}   
-
-sub  set_files 
-{
-    $infile = "-";
-    $outfile = "-";
-    $outfile = $opt_output if (defined($opt_output));
-
-    if ($ARGV [0])  {
-       $infile = $ARGV[0];
-    } 
-    if (( ! -f $infile) && (! $infile =~ /\\.ly$/s ) ){
-       $infile .= ".ly";
-       
-
-    }
-    if ($opt_edit && $infile ne "-") {
-       $opt_edit = 1;
-       $outfile = "$infile.NEW";
-       $infile = "$infile";
-    }
-    print STDERR "Input ", (($infile eq "-") ?"STDIN" : $infile), " .. ";
-
-}
-
-sub do_one_arg
-{
-    set_files;
-
-    local ($from_version, $to_version);
-    $from_version = $opt_from;
-    $to_version = $opt_to;
-    
-    ($from_version = get_auto_from $infile) unless defined($opt_from);
-    return if (!defined($from_version));
-    
-    ($to_version =  last_conversion) unless (defined($opt_to));
-
-    die "can't open \`$infile\'" unless open INLY,$infile ;
-    die "can't open \`$outfile\'" unless open OUTLY, ">$outfile";
-    
-    do_conversion $from_version, $to_version;
-    close INLY;
-    close OUTLY;
-
-    if ($opt_edit) {
-       rename $infile, "$infile~";
-       rename $outfile, "$infile";
-    }
-}
-
-## "main"
-
-identify;
-
-
-GetOptions ("help", "output=s", "from=i", "to=i", "minor=i", "edit", "show-rules");
-
-if ($opt_help) {
-    usage();
-    $opt_help = 0;     # to extinguish typo check.
-    exit 0;
-}
-
-if ($opt_show_rules) { 
-    show_rules ;
-    $opt_show_rules = 0;       # to extinguish typo check.
-    exit 0;
-}
-
-local ( $infile,$outfile);
-my $processed_one=0;
-
-while (defined($ARGV[0])) {
-    do_one_arg;
-    shift @ARGV;
-    $processed_one = 1;
-}
-do_one_arg unless ($processed_one);
-
-    
diff --git a/bin/convert-mudela.in b/bin/convert-mudela.in
new file mode 100644 (file)
index 0000000..f1b640c
--- /dev/null
@@ -0,0 +1,293 @@
+#!@PERL@ -w
+
+=head1 TODO
+
+    detect \lyrics and \melodic, and do substitution accordingly.
+    count <> and {} ?
+
+Ugh . Perl sux. Anybody for Python?
+    
+=cut    
+
+
+
+#
+# version of "supporting" engine, not mudela conversions.
+# 
+
+
+
+
+$convert_mudela_version = "0.1.1";
+
+use Getopt::Long;
+
+
+sub version_compare
+{
+    local ($a,$b)=@_;
+    return &cmpver;
+}
+    
+
+sub  cmpver 
+{      
+       my(@a)= split /\./,$a;
+       my(@b)= split /\./,$b;
+
+       for $i (0,1,2) {
+           return $a[$i] <=> $b[$i] if ($a[$i] != $b[$i]);
+       }
+       return $a cmp $b;
+}
+
+sub version_string_conv
+{
+    my ($from_version, $to_version) = @_;
+    s/\version \"$from_version\"/\version \"$to_version\"/g;
+}
+
+################################################################
+
+sub no_conv
+{
+}
+sub convert_0_0_52_to_0_0_53
+{
+
+    s/include \"/$1\\include \"/g;
+}
+
+  
+sub convert_0_0_54_to_0_0_55
+{
+    s/%{/% {/g;
+}
+
+  
+sub convert_0_0_53_to_0_0_54
+{
+    print STDERR "Not smart enough to convert \\transpose\n"    if (/\\transpose/) ;
+}
+
+# we-re not at 58 yet, but this is at least one of the rules
+sub convert_0_0_55_to_0_0_56
+{
+    s/\"\|\|\"/\"|.\"/g;
+}
+
+sub convert_0_0_56_to_0_0_57
+{
+    s/\(([ \]\[|\t-\.>]|\\[<!>a-z]+)*\)/\~ $1/g;
+}
+
+sub convert_0_0_57_to_0_0_58
+{
+    s/\[ *([^\[\]]*)\] *([1-9]*) *\/ *([1-9]*)/[$2\/$3 $1]1\/1/g;
+}
+
+sub convert_0_0_58_to_0_0_59
+{
+    die "Not smart enough to convert 0.0.58 to 0.0.59\n";
+}
+
+sub convert_0_0_59_to_0_0_60
+{
+    s/(\\unitspace [0-9.mcptin\\ ]+|\\geometric [0-9.]+|\\width [0-9.mcp\\tin]+)/$1;/g;
+    s/(\\output \"[^\"]+\")/$1;/;
+    s/(\\tempo  [0-9: ]+)/$1;/;
+}
+
+sub convert_0_0_60_to_0_0_61
+{
+    s/(\\unitspace|\\geometric|\\width)/$1=/g;
+   
+}
+
+###############################################################
+
+sub    last_conversion
+{
+    my @v = &versions;
+    return pop @v;
+}
+sub identify
+{
+    
+    print STDERR "This is convert-mudela " . $convert_mudela_version . 
+       " (up to mudela version ", last_conversion,     ")\n";
+}
+  
+  
+ sub usage
+  {
+     print STDERR "Usage: convert-mudela [options] [mudela-file]...\n"
+     . "Convert old mudela source from mudela-file or stdin\n\n"
+     . "Options:\n"
+     . "  -e, --edit             perform in-place conversion\n"
+     . "  -f, --from=PATHLEVEL   use source version 0.0.PATCHLEVEL\n"
+     . "  -h, --help             print this help\n"
+     . "  -o, --output=FILE      name output file\n"
+     . "  -s, --show-rules       print all known conversion rules\n"
+     . "  -t, --to=VERSION    convert to version VERSION\n"
+  }
+      
+
+my %minor_conversions = ("0.0.50" => \&no_conv,
+                        "0.0.52" => \&convert_0_0_50_to_0_0_52,
+                        "0.0.53" => \&convert_0_0_52_to_0_0_53,
+                        "0.0.54" => \&convert_0_0_53_to_0_0_54,
+                        "0.0.55" => \&convert_0_0_54_to_0_0_55,
+                        "0.0.56" => \&convert_0_0_55_to_0_0_56,
+                        "0.0.57" => \&convert_0_0_56_to_0_0_57,
+                        "0.0.58" => \&convert_0_0_57_to_0_0_58,
+                        "0.0.59" => \&convert_0_0_58_to_0_0_59,
+                        "0.0.60" => \&convert_0_0_59_to_0_0_60,
+                        "0.0.61" => \&convert_0_0_60_to_0_0_61
+                        );
+
+sub versions 
+{
+    return (sort keys %minor_conversions);
+}
+    
+
+sub    show_rules
+{
+    print "Rules: ", join(", ", sort keys %minor_conversions), "\n";
+    
+}
+
+sub do_conversion
+{
+    my ($from,$to) = @_;
+
+    my @applicable_conversion;
+    my @mudela_levels;
+    
+#    die "This is too old  to convert " if $from < 50;
+    my @v = versions;
+    foreach $ver (@v) {
+       if (version_compare($ver, $from) > 0 && version_compare($ver,$to) <= 0 ){ 
+           push @applicable_conversion, $minor_conversions{$ver};
+           push @mudela_levels, $ver;
+       }
+    }
+    
+    print STDERR "Applying following rules: ", join(", ", @mudela_levels) , "\n";
+
+    while (<INLY>) {
+       foreach $subroutine (@applicable_conversion) {
+       
+           &$subroutine;
+           
+       }
+       version_string_conv $from, $to;
+       print OUTLY;
+    }
+}
+
+sub get_auto_from
+{
+    my ($fn)=@_;
+    my ($ver);
+    open INLY, $fn || die "Can't open";
+
+    while (<INLY>) {
+       s/^.*\\version \"([^\"]*)\".*$//;
+       if (defined ($1)) {
+           print STDERR "Guessing version: ", $1, ".. ";
+           $ver = $1;
+           last;
+       }
+    }
+    if (!defined($ver)){
+       print STDERR "can't determine mudela version in $fn.\n";
+       my $u;
+       return $u;
+    }
+    close INLY;
+    return $ver;
+}   
+
+sub  set_files 
+{
+    $infile = "-";
+    $outfile = "-";
+    $outfile = $opt_output if (defined($opt_output));
+
+    if ($ARGV [0])  {
+       $infile = $ARGV[0];
+    } 
+    if (( ! -f $infile) && (! $infile =~ /\\.ly$/s ) ){
+       $infile .= ".ly";
+       
+
+    }
+    if ($opt_edit && $infile ne "-") {
+       $opt_edit = 1;
+       $outfile = "$infile.NEW";
+       $infile = "$infile";
+    }
+    print STDERR "Input ", (($infile eq "-") ?"STDIN" : $infile), " .. ";
+
+}
+
+sub do_one_arg
+{
+    set_files;
+
+    local ($from_version, $to_version);
+    $from_version = $opt_from;
+    $to_version = $opt_to;
+    
+    ($from_version = get_auto_from $infile) unless defined($opt_from);
+    return if (!defined($from_version));
+    
+    ($to_version =  last_conversion) unless (defined($opt_to));
+
+    die "can't open \`$infile\'" unless open INLY,$infile ;
+    die "can't open \`$outfile\'" unless open OUTLY, ">$outfile";
+    
+    do_conversion $from_version, $to_version;
+    close INLY;
+    close OUTLY;
+
+    if ($opt_edit) {
+       rename $infile, "$infile~";
+       rename $outfile, "$infile";
+    }
+}
+
+## "main"
+
+identify;
+
+
+GetOptions ("help", "output=s", "from=i", "to=i", "minor=i", "edit", "show-rules");
+
+if ($opt_help) {
+    usage();
+    $opt_help = 0;     # to extinguish typo check.
+    exit 0;
+}
+
+if ($opt_show_rules) { 
+    show_rules ;
+    $opt_show_rules = 0;       # to extinguish typo check.
+    exit 0;
+}
+
+local ( $infile,$outfile);
+my $processed_one=0;
+
+while (defined($ARGV[0])) {
+    do_one_arg;
+    shift @ARGV;
+    $processed_one = 1;
+}
+do_one_arg unless ($processed_one);
+
+    
diff --git a/bin/genheader b/bin/genheader
deleted file mode 100755 (executable)
index 911b038..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/perl -w
-
-# generate the standard header of a LilyPond source file.
-my $fn;
-
-sub
-    do_init
-{
-    $MAILADRESS=$ENV{MAILADRESS};
-     @pw=(getpwuid($<));
-     $username=$pw[6];
-
-    die "arg needed\n" if (!($#ARGV+1));
-     $fn = $ARGV[0];
-
-     $hh_b =  ($fn =~ /hh$/ );
-     $inc_b=  ($hh_b || $fn =~ /[ti]cc$/);
-}
-
-sub 
-    do_head
-{
-    
-    my $what="implement ";
-    $what = "declare " if ($hh_b);
-    my ($PROJECT, $cwd);
-    $PROJECT = "the GNU LilyPond music typesetter";
-    chop($cwd = `pwd`);
-    
-    $PROJECT= "the Flower Library" if ($cwd =~ /flower/);
-    
-    my $headstr ="/*
-  $fn -- $what
-
-  source file of $PROJECT
-
-  (c) 1997 $username <$MAILADRESS>
-*/\n";
-    print $headstr;
-}
-sub do_inc
-{
-    my $headstr="";
-    my $startdef= $fn;
-    $startdef =~ s/[\.-]/_/g;
-    $startdef =~ tr/a-z/A-Z/;
-    my $terminatestr="\n";
-
-    if ($inc_b) {
-       $headstr = "\n\n#ifndef $startdef\n#define $startdef\n";
-       $terminatestr .= "#endif // $startdef\n"  
-       }
-
-    print $headstr, $terminatestr;
-}
-do_init;
-do_head;
-do_inc;
-
-
diff --git a/bin/genheader.in b/bin/genheader.in
new file mode 100644 (file)
index 0000000..9b6bb4d
--- /dev/null
@@ -0,0 +1,60 @@
+#!@PERL@ -w
+
+# generate the standard header of a LilyPond source file.
+my $fn;
+
+sub
+    do_init
+{
+    $MAILADRESS=$ENV{MAILADRESS};
+     @pw=(getpwuid($<));
+     $username=$pw[6];
+
+    die "arg needed\n" if (!($#ARGV+1));
+     $fn = $ARGV[0];
+
+     $hh_b =  ($fn =~ /hh$/ );
+     $inc_b=  ($hh_b || $fn =~ /[ti]cc$/);
+}
+
+sub 
+    do_head
+{
+    
+    my $what="implement ";
+    $what = "declare " if ($hh_b);
+    my ($PROJECT, $cwd);
+    $PROJECT = "the GNU LilyPond music typesetter";
+    chop($cwd = `pwd`);
+    
+    $PROJECT= "the Flower Library" if ($cwd =~ /flower/);
+    
+    my $headstr ="/*
+  $fn -- $what
+
+  source file of $PROJECT
+
+  (c) 1997 $username <$MAILADRESS>
+*/\n";
+    print $headstr;
+}
+sub do_inc
+{
+    my $headstr="";
+    my $startdef= $fn;
+    $startdef =~ s/[\.-]/_/g;
+    $startdef =~ tr/a-z/A-Z/;
+    my $terminatestr="\n";
+
+    if ($inc_b) {
+       $headstr = "\n\n#ifndef $startdef\n#define $startdef\n";
+       $terminatestr .= "#endif // $startdef\n"  
+       }
+
+    print $headstr, $terminatestr;
+}
+do_init;
+do_head;
+do_inc;
+
+
index 29b768c1e8925c6c964cb3868c221ea21cae44af..d8e79346cdddbb99f0fb7b99744de0052a8b4f73 100755 (executable)
@@ -3,7 +3,7 @@
 #shift;
 if test "x$1" = x;
 then
-    versionfile=".version"
+    versionfile="VERSION"
 else
     versionfile=$1;
 fi
diff --git a/bin/make-website b/bin/make-website
deleted file mode 100755 (executable)
index 8f00d4f..0000000
+++ /dev/null
@@ -1,292 +0,0 @@
-#!/usr/bin/perl -w
-# stupid script to generate WWW site.
-
-use FileHandle;
-use Getopt::Long;
-my $lily_version;
-my $footstr;
-my $mw_id = "<!make_website!>";
-my $id_str = "make-website 0.3";
-
-my $TAR="tar";
-my $MAKE="make";
-
-sub get_version
-{
-    my ($vstr)=("");
-    open V, "$depth/.version";
-    while (<V>) {
-       s/#.*$//g;
-       next if (/^ *$/);
-       s/^/\$/;
-       s/= *(.*)$/=\"$1\";/;
-       $vstr .= $_;
-    }
-    eval ($vstr);
-    
-    $lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL";
-    
-    # stupid checks.
-    $lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL";
-
-
-    close V;
-}
-
-sub set_html_footer
-{
-    my $MAILADRESS=$ENV{MAILADRESS};
-    my @pw=(getpwuid($<));
-    my $username=$pw[6];
-
-    $footstr = 
-       "\n<hr>Please take me <a href=index.html>back to the index</a>\n<hr>
-<font size=-1>
-This page was generated by <code>" . $id_str . "</code> from lilypond-$lily_version by
-<p>
-<address><br>$username <a href=mailto:$MAILADRESS>&lt<!bla>$MAILADRESS</a>&gt</address>
-<p>" . `date` . "
-<p></font>";
-}
-    
-
-# do something, check return status
-sub my_system
-{
-    my (@cmds) = @_;
-    foreach $cmd (@cmds) {
-       my ($ignoreret)=0;
-       if ( $cmd  =~ /^-/ ) {
-           $ignoreret = 1;
-           $cmd = substr ($cmd, 1);
-       }
-       
-       my $ret =  ( system ($cmd));
-       if ($ret) {
-           if ($ignoreret) {
-               print STDERR "ignoring failed command \`$cmd\' (status $ret)\n";
-           }else {
-               print STDERR "\nmake_website: failed on command \`$cmd\' (status $ret)\n";
-               exit 2;
-           }
-       }
-    }
-}
-
-
-local $base="lilypond/";
-local @examples=("twinkle", "multi", "wohltemperirt" ,"standchen", "toccata-fuga-E", 
-                "scsii-menuetto", "collisions", "cadenza", "scales");
-
-# rhythm, scales, 
-
-
-sub gen_html
-{
-    print "generating HTML\n";
-    my_system "$MAKE -kC .. html";
-}
-
-sub gen_examples
-{
-    print "generating examples: \n";
-    my @todo=();
-    foreach $a (@examples) {
-       push @todo, "out/$a.ps.gz", "out/$a.gif", "out/$a.ly.txt";
-    }
-    
-    my_system ("$MAKE -C .. " . join(' ', @todo));
-}
-
-my @texstuff = ("mudela-man", "mudela-course");
-
-sub gen_manuals
-{
-    print "generating TeX doco list\n";
-    open HTMLLIST, ">tex_manuals.html";
-    print HTMLLIST "<html><body><title>LilyPond manuals in TeX</title>\n" .
-       "<ul>\n";
-    my @todo=();
-    foreach $a (@texstuff) {
-       push @todo , "out/$a.ps.gz";
-       print HTMLLIST "<li><a href=$a.ps.gz>$a.ps.gz</a>";
-    }
-    print HTMLLIST "</ul>";
-    close HTMLLIST;
-
-    my_system( "$MAKE -C .. " .  join(' ', @todo));
-}
-
-sub gen_list
-{
-    print "generating HTML list\n";
-    open HTMLLIST, ">example_output.html";
-    print HTMLLIST "<html><body><title>LilyPond examples</title>\n
-These example files are taken from the LilyPond distribution.\n
-LilyPond currently only outputs TeX and MIDI. The pictures and\n
- PostScript files were generated using TeX, Ghostscript and some graphics tools. \n
-The GIF files have been scaled to eliminate aliasing.";
-    foreach $a (@examples) {
-       $name=$a;
-       print HTMLLIST "<h1>example file: $name</h1>\n<XMP>\n";
-
-       open IF, "$depth/input/$a.ly";
-       input_record_separator IF "%}";
-       
-       $desc = <IF>;
-       close IF;
-       
-       print HTMLLIST "$desc\n</XMP>";
-
-       $inputf="$a.ly.txt";
-       $giff="$a.gif";
-       $jpegf="$a.jpeg";
-       $pngf = "$a.png";
-       $psf="$a.ps.gz";
-       $midif="$a.midi";
-       
-       print HTMLLIST "<ul>";
-
-       print HTMLLIST "<li><a href=$inputf> The input file</a>"
-           if ( -f $inputf );
-       
-       print HTMLLIST "<li><a href=$giff>The output (picture)</a>"     
-           if ( -f $giff );
-
-       print HTMLLIST "<li><a href=$psf>The output (PS)</a>\n"
-           if ( -f $psf );
-               
-       print HTMLLIST "<li><a href=$midif>The output (MIDI)</a>\n" 
-           if ( -f $midif );
-       print HTMLLIST "</ul>";
-    }
-    print HTMLLIST "</BODY></HTML>";
-    close HTMLLIST;
-}
-
-sub edit_html
-{
-    print STDERR "adding footer\n";
-
-    OUTER:
-    foreach $a (<*.html>) {
-       open H, "$a";
-       my $sep="</BODY>";
-       input_record_separator H $sep;
-       my $file="";
-       
-       while (<H>) { 
-           if (/$mw_id/) {
-               close H;
-               next OUTER;
-           }
-           $file .= $_; 
-
-       }
-       close H;
-
-       my $subst =  $footstr;
-       $subst .= $back if (! $a =~ /index.html/ );
-       $file =~ s/$sep/$subst$sep/g ;
-       $file =~ s/\.gif/\.$image/g;
-       open H, ">$a";
-       print H $mw_id;
-       print H $file;
-       close H;
-    }
-}
-
-sub copy_txt_file
-{
-    my ($f) = @_;
-    my $d = $f;
-    $d =~ s!^.*\/!!;
-    if (! $f =~ /.txt$/) {
-       $d = "$f.txt";
-    }
-    print $f, $d;
-}
-    
-sub copy_files
-{  
-    print "copying files\n";
-    print `ln -s $depth/out ./docxx` if ( ! -x "docxx" ) ;
-    my_system "cp $depth/TODO ./TODO.txt",
-    "cp $depth/ANNOUNCE ./ANNOUNCE.txt",
-    "cp $depth/NEWS ./NEWS.txt",
-    "cp $depth/DEDICATION ./DEDICATION.txt",
-    "cp ../lelie*gif .";
-}
-
-sub set_images
-{
-    for $a (<*.gif>) {
-       if ($opt_png) {
-           my_system "gif2png -d $a";
-       }
-       if ($opt_jpeg) {
-           my $b=$a;
-           $b =~ s/.gif/.jpeg/;
-           my_system "cjpeg -o $b $a";
-       }
-    }
-}
-
-sub docxx_update
-{
-    my_system "$MAKE -C $depth doc++";
-}
-
-sub do_tar
-{
-     print "tarring.\n";
-     $files = join (' ', < *.html *.$image *.ps.gz *.txt *.midi docxx/*>);
-     my_system
-        "-$TAR zvhcf website.tar.gz $files;",
-#       "gzip -f9 website.tar;";
-}
-
-sub identify
-{
-    print STDERR "This is " . $id_str . "\n";
-    
-}
-sub main
-{
-    identify;
-    GetOptions("jpeg", "gif", "png", "noexamples");
-
-    local $image="gif" ;
-    $image = "png" if ($opt_png);
-    $image = "jpeg" if ($opt_jpeg);
-    
-    $depth = "../";
-    my $cwd;
-    chomp($cwd = `pwd`);
-    die "need to be in directory Documentation\n" if ( ! ($cwd =~ /Documentation$/));
-    get_version;
-    set_html_footer;
-
-
-    $depth = "../../";
-
-    chdir ("out");
-    $ENV{"TEXINPUTS"} .= ":$depth/input/:";
-    $ENV{"LILYINCLUDE"} = "$depth/input/";
-
-
-    gen_html;
-    copy_files;
-    if (! $opt_noexamples) {
-       gen_examples;
-       gen_list;
-    }
-    gen_manuals;
-    set_images;
-
-    edit_html;
-    docxx_update;
-    do_tar;
-}
-
-main;
diff --git a/bin/make-website.in b/bin/make-website.in
new file mode 100644 (file)
index 0000000..218b94d
--- /dev/null
@@ -0,0 +1,292 @@
+#!@PERL@ -w
+# stupid script to generate WWW site.
+
+use FileHandle;
+use Getopt::Long;
+my $lily_version;
+my $footstr;
+my $mw_id = "<!make_website!>";
+my $id_str = "make-website 0.3";
+
+my $TAR="tar";
+my $MAKE="make";
+
+sub get_version
+{
+    my ($vstr)=("");
+    open V, "$depth/VERSION";
+    while (<V>) {
+       s/#.*$//g;
+       next if (/^ *$/);
+       s/^/\$/;
+       s/= *(.*)$/=\"$1\";/;
+       $vstr .= $_;
+    }
+    eval ($vstr);
+    
+    $lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL";
+    
+    # stupid checks.
+    $lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL";
+
+
+    close V;
+}
+
+sub set_html_footer
+{
+    my $MAILADRESS=$ENV{MAILADRESS};
+    my @pw=(getpwuid($<));
+    my $username=$pw[6];
+
+    $footstr = 
+       "\n<hr>Please take me <a href=index.html>back to the index</a>\n<hr>
+<font size=-1>
+This page was generated by <code>" . $id_str . "</code> from lilypond-$lily_version by
+<p>
+<address><br>$username <a href=mailto:$MAILADRESS>&lt<!bla>$MAILADRESS</a>&gt</address>
+<p>" . `date` . "
+<p></font>";
+}
+    
+
+# do something, check return status
+sub my_system
+{
+    my (@cmds) = @_;
+    foreach $cmd (@cmds) {
+       my ($ignoreret)=0;
+       if ( $cmd  =~ /^-/ ) {
+           $ignoreret = 1;
+           $cmd = substr ($cmd, 1);
+       }
+       
+       my $ret =  ( system ($cmd));
+       if ($ret) {
+           if ($ignoreret) {
+               print STDERR "ignoring failed command \`$cmd\' (status $ret)\n";
+           }else {
+               print STDERR "\nmake_website: failed on command \`$cmd\' (status $ret)\n";
+               exit 2;
+           }
+       }
+    }
+}
+
+
+local $base="lilypond/";
+local @examples=("twinkle", "multi", "wohltemperirt" ,"standchen", "toccata-fuga-E", 
+                "scsii-menuetto", "collisions", "cadenza", "scales");
+
+# rhythm, scales, 
+
+
+sub gen_html
+{
+    print "generating HTML\n";
+    my_system "$MAKE -kC .. html";
+}
+
+sub gen_examples
+{
+    print "generating examples: \n";
+    my @todo=();
+    foreach $a (@examples) {
+       push @todo, "out/$a.ps.gz", "out/$a.gif", "out/$a.ly.txt";
+    }
+    
+    my_system ("$MAKE -C .. " . join(' ', @todo));
+}
+
+my @texstuff = ("mudela-man", "mudela-course");
+
+sub gen_manuals
+{
+    print "generating TeX doco list\n";
+    open HTMLLIST, ">tex_manuals.html";
+    print HTMLLIST "<html><body><title>LilyPond manuals in TeX</title>\n" .
+       "<ul>\n";
+    my @todo=();
+    foreach $a (@texstuff) {
+       push @todo , "out/$a.ps.gz";
+       print HTMLLIST "<li><a href=$a.ps.gz>$a.ps.gz</a>";
+    }
+    print HTMLLIST "</ul>";
+    close HTMLLIST;
+
+    my_system( "$MAKE -C .. " .  join(' ', @todo));
+}
+
+sub gen_list
+{
+    print "generating HTML list\n";
+    open HTMLLIST, ">example_output.html";
+    print HTMLLIST "<html><body><title>LilyPond examples</title>\n
+These example files are taken from the LilyPond distribution.\n
+LilyPond currently only outputs TeX and MIDI. The pictures and\n
+ PostScript files were generated using TeX, Ghostscript and some graphics tools. \n
+The GIF files have been scaled to eliminate aliasing.";
+    foreach $a (@examples) {
+       $name=$a;
+       print HTMLLIST "<h1>example file: $name</h1>\n<XMP>\n";
+
+       open IF, "$depth/input/$a.ly";
+       input_record_separator IF "%}";
+       
+       $desc = <IF>;
+       close IF;
+       
+       print HTMLLIST "$desc\n</XMP>";
+
+       $inputf="$a.ly.txt";
+       $giff="$a.gif";
+       $jpegf="$a.jpeg";
+       $pngf = "$a.png";
+       $psf="$a.ps.gz";
+       $midif="$a.midi";
+       
+       print HTMLLIST "<ul>";
+
+       print HTMLLIST "<li><a href=$inputf> The input file</a>"
+           if ( -f $inputf );
+       
+       print HTMLLIST "<li><a href=$giff>The output (picture)</a>"     
+           if ( -f $giff );
+
+       print HTMLLIST "<li><a href=$psf>The output (PS)</a>\n"
+           if ( -f $psf );
+               
+       print HTMLLIST "<li><a href=$midif>The output (MIDI)</a>\n" 
+           if ( -f $midif );
+       print HTMLLIST "</ul>";
+    }
+    print HTMLLIST "</BODY></HTML>";
+    close HTMLLIST;
+}
+
+sub edit_html
+{
+    print STDERR "adding footer\n";
+
+    OUTER:
+    foreach $a (<*.html>) {
+       open H, "$a";
+       my $sep="</BODY>";
+       input_record_separator H $sep;
+       my $file="";
+       
+       while (<H>) { 
+           if (/$mw_id/) {
+               close H;
+               next OUTER;
+           }
+           $file .= $_; 
+
+       }
+       close H;
+
+       my $subst =  $footstr;
+       $subst .= $back if (! $a =~ /index.html/ );
+       $file =~ s/$sep/$subst$sep/g ;
+       $file =~ s/\.gif/\.$image/g;
+       open H, ">$a";
+       print H $mw_id;
+       print H $file;
+       close H;
+    }
+}
+
+sub copy_txt_file
+{
+    my ($f) = @_;
+    my $d = $f;
+    $d =~ s!^.*\/!!;
+    if (! $f =~ /.txt$/) {
+       $d = "$f.txt";
+    }
+    print $f, $d;
+}
+    
+sub copy_files
+{  
+    print "copying files\n";
+    print `ln -s $depth/out ./docxx` if ( ! -x "docxx" ) ;
+    my_system "cp $depth/TODO ./TODO.txt",
+    "cp $depth/ANNOUNCE ./ANNOUNCE.txt",
+    "cp $depth/NEWS ./NEWS.txt",
+    "cp $depth/DEDICATION ./DEDICATION.txt",
+    "cp ../lelie*gif .";
+}
+
+sub set_images
+{
+    for $a (<*.gif>) {
+       if ($opt_png) {
+           my_system "gif2png -d $a";
+       }
+       if ($opt_jpeg) {
+           my $b=$a;
+           $b =~ s/.gif/.jpeg/;
+           my_system "cjpeg -o $b $a";
+       }
+    }
+}
+
+sub docxx_update
+{
+    my_system "$MAKE -C $depth doc++";
+}
+
+sub do_tar
+{
+     print "tarring.\n";
+     $files = join (' ', < *.html *.$image *.ps.gz *.txt *.midi docxx/*>);
+     my_system
+        "-$TAR zvhcf website.tar.gz $files;",
+#       "gzip -f9 website.tar;";
+}
+
+sub identify
+{
+    print STDERR "This is " . $id_str . "\n";
+    
+}
+sub main
+{
+    identify;
+    GetOptions("jpeg", "gif", "png", "noexamples");
+
+    local $image="gif" ;
+    $image = "png" if ($opt_png);
+    $image = "jpeg" if ($opt_jpeg);
+    
+    $depth = "../";
+    my $cwd;
+    chomp($cwd = `pwd`);
+    die "need to be in directory Documentation\n" if ( ! ($cwd =~ /Documentation$/));
+    get_version;
+    set_html_footer;
+
+
+    $depth = "../../";
+
+    chdir ("out");
+    $ENV{"TEXINPUTS"} .= ":$depth/input/:";
+    $ENV{"LILYINCLUDE"} = "$depth/input/";
+
+
+    gen_html;
+    copy_files;
+    if (! $opt_noexamples) {
+       gen_examples;
+       gen_list;
+    }
+    gen_manuals;
+    set_images;
+
+    edit_html;
+    docxx_update;
+    do_tar;
+}
+
+main;
diff --git a/bin/mudela-book b/bin/mudela-book
deleted file mode 100755 (executable)
index c56b105..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/usr/bin/perl -w
-my $mudcount = 0;
-my $mudela_b = 0;
-my $outdir = "";
-my $outname = "";
-use Getopt::Long;
-
-sub gen_mufile
-{
-    return "$outdir/$outname$mudcount.ly";
-}
-
-sub gen_texfile
-{
-    return "$outdir/$outname$mudcount.tex";
-}
-
-sub close_mudela
-{
-    $mudela_b = 0;
-    if ($fragment_b) {
-       print MUDELA "}\n \\paper { linewidth = -1.0\\cm; } }\n";
-       $fragment_b =0;
-    }
-    if ( $verbatim_b)  {
-       print BOOK "\\end{verbatim}\n\\interexample";
-       $verbatim_b =0;
-    }
-    close MUDELA;
-    my $status =0;
-    if ( -f gen_mufile ) {
-       $status = system "diff -q $outdir/book-mudela.ly " . gen_mufile;
-    } else {
-       $status = 1;
-       }
-    if ( $status ) {
-       rename "$outdir/book-mudela.ly", gen_mufile;
-       unlink gen_texfile;
-    }
-    
-    if ( ! -f gen_texfile) {
-       system "lilypond ". gen_mufile;
-       rename "lelie.tex", gen_texfile;
-    }
-    print BOOK "\\preexample\\input " . gen_texfile . "\n\\postexample\n";
-       
-}
-
-sub open_mudela
-{
-    $mudcount++;
-    $mudela_b = 1      ;
-    open MUDELA, ">$outdir/book-mudela.ly";
-    if ($verbatim_b) {
-       print BOOK "\\begin{verbatim}\n";
-    }
-    if ($fragment_b) {
-       print MUDELA "\\score { \\melodic {";
-    }
-
-}
-
-sub begin_b
-{
-    my ($s) = @_;
-    return (/^\\begin{$s}/) ;    
-}
-
-sub end_b
-{
-    my ($s) = @_;
-    return (/^\\end{$s}/) ;    
-}
-sub parse_mudela_opts
-{
-   my ($s) = @_;
-   $s =~ s/[\[\]]//g;
-
-   $verbatim_b =1 if ($s =~ /verbatim/ );
-   $fragment_b = 1 if ($s =~ /fragment/ );
-}   
-
-sub main
-{
-    GetOptions( 'outdir=s', 'outname=s');
-    $outdir = $opt_outdir;
-    $outname = $opt_outname if (defined ($opt_outname) && $opt_outname);
-    open INFILE, $ARGV[0];
-    
-    open BOOK, ">$outdir/$outname";
-    while (<INFILE>) {
-       if ($mudela_b) {
-           if (end_b "mudela") {
-               close_mudela;
-               next;
-           }
-           print MUDELA;
-           if ( $verbatim_b ) {
-               my $s = $_;
-               $s =~ s/\t/    /g; #shit
-               print BOOK $s;
-           }
-           
-       } else {
-           if (/^\\begin(\[.*\])?{mudela}/ ) {
-               my $opts ="";
-               $opts = $1 if ( defined ($1));
-
-               parse_mudela_opts($opts);
-               open_mudela;
-               next;  
-           } 
-           print BOOK;
-       }
-    }
-    close INFILE;
-    close BOOK;
-}
-
-main;
diff --git a/bin/mudela-book.in b/bin/mudela-book.in
new file mode 100644 (file)
index 0000000..2481b37
--- /dev/null
@@ -0,0 +1,120 @@
+#!@PERL@ -w
+my $mudcount = 0;
+my $mudela_b = 0;
+my $outdir = "";
+my $outname = "";
+use Getopt::Long;
+
+sub gen_mufile
+{
+    return "$outdir/$outname$mudcount.ly";
+}
+
+sub gen_texfile
+{
+    return "$outdir/$outname$mudcount.tex";
+}
+
+sub close_mudela
+{
+    $mudela_b = 0;
+    if ($fragment_b) {
+       print MUDELA "}\n \\paper { linewidth = -1.0\\cm; } }\n";
+       $fragment_b =0;
+    }
+    if ( $verbatim_b)  {
+       print BOOK "\\end{verbatim}\n\\interexample";
+       $verbatim_b =0;
+    }
+    close MUDELA;
+    my $status =0;
+    if ( -f gen_mufile ) {
+       $status = system "diff -q $outdir/book-mudela.ly " . gen_mufile;
+    } else {
+       $status = 1;
+       }
+    if ( $status ) {
+       rename "$outdir/book-mudela.ly", gen_mufile;
+       unlink gen_texfile;
+    }
+    
+    if ( ! -f gen_texfile) {
+       system "lilypond ". gen_mufile;
+       rename "lelie.tex", gen_texfile;
+    }
+    print BOOK "\\preexample\\input " . gen_texfile . "\n\\postexample\n";
+       
+}
+
+sub open_mudela
+{
+    $mudcount++;
+    $mudela_b = 1      ;
+    open MUDELA, ">$outdir/book-mudela.ly";
+    if ($verbatim_b) {
+       print BOOK "\\begin{verbatim}\n";
+    }
+    if ($fragment_b) {
+       print MUDELA "\\score { \\melodic {";
+    }
+
+}
+
+sub begin_b
+{
+    my ($s) = @_;
+    return (/^\\begin{$s}/) ;    
+}
+
+sub end_b
+{
+    my ($s) = @_;
+    return (/^\\end{$s}/) ;    
+}
+sub parse_mudela_opts
+{
+   my ($s) = @_;
+   $s =~ s/[\[\]]//g;
+
+   $verbatim_b =1 if ($s =~ /verbatim/ );
+   $fragment_b = 1 if ($s =~ /fragment/ );
+}   
+
+sub main
+{
+    GetOptions( 'outdir=s', 'outname=s');
+    $outdir = $opt_outdir;
+    $outname = $opt_outname if (defined ($opt_outname) && $opt_outname);
+    open INFILE, $ARGV[0];
+    
+    open BOOK, ">$outdir/$outname";
+    while (<INFILE>) {
+       if ($mudela_b) {
+           if (end_b "mudela") {
+               close_mudela;
+               next;
+           }
+           print MUDELA;
+           if ( $verbatim_b ) {
+               my $s = $_;
+               $s =~ s/\t/    /g; #shit
+               print BOOK $s;
+           }
+           
+       } else {
+           if (/^\\begin(\[.*\])?{mudela}/ ) {
+               my $opts ="";
+               $opts = $1 if ( defined ($1));
+
+               parse_mudela_opts($opts);
+               open_mudela;
+               next;  
+           } 
+           print BOOK;
+       }
+    }
+    close INFILE;
+    close BOOK;
+}
+
+main;
index 0cd180d68b1be563d64138dac9ceb1668ce8fa46..d95553a8b69dfa8c0658173303eb11865fb750c6 100755 (executable)
@@ -2,15 +2,15 @@
 
 # script to automate releases
 
-grep -q  '^TOP' .version
+grep -q  '^TOP' VERSION
     res=$?
-if test ! -f .version  || test $res != 0; then
+if test ! -f VERSION  || test $res != 0; then
     echo not in topleveldir
     exit 1
 fi    
 
 function setversion() {
-eval `sed -n 's/^\([A-Z_]*\) *= *\(.*\)$/\1=\2/p' .version`
+eval `sed -n 's/^\([A-Z_]*\) *= *\(.*\)$/\1=\2/p' VERSION`
 
 MJ=$TOPLEVEL_MAJOR_VERSION
 MI=$TOPLEVEL_MINOR_VERSION
diff --git a/bin/show-latest b/bin/show-latest
deleted file mode 100755 (executable)
index 066a26f..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/perl
-
-
-$reldir="~/musix/releases";
-
-use FileHandle;
-
-sub  cmpver 
-{      
-
-       my(@a)= split /\./,$a;
-       my(@b)= split /\./,$b;
-       
-       for $i (0,1,2) {
-           return $a[$i] <=> $b[$i] if ($a[$i] != $b[$i]);
-       }
-       return $a cmp $b;
-}
-
-my @versions;
-open LS, "ls -1 $reldir|";
-
-
-while (<LS>) {
-       
-    $_ =~ /lilypond-([^.]+\.[^.]+\.[^.]+).tar.gz/;
-    push @versions, $1;
-}
-
-
-@versions = sort cmpver @versions;
-my $last= (pop @versions);
-
-
-system "rm $reldir/zZ*";
-system  "> $reldir/zZ_LATEST_IS_$last";
-
-open NEWS, "tar --to-stdout  -zxf $reldir/lilypond-$last.tar.gz lilypond-$last/NEWS |";
-input_record_separator NEWS "****";
-$desc = <NEWS>;
-chop ($desc);
-close NEWS;
-    print $desc;
diff --git a/bin/show-latest.in b/bin/show-latest.in
new file mode 100644 (file)
index 0000000..e87a6ad
--- /dev/null
@@ -0,0 +1,43 @@
+#!@PERL@
+
+
+$reldir="~/musix/releases";
+
+use FileHandle;
+
+sub  cmpver 
+{      
+
+       my(@a)= split /\./,$a;
+       my(@b)= split /\./,$b;
+       
+       for $i (0,1,2) {
+           return $a[$i] <=> $b[$i] if ($a[$i] != $b[$i]);
+       }
+       return $a cmp $b;
+}
+
+my @versions;
+open LS, "ls -1 $reldir|";
+
+
+while (<LS>) {
+       
+    $_ =~ /lilypond-([^.]+\.[^.]+\.[^.]+).tar.gz/;
+    push @versions, $1;
+}
+
+
+@versions = sort cmpver @versions;
+my $last= (pop @versions);
+
+
+system "rm $reldir/zZ*";
+system  "> $reldir/zZ_LATEST_IS_$last";
+
+open NEWS, "tar --to-stdout  -zxf $reldir/lilypond-$last.tar.gz lilypond-$last/NEWS |";
+input_record_separator NEWS "****";
+$desc = <NEWS>;
+chop ($desc);
+close NEWS;
+    print $desc;
index 25709197dc04dd2437be16c226a7be985696e3c2..53b21410e9f8d18a25bb3b379f91fcb4ab73ba9e 100755 (executable)
--- a/configure
+++ b/configure
@@ -14,19 +14,19 @@ ac_default_prefix=/usr/local
 ac_help="$ac_help
   enable-printing         turn on debug printing"
 ac_help="$ac_help
-  disable-checking        set runtime checks (assert calls)"
+  enable-checking        set runtime checks (assert calls). Default: on"
 ac_help="$ac_help
-  disable-debugging       set debug info "
+  enable-debugging       set debug info. Default: on"
 ac_help="$ac_help
-  enable-optimise         use maximal speed optimisations"
+  enable-optimise         use maximal speed optimisations. Default: off"
 ac_help="$ac_help
-  enable-profiling        compile with gprof support"
+  enable-profiling        compile with gprof support. Default: off"
 ac_help="$ac_help
   mingw-prefix=DIR        set the mingw32 directory (standalone windows32 exes)"
 ac_help="$ac_help
   tex-prefix=DIR          set the tex-directory to find TeX subdirectories. (default: PREFIX)"
 ac_help="$ac_help
-  tex-dir=DIR             set the directory to put LilyPond  TeX files in. "
+  tex-dir=DIR             set the directory to put LilyPond TeX files in. "
 ac_help="$ac_help
   mf-dir=DIR              set the directory to put LilyPond MetaFont files in."
 
@@ -539,12 +539,21 @@ fi
 
 
 # if given here, these vars are initted at the checking point.
+if test x$host = xNONE; then
+    buildprefix=.
+else
+    buildprefix="$host-build-dir"
+    mkdir $buildprefix;
+    for a in `find -type d -and -not -name '*-build-dir'`; do
+       mkdir $buildprefix/$a;
+    done
+fi
 printing_b=no
 checking_b=yes
 debug_b=yes
 optimise_b=no
 profile_b=no
-    
+warn_b=no    
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -660,7 +669,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:664: checking for $ac_word" >&5
+echo "configure:673: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -691,7 +700,7 @@ test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:695: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:704: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -701,11 +710,11 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L
 cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext <<EOF
-#line 705 "configure"
+#line 714 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -725,12 +734,12 @@ if test $ac_cv_prog_cxx_works = no; then
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:729: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:738: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:734: checking whether we are using GNU C++" >&5
+echo "configure:743: checking whether we are using GNU C++" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -739,7 +748,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
@@ -754,7 +763,7 @@ if test $ac_cv_prog_gxx = yes; then
   ac_save_CXXFLAGS="$CXXFLAGS"
   CXXFLAGS=
   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:758: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:767: checking whether ${CXX-g++} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -784,7 +793,7 @@ fi
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:788: checking for $ac_word" >&5
+echo "configure:797: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -840,7 +849,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:844: checking for a BSD compatible install" >&5
+echo "configure:853: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -894,7 +903,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:898: checking for $ac_word" >&5
+echo "configure:907: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -928,7 +937,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:932: checking for $ac_word" >&5
+echo "configure:941: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -959,7 +968,10 @@ test -n "$FIND" || FIND="error"
 
 
 if test FIND = error; then
-   echo "configure: warning: Couldn't find \`find'.  Please use --enable-tex-dir" 1>&2
+   
+    echo "configure: warning: Couldn't find \`find'.  Please use --enable-tex-dir" 1>&2
+    warn_b=yes
+
 fi
     
 
@@ -977,12 +989,13 @@ fi
 
 
 
+
 for ac_prog in bison
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:986: checking for $ac_word" >&5
+echo "configure:999: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1016,7 +1029,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1020: checking for $ac_word" >&5
+echo "configure:1033: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1050,7 +1063,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1054: checking for $ac_word" >&5
+echo "configure:1067: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1079,12 +1092,44 @@ test -n "$MAKE" && break
 done
 test -n "$MAKE" || MAKE="error"
 
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1099: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$PERL" in
+  /*)
+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_PERL="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="error"
+  ;;
+esac
+fi
+PERL="$ac_cv_path_PERL"
+if test -n "$PERL"; then
+  echo "$ac_t""$PERL" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
 for ac_prog in pod2man
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1088: checking for $ac_word" >&5
+echo "configure:1133: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_PODMAN'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1114,13 +1159,13 @@ done
 test -n "$PODMAN" || PODMAN="error"
 
 
-    
+
 if test "x$TEXPREFIX" = xauto ; then
     
     
 
     echo $ac_n "checking TeX/MF root dir directory""... $ac_c" 1>&6
-echo "configure:1124: checking TeX/MF root dir directory" >&5    
+echo "configure:1169: checking TeX/MF root dir directory" >&5    
 
     find_root_prefix="$prefix"
     
@@ -1137,7 +1182,10 @@ echo "configure:1124: checking TeX/MF root dir directory" >&5
     
     if test "x$find_texpostfix" = x; then
        find_texpostfix='/lib/texmf/tex'
-       echo "configure: warning: Cannot determine the TeX-directory. Please use --enable-tex-prefix" 1>&2
+       
+    echo "configure: warning: Cannot determine the TeX-directory. Please use --enable-tex-prefix" 1>&2
+    warn_b=yes
+
     fi
 
     find_texprefix="$find_root_prefix/$find_texpostfix"
@@ -1158,14 +1206,17 @@ if test "x$TEXDIR" = xauto ; then
     
     
     echo $ac_n "checking TeX input directory""... $ac_c" 1>&6
-echo "configure:1162: checking TeX input directory" >&5    
+echo "configure:1210: checking TeX input directory" >&5    
     find_dirdir=`(cd $find_texprefix; 
       $FIND ./ -type d -a -name tex -print |sort|head -1|sed 's#^\./##')`
     
 
     if test "x$find_dirdir" = x; then
        find_dirdir="/tex";
-       echo "configure: warning: Cannot determine TeX input subdirectory. Please set from command-line" 1>&2
+       
+    echo "configure: warning: Cannot determine TeX input subdirectory. Please set from command-line" 1>&2
+    warn_b=yes
+
        true
     fi
     TEXDIR=$find_dirdir
@@ -1175,27 +1226,6 @@ echo "configure:1162: checking TeX input directory" >&5
 
 fi
 
-if test "x$MFDIR" = xauto; then
-    
-    
-    
-    echo $ac_n "checking MF input directory""... $ac_c" 1>&6
-echo "configure:1184: checking MF input directory" >&5    
-    find_dirdir=`(cd $find_texprefix; 
-      $FIND ./ -type d -a -name source -print |sort|head -1|sed 's#^\./##')`
-    
-
-    if test "x$find_dirdir" = x; then
-       find_dirdir="/source";
-       echo "configure: warning: Cannot determine MF input subdirectory. Please set from command-line" 1>&2
-       true
-    fi
-    MFDIR=$find_dirdir
-    echo "$ac_t""$find_texprefix/$find_dirdir" 1>&6
-
-    MFDIR="$TEXPREFIX/$MFDIR"
-
-fi
     
 if test $MAKE = "error" 
 then
@@ -1204,39 +1234,66 @@ else
        $MAKE -v| grep GNU > /dev/null
        if test "$?" = 1
        then
-           echo "configure: warning: Please install *GNU* make" 1>&2 
+           
+    echo "configure: warning: Please install *GNU* make" 1>&2
+    warn_b=yes
     fi 
 fi 
     
 if test $BISON = "error" 
 then
-       echo "configure: warning: can't find bison. Please install Bison (1.25 or better)" 1>&2
+       
+    echo "configure: warning: can't find bison. Please install Bison (1.25 or better)" 1>&2
+    warn_b=yes
+
 else
     bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
     if test $bison_version -lt 25; then
-       echo "configure: warning: Your bison is too old (1.$bison_version). Please install 1.25" 1>&2
+       
+    echo "configure: warning: Your bison is too old (1.$bison_version). Please install 1.25" 1>&2
+    warn_b=yes
+
     fi 
 fi
 
+if test $PERL = "error" 
+then
+       
+    echo "configure: warning: can't find perl. You should install Perl (version 5 or better)" 1>&2
+    warn_b=yes
+
+       PERL=/usr/bin/perl
+fi
+
 if test $PODMAN = "error" 
 then
-       echo "configure: warning: can't find pod. You should install Perl (version 5 or better)" 1>&2
+       
+    echo "configure: warning: can't find pod. You should install Perl (version 5 or better)" 1>&2
+    warn_b=yes
+
 fi
 
 if test $FLEX = "error" 
 then
-       echo "configure: warning: can't find flex. Please install Flex (2.5 or better)" 1>&2
+       
+    echo "configure: warning: can't find flex. Please install Flex (2.5 or better)" 1>&2
+    warn_b=yes
+
 fi
 
 if $CXX --version | grep '2\.7' > /dev/null
 then
        true
 else
-       echo "configure: warning: can't find g++ 2.7" 1>&2
+       
+    echo "configure: warning: can't find g++ 2.7" 1>&2
+    warn_b=yes
+
 fi
 
 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:1240: checking how to run the C++ preprocessor" >&5
+echo "configure:1297: checking how to run the C++ preprocessor" >&5
 if test -z "$CXXCPP"; then
 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1249,12 +1306,12 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L
 cross_compiling=$ac_cv_prog_cxx_cross
   CXXCPP="${CXX-g++} -E"
   cat > conftest.$ac_ext <<EOF
-#line 1253 "configure"
+#line 1310 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1274,17 +1331,17 @@ echo "$ac_t""$CXXCPP" 1>&6
 
 ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6
-echo "configure:1278: checking for FlexLexer.h" >&5
+echo "configure:1335: checking for FlexLexer.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1283 "configure"
+#line 1340 "configure"
 #include "confdefs.h"
 #include <FlexLexer.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1303,9 +1360,13 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   true
 else
   echo "$ac_t""no" 1>&6
-echo "configure: warning: can't find flex header. Please install Flex headers correctly" 1>&2
+
+    echo "configure: warning: can't find flex header. Please install Flex headers correctly" 1>&2
+    warn_b=yes
+
 fi
 
+
 subdirs="flower"
 
 trap '' 1 2 15
@@ -1421,7 +1482,7 @@ done
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
-trap 'rm -fr `echo "make/out/Configure_variables.make:make/Configure_variables.make.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "$buildprefix/make/out/Configure_variables.make:make/Configure_variables.make.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -1464,6 +1525,7 @@ s%@COMPILEINFO@%$COMPILEINFO%g
 s%@AUTOHEADER@%$AUTOHEADER%g
 s%@BISON@%$BISON%g
 s%@FLEX@%$FLEX%g
+s%@PERL@%$PERL%g
 s%@TEXPREFIX@%$TEXPREFIX%g
 s%@TEXDIR@%$TEXDIR%g
 s%@MFDIR@%$MFDIR%g
@@ -1513,7 +1575,7 @@ EOF
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"make/out/Configure_variables.make:make/Configure_variables.make.in"}
+CONFIG_FILES=\${CONFIG_FILES-"$buildprefix/make/out/Configure_variables.make:make/Configure_variables.make.in"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -1687,9 +1749,9 @@ fi
 eval "DIR_DATADIR=$datadir"
 DIR_DATADIR="$DIR_DATADIR/lilypond"
 echo $ac_n "checking ""... $ac_c" 1>&6
-echo "configure:1691: checking " >&5
+echo "configure:1753: checking " >&5
 
-cat << EOF > lib/out/config.hh
+cat << EOF > $buildprefix/lib/out/config.hh
 
 /* automatically generated by configure */
 /* include this file only once! */
@@ -1698,28 +1760,45 @@ cat << EOF > lib/out/config.hh
 
 EOF
 
-CXX="$ac_cv_prog_CXX" bin/make-version >> lib/out/config.hh
+CXX="$ac_cv_prog_CXX" bin/make-version >> $buildprefix/lib/out/config.hh
 
-touch make/out/Site.make
+touch $buildprefix/make/out/Site.make
 
 # ugr
-(cd mi2mu; CXX="$ac_cv_prog_CXX" ../bin/make-version > out/version.hh
+(cd mi2mu; CXX="$ac_cv_prog_CXX" ../bin/make-version > ../$buildprefix/mi2mu/out/version.hh
+
 )
-# rgu
-sed 's/TOPLEVEL_//g' <  .version >  lily/.version
-(cd lily; CXX="$ac_cv_prog_CXX" ../bin/make-version > out/version.hh
+(cd lily; CXX="$ac_cv_prog_CXX" ../bin/make-version > ../$buildprefix/lily/out/version.hh
 )
 
-echo '# WARNING : Automatically generated from make/Toplevel.make.in' | cat -  make/Toplevel.make.in > Makefile
+echo '# WARNING : Automatically generated from make/Toplevel.make.in' \
+    | cat - make/Toplevel.make.in > Makefile
+
 
 cat << END
 For making everything, do:
 
     make               # GNU make
 
+or if you used --host=SunUltraWitteReus
+
+    make buildprefix=SunUltraWitteReus-build-dir
+    
 If you want to make site-wide extensions to the makefiles, please use
 
     make/out/Site.make
     
 END
 
+if test $warn_b = "yes" ; then
+cat <<EOF
+    
+    *******************************
+    Warning: configure found errors. 
+    Please resolve these and rerun configure
+    before sending any bugreports.
+    *******************************
+    
+EOF
+fi
+        
index b6a82463650f11da50ee6fab28fa49a31fbfcd5c..f209a26110e4e409ff05c6b7040d2d12fd1e8aef 100644 (file)
@@ -4,6 +4,10 @@ dnl  Process this file with autoconf to produce a configure script.
 dnl should cache result.
 dnl should  look in $prefix first.
 
+AC_DEFUN(AC_LILY_WARN, [
+    AC_MSG_WARN($1)
+    warn_b=yes
+])
 AC_DEFUN(AC_TEX_PREFIX, [
     
 
@@ -24,7 +28,7 @@ AC_DEFUN(AC_TEX_PREFIX, [
     
     if test "x$find_texpostfix" = x; then
        find_texpostfix='/lib/texmf/tex'
-       AC_MSG_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
+       AC_LILY_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
     fi
 
     find_texprefix="$find_root_prefix/$find_texpostfix"
@@ -52,7 +56,7 @@ AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [
 
     if test "x$find_dirdir" = x; then
        find_dirdir="/$3";
-       AC_MSG_WARN(Cannot determine $4 subdirectory. Please set from command-line)
+       AC_LILY_WARN(Cannot determine $4 subdirectory. Please set from command-line)
        true
     fi
     $2=$find_dirdir
@@ -75,12 +79,21 @@ AC_INIT(flower/choleski.cc)
 
 
 # if given here, these vars are initted at the checking point.
+if test x$host = xNONE; then
+    buildprefix=.
+else
+    buildprefix="$host-build-dir"
+    mkdir $buildprefix;
+    for a in `find -type d -and -not -name '*-build-dir'`; do
+       mkdir $buildprefix/$a;
+    done
+fi
 printing_b=no
 checking_b=yes
 debug_b=yes
 optimise_b=no
 profile_b=no
-    
+warn_b=no    
 AC_LANG_CPLUSPLUS
 
 AC_ARG_ENABLE(printing,
@@ -89,19 +102,19 @@ AC_ARG_ENABLE(printing,
 
        
 AC_ARG_ENABLE(checking,
-    [  disable-checking        set runtime checks (assert calls)],
+    [  enable-checking        set runtime checks (assert calls). Default: on],
     [checking_b=$enableval] )
 
 AC_ARG_ENABLE(debugging,
-    [  disable-debugging       set debug info ],
+    [  enable-debugging       set debug info. Default: on],
     [debug_b=$enableval])
 
 AC_ARG_ENABLE(optimise,
-    [  enable-optimise         use maximal speed optimisations],
+    [  enable-optimise         use maximal speed optimisations. Default: off],
     [optimise_b=$enableval])
     
 AC_ARG_ENABLE(profiling, 
-    [  enable-profiling        compile with gprof support],
+    [  enable-profiling        compile with gprof support. Default: off],
     [profile_b=$enableval])
     
 AC_ARG_ENABLE(mingw-prefix,
@@ -115,7 +128,7 @@ AC_ARG_ENABLE(tex-prefix,
     [TEXPREFIX=auto] )
     
 AC_ARG_ENABLE(tex-dir,
-    [  tex-dir=DIR             set the directory to put LilyPond  TeX files in. ],
+    [  tex-dir=DIR             set the directory to put LilyPond TeX files in. ],
     [TEXDIR=$enableval],
     [TEXDIR=auto] )
 
@@ -163,7 +176,7 @@ AC_CHECK_PROGS(FIND, find, error)
 
 dnl should check out -print
 if test FIND = error; then
-   AC_MSG_WARN(Couldn't find \`find'.  Please use --enable-tex-dir)
+   AC_LILY_WARN(Couldn't find \`find'.  Please use --enable-tex-dir)
 fi
     
 AC_SUBST(CXXFLAGS)
@@ -176,6 +189,7 @@ AC_SUBST(COMPILEINFO)
 AC_SUBST(AUTOHEADER)
 AC_SUBST(BISON)
 AC_SUBST(FLEX)
+AC_SUBST(PERL)
 AC_SUBST(TEXPREFIX)
 AC_SUBST(TEXDIR)
 AC_SUBST(MFDIR)
@@ -184,9 +198,10 @@ AC_SUBST(EXTRA_LIBES)
 AC_CHECK_PROGS(BISON, bison, error)
 AC_CHECK_PROGS(FLEX, flex, error)
 AC_CHECK_PROGS(MAKE, make, error)
+AC_PATH_PROG(PERL, perl, error)
 AC_CHECK_PROGS(PODMAN, pod2man, error)
 
-    
+
 if test "x$TEXPREFIX" = xauto ; then
     AC_TEX_PREFIX(TEXPREFIX)
 else
@@ -197,9 +212,9 @@ if test "x$TEXDIR" = xauto ; then
     AC_TEX_SUBDIR(TEXDIR)
 fi
 
-if test "x$MFDIR" = xauto; then
-    AC_MF_SUBDIR(MFDIR)
-fi
+dnl if test "x$MFDIR" = xauto; then
+dnl     AC_MF_SUBDIR(MFDIR)
+dnl fi
     
 if test $MAKE = "error" 
 then
@@ -208,41 +223,48 @@ else
        $MAKE -v| grep GNU > /dev/null
        if test "$?" = 1
        then
-           AC_MSG_WARN(Please install *GNU* make) 
+           AC_LILY_WARN(Please install *GNU* make) 
     fi 
 fi 
     
 if test $BISON = "error" 
 then
-       AC_MSG_WARN(can't find bison. Please install Bison (1.25 or better))
+       AC_LILY_WARN(can't find bison. Please install Bison (1.25 or better))
 else
     bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
     if test $bison_version -lt 25; then
-       AC_MSG_WARN(Your bison is too old (1.$bison_version). Please install 1.25)
+       AC_LILY_WARN(Your bison is too old (1.$bison_version). Please install 1.25)
     fi 
 fi
 
+if test $PERL = "error" 
+then
+       AC_LILY_WARN(can't find perl. You should install Perl (version 5 or better))
+       PERL=/usr/bin/perl
+fi
+
 if test $PODMAN = "error" 
 then
-       AC_MSG_WARN(can't find pod. You should install Perl (version 5 or better))
+       AC_LILY_WARN(can't find pod. You should install Perl (version 5 or better))
 fi
 
 if test $FLEX = "error" 
 then
-       AC_MSG_WARN(can't find flex. Please install Flex (2.5 or better))
+       AC_LILY_WARN(can't find flex. Please install Flex (2.5 or better))
 fi
 
 if $CXX --version | grep '2\.7' > /dev/null
 then
        true
 else
-       AC_MSG_WARN(can't find g++ 2.7)
+       AC_LILY_WARN(can't find g++ 2.7)
 fi
 
 AC_CHECK_HEADER(FlexLexer.h, true,
-       AC_MSG_WARN(can't find flex header. Please install Flex headers correctly))
+       AC_LILY_WARN(can't find flex header. Please install Flex headers correctly))
+
 AC_CONFIG_SUBDIRS(flower)
-AC_OUTPUT(make/out/Configure_variables.make:make/Configure_variables.make.in)
+AC_OUTPUT($buildprefix/make/out/Configure_variables.make:make/Configure_variables.make.in)
 
 
 
@@ -251,7 +273,7 @@ eval "DIR_DATADIR=$datadir"
 DIR_DATADIR="$DIR_DATADIR/lilypond"
 AC_MSG_CHECKING
 
-cat << EOF > lib/out/config.hh
+cat << EOF > $buildprefix/lib/out/config.hh
 
 /* automatically generated by configure */
 /* include this file only once! */
@@ -260,29 +282,45 @@ cat << EOF > lib/out/config.hh
 
 EOF
 
-CXX="$ac_cv_prog_CXX" bin/make-version >> lib/out/config.hh
+CXX="$ac_cv_prog_CXX" bin/make-version >> $buildprefix/lib/out/config.hh
 
-touch make/out/Site.make
+touch $buildprefix/make/out/Site.make
 
 # ugr
-(cd mi2mu; CXX="$ac_cv_prog_CXX" ../bin/make-version > out/version.hh
-dnl    echo 0 > out/.build
+(cd mi2mu; CXX="$ac_cv_prog_CXX" ../bin/make-version > ../$buildprefix/mi2mu/out/version.hh
+
 )
-# rgu
-sed 's/TOPLEVEL_//g' <  .version >  lily/.version
-(cd lily; CXX="$ac_cv_prog_CXX" ../bin/make-version > out/version.hh
+(cd lily; CXX="$ac_cv_prog_CXX" ../bin/make-version > ../$buildprefix/lily/out/version.hh
 )
 
-echo '# WARNING : Automatically generated from make/Toplevel.make.in' | cat -  make/Toplevel.make.in > Makefile
+echo '# WARNING : Automatically generated from make/Toplevel.make.in' \
+    | cat - make/Toplevel.make.in > Makefile
+
 
 cat << END
 For making everything, do:
 
     make               # GNU make
 
+or if you used --host=SunUltraWitteReus
+
+    make buildprefix=SunUltraWitteReus-build-dir
+    
 If you want to make site-wide extensions to the makefiles, please use
 
     make/out/Site.make
     
 END
 
+if test $warn_b = "yes" ; then
+cat <<EOF
+    
+    *******************************
+    Warning: configure found errors. 
+    Please resolve these and rerun configure
+    before sending any bugreports.
+    *******************************
+    
+EOF
+fi
+        
diff --git a/flower/.version b/flower/.version
deleted file mode 100644 (file)
index 6214501..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MAJOR_VERSION = 1
-MINOR_VERSION = 1
-PATCH_LEVEL = 23
-# use to send patches, always empty for released version:
-MY_PATCH_LEVEL = # include separator: "-1" or ".a"
-#
index f68ca1c5a8584dda94cc907ccba039cc9f97af75..30b2a6f8f4294a7e7d8c4c5c49159c8316cac472 100644 (file)
@@ -17,17 +17,18 @@ depth = ..
 #
 NAME = flower
 MODULE_NAME = flower
-include out/Flower-flags.make
 #
-# edit .version only
-include ./$(depth)/.version
-include ./$(depth)/flower/.version
+# edit VERSION only
+include ./$(depth)/VERSION
+include ./$(depth)/flower/VERSION
 
 # generic variables:
 #
 include ./$(depth)/make/Variables.make
 include ./$(depth)/make/Files.make 
 
+include $(flowerout)/Flower-flags.make
+
 
 #
 # descent order into subdirectories:
@@ -39,7 +40,7 @@ SUBDIRS = include test
 #
 SCRIPTS = 
 README_FILES = NEWS README TODO
-EXTRA_DISTFILES= configure config.hh.in configure.in .version $(README_FILES) $(SCRIPTS) Flower-flags.make.in
+EXTRA_DISTFILES= configure config.hh.in configure.in VERSION $(README_FILES) $(SCRIPTS) Flower-flags.make.in
 #
 
 
index 3b0cf5e684512b9a2eed3a0efb73311292023dd0..a93f485302ac60247617d70722e2b1f9335c7e1d 100644 (file)
@@ -1,8 +1,14 @@
 version 1.1:
 
+pl 24 
+       - Diagonal_storage for band matrices.
+       - matrix hackings: support for other Matrix_storage
+       - NAME_MEMBERS(); -> DECLARE_MY_RUNTIME_TYPEINFO;
+       - Matrix::band_i()
+
 pl 23:
        - virtual-methods : static_is_type_b
-       - Choleski checks no if PARANOID
+       - Choleski checks off if not PARANOID
 pl 22:
        - ACursor and PACursor to give array a List like interface.
 
diff --git a/flower/VERSION b/flower/VERSION
new file mode 100644 (file)
index 0000000..fafe510
--- /dev/null
@@ -0,0 +1,6 @@
+MAJOR_VERSION = 1
+MINOR_VERSION = 1
+PATCH_LEVEL = 24
+# use to send patches, always empty for released version:
+MY_PATCH_LEVEL = # include separator: "-1" or ".a"
+#
index 202e184440cb62f68153b552a8c1038337a41516..d619b97460f724c428e00758a32e94fbb4aa2602 100644 (file)
@@ -9,6 +9,9 @@
 #include "choleski.hh"
 const Real EPS = 1e-7;         // so sue me. Hard coded
 
+// for testing new Matrix_storage.
+//#define PARANOID
+
 Vector
 Choleski_decomposition::solve(Vector rhs)const
 {
@@ -37,20 +40,11 @@ Choleski_decomposition::solve(Vector rhs)const
     return x;
 }
 
-/*
-  Standard matrix algorithm.
-  Should add support for banded matrices
-  */
-
-Choleski_decomposition::Choleski_decomposition(Matrix P)
-    : L(P.dim()), D(P.dim())
+void
+Choleski_decomposition::full_matrix_decompose(Matrix const & P)
 {
-    int n = P.dim();
-
-#ifdef PARANOID
-    assert((P-P.transposed()).norm()/P.norm() < EPS);
-#endif
-    
+   int n = P.dim();
     L.unit();
     for (int k= 0; k < n; k++) {
        for (int j = 0; j < k; j++){
@@ -67,6 +61,52 @@ Choleski_decomposition::Choleski_decomposition(Matrix P)
        D(k) = d;
     }
 
+}
+
+void
+Choleski_decomposition::band_matrix_decompose(Matrix const &P)
+{
+    int n = P.dim();
+    int b = P.band_i();
+    L.unit();
+    
+    for (int i= 0; i < n; i++) {
+       for (int j = 0 >? i - b; j < i; j++){
+           Real sum(0.0);
+           for (int l=0 >? i - b; l < j; l++)
+               sum += L(i,l)*L(j,l)*D(l);
+           L(i,j) = (P(i,j) - sum)/D(j);
+       }
+       Real sum=0.0;
+       
+       for (int l=0 >? i - b; l < i; l++)
+           sum += sqr(L(i,l))*D(l);
+       Real d = P(i,i) - sum;
+       D(i) = d;
+    }
+    L.try_set_band();
+    assert ( L.band_i() == P.band_i());
+}
+
+
+
+
+/*
+  Standard matrix algorithm.
+   */
+
+Choleski_decomposition::Choleski_decomposition(Matrix const & P)
+   : L(P.dim()), D(P.dim())
+{ 
+#ifdef PARANOID
+    assert((P-P.transposed()).norm()/P.norm() < EPS);
+#endif
+    if  (P.band_b()) 
+       band_matrix_decompose(P);
+    else
+       full_matrix_decompose(P);
+
 #ifdef PARANOID
     assert((original()-P).norm() / P.norm() < EPS);
 #endif
index 5ede2662f7128080084f49c11f2d621b74afd3ad..53ff4301cf99ed7da2bee61ce08d75c89c17108d 100755 (executable)
@@ -534,6 +534,17 @@ optimise_b=yes
 shared_b=no
 LIB_SUFFIX=.a
 
+# if given here, these vars are initted at the checking point.
+if test x$host = xNONE; then
+    flowerbuildprefix=.
+else
+    flowerbuildprefix="../$host-build-dir/Flower"
+    mkdir $flowerbuildprefix;
+    for a in `find -type d -and -not -name '*-build-dir'`; do
+       mkdir $flowerbuildprefix/$a;
+    done
+fi
+    
 # Check whether --enable-shared or --disable-shared was given.
 if test "${enable_shared+set}" = set; then
   enableval="$enable_shared"
@@ -567,7 +578,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:571: checking for $ac_word" >&5
+echo "configure:582: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -598,7 +609,7 @@ test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:602: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:613: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -608,11 +619,11 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L
 cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext <<EOF
-#line 612 "configure"
+#line 623 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -632,12 +643,12 @@ if test $ac_cv_prog_cxx_works = no; then
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:636: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:647: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:641: checking whether we are using GNU C++" >&5
+echo "configure:652: checking whether we are using GNU C++" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -646,7 +657,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
@@ -661,7 +672,7 @@ if test $ac_cv_prog_gxx = yes; then
   ac_save_CXXFLAGS="$CXXFLAGS"
   CXXFLAGS=
   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:665: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:676: checking whether ${CXX-g++} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -689,7 +700,7 @@ else
 fi
 
 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:693: checking for 8-bit clean memcmp" >&5
+echo "configure:704: 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
@@ -697,7 +708,7 @@ else
   ac_cv_func_memcmp_clean=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 701 "configure"
+#line 712 "configure"
 #include "confdefs.h"
 #ifdef __cplusplus
 extern "C" void exit(int);
@@ -710,7 +721,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:725: \"$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
@@ -728,12 +739,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
-echo "configure:732: checking for vprintf" >&5
+echo "configure:743: 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
-#line 737 "configure"
+#line 748 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -759,7 +770,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
@@ -783,12 +794,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:787: checking for _doprnt" >&5
+echo "configure:798: 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
-#line 792 "configure"
+#line 803 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -814,7 +825,7 @@ _doprnt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
@@ -841,12 +852,12 @@ fi
 for ac_func in memmem snprintf 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:845: checking for $ac_func" >&5
+echo "configure:856: 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
-#line 850 "configure"
+#line 861 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -872,7 +883,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -898,7 +909,7 @@ done
 
 
 
-CXX="$ac_cv_prog_CXX" ../bin/make-version > out/version.hh
+CXX="$ac_cv_prog_CXX" ../bin/make-version > $flowerbuildprefix/out/version.hh
 
 trap '' 1 2 15
 cat > confcache <<\EOF
@@ -1000,7 +1011,7 @@ done
 
 ac_given_srcdir=$srcdir
 
-trap 'rm -fr `echo "out/Flower-flags.make:Flower-flags.make.in out/config.hh:config.hh.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "$flowerbuildprefix/out/Flower-flags.make:Flower-flags.make.in $flowerbuildprefix/out/config.hh:config.hh.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -1076,7 +1087,7 @@ EOF
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"out/Flower-flags.make:Flower-flags.make.in"}
+CONFIG_FILES=\${CONFIG_FILES-"$flowerbuildprefix/out/Flower-flags.make:Flower-flags.make.in"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -1152,7 +1163,7 @@ ac_eD='%g'
 if test "${CONFIG_HEADERS+set}" != set; then
 EOF
 cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="out/config.hh:config.hh.in"
+  CONFIG_HEADERS="$flowerbuildprefix/out/config.hh:config.hh.in"
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 fi
index cac84bdbb757d89374808c6eedf61d370a6533f6..619a5fe71ef8f7ec9966cf236746f7e05740d888 100644 (file)
@@ -7,6 +7,17 @@ optimise_b=yes
 shared_b=no
 LIB_SUFFIX=.a
 
+# if given here, these vars are initted at the checking point.
+if test x$host = xNONE; then
+    flowerbuildprefix=.
+else
+    flowerbuildprefix="../$host-build-dir/Flower"
+    mkdir $flowerbuildprefix;
+    for a in `find -type d -and -not -name '*-build-dir'`; do
+       mkdir $flowerbuildprefix/$a;
+    done
+fi
+    
 AC_ARG_ENABLE(shared,
     [  enable-shared       shared flower library],
     [shared_b=$enableval])
@@ -33,9 +44,9 @@ AC_PROG_CXX
 AC_FUNC_MEMCMP
 AC_FUNC_VPRINTF
 AC_CHECK_FUNCS(memmem snprintf )
-AC_CONFIG_HEADER(out/config.hh:config.hh.in)
+AC_CONFIG_HEADER($flowerbuildprefix/out/config.hh:config.hh.in)
 
-CXX="$ac_cv_prog_CXX" ../bin/make-version > out/version.hh
+CXX="$ac_cv_prog_CXX" ../bin/make-version > $flowerbuildprefix/out/version.hh
 
-AC_OUTPUT(out/Flower-flags.make:Flower-flags.make.in)
+AC_OUTPUT($flowerbuildprefix/out/Flower-flags.make:Flower-flags.make.in)
 
diff --git a/flower/diagonal-storage.cc b/flower/diagonal-storage.cc
new file mode 100644 (file)
index 0000000..3cf2f93
--- /dev/null
@@ -0,0 +1,236 @@
+/*
+  diagonal-storage.cc -- implement Diagonal_storage 
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#include "diagonal-storage.hh"
+
+int
+Diagonal_storage::dim()const
+{
+    return band_.rows();
+}
+
+Diagonal_storage::Diagonal_storage()
+{
+}
+
+int
+Diagonal_storage::rows() const
+{
+    return band_.rows();
+}
+
+int
+Diagonal_storage::cols() const
+{
+    return band_.rows();
+}
+
+int
+Diagonal_storage::band_size_i()const
+{
+    return (band_.cols()-1)/2;
+}
+
+void
+Diagonal_storage::set_band_size(int s)
+{
+    Full_storage f(dim(), 2*s+1);
+    for (int i=0; i < dim(); i++) {
+       int k=-s;
+       for ( ;  k < -band_size_i(); k++)
+           f.elem(i,k + s) = 0.0;
+       for ( ; k <=  band_size_i()&& k<=s ; k++)
+           f.elem(i, k + s) = band_.elem(i,k+ band_size_i());
+       for( ; k <= s; k++)
+           f.elem(i, k + s) =0.0;
+    }
+
+    band_ = f;
+}
+
+
+
+/*
+  any takers?
+  */
+void
+Diagonal_storage::insert_row(int )
+{
+    assert(false);
+}
+
+void
+Diagonal_storage::delete_row(int )
+{
+    assert(false);
+}
+
+void
+Diagonal_storage::resize(int,int)
+{
+}
+
+void
+Diagonal_storage::resize(int)
+{
+}
+
+void
+Diagonal_storage::delete_column(int )
+{
+    assert(false);
+}
+    
+Diagonal_storage::~Diagonal_storage()
+{
+}
+
+
+bool
+Diagonal_storage::band_elt_b(int i,int j)const
+{
+    return abs(i-j) <= band_size_i();
+}
+
+void
+Diagonal_storage::assert_valid(int i,int j )const
+{
+    assert( band_elt_b(i,j) );
+    assert( i >=0 && j >=0 && i < dim() && j < dim());
+}
+
+
+void
+Diagonal_storage::resize_dim(int d)
+{
+    Full_storage f(d, 2*band_size_i()+1);
+    for (int i=0; i < d&& i < dim(); i++) {
+       for ( int k=0;  k < 2*band_size_i(); k++)
+           f.elem(i,k) = elem(i,k);
+    }
+
+    band_ = f;
+}
+
+
+
+bool
+Diagonal_storage::mult_ok(int i,int )const
+{
+    return i < dim();
+}
+
+void
+Diagonal_storage::mult_next(int &i, int &j)const
+{
+    j++;
+    if ( j < i - band_size_i() ) 
+       j = i- band_size_i();
+    if ( j > i + band_size_i() || j >= dim() ) {
+       i++;
+       j = i - band_size_i(); 
+       if  (j < 0)
+           j=0;
+    }
+}
+
+bool
+Diagonal_storage::trans_ok(int ,int j)const
+{
+    return j < dim();
+}
+
+void
+Diagonal_storage::trans_next(int &i, int& j)const
+{
+    i++;
+    if ( i < j - band_size_i())
+       i = j-band_size_i();
+    
+    if ( i >= dim() || i > j + band_size_i() ) {
+       j++;
+       i = j - band_size_i(); 
+       if  (i < 0)
+           i=0;
+    }
+}
+
+static Real nul_entry=0.0;
+
+Real 
+Diagonal_storage::elem(int i, int j)const
+{
+    if (abs ( i-j ) > band_size_i())
+       return 0;
+    else
+       return band_.elem(i, j - i +band_size_i());
+}
+
+Real &
+Diagonal_storage::elem(int i, int j)
+{
+    /*
+      if this fails, the previous call fucked up
+      */
+    assert(nul_entry);
+    if (abs ( i-j ) > band_size_i())
+       return nul_entry;
+    else
+       return band_.elem(i, j - i + band_size_i());
+}
+
+/*
+  Hairy routine to try to save some fp-ops
+ */
+
+bool
+Diagonal_storage::try_right_multiply(Matrix_storage*dest,
+                                    const Matrix_storage*right)const
+{
+    if ( right->name() != Diagonal_storage::static_name() ) 
+       return false;
+    
+    const Diagonal_storage*  diag = (Diagonal_storage const*)right;
+    int band2 = diag->band_size_i();
+    int n = dim();
+    /*
+      should check if dest is a Diagonal_storage of sufficient size too.
+     */
+    for (int i=0;  i < n; i++) {
+       for (int j = 0; j < n; j++) {
+           int startk = i - band_size_i() >? 0 >? j - band2;
+           int stopk = i + band_size_i() <? n-1 <? j  + band2;
+           int relk =  startk + band_size_i() -i;
+           Real sum =0.0;
+           for ( int k = startk; k <= stopk; k++)
+               sum += band_.elem(i, relk) * diag->elem(relk, j);
+           dest->elem(i, j) = sum;
+           
+       }
+    }
+    return true;
+}
+
+IMPLEMENT_IS_TYPE_B1(Diagonal_storage, Matrix_storage);
+
+
+Diagonal_storage::Diagonal_storage(Matrix_storage*stor_l, int band_i)
+{
+    set_band_size(band_i);
+    resize_dim(stor_l->dim());
+
+    for ( int i=0,j=0; mult_ok(i,j); mult_next(i,j))
+       band_.elem(i, j + band_i -i ) = stor_l->elem(i,j);
+}
+
+void
+Diagonal_storage::OK() const
+{
+    band_.OK();
+}
index 1b5c05a392c6d19721128d9f369b583e4d091c21..223796ba35337d095a06b43fe6580650b0409ec5 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
 #include "full-storage.hh"
@@ -23,12 +23,13 @@ void
 Full_storage::OK() const
 {
 #ifndef NDEBUG
-    //    static Real dummy;           
+
     assert(max_height_i_ >= height_i_ && max_width_i_ >= width_i_);
     assert(height_i_ >= 0 && width_i_ >= 0);
     assert(els_p_p_||!max_height_i_);
 #endif
 }
+
 void
 Full_storage::resize_cols(int newh)
 {
@@ -49,6 +50,18 @@ Full_storage::resize_cols(int newh)
     height_i_ = max_height_i_ = newh;
 }
 
+
+Full_storage::Full_storage(Matrix_storage*m)
+{
+    set_size(m->rows(), m->cols());
+    if ( !m->is_type_b ( Full_storage::static_name()))
+       for (int i=0; i<height_i_; i++)
+           for (int j=0; j<width_i_; j++)
+               els_p_p_[i][j]=0.0;
+    for (int i,j=0; m->mult_ok(i,j); m->mult_next(i,j))
+       els_p_p_[i][j] = m->elem(i,j);
+}
+
 void
 Full_storage::resize_rows(int neww)
 {
@@ -79,20 +92,19 @@ Full_storage::resize(int rows, int cols)
     OK();
     resize_cols(rows);
     resize_rows(cols);
-
 }
 
 
 bool
-Full_storage::mult_ok(int i, int j) const
+Full_storage::mult_ok(int i, int ) const
 {
-    return valid(i,j);
+    return i < height_i_;
 }
 
 bool
-Full_storage::trans_ok(int i, int j) const
+Full_storage::trans_ok(int , int j) const
 {
-       return valid(i,j);
+       return j < width_i_;
 } 
 
 
@@ -149,47 +161,21 @@ Full_storage::insert_row(int k)
 
 }
 
-
-Array<Real>
-Full_storage::row(int n) const
+int
+Full_storage::dim()const
 {
-    Array<Real> r;
-    for (int j = 0; j < width_i_; j++)
-       r.push(els_p_p_[n][j]);
-    return r;
+    assert (rows()==cols());
+    return rows();
 }
 
-Array<Real>
-Full_storage::column(int n) const
-{
-    
-    Array<Real> r;
-    for (int i = 0; i<height_i_; i++)
-       r.push(els_p_p_[i][n]);
-    return r;
-}
-
-
-Full_storage::Full_storage(Full_storage&s)
+Full_storage::Full_storage(Full_storage const&s)
 {
     init();
     (*this) = s;
 }
-Matrix_storage*
-Full_storage::clone()
-{
-    return new Full_storage(*this);
-}
-
-
-Matrix_storage *
-Matrix_storage::get_full(int n, int m)
-{
-    return new Full_storage(n,m);
-}
 
 bool
-Full_storage::try_right_multiply(Matrix_storage * dest, Matrix_storage const * right)
+Full_storage::try_right_multiply(Matrix_storage * dest, Matrix_storage const * right)const
 {
     if (dest->name() != Full_storage::static_name() ||
        right->name() != Full_storage::static_name())
@@ -211,5 +197,4 @@ Full_storage::try_right_multiply(Matrix_storage * dest, Matrix_storage const * r
     
     
 }
-IMPLEMENT_IS_TYPE_B(Matrix_storage);
 IMPLEMENT_IS_TYPE_B1(Full_storage,Matrix_storage);
index e783a7360315935d05845f9478165cc8fbdb00b6..1ad45cb4632748d8d20acea150c27eecfe651145 100644 (file)
@@ -8,7 +8,7 @@ depth = ../..
 # generic stuff/Makefile
 #
 include ./$(depth)/make/Include.make
-include ./$(depth)/flower/.version
+include ./$(depth)/flower/VERSION
 
 # identify module:
 #
index f5e9fb4f5a36be596f3b44f1d9cb0306c0e1f050..a3a02a11e0782d7d7c49ec41794fd1a547bbea9f 100644 (file)
@@ -24,7 +24,7 @@ struct Choleski_decomposition {
     P needs to be symmetric positive definite
     */
     
-    Choleski_decomposition(Matrix P);
+    Choleski_decomposition(Matrix const &P);
 
     /**
     solve Px = rhs
@@ -40,7 +40,9 @@ struct Choleski_decomposition {
     return P,  calc'ed from L and D
     */
     Matrix original() const;
-  
+private:
+    void full_matrix_decompose(Matrix const & P);
+    void band_matrix_decompose(Matrix const &P);
         
 };
 #endif
diff --git a/flower/include/diagonal-storage.hh b/flower/include/diagonal-storage.hh
new file mode 100644 (file)
index 0000000..517c5cd
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+  diagonal-storage.hh -- declare Diagonal_storage
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef DIAGONAL_STORAGE_HH
+#define DIAGONAL_STORAGE_HH
+#include "full-storage.hh"
+
+/**
+  Store a single-band matrix;
+
+  INVARIANT
+  
+  Diagonal_storage(i,j) == band_(i, j-i + band_size_i())
+  
+  band_.cols() == 2 * band_size_i() + 1
+  
+ */
+class Diagonal_storage : public Matrix_storage {
+    Full_storage band_;
+
+public:
+     void set_band_size(int b);
+   int band_size_i()const;
+    
+    void assert_valid(int i, int j) const;
+    bool band_elt_b(int,int )const;
+    void resize_dim(int);
+    
+    virtual void resize_rows(int d) { resize_dim (d); }
+    virtual void resize_cols(int d) { resize_dim(d); }
+    virtual int dim() const;
+
+    virtual int rows() const ;
+    virtual int cols() const ;
+    
+    
+    virtual void resize(int i, int j);
+    virtual void resize(int i);
+    
+    virtual Real& elem(int i,int j);
+    virtual Real elem(int i, int j) const;
+    Diagonal_storage(Matrix_storage* , int band_i);
+    Diagonal_storage();
+    void OK() const;
+    
+    virtual void insert_row(int k);
+    virtual void delete_row(int k);
+    virtual void delete_column(int k);
+    
+    ~Diagonal_storage();
+    virtual bool mult_ok(int i, int j)const;
+    virtual void mult_next(int &i, int &j) const ;
+    virtual bool trans_ok(int i, int j) const;
+    virtual void trans_next(int &i, int &j) const;
+    VIRTUAL_COPY_CONS(Diagonal_storage, Matrix_storage);
+    DECLARE_MY_RUNTIME_TYPEINFO;
+    virtual bool try_right_multiply(Matrix_storage * dest, Matrix_storage const *)const;
+};
+#endif // DIAGONAL_STORAGE_HH
index 1fe12e09e1168b8ed18350f5dcbd5649badf1dbe..a617c6f3795dd32bf9fc37895f9655f10b1afef2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  flower-debug.hh -- declare 
+  flower-debug.hh -- declare global constants relating to debug dumps
 
   source file of the Flower Library
 
index bcd778a9949b355deb343474e0d6285bd0a70444..78bafab43dc9c292f42fe57cb10ba8533fa0b96b 100644 (file)
@@ -13,6 +13,7 @@
 #include "varray.hh"
 #include "matrix-storage.hh"
 #include "real.hh"
+
 /// simplest matrix storage. refer to its baseclass for the doco.
 class Full_storage : public Matrix_storage
 {
@@ -49,14 +50,6 @@ public:
     }
     
     
-    virtual void set_size(int i, int j)
-    {
-       resize(i,j); //this could be more efficient.
-    }
-    
-    virtual void set_size(int i) {
-       set_size(i,i);
-    }
     virtual void resize(int i, int j);
     virtual void resize(int i) {
        resize(i,i);
@@ -66,13 +59,12 @@ public:
        assert(valid(i,j));
        return els_p_p_[i][j];
     }
-    virtual Real const & elem(int i, int j) const {
+    virtual Real elem(int i, int j) const {
        assert(valid(i,j));
        return els_p_p_[i][j];
     }
-    virtual Array<Real> row(int i) const;
-    virtual Array<Real> column(int j) const;
-
+    int dim()const;
+    Full_storage(Matrix_storage*);
     Full_storage() {
        init();
     }
@@ -80,7 +72,7 @@ public:
        init();
        set_size(i,j);
     }
-    Full_storage(Full_storage&);
+    Full_storage(Full_storage const&);
     Full_storage(int i) {
        init();
        set_size(i);
@@ -91,16 +83,15 @@ public:
     virtual void insert_row(int k);
     virtual void delete_row(int k);
     virtual void delete_column(int k);
-
     
     ~Full_storage();
     virtual bool mult_ok(int i, int j)const;
     virtual void mult_next(int &i, int &j) const ;
     virtual bool trans_ok(int i, int j) const;
     virtual void trans_next(int &i, int &j) const;
-    virtual Matrix_storage * clone();
-    NAME_MEMBERS();
-    virtual bool try_right_multiply(Matrix_storage * dest, Matrix_storage const * );
+    VIRTUAL_COPY_CONS(Full_storage,Matrix_storage);
+    DECLARE_MY_RUNTIME_TYPEINFO;
+    virtual bool try_right_multiply(Matrix_storage * dest, Matrix_storage const * )const;
 };
 
 #endif // FULL_STORAGE_HH
index d7e9310acfbaedd7900caa8dc893e180bf7b45ec..a5971b268808ad12478f75ee1c3a7169503754d6 100644 (file)
@@ -39,19 +39,22 @@ public:
 
     /// width of matrix
     virtual int cols() const = 0;
+
+    /// size if square
+    virtual int dim() const =0;
       
     /**  set the size. contents lost.       
       PRE
       i >=0, j>=0
     */
-    virtual void set_size(int rows, int cols) = 0;
+    virtual void set_size(int rows, int cols) ;
+
  
     /**set the size to square dimen. contents lost
       PRE
       i>=0
     */
-    virtual void set_size(int i) = 0;
+    virtual void set_size(int i) ;
      /**set the size to i.
 
       keep contents. If enlarged contents unspecified
@@ -72,7 +75,7 @@ public:
     virtual void resize(int i) = 0;
   
     
-        /**
+    /**
     access an element.
 
     Generate an errormessage, if this happens
@@ -82,10 +85,10 @@ public:
     virtual Real& elem(int i,int j) = 0;
 
     /// access a element, no modify
-    virtual Real const & elem(int i, int j) const = 0;
+    virtual Real elem(int i, int j) const = 0;
 
-    virtual Array<Real> row(int i) const = 0;
-    virtual Array<Real> column(int j) const = 0;
+    virtual Array<Real> row(int i) const ;
+    virtual Array<Real> column(int j) const;
 
     
     /**
@@ -106,7 +109,7 @@ public:
     virtual void delete_row(int k)=0;
         virtual void delete_column(int k)=0;
     virtual ~Matrix_storage() { }
-    virtual Matrix_storage *clone()=0;
+    virtual Matrix_storage *clone()const=0;
 
 
     
@@ -130,7 +133,7 @@ public:
      */
     virtual void mult_next(int &i, int &j) const  = 0;
 
-/**
+    /**
       valid matrix entry. return false if at end of row
     */
     virtual bool trans_ok(int i, int j) const=0;
@@ -144,25 +147,28 @@ public:
      */
 
     virtual void trans_next(int &i, int &j) const  = 0;
+    
     /// generate a "Full_storage" matrix    
     static Matrix_storage *get_full(int n, int m);
-    
-
+    static void set_band(Matrix_storage*&, int band);
+    static void set_full(Matrix_storage*&);
     virtual bool try_right_multiply(Matrix_storage *dest, 
-                                   const Matrix_storage *fact) ;
+                                   const Matrix_storage *fact)const ;
     /**
       RTTI.
      */
-    NAME_MEMBERS();
-};
-
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
+    
+    static Matrix_storage* get_product_result(Matrix_storage *left, 
+                                             Matrix_storage *right);
+    
+    
+    static void set_addition_result(
+       Matrix_storage *&dat, Matrix_storage *right);
+    static void set_product_result(
+       Matrix_storage*&dest, Matrix_storage*left, Matrix_storage*right);
+};
 
-inline bool
-Matrix_storage::try_right_multiply(Matrix_storage *, 
-                                   const Matrix_storage *)
-{
-    return false;
-}
 #endif // MATRIX_STORAGE_HH
 
index df013e084934698cb837e5b23dcab37a0dcd8451..b6e084efdafb7fe8abe345abdd0003daec4960ef 100644 (file)
 
 
 class Matrix {
+    friend Matrix operator *(Matrix const &m1, Matrix const &m2);
+
+protected:
     Matrix_storage *dat;
-    
+    void set(Matrix_storage*);
+    Matrix(Matrix_storage*);
 public:
     void OK() const { dat->OK(); }
     int cols() const { return dat->cols(); }
@@ -37,7 +41,16 @@ public:
     */
     int dim() const;
      
-    // Matrix() { dat = 0; } 
+    /**
+      the band size of the matrix.
+      @ret
+
+      0 <= band_i() <= dim
+      */
+    int band_i() const;
+    bool band_b()const;
+    void set_full()const;
+    void try_set_band()const;
     ~Matrix() { delete dat; }
 
     /// set entries to r 
@@ -76,7 +89,7 @@ public:
       square n matrix, initialised to null
     */
     Matrix(int n);
-
+   
     /**
       n x m matrix, init to 0
     */
@@ -140,4 +153,9 @@ inline Matrix operator -(Matrix m1,const Matrix m2)
     m1 -= m2;
     return m1;
 }
+inline Matrix operator +(Matrix m1,const Matrix m2)
+{
+    m1 += m2;
+    return m1;
+}
 #endif
index b8933baa0e279d76e0ad4b8573542dad82a18e13..88dad44aebc96825c0086d257976c618831e8b9e 100644 (file)
@@ -14,7 +14,7 @@
   The static_name() can *not* be inlined (this might have the effect that 
   s->name() != S::static_name(). Overlapping strings need not be merged in C++
  */
-#define NAME_MEMBERS() \
+#define DECLARE_MY_RUNTIME_TYPEINFO    \
 static char const *static_name();\
 static bool static_is_type_b(const char*s);\
 virtual bool is_type_b(const char *s)const { return static_is_type_b(s); } \
index 47a66896a52a2ed11f62e559a29c34704ed86202..099a05beb9351fc2ef915fb903531313a7fc2aff 100644 (file)
@@ -1,15 +1,26 @@
+/*
+  matrix-debug.cc -- implement Matrix print routines
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
 #include "flower-debug.hh"
 #include "matrix.hh"
+#include "matrix-storage.hh"
 
 
 Matrix::operator String() const
 {
     String s;
 #ifndef NPRINT
-    s="matrix {\n";
+    Matrix_storage const * stor_c_l = dat;
+    s=String("matrix { (")  + dat->name() + ")\n";
     for (int i=0; i< rows(); i++){
        for (int j = 0; j < cols(); j++) {
-           s+= String(dat->elem(i,j), "%6f ");
+           s+= String(stor_c_l->elem(i,j), "%6f ");
        }
        s+="\n";
     }
diff --git a/flower/matrix-storage.cc b/flower/matrix-storage.cc
new file mode 100644 (file)
index 0000000..76b89f7
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+  matrix-storage.cc -- implement Matrix_storage
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "full-storage.hh"
+#include "diagonal-storage.hh"
+
+void
+Matrix_storage::set_addition_result(Matrix_storage *&dat, Matrix_storage *right)
+{
+    if (dat && dat->name() == Diagonal_storage::static_name() 
+        && right->name() == Diagonal_storage::static_name()) {
+       Diagonal_storage *L = (Diagonal_storage*)dat;
+       Diagonal_storage* R = (Diagonal_storage*) right;
+
+       if ( R->band_size_i() > L->band_size_i()) { 
+           L->set_band_size(R->band_size_i());
+           return ;
+       }
+    }
+    if  (!dat || !dat->is_type_b(Full_storage::static_name() )) {
+
+       Matrix_storage *new_stor = (dat)? new Full_storage(dat) : 
+           new Full_storage( right->rows(), right->cols());
+       delete dat;
+       dat = new_stor;
+    }
+}
+
+Matrix_storage*
+Matrix_storage::get_product_result(Matrix_storage*left, Matrix_storage*right)
+{
+    Matrix_storage* dest =0;
+    set_product_result(dest, left,right);
+    return dest;
+}
+    
+
+/*
+  hairy
+ */
+void
+Matrix_storage::set_product_result(Matrix_storage*&dest, 
+                          Matrix_storage*left, Matrix_storage*right)
+{
+    if ( left->name() == Diagonal_storage::static_name() 
+        && right->name() == Diagonal_storage::static_name()) {
+       Diagonal_storage *L = (Diagonal_storage*)left;
+       Diagonal_storage* R = (Diagonal_storage*) right;
+
+       if  (L->band_size_i() + R->band_size_i() < L->dim()/2 ) {
+           if (dest ->name() != Diagonal_storage::static_name()){
+               delete dest;
+               dest = new Diagonal_storage;
+           }
+        
+           dest->set_size(L->dim());
+           return;
+       }
+    }
+
+    if ( dest && dest->name() == Full_storage::static_name()) {
+       dest->set_size(left->rows(), right->cols());
+    } else {
+       delete dest;
+       dest = new Full_storage( left->rows(), right->cols());
+    }
+}
+
+IMPLEMENT_IS_TYPE_B(Matrix_storage);
+
+Matrix_storage *
+Matrix_storage::get_full(int n, int m)
+{
+    return new Full_storage(n,m);
+}
+
+
+
+ bool
+Matrix_storage::try_right_multiply(Matrix_storage *, 
+                                  const Matrix_storage *)const
+{
+    return false;
+}
+
+Array<Real>
+Matrix_storage::row(int n) const
+{
+    Array<Real> r;
+    for (int j = 0; j < cols(); j++)
+       r.push(elem(n,j));
+    return r;
+}
+
+Array<Real>
+Matrix_storage::column(int n) const
+{
+    Array<Real> r;
+    for (int i = 0; i < rows(); i++)
+       r.push(elem(i,n));
+    return r;
+}
+
+void
+Matrix_storage::set_size(int rows, int cols)
+{
+        
+    resize(rows,cols);
+}
+       
+void
+Matrix_storage::set_size(int rows)
+{
+        
+       resize(rows);
+}
+       
+
+void
+Matrix_storage::set_band(Matrix_storage *&mat, int b)
+{
+    Matrix_storage* ns = new Diagonal_storage(mat, b);
+    delete mat;
+    mat=ns;
+}
+       
+
+void
+Matrix_storage::set_full(Matrix_storage *&mat)
+{
+    Matrix_storage* ns = new Full_storage(mat);
+    delete mat;
+    mat=ns;
+}
index b096601c86dd1b14b698ded47afc97d5f3ef89ba..78e3d777b01237593e144a6c10851257c95f55b5 100644 (file)
@@ -1,4 +1,42 @@
+/*
+  matrix.cc -- implement Matrix
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
 #include "matrix.hh"
+#include "full-storage.hh"
+#include "diagonal-storage.hh"
+
+bool
+Matrix::band_b()const
+{
+    return dat->is_type_b( Diagonal_storage::static_name());
+}
+
+void
+Matrix::set_full() const
+{
+    if ( dat->name() != Full_storage::static_name()) {
+       Matrix_storage::set_full( ((Matrix*)this)->dat );
+    }
+}
+
+void
+Matrix::try_set_band()const
+{
+    if (band_b())
+       return;
+    
+    int b = band_i();
+    if (  b > dim()/2)
+       return;
+    // it only looks constant
+    Matrix*self  = (Matrix*)this;
+    Matrix_storage::set_band(self->dat,b);
+}
 
 Real
 Matrix::norm() const
@@ -33,6 +71,7 @@ Matrix::set_diag(Vector d)
 void
 Matrix::operator+=(Matrix const &m)
 {
+    Matrix_storage::set_addition_result(dat, m.dat);
     assert(m.cols() == cols());
     assert(m.rows() == rows());
     for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j))
@@ -42,6 +81,7 @@ Matrix::operator+=(Matrix const &m)
 void
 Matrix::operator-=(Matrix const &m)
 {
+    Matrix_storage::set_addition_result(dat, m.dat);
     assert(m.cols() == cols());
     assert(m.rows() == rows());
     for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j))
@@ -64,6 +104,23 @@ Matrix::operator=(Matrix const &m)
     delete dat;
     dat = m.dat->clone();
 }
+
+int
+Matrix::band_i()const
+{
+    int starty = dim();
+    while (starty >= 0 ) {
+       for ( int i = starty, j = 0; i < dim(); i++, j++ )
+           if (dat->elem( i,j ))
+               goto gotcha;
+       for ( int i=0, j = starty; j < dim(); i++,j++)
+           if (dat->elem(i,j))
+               goto gotcha;
+       starty --;
+    }
+gotcha:
+    return  starty;
+}
     
 Matrix::Matrix(Matrix const &m)
 {
@@ -79,6 +136,11 @@ Matrix::Matrix(int n, int m)
     fill(0);
 }
 
+Matrix::Matrix(Matrix_storage*stor_p)
+{
+    dat = stor_p;
+}
+
 Matrix::Matrix(int n)
 {
     dat = Matrix_storage::get_full(n,n);
@@ -173,12 +235,11 @@ Matrix::transposed() const
     return m;
 }
 
-
-/* should do something smarter: bandmatrix * bandmatrix is also banded matrix.  */
 Matrix
 operator *(Matrix const &m1, Matrix const &m2)
 {
-    Matrix result(m1.rows(), m2.cols());
+    Matrix result(Matrix_storage::get_product_result(m1.dat, m2.dat));
+
     result.set_product(m1,m2);
     return result;
 }
@@ -188,7 +249,7 @@ Matrix::set_product(Matrix const &m1, Matrix const &m2)
 {
     assert(m1.cols()==m2.rows());
     assert(cols()==m2.cols() && rows()==m1.rows());
-
+    
     if (m1.dat->try_right_multiply(dat, m2.dat))
        return; 
     for (int i=0, j=0; dat->mult_ok(i,j);
@@ -243,3 +304,5 @@ Matrix::dim() const
     return rows();
 }
 
+
+
index f791e1f6c2608da6a97ce8dfd8690fed677f859b..d1a9fe05750a58d83c453cbc5666c6837fcc6ab3 100644 (file)
@@ -204,10 +204,10 @@ String_convert::int_str(int i, char const* fmt)
 String
 String_convert::double_str(double f, char const* fmt)
 {
-    static char buf[STRING_BUFFER_LEN]; 
+    char buf[STRING_BUFFER_LEN]; 
 
     snprintf(buf, STRING_BUFFER_LEN, fmt ? fmt : "%f", f);
-    return buf;
+    return String(buf);
 }
 
 /**
index ec93a1e5454fdc8d18a692f308c4b7fec08c041c..207bcd10ce470ee7e9d8d8c3c82315dccc8e6628 100644 (file)
@@ -16,9 +16,9 @@ depth = ../..
 # identify module:
 #
 NAME =flower-test
-# include ./$(depth)/$(NAME)/.version
+# include ./$(depth)/$(NAME)/VERSION
 MODULE_NAME = flower
-include ./$(depth)/flower/.version
+include ./$(depth)/flower/VERSION
 
 #
 
@@ -48,8 +48,7 @@ EXECSTRINGTEST=$(EXECUTABLE)
 # don't do the exec, as this might fail if flowerlib isn't installed yet.
 default:  $(BUILDSTRINGTEST) 
 
-
-do-stringtest:
+test: $(EXECUTABLE)
        $(EXECSTRINGTEST) > $(outdir)/result
        cmp $(outdir)/result result
 
diff --git a/flower/test/mat-test.cc b/flower/test/mat-test.cc
new file mode 100644 (file)
index 0000000..f7ce01b
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+  mat-test.cc -- test Matrix
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include <iostream.h>
+#include "matrix.hh"
+#include "string.hh"
+#include "flower-test.hh"
+#include "choleski.hh"
+
+void
+matrix()
+{
+    int N=10;
+    Matrix m(N,N), q(N,N);
+    Vector v(N);
+
+    for (int i=0; i < N; i++) {
+       v(i) =i;
+       for (int j=0; j < N; j++) {
+           m(i,j) = i+j;
+           q(i,j) = (abs(i-j) > 3) ?0 :i-j;
+       }
+    }
+
+    cout << "v: " << String(v);
+    cout << "m: " <<  String(m );
+    cout << "q: " <<  String(q);
+    cout << "m*q; " <<  String(m*q);
+    cout << "m*m: " <<  String(m*m);
+    m.OK();
+    cout << "m: " <<  String(m);
+    cout << "q.band " << q.band_i() << endl; 
+    q.try_set_band();
+    cout << "q(B): " << q;
+    q.OK();
+    Matrix sum(q+q);
+    cout << "q + q " << sum;
+    q.OK();
+    cout << "q*q: " << q*q;
+    q.OK();
+
+    Matrix hilbert(N,N), h2(hilbert);
+    for (int i=0; i < N; i++) {
+       for (int j=0; j < N; j++) {
+           hilbert(i,j) = 1/(i+j+1);
+            h2 (i,j) = (abs(i-j) > 3) ?0 : hilbert(i,j);
+       }
+    }
+    h2.try_set_band();
+    Choleski_decomposition ch(h2);
+    cout << "red Hilbert  " <<  h2;
+    cout << "choleski " << ch.L;
+}
+
+ADD_TEST(matrix);
index 32318e47c36e0a19ac71ede534dfe9923246be58..fdab67ea61efc4f0fa8f06622a9e3f7dbe8a53ee 100644 (file)
@@ -11,17 +11,16 @@ build = ./$(depth)/lily/$(outdir)/.build
 # generic stuff/Makefile
 #
 include ./$(depth)/make/Include.make
-#
 
 # list of distribution files:
 # 
-INITFILES = $(wildcard *.ly)
-DISTFILES = Makefile $(INITFILES)
-#
+INIFILES = $(wildcard *.ly)
+DISTFILES = Makefile $(INIFILES)
+
 
 localinstall:
        $(INSTALL) -d $(datadir)/lilypond/init
-       $(INSTALL) -m 644 $(INITFILES) $(datadir)/lilypond/init
+       $(INSTALL) -m 644 $(INIFILES) $(datadir)/lilypond/init
 
 localuninstall:
        for i in $(INIFILES) ; do rm -f $(datadir)/lilypond/init/$$i; done
diff --git a/init/bare.ly b/init/bare.ly
deleted file mode 100644 (file)
index 67963e1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-
-% enough for the parsing step
-
-include "init/dutch.ly"
-include "init/table_sixteen.ly"
index 4d73ecf419cdc7e01519e49d72a90325d2f0eeb2..5fe3255194c30adc604c4a8fbed95516df99458c 100644 (file)
@@ -61,6 +61,7 @@ lyric_engraver = \requesttranslator {
                \consists "Swallow_engraver";
        }
        \consists "Vertical_align_engraver";
+       \consists "Line_group_engraver";
 }
 
 orchestral_score_translator = \requesttranslator {
index f10856a12885359da3c0afcc67089a26fa378cb2..0ee376eac48cf3d78222c2325f5a7ee07e2a84e1 100644 (file)
@@ -1,5 +1,6 @@
 
+\include "performer.ly"
 default_midi = \midi {
         \tempo 4:60;
-       \include "performer.ly"
+       \requesttranslator{ \default_midi_perf }
 }
index fd19f6e03e28006177b154cbe8f8276a4b0102a2..04e0bb285554bd108ac6b2ef4c12db4aed30767e 100644 (file)
@@ -9,8 +9,8 @@ default_paper = \paper {
        interline = 4.\pt;
        notewidth = 5.0\pt;
        wholewidth = 4.8\pt;
-       unitspace = 30.\pt;
-       basicspace = 5.0\pt;
+       unitspace = 22.\pt;
+       basicspace = 4.\pt;
 
        %
        interbeam = 2.667\pt;
index fa184d11e7728be5273e5ce514c23fc6d5889154..27fbcea67e77e482e8e570d0920b2a1a72a381cd 100644 (file)
@@ -1,30 +1,46 @@
 %
 % setup for Request->Element conversion. Guru-only
 %
+staff_perf =   \requesttranslator {
+               Performer "Staff_performer"
+               \alias "Staff";
 
-\requesttranslator {
+               \contains\requesttranslator{
+                       Performer "Performer_group_performer"
+                       \alias "Voice_group";
+                       \contains\requesttranslator{
+                               Performer "Performer_group_performer"
+                               \consists "Note_performer";
+                       }
+               }
+               \consists "Key_performer";
+               \consists "Meter_performer";
+       }
+
+default_midi_perf = \requesttranslator {
        Performer "Score_performer"
        \alias "Score";
-%      \consists "Clef_performer";
-%      \consists "Key_performer";
-%      \consists "Meter_performer";
+
 %      \consists "Tempo_performer";
 
-       \contains\requesttranslator {
+       \contains \requesttranslator{ \staff_perf }
+       \contains\requesttranslator{
+               Performer "Performer_group_performer"
+               \alias "Piano";
+               \contains\requesttranslator{\staff_perf}
+       }
+       \contains\requesttranslator{
                Performer "Staff_performer"
-               \alias "Midi";
-               \contains\requesttranslator{
-                       Performer "Voice_group_performer"
-                       \alias "Voice_group";
+               \alias "Lyric";
+               \contains\requesttranslator {
+                       Performer "Performer_group_performer"
                        \contains\requesttranslator{
                                Performer "Performer_group_performer"
                                \consists "Lyric_performer";
-                               \consists "Note_performer";
-                               
                        }
                }
-               \consists "Key_performer";
                \consists "Meter_performer";
-               \consists "Swallow_performer";
        }
+       \consists "Swallow_performer";
 }
+
index c64b5fc3997bd16bb085c34f9fea32675272f15f..ebc9c375a44714b7103b75e4f6c00cae461d9de5 100644 (file)
@@ -101,6 +101,7 @@ table_sixteen=
        "|"     "\maatstreep{%}"        0.0\pt  0.64\pt 0.0\pt  16.0\pt
        "||"    "\doublebar{%}"         0.0\pt  4.0\pt  0.0\pt  16.0\pt
        "|."    "\finishbar{%}"         -4.0\pt 0.0\pt  0.0\pt  16.0\pt
+       ".|"    "\startbar{%}"          0.0\pt  4.0\pt  0.0\pt  16.0\pt
        ":|"    "\repeatbar"            -8.0\pt 0.0\pt  0.0\pt  16.0\pt
        "|:"    "\startrepeat"          0.0\pt  8.0\pt  0.0\pt 16.0\pt
        ":|:"   "\repeatbarstartrepeat" 0.0\pt  16.0\pt 0.0\pt  16.0\pt
index 24753a131d666a075c70a133768a7fa46cb7f5ca..ff17863b409191f75610f39029bfda512b362808 100644 (file)
@@ -12,58 +12,57 @@ EndMudelaHeader
 %}
 
 \score{
-       \staff{ \inputregister{melodicregs}
-               \melodic{ \octave c'; 
+       \melodic <\multi 3; 
+               { \octave c'; 
                        \meter 8/4;
                        \duration8;
-                       \stem 1; [c c'' a' f']
+                       \stem \up; [c c'' a' f']
                        \duration16;
-                       \stem 1; [c c'' a' f']
+                       \stem \up; [c c'' a' f']
                        \duration32;
-                       \stem 1; [c c'' a' f']
+                       \stem \up; [c c'' a' f']
                        \duration64;
-                       \stem 1; [c c'' a' f']
+                       \stem \up; [c c'' a' f']
                        \duration128;
-                       \stem 1; [c c'' a' f']
+                       \stem \up; [c c'' a' f']
 
                        \duration 8;
-                       \stem 1; ['g 'g 'g 'g]
+                       \stem \up; ['g 'g 'g 'g]
                        \duration 16;
-                       \stem 1; ['g 'g 'g 'g]
+                       \stem \up; ['g 'g 'g 'g]
                        \duration 32;
-                       \stem 1; ['g 'g 'g 'g]
+                       \stem \up; ['g 'g 'g 'g]
                        \duration 64;
-                       \stem 1; ['g 'g 'g 'g]
+                       \stem \up; ['g 'g 'g 'g]
                        \duration 128;
-                       \stem 1; ['g 'g 'g 'g]
+                       \stem \up; ['g 'g 'g 'g]
                }
-       }
-       \staff{ \inputregister{melodicregs}
-               \melodic{ \octave c'; 
+       
+       { \octave c'; 
                        \meter 8/4;
                        \duration8;
-                       \stem -1; [a' 'a c e]
+                       \stem \down; [a' 'a c e]
                        \duration16;
-                       \stem -1; [a' 'a c e]
+                       \stem \down; [a' 'a c e]
                        \duration32;
-                       \stem -1; [a' 'a c e]
+                       \stem \down; [a' 'a c e]
                        \duration64;
-                       \stem -1; [a' 'a c e]
+                       \stem \down; [a' 'a c e]
                        \duration128;
-                       \stem -1; [a' 'a c e]
+                       \stem \down; [a' 'a c e]
 
                        \octave c;
                        \duration 8;
-                       \stem -1; [d'' d'' d'' d'']
+                       \stem \down; [d'' d'' d'' d'']
                        \duration 16;
-                       \stem -1; [d'' d'' d'' d'']
+                       \stem \down; [d'' d'' d'' d'']
                        \duration 32;
-                       \stem -1; [d'' d'' d'' d'']
+                       \stem \down; [d'' d'' d'' d'']
                        \duration 64;
-                       \stem -1; [d'' d'' d'' d'']
+                       \stem \down; [d'' d'' d'' d'']
                        \duration 128;
-                       \stem -1; [d'' d'' d'' d'']
+                       \stem \down; [d'' d'' d'' d'']
                }
-       }
-       \paper{}
-}
+       >}
+
+
index a2110f346234167f9dbbb053ca50eb39bde78253..23b94fce90bb3dd92612e0d82e3a2de5afe987a2 100644 (file)
@@ -13,7 +13,8 @@ EndMudelaHeader
 \version "0.1.0";
 
 
-cad = \melodic  {
+\score {
+       \melodic  {\id "Staff" "french horn";
                \cadenza 1;
                \grouping 1*4;\duration  8;\octave c';
 
@@ -55,12 +56,10 @@ cad = \melodic  {
        c4
        }
 
-\score {
-       \melodic{ \cad }
        \paper {
        
                unitspace= 14.0\mm;
                geometric= 1.4;
        }
-%      \midi { \tempo 4:90 }
+       \midi { \tempo 4:90; }
 }
index 9bde8122fbb14432994ecefb405b2230b691ddb5..d281dc0e74e73d347401279112c09dcd5824dd00 100644 (file)
@@ -16,41 +16,41 @@ EndMudelaHeader
 
 two_voice = \melodic 
        < \multi 2; 
-         {     \octave c'; \stem -1;
+         {     \octave c'; \stem \down;
                c4 d e f g2~  g4 a [c8 d e f] c2| }
-         { \stem 1;
+         { \stem \up;
                g4 f e g ~ g2 g2  c4 g4 g2 } 
 
        >
 
 two_voice_steminvert = \melodic 
        < \multi 2;  
-         {     \octave c'; \stem 1;
+         {     \octave c'; \stem \up;
 % the f and g on 4th beat are exceptionally ugh.
                c4 d e f g2 g4 a | }
-         { \stem -1;
+         { \stem \down;
                g4 f e g  g2 g2 } 
 
        >
 
 three_voice = \melodic 
        < \multi 2;
-       { \stem 1
+       { \stem \up
                g4 f e f g a g2 }
-       { \hshift 1; \stem 1
+       { \hshift 1; \stem \up
                e2  e2  e2  e2 }
-       { \stem -1;
+       { \stem \down;
                c4 d e d c d es }
        >
 
 
 rests = \melodic  
        < \multi 2;
-       { \stem 1;
+       { \stem \up;
                | r8 r r r  r r r r 
                [c' b a g] [f e d c]
        } 
-       { \stem -1;
+       { \stem \down;
                [c8 d e f] [g a b c']
                r r r r r r r r 
        }
@@ -59,12 +59,12 @@ rests = \melodic
 restsII = \melodic {
        \octave c'; 
                        < \multi2;  
-                               { \stem 1;  g' f' e' d' c' b a g f e d c }
-                               { \stem -1; r  r  r  r  r  r r r r r r r }
+                               { \stem \up;  g' f' e' d' c' b a g f e d c }
+                               { \stem \down; r  r  r  r  r  r r r r r r r }
                        >
                        < \multi2;  
-                               { \stem 1;  r r r r r r r r  r  r  r  r }
-                               { \stem -1; c d e f g a b c' d' e' f' g' }
+                               { \stem \up;  r r r r r r r r  r  r  r  r }
+                               { \stem \down; c d e f g a b c' d' e' f' g' }
                        >
                        r8 r4
                        < \multi2;  r8 r8 >
@@ -72,10 +72,10 @@ restsII = \melodic {
                        < \multi2;  r8 r8 r8 r8 >
                        < \multi2;  r r >
                        < \multi2;  r r r >
-                       \stem 1;
+                       \stem \up;
                        [c''8 r8 c''8 c''8]
                        [c8 r8 c8 c8]
-                       \stem -1;
+                       \stem \down;
                        [c8 r8 c8 c8]
                        [c''8 r8 c''8 c''8]
 }
index 439ccfb0f6db72eff61a7faf604ed9e0adeffd87..ac772fdf9f9c1eb5bd404dc39ac2faf24a317d89 100644 (file)
@@ -1,3 +1,4 @@
+% remark: still temporarily broken. 
 %{MudelaHeader
 
  filename: coriolan-alto.ly
diff --git a/input/error.ly b/input/error.ly
deleted file mode 100644 (file)
index 118dba1..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-\version "0.0.58";
-
-\include "this-is-hopefully-a-nonexisting-file"
-
-
-
-mwa = \melodic{
-       \meter 3/4;
-       [ a8 a8 a8 a8 a8 ]      % 
-       [ a8 ]  % 
-%       segfault
-       < { [ bes^"1"~  a bes-. g-. ] a4-.^"4" } { [ e ] } { [ c ] } > |
-       a ) b ] c       % warning
-       &               % ok; error
-       a b ) ]         % ok; error
-%        a.........    % fatal error -- assert
-       a b c
-       |.|             % 
-       abc             % ok; print error, no \output
-       \bla            %  STRING, reduced to lyric_elt.
-       a [ b           % warning, still \output
-        < a( b >       % warning, still \output
-       a b ,c
-       a b c-*
-       a b c&
-       < a-. b-. >
-       
-}
-
-bla = \lyric{
-       These Gates will open just like windows. % ok; warning
-}
-
-
-\include "this-is-hopefully-a-nonexisting-file"
-\score{
-       \staff{ bla }
-       \staff{ mwa }
-}
index 7113cfb4a03e63f7d9c86d4cf8f25bb7a9e1eb96..141d191a9e222360293d69a50fab69b73f3ba9cf 100644 (file)
@@ -18,7 +18,7 @@ EndMudelaHeader
        \melodic 
                { \octave c'; c4 c4 
                        < \multi 1;  { c2 c2 } { c'2 c'2 } > 
-                       < \multi 2;  { \stem -1; c2 c2 } { \stem 1; c'2 c'2 } > 
+                       < \multi 2;  { \stem \down; c2 c2 } { \stem \up; c'2 c'2 } > 
                        < \multi 3;  { \clef "bass"; c2 c2 } { \meter 2/4;\bar "||"; \key fis cis gis; c'2 c'2 } > 
                                c2 c1 
                        c1 c1
index 64e7a17ae0266d4629f49da060e6a4a1548d748e..1c69f21f99f00a0106566894046f4caeef36539a 100644 (file)
@@ -60,15 +60,15 @@ IImenuetto = \melodic{
        < [ e'8 g > d' cis'_"2" e' a~  g ] |
 %%11
        < \multi 2;  
-               {\stem 1; a4~  d'4 cis'4-. }
-               { \stem -1; f2 e4 } > |
+               {\stem \up; a4~  d'4 cis'4-. }
+               { \stem \down; f2 e4 } > |
 %%12
        < [ g'8^"4" d > f' e' f' d'^"3"~   c' ] |
 %%13
        \clef "alto";
        < \multi 2;
-                { \stem 1; bes2 c'4 }
-                { \stem -1; g4~  f4 e4 }% ugh
+                { \stem \up; bes2 c'4 }
+                { \stem \down; g4~  f4 e4 }% ugh
        > |
 %%14
        < [ a8 f > g a f ] < d'4-\upbow e4 'bes4 > |
@@ -86,8 +86,8 @@ IImenuetto = \melodic{
        < { [ c'8 ( bes a )bes g~  bes ] } { [ d ] } { [ g ] } > |
 %%21
        < \multi 2;  
-               {\stem 1;  d'4 (\stem 1; ) cis'4 d'4 }  
-               { \stem -1; g2 f4 } 
+               {\stem \up;  d'4 (\stem \up; ) cis'4 d'4 }  
+               { \stem \down; g2 f4 } 
        > |
 %%22
        < { [ g8 ~  f g e ] } { [ cis ] } > < f4 d4 > |
index 107809130cf47257d130dc5ab440b697fd7da5c8..87223a1b04b950b1c2c5d5e0f17e7520f4f6fd39 100644 (file)
@@ -29,8 +29,8 @@ EndMudelaHeader
                  { e ~ f }
                >
        < \multi 2;
-       { \stem 1; c'8 ~g ~e( ~c~ [c'~ g' e' )c'] c'' ~ c'' c~c }
-       { \stem -1; c (e g )c'~( [b a g )d]     r2 } 
+       { \stem \up; c'8 ~g ~e( ~c~ [c'~ g' e' )c'] c'' ~ c'' c~c }
+       { \stem \down; c (e g )c'~( [b a g )d]          r2 } 
        >
 
        }
index 34faff618c1e11782ac0d3629258348abf47c83e..1769e18564f22ceebe27cf83d3885c7ccd6e7dec 100644 (file)
@@ -152,8 +152,8 @@ melodie = \melodic{
 %%48
        \textstyle "italic";
        < 
-       { fis2.~  \group "+1"; \stem -1; f2. }
-       { d'2. ~ \stem 1; d'4 r4_"decresc." d'4 } 
+       { fis2.~  \group "+1"; \stem \down; f2. }
+       { d'2. ~ \stem \up; d'4 r4_"decresc." d'4 } 
        >
        \textstyle "roman"; |
 %%50
@@ -199,13 +199,13 @@ begeleiding = \melodic{
        ''a r4 |
 %%5
 \duration 8;
-       < \multi 2; { \stem 1;  
+       < \multi 2; { \stem \up;        
                [ 'f 'a d 'a d 'a ] 
                [ 'd 'e 'g 'e 'g 'e ] 
                [ 'cis 'e 'g 'e 'g e ]
                [ 'd 'a d 'a d 'a ]
                }
-       { \stem -1
+       { \stem \down
                'd2 r4 
                 ''bes2 r4 
                 ''a2 r4
@@ -217,12 +217,12 @@ begeleiding = \melodic{
        [ 'd 'a d 'a d 'a ] |
 %%11
        < \multi 2;     
-       { \stem 1;
+       { \stem \up;
                [ 'f 'a d 'a d 'a ]
                [ 'd 'e 'g 'e 'g 'e ] 
                [ 'e 'g 'bes 'g 'bes 'g ] 
                [ 'a c f c f c ]
-       } { \stem -1
+       } { \stem \down
                'd2 r4 
                 ''bes2 r4
                 'c2 r4 
@@ -233,10 +233,10 @@ begeleiding = \melodic{
 %%16
        [ ''f 'c 'f 'c 'f 'c ] |
        < \multi 2;
-       { \stem 1
+       { \stem \up
                [ ''a 'e 'g 'e 'g 'e ][ 'd 'a d 'a d 'a ]
                [ ''bes 'f 'bes 'f 'bes 'f ][ ''f 'c 'f 'c 'f 'c ] }
-       { \stem -1
+       { \stem \down
                ''a2 r4
                'd2 r4 
                ''bes2 r4 
@@ -247,13 +247,13 @@ begeleiding = \melodic{
 %%22
        [ 'f 'a c 'a 'f 'c ] |
        < \multi 2; {
-               \stem 1;
+               \stem \up;
                [ ''a 'e 'g 'e 'g 'e ] 
                [ 'd 'fis 'a 'fis 'a 'fis ] 
                [ ''g 'd 'b 'd 'b 'd ] 
                [ 'd 'a d 'a d 'a ] 
        }
-       {\stem -1;
+       {\stem \down;
                ''a2 r4 
                'd2 r4 
                ''g2 r4 
@@ -298,11 +298,11 @@ begeleiding = \melodic{
 %%44
        < [ 'd ''b > 'fis 'b 'fis 'b 'fis ] |
 %%45
-       < \multi 2; { \stem 1
+       < \multi 2; { \stem \up
                [ ''g 'd 'b 'd 'b 'd ] 
                [ 'd 'a d 'a d 'a ] 
        } {
-               \stem -1;
+               \stem \down;
                ''g2 r4
                'd2 r4 
        } >
index 6e5746e7255a00a1fe4360b59ce79ff9223174df..a1d59b84c9584fef61158e76580eda4fb95e5979 100644 (file)
@@ -32,9 +32,9 @@ toccata_right = \melodic{
        % 13 -- how to type -- where to split -- this more neatly ?
        \octave c';
        <\multi 2;
-               { \stem 1; r4 dis'4 e'4.-. e'8( | \hshift 1; )e'4 [d'8 fis'8] \hshift 0; gis'4 [gis'8 fis'16 e'16] | fis'4~  [fis'8 e'16 dis'16] e'4 r8 e'8 }
-               { \stem 1; \hshift 1; r4 bis4 cis'4-. cis'4 | \hshift 0; a'4~  [a'16 gis'16 a'16 b'16] \hshift 1; dis'4 cis'4~  [cis'8 dis'16 a16] bis4 cis'4 r8 b8 }
-               { \stem -1; r4 < gis4 fis4 dis4 > gis4-. gis4 | a4. cis'8 gis2 | fis4 gis4 gis4 r8 e8 }
+               { \stem \up; r4 dis'4 e'4.-. e'8( | \hshift 1; )e'4 [d'8 fis'8] \hshift 0; gis'4 [gis'8 fis'16 e'16] | fis'4~  [fis'8 e'16 dis'16] e'4 r8 e'8 }
+               { \stem \up; \hshift 1; r4 bis4 cis'4-. cis'4 | \hshift 0; a'4~  [a'16 gis'16 a'16 b'16] \hshift 1; dis'4 cis'4~  [cis'8 dis'16 a16] bis4 cis'4 r8 b8 }
+               { \stem \down; r4 < gis4 fis4 dis4 > gis4-. gis4 | a4. cis'8 gis2 | fis4 gis4 gis4 r8 e8 }
        > |
        % 16
 }
@@ -45,9 +45,9 @@ toccata_left = \melodic{
        \clef bass;
        % 13
        <\multi 2;
-               { \stem 1; bis2 cis'4-. cis'4~  [cis'8 a8 d'8 cis'8] [bis8 gis8] cis'4 | dis'2 cis'4 r8 cis'8 }
-               { \stem 1; \hshift 1; r4 gis4. gis8~  gis4 | \stem -1; \hshift 0; a4. fis8 gis4. a8~  a4 gis4-. gis4 r8 gis8 }
-               { \stem -1; r4 < dis4 fis4 > < cis4 e4 > }
+               { \stem \up; bis2 cis'4-. cis'4~  [cis'8 a8 d'8 cis'8] [bis8 gis8] cis'4 | dis'2 cis'4 r8 cis'8 }
+               { \stem \up; \hshift 1; r4 gis4. gis8~  gis4 | \stem \down; \hshift 0; a4. fis8 gis4. a8~  a4 gis4-. gis4 r8 gis8 }
+               { \stem \down; r4 < dis4 fis4 > < cis4 e4 > }
        > |
        % 16
 }
@@ -75,8 +75,8 @@ fuga2_right = \melodic{
        % 15
        \octave c';
        <\multi 2;
-               { \stem 1; [b8 fis8] b4 }
-               { \stem -1; fis2 }
+               { \stem \up; [b8 fis8] b4 }
+               { \stem \down; fis2 }
        >
        %{ this chord is usually set like this:
             |
@@ -87,16 +87,16 @@ fuga2_right = \melodic{
            |
        %}
        < \multi 2;
-               { \stem 1; \hshift 0; e'4 }
-               { \stem 1; \hshift 1; cis'4 }
-               { \stem 1; \hshift 2; ais4 }
-               { \stem -1; fis4 }
+               { \stem \up; \hshift 0; e'4 }
+               { \stem \up; \hshift 1; cis'4 }
+               { \stem \up; \hshift 2; ais4 }
+               { \stem \down; fis4 }
        > |
        % 16
        <\multi 2;
-               { \stem 1; dis'2 dis'4 | cis'2 cis'4 | b4~  [b8 cis'8 dis'8 e'8] }
-               { \stem 1; \hshift 1; [b8 fis8] b2~  [b8 a16 g16] a2 | a4 gis2 }
-               { \stem -1; fis2.~  fis2.~  fis4 e2 }
+               { \stem \up; dis'2 dis'4 | cis'2 cis'4 | b4~  [b8 cis'8 dis'8 e'8] }
+               { \stem \up; \hshift 1; [b8 fis8] b2~  [b8 a16 g16] a2 | a4 gis2 }
+               { \stem \down; fis2.~  fis2.~  fis4 e2 }
        > |
        % 19
 }
@@ -108,8 +108,8 @@ fuga2_left = \melodic{
        % 15
        b2 
        <\multi 2; 
-               { \stem 1; ais4 | bes2. }
-               { \stem -1; e4  | fis2 fis4 }
+               { \stem \up; ais4 | bes2. }
+               { \stem \down; e4  | fis2 fis4 }
        >
        % 17
        cis'2 e'4 |
index 5fa5b63007b0d78bde2372bd6dc35873c34a027a..49d0062a91c5ae2d61a3670cfc991e69ef9f0ba8 100644 (file)
@@ -25,7 +25,7 @@ dux =
         \clef "violin";
         \octave c';
 
-        \stem -1;
+        \stem \down;
         r8 [c'16 b] [c'8 g] [as c'16 b] [c'8 d'] |
         [g c'16 b] [c'8 d'] [f16 g] as4 [g16 f] |
         [es c' b a] [g f! es d] [c8 es' d' c'] |
@@ -71,7 +71,7 @@ dux =
 comes =
     \melodic {
         \octave c'';
-        \stem 1;
+        \stem \up;
         r1 |
         r1 |
         r8 [g16 fis] [g8 c] [es g16 fis] [g8 a] |
@@ -153,8 +153,8 @@ bassdux =
         [d c g G]
 %% 30
         < \multi 2;
-        { \stem 1; c2~ | c1~ | c1 }
-        { \stem -1; C2~ | C1~ | C1 }
+        { \stem \up; c2~ | c1~ | c1 }
+        { \stem \down; C2~ | C1~ | C1 }
         >
     }
 
diff --git a/lily/.version b/lily/.version
deleted file mode 100644 (file)
index 98ec990..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-MAJOR_VERSION = 0
-MINOR_VERSION = 0
-PATCH_LEVEL = 77
-# use to send patches, always empty for released version:
-# include separator: ".postfix", "-pl" makes rpm barf
-
-MY_PATCH_LEVEL = 
index 23145c0b408ddc1a23c552778c1dffff4c10ab40..65065454be5433eb38ffe361cb53610b2d355b46 100644 (file)
@@ -16,7 +16,7 @@ depth = ..
 #
 include Stable.make
 include ./$(depth)/make/Variables.make
-include .version
+include VERSION
 #
 
 # identify module:
@@ -33,7 +33,7 @@ SUBDIRS = include
 
 # list of distribution files:
 #
-EXTRA_DISTFILES = .version 
+EXTRA_DISTFILES = VERSION 
 #
 
 # list of custom libraries:
diff --git a/lily/VERSION b/lily/VERSION
new file mode 100644 (file)
index 0000000..21c1e02
--- /dev/null
@@ -0,0 +1,7 @@
+MAJOR_VERSION = 0
+MINOR_VERSION = 0
+PATCH_LEVEL = 78
+# use to send patches, always empty for released version:
+# include separator: ".postfix", "-pl" makes rpm barf
+
+MY_PATCH_LEVEL = 
index 8de7d68759930576ece02c093a996097dfd6319d..df349421bb658035b7020c45132a70c39d96d113 100644 (file)
@@ -44,7 +44,6 @@ Crescendo::get_symbol()const
        warning("Crescendo too small");
        w_dim = 0;
     }
-//    Real lookup_wid = w_dim * 0.9; // make it slightly smaller.
 
     return Symbol( paper()->lookup_l()->hairpin( w_dim, grow_dir_i_ < 0) );
 }
index 4b95a385191f2765969b1131ea85d704101e9a1e..3d046bd4147ffdc26a486b54b4366423b49999f3 100644 (file)
@@ -1,6 +1,6 @@
 #include <fstream.h>
 #include <signal.h>
-#include <new.h>
+#include <std/new.h>
 #include <stdlib.h>
 #include "debug.hh"
 #include "dstream.hh"
index 50a3c605684e7c6c18aada6963bd4912dbbb979b..a1a77d7da1e604ef930d28494e5d169081d414f6 100644 (file)
@@ -14,6 +14,7 @@
 #include "p-score.hh"
 #include "score-elem.hh"
 #include "input-translator.hh"
+
 Engraver* get_engraver_p(String);
 
 Engraver_group_engraver::~Engraver_group_engraver()
@@ -31,7 +32,6 @@ Engraver_group_engraver::check_removal()
        else 
            i++;
     }
-    
 }
 
 bool
@@ -42,7 +42,7 @@ Engraver_group_engraver::removable_b()const
 
 Engraver_group_engraver::Engraver_group_engraver()
 {
-    itrans_l_ =0;
+    itrans_l_ = 0;
 }
 
 void
index d65c26930bd59bb242296846510f6634b1effcd9..f159d2973ae0771e3f719664374bc192ff8f2e3a 100644 (file)
@@ -19,7 +19,7 @@ class Bar_engraver : public Engraver {
     Bar * bar_p_;
 public:
     Bar_engraver();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
      
 protected:
index ccef49e2bf47bda6321b913924c394cca355d4c1..9a7a8b92b60d9e0e8fa4d2c17416560e37f1dfc0 100644 (file)
@@ -15,7 +15,7 @@ public:
     String type_str_;
     int spanned_i_;
     
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Bar);
     Bar();
 private:
index bd0c2550a9da6a15d342fabdbbb01f47b7280f82..1e6a36fe1513c25531c5421090741424f9c0eb06 100644 (file)
@@ -24,7 +24,7 @@ public:
    
 
     /* *************** */
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Beam();
     void add(Stem*);
 
index c69214a542655da347f3601a6d98ae9023854bcd..e483c36ac2786bfe4c88d15d66b9d907c6b7298f 100644 (file)
@@ -25,7 +25,7 @@ protected:
     Molecule*brew_molecule_p()const;
 public:
     Bow();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Offset center() const;  
 };
 #endif // BOW_HH
index 7e0e632b01653b3958e777483cb06c9b2022e111..6ef6818b3d587e705ef24f08ff0a707de77abde5 100644 (file)
@@ -18,7 +18,7 @@ class Break_align_item : public Horizontal_align_item {
 protected:
     virtual void do_pre_processing();
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Break_align_item);
        
 };
index ec35bf0b5a9e790458bb2f8ec73a9702fd557eac..2f974eeadb0f6b9569c4519f89cd94b7161fb6b9 100644 (file)
@@ -34,7 +34,7 @@ public:
     /* ************** */
    
     Clef_engraver();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
    
 };
 #endif // CLEF_HH
index 162cf813ebaa0b8ba0ae741992d8b0a6eff3f9b4..face7e818deb9d5f6d5dd246881288a438d4bccd 100644 (file)
@@ -27,7 +27,7 @@ public:
     bool default_b_;
 
     /* *************** */
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Clef_item);
     Clef_item();
     void read(Clef_engraver const&);
index 4500a726179a7b20b84d619a66bd231e4a3179ec..be3880de62eb211583a53557d7b7e3515f2bed9a 100644 (file)
@@ -20,6 +20,6 @@ protected:
     virtual void do_pre_move_processing();
 public:
     Collision_engraver();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 #endif // COLLISION_GRAV_HH
index 62cee06041d52a641664141ef1250eb34335a5ab..3891a5a0c16c0943e3897ccd540a306f96fecb9a 100644 (file)
@@ -23,7 +23,7 @@ protected:
     virtual void do_pre_processing();
 public:
     Link_array<Note_column> clash_l_arr_;
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     void add (Note_column*ncol_l);
     Collision();
     
index 9c2f3f9ccc40037d0d63c892c9a2d3a85ed4e383..80342a4450e77026b52d48c382b8bca2920648c5 100644 (file)
@@ -6,7 +6,5 @@
 #include <math.h>
 #include "real.hh"
 
-const Real EPS=1e-7;           // qlpsolve.hh
-const int MAXITER=100;         // qlpsolve.hh
 const Real INFTY=HUGE_VAL;
 #endif
index 0ebf499cdf55e4a029ab2676758c8e6b5d91d62e..4539ac209c22fed87eb6f821cf367b5936cfce63 100644 (file)
@@ -29,7 +29,7 @@ protected:
     SCORE_ELEM_CLONE(Crescendo);
     virtual Molecule*brew_molecule_p()const;
     virtual Interval symbol_height()const;
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     
 private:
     Symbol get_symbol()const;
index 5c1a585ca54823b50bd53c02dcb35e2c1289db22..389a4684663eb7ea33de2d51846b9f42d676ca92 100644 (file)
@@ -23,7 +23,7 @@ class Dynamic_engraver : public Engraver {
 public:
     Dynamic_engraver();
     ~Dynamic_engraver();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
     virtual void acknowledge_element(Score_elem_info);
     virtual bool do_try_request(Request *req_l);
index ce7b75e41ac60e12b897a309af241cecd28cbc81..a3e1ea6d16114ce0aa971039048cbf7bcce24ff9 100644 (file)
 
 class Horizontal_vertical_group_item  : public Item, public Horizontal_vertical_group {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Horizontal_vertical_group_item);
 protected:
     virtual void do_print() const;
 };
 
 class Horizontal_group_item : public Item, public Horizontal_group {
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Horizontal_group_item);
 protected:
     virtual void do_print() const { Elbement_group::do_print(); }
index 245b2dfcf15646a60b6caef7f5232080b3627664..650dc613ceff1fd236085b078a5a219b47e70dc3 100644 (file)
@@ -20,13 +20,13 @@ public:
     Elbement_group();
     bool contains_b(Score_elem const *)const;
     void add_element(Score_elem*);
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
        
 };
 
 class Horizontal_group : public Elbement_group {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Horizontal_group(Horizontal_group const&);
     Horizontal_group(){}
     void add_element(Score_elem*);
@@ -47,7 +47,7 @@ protected:
 public:
     Vertical_group(Vertical_group const &);
     Vertical_group(){}
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 /** A class to treat a group of elements as a single entity. The
@@ -62,7 +62,7 @@ protected:
 public:
     Horizontal_vertical_group();
     bool contains_b(Score_elem const *)const;
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     virtual void do_substitute_dependency(Score_elem*,Score_elem*);
     virtual void do_print() const;
     void add_element(Score_elem*);
index 7e2b9b21b5be78bfc80555ee12d781c42ab736f0..96e67feaa84660eaabcaeb0f6d834a9e8759da2b 100644 (file)
@@ -53,7 +53,7 @@ public:
      */
     virtual void terminate_engraver(Engraver * grav_l);
     
-   NAME_MEMBERS();
+   DECLARE_MY_RUNTIME_TYPEINFO;
     
     /**
       Remove #grav_l# from the list, and return it.
index 5047877145c457c238f3317375bd431e3b3aa064..52cd3bd7eaebf3abe0528a83cffdc918ad851b5f 100644 (file)
@@ -134,7 +134,7 @@ public:
 
     Engraver();
     virtual ~Engraver(){}
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     void print() const;
 };
 
index 5c9dac12bc5cd4a99acf788e156345e50209d7f1..acaa554019b557b17b01b7eeede3e99ec40d1d81 100644 (file)
@@ -19,7 +19,7 @@
 class General_script_def : public Input {
 public:
     VIRTUAL_COPY_CONS(General_script_def,General_script_def);
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     virtual int staff_dir_i()const;
     void print() const;
     virtual int rel_stem_dir_i()const;
index 3faa9e4eeaf83f5eeb221c0fc64409b8adfd6683..112392a670a1380ef3ec4b495d92cae3f03104b7 100644 (file)
@@ -30,7 +30,7 @@ public:
     virtual void finish() {}
     virtual void start() {}
     
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
     
     virtual Global_translator *global_l() { return this; }
index ea5e9a7531b571f23314176631a90b1a2ad4de75..77065d84cb491d4f6eb5b9e93469047610139efd 100644 (file)
@@ -30,7 +30,7 @@ public:
     void add(Script*s) { Script_column::add(s) ; }
     virtual void set(Stem*);
     Head_column();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
 
 
index c7522c5005de836ccf7773a25ef59b9b8becc93a..2a5b2be2801680f2f7b033e3739d3ce143f2b7af 100644 (file)
@@ -19,7 +19,7 @@ struct Note_head_engraver : Engraver {
     virtual void do_process_requests();
     virtual void do_pre_move_processing();
     virtual void do_post_move_processing();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 
index e12eae39bca9e3767bbaff28c87cbac2a3439e6b..639ce1b22eeef5a5d4450ffb93de0c59a9c8bbb5 100644 (file)
@@ -32,7 +32,7 @@ public:
      */
     int align_i_;
         
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Horizontal_align_item);
     void add(Item*, int p);
     Horizontal_align_item();
index c2c5eebe7a28af2b2771fdd64c5747006f625ebb..2088c841f7d3ddeccfbd9707c0d682ee25044c7b 100644 (file)
@@ -28,7 +28,7 @@ struct Identifier : public Input {
     virtual ~Identifier() ;
 
     void print()const;
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     void error(String);
     IDACCESSOR(Input_translator, input_translator)
     IDACCESSOR(Music, music)
@@ -50,7 +50,7 @@ private:
 
 #define declare_id_class(Idclass, Class, accessor)     \
 struct Idclass : Identifier {\
-        NAME_MEMBERS();                            \
+        DECLARE_MY_RUNTIME_TYPEINFO;                       \
        Idclass(String s, Class*st, int code);\
        virtual Class* accessor(bool copy);\
        ~Idclass();\
diff --git a/lily/include/ineq-constrained-qp.hh b/lily/include/ineq-constrained-qp.hh
new file mode 100644 (file)
index 0000000..161bc51
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+  ineq-constrained-qp.hh -- declare Ineq_constrained_qp
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef INEQ_CONSTRAINED_QP_HH
+#define INEQ_CONSTRAINED_QP_HH
+
+
+
+#include "matrix.hh"
+
+/// inequality constrained quadratic program
+class Ineq_constrained_qp {
+    friend class Active_constraints;
+
+    Array<Vector> cons;
+    Array<Real> consrhs;
+public:
+    Matrix quad;
+    Vector lin;
+    Real const_term;
+
+
+    /**
+      use a KKT method to assert optimality of sol
+      */
+    void assert_solution(Vector sol) const;
+    /// solve the problem using a projected gradient method
+    Vector solve(Vector start) const;
+    
+    /**
+      @return the number of variables in the problem
+      */
+    int dim() const{
+       return lin.dim();
+    }
+
+    /**
+      add a constraint
+
+
+        c*vars >= r
+
+      PRE
+      c.dim() == dim();
+       
+      */
+    void add_inequality_cons(Vector c, double r);
+    
+    /** set up matrices to go with the problem. */
+    Ineq_constrained_qp(int novars);
+    
+    /**
+    evaluate the quadratic function for input #v#
+    */
+    Real eval(Vector v);
+
+    void eliminate_var(int idx, Real value);
+    void OK()const;
+    void print() const;
+
+};
+
+// ugh
+const Real EPS=1e-7;           
+
+#endif // INEQ_CONSTRAINED_QP_HH
index 109a9c8191d30e44f8e8e37ed5f57c34caeb4628..6f3eb6a7cb19740a0f668c5489d70397fa1dbb62 100644 (file)
@@ -38,7 +38,7 @@ public:
     virtual Item *item() { return this; }
     Item();
     Real hpos_f() const;
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     virtual Line_of_score * line_l() const;
 protected:
     virtual void  do_breakable_col_processing();
index d62345ab1b8df0978d60b59a11fb0654c226c479..7b54214892bc15e10a5671520c40049c4440d278 100644 (file)
@@ -27,7 +27,7 @@ struct Key_engraver : Engraver {
     virtual void do_post_move_processing();
     virtual void acknowledge_element(Score_elem_info);
     Key_engraver();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 private:
     void create_key();
     
index 759e6d11238c7f40b3e5ef022fce84441cb67165..a1ab3dc6d48960bf01e16f4c16f287f9286d53f5 100644 (file)
@@ -20,7 +20,7 @@ struct Key_item : Item {
 
     
     /* *************** */
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Key_item);
 
     Key_item(int cposition);
index a14c19cc5605a8f70cd66ff42572e5f35c33dfc7..6b1cba48f8b2b9c8104ae8ef1c87e96004d34ad6 100644 (file)
@@ -14,7 +14,7 @@
 
 class Key_performer : public Performer {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Key_performer();
     ~Key_performer();
 
index bb43f6d2d9a9ebc4c4a6a9fa14ddce2aa172216c..e7153be0f56c92481fa17ff80fc27ba29487f6f3 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  line-group-grav.hh -- declare 
+  line-group-grav.hh -- declare Line_group_engraver
 
   source file of the GNU LilyPond music typesetter
 
@@ -24,7 +24,7 @@ protected:
     virtual void acknowledge_element(Score_elem_info);
 
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Line_group_engraver();
 };
 
index cc52ed5f8f05b965158bbdba5a5a417c852632f2..05300996343b449ddbb6e59831bd23d10ac4eb1d 100644 (file)
@@ -24,7 +24,7 @@ struct Local_key_engraver : Engraver {
     virtual void acknowledge_element(Score_elem_info);
     virtual void do_pre_move_processing();
     Local_key_engraver();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 #endif // LOCALKEYGRAV_HH
index a80e44196e602fcecf3316554a1cfde471f0c611..2d4ed66e8f74b64715a463497f116bae12abf742 100644 (file)
@@ -23,7 +23,7 @@ struct Local_acc {
   update item if Items are removed
  */
 struct Local_key_item : Item {
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Array<Local_acc> accs;
     Link_array<Item> support_items_;
     int c0_position;
index 9c1aefadac0c9bc1aa30a88ee72ed1eab1addf9b..8e18c8ed6a65e64e6097a595933d1b8c4abaaee2 100644 (file)
@@ -23,7 +23,7 @@ protected:
     virtual void do_process_requests();
     virtual void do_post_move_processing();
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Lyric_engraver();
 };
 #endif // LYRIC_ENGRAVER_HH
index cd07a96fde0f9a6d1f44942b470a743e825d554c..c0321c2839e0e51ddb7cee68e0b43e6929755454 100644 (file)
@@ -16,7 +16,7 @@
 
 class Lyric_performer : public Performer {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Lyric_performer();
     ~Lyric_performer();
 
index d2f25ec2cdb575792ec947b60faece26376c913e..d1085f63fe2f9a06a975e2baab27715fe4e3031d 100644 (file)
@@ -31,6 +31,6 @@ public:
     virtual void do_creation_processing();
     virtual void do_post_move_processing();
     Meter_engraver();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 #endif // METERGRAV_HH
index e72451d5b8b4c7058dd86132f50062653b019e14..3d972c10e8ee09c65d5e2e367f432da8de4ae2c0 100644 (file)
@@ -14,7 +14,7 @@
 
 class Meter_performer : public Performer {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Meter_performer();
     ~Meter_performer();
 
index 176ce6085c96d0d16bf752df00ae32e40f8d0631..eb5f2b128efab3b88940531eb48130b69c2eb542 100644 (file)
@@ -23,7 +23,7 @@ protected:
     Molecule*brew_molecule_p() const;
 public:
     Meter(Array<Scalar> args) ;
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Meter);
 };
 #endif // METER_HH
index b8e1a6b8b4c08c38a6e495ec2d600838b0b2a2a5..ed5cf51a59edfb4788970dcb4d91c2532d9a6c77 100644 (file)
@@ -5,34 +5,59 @@
 
 #ifndef MIDI_ITEM_HH
 #define MIDI_ITEM_HH
+
 #include "string.hh"
 #include "lily-proto.hh"
+#include "virtual-methods.hh"
+
+/**
+  Any piece of midi information.
 
+  Maybe use base classes for RIFF files?
+ */
 struct Midi_item {
+    Midi_item() { }
+    DECLARE_MY_RUNTIME_TYPEINFO;
     static String i2varint_str( int i );
     virtual void output_midi( Midi_stream& midi_stream_r ) const;
     virtual String str() const = 0;
-    NAME_MEMBERS();
+private:
+    Midi_item(Midi_item const&){}
+    void operator=(Midi_item const&){}
 };
 
 struct Midi_key : public Midi_item {
     Midi_key( int accidentals_i, int minor_i );
+    DECLARE_MY_RUNTIME_TYPEINFO;
        
     virtual String str() const;
-    NAME_MEMBERS();
     /* *************** */
     int accidentals_i_;
     int minor_i_;
 };
 
+/**
+  Change instrument event
+ */
+struct Midi_instrument : public Midi_item {
+    Midi_instrument( int channel_i, String instrument_str );
+    DECLARE_MY_RUNTIME_TYPEINFO;
+
+    virtual String str() const;
+
+    int channel_i_;
+    Byte program_byte_;
+};
+                                      
 struct Midi_note : public Midi_item {
     /**
-      Generate a note-event on a channel pitch.
+      Generate a note-event on a channel.
 
       @param #melreq_l# is the pitch. 
      */
     Midi_note( Melodic_req* melreq_l, int channel_i, bool on_b );
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
+
     virtual String str() const;
 
     /* *************** */
@@ -46,20 +71,20 @@ struct Midi_note : public Midi_item {
 
 struct Midi_duration : public Midi_item {
     Midi_duration( Real seconds_f );
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
     virtual String str() const;
-    NAME_MEMBERS();
     /* *************** */
     Real seconds_f_;
 };
 
 struct Midi_chunk : Midi_item {
     Midi_chunk();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
     void add( String str );
     void set( String header_str, String data_str, String footer_str );
     virtual String str() const;
-    NAME_MEMBERS();
 private:
     String data_str_;
     String footer_str_;
@@ -69,7 +94,7 @@ private:
 struct Midi_header : Midi_chunk {
     /* *************** */
     Midi_header( int format_i, int tracks_i, int clocks_per_4_i );
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 struct Midi_text : Midi_item {
@@ -79,7 +104,8 @@ struct Midi_text : Midi_item {
        MARKER, CUE_POINT
     };
     Midi_text( Midi_text::Type type, String text_str );
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
+
     virtual String str() const;
     /* *************** */
     Type type_;
@@ -89,7 +115,7 @@ struct Midi_text : Midi_item {
 
 struct Midi_tempo : Midi_item {
     Midi_tempo( int per_minute_4_i );
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
     virtual String str() const;
     /* *************** */
@@ -100,7 +126,7 @@ struct Midi_tempo : Midi_item {
 struct Midi_time : Midi_item {
 
     Midi_time( int num_i, int den_i, int clocks_per_1_i );
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
     virtual String str() const;
 
@@ -113,11 +139,10 @@ struct Midi_time : Midi_item {
 struct Midi_track : Midi_chunk {
     int number_i_;
     /* *************** */
-    Midi_track( );
-    NAME_MEMBERS();
+    Midi_track();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
     void add( int delta_time_i, String event );
-//     void add( Moment delta_time_moment, Midi_item& mitem_r );
     void add( Moment delta_time_moment, Midi_item* mitem_l );
 };
 
index 93d21e5c2a54c07f036a4867ccd84e4ee85929cf..42ad968c420a575bf517e86a74ee72c532117abc 100644 (file)
@@ -22,7 +22,7 @@ protected:
     
 public:
     Music_iterator *daddy_iter_l_;
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Array<Translator *>report_to_l_arr_;
 
     Translator *report_to_l()const;
@@ -48,7 +48,7 @@ public:
 class Change_iterator : public Music_iterator {
     Change_reg * change_l_;
 public:
-     NAME_MEMBERS();
+     DECLARE_MY_RUNTIME_TYPEINFO;
     virtual void process_and_next(Moment);
     Change_iterator(Change_reg*);
 };
@@ -60,7 +60,7 @@ class Chord_iterator : public Music_iterator
 public:
     ~Chord_iterator();
     Chord_iterator(Chord const*);
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
     virtual void do_print()const;
     virtual void construct_children();
@@ -75,7 +75,7 @@ class Request_chord_iterator : public Music_iterator {
     bool last_b_;
 public:
     Request_chord_iterator(Request_chord*);
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
 protected:
     virtual void process_and_next(Moment);
@@ -94,7 +94,7 @@ class Voice_iterator :  private PCursor<Music*>, public Music_iterator
     void next_element();
 public:
     Voice_iterator(Voice const*);
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
     virtual void do_print()const;
     virtual void construct_children();
index ad745eff28561445c3321f1eb3e722c97c73e98a..dda2f568adc98a5c62bf667c1940e6e2db2a9984 100644 (file)
@@ -29,7 +29,7 @@ public:
     String id_str_;    
     Music_list(Music_list const&);    
     Music_list();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     VIRTUAL_COPY_CONS(Music_list,Music);
     virtual void add(Music*);
     virtual void transpose(Melodic_req const *);
@@ -47,7 +47,7 @@ protected:
 class Chord : public Music_list {
 public:
     Chord();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     VIRTUAL_COPY_CONS(Chord,Music);
     virtual void translate(Moment dt);
     virtual MInterval time_int()const;
@@ -55,7 +55,7 @@ public:
 
 class Request_chord : public Chord {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Request_chord();
     VIRTUAL_COPY_CONS(Request_chord,Music);
 };
@@ -69,7 +69,7 @@ public:
     Moment offset_mom_;
 
     Voice();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     VIRTUAL_COPY_CONS(Voice, Music);
     virtual void translate(Moment dt);
     virtual MInterval time_int()const;
@@ -86,7 +86,7 @@ public:
     /// what name (or look for this name)
     String id_str_;
 
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     VIRTUAL_COPY_CONS(Change_reg, Music);
 };
 #endif // MUSIC_LIST_HH
index e90ea58a6bd5381ff1a09bf64dbc37b62488c2f9..196f461eeb6bd290bdf9a62539f01488ab51e4f8 100644 (file)
@@ -34,7 +34,7 @@ public:
     virtual void transpose(Melodic_req const *);
     virtual void translate(Moment dt);
     VIRTUAL_COPY_CONS(Music,Music);
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Music();
 protected:
     virtual void do_print() const;
index 800550bd59a24e50d9e657e7b8b184d6aab85c40..561944f00f84375ed37c04aec27cfceac8251f7c 100644 (file)
@@ -32,6 +32,6 @@ protected:
     virtual void do_post_move_processing();
 public:
     Note_column_engraver();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 #endif // NOTE_COLUMN_GRAV_HH
index 3065642be65f3b4d7592405aa7e782f7cfcbf870..2e297e88a4b8517370ebdebf3f0c344258b0dbaa 100644 (file)
@@ -24,7 +24,7 @@ public:
     
     Interval_t<int> head_positions_interval()const;
         
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Note_column();
     virtual void set(Stem *);
     void sort();
index 450281825d15bd88985371a2e034ee34f5975a71..14cd2491a803b449cdff3c545eaf33d7014748e9 100644 (file)
@@ -20,7 +20,7 @@
 
 class Note_head : public Item {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
     bool rest_b_;
     int position_i_;
index cae750568541ee8ca0a4f601680e175626173643..b925617e426d3421e3f465a1ec253c74d0d68d75 100644 (file)
@@ -15,7 +15,7 @@
 
 class Note_performer : public Performer {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
     Note_performer();
     ~Note_performer();
index b3a1239d5a4ff339b8a508f61c0693f581896b3e..ae87b68b197a07e1af96c2cf6a83fdc49e528670 100644 (file)
@@ -20,7 +20,7 @@
 
 class Performer_group_performer : public Performer, public virtual Translator {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Input_translator* itrans_l_;
 
     Performer_group_performer();
index 55a2660c435e80b04ba438b2b76be829a7e15941..f9b47a6f8452f0da5dd751cb741057b90c411cb3 100644 (file)
@@ -17,7 +17,7 @@
 class Performer {
     bool init_b_;
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Performer_group_performer* daddy_perf_l_;
 
     Performer();
index 3c026581eb4dbc0bae19e9233b639810b1b99777..defcd3ee63fcbcb1ab90774f936ab9ee73c57c1a 100644 (file)
@@ -9,60 +9,7 @@
 #ifndef QLP_HH
 #define QLP_HH
 
-#include "matrix.hh"
-
-/// inequality constrained quadratic program
-class Ineq_constrained_qp {
-    friend class Active_constraints;
-
-    Array<Vector> cons;
-    Array<Real> consrhs;
-public:
-    Matrix quad;
-    Vector lin;
-    Real const_term;
-
-
-    /**
-      use a KKT method to assert optimality of sol
-      */
-    void assert_solution(Vector sol) const;
-    /// solve the problem using a projected gradient method
-    Vector solve(Vector start) const;
-    
-    /**
-      @return the number of variables in the problem
-      */
-    int dim() const{
-       return lin.dim();
-    }
-
-    /**
-      add a constraint
-
-
-        c*vars >= r
-
-      PRE
-      c.dim() == dim();
-       
-      */
-    void add_inequality_cons(Vector c, double r);
-    
-    /** set up matrices to go with the problem. */
-    Ineq_constrained_qp(int novars);
-    
-    /**
-    evaluate the quadratic function for input #v#
-    */
-    Real eval(Vector v);
-
-    void eliminate_var(int idx, Real value);
-    void OK()const;
-    void print() const;
-
-};
-
+#include "ineq-constrained-qp.hh"
 
 /**
    Quadratic programming with mixed linear constraints.
index c7a54b1eca33d76715c9435fdff8b327811edf89..56b84e2e16f9ed215cfb1b554f7632bc8db7f222 100644 (file)
@@ -9,7 +9,7 @@
 
 #ifndef QLPSOLVE_HH
 #define QLPSOLVE_HH
-#include "qlp.hh"
+
 #include "matrix.hh"
 
 
index f130120cf67b4648f81d4508a3c968c614e47dc6..9a7055bf8fadc0f5e7592bfabb9833151899bf86 100644 (file)
@@ -29,7 +29,7 @@ public:
 
     virtual ~Request(){}
 
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     VIRTUAL_COPY_CONS(Request,Music);
     
     virtual MInterval time_int() const;
@@ -52,7 +52,7 @@ protected:
 
 #define REQUESTMETHODS(T,accessor)     \
 virtual T * accessor() { return this;}\
-NAME_MEMBERS();\
+DECLARE_MY_RUNTIME_TYPEINFO;\
 VIRTUAL_COPY_CONS(T, Request);\
 virtual void do_print() const
 
index 8685aa5d7dc3b281200f96bab541a06c21ab07e0..7a9eea404265229d6b1a4a09d431aece96d81376 100644 (file)
@@ -22,6 +22,6 @@ protected:
     virtual void do_pre_move_processing();
 public:
     Rest_collision_engraver();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 #endif // REST_COLLISION_GRAV_HH
index a2a39754be60780727dc5242e416819bfaabe43d..56589fe14fe1fd94749feac969ccebbea0535793 100644 (file)
@@ -20,7 +20,7 @@ public:
     void add(Note_column*);
     void add(Rest_column*);
     void add(Collision*);
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Rest_collision();
 protected:
     virtual void do_post_processing();
index 86aa7f96e0f6fa6b7a40733f4fc3250029d10e31..7e2db4272c68cf179959d083dcf29af77d0fc45d 100644 (file)
@@ -19,7 +19,7 @@
   */
 class Rest_column : public Head_column {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     void translate_heads(int dy);
 };
 
index fb40310ccb3be9627418da0e566b48d0ba2192a1..4dcee6837e466dd84019115b21fbb44d133c3650 100644 (file)
@@ -20,7 +20,7 @@ public:
     const char* type_ch_C_;
     int priority_i_;
     Score_align_engraver();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
     virtual void acknowledge_element(Score_elem_info);
     virtual void do_pre_move_processing();
index 4bf3efd006213b6931ca3c2ca15542f6cec894ed..2adf9a89112fb948fb865a5ae3c3ca326ec01ad5 100644 (file)
@@ -68,7 +68,7 @@ public:
 
     virtual ~Score_elem();
     Score_elem();
-    NAME_MEMBERS();    
+    DECLARE_MY_RUNTIME_TYPEINFO;    
     
     Interval width() const;
     Interval height() const;
index c559d25548ff1b50439ea47b6f00f9ef7f522c5e..7a722edc2ebdb154cd031c14edac087ae01d7bf7 100644 (file)
@@ -32,7 +32,7 @@ class Score_engraver :
     void typeset_all();
     
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
     Score_engraver();
 
index 6cab304fe3fcc0f89df763e203b59f7b356ca8f0..bfbc22f140889fb4e652bd16b6d08c4e0114f898 100644 (file)
@@ -13,7 +13,7 @@
 class Score_horizontal_align_engraver : public Engraver {
     Break_align_item * halign_p_;
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Score_horizontal_align_engraver();
 protected:
     virtual void acknowledge_element(Score_elem_info);
index 769edecec772bc96f08318112e60f503d6ce9621..4a79cb1fb4fe3a4b12a229b2861365d3f5343750 100644 (file)
@@ -15,7 +15,7 @@ class Score_performer:
     public Performer_group_performer, public Global_translator 
 {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Score_performer();
     ~Score_performer();
 
index 2f440318515d5805c406632c35142922c66ab653..ef95d6d078e53de999c74954c8c059ff52c1fbea 100644 (file)
@@ -18,7 +18,7 @@ public:
     virtual String TeX_string() const;    
     
 
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Line_of_score();
     
     void add(Score_elem *);
index 242acd4bdbc3ae31ebda3d990e2edb9420176563..aeb9d11277a5c35d0b5f540bc26c61862dcd6c2e 100644 (file)
@@ -23,7 +23,7 @@ protected:
 public:
     Link_array<Script> script_l_arr_;
     Link_array<Item> support_l_arr_;
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
    
     void add(Script *);
     void add_support(Item*);
index 94f60905285db658c36306cdd38aa072ab14a5d1..890ce377bc064b497978dfb752fa20f95a26b0a4 100644 (file)
@@ -35,7 +35,7 @@ public:
     virtual int priority_i()const;
     virtual bool inside_b()const;
     virtual Atom get_atom(Paper_def* p, int dir_i_)const;
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
     virtual bool do_equal_b(General_script_def const &)const;
     virtual void do_print() const;
index bf79f8e47a339378fb2142d202c175ae85de9056..2e622aa7ff8f834e73ececadfbc74b42701fa51f 100644 (file)
@@ -18,7 +18,7 @@ class Script_engraver : public Engraver {
     /* *************** */
     bool acceptable_elem_b(Score_elem*);
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Script_engraver();
 protected:
     virtual bool do_try_request(Request*);
index ef7dae9f325e24f7a0acd75698c295a29bb29503..2031a28ad685b6155383eb24d6163a4ddeda1010 100644 (file)
@@ -34,7 +34,7 @@ public:
     static int compare(Script  *const&, Script *const&) ;
     Script();
     void set_stem(Stem*);
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
 };
 
index 063e59cfb354b4fb511d3e34fdd7962451322140..277a846b7f8a78cf0f2b37123e31b596d0527539 100644 (file)
@@ -27,7 +27,7 @@ protected:
     virtual void do_post_move_processing();
 public:
     Slur_engraver();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 #endif // SLURGRAV_HH
index 475458ce97d2a4a97fe3acb7630a9bc919602028..af44eb1d73148b3141648d75b44b4a3e33189b1c 100644 (file)
@@ -25,7 +25,7 @@ protected:
     virtual void do_substitute_dependency(Score_elem*, Score_elem*);
     virtual void do_pre_processing();
     SCORE_ELEM_CLONE(Slur);
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 #endif // SLUR_HH
index 62bc40a22699554ba67a53ea8c3aebd9e70f819b..f81428dc034471edc9f2502d3d1e72136aafff60 100644 (file)
@@ -18,7 +18,7 @@ class Span_bar_engraver : public Engraver
     Array<Bar*> bar_l_arr_;
     Vertical_align_element * valign_l_;
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     
     Span_bar_engraver();
 protected:
index a66477ebe82d874eca1fff1795b83801c9c754f0..d181ebbc9531f9ca0f87fd279206301d6a60cc85 100644 (file)
@@ -17,7 +17,7 @@ class Span_bar : public Bar
     Link_array<Bar> spanning_l_arr_;
 
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Span_bar);
     void add(Bar* );
     void set( Vertical_align_element *);
index 6e4f0d28b6a53cabe5ca1981b8915d2a1d831a55..5b53ffbb7158e4cb1e5ba9be7219b02a65bb4249 100644 (file)
@@ -15,7 +15,7 @@
 class Span_score_bar_engraver : public Span_bar_engraver 
 {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     virtual Span_bar* get_span_bar_p()const;
 };
 
@@ -25,7 +25,7 @@ public:
 class Piano_bar_engraver :  public Span_score_bar_engraver
 {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     virtual Span_bar * get_span_bar_p() const;
 };
 
index c8991d624badb08d8507e370f8ae12bcd4a875c7..675a6ec7a550516c403c899685e7a35eb9b25db7 100644 (file)
@@ -15,7 +15,7 @@
 class Span_score_bar : public Span_bar
 {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Span_score_bar);
     Span_score_bar();
 protected:
@@ -28,7 +28,7 @@ protected:
 class Piano_brace : public Span_score_bar
 {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Piano_brace);
 protected:
     virtual Interval do_width()const;
index aa8747a0563b6427465f9e67d327cfdff88fb79d..821c762cf00213e15b8261eec5b806b517d34dea 100644 (file)
@@ -20,6 +20,6 @@ protected:
     virtual void do_print() const;
     SCORE_ELEM_CLONE(Spanner_elem_group);
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 #endif // SPANNER_ELEM_GROUP_HH
index 1954ca97f7b875ca098fe84c4c67ee134cae5922..f2afbfb241cefb531bfb4225328893ab07de6ae0 100644 (file)
@@ -37,7 +37,7 @@ public:
     PCol *left_col_l_, *right_col_l_;
     
     /* *************** */
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     virtual Spanner* spanner() { return this; }    
     Spanner();
     bool broken_b() const;
index f85c501915ac78a0f7652633e73b82d406382a6c..9161c6322434d1db3de354d81ae0ea1d3d20b981 100644 (file)
@@ -13,7 +13,7 @@
 class Staff_performer : public Performer_group_performer 
 {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
     Staff_performer();
     ~Staff_performer();
index d62da65daddf63cf4f2a8194eaeb3d569ab3d18a..4186c01be10cd371d4fd574e5443ec5feda3336e 100644 (file)
@@ -42,7 +42,7 @@ public:
   
     Staff_side();
     void add_support(Score_elem*);
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     
 protected:
     virtual Interval symbol_height() const;
index b606abf0141894e63c6b1ee7ccfa823908584c0e..f839e545b207f205cdca279757370c4ea72e0241 100644 (file)
@@ -19,7 +19,7 @@ class Staff_sym_engraver : public Engraver {
     Staff_symbol *span_p_;
 public:
     Staff_sym_engraver();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
     virtual ~Staff_sym_engraver();
     virtual void do_process_requests();
index 74b387aaad3d49273359b6a92415bbac7aa1bcb3..513e0e2f3588a87e67dea6e71a6a254c1f638722 100644 (file)
@@ -23,7 +23,7 @@ public:
 
 
     void set_extent(PCol* p1, PCol* p2);
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Staff_symbol(int lines);
     Real inter_note_f()const;
     int steps_i()const;
index ceec013004e0fb1654d7967de2534103275fb4e7..db08cb6446590c255b4dbbea48c7829618fe760f 100644 (file)
@@ -14,7 +14,7 @@ struct Line_of_staff : public Spanner_elem_group{
 
     SCORE_ELEM_CLONE(Line_of_staff);
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
     /* *************** */
     /** 
index a0b3062016a5fc5052116bc674d595dbffad54d3..d4a8749f09abea31d10b415588785189fee10979 100644 (file)
@@ -25,7 +25,7 @@ class Stem_beam_engraver : public Engraver {
     int default_dir_i_;
 public:
     /* *************** */
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Stem_beam_engraver();
 
 protected:
index d2b8a7e19fc109eb3115de1918ae3391355905ab..46228d089a5ed1717ff01bd982b36af2e0fd09c2 100644 (file)
@@ -70,7 +70,7 @@ public:
     /// ensure that this Stem also encompasses the Notehead #n#
     void add(Note_head*n);
 
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
     Real hpos_f()const;
     
index e51e1181df1b73a893bc4f26d859f47847841bc0..d090ea707a3c06909dcb769378f33cf8352bad3b 100644 (file)
@@ -26,7 +26,7 @@ protected:
     virtual void handle_broken_dependencies();
 
     virtual void do_add_processing();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 #endif // SUPER_ELEM_HH
index db8bd9cb0f1a5a965eab2f47ffb867ddfdfa9d71..9a0601a913dfce3b1b29badfafc520f72abcd89e 100644 (file)
@@ -21,6 +21,6 @@ protected:
     bool acceptable_request_b(Request*) const;
     bool do_try_request(Request*) ;
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 #endif // SWALLOW_GRAV_HH
index eec24e9643a3de35d7263d76f3d20cf90261e5a4..a2e4a15a490649992b75fb5435aaa61729290f22 100644 (file)
@@ -14,7 +14,7 @@
 
 class Swallow_performer : public Performer {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
     virtual bool do_try_request (Request* ) { return true; }
 };
index 0fff834f857ffb278ac1d0a0aea97514f6be2449..371aeb44b8e26da5b797b2f45953cd3c922b996d 100644 (file)
@@ -15,7 +15,7 @@
 class Text_def : public General_script_def {
 protected:
     virtual Atom get_atom(Paper_def* p, int dir_i_)const;
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     VIRTUAL_COPY_CONS(Text_def,General_script_def);
 public:
     /**
index ef6d3a2855fada1ba4e8681272701375ab42d505..4f3b3f23a5bc13ad719e3a231fba5e9f52c47a14 100644 (file)
@@ -23,7 +23,7 @@ protected:
     virtual void acknowledge_element(Score_elem_info);
 public:
     Text_engraver();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 #endif // TEXTGRAV_HH
index d4cbcff36436fedcea9cc8e07da8d4cfc0accdf2..0019a5f8e0da5e42c7e395bc05c7726d491e2f53 100644 (file)
@@ -26,7 +26,7 @@ public:
 
     Text_item(General_script_def*,int dir=0);
     virtual ~Text_item();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
 protected:
     General_script_def * tdef_p_;
index 119384067cd64bb5dbaf895932b12e1509f1ceee..ff06829345fedc82b1b777ba45a52ce34316135e 100644 (file)
@@ -18,7 +18,7 @@ public:
     Directional_spanner * support_span_l_;
     General_script_def * spec_p_;
     Offset text_off_;
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 
     void set_support(Directional_spanner*);
     Text_spanner();
index 1b2b735e9d4c7b0f26165d5ecdfa2f9f07e0dbc1..8a07a27b7502ba238b5835ec236d03ef1889ad3c 100644 (file)
@@ -34,7 +34,7 @@ protected:
     virtual void set_feature(Feature);
 public:
     Tie_engraver();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 #endif // TIE_GRAV_HH
index 8cf2fef4a53603902e5c24229b8777bd4e32f8d4..9d8c35496b33af124608319fabaacd3249f11086 100644 (file)
@@ -28,7 +28,7 @@ public:
     void set_head(int, Note_head*head_l);
 
     Tie();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Tie);
 };
 #endif // TIE_HH
index b1e333a59adc39feaee2d7dc3a44dc04f116aa3c..772b666ff5cef2ca9b2ded392d351fe161d441cc 100644 (file)
@@ -30,7 +30,7 @@ public:
     virtual Translator *find_get_translator_l(String name, String id)=0;
     virtual Translator *ancestor_l(int l=1)=0;
     virtual ~Translator(){}
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Translator();
     virtual Translator *get_default_interpreter()=0;
 };
index cf20de93cc36e019e5151cbe69e07c5a0cf41a00..b96dfba33529a6192c80bbb7ee41745857fcb462 100644 (file)
@@ -20,7 +20,7 @@ public:
     void add(Score_elem*);
     bool contains_b(Score_elem const*)const;
     Vertical_align_element();
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
     virtual void do_substitute_dependency(Score_elem*,Score_elem*);
     virtual void do_post_processing() ;
index 372788283dcca37595dad104cd25fcb65a02aa6d..4df768bcdc56cff007acce6c5a4c5dd393989d85 100644 (file)
@@ -16,7 +16,7 @@ class Vertical_align_engraver : public Engraver {
     Vertical_align_spanner * valign_p_;
     
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     Vertical_align_engraver();
 protected:
    virtual void acknowledge_element(Score_elem_info);
index ccf2224c8b154ff960cb98704fbab1208c26bbb7..fefe52a302bdc30475d5c2d93d4f7adcf5f905fd 100644 (file)
@@ -16,7 +16,7 @@
 class Vertical_align_spanner : public Vertical_align_element, public Spanner
 {
 public:
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Vertical_align_spanner);
     virtual void do_print() const { Vertical_align_element::do_print() ; }
     
index cdac7076ce1484fd2c7d20f5a6bab68c9d6f4b60..843f2d571e3a36d7961ac374392c77b689a61b3a 100644 (file)
@@ -26,7 +26,7 @@ protected:
 public:
     
     
-    NAME_MEMBERS();
+    DECLARE_MY_RUNTIME_TYPEINFO;
     static bool static_acceptable_request_b(Request*);
     Voice_group_engravers();
 };
diff --git a/lily/include/voice-group-performer.hh b/lily/include/voice-group-performer.hh
deleted file mode 100644 (file)
index 1a7efee..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-  voice-group-performer.hh -- declare Voice_group_performer
-
-  (c) 1996, 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-                 Jan Nieuwenhuizen <jan@digicash.com>
- */
-
-#ifndef VOICE_GROUP_PERFORMER_HH
-#define VOICE_GROUP_PERFORMER_HH
-
-#include "performer-group-performer.hh"
-
-#if 0
-class Voice_performer_group_performer : public Performer_group_performer {
-public:
-    Voice_performer_
-
-};
-
-#endif
-
-class Voice_group_performer : public Performer_group_performer {
-public:
-    NAME_MEMBERS();
-
-    Voice_group_performer();
-    ~Voice_group_performer();
-
-private:
-};
-
-
-#if 0
-class Voice_performer : 
-       public Performer_group_performer, public Interpreter 
-{
-    
-};
-#endif
-
-#endif // VOICE_GROUP_PERFORMER_HH
diff --git a/lily/ineq-constrained-qp.cc b/lily/ineq-constrained-qp.cc
new file mode 100644 (file)
index 0000000..8fed514
--- /dev/null
@@ -0,0 +1,198 @@
+/*
+  ineq-constrained-qp.cc -- implement Ineq_constrained_qp
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+#include "ineq-constrained-qp.hh"
+#include "qlpsolve.hh"
+#include "const.hh"
+#include "debug.hh"
+/*
+  MAy be this also should go into a library
+ */
+
+const int MAXITER=100;         // qlpsolve.hh
+
+/*
+    assume x(idx) == value, and adjust constraints, lin and quad accordingly
+
+    TODO: add const_term
+    */
+void
+Ineq_constrained_qp::eliminate_var(int idx, Real value)
+{
+    Vector row(quad.row(idx));
+    row*= value;
+
+    quad.delete_row(idx);
+
+    quad.delete_column(idx);
+
+    lin.del(idx);
+    row.del(idx);
+    lin +=row ;
+
+   for (int i=0; i < cons.size(); i++) {
+      consrhs[i] -= cons[i](idx) *value;
+      cons[i].del(idx);
+   }
+}
+
+void
+Ineq_constrained_qp::add_inequality_cons(Vector c, double r)
+{
+    cons.push(c);
+    consrhs.push(r);
+}
+
+Ineq_constrained_qp::Ineq_constrained_qp(int novars):
+    quad(novars),
+    lin(novars),
+    const_term (0.0)
+{
+}
+
+void
+Ineq_constrained_qp::OK() const
+{
+#if !defined(NDEBUG) && defined(PARANOID)
+    assert(cons.size() == consrhs.size());
+    Matrix Qdif= quad - quad.transposed();
+    assert(Qdif.norm()/quad.norm() < EPS);
+#endif    
+}
+     
+
+Real
+Ineq_constrained_qp::eval (Vector v)
+{
+    return v * quad * v + lin * v + const_term;
+}
+
+
+int
+min_elt_index(Vector v)
+{
+    Real m=INFTY; int idx=-1;
+    for (int i = 0; i < v.dim(); i++){
+       if (v(i) < m) {
+           idx = i;
+           m = v(i);
+       }
+       assert(v(i) <= INFTY);
+    }
+    return idx;
+}
+
+
+/**the numerical solving. Mordecai Avriel, Nonlinear Programming: analysis and methods (1976)
+    Prentice Hall.
+
+    Section 13.3
+
+    This is a "projected gradient" algorithm. Starting from a point x
+    the next point is found in a direction determined by projecting
+    the gradient onto the active constraints.  (well, not really the
+    gradient. The optimal solution obeying the active constraints is
+    tried. This is why H = Q^-1 in initialisation) )
+
+
+    */
+Vector
+Ineq_constrained_qp::solve(Vector start) const 
+{    
+    if (!dim())
+       return Vector(0);
+    // experimental
+//    quad.try_set_band();
+    
+    Active_constraints act(this);
+
+
+    act.OK();    
+
+    
+    Vector x(start);
+    Vector gradient=quad*x+lin;
+//    Real fvalue = x*quad*x/2 + lin*x + const_term;
+// it's no use.
+    
+    Vector last_gradient(gradient);
+    int iterations=0;
+    
+    while (iterations++ < MAXITER) {
+       Vector direction= - act.find_active_optimum(gradient);
+               
+       mtor << "gradient "<< gradient<< "\ndirection " << direction<<"\n";
+       
+       if (direction.norm() > EPS) {
+           mtor << act.status() << '\n';
+           
+           Real minalf = INFTY;
+
+           Inactive_iter minidx(act);
+
+
+           /*
+    we know the optimum on this "hyperplane". Check if we
+    bump into the edges of the simplex
+    */
+    
+           for (Inactive_iter ia(act); ia.ok(); ia++) {
+
+               if (ia.vec() * direction >= 0)
+                   continue;
+               Real alfa= - (ia.vec()*x - ia.rhs())/
+                   (ia.vec()*direction);
+               
+               if (minalf > alfa) {
+                   minidx = ia;
+                   minalf = alfa;
+               }
+           }
+           Real unbounded_alfa = 1.0;
+           Real optimal_step = min(minalf, unbounded_alfa);
+
+           Vector deltax=direction * optimal_step;
+           x += deltax;            
+           gradient += optimal_step * (quad * deltax);
+           
+           mtor << "step = " << optimal_step<< " (|dx| = " <<
+               deltax.norm() << ")\n";     
+          
+           if (minalf < unbounded_alfa) {
+               /* bumped into an edge. try again, in smaller space. */
+               act.add(minidx.idx());
+               mtor << "adding cons "<< minidx.idx()<<'\n';
+               continue;
+           }
+           /*ASSERT: we are at optimal solution for this "plane"*/
+    
+    
+       }
+       
+       Vector lagrange_mult=act.get_lagrange(gradient);        
+       int m= min_elt_index(lagrange_mult);
+       
+       if (m>=0 && lagrange_mult(m) > 0) {
+           break;              // optimal sol.
+       } else if (m<0) {
+           assert(gradient.norm() < EPS) ;
+           
+           break;
+       }
+       
+       mtor << "dropping cons " << m<<'\n';
+       act.drop(m);
+    }
+    if (iterations >= MAXITER)
+       WARN<<"didn't converge!\n";
+    
+    mtor <<  ": found " << x<<" in " << iterations <<" iterations\n";
+    assert_solution(x);
+    return x;
+} 
+
+    
index 7919a3ec35ce8baca840bd02f1c04a83b6c5eb13..2481e4a35069fa7f4b3a4f75a9814c9d38dc31be 100644 (file)
@@ -78,7 +78,7 @@ Item*
 Item::find_prebroken_piece(Line_of_score*l) const
 {
     if (line_l() == l) 
-       return this;
+       return (Item*)this;
     else if (broken_to_a_[0] && broken_to_a_[0]->line_l() == l)
        return broken_to_a_[0];
     else if (broken_to_a_[1] && broken_to_a_[1]->line_l() == l)
index 0ba2ae489676a30fcd5cce11a4b8f8bd1b5e551b..85e8e630fd14e4401d0d535374ca9fb7966c0d95 100644 (file)
@@ -11,6 +11,7 @@
 #include "text-item.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
+#include "paper-def.hh"
 
 Lyric_engraver::Lyric_engraver()
 {
@@ -34,6 +35,8 @@ Lyric_engraver::do_process_requests()
 {
     if ( lreq_l_ ) {  
        lyric_item_p_ =  new Text_item(lreq_l_->tdef_p_ );
+
+       lyric_item_p_->translate_x( paper()->note_width()/2 );
        lyric_item_p_->dir_i_ = -1;
        lyric_item_p_->fat_b_ = true;
        announce_element( Score_elem_info( lyric_item_p_, lreq_l_));
index ac5bb9f3b5ca4efdeeb350bb3910584e93943c85..812163e04a39fbc8662cd02df66c20257c031208 100644 (file)
@@ -10,8 +10,6 @@
 #include "command-request.hh"
 #include "midi-item.hh"
 
-
-
 IMPLEMENT_IS_TYPE_B1(Meter_performer,Performer);
 ADD_THIS_PERFORMER(Meter_performer);
 
index 2efb36aff1057f6c4e19ae3e37399da1780c1655..4d29affb66199eecfd11a3af0de480d0fb62aa6c 100644 (file)
@@ -27,8 +27,9 @@ IMPLEMENT_IS_TYPE_B1(Midi_note, Midi_item);
 IMPLEMENT_IS_TYPE_B1(Midi_duration, Midi_item);
 IMPLEMENT_IS_TYPE_B1(Midi_chunk, Midi_item);
 IMPLEMENT_IS_TYPE_B1(Midi_header, Midi_chunk);
-IMPLEMENT_IS_TYPE_B1(Midi_text, Midi_item);
+IMPLEMENT_IS_TYPE_B1(Midi_instrument, Midi_item);
 IMPLEMENT_IS_TYPE_B1(Midi_tempo, Midi_item);
+IMPLEMENT_IS_TYPE_B1(Midi_text, Midi_item);
 IMPLEMENT_IS_TYPE_B1(Midi_time, Midi_item);
 IMPLEMENT_IS_TYPE_B1(Midi_track, Midi_chunk);
 
@@ -89,6 +90,195 @@ Midi_header::Midi_header( int format_i, int tracks_i, int clocks_per_4_i )
     set( "MThd", str, "" );
 }
 
+char const* const instrument_name_sz_a_[ ] = {
+
+ /* default is usually piano */
+ /* 0 */ "piano",
+
+ /* (1-8 piano) */
+ /* 1 */ "acoustic grand",
+ /* 2 */ "bright acoustic",
+ /* 3 */ "electric grand",
+ /* 4 */ "honky-tonk",
+ /* 5 */ "electric piano 1",
+ /* 6 */ "electric piano 2",
+ /* 7 */ "harpsichord",
+ /* 8 */ "clav",
+
+ /* (9-16 chrom percussion) */
+ /* 9 */ "celesta",
+ /* 10 */ "glockenspiel",
+ /* 11 */ "music box",
+ /* 12 */ "vibraphone",
+ /* 13 */ "marimba",
+ /* 14 */ "xylophone",
+ /* 15 */ "tubular bells",
+ /* 16 */ "dulcimer",
+
+ /* (17-24 organ) */
+ /* 17 */ "drawbar organ",
+ /* 18 */ "percussive organ",
+ /* 19 */ "rock organ",
+ /* 20 */ "church organ",
+ /* 21 */ "reed organ",
+ /* 22 */ "accoridan",
+ /* 23 */ "harmonica",
+ /* 24 */ "tango accordian",
+
+ /* (25-32 guitar) */
+ /* 25 */ "acoustic guitar(nylon)",
+ /* 26 */ "acoustic guitar(steel)",
+ /* 27 */ "electric guitar(jazz)",
+ /* 28 */ "electric guitar(clean)",
+ /* 29 */ "electric guitar(muted)",
+ /* 30 */ "overdriven guitar",
+ /* 31 */ "distortion guitar",
+ /* 32 */ "guitar harmonics",
+
+ /* (33-40 bass) */
+ /* 33 */ "acoustic bass",
+ /* 34 */ "electric bass(finger)",
+ /* 35 */ "electric bass(pick)",
+ /* 36 */ "fretless bass",
+ /* 37 */ "slap bass 1",
+ /* 38 */ "slap bass 2",
+ /* 39 */ "synth bass 1",
+ /* 40 */ "synth bass 2",
+
+ /* (41-48 strings) */
+ /* 41 */ "violin",
+ /* 42 */ "viola",
+ /* 43 */ "cello",
+ /* 44 */ "contrabass",
+ /* 45 */ "tremolo strings",
+ /* 46 */ "pizzicato strings",
+ /* 47 */ "orchestral strings",
+ /* 48 */ "timpani",
+
+ /* (49-56 ensemble) */
+ /* 49 */ "string ensemble 1",
+ /* 50 */ "string ensemble 2",
+ /* 51 */ "synthstrings 1",
+ /* 52 */ "synthstrings 2",
+ /* 53 */ "choir aahs",
+ /* 54 */ "voice oohs",
+ /* 55 */ "synth voice",
+ /* 56 */ "orchestra hit",
+
+ /* (57-64 brass) */
+ /* 57 */ "trumpet",
+ /* 58 */ "trombone",
+ /* 59 */ "tuba",
+ /* 60 */ "muted trumpet",
+ /* 61 */ "french horn",
+ /* 62 */ "brass section",
+ /* 63 */ "synthbrass 1",
+ /* 64 */ "synthbrass 2",
+
+ /* (65-72 reed) */
+ /* 65 */ "soprano sax",
+ /* 66 */ "alto sax",
+ /* 67 */ "tenor sax",
+ /* 68 */ "baritone sax",
+ /* 69 */ "oboe",
+ /* 70 */ "english horn",
+ /* 71 */ "bassoon",
+ /* 72 */ "clarinet",
+
+ /* (73-80 pipe) */
+ /* 73 */ "piccolo",
+ /* 74 */ "flute",
+ /* 75 */ "recorder",
+ /* 76 */ "pan flute",
+ /* 77 */ "blown bottle",
+ /* 78 */ "skakuhachi",
+ /* 79 */ "whistle",
+ /* 80 */ "ocarina",
+
+ /* (81-88 synth lead) */
+ /* 81 */ "lead 1 (square)",
+ /* 82 */ "lead 2 (sawtooth)",
+ /* 83 */ "lead 3 (calliope)",
+ /* 84 */ "lead 4 (chiff)",
+ /* 85 */ "lead 5 (charang)",
+ /* 86 */ "lead 6 (voice)",
+ /* 87 */ "lead 7 (fifths)",
+ /* 88 */ "lead 8 (bass+lead)",
+
+ /* (89-96 synth pad) */
+ /* 89 */ "pad 1 (new age)",
+ /* 90 */ "pad 2 (warm)",
+ /* 91 */ "pad 3 (polysynth)",
+ /* 92 */ "pad 4 (choir)",
+ /* 93 */ "pad 5 (bowed)",
+ /* 94 */ "pad 6 (metallic)",
+ /* 95 */ "pad 7 (halo)",
+ /* 96 */ "pad 8 (sweep)",
+
+ /* (97-104 synth effects) */
+ /* 97 */ "fx 1 (rain)",
+ /* 98 */ "fx 2 (soundtrack)",
+ /* 99 */ "fx 3 (crystal)",
+ /* 100 */ "fx 4 (atmosphere)",
+ /* 101 */ "fx 5 (brightness)",
+ /* 102 */ "fx 6 (goblins)",
+ /* 103 */ "fx 7 (echoes)",
+ /* 104 */ "fx 8 (sci-fi)",
+
+ /* (105-112 ethnic) */
+ /* 105 */ "sitar",
+ /* 106 */ "banjo",
+ /* 107 */ "shamisen",
+ /* 108 */ "koto",
+ /* 109 */ "kalimba",
+ /* 110 */ "bagpipe",
+ /* 111 */ "fiddle",
+ /* 112 */ "shanai",
+
+ /* (113-120 percussive) */
+ /* 113 */ "tinkle bell",
+ /* 114 */ "agogo",
+ /* 115 */ "steel drums",
+ /* 116 */ "woodblock",
+ /* 117 */ "taiko drum",
+ /* 118 */ "melodic tom",
+ /* 119 */ "synth drum",
+ /* 120 */ "reverse cymbal",
+
+ /* (121-128 sound effects) */
+ /* 121 */ "guitar fret noise",
+ /* 122 */ "breath noise",
+ /* 123 */ "seashore",
+ /* 124 */ "bird tweet",
+ /* 125 */ "telephone ring",
+ /* 126 */ "helicopter",
+ /* 127 */ "applause",
+ /* 128 */ "gunshot",
+        0
+}; 
+
+Midi_instrument::Midi_instrument( int channel_i, String instrument_str )
+{
+    channel_i_ = channel_i;
+    instrument_str.to_lower();
+    for ( int i = 0; instrument_name_sz_a_[i]; i++ )
+       if ( instrument_str == String(instrument_name_sz_a_[ i ] )) { 
+           program_byte_ = (Byte)i;
+           break;
+       }
+}
+                                      
+String
+Midi_instrument::str() const
+{
+    if ( program_byte_ ) {
+       String str = String( (char)( 0xc0 + channel_i_ ) );
+       str += String( (char)program_byte_ );
+       return str;
+    }
+    return String( "" );
+}
+
 String
 Midi_item::i2varint_str( int i )
 {
@@ -263,6 +453,7 @@ Midi_track::add( Moment delta_time_moment, Midi_item* mitem_l )
     // use convention of 384 clocks per 4
     // use Duration_convert
     int delta_time_i = delta_time_moment * Moment( 384 ) / Moment( 1, 4 );
+    // ? int ( delta_time_moment * 4 * 384) 
     add( delta_time_i, mitem_l->str() );
 }
 
index 51069c4cc6edc480b9983f81d258475ee2d7ab00..83d8b7aa6ce107066ed1137666a328fc0eb001ea 100644 (file)
@@ -33,10 +33,9 @@ Midi_stream::~Midi_stream()
 Midi_stream&
 Midi_stream::operator <<( String str )
 {
-    // still debugging...
     if ( check_debug )
        str = String_convert::bin2hex_str( str );
-    // string now 1.0.26-2 handles binary streaming
+    
     *os_p_ << str;
     return *this;
 }
@@ -61,23 +60,14 @@ Midi_stream::operator <<( int i )
 void
 Midi_stream::header()
 {
-//    *os_p_ << "% Creator: " << get_version();
-//    *os_p_ << "% Automatically generated, at ";
-//    time_t t(time(0));
-//    *os_p_ << ctime(&t);
-
-//                4D 54 68 64     MThd
-//    String str = "MThd";
-//                00 00 00 06     chunk length
-//                00 01   format 1
-//                00 01   one track
-//                00 60   96 per quarter-note
-
-//    char const ch_C = "0000" "0006" "0001" "0001" "0060";
-//    str += String_convert::hex2bin_str( ch_C );
-//    *os_p_ << str;
-
-//      *this << Midi_header( 1, 1, tempo_i_ );
+/*
+                4D 54 68 64     MThd
+    String str = "MThd";
+                00 00 00 06     chunk length
+                00 01   format 1
+                00 01   one track
+                00 60   96 per quarter-note
+*/
       *this << Midi_header( 1, tracks_i_, clocks_per_4_i_ );
 }
 
index bc6b717fda942a8b3c01fcaf0a75d2b2f52b81fd..99b942b91ea2eaeed4c6f39b5b4d3b6863a42c21 100644 (file)
 
 IMPLEMENT_IS_TYPE_B(Music_iterator);
 
-Chord_iterator::~Chord_iterator(){}
+Chord_iterator::~Chord_iterator()
+{
+}
+
 void
 Music_iterator::do_print()const
 {
@@ -27,14 +30,15 @@ Music_iterator::print() const
 {
 #ifndef NPRINT
     mtor << name() << "{";
-    mtor << "report to " << report_to_l() << " (" << report_to_l()->name() << ")\n";
+    mtor << "report to " << 
+       report_to_l() << " (" << report_to_l()->name() << ")\n";
     mtor << "next at " << next_moment() << " ";
     do_print();
     mtor << "}\n";
 #endif
 }
 
-Translator*
+Translator *
 Music_iterator::get_req_translator_l()
 {
     assert(report_to_l());
index 995d541ea8a894e76cc8d3204f171310127d3bf1..67acc1d8ae2df58bc0e075c5e9c8c6ed3d588e3b 100644 (file)
@@ -234,7 +234,7 @@ mudela:     /* empty */
 
 check_version:
        VERSION STRING ';'              {
-               if (*$2 != MUDELA_VERSION) {
+               if ( String( *$2 ) != MUDELA_VERSION) {
                        if (THIS->ignore_version_b_) {
                                THIS->here_input().error("Incorrect mudela version");
                        } else {
@@ -961,6 +961,7 @@ music_elt:
 
 lyrics_elt:
        text_def notemode_duration                      {
+       /* this sux! text-def should be feature of lyric-engraver. */
                if (!THIS->lexer_p_->lyric_state_b())
                        THIS->parser_error("Have to be in Lyric mode for lyrics");
                $$ = THIS->get_word_element($1, $2);
index 7eac50596c3ef030d3f1332886d7778f994c014e..833a76f4e4da68af02609526f23b22e0f29f545a 100644 (file)
@@ -1,8 +1,17 @@
+/*
+  qlp.cc -- implement Mixed_qp
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
 #include "debug.hh"
 #include "const.hh"
 #include "qlp.hh"
 #include "choleski.hh"
 
+
 void
 Mixed_qp::add_equality_cons(Vector , double )
 {
@@ -16,36 +25,6 @@ Mixed_qp::add_fixed_var(int i, Real r)
     eq_consrhs.push(r);
 }
 
-void
-Ineq_constrained_qp::add_inequality_cons(Vector c, double r)
-{
-    cons.push(c);
-    consrhs.push(r);
-}
-
-Ineq_constrained_qp::Ineq_constrained_qp(int novars):
-    quad(novars),
-    lin(novars),
-    const_term (0.0)
-{
-}
-
-void
-Ineq_constrained_qp::OK() const
-{
-#ifndef NDEBUG    
-    assert(cons.size() == consrhs.size());
-    Matrix Qdif= quad - quad.transposed();
-    assert(Qdif.norm()/quad.norm() < EPS);
-#endif    
-}
-     
-
-Real
-Ineq_constrained_qp::eval (Vector v)
-{
-    return v * quad * v + lin * v + const_term;
-}
 
 /**
     eliminate appropriate variables, until we have a Ineq_constrained_qp
@@ -74,32 +53,6 @@ Mixed_qp::solve(Vector start) const
     return sol;
 }
 
-/*
-    assume x(idx) == value, and adjust constraints, lin and quad accordingly
-
-    TODO: add const_term
-    */
-void
-Ineq_constrained_qp::eliminate_var(int idx, Real value)
-{
-    Vector row(quad.row(idx));
-    row*= value;
-
-    quad.delete_row(idx);
-
-    quad.delete_column(idx);
-
-    lin.del(idx);
-    row.del(idx);
-    lin +=row ;
-
-   for (int i=0; i < cons.size(); i++) {
-      consrhs[i] -= cons[i](idx) *value;
-      cons[i].del(idx);
-   }
-}
-
-
 
 void
 Ineq_constrained_qp::assert_solution(Vector sol) const
@@ -129,8 +82,6 @@ Ineq_constrained_qp::print() const
 #endif
 }
 
-/* *************** */
-
 Mixed_qp::Mixed_qp(int n)
     : Ineq_constrained_qp(n)
 {
index 5c4d91b6e67f61ceb7839e90555ae65ddd4f86a1..31ec4a85b4dd10bc3f8ee76c7200b72f5ec6257d 100644 (file)
@@ -9,6 +9,7 @@
   try fixed point arithmetic, to speed up lily.
   */
 
+#include "ineq-constrained-qp.hh"
 #include "qlpsolve.hh"
 #include "const.hh"
 #include "debug.hh"
@@ -142,6 +143,7 @@ Active_constraints::Active_constraints(Ineq_constrained_qp const *op)
        inactive.push(i);
     Choleski_decomposition chol(op->quad);
     H=chol.inverse();
+    OK();
 }
 
 /** Find the optimum which is in the planes generated by the active
@@ -153,127 +155,3 @@ Active_constraints::find_active_optimum(Vector g)
     return H*g;
 }
 
-/* *************************************************************** */
-
-int
-min_elt_index(Vector v)
-{
-    Real m=INFTY; int idx=-1;
-    for (int i = 0; i < v.dim(); i++){
-       if (v(i) < m) {
-           idx = i;
-           m = v(i);
-       }
-       assert(v(i) <= INFTY);
-    }
-    return idx;
-}
-
-
-/**the numerical solving. Mordecai Avriel, Nonlinear Programming: analysis and methods (1976)
-    Prentice Hall.
-
-    Section 13.3
-
-    This is a "projected gradient" algorithm. Starting from a point x
-    the next point is found in a direction determined by projecting
-    the gradient onto the active constraints.  (well, not really the
-    gradient. The optimal solution obeying the active constraints is
-    tried. This is why H = Q^-1 in initialisation) )
-
-
-    */
-Vector
-Ineq_constrained_qp::solve(Vector start) const 
-{    
-    if (!dim())
-       return Vector(0);
-    
-    Active_constraints act(this);
-
-
-    act.OK();    
-
-    
-    Vector x(start);
-    Vector gradient=quad*x+lin;
-//    Real fvalue = x*quad*x/2 + lin*x + const_term;
-// it's no use.
-    
-    Vector last_gradient(gradient);
-    int iterations=0;
-    
-    while (iterations++ < MAXITER) {
-       Vector direction= - act.find_active_optimum(gradient);
-               
-       mtor << "gradient "<< gradient<< "\ndirection " << direction<<"\n";
-       
-       if (direction.norm() > EPS) {
-           mtor << act.status() << '\n';
-           
-           Real minalf = INFTY;
-
-           Inactive_iter minidx(act);
-
-
-           /*
-    we know the optimum on this "hyperplane". Check if we
-    bump into the edges of the simplex
-    */
-    
-           for (Inactive_iter ia(act); ia.ok(); ia++) {
-
-               if (ia.vec() * direction >= 0)
-                   continue;
-               Real alfa= - (ia.vec()*x - ia.rhs())/
-                   (ia.vec()*direction);
-               
-               if (minalf > alfa) {
-                   minidx = ia;
-                   minalf = alfa;
-               }
-           }
-           Real unbounded_alfa = 1.0;
-           Real optimal_step = min(minalf, unbounded_alfa);
-
-           Vector deltax=direction * optimal_step;
-           x += deltax;            
-           gradient += optimal_step * (quad * deltax);
-           
-           mtor << "step = " << optimal_step<< " (|dx| = " <<
-               deltax.norm() << ")\n";     
-          
-           if (minalf < unbounded_alfa) {
-               /* bumped into an edge. try again, in smaller space. */
-               act.add(minidx.idx());
-               mtor << "adding cons "<< minidx.idx()<<'\n';
-               continue;
-           }
-           /*ASSERT: we are at optimal solution for this "plane"*/
-    
-    
-       }
-       
-       Vector lagrange_mult=act.get_lagrange(gradient);        
-       int m= min_elt_index(lagrange_mult);
-       
-       if (m>=0 && lagrange_mult(m) > 0) {
-           break;              // optimal sol.
-       } else if (m<0) {
-           assert(gradient.norm() < EPS) ;
-           
-           break;
-       }
-       
-       mtor << "dropping cons " << m<<'\n';
-       act.drop(m);
-    }
-    if (iterations >= MAXITER)
-       WARN<<"didn't converge!\n";
-    
-    mtor <<  ": found " << x<<" in " << iterations <<" iterations\n";
-    assert_solution(x);
-    return x;
-} 
-
-    
index 9c92ce3af4726142e04f35d6112274f62ba22bf6..8020cf7f1fca59922bb64ca6717297d29c2b4fb2 100644 (file)
@@ -16,7 +16,7 @@
 class C ## _align_engraver : public Score_align_engraver               \
 {                                                                      \
 public:                                                                        \
-    NAME_MEMBERS();                                                    \
+    DECLARE_MY_RUNTIME_TYPEINFO;                                       \
     C ## _align_engraver() : Score_align_engraver() \
     { type_ch_C_ = T::static_name();\
     priority_i_ = p;}  \
index 0ff49514e0e54570b3e28a9c6e99ad9de9c13476..5d3c98b84263ed13a54cdd8924ad108c59f1de91 100644 (file)
@@ -50,7 +50,7 @@ Score_performer::finish()
     Midi_stream output_stream( midi_l_->outfile_str_, midi_item_p_arr_.size() + 1, 384 );    
     *mlog << "MIDI output to " << midi_l_->outfile_str_ << " ..." << endl;    
 
-    header( output_stream);        
+    header( output_stream);
     int track_i = 1;
     for (int i=0; i<  midi_item_p_arr_.size(); i++) {
        Midi_item * it_p = midi_item_p_arr_[i];
@@ -59,6 +59,7 @@ Score_performer::finish()
            ((Midi_track*)it_p )->number_i_ = track_i ++;
        output_stream<< *it_p;
     }
+    *output_stream.os_p_ << flush;
     *mlog << endl;
 }
 
index b21bc5c45aee54db7435607ef2a7fa92788d713f..b0368f9c4f91e45e391c629f029b93f3f5b8b05a 100644 (file)
@@ -48,11 +48,18 @@ Staff_performer::header()
     Midi_text track_name( Midi_text::TRACK_NAME, instrument_str());
     midi_track_p_->add( Moment( 0 ), &track_name );
 
-    // set instrument :-)
+    // set instrument description
     Midi_text instrument_name( Midi_text::INSTRUMENT_NAME, instrument_str() );
     midi_track_p_->add( Moment( 0 ), &instrument_name );
 
-    
+    // set instrument :-)
+    // lieve wendy, nu heb je mijn track_i_ / get_staff_i weggehaald...
+    // zie ook note-performer: ugh
+    // ugh, need to know channel (===track===staff) too
+    int channel_i = 0;
+    Midi_instrument instrument( channel_i, instrument_str() );
+    midi_track_p_->add( Moment( 0 ), &instrument );
+
     Midi_tempo midi_tempo( get_tempo_i(  ) );
     midi_track_p_->add( Moment( 0 ), &midi_tempo );
 }
index f072a5b28641efbe3aa251df9d4e7995ee4334ba..484729579becf4cc01a027a9c388b855893b6fb8 100644 (file)
@@ -7,7 +7,6 @@
 */
 
 #include "proto.hh"
-#include "plist.hh"
 #include "list.tcc"
 #include "cursor.tcc"
 
index 05b842473dd92c9d7007424ba4f7048e09be5193..68e30479d9ed68cb6ef1c108f2a69c76f3fea6b7 100644 (file)
@@ -1,3 +1,11 @@
+/*
+  template5.cc -- instantiate Intervals
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
 #include <limits.h>
 #include "proto.hh"
 #include "string.hh"
@@ -18,7 +26,16 @@ const Real INFTY = HUGE_VAL;
 Rational
 Interval_t<Rational>::infinity()
 {
-    return INFTY;
+/*
+  windhoze-suck-suck-suck-suck-suck-thank-you-cygnus
+
+  I get tired of all these incompatibilities. We'll just assume:
+
+  that 2^31 is *Big*
+
+ */
+
+    return Rational(INT_MAX);
 }
 
 int
index 70f3e5179759414f2ce44cb09fe59ab57d97c3da..c1ba56bd89623823fd400fc0da71ba355dfc1af7 100644 (file)
@@ -62,6 +62,7 @@ Lookup::half_slur_middlepart(Real &dx, int dir) const
     if (dir < 0)
        idx += 128;
 
+    assert (idx < 256);
 
     f+=String( "{" ) + String( idx ) + "}";
     s.tex = f;
@@ -107,12 +108,12 @@ Lookup::half_slur(int dy, Real &dx, int dir, int xpart) const
        hidx = -hidx;
     hidx --;
     int idx =-1;
-    
 
     idx = widx * 16 + hidx;
     if (xpart < 0)
        idx += 128;
     
+    assert (idx < 256);
     f+=String( "{" ) + String( idx ) + "}";
 
     
@@ -127,7 +128,7 @@ Lookup::slur (int dy , Real &dx, int dir) const
     assert(dx >=0 && abs(dir) <= 1);
     int y_sign = sign(dy);
 
-    bool large = dy > 16;
+    bool large = abs(dy) > 8;
 
     if (y_sign) {
        large |= dx>= 4*16 PT;
@@ -150,7 +151,7 @@ Lookup::slur (int dy , Real &dx, int dir) const
     if (hidx <0)
        hidx = -hidx;
     hidx --; 
-    if (hidx > 16) {
+    if (hidx > 8) {
        WARN<<"slur to steep: " << dy << " shrinking (ugh)\n";
     }
     
@@ -176,6 +177,7 @@ Lookup::slur (int dy , Real &dx, int dir) const
            idx += 54;          
     }
     
+    assert (idx < 256);
     f+=String( "{" ) + String( idx ) + "}";
     s.tex = f;
 
diff --git a/lily/voice-group-performer.cc b/lily/voice-group-performer.cc
deleted file mode 100644 (file)
index fa33933..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-  voice-group-performer.cc -- implement Voice_group_performer
-
-  (c) 1996, 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-                 Jan Nieuwenhuizen <jan@digicash.com>
- */
-
-
-#include "voice-group-performer.hh"
-#include "translator.hh"
-#include "input-translator.hh"
-#include "debug.hh"
-
-//IMPLEMENT_IS_TYPE_B2(Voice_group_performer,Performer, Translator);
-IMPLEMENT_IS_TYPE_B1(Voice_group_performer,Performer_group_performer);
-
-ADD_THIS_PERFORMER(Voice_group_performer);
-
-Voice_group_performer::Voice_group_performer()
-{
-}
-
-Voice_group_performer::~Voice_group_performer()
-{
-}
-
index 9a3cbef487421e9642cf6e54d244d86163bae946..8189216cfbbf5704e3c0a7cf687fd433c5ff43ab 100644 (file)
@@ -29,3 +29,6 @@ FIND = @FIND@
 COMPILEINFO = @COMPILEINFO@
 BISON = @BISON@
 FLEX = @FLEX@
+PERL =@PERL@
+
+
index 804cad1e9b16acfd13fa75d7e8c877a084076b33..e5c0104f3235b8e31f4dcc4f2cd91e017e4e9c4c 100644 (file)
@@ -42,18 +42,18 @@ spec: $(outdir)/lilypond.spec
 
 rpmdocs=$(addprefix Documentation/out/, $(notdir $(shell ls $(depth)/Documentation/$(outdir)/*.text)))\
        BUGS TODO NEWS DEDICATION ANNOUNCE README
-rpmmudocs=$(addprefix Documentation/out/, $(notdir $(shell ls $(depth)/Documentation/*.doc)))
+rpmmudocs=$(addprefix Documentation/, $(notdir $(shell ls $(depth)/Documentation/*.doc)))
 rpmdvis=$(rpmmudocs:.doc=.dvi)
 rpmexamples= $(addprefix input/, $(notdir $(shell ls $(depth)/input/*.{ly,tex})))
 
 
 sed-version= sed 's!@TOPLEVEL_VERSION@!${TOPLEVEL_VERSION}!g'
 sed-date=sed 's!@DATE@!${date}!g'
-sed-examples = sed 's!@EXAMPLE_LYS@!${rpmexamples} ${rpmdvis}!g'
+sed-examples = sed 's!@EXAMPLE_LYS@!${rpmexamples} ${rpmmudocs}!g'
 sed-docs=sed 's!@TEXT_DOCS@!${rpmdocs}!g'
 
-$(outdir)/lilypond.spec: lilypond.spec.in $(depth)/.version
+$(outdir)/lilypond.spec: lilypond.spec.in $(depth)/VERSION
        cat $< | $(sed-version) | $(sed-docs) | $(sed-examples) > $@
 
-$(outdir)/lilypond.lsm: lilypond.lsm.in $(depth)/.version
+$(outdir)/lilypond.lsm: lilypond.lsm.in $(depth)/VERSION
        cat $< | $(sed-version) | $(sed-date) > $@
index 10de977c254cae6fe965e61d68d925d7ec3e6747..1369366262663f69aa5d9c477c6155ef596dbc17 100644 (file)
@@ -40,9 +40,8 @@ endif
        $(LD_COMMAND) $(OFILES) $(LOADLIBES)
 
 exe: $(EXECUTABLE)
-#
 
-$(build): $(depth)/.version
+$(build): $(depth)/VERSION
        echo 0 > $@
 
 # dependency list of library:
@@ -63,7 +62,6 @@ $(SHAREDLIBRARY):  $(build) $(OFILES) $(MODULE_LIBDEPS)
 #
 lib: $(LIBRARY)
 #
-TOCLEAN= $(allobs) $(alldeps)
 
 # be careful about deletion.
 clean: localclean
@@ -71,24 +69,16 @@ clean: localclean
 ifdef EXECUTABLE
        rm -f $(EXECUTABLE)
 endif
-ifdef allobs
-       rm -f $(allobs)
+ifdef OFILES
+       rm -f $(OFILES)
 endif
-ifdef alldeps
-       rm -f $(alldeps)
+ifdef DEPFILES
+       rm -f $(DEPFILES)
 endif
 ifdef SUBDIRS
        set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
 endif
 
-distclean: localdistclean 
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i localdistclean; done
-endif
-
-localdistclean:
-
-
 # configure:
 #
 config:
@@ -135,6 +125,7 @@ doc:
 doc++: $(progdocs)     
        doc++ -k -p -d $(DOCDIR) $^
 
+# ugh. should generate in out/
 dist:
        -mkdir $(distdir)
        $(MAKE) localdist
@@ -179,7 +170,7 @@ endif
 # version stuff:
 #
 
-$(outdir)/version.hh: .version
+$(outdir)/version.hh: VERSION
        ./$(lily_bindir)/make-version > $@
 
 
@@ -220,7 +211,7 @@ check-doc-deps:
 
 $(LIBLILY): dummy
        $(MAKE) ./$(outdir)/$(@F) -C $(depth)/lib
-#
+
 
 # RedHat rpm package:
 #
@@ -229,7 +220,7 @@ rpm: check-rpm-doc-deps
        -cp $< $(rpm-sources)
        $(MAKE) -C $(make-dir) spec
        rpm -ba $(makeout)/lilypond.spec
-#
+
 check-rpm-doc-deps: 
        $(MAKE) -C $(depth)/Documentation/ xpms
 
index 7293362324fd3750cf2dc4ed8e9fede2d5be622f..4c8a67f14f57dc7b8af296feb2c642aa6952cb27 100644 (file)
@@ -24,7 +24,7 @@ include ./$(depth)/make/Variables.make
 #
 NAME = ...
 MODULE_NAME = 
-include ./$(depth)/$(NAME)/.version
+include ./$(depth)/$(NAME)/VERSION
 
 build = $(outdir)/.build #????!
 #
index d16767ea68bfe1330293d446795206229dce60f5..8a42ab0f910eaad2346e347ce5e7e38586abc0e6 100644 (file)
@@ -16,7 +16,7 @@ depth = .
 # identify module:
 #
 NAME = lilypond
-include .version
+include VERSION
 include ./$(depth)/make/Version.make
 
 # generic variables:
@@ -34,7 +34,7 @@ SUBDIRS = flower lib lily mi2mu \
 #
 SCRIPTS = configure configure.in install-sh
 README_FILES = BUGS DEDICATION ANNOUNCE COPYING NEWS README TODO INSTALL.text AUTHORS.text
-EXTRA_DISTFILES=  .dstreamrc .version $(README_FILES) $(SCRIPTS) $(SYMLINKS)
+EXTRA_DISTFILES=  .dstreamrc VERSION $(README_FILES) $(SCRIPTS) $(SYMLINKS)
 
 # do not dist ./Makefile (is copied from make/Toplevel.make)
 DISTFILES:=$(EXTRA_DISTFILES)# Makefile $(ALL_SOURCES)
@@ -53,8 +53,12 @@ INSTALL.text: check-doc-deps
        rm -f INSTALL.text
        ln `$(FIND) ./ -name INSTALL.text|head -1` .
 
-localdistclean:
-       rm -rf Makefile $(lily-version) $(flower-version) $(mi2mu-version) .b $(build) *~ $(allout) $(allgen) config.cache config.status
+# all machine generated junk resides in out/
+distclean: 
+       set -e; for i in `find -type d -name 'out'`; do \
+               rm -f $$i/*; done               
+       rm -rf *-build-dir
+       rm -f Makefile config.cache config.status config.log
 
 
 
index 337598ff3061eb6c52a7942cbb9dd1bc80ca096c..a3bc6eee5c21725b1b1020bea43d7c98ca38654b 100644 (file)
 
 # toplevel version info, might be handy?
 #
-include ./$(depth)/.version
+include $(depth)/VERSION
 #
-include ./$(depth)/make/out/Configure_variables.make
-
 ifeq (0,${MAKELEVEL})
 MAKE:=$(MAKE) --no-builtin-rules
 endif
 
 # directory names:
-#
-outdir = out
-lily_bindir = ./$(depth)/bin
-distdir = ./$(depth)/$(DIST_NAME)
-module-distdir = ./$(depth)/$(MODULE_DIST_NAME)
+
+
+ifdef buildprefix
+top-directory := $(shell  cd $(depth); pwd)
+abs-sub-directory := $(shell pwd)
+relative-sub-directory := $(subst $(top-directory),,$(abs-sub-directory))
+outdir=$(buildprefix)/$(relative-sub-directory)/out/
+else
+buildprefix=$(depth)
+outdir=out
+endif
+
+# derived names
+lily_bindir = $(depth)/bin
+distdir = $(depth)/$(DIST_NAME)
+module-distdir = $(depth)/$(MODULE_DIST_NAME)
 depdir = $(outdir)
-flowerout = ./$(depth)/flower/$(outdir)
-libout = ./$(depth)/lib/$(outdir)
-lilyout = ./$(depth)/lily/$(outdir)
-mi2muout = ./$(depth)/mi2mu/$(outdir)
-makeout = ./$(depth)/make/$(outdir)
-doc-dir = ./$(depth)/Documentation
-flower-dir = ./$(depth)/flower
-lib-dir = ./$(depth)/lib
-lily-dir = ./$(depth)/lily
-mi2mu-dir = ./$(depth)/mi2mu
-make-dir = ./$(depth)/make
-include-lib = ./$(depth)/lib/include
-include-flower = ./$(depth)/flower/include
-#
+
+flowerout = $(buildprefix)/flower/out
+libout = $(buildprefix)/lib/out
+lilyout = $(buildprefix)/lily/out
+mi2muout = $(buildprefix)/mi2mu/out
+makeout = $(buildprefix)/make/out
+docout = $(buildprefix)/Documentation/out
+binout = $(buildprefix)/bin/out
+
+doc-dir = $(depth)/Documentation
+flower-dir = $(depth)/flower
+lib-dir = $(depth)/lib
+lily-dir = $(depth)/lily
+mi2mu-dir = $(depth)/mi2mu
+make-dir = $(depth)/make
+include-lib = $(depth)/lib/include
+include-flower = $(depth)/flower/include
+
+
 rpm-sources = ${HOME}/rpms/SOURCES
 #
 
+include $(makeout)/Configure_variables.make
+
 # user settings:
 #
-include ./$(depth)/make/User.make
+include $(depth)/make/User.make
 #
 #
 # need to be defined in local Makefiles:
@@ -96,11 +112,6 @@ DUMMYDEPS=\
 ERROR_LOG = 2> /dev/null
 SILENT_LOG = 2>&1 >  /dev/null
 date = $(shell date +%x)
-allhh := $(shell $(FIND) ./ -name "*.hh" $(ERROR_LOG))
-allcc := $(shell $(FIND)  ./ -name "*.cc" $(ERROR_LOG))
-allobs := $(shell $(FIND) ./  $(outdir) -name "*.o" $(ERROR_LOG))
-
-alldeps := $(shell $(FIND)  ./ $(outdir) -name "*.dep" $(ERROR_LOG))
 
 # version stuff:
 #
@@ -157,7 +168,7 @@ LD_COMMAND = $(LD) $(LDFLAGS) -o $@
 
 # dependencies:
 #
-depfile = ./$(depdir)/$(subst .o,.dep,$(notdir $@)) 
+depfile = $(depdir)/$(subst .o,.dep,$(notdir $@)) 
 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
 #
 
@@ -187,8 +198,8 @@ DISTFILES=$(EXTRA_DISTFILES) Makefile $(ALL_SOURCES)
 DOCDIR=$(depth)/$(outdir)
 
 # .hh should be first. Don't know why
-# take some trouble to vauto ignore sources and obsolete stuff.
-progdocs=$(shell $(FIND) ./ -name '*.hh' |egrep -v 'obsolete/|out/') $(shell $(FIND) ./ -name '*.cc'|egrep -v 'out/|obsolete/')
+# take some trouble to auto ignore sources and obsolete stuff.
+progdocs=$(shell $(FIND) ./ -name '*.hh' |egrep -v 'out/') $(shell $(FIND) ./ -name '*.cc'|egrep -v 'out/')
 
 
 pod2html=pod2html
@@ -201,6 +212,6 @@ ifdef stablecc
  STABLEOBS=$(addprefix $(outdir)/,$(stablecc:.cc=.o))
 endif
 
-# substitute $(STRIP) if you want stripping
+# substitute $(STRIP) in Site.make if you want stripping
 DO_STRIP=true
 
index cfcf0e146c688fad513cb8b52dbd3ddacc993c27..2120a5b1a647bc26fae603ebce370eae110d4c39 100644 (file)
@@ -1,22 +1,22 @@
 Begin3
 Title: LilyPond
-Version: 0.0.77.jcn1
-Entered-date: 07/29/97
+Version: 0.0.78
+Entered-date: 07/30/97
 Description: 
-GNU LilyPond which converts music definition files into visual or
-audio output: it can typeset formatted sheet music to a TeX file and
-and (mechanical) performances to MIDI files. Features include multiple
-staffs, meters, clefs, keys, lyrics, versatile input-language, cadenzas
-beams, slurs, triplets.
+GNU LilyPond is a program which converts music definition files into
+visual or auditive output: it can typeset formatted sheet music to a
+TeX file and and (mechanical) performances to MIDI files. Features
+include multiple staffs, meters, clefs, keys, lyrics, versatile
+input-language, cadenzas beams, slurs, triplets.
 
 Keywords: music typesetting midi notation
 Author: hanwen@stack.nl (Han-Wen Nienhuys)
        jan@digicash.com (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps
-       340k lilypond-0.0.77.jcn1.tar.gz 
+       340k lilypond-0.0.78.tar.gz 
 Original-site: pcnov095.win.tue.nl /pub/lilypond/
-       340k lilypond-0.0.77.jcn1.tar.gz 
+       340k lilypond-0.0.78.tar.gz 
 Platform: Unix/win32, GNU C++
 Copying-policy: GPL
 End
index 03f416baf0d3591fbf83091b1b39a40b63a2d319..af2163607beb87658b71a2abbd4e84ed535ad2b3 100644 (file)
@@ -3,11 +3,11 @@ Title: LilyPond
 Version: @TOPLEVEL_VERSION@
 Entered-date: @DATE@
 Description: 
-GNU LilyPond which converts music definition files into visual or
-audio output: it can typeset formatted sheet music to a TeX file and
-and (mechanical) performances to MIDI files. Features include multiple
-staffs, meters, clefs, keys, lyrics, versatile input-language, cadenzas
-beams, slurs, triplets.
+GNU LilyPond is a program which converts music definition files into
+visual or auditive output: it can typeset formatted sheet music to a
+TeX file and and (mechanical) performances to MIDI files. Features
+include multiple staffs, meters, clefs, keys, lyrics, versatile
+input-language, cadenzas beams, slurs, triplets.
 
 Keywords: music typesetting midi notation
 Author: hanwen@stack.nl (Han-Wen Nienhuys)
index 4aa7858d205fe64f3410bc4bb06461bafa9fbbe3..7f1c6f5ad9c450b3779e7ec8a59c72146f3c1265 100644 (file)
@@ -1,14 +1,14 @@
 Name: lilypond
-Version: 0.0.77.jcn1
+Version: 0.0.78
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.77.jcn1.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.78.tar.gz
 Summary: A preprocessor to make TeX typeset music.
 URL: http://www.stack.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@stack.nl>
 Icon: lelie_icon.gif
-Buildroot: /tmp/lilypond_build
+Buildroot: /tmp/lilypond-install
 
 %description
 GNU LilyPond which converts music definition files into visual or
@@ -27,7 +27,9 @@ rm -rf $RPM_BUILD_ROOT
 strip lily/out/lilypond mi2mu/out/mi2mu
 make prefix="$RPM_BUILD_ROOT/usr" install
 %files
-%doc Documentation/out/AUTHORS.text Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/convert-mudela.text Documentation/out/error.text Documentation/out/faq.text Documentation/out/gnu-music.text Documentation/out/index.text Documentation/out/language.text Documentation/out/lilygut.text Documentation/out/lilyliterature.text Documentation/out/lilypond.text Documentation/out/links.text Documentation/out/mi2mu.text Documentation/out/mudela-book.text Documentation/out/other-packages.text BUGS TODO NEWS DEDICATION ANNOUNCE README input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/error.ly input/header.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/rhythm.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/slurs.ly input/standchen.ly input/standchen.tex input/toccata-fuga-E.ly input/twinkle.ly input/wohltemperirt.ly Documentation/out/mudela-course.dvi Documentation/out/mudela-man.dvi Documentation/lelie_logo.gif
+%doc Documentation/out/AUTHORS.text Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/convert-mudela.text Documentation/out/error.text Documentation/out/faq.text Documentation/out/gnu-music.text Documentation/out/index.text Documentation/out/language.text Documentation/out/lilygut.text Documentation/out/lilyliterature.text Documentation/out/lilypond.text Documentation/out/links.text Documentation/out/mi2mu.text Documentation/out/mudela-book.text Documentation/out/other-packages.text BUGS TODO NEWS DEDICATION ANNOUNCE README 
+%doc input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/header.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/rhythm.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/slurs.ly input/standchen.ly input/standchen.tex input/toccata-fuga-E.ly input/twinkle.ly input/wohltemperirt.ly Documentation/mudela-course.doc Documentation/mudela-man.doc 
+%doc Documentation/lelie_logo.gif
 /usr/bin/convert-mudela
 /usr/bin/mudela-book
 /usr/bin/lilypond
index a37f43022196756666ac60242f5fa12f31314946..5ae3aede2efdc8c71a420fcb5ee6ae69fece3ec1 100644 (file)
@@ -8,7 +8,7 @@ Summary: A preprocessor to make TeX typeset music.
 URL: http://www.stack.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@stack.nl>
 Icon: lelie_icon.gif
-Buildroot: /tmp/lilypond_build
+Buildroot: /tmp/lilypond-install
 
 %description
 GNU LilyPond which converts music definition files into visual or
@@ -27,7 +27,9 @@ rm -rf $RPM_BUILD_ROOT
 strip lily/out/lilypond mi2mu/out/mi2mu
 make prefix="$RPM_BUILD_ROOT/usr" install
 %files
-%doc @TEXT_DOCS@ @EXAMPLE_LYS@ Documentation/lelie_logo.gif
+%doc @TEXT_DOCS@ 
+%doc @EXAMPLE_LYS@ 
+%doc Documentation/lelie_logo.gif
 /usr/bin/convert-mudela
 /usr/bin/mudela-book
 /usr/bin/lilypond
diff --git a/mi2mu/.version b/mi2mu/.version
deleted file mode 100644 (file)
index 5596987..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MAJOR_VERSION = 0
-MINOR_VERSION = 0
-PATCH_LEVEL = 18
-# use to send patches, always empty for released version:
-MY_PATCH_LEVEL = 
-#
index abb87bb77562cc7148730a6fff76c237eabbe3ae..2df411c6fa4a0e5c0dc115869107e8939ba71ff4 100644 (file)
@@ -23,7 +23,7 @@ include ./$(depth)/make/Files.make
 #
 NAME = mi2mu
 MODULE_NAME = mi2mu
-include $(mi2mu-dir)/.version
+include $(mi2mu-dir)/VERSION
 build = $(mi2mu-dir)/$(outdir)/.build
 #
 
@@ -40,7 +40,7 @@ VERSION_DEPENDENCY = $(mi2mu-version)
 
 # list of distribution files:
 #
-EXTRA_DISTFILES = .version TODO
+EXTRA_DISTFILES = VERSION TODO
 #
 
 # list of custom libraries:
diff --git a/mi2mu/VERSION b/mi2mu/VERSION
new file mode 100644 (file)
index 0000000..5596987
--- /dev/null
@@ -0,0 +1,6 @@
+MAJOR_VERSION = 0
+MINOR_VERSION = 0
+PATCH_LEVEL = 18
+# use to send patches, always empty for released version:
+MY_PATCH_LEVEL = 
+#
index 04395149870da3f1d7bd2a97c9b51e1479039fad..f698cde71cda66ae22814ca92b7f24ddc5e353fe 100644 (file)
@@ -39,7 +39,8 @@ Midi_key::mudela_str( bool command_mode_bo )
                str += String( (char)( ( key_i_ + 2 ) % 7 + 'A'  ) );
        else // heu, -2: should be - 1 1/2: A -> fis
                str += String( (char)( ( key_i_ + 2 - 2 ) % 7 + 'a'  ) );
-       str = String( "% " ) + '"' + str + '"' + "; % not supported yet\n"; 
+       str = String( "% \"" ) + str
+           + String('"') + "; % not supported yet\n"; 
        return str;
 }
 
index 967bc858d9b601c70b92342c7ebbe43fa21caea2..c1ec9627a466d2782d4b15bb9078875aab3ba3d4 100644 (file)
@@ -16,7 +16,7 @@ My_midi_lexer* midi_lexer_l_g = 0;
 My_midi_lexer::My_midi_lexer( String &filename_str, Sources * sources )
 {
     source_file_l_ =sources->get_file_l(filename_str);
-    switch_streams( source_file_l_->istream_l() );
+    switch_streams( source_file_l_->istream_l() ,0 );
     errorlevel_i_ = 0;
     char_count_ = 0;
     running_status_i_ = 0;
index fb9d6d9d59e97f56e9017becc564791eccf135f5..59c50fb1e4903349f9612d18db2dac734352c4c2 100644 (file)
@@ -3,10 +3,11 @@
 %
 
 \font\musicfont=musixsps
-\font\slurfont=xslu16
+\font\slurfont=xhslu16
 \font\specfont=musixspx
 % \def\thefont{\musicfont}
-\def\thefont{\specfont}
+%\def\thefont{\specfont}
+\def\thefont{\slurfont}
 
 \def\mb#1{{\thefont\char#1}}