]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.0.17 release/1.0.17
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 19 Oct 1998 12:09:33 +0000 (14:09 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 19 Oct 1998 12:09:33 +0000 (14:09 +0200)
110 files changed:
AUTHORS.txt
BUGS
Documentation/links.yo
Documentation/tex/colorado.bib
Documentation/tex/fonts.doc
Documentation/tex/refman.yo
Documentation/tex/tutorial.yo
Documentation/topdocs/AUTHORS.yo
Documentation/topdocs/INSTALL.yo
Documentation/topdocs/index.yo
INSTALL.txt
NEWS
TODO
VERSION
buildscripts/lilypond-login.sh [new file with mode: 0644]
buildscripts/lilypond-profile.sh
buildscripts/set-lily.sh
configure.in
debian/TODO
debian/changelog
debian/control
debian/control.foka
debian/control.in
debian/copyright
debian/out/control
debian/postrm
debian/rules
debian/watch
flower/hash.cc [new file with mode: 0644]
flower/include/dictionary-iter.hh
flower/include/dictionary.hh
init/declarations.ly
init/engraver.ly
init/property.ly
init/scm.ly [deleted file]
input/test/keys.ly
input/test/time.fly
lily/atom.cc
lily/auto-plet-engraver.cc
lily/engraver.cc
lily/graphical-lisp-element.cc [deleted file]
lily/include/atom.hh
lily/include/auto-plet-engraver.hh
lily/include/engraver.hh
lily/include/graphical-lisp-element.hh [deleted file]
lily/include/key-item.hh
lily/include/lily-guile.hh
lily/include/lily-proto.hh
lily/include/local-key-item.hh
lily/include/lookup.hh
lily/include/musical-request.hh
lily/include/notename-table.hh
lily/include/paper-outputter.hh
lily/include/ps-lookup.hh
lily/include/ps-lookup.hh.orig [deleted file]
lily/include/score-element-info.hh
lily/include/score-engraver.hh
lily/include/slur-engraver.hh
lily/include/tex-lookup.hh
lily/include/tex-lookup.hh.orig [deleted file]
lily/key-engraver.cc
lily/key-item.cc
lily/lily-guile.cc [deleted file]
lily/local-key-engraver.cc
lily/local-key-item.cc
lily/lookup.cc
lily/lookup.cc.orig [deleted file]
lily/main.cc
lily/music-iterator.cc
lily/musical-request.cc
lily/my-lily-lexer.cc
lily/notename-table.cc
lily/paper-def.cc
lily/paper-outputter.cc
lily/parser.yy
lily/parser.yy.orig [deleted file]
lily/ps-lookup.cc
lily/ps-outputter.cc
lily/scope.cc
lily/score-element-info.cc
lily/score-engraver.cc
lily/slur-engraver.cc
lily/symtable.cc
lily/tex-lookup.cc
lily/tex-outputter.cc
lily/ties-engraver.cc
lily/translator-group.cc
make/GNUmakefile
make/STATE-VECTOR [deleted file]
make/lilypond.spec.in
make/mutopia-rules.make
make/out/lelievijver.lsm
make/out/lilypond.lsm
make/out/lilypond.spec
make/stepmake.make
mf/GNUmakefile
mf/feta-slag.mf
mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly [new file with mode: 0644]
mutopia/gallina.ly
scripts/GNUmakefile
scripts/convert-mudela.py
scripts/ly2dvi-old.sh [new file with mode: 0644]
scripts/ly2dvi.py [new file with mode: 0644]
scripts/ly2dvi.sh [deleted file]
scripts/ly2dvi32.py [deleted file]
scripts/mudela-book.py
stepmake/TODO
stepmake/stepmake/generic-targets.make
stepmake/stepmake/toplevel-targets.make
test/hash.cc [new file with mode: 0644]

index e17ad4f9029d7bc2ed87727e8b1adab33b1de34e..c92e48df1ab2d4aaa1922adc372b2af9d249f4b7 100644 (file)
@@ -21,7 +21,7 @@ o    Tom Cato Amundsen <tomcato@xoommail.com>,  cembalo-par-
      tita in mudela.
 
 o    Mats            Bengtsson            <matsb@s3.kth.se>,
-     http://www.s3.kth.se/~matsb  clef  stuff,  key   stuff,
+     http://www.s3.kth.se/~matsb/  clef  stuff,  key  stuff,
      swedish notenames, testing, general comments.
 
 o    Eric Bullinger <eric@aut.ee.ethz.ch>, accidental trans-
@@ -36,8 +36,8 @@ o    Neil Jerram <nj104@cus.cam.ac.uk>.  parts of Documenta-
      tion/Vocab*
 
 o    Donald    Ervin    Knuth,     http://www.cs-staff.stan-
-     ford.edu/~knuth mf/ital-*.mf (these were taken from the
-     CM fonts)
+     ford.edu/~knuth/ mf/ital-*.mf (these  were  taken  from
+     the CM fonts)
 
 o    Werner  Lemberg <xlwy01@uxp1.hrz.uni-dortmund.de>, misc
      bugfixes, some Beam and Stem code.
@@ -45,21 +45,22 @@ o    Werner  Lemberg <xlwy01@uxp1.hrz.uni-dortmund.de>, misc
 o    David R. Linn <drl@vuse.vanderbilt.edu>,  Mailing  list
      maintenance.
 
-o    Adrian Moriano <> Documentation fixes, glossary.
+o    Adrian  Mariano  <>  Reference  manual, tutorial fixes,
+     glossary.
 
 o    Han-Wen           Nienhuys           <hanwen@cs.uu.nl>,
-     http://www.cs.uu.nl/~hanwen
-     Main author (initials: HWN).
+     http://www.cs.uu.nl/~hanwen/   Main  author  (initials:
+     HWN).
 
 o    Jan          Nieuwenhuizen           <janneke@gnu.org>,
-     http://www.xs4all.nl/~jantien
-     Main author (initials: JCN).
+     http://www.xs4all.nl/~jantien/  Main  author (initials:
+     JCN).
 
-o    Alexandre   Oliva  <oliva@dcc.unicamp.br>,  http://sun-
-     site.unicamp.br/~oliva testing
+o    Alexandre  Oliva  <oliva@dcc.unicamp.br>,   http://sun-
+     site.unicamp.br/~oliva/ testing
 
-o    Franc,ois Pinard  <pinard@iro.umontreal.ca>,  parts  of
-     Documentation/Vocab*,    started   internationalization
+o    Franc,ois  Pinard  <pinard@iro.umontreal.ca>,  parts of
+     Documentation/Vocab*,   started    internationalization
      stuff
 
 o    Jeffrey B. Reed <daboys@bga.com>, Windows-NT support.
@@ -67,9 +68,9 @@ o    Jeffrey B. Reed <daboys@bga.com>, Windows-NT support.
 o    Shay Rojanski Some mudela source.
 
 
-Your name could be here! If you want to help,  then  take  a
-look  at  the SMALLISH PROJECTS section of in the file TODO.
+Your  name  could  be here! If you want to help, then take a
+look at the SMALLISH PROJECTS section of in the  file  TODO.
 Some do not involve coding C++
 
-[And of course we sincerely thank J.S.Bach,  F.Schubert,  T.
+[And  of  course we sincerely thank J.S.Bach, F.Schubert, T.
 Merula and W.A.Mozart for their beautiful music]
diff --git a/BUGS b/BUGS
index 36b24a234a9ddebfa81bd49e02d02e33ce658096..054d425246941e3b94db75c303ab66b7b7458f03 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -3,6 +3,11 @@ This documents serious bugs
 
 ********
 
+[Linux Intel, EGCS-1.1b]
+
+Compiling with -O2 -finline-functions will cause crashes during
+parsing stage.
+
 
 [All platforms] 
 
index da883c4a6824831d33608722ce1ea28a95018a0b..1ff0bb7781aab21e0c461873904dc3a8cc5e9e8a 100644 (file)
@@ -63,6 +63,12 @@ it()lurl(ftp://sca.uwaterloo.ca/pub/lilypond)
 it()[your mirror here]
 )
 
+Debian releases are located at
+lurl(http://cgi.debian.org/www-master/debian.org/Packages/stable/tex/lilypond.html)
+and
+lurl(ftp://ftp.debian.org/debian/dists/unstable/main/binary-i386/tex/lilypond_*.deb)
+
+
 sect(News)
 
 The following newsgroups all contain material relevant to LilyPond
@@ -133,3 +139,5 @@ dit(lurl(http://www.redhat.com/))
     RedHat Software Inc. develops and markets a GNU/Linux distribution (of
     which we are avid users)
 )
+
+
index 9aa8871ac40bc5a95ef2114d999e5ec7bec70e86..6d7cf5120046978627ee79843bcc7b681330d35a 100644 (file)
 % TODO: fix the labelling.  
 
 @Book {6,
-author ={Jacob, Archibald},
-year={1947},
-title = {Musical handwriting : or, How to put music on paper : A handbook for all musicians, professional and amateur},
-address ={London},
-publisher ={Oxford University Press}, 
-note = {subject: Musical notation},
+       author ={Jacob, Archibald},
+       year={1947},
+       title = {Musical handwriting : or, How to put music on paper : A handbook for all musicians, professional and amateur},
+       address ={London},
+       publisher ={Oxford University Press}, 
+       note = {subject: Musical notation},
 }
 
 @Book {15,
-author ={Carl Brandt and Clinton Roemer},
-title = {Standardized Chord Symbol Notation},
-address={Sherman Oaks, CA},
-publisher={Roerick Music Co.},
-note ={subject: musical notation},
+       author ={Carl Brandt and Clinton Roemer},
+       title = {Standardized Chord Symbol Notation},
+       address={Sherman Oaks, CA},
+       publisher={Roerick Music Co.},
+       note ={subject: musical notation},
 }
 
 @Book {22,
-author = {Johnson, Harold M},
-year = {1946},
-title = {How to write music manuscript an exercise-method handbook for the  music student, copyist, arranger, composer, teacher},
-publisher={Carl Fischer, Inc.},
-address= {New York},
-note = {subject: Musical notation --Handbooks, manuals},
+       author = {Johnson, Harold M},
+       year = {1946},
+       title = {How to write music manuscript an exercise-method handbook for the  music student, copyist, arranger, composer, teacher},
+       publisher={Carl Fischer, Inc.},
+       address= {New York},
+       note = {subject: Musical notation --Handbooks, manuals},
 }
 
 @Book {31,
-title = {Music Printing & Publishing},
-author ={Donald W. Krummel \& Stanley Sadie},
-year = {1990},
-publisher= {Macmillan Press},
-note ={subject: musical notation},
+       title = {Music Printing & Publishing},
+       author ={Donald W. Krummel \& Stanley Sadie},
+       year = {1990},
+       publisher= {Macmillan Press},
+       note ={subject: musical notation},
 }
 
 %series={The Norton/Grove Handbooks in Music.},
 % publisher={W.W. Norton},
 
 @Book {40,
-author={Foss, Hubert},
-title = {Music Printing},
-series = {Practical Printing and Binding},
-address={London},
-publisher={Oldhams Press Ltd., Long Acre},
-note ={subject: musical notation},
+       author={Foss, Hubert},
+       title = {Music Printing},
+       series = {Practical Printing and Binding},
+       address={London},
+       publisher={Oldhams Press Ltd., Long Acre},
+       note ={subject: musical notation},
 }
 
 @Book {48,
-author = {Steele, Robert},
-year = {1903},
-title = {The Earliest English Music Printing},
-address={London},
-note= {subject: history of music printing and engraving},
+       author = {Steele, Robert},
+       year = {1903},
+       title = {The Earliest English Music Printing},
+       address={London},
+       note= {subject: history of music printing and engraving},
 }
 
 @Book {54,
-author={Austin, Ernest},
-title = {The Story of Music Printing},
-address={London},
-publisher={Lowe and Brydone Printers, Ltd.},
-note= {subject: history of music printing and engraving},
+       author={Austin, Ernest},
+       title = {The Story of Music Printing},
+       address={London},
+       publisher={Lowe and Brydone Printers, Ltd.},
+       note= {subject: history of music printing and engraving},
 
 }
 
 
 
 @Book {63,
-author={?},
-title = {Pictoral History of Music Printing},
-address={Elhardt, Indiana},
-publisher={H. and A. Selmer, Inc.},
-note= {subject: history of music printing and engraving},
+       author={?},
+       title = {Pictoral History of Music Printing},
+       address={Elhardt, Indiana},
+       publisher={H. and A. Selmer, Inc.},
+       note= {subject: history of music printing and engraving},
 
 }
 
 @Book {77,
-author = {Wintermitz, Emmanuel},
-year = {1955},
-title = {Musical Autographs from Monteverdi to Hindemith},
-address={Princeton},
-publisher={Princeton University Press},
-note= {subject: history of music printing and engraving},
+       author = {Wintermitz, Emmanuel},
+       year = {1955},
+       title = {Musical Autographs from Monteverdi to Hindemith},
+       address={Princeton},
+       publisher={Princeton University Press},
+       note= {subject: history of music printing and engraving},
 
 }
 
 
 @Book {92,
 
-author = {Novello, A},
-year = {1847},
-title = {Some Account of the Methods of Musick Printing, with Specimens of the Various Sizes of Moveable Types and of Other Matters},
-address={London},
-note={ subject: history of music printing and engraving},
+       author = {Novello, A},
+       year = {1847},
+       title = {Some Account of the Methods of Musick Printing, with Specimens of the Various Sizes of Moveable Types and of Other Matters},
+       address={London},
+       note={ subject: history of music printing and engraving},
 }
 
 @Book {100,
-author={Chrsander, F.},
-year={18??},
-title={A Sketch of the HIstory of Music printing, from the 15th to the 16th century},
-note={ subject: history of music printing and engraving},
+       author={Chrsander, F.},
+       year={18??},
+       title={A Sketch of the HIstory of Music printing, from the 15th to the 16th century},
+       note={ subject: history of music printing and engraving},
 }
 
 @Article {squire1897,
-author = {Squire, W},
-year = {1897},
-title = {Notes on Early Music Printing},
-journal = {Bibliographica},
-volume={iii},
-number={99},
-note={ subject: history of music printing and engraving},
+       author = {Squire, W},
+       year = {1897},
+       title = {Notes on Early Music Printing},
+       journal = {Bibliographica},
+       volume={iii},
+       number={99},
+       note={ subject: history of music printing and engraving},
 
 }
 
 @Article{113,
-author = {Meyer, K. and O'Meara, J},
-year = {1935},
-title = {The Printing of Music, 1473-1934},
-journal = {The Dolphin},
-volume={ ii},
-pages={ 171--207},
-note={ subject: history of music printing and engraving},
+       author = {Meyer, K. and O'Meara, J},
+       year = {1935},
+       title = {The Printing of Music, 1473-1934},
+       journal = {The Dolphin},
+       volume={ ii},
+       pages={ 171--207},
+       note={ subject: history of music printing and engraving},
 
 }
 %% 4th ver.,
 @Article {120,
-author = {Pattison, B},
-year = {1939},
-title = {Notes on Early Music Printing},
-journal = {The Library},
-note={subject: history of music printing and engraving},
-volume={xix},
-pages={389-421}, 
+       author = {Pattison, B},
+       year = {1939},
+       title = {Notes on Early Music Printing},
+       journal = {The Library},
+       note={subject: history of music printing and engraving},
+       volume={xix},
+       pages={389-421}, 
 }
 
 @Book {136,
-author = {King, H},
-year = {1964},
-title = {Four Hundred Years of Music Printing},
-address={London},
-note={ subject: history of music printing and engraving},
+       author = {King, H},
+       year = {1964},
+       title = {Four Hundred Years of Music Printing},
+       address={London},
+       note={ subject: history of music printing and engraving},
 }
 
 
 %(Rev.1961).
 @Book{150,
-author={Deutsch, O.F.},
-year ={1946},
-title = {Music Publishers' Numbers},
-address={London},
-note={ subject: history of music printing and engraving},
+       author={Deutsch, O.F.},
+       year ={1946},
+       title = {Music Publishers' Numbers},
+       address={London},
+       note={ subject: history of music printing and engraving},
 }
 
 @Book {151,
-author = {Marco, G.A},
-year = {1962},
-title = {The Earliest Music Printers of Continental Europe: a Checklist of Facsimiles Illustrating Their Work},
-address={Charlottesville, Virginia},
-note={ subject: history of music printing and engraving},
+       author = {Marco, G.A},
+       year = {1962},
+       title = {The Earliest Music Printers of Continental Europe: a Checklist of Facsimiles Illustrating Their Work},
+       address={Charlottesville, Virginia},
+       note={ subject: history of music printing and engraving},
 }
 
 @Article {158,
-author = {Kinkeldey, O},
-year = {1932},
-title = {Music And Music Printing in Incunabula},
-journal = {Papers of the Bibliographical Society of America},
-volume={ xxvi},
-pages={89-118},
-note={ subject: history of music printing and engraving},
+       author = {Kinkeldey, O},
+       year = {1932},
+       title = {Music And Music Printing in Incunabula},
+       journal = {Papers of the Bibliographical Society of America},
+       volume={ xxvi},
+       pages={89-118},
+       note={ subject: history of music printing and engraving},
 }
 
 @Book {166,
-author = {Oldman, C.B},
-year = {1934},
-title = {Collecting Musical First Editions},
-address={London},
-note={ subject: history of music printing and engraving},
+       author = {Oldman, C.B},
+       year = {1934},
+       title = {Collecting Musical First Editions},
+       address={London},
+       note={ subject: history of music printing and engraving},
 }
 
 @Book{170,
-author={Carter, J},
-year={1934},
-title = {New Paths in Book Collecting},
-address={London},
-note={ subject: history of music printing and engraving},
+       author={Carter, J},
+       year={1934},
+       title = {New Paths in Book Collecting},
+       address={London},
+       note={ subject: history of music printing and engraving},
 }
 
 @Book {179,
-author={Krummel, D.W.},
-year={1958},
-month={9},
-title = {Graphic Analysis in Application to Early American Engraved Music},
-journal = {Notes},
-volume={xvi},
-pages={213},
-note={ subject: history of music printing and engraving},
+       author={Krummel, D.W.},
+       year={1958},
+       month={9},
+       title = {Graphic Analysis in Application to Early American Engraved Music},
+       journal = {Notes},
+       volume={xvi},
+       pages={213},
+       note={ subject: history of music printing and engraving},
 }
 
 @Book {189,
-author = {Krummel, D.W},
-year = {1971},
-title = {Oblong Format in Early Music Books},
-journal = {The Library},
-volume={5th ser., xxvi},
-pages={312},
-note={ subject: history of music printing and engraving},
+       author = {Krummel, D.W},
+       year = {1971},
+       title = {Oblong Format in Early Music Books},
+       journal = {The Library},
+       volume={5th ser., xxvi},
+       pages={312},
+       note={ subject: history of music printing and engraving},
 }
 
 @Book {198,
-author = {King, A.H},
-year = {1973},
-title = {The 50th Anniversary of Music Printing},
+       author = {King, A.H},
+       year = {1973},
+       title = {The 50th Anniversary of Music Printing},
 }
 
 @Book {204,
-author={Rastall, Richard},
-year={1982},
+       author={Rastall, Richard},
+       year={1982},
  title = {The notation of Western music : an introduction},
-address={New York, N.Y.},
-publisher={St. Martin's Press},
-note = {Musical notation},
+       address={New York, N.Y.},
+       publisher={St. Martin's Press},
+       note = {Musical notation},
 
 
 }
 
 @Book {215,
-author = {Tappolet, Willy},
-year = {1947},
-title = {La Notation Musicale},
-address={Paris},
-note={subject: general notation},
-publisher={Neuch\^atel},
+       author = {Tappolet, Willy},
+       year = {1947},
+       title = {La Notation Musicale},
+       address={Paris},
+       note={subject: general notation},
+       publisher={Neuch\^atel},
 }
 
 @Book {223,
-author = {Williams, C.F. Abdy},
-year = {1903},
-title = {The Story of Notation},
-address={New York},
-publisher={Charles Scribner's Sons},
-note={subject: general notation},
+       author = {Williams, C.F. Abdy},
+       year = {1903},
+       title = {The Story of Notation},
+       address={New York},
+       publisher={Charles Scribner's Sons},
+       note={subject: general notation},
 }
 
 @Book {239,
-author={Apel, Willi},
-year={1953},
-title = {The notation of polyphonic music, 900-1600},
-address={Cambridge, Mass},
-institution={Mediaeval Academy of America},
-note = {Musical notation},
+       author={Apel, Willi},
+       year={1953},
+       title = {The notation of polyphonic music, 900-1600},
+       address={Cambridge, Mass},
+       institution={Mediaeval Academy of America},
+       note = {Musical notation},
 }
 
 @Book {248,
-author={Berger, Anna Maria Busse},
-year={1993},
-title = {Mensuration and proportion signs : origins and evolution},
-address={Oxford, England},
-publisher={Clarendon Press},
-scnd_address={New York},
-scnd_publisher={Oxford University Press },
-note={subject: early notation},
+       author={Berger, Anna Maria Busse},
+       year={1993},
+       title = {Mensuration and proportion signs : origins and evolution},
+       address={Oxford, England},
+       publisher={Clarendon Press},
+       scnd_address={New York},
+       scnd_publisher={Oxford University Press },
+       note={subject: early notation},
 }
 
 @Book {258,
-author={Parrish, Carl},
-year={1957},
+       author={Parrish, Carl},
+       year={1957},
  title = {The notation of medieval music},
-address={New York},
-publisher={Norton},
-note = {Musical notation},
+       address={New York},
+       publisher={Norton},
+       note = {Musical notation},
 
 
 }
 
 @Book {269,
-author = {Parrish, Carl},
-year = {1946},
-title = {The Notation of Medieval Music},
-address={New York},
-publisher={Carl Fischer, Inc.},
-note={subject: early notation},
+       author = {Parrish, Carl},
+       year = {1946},
+       title = {The Notation of Medieval Music},
+       address={New York},
+       publisher={Carl Fischer, Inc.},
+       note={subject: early notation},
 }
 
 @Book {277,
-author = {Patch, Harry},
-year = {1949},
-title = {Genesis of a Music},
-address={Madison},
-publisher={University of Wisconsin Press},
-note={subject: early notation},
+       author = {Patch, Harry},
+       year = {1949},
+       title = {Genesis of a Music},
+       address={Madison},
+       publisher={University of Wisconsin Press},
+       note={subject: early notation},
 }
 
 @Book {285,
-author={Cage, John},
-year={1969},
+       author={Cage, John},
+       year={1969},
   title = {Notations},
-address={New York},
-publisher={Something Else Press},
-note = {Music, Manuscripts, Facsimiles.
+       address={New York},
+       publisher={Something Else Press},
+       note = {Music, Manuscripts, Facsimiles.
 
-Facsimiles of holographs from the Foundation for Contemporary
-Performance Arts, with text by 269 composers, but rearranged using
-chance operations.,V)} },
+       Facsimiles of holographs from the Foundation for Contemporary
+       Performance Arts, with text by 269 composers, but rearranged using
+       chance operations.,V)} },
 
 @Book {295,
-author = {Gaburo, Virginia},
-year = {1977},
-title = {Notation},
-address={publisher= {Lingua Press},
-publisher={La Jolla, California}},
-note = {A Lecture about notation, new ideas about},
+       author = {Gaburo, Virginia},
+       year = {1977},
+       title = {Notation},
+       address={publisher= {Lingua Press},
+       publisher={La Jolla, California}},
+       note = {A Lecture about notation, new ideas about},
 }
 
 @Book {306,
-author = {Risatti, Howard},
-year = {1975},
-title = {New Music Vocabulary},
-address={Urbana, Illinois},
-publisher={University of Illinois Press},
-note = {A Guide to Notational Signs for Contemporary Music},
+       author = {Risatti, Howard},
+       year = {1975},
+       title = {New Music Vocabulary},
+       address={Urbana, Illinois},
+       publisher={University of Illinois Press},
+       note = {A Guide to Notational Signs for Contemporary Music},
 }
 
 
 
 @Book {325,
-author = {Cowell, Henry},
-year = {1930},
-title = {New Musical Resources},
-address={New York},
-publisher={Alfred A. Knopf, Inc.},
-note={subject: 20th century notation},
+       author = {Cowell, Henry},
+       year = {1930},
+       title = {New Musical Resources},
+       address={New York},
+       publisher={Alfred A. Knopf, Inc.},
+       note={subject: 20th century notation},
 }
 
 @Article {333,
-author = {Cowell, Henry},
-year = {1927},
-title = {Our Inadequate Notation},
-journal = {Modern Music},
-volume={4},
-number={3},
-note={subject: 20th century notation},
+       author = {Cowell, Henry},
+       year = {1927},
+       title = {Our Inadequate Notation},
+       journal = {Modern Music},
+       volume={4},
+       number={3},
+       note={subject: 20th century notation},
 
 }
 
 @Book {342,
-author = {Bowers, Roger},
-year = {1992},
-title = {Music & Letters},
-volume={73},
-number={3},
-month={August},
-pages={347(52)},
-note={Some reflection upon notation and proportion in Monteverdi's mass and vespers},
+       author = {Bowers, Roger},
+       year = {1992},
+       title = {Music & Letters},
+       volume={73},
+       number={3},
+       month={August},
+       pages={347(52)},
+       note={Some reflection upon notation and proportion in Monteverdi's mass and vespers},
 }
 
 @Book {353,
-author = {Brainard, Paul},
-year = {1992},
-title = {Current Musicology},
-number={50},
-month={July-Dec},
-pages={21(26)},
-note={Proportional notation in the music of Schutz and his contemporaries in the 17th Century},
+       author = {Brainard, Paul},
+       year = {1992},
+       title = {Current Musicology},
+       number={50},
+       month={July-Dec},
+       pages={21(26)},
+       note={Proportional notation in the music of Schutz and his contemporaries in the 17th Century},
 }
 
 @Book {362,
-author = {Monelle, Raymond},
-year = {1989},
-title = {Comparative Literature},
-volume={41}, number={3}, 
-month={Summer},
-pages={252(18)},
+       author = {Monelle, Raymond},
+       year = {1989},
+       title = {Comparative Literature},
+       volume={41}, number={3}, 
+       month={Summer},
+       pages={252(18)},
 
-note={Music notation and the poetic foot},
+       note={Music notation and the poetic foot},
 }
 
 @Book {373,
-author = {Pinegar, Sandra},
-year = {1993},
-title = {Current Musicology},
-number={53},
-month={July},
-pages={99(10)},
-note={The seeds of notation and music paleography.},
+       author = {Pinegar, Sandra},
+       year = {1993},
+       title = {Current Musicology},
+       number={53},
+       month={July},
+       pages={99(10)},
+       note={The seeds of notation and music paleography.},
 }
 
 @Book {382,
-author = {Smith, Norman E},
-year = {1990},
-title = {Current Musicology},
-number={45-47},
-month={Jan-Dec},
-pages={283(22)},
-note={The notation of fractio modi.},
+       author = {Smith, Norman E},
+       year = {1990},
+       title = {Current Musicology},
+       number={45-47},
+       month={Jan-Dec},
+       pages={283(22)},
+       note={The notation of fractio modi.},
 }
 
 @Book {392,
-author = {Treitler, Leo},
-year = {1992},
-title = {The Journal of Musicology},
-volume={10},
-number={2},
-month={Spring},
-pages={131(61)},
+       author = {Treitler, Leo},
+       year = {1992},
+       title = {The Journal of Musicology},
+       volume={10},
+       number={2},
+       month={Spring},
+       pages={131(61)},
 
-note={ The unwritten and written transmission, of medieval chant
-and the start-up of musical notation.
+       note={ The unwritten and written transmission, of medieval chant
+       and the start-up of musical notation.
 
-Notational practice developed in medieval music to address the written tradition for chant which interacted with the unwritten vocal tradition.},
+       Notational practice developed in medieval music to address the written tradition for chant which interacted with the unwritten vocal tradition.},
 }
 
 @Book {407,
-author = {West, M.L},
-year = {1994},
-title = {Music & Letters},
-volume={75},
-number={2},
-month={May},
-pages={161(19)},
-note={The Babylonian musical notation and the Hurrian melodic texts. 
+       author = {West, M.L},
+       year = {1994},
+       title = {Music & Letters},
+       volume={75},
+       number={2},
+       month={May},
+       pages={161(19)},
+       note={The Babylonian musical notation and the Hurrian melodic texts. 
 
-A new way of deciphering the ancient Babylonian musical notation. 
+       A new way of deciphering the ancient Babylonian musical notation. 
 }
 }
 
 @Book {418,
-author = {Brown, Earle},
-year = {1986},
-title = {Musical Quarterly},
-volume={72},
-month={Spring},
-pages={180(22)},
-note={The notation and performance of new music.},
+       author = {Brown, Earle},
+       year = {1986},
+       title = {Musical Quarterly},
+       volume={72},
+       month={Spring},
+       pages={180(22)},
+       note={The notation and performance of new music.},
 }
 
 @Book {426,
-author = {Eggleston, Suzanne},
-year = {1994},
-title = {Notes},
-volume={51},
-number={2},
-month={Dec},
-pages={657(7)}, 
-journal={New periodicals},
-note={A list of new music periodicals covering the period
-Jun.-Dec. 1994. Includes aims, formats and a description of the
-contents of each listed periodical. Includes Music Notation News},
+       author = {Eggleston, Suzanne},
+       year = {1994},
+       title = {Notes},
+       volume={51},
+       number={2},
+       month={Dec},
+       pages={657(7)}, 
+       journal={New periodicals},
+       note={A list of new music periodicals covering the period
+       Jun.-Dec. 1994. Includes aims, formats and a description of the
+       contents of each listed periodical. Includes Music Notation News},
 
 }
 
 @Book {441,
 
-author = {Fuller, David},
-year = {1989},
-title = {The Journal of Musicology},
-volume={7},
-number={1},
-month={Winter},
-pages={21(8)},
-note={
-Notes and inegales unjoined: defending a definition. (written-out inequalities in music notation).        
+       author = {Fuller, David},
+       year = {1989},
+       title = {The Journal of Musicology},
+       volume={7},
+       number={1},
+       month={Winter},
+       pages={21(8)},
+       note={
+       Notes and inegales unjoined: defending a definition. (written-out inequalities in music notation).        
 }},
 
 @Book {454,
 
-author = {Jones, David Evan},
-year = {1990},
-title = {Perspectives of New Music},
-note={
-Speech extrapolated. (includes notation)
-}
+       author = {Jones, David Evan},
+       year = {1990},
+       title = {Perspectives of New Music},
+       note={Speech extrapolated. (includes notation)}
 }
 
 @Book {464,
-author = {Lependorf, Jeffrey},
-year = {1989},
-journal={Perspectives of New Music},
-volume={27},
+       author = {Lependorf, Jeffrey},
+       year = {1989},
+       journal={Perspectives of New Music},
+       volume={27},
  number={2},
-month={Summer},
-pages={232(20)},
-note={
-Contemporary notation for the shakuhachi: a primer for composers. (Tradition and Renewal in the Music of Japan) },
+       month={Summer},
+       pages={232(20)},
+       note={
+       Contemporary notation for the shakuhachi: a primer for composers. (Tradition and Renewal in the Music of Japan) },
 
 }
 
 @Book {478,
-author = {Rastall, Richard},
-year = {1993},
-title = {Music & Letters},
-volume={74}, number={4},
-month={November},
-pages={639(2)},
+       author = {Rastall, Richard},
+       year = {1993},
+       title = {Music & Letters},
+       volume={74}, number={4},
+       month={November},
+       pages={639(2)},
 
-note={Equal Temperament Music Notation: The Ailler-Brennink
-Chromatic Notation. Results and Conclusions of the Music Notation
-Refor by the Chroma Foundation (book reviews).  },
+       note={Equal Temperament Music Notation: The Ailler-Brennink
+       Chromatic Notation. Results and Conclusions of the Music Notation
+       Refor by the Chroma Foundation (book reviews).  },
 }
 
 @Article {Francois92,
@@ -515,7 +513,7 @@ Refor by the Chroma Foundation (book reviews).  },
             computer is used to write down music with accuracy never
             before achieved, the range of modern sounds has surpassed
             the relevance of the computer...},
-title={Writing without representation, and unreadable notation.},
+       title={Writing without representation, and unreadable notation.},
 }
 
 @Book {501,
index c66fa3bfbd48082e8bab55015556713ffc9d1e3f..bc5bce86401f65961b747b39130ba9d48ce8b0af 100644 (file)
@@ -4,6 +4,8 @@
 \def\kdots{,\ldots,}
 \title{Not the Font-En-Tja font}
 \author{HWN \& JCN} 
+\def\preMudelaExample{}
+\def\postMudelaExample{}
 \begin{document}
 \maketitle
 
@@ -22,6 +24,14 @@ Ross\cite{ross} quite some of their insights were used.  Although it
 is a matter of taste, I'd say that B\"arenreiter has the finest
 typography of all.
 
+%
+% stupid test to check convert-mudela.py.
+%
+% (so sue me)
+\begin{mudela}[fragment,center]
+  \clef bass; c1 \clef alto; c'2  \clef treble; c''4
+\end{mudela}
+
 
 \section{Bezier curves for slurs}
 
@@ -290,6 +300,12 @@ position that remains is for the upper beam to hang.
 \end{eqnarray*}
 
 
+\section{Layout of the source files}
+
+The main font (with the fixed size music glyphs) uses a the \TeX\
+logfile as a communication device.  Use the specialised macros to
+create and export glyphs.
+
 \bibliographystyle{plain}
 \bibliography{engraving}
 
index 5331fe1269343f1f613730223f2db51eed6fb697..ae08ad2d24ae9172ea474776291a992b5d82c753 100644 (file)
@@ -952,10 +952,7 @@ file(.ly) extension must be given, and the filename must be quoted.
 (An unquoted string will not work here.)
 
 dit(code(\key) var(pitch)code(;)) Change key signature to that of
-var(pitch)-major. The predefined identifiers code(\major) and
-code(\minor) decide if all subsequent code(\key) commands are given in
-major or minor, respectively.
-  
+var(pitch)-major.
 
 dit(code(\keysignature) var(pitchseq)code(;))
 Specify an arbitrary key signature.  The pitches from var(pitch) will
@@ -1299,10 +1296,7 @@ dit(code(defaultBarType)) Sets the default type of bar line.  See
 code(\bar) keyword.
 
 
-dit(code(keymodality)) The number of semitones that should be added to
-the pitch given in the subsequent code(\key) commands to get the
-corresponding major key, e.g. minor keys are specified by
-code(keymodality=3). Is set by code(\major) and code(\minor).
+
 
 dit(code(keyoctaviation)) If set to 1, then keys are the same in all
 octaves.  If set to 0 then the key signature for different octaves can
@@ -1329,16 +1323,16 @@ default) if you do not want key signatures printed.
 dit(code(timeSignatureStyle)) Changes the default two-digit layout
    for time signatures. The following values are recognized:
    description(
-      dit(code(C)) 4/4 and 2/2 are typeset as C and struck C,
+      dit(code(C)): 4/4 and 2/2 are typeset as C and struck C,
       respectively. All other time signatures are written with two digits.
-      dit(code(old)) 2/2, 3/2, 3/4, 4/4, 6/4 and 9/4 are typeset with
+      dit(code(old)): 2/2, 3/2, 3/4, 4/4, 6/4 and 9/4 are typeset with
       old-style mensuration marks. All other time signatures are 
       written with two digits.
-      dit(code(1)) All time signatures are typeset with a single
+      dit(code(1)): All time signatures are typeset with a single
       digit, e.g. 3/2 is written as 3.
       dit(code(C2/2), code(C4/4), code(old2/2), code(old3/2),
       code(old3/4), code(old4/4), code(old6/4) or
-      code(old9/4)) Tells Lilypond to use a specific symbol as time
+      code(old9/4)): Tells Lilypond to use a specific symbol as time
       signature.
    )
 The different time signature characters are shown below with
@@ -1445,10 +1439,6 @@ code(castingalgorithm).  Is equal to 1.0.
 dit(code(\infinity)) Used for setting the Score.beamslopedamping
 property.  Is actually equal to 10000.  
 dit(code(\left)) Used for setting textalignment property.  Is equal to -1.
-dit(code(\major)) All subsequent code(\key) commands are interpreted
-as major keys.
-dit(code(\minor)) All subsequent code(\key) commands are interpreted
-as minor keys.
 dit(code(\mf)) Print mezzoforte symbol on preceeding note. 
 dit(code(\mp)) Print mezzopiano symbol on preceeding note. 
 dit(code(\nobreak)) Prevent a line break in music by using a large
index 2ab084682989c4d656e948d4e0ff374c4023134b..02bdaaf9a340b4405bbb9fc30cb9dc88af1c32d9 100644 (file)
@@ -697,11 +697,9 @@ dit(code(\clef) var(clefname)) This command sets the current clef for notation,
     \clef "alto"; c'4    
   )
 dit(code(\key) var(pitch)) This command changes the current key signature.  The
-  key signature is printed at the start of every line. The identifiers
-  code(\major) and code(\minor) can be used to decide if all the 
-  subsequent code(\key) commands are major or minor, respectively. 
-  The default is major keys. The key of C-minor can 
-  thus be specified as `code(\key es)' or `code(\minor \key c)'.
+  key signature is printed at the start of every line.  The argument
+  is the name of the corresponding major key.  The key of C-minor can 
+  thus be specified as `code(\key es)'.
   
 dit(code(\keysignature) var(pitchlist))
 
index 99a54a24a9220467b98df36833110fcd90c19576..ad2ad26ed5fb9d6bdebe693e0dbf647c0f03dc3a 100644 (file)
@@ -7,7 +7,7 @@ itemize(
 it()nemail(Tom Cato Amundsen)(tomcato@xoommail.com),
     cembalo-partita in mudela.
 it()nemail(Mats Bengtsson)(matsb@s3.kth.se),
-    lurl(http://www.s3.kth.se/~matsb)
+    lurl(http://www.s3.kth.se/~matsb/)
     clef stuff, key stuff, swedish notenames, testing, general
     comments.
 it()nemail(Eric Bullinger)(eric@aut.ee.ethz.ch),
@@ -18,24 +18,22 @@ it()nemail(Anthony Fok)(foka@debian.org),
     debian package: debian/*
 it()nemail(Neil Jerram)(nj104@cus.cam.ac.uk). 
     parts of Documentation/Vocab*
-it()Donald Ervin Knuth,  lurl(http://www.cs-staff.stanford.edu/~knuth)
+it()Donald Ervin Knuth,  lurl(http://www.cs-staff.stanford.edu/~knuth/)
     mf/ital-*.mf (these were taken from the CM fonts)
 it()nemail(Werner Lemberg)(xlwy01@uxp1.hrz.uni-dortmund.de),
     misc bugfixes, some Beam and Stem code. 
 it()nemail(David R. Linn)(drl@vuse.vanderbilt.edu),
     Mailing list maintenance.
-it()nemail(Adrian Moriano)()
-    Documentation fixes, glossary.
+it()nemail(Adrian Mariano)()
+    Reference manual, tutorial fixes, glossary.
 it()nemail(Han-Wen Nienhuys)(hanwen@cs.uu.nl), 
-    lurl(http://www.cs.uu.nl/~hanwen)
-    nl()
+    lurl(http://www.cs.uu.nl/~hanwen/)
     Main author (initials: HWN).
 it()nemail(Jan Nieuwenhuizen)(janneke@gnu.org), 
-    lurl(http://www.xs4all.nl/~jantien)
-    nl()
+    lurl(http://www.xs4all.nl/~jantien/)
     Main author (initials: JCN).
 it()nemail(Alexandre Oliva)(oliva@dcc.unicamp.br), 
-    lurl(http://sunsite.unicamp.br/~oliva)
+    lurl(http://sunsite.unicamp.br/~oliva/)
     testing
 it()nemail(Franc,ois Pinard)(pinard@iro.umontreal.ca), 
     parts of Documentation/Vocab*, started internationalization stuff
index c1cee4ed6b850711d349377f1f51a13165ab1ee5..75bc165155203c59ffb02057ddfa7974c6925017 100644 (file)
@@ -39,7 +39,8 @@ it() Python 1.5 (Strictly speaking, you shouldn't need Python for
 
 sect(RUNNING)
 
-GNU LilyPond does use a lot of resources. For operation you need the following:
+GNU LilyPond does use a lot of resources. For operation you need the
+following:
 
 itemize(
 it()TeX
@@ -48,6 +49,21 @@ it()A PostScript printer and/or viewer (such as Ghostscript) is strongly
     Ghostscript installed.
 )
 
+
+For running LilyPond successfully you have to help TeX and MetaFont
+find various files.  The recommended way of doing so is adjusting the
+environment variables in the start-up scripts of your shell.  An
+example is given here for the Bourne shell:
+verb(export MFINPUTS="/usr/local/share/lilypond/mf:"
+export TEXINPUTS="/usr/local/share/lilypond/tex:"
+)
+The empty path component
+represents TeX() and MetaFont's default search paths.  Scripts with
+the proper paths for the bourne and C-shell respectively are generated in
+file(buildscripts/out/lilypond-profile) and
+file(buildscripts/out/lilypond-login) during compilation.
+
+
 sect(RECOMMENDED)
 
 Although not strictly necessary, these are recommended to have.
@@ -64,6 +80,9 @@ it()Bison (version 1.25 or newer).
 Check out lurl(ftp://ftp.gnu.org)
 or any mirror of this site.
 
+it()GUILE (version 1.2)
+Check out lurl(http://www.gnu.org/programs/guile.html)
+
 it()Python (version 1.5 or newer).  Check out
 lurl(ftp://ftp.python.org) or lurl(ftp://ftp.cwi.nl/pub/python).
 
@@ -101,11 +120,26 @@ man2html can be had from lurl(http://askdonald.ask.uni-karlsruhe.de/hppd/hpux/Ne
     TeTeX users should not forget to rerun texhash.
 )
 
+Building the website requires pnmtopng.  The version of file(pnmtopng)
+that is distributed with RedHat 5.1 contains a bug (pnmtopng is
+dynamically linked to the wrong version of libpng).  Recompile it from
+source, and make sure that the pnmtopng binary is linked statically to
+the libpng that is included in libgr.
+
+verb( tar xzf libgr-2.0.13.tar.gz
+      make
+      cd png
+      rm libpng.so*
+      make pnmtopng
+)
+
+You can then install the new pnmtopng into /usr/local/bin/
+
 sect(CONFIGURING and COMPILING)
 
 to install GNU LilyPond, simply type:
 verb(
-       configure  --enable-tex-dir=XXXX --enable-mf-dir=YYYY
+       configure
        make
        make install
 )
@@ -120,17 +154,12 @@ verb(
        /usr/local/bin/mi2mu
        /usr/local/share/lilypond/*
        /usr/local/share/locale/{it,nl}/LC_MESSAGES/lilypond.mo
-       /usr/lib/texmf/texmf/tex/lilypond/* 
 )
 
 
-You should specify directories that are in TeX()'s and MetaFont's
-include path with the options (--enable-tex-dir) and
-bf(--enable-mf-dir).  If you don't specify any directories, the TeX()
-include directory is detected dynamically, which is unreliable.  The
-above assumes that you are root and have the GNU development tools,
-and your make is GNU make.  If this is not the case, you can adjust
-your environment variables to your taste:
+The above assumes that you are root and have the GNU development
+tools, and your make is GNU make.  If this is not the case, you can
+adjust your environment variables to your taste:
 
 verb(
        export CPPFLAGS="-I /home/me/my_include -DWEIRD_FOOBAR" 
@@ -149,13 +178,6 @@ verb(
 
 In this case, you will have to set up MFINPUTS, and TEXINPUTS accordingly.
 
-If you want to install GNU LilyPond in file(/usr/local), and your TeX has
-no default hooks for local stuff, you can do:
-
-verb(
-       configure --prefix=/usr/local --enable-tex-prefix=/usr/lib/texmf
-)
-
 Since GNU LilyPond currently is beta, you are advised to also use
 
 verb(
@@ -163,29 +185,18 @@ verb(
        --enable-checking
 )
 
-Other options include:
+Options to configure include:
 
 description(
-dit(bf(--enable-shared))
-    Make a shared library (gnu/linux, solaris (?) only )  (TEMPORARILY
-OUT OF ORDER)
-
+dit(bf(--enable-guile))
+    Link in GUILE (experimental)
 dit(bf(--enable-printing))
     Enable debugging print routines (lilypond bf(-D) option)
 dit(bf(--enable-optimise))
-    Set maximum optimisation: compile with bf(-O2)
+    Set maximum optimisation: compile with bf(-O2).  This can be
+unreliable on some compiler/platform combinations (eg, DEC Alpha and PPC)
 dit(bf(--enable-profiling))
     Compile with support for profiling.
-dit(bf(--enable-tex-prefix))
-    Set the directory where TeX and Metafont live.
-dit(bf(--enable-tex-dir))
-    Set then directory TeX input is in (detected as a subdir of
-    tex-prefix).  This should be a directory that is reachable both for
-    tex and latex.  On my system the best choice would be
-    file(/usr/lib/texmf/texmf/tex/generic//).
-dit(bf(--enable-mf-dir))
-    Set the directory metafont input is in (idem).   On my system the best
-    choice would be file(/usr/lib/texmf/texmf/fonts/source/public/).
 dit(bf(--enable-config))
     Output to a different configuration file.  Needed for multi-platform
     builds
index 734dbab853da3948fb5de7893c59eca949f05b38..1307c60e3bc888c29ac3c615e2c30e74cd3baf72 100644 (file)
@@ -31,9 +31,6 @@ nsubsect(Introduction)
 This is not a Fanmail/Hype page. These pages were entirely created from
 the LilyPond package-sources. 
 
-A document on LilyPond's music description language Mudela is 
-url(in the making)(DOEXPAND(docdir)/tex/DOEXPAND(outdir)/tutorial.html).
-
 Note: These pages are created from the latest bf(development snapshots)
 of LilyPond, specifically, this page was made from LilyPond
 @TOPLEVEL_VERSION@.tar.gz
@@ -42,7 +39,6 @@ nsect(Sites)
 
 description(
 dit(lurl(http://www.cs.uu.nl/people/hanwen/lilypond/))Han-Wen's site.
-dit(lurl(http://www.xs4all.nl/~jantien/lilypond/))Jan's site.
 dit(lurl(http://www.realtime.net/~daboys/lilypond/))Jeff's Windows NT Distribution site.
 )
 
index c62032bee9c414fa1b2fbac2c7e0775012f40af3..1b088819bc02ab044819aa0e1d7dc087d064d7e2 100644 (file)
@@ -94,6 +94,27 @@ o    A   PostScript   printer   and/or   viewer   (such   as
      all  embedded  PostScript  too  if you have Ghostscript
      installed.
 
+For running LilyPond successfully you have to help  TeX  and
+MetaFont  find  various files.  The recommended way of doing
+so is adjusting the environment variables  in  the  start-up
+scripts  of  your  shell.   An example is given here for the
+Bourne shell:
+
+
+
+
+     export MFINPUTS="/usr/local/share/lilypond/mf:"
+     export TEXINPUTS="/usr/local/share/lilypond/tex:"
+
+
+
+
+The empty path component represents  and MetaFont's  default
+search  paths.  Scripts with the proper paths for the bourne
+and   C-shell   respectively   are   generated   in   build-
+scripts/out/lilypond-profile  and buildscripts/out/lilypond-
+login during compilation.
+
 
 4: RECOMMENDED
 
@@ -113,51 +134,80 @@ o    Bison    (version    1.25   or   newer).    Check   out
      ftp://ftp.gnu.org or any mirror of this site.
 
 
-o    Python   (version   1.5   or   newer).     Check    out
+o    GUILE (version 1.2) Check  out  http://www.gnu.org/pro-
+     grams/guile.html
+
+
+o    Python    (version    1.5   or   newer).    Check   out
      ftp://ftp.python.org or ftp://ftp.cwi.nl/pub/python.
 
 
-o    Yodl.   All  documentation  will  be in Yodl. (1.30.17)
+o    Yodl.  All documentation will  be  in  Yodl.  (1.30.17)
      ftp://pcnov095.win.tue.nl/pub/yodl
      http://www.cs.uu.nl/~hanwen/yodl
 
 o    Texinfo. (version 3.12 or newer)
 
 
-o    GNU  find  Check out ftp://ftp.gnu.org or any mirror of
+o    GNU find Check out ftp://ftp.gnu.org or any  mirror  of
      this site.
 
 
 o    The geometry package for LaTeX is needed to use ly2dvi.
-     Available           at          ftp://ftp.ctan.org/tex-
+     Available          at           ftp://ftp.ctan.org/tex-
      archive/macros/latex/contrib/supported/geometry  or  at
      mirror site ftp://ftp.dante.de
 
 
 o    A fast computer (a full page of music typically takes 1
-     minute on my 486/133, using the --enable-checking  com-
+     minute  on my 486/133, using the --enable-checking com-
      pile. It's lot slower than most MusiXTeX preprocessors)
 
 
 5: WEBSITE
 
 
-If you want to auto-generate  Lily's  website,  you'll  need
+If  you  want  to  auto-generate Lily's website, you'll need
 some additional conversion tools.
 
 
 o    xpmtoppm (from the Portable Bitmap Utilities) (For Red-
-     Hat Linux users: it  is  included  within  the  package
+     Hat  Linux  users:  it  is  included within the package
      libgr-progs).
 
 o    Bib2html http://pertsserver.cs.uiuc.edu/~hull/bib2html.
      Which, in turn depends on man2html for proper installa-
-     tion.    man2html   can   be  had  from  http://askdon-
+     tion.   man2html  can  be   had   from   http://askdon-
      ald.ask.uni-karlsruhe.de/hppd/hpux/Network-
      ing/WWW/Man2html-1.05.
 
      TeTeX users should not forget to rerun texhash.
 
+Building the website requires pnmtopng.  The version of pnm-
+topng  that  is  distributed  with RedHat 5.1 contains a bug
+(pnmtopng is dynamically linked  to  the  wrong  version  of
+libpng).   Recompile  it from source, and make sure that the
+pnmtopng binary is linked statically to the libpng  that  is
+
+
+included in libgr.
+
+
+
+
+
+      tar xzf libgr-2.0.13.tar.gz
+           make
+           cd png
+           rm libpng.so*
+           make pnmtopng
+
+
+
+
+
+You can then install the new pnmtopng into /usr/local/bin/
+
 
 6: CONFIGURING and COMPILING
 
@@ -168,7 +218,7 @@ to install GNU LilyPond, simply type:
 
 
 
-          configure  --enable-tex-dir=XXXX --enable-mf-dir=YYYY
+          configure
           make
           make install
 
@@ -179,6 +229,9 @@ to install GNU LilyPond, simply type:
 This will install a number of files, something close to:
 
 
+
+
+
           /usr/local/man/man1/mi2mu.1
           /usr/local/man/man1/convert-mudela.1
           /usr/local/man/man1/mudela-book.1
@@ -187,20 +240,12 @@ This will install a number of files, something close to:
           /usr/local/bin/mi2mu
           /usr/local/share/lilypond/*
           /usr/local/share/locale/{it,nl}/LC_MESSAGES/lilypond.mo
-          /usr/lib/texmf/texmf/tex/lilypond/*
-
-
 
 
-
-You should specify directories that are in 's and MetaFont's
-include  path  with  the  options   (--enable-tex-dir)   and
---enable-mf-dir.   If you don't specify any directories, the
-include directory is detected dynamically, which is  unreli-
-able.   The above assumes that you are root and have the GNU
-development tools, and your make is GNU make.   If  this  is
-not  the  case, you can adjust your environment variables to
-your taste:
+The  above assumes that you are root and have the GNU devel-
+opment tools, and your make is GNU make.  If this is not the
+case,  you  can  adjust  your  environment variables to your
+taste:
 
 
 
@@ -229,24 +274,13 @@ is
           configure --prefix=$HOME/usr
 
 
-In  this  case, you will have to set up MFINPUTS, and TEXIN-
-PUTS accordingly.
-
-If you want to install GNU LilyPond in /usr/local, and  your
-TeX has no default hooks for local stuff, you can do:
-
-
-
-
-
-
-          configure --prefix=/usr/local --enable-tex-prefix=/usr/lib/texmf
-
 
 
 
+In  this  case, you will have to set up MFINPUTS, and TEXIN-
+PUTS accordingly.
 
-Since  GNU  LilyPond  currently  is beta, you are advised to
+Since GNU LilyPond currently is beta,  you  are  advised  to
 also use
 
 
@@ -258,43 +292,23 @@ also use
           --enable-checking
 
 
+Options to configure include:
 
 
-
-Other options include:
-
-
---enable-shared
-     Make a shared library (gnu/linux, solaris  (?)  only  )
-     (TEMPORARILY OUT OF ORDER)
-
+--enable-guile
+     Link in GUILE (experimental)
 
 --enable-printing
      Enable debugging print routines (lilypond -D option)
 
 --enable-optimise
-     Set maximum optimisation: compile with -O2
+     Set  maximum  optimisation: compile with -O2.  This can
+     be unreliable on  some  compiler/platform  combinations
+     (eg, DEC Alpha and PPC)
 
 --enable-profiling
      Compile with support for profiling.
 
---enable-tex-prefix
-     Set the directory where TeX and Metafont live.
-
---enable-tex-dir
-     Set  then  directory  TeX  input  is  in (detected as a
-
-
-     subdir of tex-prefix).  This should be a directory that
-     is  reachable both for tex and latex.  On my system the
-     best            choice             would             be
-     /usr/lib/texmf/texmf/tex/generic//.
-
---enable-mf-dir
-     Set  the directory metafont input is in (idem).   On my
-     system     the      best      choice      would      be
-     /usr/lib/texmf/texmf/fonts/source/public/.
-
 --enable-config
      Output  to  a different configuration file.  Needed for
      multi-platform builds
@@ -329,15 +343,14 @@ Example: suppose I want to build with and   without  profil-
 ing.  Then I'd use the following for the normal build,
 
 
-
-
-
-
            configure --prefix=~ --disable-optimise --enable-checking
            make
            make install
 
 
+
+
+
 and for the profiling version, I specify a different config-
 uration.
 
@@ -384,6 +397,8 @@ CAVEATS
 
 o    The -O2 option to gcc triggers a gcc bug on  DEC  Alpha
      in  dstream.cc.  You should turn off this flag for this
+
+
      file.
 
 
@@ -393,6 +408,10 @@ EXAMPLE
 This is what I type in my xterm:
 
 
+
+
+
+
           lilypond someinput.ly
           tex someinput.tex
           xdvi someinput&
@@ -447,6 +466,9 @@ erate this gif file by typing
           make gifs
 
 
+
+
+
 in the directory Documentation.
 
 You can make the rpm by issuing
diff --git a/NEWS b/NEWS
index 53ffde5b77ae9fc29c7771cac800d17e17358435..5cff9ea3776d13e9f2668439f25334c90ad43cc6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,28 +1,25 @@
---- ../lilypond-1.0.16/NEWS    Wed Oct 14 15:44:20 1998
-++ b/NEWS      Sat Oct 17 22:49:37 1998
-@@ -1,3 +1,11 @@
-pl 16.mb1
-       - bf: No unnecessary warnings about time signatures
-       - \major and \minor affects how all subsequent key signatures
-         are interpreted.
-       - Parser support for cautionary accidentals, i.e. accidentals 
-         within parantheses. Syntax: cis? The main part of the 
-         implementation is still missing.
-
- pl 16
-       - read property ydirection and tieYDirection for tie direction.
-       - bf: slur over rest.pl 16.jcn1
-       - dashed-slur through scheme
-
-pl 15.jcn4
-       - more scheme hacks
-
-pl 15.jcn3
-       - try at scheme in Atom
-
-pl 15.jcn2 # rest of
-       - graphical-lisp-element + silly half hook-up with autuplet
+pl 17
+       - fixed RPM building.
+
+pl 16.hwn1
+       - ridiculous slur dims fixed.
+       - ly2dvi32.py -> ly2dvi.py, ly2dvi.sh -> ly2dvi-old
+       - use re iso. regex for python stuff.
+       - bf: mudela-book.py
+       - updated install directions.  Made lilypond-login for csh
+       - bf: installdirs of MF stuff
+       - Dictionary implementation using hash tables (LilyPond is 3% faster)
+       - Cache [non]group_l_arr () calls in translator-group.cc (LilyPond is 4% faster)
+
+pl 16.uu1
+       - debian URLs, make/stepmake.make  patch
+       - further debian fixes.
+       
+pl 14.tca1
+       - partitas
+       - prall{mordent,prall} patch.
 
+******
 pl 16
        - read property ydirection and tieYDirection for tie direction.
        - bf: slur over rest.
diff --git a/TODO b/TODO
index d6bef869f2f9f0bc8e79073f731b7a8abb7ab705..6c18aa1a12005c94c03c95b129be1fc09aa21e76 100644 (file)
--- a/TODO
+++ b/TODO
@@ -9,10 +9,10 @@ grep for TODO and ugh/ugr/urg
 
 
 BUGS:
-       
 
-       * egcs-1.1 -O2 -finline-functions  causes crash
+       * document new TeX/mf layout
 
+       * egcs-1.1 -O2 -finline-functions  causes crash
 
        * formatting of input stuff. 
 
@@ -28,12 +28,6 @@ BUGS:
 
        * [/3 c8 c16 c c c]/1
   
-       * I see that  \prallprall and \prallmordent are identical. I think this is a 
-       mistake, that \prallprall should not have the vertical line.
-       This can be fixed by removing  the line
-       draw_mordent(twidth-0.5toverlap);
-       from the definition of \prallprall in mf/feta-slag.mf (see below)
-
        * fix singleStaffBracket
   
        * repeat bars: need distance after ":|" and before "|:"
@@ -65,8 +59,6 @@ BUGS:
        
        portato= \script { "portato" 0 -1 0 1 0 }
 
-       * MIDI spelling.
-
        * Align_element::padding  ?
 
        * uniformise property names.
@@ -108,8 +100,6 @@ BUGS:
 
        * install TeX stuff into tex/generic directory.
 
-       * /etc/profile.d support for RPM.
-
        * percussion note heads
 
        * mi2mu empty staffs.
@@ -118,12 +108,6 @@ BUGS:
 
        * make GNU style webpages.
 
-       * There seems to be an install error in lilypond-1.0.0.  Most of the
-       files in the "init" directory don't get installed in the
-       /usr/local/share/lilypond directory.  The files installed are of
-       the form feta*.ly.  In particular init.ly doesn't get installed.
-       I installed the files by hand and then the system seems to work.
-
        * midi_instrument -> midiInstrument
 
        * horizontal centering of dynamics 
@@ -237,8 +221,6 @@ ydirection and hshift preset
          - abbreviation-beam -> (measured/unmeasured) tremolo
          - partial -> anacrouse
 
-       * libtoolize flowerlib
-
        * shared lib
 
        * robustify Beam (in case of no stems, 32nd notes)
@@ -250,12 +232,7 @@ ydirection and hshift preset
        * check for groff / troff/ nroff et
 
        * more intelligent file searching
-       - use kpsepath
-       - make LilyPond fully relocatable
-
-       * use kpsepath to find all TeX dirs
-       - configure.in 
-       - clean-fonts.sh
+       - make LilyPond RPM fully relocatable
 
        * nicen examples:
        - break-up heavily-nested score blocks
@@ -287,15 +264,6 @@ ydirection and hshift preset
         * clefs (AG): The "8" should appear closer to the actual clef,
           touching it.
 
-       * scoping for properties?
-
-       {       c4
-               \multi 2  < { \stemup .. } { \stemdown .. } >
-               c2 
-       }
-
-       this modifies \stem for the c2
-
        * put errorlevel in Input class
 
        * junk nesting slurs
@@ -341,12 +309,6 @@ ydirection and hshift preset
 
        * redhat (v?) graphical install bomb-out?
 
-       * egcs-1.03 ice: stem.cc:327; should localize bug (mine's still 10K)
-
-       * gcc 2.8.1: see ice and RESIZE_ICE
-
-       * xdvi: PS in magnifying glass.
-
        * GNU diff 2.7: diff -rN does not see a new directory with empty file
 
        * GNU patch 2.1: <must find simple example> if patch chokes on a
@@ -363,8 +325,6 @@ ydirection and hshift preset
 
        * GNU indent: handle C++
 
-       * GNU make: move hardcoded builtin rules to runtime ?
-
        * GNU patch 
          - 'double-fix' mode: ignore identical fix, rather than suggest 
            to revert patch direction when (more or less? exactly) the same 
@@ -498,7 +458,6 @@ PROJECTS
        - Move all Score_elems, into libmutype.a
        - SGML
 
        * Documentation
        - Doc (C) stuff of sheet music
        - a better format?  SGML?  TeX?  Info?
@@ -531,6 +490,7 @@ PROJECTS
 
        * Keys:
        - merge key{item} & localkey{item}?
+       - Major/Minor
        - spacing, national styles?
 
        * Support for TAB
diff --git a/VERSION b/VERSION
index 414f826013c5a5bf3c8f535cb192cee2bdee1b8e..951bd357fd21a7e926bb32707012f8afd976e2a7 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=0
-PATCH_LEVEL=16
-MY_PATCH_LEVEL=mb1
+PATCH_LEVEL=17
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff --git a/buildscripts/lilypond-login.sh b/buildscripts/lilypond-login.sh
new file mode 100644 (file)
index 0000000..d4a482e
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/csh
+
+# env. vars for the C-shell.
+
+# set environment for LilyPond.  To be installed in /etc/profile.d/
+setenv GS_LIB "@datadir@/afm"
+setenv GS_FONTPATH "@datadir@/ps"
+setenv LILYINCLUDE "@datadir@/ly:@datadir@/afm"
+
+# include an empty path component for the system wide includes.
+setenv MFINPUTS "@datadir@/mf:"${MFINPUTS:=":"}
+setenv TEXINPUTS "@datadir@/tex:"${TEXINPUTS:=":"}
+
index c20fa45672fde52ad3f27ca3ab0822e5734c510a..176f63629ea2d57172ee5698dbf5b948aa24f0f1 100644 (file)
@@ -4,7 +4,7 @@
 # set environment for LilyPond.  To be installed in /etc/profile.d/
 GS_LIB="@datadir@/afm"
 GS_FONTPATH="@datadir@/ps"
-LILYINCLUDE="@datadir@/ly"
+LILYINCLUDE="@datadir@/ly:@datadir@/afm"
 
 # include an empty path component for the system wide includes.
 MFINPUTS="@datadir@/mf:"${MFINPUTS:=":"}
index 087ad631826e91a0bb08d7a76c3c35a27576ae1f..d44317dc8e5fb132cdc4aa5f74fd4f5f0c5624a9 100755 (executable)
@@ -52,5 +52,5 @@ then
     ln ../.dstreamrc .
 fi
 
-./configure --prefix=$prefix --enable-debugging --enable-printing --enable-checking --disable-optimise
+./configure --prefix=$prefix --enable-debugging --enable-printing --enable-checking --disable-optimise --enable-guile
 
index 6209c8af22b971ac835a73ddcef9967c89308408..69f89668978f00cbe8f7d7413cd3738b8f3dc412 100644 (file)
@@ -42,7 +42,7 @@ AC_STEPMAKE_MSGFMT
 AC_STEPMAKE_TEXMF
 # AC_STEPMAKE_TEXMF_DIRS
 AC_STEPMAKE_YODL
-AC_CHECK_LIB(guile, scm_shell)
+
 
 dnl should check out -print
 dnl huh?
index 25818fbb824da39829057ade111bdcd146e5a328..8a5f21bd28b23f155445023369ce331a06a6f692 100644 (file)
@@ -2,6 +2,3 @@ Fri,  6 Feb 1998 17:24:49 -0700:
  * Compile mudela-mode.el into mudela-mode.elc
  * Install /etc/emacs/site-start.d/50lilypond.el
  * Figure out how to make mudela-mode work on my computer.  :-)
-
-Sun, 26 Apr 1998 21:11:32 -0600:
- * Remove preinst from upstream source
index c56fe5d3d164bec960fce23cf660040b6c9694c7..26392962b384b963dc70e65ad11d1d1697d9e81c 100644 (file)
@@ -1,8 +1,53 @@
+lilypond (1.0.16-1) unstable; urgency=low
+
+  * New upstream release.
+  * [debian/{copyright,control}]: pcnov095.win.tue.nl -> ftp.cs.uu.nl
+      (New upstream master FTP site).  Also updated JCN's web site URL.
+  * [debian/rules]: 
+      - Now, in the "clean:" target, runs either 
+        "find . -user root | xargs -r chown $$SUDO_USER.$$SUDO_GID" or
+        "find . -user root | xargs -r chown $$LOGNAME" to deal with all those
+        root-owned "out/*" files generated during a "sudo debian/rules clean"
+        run.  Thanks to Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
+        for reporting the problem!  (closes: Bug#27044)
+      - Updated debian/rules according to the new debhelper rules example.
+  * [Documentation/topdocs/AUTHORS.yo]: Added a trailing "/" on URLs.
+
+ -- Anthony Fok <foka@debian.org>  Thu, 15 Oct 1998 04:49:40 -0600
+
+lilypond (1.0.2-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Anthony Fok <foka@debian.org>  Sat, 15 Aug 1998 04:32:08 -0600
+
+lilypond (1.0.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * [aclocal.m4]: Temporarily changed OPTIMIZE="-O2" to OPTIMIZE="-O"
+      to avoid egcs (c++) complaint of "Internal compiler error"
+      on my computer.
+  * [scripts/mudela-book.py]: Added "#!@PYTHON@" at the top.  This string
+      expands to "#!/usr/bin/python" in /usr/bin/mudela-book.
+      (Thanks to Lintian.  :-)
+  * [debian/control]: Recommends: python-base (>= 1.5.1).
+      (Again, thanks to Lintian.  :-)
+  * [debian/postrm]: Now also removes the generated LilyPond fonts
+      *.{tfm,pk} under /var/spool/texmf when called as "postrm remove".
+  * [debian/preinst]: Yes, have to bring this back to remove the generated
+      LilyPond fonts in /var/spool/texmf because "postrm remove" didn't do
+      its jobs in previous versions.  Oops.  :-)
+  * [debian/rules]: Installs a few new upstream documentation files, and
+      the example files in out/ directories are moved to parent directories.
+
+ -- Anthony Fok <foka@debian.org>  Fri, 14 Aug 1998 03:30:05 -0600
+
 lilypond (0.1.76-1) unstable; urgency=low
 
   * support for 'make deb' target
+  * Not uploaded to Debian's FTP site.
 
- -- Jan Nieuwenhuizen <janneke@gnu.org> Fri,  3 Jul 1998 17:53:37 +0200
+ -- Jan Nieuwenhuizen <janneke@gnu.org>  Fri,  3 Jul 1998 17:53:37 +0200
 
 lilypond (0.1.71-1) unstable; urgency=low
 
index 08a7805a9ee0a3261cac747c460492a0f117e9c3..14be2746a9be339a443c7459ad5edf8c41abe9e1 100644 (file)
@@ -7,8 +7,9 @@ Standards-Version: 2.4.1.0
 Package: lilypond
 Architecture: any
 Depends: ${shlibs:Depends}, tetex-base (>= 0.9-5)
+Recommends: python-base (>= 1.5.1)
 Conflicts: musixtex-fonts, tetex-base (<< 0.9)
-Description: The GNU Project music typesetter.  
+Description: The GNU Project music typesetter.
  LilyPond is the GNU Project music typesetter.  This program can print
  beautiful sheet music from a music definition file.  It can also play
  mechanical performances to a MIDI file.  Features include multiple
@@ -16,7 +17,8 @@ Description: The GNU Project music typesetter.
  beams, slurs, triplets, formatting scores, part extraction.  It includes
  a nice font of musical symbols.
  .
-  URL: http://www.cs.ruu.nl/people/hanwen/lilypond
-       http://sca.uwaterloo.ca/~praetzel/lilypond/
+  URLs: http://www.cs.uu.nl/~hanwen/lilypond/
+        http://www.xs4all.nl/~jantien/lilypond/
+        http://sca.uwaterloo.ca/~praetzel/lilypond/
   Authors: Han-Wen Nienhuys <hanwen@cs.uu.nl>
            Jan Nieuwenhuizen <janneke@gnu.org>
index 2f98fdf5498fd57e515c5dfa443aa023588603fe..1054ef466ec56ce370858c47b72d8fce845f82c5 100644 (file)
@@ -7,6 +7,7 @@ Standards-Version: 2.4.1.0
 Package: lilypond
 Architecture: any
 Depends: ${shlibs:Depends}, tetex-base (>= 0.9-5)
+Recommends: python-base (>= 1.5.1)
 Conflicts: musixtex-fonts, tetex-base (<< 0.9)
 Description: The GNU Project music typesetter.
  LilyPond is the GNU Project music typesetter.  This program can print
@@ -24,7 +25,8 @@ Description: The GNU Project music typesetter.
  cadensa, balken, boogjes, triolen, partituren, en losse partijen.  Een
  fraai font met muzikeksymbolen wordt meegeleverd.
  .
-  URL: http://www.cs.ruu.nl/people/hanwen/lilypond/
-       http://sca.uwaterloo.ca/~praetzel/lilypond/
-  Authors: Han-Wen Nienhuys <hanwen@stack.nl>
+  URLs: http://www.cs.uu.nl/~hanwen/lilypond/
+        http://www.digicash.com/~jan/lilypond/
+        http://sca.uwaterloo.ca/lilypond/
+  Authors: Han-Wen Nienhuys <hanwen@cs.uu.nl>
            Jan Nieuwenhuizen <janneke@gnu.org>
index c78565b29b0ad88e80830a2577170039eca77115..6cde23db40af957a04393fb11fbada05c760945f 100644 (file)
@@ -7,10 +7,12 @@ Standards-Version: 2.4.1.0
 Package: lilypond
 Architecture: any
 Depends: ${shlibs:Depends}, tetex-base (>= 0.9-5)
+Recommends: python-base (>= 1.5.1)
 Conflicts: musixtex-fonts, tetex-base (<< 0.9)
-Description: The GNU Project music typesetter.  @BLURB@
+Description: The GNU Project music typesetter.@BLURB@
  .
-  URL: http://www.cs.ruu.nl/people/hanwen/lilypond
-       http://sca.uwaterloo.ca/~praetzel/lilypond/
+  URLs: http://www.cs.uu.nl/~hanwen/lilypond/
+        http://www.xs4all.nl/~jantien/lilypond/
+        http://sca.uwaterloo.ca/~praetzel/lilypond/
   Authors: Han-Wen Nienhuys <hanwen@cs.uu.nl>
            Jan Nieuwenhuizen <janneke@gnu.org>
index cf496990ff07d2d3ce81ede8d31f12fff89449a4..551e4d52e1873b3942e0b536ed47727ebe134875 100644 (file)
@@ -2,18 +2,19 @@ This package was debianized by Anthony Fok <foka@debian.org> on
 Wed,  6 Aug 1997 04:30:28 -0600
 
 It was downloaded from
-      ftp://pcnov095.win.tue.nl/pub/lilypond/development/
-          lilypond-0.1.71.tar.gz
+      ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/development/lilypond-1.0.16.tar.gz
 
 It is also available from:
+
       ftp://sca.uwaterloo.ca/pub/lilypond/development/
 
 For more information about GNU LilyPond, please visit:
-      http://www.cs.ruu.nl/people/hanwen/lilypond/
-  or  http://sca.uwaterloo.ca/~praetzel/lilypond/
+      http://www.cs.uu.nl/~hanwen/lilypond/
+  or  http://www.xs4all.nl/~jantien/
+  or  http://sca.uwaterloo.ca/lilypond/
 
 Authors:
-      Han-Wen Nienhuys <hanwen@stack.nl>
+      Han-Wen Nienhuys <hanwen@cs.uu.nl>
       Jan Nieuwenhuizen <janneke@gnu.org>
  
 Copyright:
index 08a7805a9ee0a3261cac747c460492a0f117e9c3..14be2746a9be339a443c7459ad5edf8c41abe9e1 100644 (file)
@@ -7,8 +7,9 @@ Standards-Version: 2.4.1.0
 Package: lilypond
 Architecture: any
 Depends: ${shlibs:Depends}, tetex-base (>= 0.9-5)
+Recommends: python-base (>= 1.5.1)
 Conflicts: musixtex-fonts, tetex-base (<< 0.9)
-Description: The GNU Project music typesetter.  
+Description: The GNU Project music typesetter.
  LilyPond is the GNU Project music typesetter.  This program can print
  beautiful sheet music from a music definition file.  It can also play
  mechanical performances to a MIDI file.  Features include multiple
@@ -16,7 +17,8 @@ Description: The GNU Project music typesetter.
  beams, slurs, triplets, formatting scores, part extraction.  It includes
  a nice font of musical symbols.
  .
-  URL: http://www.cs.ruu.nl/people/hanwen/lilypond
-       http://sca.uwaterloo.ca/~praetzel/lilypond/
+  URLs: http://www.cs.uu.nl/~hanwen/lilypond/
+        http://www.xs4all.nl/~jantien/lilypond/
+        http://sca.uwaterloo.ca/~praetzel/lilypond/
   Authors: Han-Wen Nienhuys <hanwen@cs.uu.nl>
            Jan Nieuwenhuizen <janneke@gnu.org>
index e0dd95cfbcdbe0e1d86493984dea4038651f43d5..80e1d36c753ed7e0214cbeed584b2caa4e8ddf5d 100755 (executable)
@@ -4,7 +4,7 @@
 #   by Anthony Fok <foka@debian.org>
 #   This is free software; see the GNU General Public Licence
 #   version 2 or later for copying conditions.  There is NO warranty.
-#   Last modified:  Wed, 22 Apr 1998 05:55:58 -0600
+#   Last modified:  Fri, 14 Aug 1998 00:07:07 -0600
 
 set -e
 
@@ -22,17 +22,13 @@ VARTEXFONTS=`/usr/bin/kpsewhich -expand-var '$VARTEXFONTS'`
 : ${VARTEXFONTS=$std_VARTEXFONTS}
 
 case "$1" in
-    remove)
-       /usr/bin/mktexlsr
-    ;;
-
     upgrade)
        # Clear out the old TFM and PK files in case the fonts were modified
        rm -rf $VARTEXFONTS/tfm/$font_supplier/$font_typeface
        rm -rf $VARTEXFONTS/pk/*/$font_supplier/$font_typeface
     ;;
 
-    purge)
+    remove|purge)
        # Clear out the old TFM and PK files in case the fonts were modified
        rm -rf $VARTEXFONTS/tfm/$font_supplier/$font_typeface
        rm -rf $VARTEXFONTS/pk/*/$font_supplier/$font_typeface
index fb123fcfa975600796c9a016947218b6ac7e3a01..3a78b27b076649df29eae835799d8c165e594b1f 100755 (executable)
@@ -9,8 +9,9 @@
 # for Debian GNU/Linux.
 
 package = lilypond
-
-SHELL = /bin/bash
+SHELL = /bin/sh
+r = debian/tmp
+d = usr/doc/$(package)
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
@@ -19,57 +20,81 @@ build: build-stamp
 build-stamp:
        dh_testdir
 
-       ./configure --disable-checking --disable-debugging \
+       CC=egcc ./configure --disable-checking --disable-debugging \
                --enable-printing --prefix=/usr --enable-optimise \
                --enable-shared
        $(MAKE) all
+       # $(MAKE) htmldoc
 
        touch build-stamp
 
 clean:
        dh_testdir
        dh_testroot
-       rm -f build-stamp
+       rm -f build-stamp install-stamp
        -$(MAKE) distclean
-       -$(MAKE) local-distclean
+
+       # Correct the owner of the out/dummy.dep files when built with sudo.
+       if [ -n "$$SUDO_USER" -a -n "$$SUDO_GID" ]; then \
+               find . -user root | xargs -r chown $$SUDO_USER.$$SUDO_GID; \
+       else \
+               find . -user root | xargs -r chown $$LOGNAME; \
+       fi
 
        # Remove the following line once the *.make files are fixed
-       rm -f bin/*.pyc
-       rm -f debian/preinst
+       rm -f stepmake/bin/*.pyc
+       rm -f stepmake/stepmake/stepmake
+       rm -f stepmake/stepmake/bin
+       rm -f GNUmakefile stepmake/GNUmakefile
+       rm -f config.h
+       rm -f wwwlist
 
        dh_clean
 
-# Build architecture-independent files here.
-binary-indep: build
-# We have nothing to do by default.
-
-binary-arch: build
+install: install-stamp
+install-stamp: build-stamp
        dh_testdir
        dh_testroot
        dh_clean -k
-
        dh_installdirs usr/lib/texmf/doc \
                usr/lib/emacs/site-lisp \
                usr/doc/$(package)/examples
-       ln -fs ../../../doc/lilypond debian/tmp/usr/lib/texmf/doc/lilypond
-       $(MAKE) prefix=`pwd`/debian/tmp/usr install
-       cp -av mudela-mode.el debian/tmp/usr/lib/emacs/site-lisp
-       dh_installdocs ANNOUNCEMENT ANNOUNCE-0.1 README.txt NEWS ONEWS DEDICATION \
-               BUGS TODO \
+       ln -fs ../../../doc/lilypond $(r)/usr/lib/texmf/doc/lilypond
+
+       $(MAKE) prefix=`pwd`/$(r)/usr install
+
+       touch install-stamp
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       cp -av mudela-mode.el $(r)/usr/lib/emacs/site-lisp
+       dh_installdocs ANNOUNCEMENT ANNOUNCE-0.1 NEWS* DEDICATION \
+               BUGS TODO *.txt \
                Documentation/pictures/*.xpm \
                Documentation/out/*.txt \
                Documentation/tex/*.doc \
                Documentation/tex/*.bib
 #      dh_installexamples input
        cp -aP `find input mutopia \( -name '*.ly' -o -name '*.tex' -o -name 'TODO' \)` \
-               debian/tmp/usr/doc/lilypond/examples
+               $(r)/$(d)/examples
+       for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
+               mv -fv $$i/* $$i/..; rmdir $$i; done
 #      dh_installmenu
+#      dh_installemacsen
 #      dh_installcron
 #      dh_installmanpages
 #      dh_undocumented
        dh_installchangelogs
 #      dh_strip
        dh_compress
+       ( cd $(r)/$(d) && \
+               if [ -f NEWS ]; then gzip -9vf NEWS; fi )
+       ln -s NEWS.gz $(r)/$(d)/changelog.gz
        dh_fixperms
        dh_suidregister
        dh_installdeb
@@ -83,4 +108,4 @@ source diff:
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary
+.PHONY: build clean install binary-indep binary-arch binary
index 1a1bb286a020a7f5b453f2fe54e67bafe0bf2686..9b35470c7c3e24195316dde3f306bdf47203516d 100644 (file)
@@ -1,5 +1,5 @@
 # Example watch control file for uscan
 # Rename this file to "watch" and then you can run the "uscan" command
 # to check for upstream updates and more.
-# Site                 Directory       Pattern                 Version Script
-pcnov095.win.tue.nl    /pub/lilypond/development       lilypond-*.tar.gz       debian  uupdate
+# Site         Directory                       Pattern                 Version Script
+ftp.cs.uu.nl   /pub/GNU/LilyPond/development   lilypond-*.tar.gz       debian  uupdate
diff --git a/flower/hash.cc b/flower/hash.cc
new file mode 100644 (file)
index 0000000..1e2debd
--- /dev/null
@@ -0,0 +1,33 @@
+#include "string.hh"
+#include "array.hh"
+#include "dictionary.hh"
+
+
+// Note: assumes long is at least 32 bits.
+const unsigned long my_prime_list[] = 
+{
+  53,         97,         193,       389,       769,
+  1543,       3079,       6151,      12289,     24593,
+  49157,      98317,      196613,    393241,    786433,
+  1572869,    3145739,    6291469,   12582917,  25165843,
+  50331653,   100663319,  201326611, 402653189u, 805306457u, 
+  1610612741u, 3221225473u, 4294967291u
+};
+
+unsigned long prime_list (int idx)
+{
+  return my_prime_list [idx];
+}
+
+unsigned int hash (String s)
+{
+  const char* str = s.ch_C ();
+  unsigned int result = 0;
+  while (1) {
+    char c = *str++;
+    if (c == 0) break;
+      result += (result<<3) + c;
+  }
+  return result;
+}
+
index 9183c5d585934581b5d0fea755c105bb83fffb81..da6e64b391794279538bdbfc5a56003cce3a7f04 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  dictionary-iter.hh -- declare 
+  dictionary-iter.hh -- declare Dictionary_iter
 
   source file of the Flower Library
 
 #ifndef DICTIONARY_ITER_HH
 #define DICTIONARY_ITER_HH
 
-#include "string.hh"
-#include "assoc-iter.hh"
+#include "dictionary.hh"
+
+
+
 #include "dictionary.hh"
 
 template<class V>
-class Dictionary_iter : public Assoc_iter<String, V>
+class Dictionary_iter
 {
+  Dictionary<V> *dict_l_;
+  int i;
 public:
-  Dictionary_iter (Dictionary<V> const &d)
-    : Assoc_iter<String, V> (d)
-  {
-  }
+  Dictionary_iter(Dictionary<V> const &dict)
+    {
+      i =0;
+      dict_l_ =(Dictionary<V> *) & dict;
+      next_used ();
+    }
+
+  bool ok ()
+    {
+      return i < dict_l_->fixed_p_->dict_arr_.size ();
+    }
+
+  void next_used ()
+    {
+      while (ok () && dict_l_->fixed_p_->dict_arr_[i].free_b_)
+       {
+         i ++;
+       }
+    }
+  void operator ++(int)
+    {
+      i++;
+      next_used ();
+    }
+
+  String key ()
+    {
+      return dict_l_->fixed_p_->dict_arr_[i].name_;
+    }
+  V val ()
+    {
+      return dict_l_->fixed_p_->dict_arr_[i].value_;      
+    }
 };
 
 #endif // DICTIONARY_ITER_HH
index b25fc84b49ac106368bb0d94eb288b66a4df993c..55f0e4fedd932edba9f1c4f320319860311b362f 100644 (file)
 #define DICTIONARY_HH
 
 #include "string.hh"
-#include "assoc.hh"
+#include "array.hh"
+
+unsigned long prime_list (int idx);
+template<class V>
+struct Dict_entry
+{
+  String name_;
+  V value_;
+  bool free_b_;
+
+  Dict_entry() {
+    free_b_ = true;
+  }
+  Dict_entry (String s, V v)
+    {
+      name_ = s;
+      value_ = v;
+      free_b_ = false;
+    }
+};
+
+unsigned int hash (String);
 
 /**
-  UGH:  write a String_hash template, 
+   A hash table of prime size.
 
-  SEE:
-  
-       #include <search.h>
+   We use quadratic probing.  
+ */
+template<class V>
+class Fixed_size_dictionary
+{
+public:
+  Array<Dict_entry<V> > dict_arr_; 
+  int size_idx_;
+  Fixed_size_dictionary (int size_idx)
+    {
+      size_idx_ = size_idx;
+      int sz = prime_list(size_idx_);
+      dict_arr_.set_size (sz);
+    }
+
+  /// find #s#, or find first empty entry corresponding to #s#
+  int lookup  (String s)
+    {
+      int sz =dict_arr_.size ();
+      int i = hash (s) % sz;
+      int j = 0;
+      while (j <= sz/2) {
+       if (dict_arr_[i].free_b_)
+         return i;
+           
+       if (dict_arr_[i].name_ == s)
+         return i;
 
-       ENTRY *hsearch(ENTRY item, ACTION action);
+       j++;
+       i = (i + j*j) % sz;
+      }
 
-       int     hcreate (unsigned nel);
+      return -1;
+    }
 
-       void    hdestroy (void);
+  /// remove #s# from the hash table.  
+  V remove (String s)
+    {
+      assert (false);          // Untested routine.
+      int sz =dict_arr_.size ();
+      int i = hash (s) % sz;
+      int j = 0;
+      V retval;
+      while (j <= sz/2 && dict_arr_[i].name_ != s)
+       {
+         assert (!dict_arr_[i].free_b_);
+           
+       
+         j ++;
+         i = (i + j*j) % sz;
+       }
 
-  (should be frobnified to allow multiple hashes)
+      j++;
+      int nexti = (i + j*j) % sz;
+
+      while (j <= sz/2 && !dict_arr_[i].free_b_)
+       {
+         dict_arr_[i] = dict_arr_[nexti];
+         j++;
+         i = nexti;
+         nexti = (nexti + j*j)%sz;
+       }
+      
+    finish:
+      return retval;
+    }
+};
+
+/**
+   Hash table with sliding sizes. 
  */
-template<class T>
-class Dictionary : public Assoc<String, T>
+template<class V>
+class Dictionary
 {
+  Fixed_size_dictionary<V> * fixed_p_;
+
+  /// set size to next prime, and copy contents
+  void enlarge ()
+    {
+      Fixed_size_dictionary<V> *f = new Fixed_size_dictionary<V> (fixed_p_->size_idx_ +1);
+      for (int i=0; i < fixed_p_->dict_arr_.size(); i++)
+       {
+         if (fixed_p_->dict_arr_[i].free_b_)
+           continue;
+
+         String nm (fixed_p_->dict_arr_[i].name_);
+         int nl = f->lookup (nm);
+         
+         f->dict_arr_[nl] = Dict_entry<V> (nm, fixed_p_->dict_arr_[i].value_);
+       }
+      delete fixed_p_;
+      fixed_p_ = f;
+    }
 public:
-  
+  Dictionary ()
+    {
+      fixed_p_ = new Fixed_size_dictionary<V> (0);
+    }
+  ~Dictionary ()
+    {
+      delete fixed_p_;
+    }
+  void operator = (Dictionary<V> const &src)
+    {
+      if (&src == this)
+       return;
+      
+      delete fixed_p_;
+      fixed_p_ = new Fixed_size_dictionary<V> (*src.fixed_p_);
+    }
+  Dictionary (Dictionary<V> const &src)
+    {
+      fixed_p_ = new Fixed_size_dictionary<V> (*src.fixed_p_);
+    }
+  bool elem_b (String s) const
+    {
+      int l =  fixed_p_->lookup (s);
+
+      return (l >= 0 && !fixed_p_->dict_arr_[l].free_b_) ;
+    }
+
+  /**
+     Find and return element.  If #s# is not in the table, create an entry in the table, and init
+   */
+  V& elem (String s)
+    {
+      int l;
+      while ((l= fixed_p_->lookup (s)) <0)
+       {
+         enlarge ();
+       }
+
+      
+       fixed_p_->dict_arr_[l].free_b_ = false;
+       fixed_p_->dict_arr_[l].name_ = s;
+       return fixed_p_->dict_arr_[l].value_;
+    }
+  V& operator [] (String k)
+    {
+      return elem (k);
+    }
+
+  V operator [] (String k) const
+    {
+      return elem (k);
+    }
+
+  V remove (String s)
+    {
+      return fixed_p_->remove (s);      
+    }
+  friend class Dictionary_iter<V>;
 };
 
+
 #endif // DICTIONARY_HH
index c1bc0fd333b3e8ac2e9f5ee5944390a40fd266f1..d28a53c62f9492fbed5052b790879b471cfd9577 100644 (file)
@@ -35,7 +35,5 @@ nobreak = { \penalty = -10000; }
 
 \include "property.ly"
 
-\include "scm.ly"
-
 % music = "\melodic\relative c"
 
index 54c737dd6174f06d100b53ef7609107309d0399d..09df59503861176fb100839bfaf1687a9c9ff225 100644 (file)
@@ -176,12 +176,11 @@ ScoreWithNumbers = \translator {
 
 };
 
-\translator {
+StupidScore = \translator {
        \type "Score_engraver";
-       \name StupidScore;
-
-       \consists "Staff_sym_engraver";
-}
+       \name Score;
+       \consists "Note_heads_engraver";
+};
 
 
 
index 5722c69cc0f222b875bf8f6762a49dcf1b6efa4e..4ab97b920fdd1b5f975e37a11e8859b9cb83da14 100644 (file)
@@ -48,11 +48,6 @@ beamquantisation     2       quantise avoide wedge2) \beampostraditional
 keyoctaviation 0       Key signature only for specified octave \specialkey
 keyoctaviation 1       Key signature for all octaves   \normalkey
 
-keymodality            0       Major key               \major
-keymodality            3       Minor key               \minor
-keymodality            n       modality n half tones from the major key
-
-
 timeSignatureStyle     C       Use C and stroked C for 4/4,2/2
 timeSignatureStyle     old     Use old style mensuration marks
 timeSignatureStyle     1       Use single number
@@ -276,10 +271,3 @@ specialkey = {
        \property Staff.keyoctaviation = 0
 }
 
-major = {
-       \property Staff.keymodality = 0
-}
-
-minor = {
-       \property Staff.keymodality = 3
-}
diff --git a/init/scm.ly b/init/scm.ly
deleted file mode 100644 (file)
index 0c56301..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-\scm "
-
-(define (add-column p) (display \"adding column (in guile): \") (display p) (newline))
-
-(define
-  (control->string c)
-  (string-append
-    (string-append (number->string (car c)) \" \")
-    (string-append (number->string (cadr c)) \" \")))
-
-(define 
-  (dashed-slur-ps thick dash l)
-  (string-append 
-    (apply string-append (map control->string l)) 
-    (number->string thick) 
-   \" [ 0 \" (number->string dash) \" ] 0 draw_dashed_slur\"))
-
-(define 
-  (dashed-slur-tex thick dash l)
-  (string-append 
-    \"\\embedded_ps{\"
-    (dashed-slur-ps thick dash l)
-   \"}\"))
-
-(define 
-  (dashed-slur o thick dash l) 
-  ((eval-string (string-append \"dashed-slur-\" o)) thick dash l))
-
-";
-
index e4bc5c932136d3814a6c3f8d356d817bf934bea2..211c7c1e20b1cf9cb0abf6c3e70437f052a23f7e 100644 (file)
@@ -6,8 +6,8 @@ test key itemv breaking
 \score {
   \notes
   {
-    \key bes; c1 \minor \key c;  c1
+    \key bes; c1 \key c;  c1
     \break
-    \major \key bes; c1 \key d;\break c1
+    \key bes; c1 \key d;\break c1
   }
 }
index 03076b7ef04f2779383bfdb1869f06673dd87359..3908c4cf641ad7fffcdec22a55304d5a64058362 100644 (file)
@@ -1,5 +1,3 @@
-\version "1.0.7";
-
 \property Staff.timeSignatureStyle = "C"
 \time 1/1;
 c''1^"timeSignatureStyle = \"C\"" |
index 3f79970b7154d1ad8f369db4c40ec088a7e7cfd8..76b59197d39219634b934a0f5761588a76705558 100644 (file)
@@ -76,14 +76,12 @@ Atom::Atom ()
     But Atom is used as a simple type *everywhere*,
     and we don't have virtual contructors.
    */
-  lambda_ = 0;
   str_ = global_lookup_l->unknown_str ();
 }
 
 Atom::Atom (String s, Box b)
   :  dim_ (b)
 {
-  lambda_ = 0;
   str_ = s;
 }
 
index 3ed45b2a46eb6390d17a60a4e1bf0f847f0b708d..8812f6245c4e728e5563f31faffcbc0612a9d0ca 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "auto-plet-engraver.hh"
 #include "command-request.hh"
-#include "graphical-lisp-element.hh"
+#include "slur.hh"
 #include "note-column.hh"
 
 bool
@@ -27,11 +27,12 @@ Tuplet_engraver::do_try_request (Request *r)
   return true;
 }
 
+
 void
 Tuplet_engraver::do_process_requests ()
 {
   int stopcount =0;
-  Link_array<Graphical_lisp_element> start_arr;
+  Link_array<Slur> start_arr;
   
   for (int i=0; i < bracket_req_arr_.size (); i++)
     {
@@ -39,17 +40,16 @@ Tuplet_engraver::do_process_requests ()
        stopcount++;
       if (bracket_req_arr_[i]->spantype == Span_req::START)
        {
-         Graphical_lisp_element* glep = new Graphical_lisp_element ("tuplet");
-         start_arr.push  (glep);
-// lots of stuff does info->elem_l_->is_type ()
-//       announce_element (Score_element_info (glep, bracket_req_arr_[i]));
+         Slur *sp =new Slur;
+         start_arr.push  (sp);
+         announce_element (Score_element_info (sp, bracket_req_arr_[i]));
        }
     }
 
   for (; stopcount--; )
     {
-      Graphical_lisp_element* glep = started_span_p_arr_.pop ();
-      stop_now_span_p_arr_.push (glep);
+      Slur *sp = started_span_p_arr_.pop ();
+      stop_now_span_p_arr_.push (sp);
     }
 
   for (int i=0; i < start_arr.size (); i++)
@@ -63,8 +63,7 @@ Tuplet_engraver::acknowledge_element (Score_element_info i)
     {
       Note_column *nc = (Note_column*)i.elem_l_->access_Item ();
       for (int j =0; j  <started_span_p_arr_.size (); j++)
-//     started_span_p_arr_[j]->add_column (nc);
-       started_span_p_arr_[j]->call ("add-column", (void*)nc);
+       started_span_p_arr_[j]->add_column (nc);
     }
 }
 
index 3ecd606e926d24265882f807ab0be7976b215273..ecad05587023cc8ee2a188e9357a5bb31168b3d7 100644 (file)
@@ -26,18 +26,13 @@ Engraver::announce_element (Score_element_info i)
   daddy_grav_l()->announce_element (i);
 }
 
+
 void
 Engraver::typeset_element (Score_element*p)
 {
   daddy_grav_l()->typeset_element (p);
 }
 
-void
-Engraver::typeset_element (Graphical_lisp_element*p)
-{
-  daddy_grav_l ()->typeset_element (p);
-}
-
 Paper_def*
 Engraver::paper() const
 {
diff --git a/lily/graphical-lisp-element.cc b/lily/graphical-lisp-element.cc
deleted file mode 100644 (file)
index 8b9fdef..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-  graphical-lisp-element.cc -- implement Graphical_lisp_element
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#include "graphical-lisp-element.hh"
-#include "string.hh"
-#include "debug.hh"
-
-#undef IMPLEMENT_STATIC_NAME
-#define IMPLEMENT_STATIC_NAME(c)\
-char const* c::static_name ()\
-{ return type_str_.ch_C (); }\
-size_t c::static_class_size () { return sizeof (c); }
-
-IMPLEMENT_IS_TYPE_B (Graphical_lisp_element);
-
-Graphical_lisp_element::Graphical_lisp_element (String str)
-{
-  type_str_ = str;
-}
-
-void*
-Graphical_lisp_element::access (String str)
-{
-  SCM scm;
-//  scm = gh_cons (gh_str02scm (str.ch_C ()));
-//  scm = gh_cons (gh_symbol2scm (str.ch_C ()));
-  return 0;
-}
-
-void
-Graphical_lisp_element::call (String str, void* p)
-{
-//  gh_apply (str.ch_C (), SCM_EOL);
-//  gh_apply (str.ch_C (), SCM_EOL);
-
-// mm, common lisp only?
-//  String ptr = to_str (" \\%x", p);
-  String ptr = to_str (" '%x", p);
-  str = "(" + str + ptr + ")";
-  gh_eval_str (str.ch_l ());
-//  gh_eval_str ("(add-column 0)");
-}
index fcd434f0ab4f3e0226c2a375edf394f80001f17f..0d88e7ce315cbba217a753c552fdc4c15f32e6f1 100644 (file)
@@ -9,18 +9,17 @@
 #ifndef ATOM_HH
 #define ATOM_HH
 
-#include "lily-guile.hh"
 #include "string.hh"
 #include "box.hh"
 #include "lily-proto.hh"
 
+
 /// a symbol which can be translated, and freely copied
 class Atom {
   Offset off_;
 public:
   String str_;
   String font_;
-  SCM lambda_;
   Box dim_;
 
   Offset offset () const;
index 14b1fefcc44c731637cc15015dae3ace065bf973..a8cafb9c7c414d1c558836a6fb28daf4a688608f 100644 (file)
@@ -23,8 +23,8 @@ public:
 protected:
   Link_array<Bracket_req> bracket_req_arr_;
 
-  Link_array<Graphical_lisp_element> started_span_p_arr_;
-  Link_array<Graphical_lisp_element> stop_now_span_p_arr_;
+  Link_array<Slur> started_span_p_arr_;
+  Link_array<Slur> stop_now_span_p_arr_;
 
   virtual void do_removal_processing ();
   virtual void acknowledge_element (Score_element_info);
index 04fc21baa5f1e4314fb566380943e0a61b1fdf9e..a8086af1f556cc3d09b79d9b6bff25830c0e4dd4 100644 (file)
@@ -36,7 +36,6 @@ protected:
     Invoke walker method to typeset element. Default: pass on to daddy.
     */
   virtual void typeset_element (Score_element*elem_p);
-  virtual void typeset_element (Graphical_lisp_element*);
     
   /**
     take note of item/spanner
diff --git a/lily/include/graphical-lisp-element.hh b/lily/include/graphical-lisp-element.hh
deleted file mode 100644 (file)
index 036b727..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  graphical-lisp-element.hh -- declare Graphical_lisp_element
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-
-#ifndef GRAPHICAL_LISP_ELEMENT_HH
-#define GRAPHICAL_LISP_ELEMENT_HH
-
-#include "lily-guile.hh"
-#include "lily-proto.hh"
-#include "string.hh"
-
-#define virtual
-#define static
-#include "virtual-methods.hh"
-
-class Graphical_lisp_element 
-{
-public:
-  DECLARE_MY_RUNTIME_TYPEINFO;
-
-  Graphical_lisp_element (String);
-
-  void* access (String);
-  void call (String, void*);
-
-private:
-  String type_str_;
-};
-
-#undef virtual
-#undef static
-
-#endif // GRAPHICAL_LISP_ELEMENT_HH
-
index 9056db33b8761c2e813d93daba8c79145dd0b1e9..f8e3747b58cba51b4ae719f56dd7751e6980a426 100644 (file)
 
 /// An item which places accidentals at the start of the line
 struct Key_item : Item {
-  Array<int> pitch;
-  Array<int> acc;
-  Array<int> old_pitch;
-  Array<int> old_acc;
+  Array<int> pitch_arr_;
+  Array<int> acc_arr_;
+  Array<int> old_pitch_arr_;
+  Array<int> old_acc_arr_;
+
+  // ugh.  Naming 
   int c_position;
+  // see above.
   int c0_position;
   bool default_b_;
   bool multi_octave_b_;
@@ -30,7 +33,10 @@ struct Key_item : Item {
   void add (const Musical_pitch&);
   void add_old (int pitch, int acc);
   void add_old (const Musical_pitch&);
-  void read (const Key_engraver&);
+  void set (bool multi_octave_b,
+           Array<Musical_pitch> const &idx_arr,
+           Array<Musical_pitch> const &old_idx_arr);
+
   void set_c_position (int);
   int Key_item::calculate_position(int p, int a) const;
 
index 845a2a1f87d4912c2a6d5c1976624291350901c8..1ea707038e2bb00c1e42cabce794287d8e1992c2 100644 (file)
 
 #include "config.hh"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #ifdef HAVE_LIBGUILE
 extern "C" { 
 #include <guile/gh.h> 
@@ -22,17 +18,4 @@ extern "C" {
 #else
 typedef long SCM;
 #endif
-
-SCM gh_append (SCM a, SCM b);
-SCM gh_eval (SCM a);
-SCM gh_func_o (char const* name);
-SCM gh_lambda_o ();
-SCM gh_list1 (SCM a);
-SCM gh_list2(SCM a, SCM b);
-SCM gh_quote ();
-
-#ifdef __cplusplus
-}
-#endif
-
 #endif // LILY_GUILE_HH
index 184eec14c0f3f928978279667f83b918551c19bd..b7af83ec1620ba502e2518e234f8b0dfa390ec75 100644 (file)
@@ -77,7 +77,6 @@ struct Element_group_item;
 struct Engraver_group_engraver;
 struct General_script_def;
 struct Graphical_element;
-struct Graphical_lisp_element;
 struct Graphical_axis_group;
 struct Mark_req;
 struct Music_output;
index d08ca2b4905faed98be685b7addff73b924e9d00..7da65e532f7e2467bd2d8ffbde629b87b475e9c4 100644 (file)
 class Local_key_item : public Item {
 public:
     DECLARE_MY_RUNTIME_TYPEINFO;
-    Array<Musical_pitch> accs;
+    Array<Musical_pitch> accidental_pitch_arr_;
     Link_array<Item> support_items_;
     int c0_position_i_;
-    
     Local_key_item ();
     void add_support (Item*);
     void add (Musical_pitch);
index ab761ac955940f58a89986db84edc735d0e0efe7..7efe60bb7e5c03fa4d4d06e7a2c32455c0a887ba 100644 (file)
@@ -31,8 +31,8 @@ public:
   
   Atom accidental (int) const;
   void add (String, Symtable*);
-  virtual Atom afm_find (String s, bool warn=true) const = 0;
-  Atom afm_find (String, String, bool warn=true) const;
+  virtual Atom afm_find (String s) const = 0;
+  Atom afm_find (String, String) const;
   virtual Atom* atom_p (String, int, Box) const = 0;
   Atom ball (int) const;
   Atom bar (String, Real height) const;
@@ -40,7 +40,7 @@ public:
   Atom beam (Real,Real, Real) const;
   virtual String character_str (int i) const;
   Atom clef (String) const;
-  virtual Atom dashed_slur (Array<Offset> controls, Real thick, Real dash) const;
+  virtual Atom dashed_slur (Array<Offset> controls, Real thick, Real dash) const = 0;
   Atom dots () const;
   Atom dynamic (String) const;
   Atom fill (Box b) const;
index e03a3e86463a06045473b00ae83de5feef526801..2f3c3f599c57f2f6ca630fc0df26fb60b30adb7c 100644 (file)
@@ -129,8 +129,6 @@ public:
     
   /// force/supress printing of accidental.
   bool forceacc_b_;
-  /// Cautionary, i.e. parenthesized accidental.
-  bool cautionary_b_;
   Note_req();
   bool do_equal_b (Request*) const;
   Rhythmic_req* access_Rhythmic_req () { return Rhythmic_req::access_Rhythmic_req (); }
index 7338f05bf16007df3846c7660020aba929713789..1d0fcf687e7fc36d99e25be465cf281c4528f907 100644 (file)
@@ -16,7 +16,7 @@
 #include "dictionary.hh"
 #include "musical-pitch.hh"
 
-class Notename_table :   public Dictionary< Musical_pitch >{
+class Notename_table :   public Dictionary<Musical_pitch>{
 public:
   String get_name (Musical_pitch) const;
 };
index 0c6ff778dfce363f0c7079b6bc14c90fedd798e6..5fa1204b2f5c18088a1d896bb4f0c267f597c36c 100644 (file)
@@ -24,7 +24,7 @@ public:
   virtual ~Paper_outputter ();
 
   virtual void output_molecule (Molecule const *, Offset, char const *)=0;
-  void output_molecule (Molecule const *, Offset, char const *, String, String);
+  void output_molecule (Molecule const *, Offset, char const *, String);
   virtual void start_line ()=0;
   virtual void stop_line ()=0;
   virtual void switch_to_font (String fontname)=0;
index 99a14a9fa0aaa52414c7ab4d6ea0b000edf8724a..2eb9ed025a934d6b8a8e58ffcac6ceaf3a6fad84 100644 (file)
@@ -19,9 +19,10 @@ public:
   Ps_lookup (Symtables const& s);
   virtual ~Ps_lookup ();
 
-  virtual Atom afm_find (String s, bool warn=false) const;
+  virtual Atom afm_find (String s) const;
   virtual Atom* atom_p (String, int, Box) const;
   virtual String character_str (int i) const;
+  virtual Atom dashed_slur (Array<Offset> controls, Real thick, Real dash) const;
   virtual Atom hairpin (Real width, bool decresc, bool continued) const;
   virtual Lookup* lookup_p (Lookup const&) const;
   virtual Lookup* lookup_p (Symtables const&) const;
diff --git a/lily/include/ps-lookup.hh.orig b/lily/include/ps-lookup.hh.orig
deleted file mode 100644 (file)
index 0b6481b..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  tex-lookup.hh -- declare Tex_lookup
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1998 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#ifndef PS_LOOKUP_HH
-#define PS_LOOKUP_HH
-
-#include "lookup.hh"
-
-class Ps_lookup : public Lookup
-{
-public:
-  Ps_lookup ();
-  Ps_lookup (Lookup const& s);
-  Ps_lookup (Symtables const& s);
-  virtual ~Ps_lookup ();
-
-  virtual Atom afm_find (String s) const;
-  virtual Atom* atom_p (String, int, Box) const;
-  virtual String character_str (int i) const;
-  virtual Atom hairpin (Real width, bool decresc, bool continued) const;
-  virtual Lookup* lookup_p (Lookup const&) const;
-  virtual Lookup* lookup_p (Symtables const&) const;
-  virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Scope*, String) const;
-  virtual Paper_stream* paper_stream_p () const;
-  virtual Atom plet (Real dy , Real dx, Direction dir) const;
-  virtual Atom ps_beam (Real slope, Real width, Real thick) const;
-  virtual Atom slur (Array<Offset> controls) const;
-  virtual Atom stem (Real y1, Real y2) const;
-  virtual Atom text (String style, String text) const;
-  virtual String unknown_str () const;
-  virtual Atom vbracket (Real &y) const;
-};
-
-#endif // PS_LOOKUP_HH
index 34a5a497168ef1b3cdf5f9dc1fce859cdc9c0fd1..95d69a0d484a2929bdbb6433e15a95a83ad44b92 100644 (file)
   */
 struct Score_element_info {
     Score_element * elem_l_;
-    Graphical_lisp_element * lisp_l_;
     Request*req_l_;
     Array<Engraver*> origin_grav_l_arr_;
 
     Score_element_info (Score_element*, Request*);
-    Score_element_info (Graphical_lisp_element*, Request*);
     Score_element_info();
 };
 
index 2f7883bb418c58102f28504e86331062233c3505..5d59fc06f7d1c399984f88b8c7a105d7a7469f6e 100644 (file)
@@ -53,7 +53,6 @@ protected:
   virtual void announce_element (Score_element_info);
   virtual void do_announces();
   virtual void typeset_element (Score_element*elem_p);
-  virtual void typeset_element (Graphical_lisp_element*elem_p);
   virtual void do_pre_move_processing();
   virtual void do_add_processing ();
 };
index 75c21d07f2ad696705e51d2ec99c730eb0dbf14e..8665ee6e8dc8359f879b6aa3b883610adb370ba8 100644 (file)
@@ -15,7 +15,6 @@ class Slur_engraver :public Engraver {
   Array<Slur_req*> new_slur_req_l_arr_;
   Array<Slur *> slur_l_stack_;
   Array<Slur*> end_slur_l_arr_;
-  Direction dir_;
 
 protected:
   virtual bool do_try_request (Request*);
@@ -27,7 +26,6 @@ protected:
 
 public:
   TRANSLATOR_CLONE(Slur_engraver);
-  Slur_engraver();
   DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
index 5f812088aff978b24c202bb890de6189d7c755e1..cdb9839fcc5f3c685b0b4648be8a2e42e0892816 100644 (file)
@@ -20,8 +20,9 @@ public:
   Tex_lookup (Symtables const& s);
   virtual ~Tex_lookup();
 
-  virtual Atom afm_find (String s, bool warn=false) const;
+  virtual Atom afm_find (String s) const;
   virtual String character_str (int i) const;
+  virtual Atom dashed_slur (Array<Offset> controls, Real thick, Real dash) const;
   virtual Atom* atom_p (String, int, Box) const;
   Atom embed (Atom a) const;
   virtual Atom hairpin (Real width, bool decresc, bool continued) const;
diff --git a/lily/include/tex-lookup.hh.orig b/lily/include/tex-lookup.hh.orig
deleted file mode 100644 (file)
index 2341c44..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-  tex-lookup.hh -- declare Tex_lookup
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#ifndef TEX_LOOKUP_HH
-#define TEX_LOOKUP_HH
-
-#include "ps-lookup.hh"
-
-class Tex_lookup : public Ps_lookup
-{
-public:
-  Tex_lookup ();
-  Tex_lookup (Lookup const& s);
-  Tex_lookup (Symtables const& s);
-  virtual ~Tex_lookup();
-
-  virtual Atom afm_find (String s) const;
-  virtual String character_str (int i) const;
-  virtual Atom* atom_p (String, int, Box) const;
-  Atom embed (Atom a) const;
-  virtual Atom hairpin (Real width, bool decresc, bool continued) const;
-  virtual Lookup* lookup_p (Lookup const&) const;
-  virtual Lookup* lookup_p (Symtables const&) const;
-  virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Scope*, String) const;
-  virtual Paper_stream* paper_stream_p () const;
-  virtual Atom plet (Real dy , Real dx, Direction dir) const;
-  virtual String print_dimen (Real) const;
-  virtual Atom ps_beam (Real slope, Real width, Real thick) const;
-  virtual Atom slur (Array<Offset> controls) const;
-  virtual Atom stem (Real y1, Real y2) const;
-  virtual Atom text (String style, String text) const;
-  virtual String unknown_str () const;
-  virtual Atom vbracket (Real &y) const;
-};
-
-#endif // TEX_LOOKUP_HH
index e06bb1d63d5454c48745c3954f93c7480fe0d903..83fd6ec6db5be709db24f5d19f11ae33790ec7c6 100644 (file)
@@ -29,7 +29,7 @@ Key_engraver::create_key ()
       kit_p_ = new Key_item;
       kit_p_->break_priority_i_ = -1; // ugh
       announce_element (Score_element_info (kit_p_,keyreq_l_));
-      kit_p_->read (*this);
+      kit_p_->set (key_.multi_octave_b_, accidental_idx_arr_, old_accidental_idx_arr_);
     }
 }
 
@@ -95,7 +95,6 @@ Key_engraver::do_pre_move_processing ()
 void
 Key_engraver::read_req (Key_change_req const * r)
 {
-  int modality=0;
   old_accidental_idx_arr_ = accidental_idx_arr_;
   key_.clear ();
   Scalar prop = get_property ("keyoctaviation");
@@ -103,11 +102,6 @@ Key_engraver::read_req (Key_change_req const * r)
     {
       key_.multi_octave_b_ = ! prop.to_bool ();
     }
-  prop = get_property ("keymodality");
-  if (prop.isnum_b ())
-    {
-      modality=(int)prop;
-    }
   
   accidental_idx_arr_.clear ();
 
@@ -122,7 +116,8 @@ Key_engraver::read_req (Key_change_req const * r)
       else
        {
          p = r->pitch_arr_[0].semitone_pitch ();
-         p += modality;
+         if (r->minor_b ())
+           p += 3;
        }
       /* Solve the equation 7*no_of_acc mod 12 = p, -6 <= no_of_acc <= 5 */
       int no_of_acc = (7*p) % 12;
index 58a91cac61d2245c34b2f627fcf34ce757d611f3..80e470f10fd734e9d2416d948a359b8e70223920 100644 (file)
@@ -14,8 +14,7 @@
 #include "molecule.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
-
-#include "key-engraver.hh"
+#include "musical-pitch.hh"
 
 const int FLAT_TOP_PITCH=2; /* fes,ges,as and bes typeset in lower octave */
 const int SHARP_TOP_PITCH=4; /*  ais and bis typeset in lower octave */
@@ -28,19 +27,21 @@ Key_item::Key_item ()
 }
 
 void
-Key_item::read (Key_engraver const & key_grav_r)
+Key_item::set (bool multi_octave_b,
+              Array<Musical_pitch> const &idx_arr,
+              Array<Musical_pitch> const &old_idx_arr)
 {
-  multi_octave_b_ = key_grav_r.key_.multi_octave_b_;
-  const Array<Musical_pitch> &idx_arr = key_grav_r.accidental_idx_arr_; 
+  multi_octave_b_ =multi_octave_b;
+
   for (int i = 0; i < idx_arr.size(); i++) 
     {
       Musical_pitch m_l =idx_arr[i];
       if (multi_octave_b_)
-        add (m_l);
+       add (m_l);
       else
        add (m_l.notename_i_, m_l.accidental_i_);
     }
-  const Array<Musical_pitch> &old_idx_arr = key_grav_r.old_accidental_idx_arr_; 
+
   for (int i = 0 ; i< old_idx_arr.size(); i++) 
     {
       Musical_pitch m_l =old_idx_arr[i];
@@ -66,29 +67,29 @@ Key_item::set_c_position (int c0)
 void
 Key_item::add (int p, int a)
 {
-  pitch.push (p);
-  acc.push (a);
+  pitch_arr_.push (p);
+  acc_arr_.push (a);
 }
 
 void
 Key_item::add (const Musical_pitch& pitch_r)
 {
-  pitch.push (pitch_r.steps());
-  acc.push (pitch_r.accidental_i_);
+  pitch_arr_.push (pitch_r.steps());
+  acc_arr_.push (pitch_r.accidental_i_);
 }
 
 void
 Key_item::add_old (int p, int a)
 {
-  old_pitch.push (p);
-  old_acc.push (a);
+  old_pitch_arr_.push (p);
+  old_acc_arr_.push (a);
 }
 
 void
 Key_item::add_old (const Musical_pitch& pitch_r)
 {
-  old_pitch.push (pitch_r.steps());
-  old_acc.push (pitch_r.accidental_i_);
+  old_pitch_arr_.push (pitch_r.steps());
+  old_acc_arr_.push (pitch_r.accidental_i_);
 }
 
 int
@@ -120,18 +121,20 @@ Key_item::brew_molecule_p() const
   
   int j;
   if ((break_status_dir_ == LEFT || break_status_dir_ == CENTER)
-      || old_pitch.size ())
+      || old_pitch_arr_.size ())
     {
-      for (int i =0; i < old_pitch.size(); i++) 
+      for (int i =0; i < old_pitch_arr_.size(); i++) 
         {
-          for (j =0; (j < pitch.size()) && (old_pitch[i] != pitch[j]); j++) 
+          for (j =0; (j < pitch_arr_.size())
+                && (old_pitch_arr_[i] != pitch_arr_[j]); j++) 
            ;
          
-          if (j == pitch.size()
-             || (old_pitch[i] == pitch[j] && old_acc[i] != acc[j]))
+          if (j == pitch_arr_.size()
+             || (old_pitch_arr_[i] == pitch_arr_[j]
+                 && old_acc_arr_[i] != acc_arr_[j]))
             {
               Atom a =lookup_l ()->accidental (0);
-              a.translate_axis (calculate_position(old_pitch[i], old_acc[i]) * inter, Y_AXIS);
+              a.translate_axis (calculate_position(old_pitch_arr_[i], old_acc_arr_[i]) * inter, Y_AXIS);
               Molecule m (a);
               output->add_at_edge (X_AXIS, RIGHT, m);  
             }
@@ -148,14 +151,14 @@ Key_item::brew_molecule_p() const
       output->add_at_edge (X_AXIS, RIGHT, lookup_l()->fill (Box(x,y)));
     }
  
-  for (int i =0; i < pitch.size(); i++) 
+  for (int i =0; i < pitch_arr_.size(); i++) 
     {
-      Atom a =lookup_l ()->accidental (acc[i]);
-      a.translate_axis (calculate_position(pitch[i], acc[i]) * inter, Y_AXIS);
+      Atom a =lookup_l ()->accidental (acc_arr_[i]);
+      a.translate_axis (calculate_position(pitch_arr_[i], acc_arr_[i]) * inter, Y_AXIS);
       Molecule m (a);
       output->add_at_edge (X_AXIS, RIGHT, m);  
     }
-  if (pitch.size()) 
+  if (pitch_arr_.size()) 
     {
       Molecule m (lookup_l ()->fill (Box (
                                          Interval (0, paper()->note_width ()),
diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc
deleted file mode 100644 (file)
index a5c47bd..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-  lily-guile.cc -- implement assorted guile functions
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#include "lily-guile.hh"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-SCM
-gh_append (SCM a, SCM b)
-{
-  return gh_call2 (gh_eval_str ("append"), a, b);
-}
-
-SCM
-gh_list1 (SCM a)
-{
-  return gh_call1 (gh_eval_str ("list"), a);
-}
-
-SCM
-gh_list2(SCM a, SCM b)
-{
-  return gh_call2 (gh_eval_str ("list"), a, b);
-}
-
-SCM
-gh_quote ()
-{
-  return gh_eval_str ("'quote");
-}
-
-SCM
-gh_eval (SCM a)
-{
-  return gh_call1 (gh_eval_str ("eval"), a);
-}
-
-SCM
-gh_lambda_o ()
-{
-  return gh_eval_str ("'(lambda (o))");
-}
-
-SCM
-gh_func_o (char const* name)
-{
-  char buf[200];
-  snprintf (buf, 200, "'(%s o)", name);
-  return gh_eval_str (buf);
-}
-
-#ifdef __cplusplus
-}
-#endif
index a74b27d79e1736a39a5bc5caf5cb6138220cb69d..c6a3a0718946faf0113bf6daa1869bd7fa7f19ee 100644 (file)
@@ -67,12 +67,6 @@ Local_key_engraver::process_acknowledged ()
              key_item_p_ = new Local_key_item;
              announce_element (Score_element_info (key_item_p_, 0));         
            }
-         ///////// TODO: Handle cautionary accidentals
-         if (note_l->cautionary_b_)
-           {
-             warning (_("cautionary accidentals are not yet supported"));
-           }
-
          key_item_p_->add (note_l->pitch_);
          key_item_p_->add_support (support_l);
          local_key_.set (note_l->pitch_);
index 564b66ea9a9d131f97bcb48d6d8c6cb0edba0dd0..2b2d0dd5db1660f3790c532679ad7451275355eb 100644 (file)
@@ -16,7 +16,7 @@
 
 Local_key_item::Local_key_item ()
 {
-  c0_position_i_  = 0;
+  c0_position_i_ = 0;
 }
 
 void
@@ -31,17 +31,17 @@ Local_key_item::add_support (Item*head_l)
 void
 Local_key_item::add (Musical_pitch p)
 {
-  for (int i=0; i< accs.size(); i++)
-    if (!Musical_pitch::compare (p, accs[i]))
+  for (int i=0; i< accidental_pitch_arr_.size(); i++)
+    if (!Musical_pitch::compare (p, accidental_pitch_arr_[i]))
       return;
   
-  accs.push (p);
+  accidental_pitch_arr_.push (p);
 }
 
 void
 Local_key_item::do_pre_processing()
 {
-  accs.sort (Musical_pitch::compare);
+  accidental_pitch_arr_.sort (Musical_pitch::compare);
 }
 
 Molecule*
@@ -51,10 +51,10 @@ Local_key_item::brew_molecule_p() const
 
   Molecule *octave_mol_p = 0;
   int lastoct = -100;
-  for  (int i = 0; i <  accs.size(); i++) 
+  for  (int i = 0; i <  accidental_pitch_arr_.size(); i++) 
     {
       // do one octave
-      if (accs[i].octave_i_ != lastoct) 
+      if (accidental_pitch_arr_[i].octave_i_ != lastoct) 
        {
          if (octave_mol_p)
            {
@@ -65,9 +65,12 @@ Local_key_item::brew_molecule_p() const
            }
          octave_mol_p= new Molecule;
        }
-      lastoct = accs[i].octave_i_;
-      Real dy = (accs[i].notename_i_ + c0_position_i_) * paper()->internote_f ();
-      Atom a (lookup_l ()->accidental (accs[i].accidental_i_));
+      
+      lastoct = accidental_pitch_arr_[i].octave_i_;
+      Real dy =
+       (c0_position_i_ + accidental_pitch_arr_[i].notename_i_)
+       * paper()->internote_f ();
+      Atom a (lookup_l ()->accidental (accidental_pitch_arr_[i].accidental_i_));
 
       a.translate_axis (dy, Y_AXIS);
       Molecule m(a);
@@ -82,7 +85,7 @@ Local_key_item::brew_molecule_p() const
       delete octave_mol_p;
     }
   
- if (accs.size()) 
+ if (accidental_pitch_arr_.size()) 
     {
       Box b(Interval (0, paper()->internote_f ()), Interval (0,0));
       Molecule m (lookup_l ()->fill (b));
index 07e7e63ca4ddeb5578e2cb1e30f83d78514a5b9e..8ba88483f5f080c3bf4fdf17d0a2274863318bf8 100644 (file)
@@ -20,7 +20,6 @@
 #include "paper-def.hh"
 #include "string-convert.hh"
 #include "main.hh"
-#include "lily-guile.hh"
 
 Lookup::Lookup ()
 {
@@ -66,7 +65,7 @@ Lookup::add (String s, Symtable*p)
 }
 
 Atom
-Lookup::afm_find (String s, String str, bool warn) const
+Lookup::afm_find (String s, String str) const
 {
   if (!afm_p_)
     {
@@ -75,7 +74,7 @@ Lookup::afm_find (String s, String str, bool warn) const
       *mlog << "]" << flush ;
       DOUT << this->afm_p_->str ();
     }
-  Adobe_font_char_metric m = afm_p_->find_char (s, warn);
+  Adobe_font_char_metric m = afm_p_->find_char (s);
 
   Atom a;
   if (m.code () < 0)
@@ -151,58 +150,6 @@ Lookup::clef (String st) const
   return afm_find (String ("clefs") + String ("-") + st);
 }
 
-Atom
-Lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
-{
-  assert (controls.size () == 8);
-
-  Real dx = controls[3].x () - controls[0].x ();
-  Real dy = controls[3].y () - controls[0].y ();
-
-  Atom a;
-  a.font_ = font_;
-  a.dim_[X_AXIS] = Interval (0, dx);
-  a.dim_[Y_AXIS] = Interval (0 <? dy,  0 >? dy);
-
-#ifndef HAVE_LIBGUILE
-
-  String ps;
-  for (int i = 1; i < 4; i++)
-    ps += String_convert::double_str (controls[i].x ()) + " "
-      + String_convert::double_str (controls[i].y ()) + " ";
-
-  ps += String_convert::double_str (controls[0].x ()) + " "
-    + String_convert::double_str (controls[0].y ()) + " ";
-
-  ps += String_convert::double_str (thick) + " ";
-  Real on = dash > 1? thick * dash - thick : 0;
-  Real off = 2 * thick;
-  ps += "[" + String_convert::double_str (on) + " ";
-  ps += String_convert::double_str (off) + "] ";
-  ps += String_convert::int_str (0) + " ";
-  ps += "draw_dashed_slur ";
-
-  a.str_ = ps;
-
-#else // HAVE_LIBGUILE
-
-  // (lambda (o) (dashed-slur o '((0.1 0.2) (1.1 1.2) (2.1 2.2) (3.1 3.2))))
-  a.lambda_ = 
-    gh_append (gh_lambda_o (), 
-    gh_list1 (gh_append (gh_func_o ("dashed-slur"),
-    gh_cons (gh_double2scm (thick), gh_cons (gh_double2scm (dash),
-    gh_list1 (gh_list2 (gh_quote (),
-    gh_cons (gh_list2 (gh_double2scm (controls[0].x ()), gh_double2scm (controls[0].y ())),
-    gh_cons (gh_list2 (gh_double2scm (controls[1].x ()), gh_double2scm (controls[1].y ())),
-    gh_cons (gh_list2 (gh_double2scm (controls[2].x ()), gh_double2scm (controls[2].y ())),
-    gh_cons (gh_list2 (gh_double2scm (controls[3].x ()), gh_double2scm (controls[3].y ())),
-    SCM_EOL)))))))))));
-
-#endif // HAVE_LIBGUILE
-
-  return a;
-}
-
 Atom
 Lookup::dots () const
 {
@@ -282,11 +229,11 @@ Atom
 Lookup::special_time_signature (String s, Array<Scalar> arr) const
 {
   String symbolname = "timesig-"+s+"%/%";
-  Atom a (afm_find (substitute_args (symbolname, arr), false));
+  Atom a (afm_find (substitute_args (symbolname, arr)));
   if (!a.empty ()) 
     return a;
   // Try if the full name was given
-  a = afm_find ("timesig-"+s, false);
+  a = afm_find ("timesig-"+s);
   if (!a.empty ()) 
     return a;
   // Resort to default layout with numbers
diff --git a/lily/lookup.cc.orig b/lily/lookup.cc.orig
deleted file mode 100644 (file)
index 7f67472..0000000
+++ /dev/null
@@ -1,422 +0,0 @@
-/*
-  lookup.cc -- implement simple Lookup methods.
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
-  Jan Nieuwenhuizen <janneke@gnu.org>
-
-  TODO
-      Read spacing info from AFMs
-      Glissando
-*/
-
-#include "lookup.hh"
-#include "debug.hh"
-#include "dimensions.hh"
-#include "symtable.hh"
-#include "scalar.hh"
-#include "paper-def.hh"
-#include "string-convert.hh"
-#include "main.hh"
-#include "lily-guile.hh"
-
-Lookup::Lookup ()
-{
-  paper_l_ = 0;
-  symtables_p_ = new Symtables;
-  afm_p_ =0;
-}
-
-Lookup::Lookup (Lookup const& s)
-{
-  font_ = s.font_;
-  font_path_ = s.font_path_;
-  paper_l_ = s.paper_l_;
-  symtables_p_ = new Symtables (*s.symtables_p_);
-  afm_p_ = 0;
-}
-
-Lookup::Lookup (Symtables const& s)
-{
-  font_ = s.font_;
-  font_path_ = s.font_path_;
-  paper_l_ = 0;
-  symtables_p_ = new Symtables (s);
-  afm_p_ = 0;
-}
-
-Lookup::~Lookup ()
-{
-  delete afm_p_;
-  delete symtables_p_;
-}
-
-Atom
-Lookup::accidental (int j) const
-{
-  return afm_find (String ("accidentals") + String ("-") + to_str (j));
-}
-
-void
-Lookup::add (String s, Symtable*p)
-{
-  symtables_p_->add (s, p);
-}
-
-Atom
-Lookup::afm_find (String s, String str) const
-{
-  if (!afm_p_)
-    {
-      *mlog << "[" << font_path_;
-      ( (Lookup*)this)->afm_p_ = new Adobe_font_metric (read_afm (font_path_));
-      *mlog << "]" << flush ;
-      DOUT << this->afm_p_->str ();
-    }
-  Adobe_font_char_metric m = afm_p_->find_char (s);
-
-  Atom a;
-  if (m.code () < 0)
-    return a;
-  
-  a.dim_ = m.B_;
-  a.dim_[X_AXIS] *= 1 / 1000.0;
-  a.dim_[Y_AXIS] *= 1 / 1000.0;
-  a.str_ = String_convert::form_str (str.ch_C (), m.code ());
-  a.font_ = font_;
-  return a;
-}
-
-Atom
-Lookup::ball (int j) const
-{
-  if (j > 2)
-    j = 2;
-
-  return afm_find (String ("balls") + String ("-") + to_str (j));
-}
-
-Atom
-Lookup::bar (String str, Real h) const
-{
-  Array<String> a;
-  a.push (print_dimen (h));
-  Atom s = (*symtables_p_) ("bars")->lookup (str);
-  s.str_ = substitute_args (s.str_, a);
-  s.dim_.y () = Interval (-h/2, h/2);
-  s.font_ = font_;
-  return s;
-}
-
-String
-Lookup::base_output_str () const
-{
-  assert (paper_l_);
-  String str = paper_l_->get_default_output ();
-
-  if (str.empty_b ())
-    {
-      str = default_outname_base_global;
-      int def = paper_l_->get_next_default_count ();
-      if (def)
-       str += "-" + to_str (def);
-    }
-  return str;
-}
-
-Atom 
-Lookup::beam (Real slope, Real width, Real thick) const
-{
-  Atom a (ps_beam (slope, width, thick));
-  Real height = slope * width; 
-  Real min_y = (0 <? height) - thick/2;
-  Real max_y = (0 >? height) + thick/2;
-  
-  a.dim_[X_AXIS] = Interval (0, width);
-  a.dim_[Y_AXIS] = Interval (min_y, max_y);
-  return a;
-}
-
-String
-Lookup::character_str (int i) const
-{
-  return to_str (i);
-}
-
-Atom
-Lookup::clef (String st) const
-{
-  return afm_find (String ("clefs") + String ("-") + st);
-}
-
-Atom
-Lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
-{
-  assert (controls.size () == 8);
-
-  Real dx = controls[3].x () - controls[0].x ();
-  Real dy = controls[3].y () - controls[0].y ();
-
-  Atom a;
-  a.font_ = font_;
-  a.dim_[X_AXIS] = Interval (0, dx);
-  a.dim_[Y_AXIS] = Interval (0 <? dy,  0 >? dy);
-
-#ifndef HAVE_LIBGUILE
-
-  String ps;
-  for (int i = 1; i < 4; i++)
-    ps += String_convert::double_str (controls[i].x ()) + " "
-      + String_convert::double_str (controls[i].y ()) + " ";
-
-  ps += String_convert::double_str (controls[0].x ()) + " "
-    + String_convert::double_str (controls[0].y ()) + " ";
-
-  ps += String_convert::double_str (thick) + " ";
-  Real on = dash > 1? thick * dash - thick : 0;
-  Real off = 2 * thick;
-  ps += "[" + String_convert::double_str (on) + " ";
-  ps += String_convert::double_str (off) + "] ";
-  ps += String_convert::int_str (0) + " ";
-  ps += "draw_dashed_slur ";
-
-  a.str_ = ps;
-
-#else // HAVE_LIBGUILE
-
-  // (lambda (o) (dashed-slur o '((0.1 0.2) (1.1 1.2) (2.1 2.2) (3.1 3.2))))
-  a.lambda_ = 
-    gh_append (gh_lambda_o (), 
-    gh_list1 (gh_append (gh_func_o ("dashed-slur"),
-    gh_cons (gh_double2scm (thick), gh_cons (gh_double2scm (dash),
-    gh_list1 (gh_list2 (gh_quote (),
-    gh_cons (gh_list2 (gh_double2scm (controls[0].x ()), gh_double2scm (controls[0].y ())),
-    gh_cons (gh_list2 (gh_double2scm (controls[1].x ()), gh_double2scm (controls[1].y ())),
-    gh_cons (gh_list2 (gh_double2scm (controls[2].x ()), gh_double2scm (controls[2].y ())),
-    gh_cons (gh_list2 (gh_double2scm (controls[3].x ()), gh_double2scm (controls[3].y ())),
-    SCM_EOL)))))))))));
-
-#endif // HAVE_LIBGUILE
-
-  return a;
-}
-
-Atom
-Lookup::dots () const
-{
-  return afm_find (String ("dots") + String ("-") + String ("dot"));
-}
-
-Atom
-Lookup::dynamic (String st) const
-{
-  return (*symtables_p_) ("dynamics")->lookup (st);
-}
-
-Atom
-Lookup::fill (Box b) const
-{
-  Atom a;
-  a.dim_ = b;
-  return a;
-}
-
-Atom
-Lookup::flag (int j, Direction d) const
-{
-  char c = (d == UP) ? 'u' : 'd';
-  return afm_find (String ("flags") + String ("-") + to_str (c) + to_str (j));
-}
-
-void
-Lookup::print () const
-{
-#ifndef NPRINT
-  DOUT << "Lookup {\n";
-  symtables_p_->print ();
-  DOUT << "}\n";
-#endif
-}
-
-String
-Lookup::print_dimen (Real r) const
-{
-  String s = to_str (r, "%.3f");
-  if (s.index_i ("NaN") != -1)
-    {
-      warning (_ ("NaN"));
-      s = "0.0";
-    }
-  return s;
-}
-
-Atom
-Lookup::rest (int j, bool o) const
-{
-   return afm_find (String ("rests")
-                   + String ("-") + to_str (j) + (o ? "o" : ""));
-}
-
-Atom
-Lookup::rule_symbol (Real height, Real width) const
-{
-  Atom bs= (*symtables_p_) ("param")->lookup ("rule");
-  Array<String> args;
-  args.push (print_dimen (height));
-  args.push (print_dimen (width));
-  bs.str_ = substitute_args (bs.str_, args);
-  bs.dim_.x () = Interval (0, width);
-  bs.dim_.y () = Interval (0, height);
-  return bs;
-}
-
-Atom
-Lookup::script (String str) const
-{
-  return afm_find (String ("scripts") + String ("-") + str);
-}
-
-Atom
-Lookup::special_time_signature (String s, Array<Scalar> arr) const
-{
-  String symbolname = "timesig-"+s+"%/%";
-  Atom a (afm_find (substitute_args (symbolname, arr)));
-  if (!a.empty ()) 
-    return a;
-  // Try if the full name was given
-  a = afm_find ("timesig-"+s);
-  if (!a.empty ()) 
-    return a;
-  // Resort to default layout with numbers
-  return time_signature (arr);
-}
-
-static void
-substitute_arg (String& r, String arg)
-{
-  int p = r.index_i ('%');
-  if (p < 0)
-       return ;
-
-  r = r.left_str (p) + arg + r.right_str (r.length_i () - p - 1);
-}
-
-String
-Lookup::substitute_args (String source, Array<String> args) const
-{
-  String str (source);
-  for (int i = 0 ; i < args.size (); i++)
-    substitute_arg (str, args[i]);
-  return str;
-}
-
-String
-Lookup::substitute_args (String source, Array<Scalar> args) const
-{
-  Array<String> sv;
-  for (int i = 0 ; i < args.size (); i++)
-    sv.push (args[i]);
-  return substitute_args (source, sv);
-}
-
-Atom
-Lookup::stem (Real y1, Real y2, String str) const
-{
-  if (y1 > y2)
-    {
-      Real t = y1;
-      y1 = y2;
-      y2 = t;
-    }
-  Atom s;
-
-  s.dim_.x () = Interval (0,0);
-  s.dim_.y () = Interval (y1,y2);
-
-  Array<String> a;
-
-  Real stem_width = paper_l_->get_var ("stemthickness");
-  a.push (print_dimen (-stem_width /2));
-  a.push (print_dimen (stem_width));
-  a.push (print_dimen (y2));
-  a.push (print_dimen (-y1));
-
-  s.str_ = substitute_args (str, a);
-  s.font_ = font_;
-  return s;
-}
-
-Atom
-Lookup::streepje (int type) const
-{
-  if (type > 2)
-    type = 2;
-
-  return  afm_find ("balls" + String ("-") +to_str (type) + "l");
-}
-
-Atom
-Lookup::text (String style, String text) const
-{
-  Array<String> a;
-
-  a.push (text);
-  Atom s =  (*symtables_p_) ("style")->lookup (style);
-  s.str_ = substitute_args (s.str_,a);
-  s.font_ = font_;
-
-  return s;
-}
-
-Atom
-Lookup::time_signature (Array<Scalar> a) const
-{
-  Atom s ((*symtables_p_) ("param")->lookup ("time_signature"));
-  s.str_ = substitute_args (s.str_, a);
-
-  return s;
-}
-
-/*
-  should be handled via Tex_ code and Lookup::bar ()
- */
-Atom
-Lookup::vbrace (Real &y) const
-{
-  Atom brace = (*symtables_p_) ("param")->lookup ( "brace");
-  Interval ydims = brace.dim_[Y_AXIS];
-  Real min_y = ydims[LEFT];
-  Real max_y = ydims[RIGHT];
-  Real step = 1.0 PT;
-  if (y < min_y)
-    {
-      warning (_ ("piano brace") 
-       + " " + _ ("too small") +  " (" + print_dimen (y) + ")");
-      y = min_y;
-    }
-  if (y > max_y)
-    {
-      warning (_ ("piano brace")
-       + " " + _ ("too big") + " (" + print_dimen (y) + ")");
-      y = max_y;
-    }
-
-  
-  int idx = int (rint ( (y- min_y)/step)) + 1;
-  
-  {
-    Array<String> a;
-    a.push (character_str (idx));
-    brace.str_ = substitute_args (brace.str_,a);
-    brace.dim_[Y_AXIS] = Interval (-y/2,y/2);
-  }
-
-  brace.font_ = font_;
-
-  return brace;
-}
-
-
index 74543baf2cc819e3f34afd6f0e6e59f628b9aa72..5b541eb29fb8bed2e5015d7dc45ebb622fdf9a69 100644 (file)
@@ -10,8 +10,6 @@
 #include <iostream.h>
 #include <assert.h>
 #include <locale.h>
-#include "lily-guile.hh"
-
 #include "proto.hh"
 #include "dimensions.hh"
 #include "plist.hh"
@@ -188,8 +186,17 @@ identify ()
   *mlog << get_version_str () << endl;
 }
 
+void 
+guile_init ()
+{
+#ifdef   HAVE_LIBGUILE
+   gh_eval_str ("(define (add-column p) (display \"adding column (in guile): \") (display p) (newline))");
+#endif
+}
+
+
 void
-main_prog (int argc, char **argv)
+setup_paths ()
 {
   // facilitate binary distributions
   char const *env_lily = getenv ("LILYPONDPREFIX");
@@ -213,10 +220,6 @@ main_prog (int argc, char **argv)
   textdomain (name.ch_C ());
 #endif
 
-  identify ();
-  call_constructors ();
-  debug_init ();               // should be first
-
   global_path.add ("");
   // must override (come before) "/usr/local/share/lilypond"!
   char const *env_sz = getenv ("LILYINCLUDE");
@@ -231,11 +234,24 @@ main_prog (int argc, char **argv)
 
   global_path.add (String (DIR_DATADIR) + "/ly/");
   global_path.add (String (DIR_DATADIR) + "/afm/");  
+}
 
-  Getopt_long oparser (argc, argv,theopts);
-  String init_str;
 
+
+int
+main_prog (int argc, char **argv)
+{
+  guile_init ();
+  identify ();
+  call_constructors ();
+  debug_init ();               // should be first
+
+  setup_paths ();
+
+  String init_str;
   String outname_str;
+
+  Getopt_long oparser (argc, argv,theopts);
   while (Long_option_init const * opt = oparser ())
     {
       switch (opt->shortname)
@@ -243,7 +259,6 @@ main_prog (int argc, char **argv)
        case 't':
          experimental_features_global_b = true;
          global_lookup_l = &ps_lookup;
-         *mlog << "*** enabling experimental features, you're on your own now ***\n";
          break;
        case 'o':
          outname_str = oparser.optional_argument_ch_C_;
@@ -329,18 +344,8 @@ main_prog (int argc, char **argv)
        default_outname_base_global = outname_str;
       do_one_file (i, default_outname_base_global);
     }
-}
 
-int
-main (int argc, char **argv)
-{
-#ifdef HAVE_LIBGUILE
-  gh_enter (argc, argv, (void(*)())main_prog);
-  return exit_status_i_;
-#else
-  main_prog (argc, argv);
   return exit_status_i_;
-#endif
 }
 
 /*
@@ -380,3 +385,19 @@ distill_inname_str (String name_str, String& ext_r)
   return str;
 }
 
+
+#ifdef HAVE_LIBGUILE
+int
+main (int argc, char **argv)
+{
+  gh_enter (argc, argv, (void(*)())main_prog);
+  return exit_status_i_;
+}
+
+#else
+int main (int argc, char **argv)
+{
+  return main_prog (argc, argv);
+}
+
+#endif
index b19215f51200ada13487995a5f22703123bdbd2d..2b329815d6596e4ee5ddc89f89f165cffc2cce7a 100644 (file)
@@ -167,7 +167,7 @@ Music_iterator::static_get_iterator_p (Music const *m, Translator_group *report_
 }
 
 void
-Music_iterator::inherit_info(Music_iterator const *parent)
+Music_iterator::inherit_info(Music_iterator const *)
 {
 }
 
index dd7da312df0ae8b6cfbdcb009b9ac408ec749a80..3ee6004add9f0e2d330c6cf08213de3d38037da7 100644 (file)
@@ -184,7 +184,6 @@ Note_req::do_equal_b (Request*r) const
 
 Note_req::Note_req ()
 {
-  cautionary_b_ = false;
   forceacc_b_ = false;
 }
 
@@ -195,11 +194,7 @@ Note_req::do_print () const
 {
 #ifndef NPRINT
   Melodic_req::do_print ();
-  if (cautionary_b_)
-    {
-       DOUT << " force cautionary accidental\n";
-    }
-  else if (forceacc_b_)
+  if (forceacc_b_)
     {
        DOUT << " force accidental\n";
     }
index 4c7d05a9a22ca8b6b561a2eb8965319592e72f29..82948a3067447e6fe31c043f95d8257895575015 100644 (file)
@@ -55,7 +55,6 @@ static Keyword_ent the_key_tab[]={
   {"pt", PT_T},
   {"relative", RELATIVE},
   {"remove", REMOVE},
-  {"scm", SCHEME},
   {"score", SCORE},
   {"script", SCRIPT},
   {"shape", SHAPE},
index 9b08369db0b66dc87d0978ac5f485ece35d23b5a..bf32cb7ee2919031c77f9eb147421e4ad86b7c70 100644 (file)
@@ -9,13 +9,13 @@
 #include "notename-table.hh"
 #include "pointer.tcc"
 #include "musical-request.hh"
-#include "assoc-iter.hh"
+#include "dictionary-iter.hh"
 
 String
 Notename_table::get_name (Musical_pitch m) const
 {
 
-  for (Assoc_iter<String, Musical_pitch> ai (*this); ai.ok (); ai++)
+  for (Dictionary_iter<Musical_pitch> ai (*this); ai.ok (); ai++)
     {
       if (ai.val () == m)
        return ai.key ();
index d3d4a6795476f3d07af96b7cc857b9c7e1ef7207..8593add91051b63d930fb3428bbcfa50f54b0495 100644 (file)
@@ -21,8 +21,7 @@
 #include "identifier.hh"
 #include "main.hh"
 #include "scope.hh"
-#include "assoc.hh"
-#include "assoc-iter.hh"
+#include "dictionary-iter.hh"
 
 Paper_def::Paper_def ()
 {
@@ -214,7 +213,7 @@ String
 Paper_def::ps_output_settings_str () const
 {
   String s ("\n ");
-  for (Assoc_iter<String,Identifier*> i (*scope_p_); i.ok (); i++)
+  for (Dictionary_iter<Identifier*> i (*scope_p_); i.ok (); i++)
     s += String ("/mudelapaper") + i.key () 
       + "{" + i.val ()->str () + "} bind def\n";
   s +=  *scope_p_->elem ("pssetting")->access_String ();
@@ -225,7 +224,7 @@ String
 Paper_def::tex_output_settings_str () const
 {
   String s ("\n ");
-  for (Assoc_iter<String,Identifier*> i (*scope_p_); i.ok (); i++)
+  for (Dictionary_iter<Identifier*> i (*scope_p_); i.ok (); i++)
     s += String ("\\def\\mudelapaper") + i.key () 
       + "{" + i.val ()->str () + "}\n";
   s +=  *scope_p_->elem ("texsetting")->access_String ();
index 2ecf72a5ca87e62a968b1bfa35490ba9c4d5ccc5..1e8d450c7b31b2969df751f4e66dbf555371b6c5 100644 (file)
@@ -27,7 +27,7 @@ Paper_outputter::~Paper_outputter ()
 }
 
 void
-Paper_outputter::output_molecule (Molecule const*m, Offset o, char const *nm, String s, String output_str)
+Paper_outputter::output_molecule (Molecule const*m, Offset o, char const *nm, String s)
 {
   if (check_debug)
     *outstream_l_ << String ("\n%start: ") << nm << "\n";
@@ -44,15 +44,7 @@ Paper_outputter::output_molecule (Molecule const*m, Offset o, char const *nm, St
   
       a.push (global_lookup_l->print_dimen (a_off.y()));
       a.push (global_lookup_l->print_dimen (a_off.x()));
-      if (i->lambda_)
-        {
-         SCM str_scm = gh_call1 (gh_eval (i->lambda_), gh_eval_str ("'ps"));
-         char* c = gh_scm2newstr (str_scm, NULL);
-         a.push (String (c));
-         free (c);
-       }
-      else
-       a.push (i->str_);
+      a.push (i->str_);
       r += global_lookup_l->substitute_args (s, a);
       *outstream_l_ << r;
     }
index 1c254c822725d2114e465f6bd0b01afad8faa150..bf82af8ec43a9a488f7f09be4dcb6fa5064444d3 100644 (file)
@@ -10,7 +10,6 @@
 */
 
 #include <iostream.h>
-#include "lily-guile.hh"
 #include "notename-table.hh"
 #include "scalar.hh"
 #include "translation-property.hh"
@@ -196,7 +195,6 @@ yylex (YYSTYPE *s,  void * v_l)
 %token PT_T
 %token RELATIVE
 %token REMOVE
-%token SCHEME /* token vs typedef;  can't be named SCM */
 %token SCORE
 %token SCRIPT
 %token SHAPE
@@ -323,18 +321,8 @@ toplevel_expression:
                        Midi_def_identifier ($1, MIDI_IDENTIFIER);
                THIS->lexer_p_->set_identifier ("$defaultmidi", id)
        }
-       | embedded_scm { 
-       }
        ;
 
-embedded_scm:
-       SCHEME STRING ';' {
-       #ifdef HAVE_LIBGUILE
-               gh_eval_str ($2->ch_C ());
-       #endif
-               delete $2;
-       };
-
 check_version:
        VERSION STRING ';'              {
                Mudela_version ver (*$2);
@@ -1031,10 +1019,6 @@ steno_notepitch:
        | steno_notepitch  '!'          {
                $$->forceacc_b_ = ! $$->forceacc_b_;
        }
-       | steno_notepitch  '?'          {
-               $$->forceacc_b_ = ! $$->forceacc_b_;
-               $$->cautionary_b_ = ! $$->cautionary_b_;
-       }
        ;
 
 
@@ -1458,7 +1442,7 @@ symtable:
 symtable_body:
                                { $$ = new Symtable; }
        | symtable_body STRING  symboldef {
-               $$->add (*$2, *$3);
+               $$->elem (*$2) = *$3;
                delete $2;
                delete $3;
        }
diff --git a/lily/parser.yy.orig b/lily/parser.yy.orig
deleted file mode 100644 (file)
index c73b8b8..0000000
+++ /dev/null
@@ -1,1504 +0,0 @@
-%{ // -*-Fundamental-*-
-
-/*
-  parser.yy -- Bison/C++ parser for mudela
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-           Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#include <iostream.h>
-#include "lily-guile.hh"
-#include "notename-table.hh"
-#include "scalar.hh"
-#include "translation-property.hh"
-#include "script-def.hh"
-#include "symtable.hh"
-#include "lookup.hh"
-#include "ps-lookup.hh"
-#include "tex-lookup.hh"
-#include "misc.hh"
-#include "my-lily-lexer.hh"
-#include "paper-def.hh"
-#include "midi-def.hh"
-#include "main.hh"
-#include "file-path.hh"
-#include "keyword.hh"
-#include "debug.hh"
-#include "parseconstruct.hh"
-#include "dimensions.hh"
-#include "identifier.hh"
-#include "command-request.hh"
-#include "musical-request.hh"
-#include "my-lily-parser.hh"
-#include "text-def.hh"
-#include "translator-group.hh"
-#include "score.hh"
-#include "music-list.hh"
-#include "duration-convert.hh"
-#include "change-translator.hh"
-#include "file-results.hh"
-#include "mudela-version.hh"
-#include "scope.hh"
-#include "relative-music.hh"
-#include "transposed-music.hh"
-#include "compressed-music.hh"
-
-// mmm
-Mudela_version oldest_version ("1.0.7");
-Mudela_version version ("1.0.8");
-
-
-// needed for bison.simple's malloc() and free()
-#include <malloc.h>
-
-int const GUESS_PLET = 5;
-int guess_plet_a[GUESS_PLET] =
-{ 
-  1,
-  3,
-  2,
-  3,
-  4
-};
-
-struct Assignment {
-       String *name_p_;
-       Identifier *id_p_;
-       ~Assignment () {
-               delete name_p_;
-               delete id_p_;
-       }
-       Assignment () {
-               name_p_ = 0;
-               id_p_ =0;
-       }
-       Assignment (Assignment const&s)
-       {
-               name_p_ = new String (*s.name_p_);
-               id_p_ = s.id_p_->clone ();
-       }
-};
-
-Paper_def* current_paper = 0;
-
-#ifndef NDEBUG
-#define YYDEBUG 1
-#endif
-
-#define YYERROR_VERBOSE 1
-
-#define YYPARSE_PARAM my_lily_parser_l
-#define YYLEX_PARAM my_lily_parser_l
-#define THIS ((My_lily_parser *) my_lily_parser_l)
-
-#define yyerror THIS->parser_error
-#define ARRAY_SIZE(a,s)   if (a.size () != s) THIS->parser_error (_f("expecting %d arguments", s))
-
-
-%}
-
-
-%union {
-    Array<Interval>* intarr;
-    Array<Musical_pitch> *pitch_arr;
-    Array<String> * strvec;
-    Array<int> *intvec;
-    Box *box;
-    Simultaneous_music *chord;
-    Duration *duration;
-    Identifier *id;
-    Translator* trans;
-    Music *music;
-    Music_list *music_list;
-    Score *score;
-    Scope *scope;
-    Interval *interval;
-    Musical_req* musreq;
-    Music_output_def * outputdef;
-    Musical_pitch * pitch;
-    Midi_def* midi;
-    Moment *moment;
-    Note_req *notereq;
-    Notename_table *notenametab;
-    Paper_def *paper;
-    Real real;
-    Request * request;
-    General_script_def * script;
-    Scalar *scalar;
-    String *string;
-    Atom * symbol;
-    Symtable * symtable;
-    Symtables* symtables;
-    Text_def * textdef;
-    Tempo_req *tempo;
-    char c;
-    const char *consstr;
-    int i;
-    int pair[2];
-    int ii[10];
-}
-%{
-
-int
-yylex (YYSTYPE *s,  void * v_l)
-{
-       My_lily_parser   *pars_l = (My_lily_parser*) v_l;
-       My_lily_lexer * lex_l = pars_l->lexer_p_;
-
-       lex_l->lexval_l = (void*) s;
-       return lex_l->yylex ();
-}
-
-
-%}
-
-%pure_parser
-
-/* tokens which are not keywords */
-
-%token ABSDYNAMIC
-%token ACCEPTS
-%token BAR
-%token BEAMPLET
-%token CADENZA
-%token CLEF
-%token CM_T
-%token CONSISTS
-%token DURATION
-%token END
-%token FONT
-%token GROUPING
-%token HEADER
-%token IN_T
-%token KEY
-%token KEYSIGNATURE
-%token LYRICS
-%token MAEBTELP
-%token MARK
-%token MEASURES
-%token MIDI
-%token MM_T
-%token MUSIC
-%token MUSICAL_PITCH
-%token NAME
-%token NOTENAMES
-%token NOTES
-%token OCTAVE
-%token OUTPUT
-%token PAPER
-%token PARTIAL
-%token PENALTY
-%token PLET
-%token PROPERTY
-%token PT_T
-%token RELATIVE
-%token REMOVE
-%token SCHEME /* token vs typedef;  can't be named SCM */
-%token SCORE
-%token SCRIPT
-%token SHAPE
-%token SKIP
-%token SPANDYNAMIC
-%token SYMBOLTABLES
-%token TABLE
-%token TELP
-%token TEMPO
-%token TIME_T
-%token TIMES
-%token TRANSLATOR
-%token TRANSPOSE
-%token TYPE
-%token VERSION
-
-/* escaped */
-%token E_EXCLAMATION E_SMALLER E_BIGGER E_CHAR
-
-%type <i>      dots
-%token <i>     DIGIT
-%token <pitch> NOTENAME_PITCH
-%token <id>    DURATION_IDENTIFIER
-%token <id>    IDENTIFIER
-%token <id>    NOTENAME_TABLE_IDENTIFIER
-%token <id>    MUSIC_IDENTIFIER
-%token <id>    POST_REQUEST_IDENTIFIER
-%token <id>    SCRIPT_IDENTIFIER
-%token <id>    COMMAND_IDENTIFIER
-%token <id>    REAL_IDENTIFIER
-%token <id>    STRING_IDENTIFIER
-%token <id>    TRANS_IDENTIFIER
-%token <id>    INT_IDENTIFIER
-%token <id>    SCORE_IDENTIFIER
-%token <id>    MIDI_IDENTIFIER
-%token <id>    PAPER_IDENTIFIER
-%token <id>    REQUEST_IDENTIFIER
-%token <real>  REAL
-%token <string>        DURATION RESTNAME
-%token <string>        STRING
-%token <i>     UNSIGNED
-
-
-%type <outputdef> output_def
-%type <scope>  mudela_header mudela_header_body
-%type <box>    box
-%type <i>      open_request_parens close_request_parens
-%type <i>      open_abbrev_parens
-%type <i>      open_plet_parens close_plet_parens
-%type <i>      sub_quotes sup_quotes
-%type <music>  simple_element  request_chord command_element Simple_music  Composite_music
-%type <i>      abbrev_type
-%type <i>      int unsigned
-%type <i>      script_dir
-%type <id>     identifier_init simple_identifier_init block_identifier
-%type <duration> steno_duration notemode_duration
-%type <duration> entered_notemode_duration explicit_duration
-%type <interval>       dinterval
-%type <intvec> intastint_list int_list
-%type <symtables>      symtables symtables_body
-
-%type <pitch>   explicit_musical_pitch steno_musical_pitch musical_pitch absolute_musical_pitch
-%type <notereq>        steno_notepitch
-%type <pitch_arr>      pitch_list
-%type <midi>   midi_block midi_body
-%type <duration>       duration_length
-
-%type <scalar>  scalar
-%type <music>  Music  relative_music Sequential_music Simultaneous_music
-%type <music>  property_def translator_change
-%type <music_list> Music_list
-%type <paper>  paper_block paper_def_body
-%type <real>   real_expression real dimension
-%type <request> abbrev_command_req
-%type <request>        post_request structured_post_request
-%type <pair>   plet_fraction
-%type <request> command_req verbose_command_req
-%type <request>        script_req  dynamic_req
-%type <string> string
-%type <score>  score_block score_body
-%type <intarr> shape_array
-%type <script> script_definition script_body mudela_script gen_script_def
-%type <textdef> text_def finger
-%type <string> script_abbreviation
-%type <symbol> symboldef
-%type <symtable>       symtable symtable_body
-%type <trans>  translator_spec translator_spec_body
-%type <tempo>  tempo_request
-%type <notenametab> notenames_body notenames_block
-%expect 3
-
-
-%left '-' '+'
-%left '*' '/'
-%left UNARY_MINUS
-
-%%
-
-mudela:        /* empty */
-       | mudela toplevel_expression {}
-       | mudela assignment { }
-       | mudela error
-       | mudela check_version { }
-       ;
-
-toplevel_expression:
-       notenames_block                 {
-               THIS->lexer_p_->set_notename_table ($1);
-       }
-       | mudela_header {
-               delete header_global_p;
-               header_global_p = $1;
-       }
-       | score_block {
-               score_global_array.push ($1);
-       }
-       | paper_block {
-               Identifier * id = new
-                       Paper_def_identifier ($1, PAPER_IDENTIFIER);
-               THIS->lexer_p_->set_identifier ("$defaultpaper", id)
-       }
-       | midi_block {
-               Identifier * id = new
-                       Midi_def_identifier ($1, MIDI_IDENTIFIER);
-               THIS->lexer_p_->set_identifier ("$defaultmidi", id)
-       }
-       | embedded_scm { 
-       }
-       ;
-
-embedded_scm:
-       SCHEME STRING ';' {
-       #ifdef HAVE_LIBGUILE
-               gh_eval_str ($2->ch_C ());
-       #endif
-               delete $2;
-       };
-
-check_version:
-       VERSION STRING ';'              {
-               Mudela_version ver (*$2);
-               if (!((ver >= oldest_version) && (ver <= version))) {
-                       if (THIS->ignore_version_b_) {
-                               THIS->here_input ().error (_f ("incorrect mudela version: %s (%s, %s)", ver.str (), oldest_version.str (), version.str ()));
-                       } else {
-                               THIS->fatal_error_i_ = 1;
-                               THIS->parser_error (_f ("incorrect mudela version: %s (%s, %s)", ver.str (), oldest_version.str (), version.str ()));
-                       }
-               }
-       }
-       ;
-
-
-notenames_block:
-       NOTENAMES '{' notenames_body '}'  {  $$ = $3; }
-       ;
-
-
-
-notenames_body:
-       /**/    {
-               $$ = new Notename_table;
-       }
-       | NOTENAME_TABLE_IDENTIFIER     {
-               $$ = $1-> access_Notename_table(true);
-       }
-       | notenames_body STRING '=' explicit_musical_pitch {
-               (*$$)[*$2] = *$4;
-
-               delete $4;
-               delete $2;
-       }
-       ;
-
-mudela_header_body:
-       {
-               $$ = new Scope;
-               THIS->lexer_p_-> scope_l_arr_.push ($$);
-       }
-       | mudela_header_body assignment ';' { 
-
-       }
-       ;
-
-mudela_header:
-       HEADER '{' mudela_header_body '}'       {
-               $$ = $3;
-               THIS->lexer_p_-> scope_l_arr_.pop ();           
-       }
-       ;
-
-
-/*
-       DECLARATIONS
-*/
-assignment:
-       STRING {
-               THIS->remember_spot ();
-       }
-       /* cont */ '=' identifier_init  {
-           THIS->lexer_p_->set_identifier (*$1, $4);
-           $4->init_b_ = THIS->init_parse_b_;
-           $4->set_spot (THIS->pop_spot ());
-       }
-       ;
-
-
-simple_identifier_init: identifier_init
-       ;
-
-identifier_init:
-       block_identifier
-       ;
-
-block_identifier:
-       score_block {
-               $$ = new Score_identifier ($1, SCORE_IDENTIFIER);
-
-       }
-       | notenames_block {
-               $$ = new Notename_table_identifier ($1, NOTENAME_TABLE_IDENTIFIER);
-       }
-       | paper_block {
-               $$ = new Paper_def_identifier ($1, PAPER_IDENTIFIER);
-       }
-       | midi_block {
-               $$ = new Midi_def_identifier ($1, MIDI_IDENTIFIER);
-
-       }
-       | symtables {
-               $$ = new Symtables_identifier ($1, IDENTIFIER);
-       }
-       | translator_spec {
-               $$ = new Translator_identifier ($1, TRANS_IDENTIFIER);
-       }
-       | Music  {
-               $$ = new Music_identifier ($1, MUSIC_IDENTIFIER);
-       }
-
-       | post_request {
-               $$ = new Request_identifier ($1, POST_REQUEST_IDENTIFIER);
-       }
-       | explicit_duration {
-               $$ = new Duration_identifier ($1, DURATION_IDENTIFIER);
-       }
-       | real {
-               $$ = new Real_identifier (new Real ($1), REAL_IDENTIFIER);
-       }
-       | string {
-               $$ = new String_identifier ($1, STRING_IDENTIFIER);
-       }
-       | int   {
-               $$ = new int_identifier (new int ($1), INT_IDENTIFIER);
-       }
-       | script_definition {
-               $$ = new General_script_def_identifier ($1, SCRIPT_IDENTIFIER);
-
-       }
-       ;
-
-translator_spec:
-       TRANSLATOR '{' translator_spec_body '}'
-               { $$ = $3; }
-       ;
-
-translator_spec_body:
-       TRANS_IDENTIFIER        {
-               $$ = $1->access_Translator (true);
-               $$-> set_spot (THIS->here_input ());
-       }
-       | TYPE STRING ';'       {
-               Translator* t = get_translator_l (*$2);
-               Translator_group * tg = t->access_Translator_group ();
-
-               if (!tg)
-                       THIS->parser_error (_("Need a translator group for a context"));
-               
-               t = t->clone ();
-               t->set_spot (THIS->here_input ());
-               $$ = t;
-               delete $2;
-       }
-       | translator_spec_body STRING '=' simple_identifier_init ';'    { 
-               Identifier* id = $4;
-               String_identifier *s = id->access_String_identifier ();
-               Real_identifier *r= id->access_Real_identifier ();
-               int_identifier *i = id->access_int_identifier ();
-       
-               String str;
-               if (s) str = *s->access_String (false); 
-               if (i) str = to_str (*i->access_int (false));
-               if (r) str = to_str (*r->access_Real (false));
-               if (!s && !i && !r)
-                       THIS->parser_error (_("Wrong type for property value"));
-
-               delete $4;
-               $$->set_property (*$2, str);
-       }
-       | translator_spec_body NAME STRING ';' {
-               $$->type_str_ = *$3;
-               delete $3;
-       }
-       | translator_spec_body CONSISTS STRING ';' {
-               $$->access_Translator_group ()-> set_element (*$3, true);
-               delete $3;
-       }
-       | translator_spec_body ACCEPTS STRING ';' {
-               $$->access_Translator_group ()-> set_acceptor (*$3, true);
-               delete $3;
-       }
-       | translator_spec_body REMOVE STRING ';' {
-               $$->access_Translator_group ()-> set_element (*$3, false);
-               delete $3;
-       }
-       ;
-
-/*
-       SCORE
-*/
-score_block:
-       SCORE { THIS->remember_spot ();
-               THIS->error_level_i_ =0;
-       }
-       /*cont*/ '{' score_body '}'     {
-               $$ = $4;
-               $$->set_spot (THIS->pop_spot ());
-               if (!$$->def_p_arr_.size ())
-                       $$->add_output (THIS->default_paper_p ());
-
-               /* handle error levels. */
-               $$->errorlevel_i_ = THIS->error_level_i_;
-               THIS->error_level_i_ = 0;
-       }
-       ;
-
-score_body:            {
-               $$ = new Score;
-       }
-       | SCORE_IDENTIFIER {
-               $$ = $1->access_Score (true);
-       }
-       | score_body mudela_header      {
-               $$->header_p_ = $2;
-       }
-       | score_body Music      {
-               if ($$->music_p_)
-                       $2->warning (_ ("More than one music block"));  
-               $$->music_p_ = $2;
-       }
-       | score_body output_def {
-               $$->add_output ($2);
-       }
-       | score_body error {
-
-       }
-       ;
-
-output_def:
-       paper_block {
-               $$ = $1;
-       }
-       |  midi_block           {
-               $$= $1;
-       }
-       ;
-
-intastint_list:
-       /* */   { $$ =new Array<int>; }
-       | intastint_list int '*' int    {
-               $$->push ($2); $$->push ($4);
-       }
-       | intastint_list int    {
-               $$->push ($2); $$->push (1);
-       }
-       ;       
-
-
-/*
-       PAPER
-*/
-paper_block:
-       PAPER '{' paper_def_body '}'    { 
-               $$ = $3;
-               THIS-> lexer_p_->scope_l_arr_.pop ();
-       }
-       ;
-
-optional_semicolon:
-       /* empty */
-       | ';'
-       ;
-
-paper_def_body:
-       /* empty */                     {
-               Paper_def *p = THIS->default_paper_p ();
-               THIS-> lexer_p_-> scope_l_arr_.push (p->scope_p_);
-               $$ = p;
-       }
-       | PAPER_IDENTIFIER optional_semicolon   {
-               Paper_def *p = $1->access_Paper_def (true);
-               THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
-               $$ = p;
-       }
-       | paper_def_body int '=' symtables              { // ugh, what a syntax
-               Lookup * l = global_lookup_l->lookup_p (*$4);
-               $$->set_lookup ($2, l);
-       }
-       | paper_def_body assignment ';' {
-
-       }
-       | paper_def_body translator_spec {
-               $$->assign_translator ($2);
-       }
-       | paper_def_body SHAPE '=' shape_array ';' {
-               $$->shape_int_a_ = *$4;
-               delete $4;
-       }
-       | paper_def_body error {
-
-       }
-       ;
-
-
-real:
-       real_expression         { $$ = $1; }
-       ;
-
-
-dimension:
-       REAL CM_T       {
-               $$ = $1 CM;
-       }
-       | REAL PT_T     {
-               $$ = $1 PT;
-       }
-       | REAL IN_T     {
-               $$ = $1 INCH;
-       }
-       | REAL MM_T     {
-               $$ = $1 MM;
-       }
-       ;
-
-real_expression:
-       REAL            {
-               $$ = $1;
-       }
-       | dimension
-       | REAL_IDENTIFIER               {
-               $$= *$1->access_Real (false);
-       }
-       | '-'  real_expression %prec UNARY_MINUS {
-               $$ = -$2;
-       }
-       | real_expression '*' real_expression {
-               $$ = $1 * $3;
-       }
-       | real_expression '/' real_expression {
-               $$ = $1 / $3;
-       }
-       | real_expression '+' real_expression {
-               $$ = $1  + $3;
-       }
-       | real_expression '-' real_expression {
-               $$ = $1 - $3;
-       }
-       | '(' real_expression ')'       {
-               $$ = $2;
-       }
-       ;
-               
-
-shape_array:
-       /* empty */ {
-               $$ = new Array<Interval>;
-       }
-       | shape_array real real {
-               $$->push(Interval($2, $2 + $3));
-       };
-
-/*
-       MIDI
-*/
-midi_block:
-       MIDI
-
-       '{' midi_body '}'       { $$ = $3; }
-       ;
-
-midi_body: /* empty */                 {
-               $$ = THIS->default_midi_p ();
-       }
-       | MIDI_IDENTIFIER       {
-               $$ = $1-> access_Midi_def (true);
-       }
-       | midi_body translator_spec     {
-               $$-> assign_translator ($2);
-       }
-       | midi_body tempo_request ';' {
-               $$->set_tempo ($2->dur_.length (), $2->metronome_i_);
-               delete $2;
-       }
-       | midi_body error {
-
-       }
-       ;
-
-tempo_request:
-       TEMPO entered_notemode_duration '=' unsigned    {
-               $$ = new Tempo_req;
-               $$->dur_ = *$2;
-               delete $2;
-               $$-> metronome_i_ = $4;
-       }
-       ;
-
-Music_list: /* empty */ {
-               $$ = new Music_list;
-       }
-       | Music_list Music {
-               $$->add_music ($2);
-       }
-       | Music_list error {
-       }
-       ;
-
-
-Music:
-       Simple_music
-       | Composite_music
-       ;
-
-Sequential_music: '{' Music_list '}'           {
-               $$ = new Sequential_music ($2);
-       }
-       ;
-
-Simultaneous_music: '<' Music_list '>' {
-               $$ = new Simultaneous_music ($2);
-       }
-       ;
-
-Simple_music:
-       request_chord           { $$ = $1; }
-       | MUSIC_IDENTIFIER { $$ = $1->access_Music (true); }
-       | property_def
-       | translator_change
-       ;
-
-
-Composite_music:
-       TYPE STRING Music       {
-               $$ = $3;
-               $$->translator_type_str_ = *$2;
-               delete $2;
-       }
-       | TYPE STRING '=' STRING Music {
-               $$ = $5;
-               $$->translator_type_str_ = *$2;
-               $$->translator_id_str_ = *$4;
-               delete $2;
-               delete $4;
-       }
-       | TIMES int '/' int Music       {
-               $$ = new Compressed_music ($2, $4, $5);
-
-       }
-       | Simultaneous_music            { $$ = $1; }
-       | Sequential_music              { $$ = $1; }
-       | TRANSPOSE musical_pitch Music {
-               $$ = new Transposed_music ($3, *$2);
-               delete $2;
-       }
-       | NOTES
-               { THIS->lexer_p_->push_note_state (); }
-       Music
-               { $$ = $3;
-                 THIS->lexer_p_->pop_state ();
-               }
-
-       | LYRICS
-               { THIS->lexer_p_->push_lyric_state (); }
-       Music
-               {
-                 $$ = $3;
-                 THIS->lexer_p_->pop_state ();
-               }
-       | relative_music        { $$ = $1; }
-       ;
-
-relative_music:
-       RELATIVE absolute_musical_pitch Music {
-               $$ = new Relative_octave_music ($3, *$2);
-               delete $2;
-       }
-       ;
-
-translator_change:
-       TRANSLATOR STRING '=' STRING  {
-               Change_translator * t = new Change_translator;
-               t-> change_to_type_str_ = *$2;
-               t-> change_to_id_str_ = *$4;
-
-               $$ = t;
-               $$->set_spot (THIS->here_input ());
-               delete $2;
-               delete $4;
-       }
-       ;
-
-property_def:
-       PROPERTY STRING '.' STRING '=' scalar   {
-               Translation_property *t = new Translation_property;
-               t-> translator_type_str_ = *$2;
-               t-> var_str_ = *$4;
-               t-> value_ = *$6;
-               $$ = t;
-               $$->set_spot (THIS->here_input ());
-               delete $2;
-               delete $4;
-               delete $6;
-       }
-       ;
-
-scalar:
-       STRING          { $$ = new Scalar (*$1); delete $1; }
-       | int           { $$ = new Scalar ($1); }
-       ;
-
-
-request_chord:
-       pre_requests simple_element post_requests       {
-               THIS->add_requests ((Simultaneous_music*)$2);//ugh
-               $$ = $2;
-       }
-       | command_element
-       ;
-
-command_element:
-       command_req {
-               $$ = new Request_chord;
-               $$-> set_spot (THIS->here_input ());
-               $1-> set_spot (THIS->here_input ());
-               ((Simultaneous_music*)$$) ->add_music ($1);//ugh
-       }
-       ;
-
-command_req:
-       abbrev_command_req
-       | verbose_command_req ';'       { $$ = $1; }
-       ;
-
-abbrev_command_req:
-       '|'                             {
-               $$ = new Barcheck_req;
-       }
-       | COMMAND_IDENTIFIER    {
-               $$ = $1->access_Request (true);
-       }
-/*
-       | '['           {
-               $$ = new Beam_req;
-               $$->spantype = Span_req::START;
-       }
-       | ']'           {
-               $$ = new Beam_req;
-               $$->spantype = Span_req::STOP;
-       }
-*/
-       ;
-
-
-verbose_command_req:
-       BAR STRING                      {
-               $$ = new Bar_req (*$2);
-               delete $2;
-       }
-       | MARK STRING {
-               $$ = new Mark_req (*$2);
-               delete $2;
-       }
-       | MARK unsigned {
-               $$ = new Mark_req (to_str ($2));
-       }
-       | TIME_T unsigned '/' unsigned  {
-               Time_signature_change_req *m = new Time_signature_change_req;
-               m->beats_i_ = $2;
-               m->one_beat_i_=$4;
-               $$ = m;
-       }
-       | PENALTY '=' int       {
-               Break_req * b = new Break_req;
-               b->penalty_i_ = $3;
-               b-> set_spot (THIS->here_input ());
-               $$ = b;
-       }
-       | SKIP duration_length {
-               Skip_req * skip_p = new Skip_req;
-               skip_p->duration_ = *$2;
-               delete $2;
-               $$ = skip_p;
-       }
-       | tempo_request {
-               $$ = $1;
-       }
-       | CADENZA unsigned      {
-               $$ = new Cadenza_req ($2);
-       }
-       | PARTIAL duration_length       {
-               $$ = new Partial_measure_req ($2->length ());
-               delete $2;
-       }
-       | CLEF STRING {
-               $$ = new Clef_change_req (*$2);
-               delete $2;
-       }
-       | KEY NOTENAME_PITCH    {
-               Key_change_req *key_p= new Key_change_req;
-               key_p->pitch_arr_.push(*$2);
-               key_p->ordinary_key_b_ = true;
-               $$ = key_p;
-               delete $2;
-       }
-       | KEYSIGNATURE pitch_list       {
-               Key_change_req *key_p= new Key_change_req;
-               key_p->pitch_arr_ = *$2;
-               key_p->ordinary_key_b_ = false;
-               $$ = key_p;
-               delete $2;
-       }
-       | GROUPING intastint_list {
-               $$ = get_grouping_req (*$2); delete $2;
-       }
-       ;
-
-post_requests:
-       {
-               /* something silly happened.  Junk this stuff*/
-               if (!THIS->post_reqs.empty ())
-               {
-                       warning ("Junking post-requests");
-                       THIS->post_reqs.clear ();
-               }
-       }
-       | post_requests structured_post_request {
-               $2->set_spot (THIS->here_input ());
-               THIS->post_reqs.push ($2);
-       }
-       | post_requests close_request_parens    {
-               Array<Request*>& r = *THIS->get_parens_request ($2);
-               for (int i = 0; i < r.size (); i++ )
-                       r[i]->set_spot (THIS->here_input ());
-               THIS->post_reqs.concat (r);
-               delete &r;
-       }
-       ;
-
-structured_post_request:
-       script_req
-       | post_request
-       ;
-
-post_request:
-       POST_REQUEST_IDENTIFIER {
-               $$ = (Request*)$1->access_Request (true);
-       }
-       | dynamic_req {
-               $$ = $1;
-       }
-       | abbrev_type   {
-               Abbreviation_req* a = new Abbreviation_req;
-               a->type_i_ = $1;
-               $$ = a;
-       }
-       ;
-
-sup_quotes:
-       '\'' {
-               $$ = 1;
-       }
-       | sup_quotes '\'' {
-               $$ ++;
-       }
-       ;
-sub_quotes:
-       ',' {
-               $$ = 1;
-       }
-       | sub_quotes ',' {
-               $$ ++ ;
-       }
-       ;
-
-steno_musical_pitch:
-       NOTENAME_PITCH  {
-               $$ = $1;
-       }
-       | NOTENAME_PITCH sup_quotes     {
-               $$ = $1;
-               $$->octave_i_ +=  $2;
-       }
-       | NOTENAME_PITCH sub_quotes      {
-               $$ = $1;
-               $$->octave_i_ += - $2;
-       }
-       ;
-
-explicit_musical_pitch:
-       MUSICAL_PITCH '{' int_list '}'  {/* ugh */
-               Array<int> &a = *$3;
-               ARRAY_SIZE(a,3);
-               $$ = new Musical_pitch;
-               $$->octave_i_ = a[0];
-               $$->notename_i_ = a[1];
-               $$->accidental_i_ = a[2];
-               delete &a;
-       }
-       ;
-
-musical_pitch:
-       steno_musical_pitch
-       | explicit_musical_pitch
-       ;
-
-steno_notepitch:
-       musical_pitch   {
-               $$ = new Note_req;
-               
-               $$->pitch_ = *$1;
-               delete $1;
-       }
-       | steno_notepitch  '!'          {
-               $$->forceacc_b_ = ! $$->forceacc_b_;
-       }
-       ;
-
-
-explicit_duration:
-       DURATION '{' int_list '}'       {
-               $$ = new Duration;
-               Array<int> &a = *$3;
-               ARRAY_SIZE(a,2);
-                       
-               $$-> durlog_i_ = a[0];
-               $$-> dots_i_ = a[1];
-
-               delete &a;              
-       }
-       ;
-
-dynamic_req:
-       ABSDYNAMIC '{' unsigned '}'     {
-               Absolute_dynamic_req *ad_p = new Absolute_dynamic_req;
-               ad_p ->loudness_ = (Dynamic_req::Loudness)$3;
-               $$ =ad_p;
-       }
-       | SPANDYNAMIC '{' int int '}' {
-               Span_dynamic_req * sp_p = new Span_dynamic_req;
-               sp_p->spantype = (Span_req::Spantype)$4;
-               sp_p-> dynamic_dir_  = (Direction)$3;
-               $$ = sp_p;
-       }
-       ;
-
-plet_fraction:
-       unsigned '/' unsigned {
-               $$[0] = $1;
-               $$[1] = $3;
-       }
-       |
-       '/' unsigned {
-               int num = $2 >? 1;
-               $$[0] = guess_plet_a[(num <? GUESS_PLET) - 1];
-               $$[1] = num;
-       }
-       ;
-
-close_plet_parens:
-       ']' plet_fraction {
-               $$ = MAEBTELP;
-               THIS->plet_.type_i_ = $2[1];
-               THIS->plet_.iso_i_ = $2[0];
-               THIS->default_duration_.plet_ = THIS->plet_;
-       }
-       | TELP {
-               $$ = TELP;
-               THIS->plet_.type_i_ = 1;
-               THIS->plet_.iso_i_ = 1;
-               THIS->default_duration_.plet_ = THIS->plet_;
-       }
-       | TELP plet_fraction {
-               $$ = TELP;
-               THIS->plet_.type_i_ = $2[1];
-               THIS->plet_.iso_i_ = $2[0];
-               THIS->default_duration_.plet_ = THIS->plet_;
-       }
-       ;
-
-close_request_parens:
-       '~'     {
-               $$ = '~';
-       }
-       | '('   {
-               $$='(';
-       }
-       | ']'   {
-               $$ = ']';
-       }
-       | E_SMALLER {
-               $$ = '<';
-       }
-       | E_BIGGER {
-               $$ = '>';
-       }
-       | close_plet_parens
-       ;
-
-open_abbrev_parens:
-       '[' ':' unsigned {
-               $$ = '[';
-               if (!Duration::duration_type_b ($3))
-                       THIS->parser_error (_f ("not a duration: %d", $3));
-               else if ($3 < 8)
-                       THIS->parser_error (_ ("can't abbreviate"));
-               else
-                       THIS->set_abbrev_beam ($3);
-       }
-       ;
-
-open_plet_parens:
-       '[' plet_fraction {
-               $$ = BEAMPLET;
-               THIS->plet_.type_i_ = $2[1];
-               THIS->plet_.iso_i_ = $2[0];
-               THIS->default_duration_.plet_ = THIS->plet_;
-       }
-       | PLET plet_fraction {
-               $$ = PLET;
-               THIS->plet_.type_i_ = $2[1];
-               THIS->plet_.iso_i_ = $2[0];
-               THIS->default_duration_.plet_ = THIS->plet_;
-       }
-       ;
-
-open_request_parens:
-       E_EXCLAMATION   {
-               $$ = '!';
-       }
-       | ')'   {
-               $$=')';
-       }
-       | '['   {
-               $$='[';
-       }
-       | open_abbrev_parens
-       | open_plet_parens
-       ;
-
-
-
-script_definition:
-       SCRIPT '{' script_body '}'      { $$ = $3; }
-       ;
-
-script_body:
-       STRING int int int int int              {
-               Script_def *s = new Script_def;
-               s->set_from_input (*$1,$2, $3,$4,$5, $6);
-               $$  = s;
-               delete $1;
-       }
-       ;
-
-script_req:
-       script_dir gen_script_def       {
-               Musical_script_req *m = new Musical_script_req;
-               $$ = m;
-               m->scriptdef_p_ = $2;
-               m->set_spot (THIS->here_input ());
-               if (!m->dir_)
-                 m->dir_  = (Direction)$1;
-       }
-       ;
-
-gen_script_def:
-       text_def        { 
-               $$ = $1;
-               ((Text_def*) $$)->align_dir_ = LEFT; /* UGH */
-       }
-       | mudela_script { 
-               $$ = $1;
-               $$-> set_spot (THIS->here_input ());
-       }
-       | finger {
-               $$ = $1;
-               ((Text_def*)$$)->align_dir_ = RIGHT; /* UGH */
-       }
-       ;
-
-text_def:
-       string {
-               Text_def *t  = new Text_def;
-               $$ = t;
-               t->text_str_ = *$1;
-               delete $1;
-               $$->set_spot (THIS->here_input ());
-       }
-       ;
-
-finger:
-        DIGIT {
-               Text_def* t  = new Text_def;
-               $$ = t;
-               t->text_str_ = to_str ($1);
-               t->style_str_ = "finger";
-               $$->set_spot (THIS->here_input ());
-       }
-       ;
-
-script_abbreviation:
-       '^'             { $$ = get_scriptdef ('^'); }
-       | '+'           { $$ = get_scriptdef ('+'); }
-       | '-'           { $$ = get_scriptdef ('-'); }
-       | '|'           { $$ = get_scriptdef ('|'); }
-       | 'o'           { $$ = get_scriptdef ('o'); }
-       | '>'           { $$ = get_scriptdef ('>'); }
-       | '.'           {
-               $$ = get_scriptdef ('.');
-       }
-       ;
-
-mudela_script:
-       SCRIPT_IDENTIFIER               { $$ = $1->access_General_script_def (true); }
-       | script_definition             { $$ = $1; }
-       | script_abbreviation           {
-               $$ = THIS->lexer_p_->lookup_identifier (*$1)->access_General_script_def (true);
-               delete $1;
-       }
-       ;
-
-script_dir:
-       '_'     { $$ = -1; }
-       | '^'   { $$ = 1; }
-       | '-'   { $$ = 0; }
-       ;
-
-pre_requests:
-       {
-       }
-       | pre_requests open_request_parens {
-               Array<Request*>& r = *THIS->get_parens_request ($2);
-               for (int i = 0; i < r.size (); i++ )
-                       r[i]->set_spot (THIS->here_input ());
-               THIS->pre_reqs.concat (r);
-               delete &r;
-       }
-       ;
-
-absolute_musical_pitch:
-       steno_musical_pitch     {
-               $$ = $1;
-       }
-       ;
-
-duration_length:
-       steno_duration {
-               $$ = $1;
-       }
-       ;
-
-dots:
-       '.'             { $$ = 1; }
-       | dots '.'      { $$ ++; }
-       ;
-
-entered_notemode_duration:
-       /* */           {
-               $$ = new Duration (THIS->default_duration_);
-       }
-       | dots          {
-               $$ = new Duration (THIS->default_duration_);
-               $$->dots_i_  = $1;
-       }
-       | steno_duration        {
-               THIS->set_last_duration ($1);
-       }
-       ;
-
-notemode_duration:
-       entered_notemode_duration {
-               $$ = $1;
-       }
-       ;
-
-steno_duration:
-       unsigned                {
-               $$ = new Duration;
-               if (!Duration::duration_type_b ($1))
-                       THIS->parser_error (_f ("not a duration: %d", $1));
-               else {
-                       $$->durlog_i_ = Duration_convert::i2_type ($1);
-                       $$->set_plet (THIS->plet_.iso_i_, THIS->plet_.type_i_);
-                    }
-       }
-       | DURATION_IDENTIFIER   {
-               $$ = $1->access_Duration (true);
-       }
-       | steno_duration '.'    {
-               $$->dots_i_ ++;
-       }
-       | steno_duration '*' unsigned  {
-               $$->plet_.iso_i_ *= $3;
-       }
-       | steno_duration '/' unsigned {
-               $$->plet_.type_i_ *= $3;
-       }
-       ;
-
-
-abbrev_type: 
-       ':'     {
-               $$ =0;
-       }
-       | ':' unsigned {
-               if (!Duration::duration_type_b ($2))
-                       THIS->parser_error (_f ("not a duration: %d", $2));
-               else if ($2 < 8)
-                       THIS->parser_error (_ ("can't abbreviate"));
-               $$ = $2;
-       }
-       ;
-
-
-
-simple_element:
-       steno_notepitch notemode_duration  {
-               if (!THIS->lexer_p_->note_state_b ())
-                       THIS->parser_error (_ ("have to be in Note mode for notes"));
-               $1->duration_ = *$2;
-               $$ = THIS->get_note_element ($1, $2);
-       }
-       | RESTNAME notemode_duration            {
-               $$ = THIS->get_rest_element (*$1, $2);
-               delete $1;  // delete notename
-       }
-       | MEASURES notemode_duration    {
-               Multi_measure_rest_req* m = new Multi_measure_rest_req;
-               m->duration_ = *$2;
-               delete $2;
-
-               Simultaneous_music*velt_p = new Request_chord;
-               velt_p->set_spot (THIS->here_input ());
-               velt_p->add_music (m);
-               $$ = velt_p;
-       }
-       | STRING notemode_duration                      {
-               if (!THIS->lexer_p_->lyric_state_b ())
-                       THIS->parser_error (_ ("have to be in Lyric mode for lyrics"));
-               $$ = THIS->get_word_element (*$1, $2);
-               delete $1;
-       }
-       ;
-
-
-/*
-       UTILITIES
- */
-pitch_list:                    {
-               $$ = new Array<Musical_pitch>;
-       }
-       | pitch_list musical_pitch      {
-               $$->push (*$2);
-               delete $2;
-       }
-       ;
-
-
-int_list:
-       /**/                    {
-               $$ = new Array<int>
-       }
-       | int_list int          {
-               $$->push ($2);          
-       }
-       ;
-
-unsigned:
-       UNSIGNED        {
-               $$ = $1;
-       }
-       | DIGIT {
-               $$ = $1;
-       };
-
-int:
-       unsigned {
-               $$ = $1;
-       }
-       | '-' unsigned {
-               $$ = -$2;
-       }
-       | INT_IDENTIFIER        {
-               $$ = *$1->access_int (false);
-       }
-       ;
-
-
-string:
-       STRING          {
-               $$ = $1;
-       }
-       | STRING_IDENTIFIER     {
-               $$ = $1->access_String (true);
-       }
-       | string '+' string {
-               *$$ += *$3;
-               delete $3;
-       }
-       ;
-
-
-
-/*
-       symbol tables
-*/
-symtables:
-       SYMBOLTABLES '{' symtables_body '}'     { $$ = $3; }
-       ;
-
-symtables_body:
-                       {
-               $$ = new Symtables;
-       }
-       | IDENTIFIER            {
-               $$ = $1->access_Symtables (true);
-       }
-       | symtables_body FONT STRING            {
-               $$->font_ = *$3;
-               $$->font_path_ = global_path.find (*$3);
-               if  (!$$->font_path_.length_i ())
-                       THIS->here_input ().error (_f("can't open file: `%s'", $3->ch_C()));
-
-               delete $3;
-       }
-       | symtables_body STRING '=' symtable            {
-               $$->add (*$2, $4);
-               delete $2;
-       }
-       ;
-
-symtable:
-       TABLE '{' symtable_body '}' { $$ = $3; }
-       ;
-
-symtable_body:
-                               { $$ = new Symtable; }
-       | symtable_body STRING  symboldef {
-               $$->add (*$2, *$3);
-               delete $2;
-               delete $3;
-       }
-       ;
-
-symboldef:
-       STRING unsigned box             {
-               $$ = global_lookup_l->atom_p (*$1, $2, *$3);
-               delete $1;
-               delete $3;
-       }
-       | STRING unsigned {
-               Box b (Interval (0,0), Interval (0,0));
-               $$ = global_lookup_l->atom_p (*$1, $2, b);
-               delete $1;
-       }
-       ;
-
-box:
-       dinterval dinterval     {
-               $$ = new Box (*$1, *$2);
-               delete $1;
-               delete $2;
-       }
-       ;
-
-dinterval: real        real            {
-               $$ = new Interval ($1, $2);
-       }
-       ;
-
-%%
-
-void
-My_lily_parser::set_yydebug (bool b)
-{
-#ifdef YYDEBUG
-       yydebug = b;
-#endif
-}
-void
-My_lily_parser::do_yyparse ()
-{
-       yyparse ((void*)this);
-}
-
-
index 93299307aa781e5a9b6244cf13915de1bfdb6435..8d160b1f88a50e98a77d873d832413bc73d9b61b 100644 (file)
@@ -43,9 +43,9 @@ Ps_lookup::~Ps_lookup ()
 }
 
 Atom
-Ps_lookup::afm_find (String s, bool warn) const
+Ps_lookup::afm_find (String s) const
 {
-  return Lookup::afm_find (s, String ("(\\%03o) show "), warn);
+  return Lookup::afm_find (s, String ("(\\%03o) show "));
 }
 
 Atom*
@@ -62,6 +62,40 @@ Ps_lookup::character_str (int i) const
   return to_str (i, "(\\%03o)");
 }
 
+Atom
+Ps_lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
+{
+  assert (controls.size () == 8);
+
+  String ps;
+  
+  Real dx = controls[3].x () - controls[0].x ();
+  Real dy = controls[3].y () - controls[0].y ();
+
+  for (int i = 1; i < 4; i++)
+    ps += String_convert::double_str (controls[i].x ()) + " "
+      + String_convert::double_str (controls[i].y ()) + " ";
+
+  ps += String_convert::double_str (controls[0].x ()) + " "
+    + String_convert::double_str (controls[0].y ()) + " ";
+
+  ps += String_convert::double_str (thick) + " ";
+  Real on = dash > 1? thick * dash - thick : 0;
+  Real off = 2 * thick;
+  ps += "[" + String_convert::double_str (on) + " ";
+  ps += String_convert::double_str (off) + "] ";
+  ps += String_convert::int_str (0) + " ";
+  ps += "draw_dashed_slur ";
+
+  Atom a;
+  a.str_ = ps;
+  
+  a.dim_[X_AXIS] = Interval (0, dx);
+  a.dim_[Y_AXIS] = Interval (0 <? dy,  0 >? dy);
+  a.font_ = font_;
+  return a;
+}
+
 Atom
 Ps_lookup::hairpin (Real width, bool decresc, bool continued) const
 {
index 4600f9b40df1d75f59346a79b145e0f0e5c8e199..d0ad70ef39045c954d357af0b5a73dc3328238b2 100644 (file)
@@ -14,8 +14,6 @@
 #include "array.hh"
 #include "string-convert.hh"
 #include "debug.hh"
-#include "lookup.hh"
-#include "main.hh"
 
 Ps_outputter::Ps_outputter (Paper_stream *s)
   :Paper_outputter (s)
@@ -64,7 +62,7 @@ Ps_outputter::output_molecule (Molecule const*m, Offset o, char const *nm)
   if (check_debug)
     *outstream_l_ << String ("\n%start: ") << nm << "\n";
 
-  Paper_outputter::output_molecule (m, o, nm, "% % {%}placebox \n", "'ps");
+  Paper_outputter::output_molecule (m, o, nm, "% % {%}placebox \n");
 }
 
 void
index 5918dc92fd08f8313e42d4746114d91b3147eb88..7ff133cc285076329bf9b73364fef02fe928c488 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "scope.hh"
-#include "assoc-iter.hh"
+#include "dictionary-iter.hh"
 #include "debug.hh"
 #include "identifier.hh"
 
@@ -16,7 +16,7 @@ void
 Scope::print () const
 {
   bool init_b = false;         // ugh
-  for (Assoc_iter<String,Identifier*> ai (*this);  ai.ok(); ai++)
+  for (Dictionary_iter<Identifier*> ai (*this);  ai.ok(); ai++)
     {
       if (ai.val()->init_b_ == init_b)
        {
@@ -28,7 +28,7 @@ Scope::print () const
 
 Scope::~Scope ()
 {
-  for (Assoc_iter<String,Identifier*>   ai (*this); ai.ok(); ai++)
+  for (Dictionary_iter<Identifier*>     ai (*this); ai.ok(); ai++)
     {
       DOUT << "deleting: " << ai.key() << '\n';
       delete ai.val ();
@@ -38,7 +38,7 @@ Scope::~Scope ()
 Scope::Scope (Scope const&s)
   : Dictionary<Identifier*> (s)
 {
-  for (Assoc_iter<String,Identifier*> ai (s); ai.ok(); ai++)
+  for (Dictionary_iter<Identifier*> ai (s); ai.ok(); ai++)
     {
       (*this)[ai.key ()] = ai.val ()->clone ();
     }
index 8288c16cc1ee1bde71f30e32c6f93ec1fb8fe93b..a0c6f68e8552a8047866cc42351ec8da649d5f2b 100644 (file)
 Score_element_info::Score_element_info (Score_element*s_l, Request*r_l)
 {
   elem_l_ = s_l;
-  lisp_l_ = 0;
-  req_l_ = r_l;
-}
-
-Score_element_info::Score_element_info (Graphical_lisp_element*g_l, Request*r_l)
-{
-  elem_l_ = 0;
-  lisp_l_ = g_l;
   req_l_ = r_l;
 }
 
 Score_element_info::Score_element_info()
 {
   elem_l_ = 0;
-  lisp_l_ = 0;
   req_l_ = 0;
 }
 
index 1c43b8c59e9b0b39810090572a2ff09be0793026..1b30731fd710d69d6e5f80516fb1e6adf5433d2d 100644 (file)
@@ -16,7 +16,6 @@
 #include "score-column.hh"
 #include "command-request.hh"
 #include "paper-def.hh"
-#include "graphical-lisp-element.hh"
 
 
 Score_engraver::Score_engraver()
@@ -118,14 +117,7 @@ Score_engraver::do_announces()
 void
 Score_engraver::typeset_element (Score_element *elem_p)
 {
-  elem_p_arr_.push (elem_p);
-}
-
-void
-Score_engraver::typeset_element (Graphical_lisp_element* elem_p)
-{
-  *mlog << "not typesetting: " << elem_p->static_name () << "\n";
-  delete elem_p;
+  elem_p_arr_.push(elem_p);
 }
 
 void
@@ -139,7 +131,9 @@ Score_engraver::typeset_all()
          Spanner *s = elem_p->access_Spanner ();
          pscore_p_->typeset_unbroken_spanner (s);
 
-           /*
+
+
+                 /*
            do something sensible if spanner not 
            spanned on 2 items.
           */
@@ -234,6 +228,7 @@ Score_engraver::get_staff_info() const
 }
 
 
+
 Music_output*
 Score_engraver::get_output_p ()
 {
index 768d8c42b1ab936de68a0dd5294e6ab6733afc27..8c43bfddfbc9613ec828a2ca89312799ee2d2362 100644 (file)
@@ -50,13 +50,6 @@ Slur_engraver::do_removal_processing ()
     }
 }
 
-/*
-  abracadabra
-  */
-Slur_engraver::Slur_engraver()
-{
-  dir_ =CENTER;
-}
 void
 Slur_engraver::do_process_requests()
 {
@@ -98,17 +91,16 @@ Slur_engraver::do_pre_move_processing()
 {
   Scalar dir (get_property ("slurydirection"));
   Scalar dir2 (get_property ("ydirection"));
-  if (dir.length_i ())
-    {
-      dir_ = (Direction) sign (int(dir));
-    }
-  else if (dir2.length_i ())
-    dir_ = (Direction) sign (int (dir2));
+
+  Direction slurdir = CENTER;
+  if (dir.length_i () && dir.isnum_b ())
+    slurdir = (Direction) sign (int(dir));
+  else if (dir2.length_i () && dir2.isnum_b ())
+    slurdir = (Direction) sign (int (dir2));
   
   for (int i = 0; i < end_slur_l_arr_.size(); i++)
     {
-      if (dir_)
-       end_slur_l_arr_[i]->dir_ = dir_;
+      end_slur_l_arr_[i]->dir_ = slurdir;
       typeset_element (end_slur_l_arr_[i]);
     }
   end_slur_l_arr_.clear();
index 94aba34bea350b9ee019ed8d770f16583f36030e..cc3cecff23140339de16c96438dcf0fd18466a37 100644 (file)
@@ -10,8 +10,7 @@
 #include "debug.hh"
 #include "real.hh"
 #include "atom.hh"
-#include "assoc.hh"
-#include "assoc-iter.hh"
+#include "dictionary-iter.hh"
 #include "symtable.hh"
 
 Symtables::Symtables()
@@ -24,7 +23,7 @@ Symtables::Symtables (Symtables const &s)
 {
   font_ = s.font_;
   font_path_ = s.font_path_;
-  for (Assoc_iter<String, Symtable*>  i (s); i.ok(); i++)
+  for (Dictionary_iter< Symtable*>  i (s); i.ok(); i++)
     {
       add (i.key(), new Symtable (*i.val ()));
     }
@@ -32,7 +31,7 @@ Symtables::Symtables (Symtables const &s)
 
 Symtables::~Symtables()
 {
-  for (Assoc_iter<String, Symtable*>  i (*this); i.ok(); i++)
+  for (Dictionary_iter< Symtable*>  i (*this); i.ok(); i++)
     {
       delete i.val();
     }
@@ -71,7 +70,7 @@ Symtables::operator()(String s)
 void
 Symtables::print() const
 {
-  for (Assoc_iter<String, Symtable*>  i (*this); i.ok(); i++)
+  for (Dictionary_iter<Symtable*>  i (*this); i.ok(); i++)
     {
       DOUT << "table \'" << i.key () << "\' {\n";
       i.val()->print ();
@@ -81,7 +80,7 @@ Symtables::print() const
 void
 Symtable::print() const
 {
-  for (Assoc_iter<String, Atom>  i (*this); i.ok(); i++)
+  for (Dictionary_iter<Atom>  i (*this); i.ok(); i++)
     {
       DOUT << "\'" << i.key() << "\'->" << i.val ().str () << '\n';
     }
@@ -91,5 +90,5 @@ void
 Symtables::add (String s, Symtable*p)
 {
   p-> id_str = s;
-  Dictionary<Symtable*>::add (s,p);
+  Dictionary<Symtable*>::elem  (s) = p;
 }
index 38826066297e9da6297f12cf3f6c05a01a38d13e..4f10886e117fb6b6564d5ea1618df7e1a0cc76fa 100644 (file)
@@ -42,9 +42,9 @@ Tex_lookup::~Tex_lookup()
 }
 
 Atom
-Tex_lookup::afm_find (String s, bool warn) const
+Tex_lookup::afm_find (String s) const
 {
-  return Lookup::afm_find (s, String ("\\char%d"), warn);
+  return Lookup::afm_find (s, String ("\\char%d"));
 }
 
 Atom*
@@ -63,6 +63,12 @@ Tex_lookup::character_str (int i) const
   return Lookup::character_str (i);
 }
 
+Atom
+Tex_lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
+{
+  return embed (Ps_lookup::dashed_slur (controls, thick, dash));
+}
+
 Atom
 Tex_lookup::embed (Atom a) const
 {
index df6a43268a56d5d49f3546a3241bfded5a5327a5..89ebf316237399c3cc5afa0fc84c70e44b287b3e 100644 (file)
@@ -60,7 +60,7 @@ Tex_outputter::output_molecule (Molecule const*m, Offset o, char const *nm)
   if (check_debug)
     *outstream_l_ << String ("\n%start: ") << nm << "\n";
 
-  Paper_outputter::output_molecule (m, o, nm, "\\placebox{%}{%}{%}", "'tex");
+  Paper_outputter::output_molecule (m, o, nm, "\\placebox{%}{%}{%}");
 }
 
 void
index 54e604d572542904ab742f8a38f288b6ec819f47..9ed1ef3b04d5255ede50fd6da0222ced5c2dd7fb 100644 (file)
@@ -105,14 +105,14 @@ Ties_engraver::do_pre_move_processing()
     {
       Scalar tie_dir (get_property ("tieYDirection"));
       Scalar y_dir (get_property ("ydirection"));      
-      Direction dir;
-       if (tie_dir.length_i ())
-         dir = (Direction) sign (int(tie_dir));
-       else if (y_dir.length_i ())
-         dir = (Direction) sign (int (y_dir));
-  
-       end_tie_p_arr_[i]->dir_ = dir;
-       typeset_element (end_tie_p_arr_[i]);
+      Direction dir = CENTER;
+      if (tie_dir.length_i () && tie_dir.isnum_b ())
+       dir = (Direction) sign (int (tie_dir));
+      else if (y_dir.length_i () && y_dir.isnum_b ())
+       dir = (Direction) sign (int (y_dir));
+      
+      end_tie_p_arr_[i]->dir_ = dir;
+      typeset_element (end_tie_p_arr_[i]);
     }
 
   end_tie_p_arr_ = tie_p_arr_;
index 3d5a6ff2d0a4cd5dfcf0d895c2a27fe64cec5ab2..77d0f18b6ebe26e20fe1b90367f96a4a4f587bb0 100644 (file)
@@ -35,13 +35,13 @@ Translator_group::Translator_group()
 void
 Translator_group::check_removal()
 {
-  for (int i =0; i < group_l_arr ().size();)
+  Link_array<Translator_group> groups (group_l_arr ());
+  
+  for (int i =0; i < groups.size(); i++)
     {
-      group_l_arr ()[i]->check_removal();
-      if (group_l_arr ()[i]->removable_b())
-       terminate_translator (group_l_arr ()[i]);
-      else
-       i++;
+      groups[i]->check_removal();
+      if (groups[i]->removable_b())
+       terminate_translator (groups[i]);
     }
 }
 
@@ -86,7 +86,13 @@ Translator_group::set_element (String s, bool add)
 bool
 Translator_group::removable_b() const
 {
-  return !(iterator_count_ || group_l_arr ().size());
+  for (PCursor<Translator*> i (trans_p_list_.top ()); i.ok (); i++)
+    {
+      if (i->access_Translator_group ())
+       return false;
+    }
+
+  return !iterator_count_;
 }
 
 Translator_group *
@@ -94,10 +100,12 @@ Translator_group::find_existing_translator_l (String n, String id)
 {
   if (is_alias_b (n) && (id_str_ == id || id.empty_b ()))
     return this;
+
+  Link_array<Translator_group> groups (group_l_arr ());
   Translator_group* r = 0;
-  for (int i =0; !r && i < group_l_arr ().size(); i++)
+  for (int i =0; !r && i < groups.size(); i++)
     {
-      r = group_l_arr ()[i]->find_existing_translator_l (n,id);
+      r = groups[i]->find_existing_translator_l (n,id);
     }
 
   return r;
@@ -182,8 +190,11 @@ bool
 Translator_group::do_try_request (Request* req_l)
 {
   bool hebbes_b =false;
-  for (int i =0; !hebbes_b && i < nongroup_l_arr ().size() ; i++)
-    hebbes_b =nongroup_l_arr ()[i]->try_request (req_l);
+
+  Link_array<Translator> nongroups (nongroup_l_arr ());
+  
+  for (int i =0; !hebbes_b && i < nongroups.size() ; i++)
+    hebbes_b =nongroups[i]->try_request (req_l);
   if (!hebbes_b && daddy_trans_l_)
     hebbes_b = daddy_trans_l_->try_request (req_l);
   return hebbes_b ;
@@ -258,10 +269,11 @@ Translator_group::remove_translator_p (Translator*trans_l)
 Translator*
 Translator_group::get_simple_translator (char const *type) const
 {
-  for (int i=0; i < nongroup_l_arr ().size(); i++)
+  Link_array<Translator> nongroups (nongroup_l_arr ());
+  for (int i=0; i < nongroups.size(); i++)
     {
-      if (nongroup_l_arr ()[i]->name() == type)
-       return nongroup_l_arr ()[i];
+      if (nongroups[i]->name() == type)
+       return nongroups[i];
     }
   if (daddy_trans_l_)
     return daddy_trans_l_->get_simple_translator (type);
index 4fb79e0c8edbc54005365a71e95bd588cc6530a1..b4e188d32807824cb609593ec97b25b3e43a5264 100644 (file)
@@ -4,9 +4,5 @@ depth = ..
 STEPMAKE_TEMPLATES=makedir
 BLURBS=BLURB # COPERTINA FLAPTEKST
 
-# ifneq ($(strip $(state-vector)),)
-EXTRA_DIST_FILES = STATE-VECTOR
-# endif
-
 include $(depth)/make/stepmake.make 
 
diff --git a/make/STATE-VECTOR b/make/STATE-VECTOR
deleted file mode 100644 (file)
index f03cc5e..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-0.1.76
-0.1.76.jcn1
-0.1.77
-0.1.77.uu1
-0.1.77.hwjc
-0.1.77.jcn1
-0.1.77.jcn2
-0.1.77.hwn1
-0.1.78
-0.1.78.hwn1
-0.1.78.jcn1
-0.1.78.jcn2
-0.1.79
-0.1.79.hwn1
-0.1.79.jcn2
-0.1.80
-0.1.80.jcn1
-0.1.80.eb1
-0.1.80.hwn1
-0.1.81
-0.1.81.jcn1
-0.1.81.jbr2
-0.1.81.jcn2
-0.1.81.jbr1
-0.1.81.jcn1
-0.1.81.hwn1
-0.1.81.hwn2
-0.1.82
-0.1.82.jcn1
-0.1.82.jcn2
-0.1.82.jcn3
-0.1.82.jcn4
-0.1.82.jcn5
-0.1.82.hwn1
-0.1.82.hwn2
-0.1.83
-0.1.83.hwn1
-0.1.83.jcn1
-0.1.83.uu1
-0.1.83.hwn1
-0.1.83.hwn2
-0.1.83.hwn3
-0.1.83.hwn4
-0.1.83.hwn5
-0.1.83.jcn4
-0.1.84
-0.1.84.jcn1
-0.1.84.hwn1
-0.1.84.jcn2
-0.1.84.hwn2
-0.1.84.jcn3
-0.1.84.hwn4
-0.1.85
-0.1.85.jcn1
-0.1.85.hwn1
-0.1.85.jcn2
-1.0.0
-1.0.0.hwn1
-1.0.0.hwn2
-1.0.1
-1.0.1.jbr1
-1.0.1.jcn2
-1.0.1.jbr2
-1.0.2
-1.0.2.hwn1
-1.0.3
-1.0.4.jcn1
-1.0.5
-1.0.5.jbr1
-1.0.5.jcn1
-1.0.5.hwn1
-1.0.6
-1.0.6.uu1
-1.0.7
-1.0.7.jbr1
-1.0.7.hwn1
-1.0.7.uu1
-1.0.8.uu1
-1.0.8
-1.0.8.jcn1
-1.0.8.uu1
-1.0.9
-1.0.9.hwn1
-1.0.9.uu1
-1.0.10
-1.0.10.jcn1
-1.0.10.uu1
-1.0.10.uu2
-1.0.11
-1.0.11.mb1
-1.0.11.uu1
-1.0.12
-1.0.12.uu1
-1.0.13
-1.0.13.jcn1
-1.0.13.jcn2
-1.0.13.jcn3
-1.0.13.jcn4
-1.0.13.jcn5
-1.0.14
-1.0.14.hwn1
-1.0.15
-1.0.15.uu1
-1.0.16
-1.0.16.jcn1
-1.0.16.mb1
index 359053c74f16077d88924a9ba6ea73cf93267320..244a80801f44ad24d36de04121a273d77ec7079e 100644 (file)
@@ -17,7 +17,7 @@ Prereq: tetex
 %prep
 %setup
 %build
-./configure --disable-checking --disable-debugging --enable-printing --prefix=/usr --enable-optimise --enable-shared
+./configure --disable-checking --disable-debugging --enable-printing --prefix=/usr --disable-optimise --enable-shared
 make all
 make -C Documentation info || true
 make htmldoc
@@ -29,7 +29,10 @@ tar -C $RPM_BUILD_ROOT/tmp/lilypond-rpm-doc -xzf out/htmldoc.tar.gz
 
 strip lily/out/lilypond mi2mu/out/mi2mu
 make prefix="$RPM_BUILD_ROOT/usr" install
+
+mkdir -p $RPM_BUILD_ROOT/etc/profile.d
 cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh
+cp buildscripts/out/lilypond-login $RPM_BUILD_ROOT/etc/profile.d/lilypond.csh
 
 %files
 
@@ -42,8 +45,6 @@ cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh
 # %doc input/*.ly
 # verbatim include of input: list the directory without issuing a %dir 
 
-%doc input
-
 /usr/bin/convert-mudela
 /usr/bin/mudela-book
 /usr/bin/ly2dvi
@@ -54,15 +55,12 @@ cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh
 /usr/man/man1/mudela-book.1
 /usr/man/man1/ly2dvi.1
 /usr/man/man1/convert-mudela.1
-/usr/info/lilypond.info*
-/usr/lib/texmf/texmf/tex/generic/lilypond
-/usr/lib/texmf/texmf/fonts/source/public/lilypond
 /usr/share/lilypond/
 /usr/share/locale/*/LC_MESSAGES/lilypond.mo
-/etc/profile.d/lilypond.sh
+/etc/profile.d/lilypond.*
+
+
 %post
 
-## ln -s  /usr/lib/texmf/texmf/tex/lilypond  /usr/lib/texmf/texmf/tex/latex/lilypond # suck me plenty
-texhash                # takes some time...
 touch /tmp/.lilypond-install
 rm `find /var/lib/texmf -name 'feta*pk -print' -or -name 'feta*tfm -print'` /tmp/.lilypond-install
index 1905f1f4dd1def2bd059e0f8e0b9bb1954779bef..74072fb462448c171732fa518b5593137ef11b88 100644 (file)
@@ -23,9 +23,9 @@ $(outdir)/%.fly.txt: %.fly
 .PRECIOUS: $(outdir)/%.dvi
 
 $(outdir)/%.dvi: %.ly
-       $(PYTHON) $(depth)/scripts/ly2dvi32.py -o $(outdir)  $< 
+       $(PYTHON) $(depth)/scripts/ly2dvi.py -o $(outdir)  $< 
        -mv $(basename $<).midi $(outdir)
 
 $(outdir)/%.dvi: %.fly
-       $(PYTHON) $(depth)/scripts/ly2dvi32.py -o $(outdir)  $< 
+       $(PYTHON) $(depth)/scripts/ly2dvi.py -o $(outdir)  $< 
        -mv $(basename $<).midi $(outdir)
index b8ac5e2f64abafa95e9ec6ce3cf448c3edbbe80f..a34c05299ca2ca4f8b6d73efe5a7395ac8f326b4 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Titel: LilyPond
-Versie: 1.0.16
-Inschrijf datum: 14OCT98
+Versie: 1.0.17
+Inschrijf datum: 19OCT98
 Beschrijving: @FLAPTEKST@
 Trefwoorden: muziek typezetten midi notatie
 Auteur: hanwen@stack.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Onderhouden door: hanwen@cs.ruu.nl (Han-Wen Nienhuys)
 Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
-       770k lilypond-1.0.16.tar.gz 
+       770k lilypond-1.0.17.tar.gz 
 Oorspronkelijke plek: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       770k lilypond-1.0.16.tar.gz 
+       770k lilypond-1.0.17.tar.gz 
 Copi-eer voorwaarden: GPL
 End
index a3e081c918063c4d2a28c81ed018327c9a045eda..6f9269827af66d6358f4460493b72f2339162a3b 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title: LilyPond
-Version: 1.0.16
-Entered-date: 14OCT98
+Version: 1.0.17
+Entered-date: 19OCT98
 Description: 
 LilyPond is the GNU Project music typesetter.  This program can print
 beautiful sheet music from a music definition file.  It can also play
@@ -14,8 +14,8 @@ Author: hanwen@cs.ruu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       770k lilypond-1.0.16.tar.gz 
+       770k lilypond-1.0.17.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       770k lilypond-1.0.16.tar.gz 
+       770k lilypond-1.0.17.tar.gz 
 Copying-policy: GPL
 End
index 47350734603e0824786f6aebfc7d30c5fccca4c9..0464aff56a0554dd5efedf94dde848f8918b20fb 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.0.16
+Version: 1.0.17
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.0.16.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.0.17.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@cs.uu.nl>
@@ -23,7 +23,7 @@ a nice font of musical symbols.
 %prep
 %setup
 %build
-./configure --disable-checking --disable-debugging --enable-printing --prefix=/usr --enable-optimise --enable-shared
+./configure --disable-checking --disable-debugging --enable-printing --prefix=/usr --disable-optimise --enable-shared
 make all
 make -C Documentation info || true
 make htmldoc
@@ -35,7 +35,10 @@ tar -C $RPM_BUILD_ROOT/tmp/lilypond-rpm-doc -xzf out/htmldoc.tar.gz
 
 strip lily/out/lilypond mi2mu/out/mi2mu
 make prefix="$RPM_BUILD_ROOT/usr" install
+
+mkdir -p $RPM_BUILD_ROOT/etc/profile.d
 cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh
+cp buildscripts/out/lilypond-login $RPM_BUILD_ROOT/etc/profile.d/lilypond.csh
 
 %files
 
@@ -48,8 +51,6 @@ cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh
 # %doc input/*.ly
 # verbatim include of input: list the directory without issuing a %dir 
 
-%doc input
-
 /usr/bin/convert-mudela
 /usr/bin/mudela-book
 /usr/bin/ly2dvi
@@ -60,15 +61,12 @@ cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh
 /usr/man/man1/mudela-book.1
 /usr/man/man1/ly2dvi.1
 /usr/man/man1/convert-mudela.1
-/usr/info/lilypond.info*
-/usr/lib/texmf/texmf/tex/generic/lilypond
-/usr/lib/texmf/texmf/fonts/source/public/lilypond
 /usr/share/lilypond/
 /usr/share/locale/*/LC_MESSAGES/lilypond.mo
-/etc/profile.d/lilypond.sh
+/etc/profile.d/lilypond.*
+
+
 %post
 
-## ln -s  /usr/lib/texmf/texmf/tex/lilypond  /usr/lib/texmf/texmf/tex/latex/lilypond # suck me plenty
-texhash                # takes some time...
 touch /tmp/.lilypond-install
 rm `find /var/lib/texmf -name 'feta*pk -print' -or -name 'feta*tfm -print'` /tmp/.lilypond-install
index 8dc7c4e1db770e7e89962f65b1364d2bda581903..44f7d3e405a28891596547a2591aff5ec3d1c048 100644 (file)
@@ -33,7 +33,7 @@ all:
 
 -include $(addprefix $(depth)/make/,$(addsuffix -inclusions.make, $(LOCALSTEPMAKE_TEMPLATES)))
 
--include $(addprefix $(depth)/make/,$(addsuffix -inclusions.make, $(STEPMAKE_TEMPLATES)))
+-include $(addprefix $(stepdir)/,$(addsuffix -inclusions.make, $(STEPMAKE_TEMPLATES)))
 
 
 include $(addprefix $(stepdir)/,$(addsuffix -vars.make, $(STEPMAKE_TEMPLATES)))
index 363f3229ddb71e58b1448df859fbc75f523760b1..dfc37de8c9a28afbd88fa8395c2e3fdae78a066b 100644 (file)
@@ -31,9 +31,9 @@ $(outdir)/%.afm $(outdir)/%.ly $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log
 
 TEXINSTALL=$(MAKE) INSTALLATION_OUT_DIR=$(datadir)/tex/ depth=.. INSTALLATION_OUT_FILES="$(TEXTABLES)" -f $(stepdir)/install-outfiles.sub.make $@
 
-AFMINSTALL=$(MAKE) depth=.. INSTALLATION_OUT_DIR=$(datadir)/ INSTALLATION_OUT_FILES="$(AFM_FILES)" -f $(stepdir)/install-outfiles.sub.make $@
+AFMINSTALL=$(MAKE) depth=.. INSTALLATION_OUT_DIR=$(datadir)/afm/ INSTALLATION_OUT_FILES="$(AFM_FILES)" -f $(stepdir)/install-outfiles.sub.make $@
 
-LYINSTALL=$(MAKE) depth=.. INSTALLATION_OUT_DIR=$(datadir) INSTALLATION_OUT_FILES="$(LYTABLES)" -f $(stepdir)/install-outfiles.sub.make $@
+LYINSTALL=$(MAKE) depth=.. INSTALLATION_OUT_DIR=$(datadir)/ly/ INSTALLATION_OUT_FILES="$(LYTABLES)" -f $(stepdir)/install-outfiles.sub.make $@
 
 localinstall: $(ALL_GEN_FILES)
        $(TEXINSTALL)
index 292a5db8998a5eb34a80e82adb073c895d07511c..625c7e0dd379182d4d4c67023d3caa3bc6086634 100644 (file)
@@ -108,7 +108,6 @@ fet_beginchar("prallprall", "prallprall", "prallprall")
        trills := 3;
        set_char_box(trills*twidth#-(trills-1)*0.5toverlap#, trills*twidth#-(trills-1)*0.5toverlap#, theight#, theight#);
        draw_trill_three;
-       draw_mordent(twidth-0.5toverlap);
 fet_endchar;
 
 fet_beginchar("prallmordent", "prallmordent", "prallmordent")
diff --git a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly
new file mode 100644 (file)
index 0000000..733812e
--- /dev/null
@@ -0,0 +1,498 @@
+\header{
+       enteredby = "Tom Cato Amundsen";
+       copyright = "Public Domain";
+       piece = "Capriccio";
+}
+
+%% I takt 22 foretar jeg et stemmekryss mellom stemme en og to, pga at den 
+%% stemmen som tidligere har vært andre stemme, kommeri resten av stykket
+%% ligge Ã¸verst og følgelig er første stemme.
+%% 
+%% Noe liknende skjer ogsÃ¥ i mellom andre og tredje stemme i takt 28
+
+\version "1.0.7";
+
+global = \notes{
+       \time 2/4;
+       \key es;
+       s2*48
+       \bar ":|:";
+       s2*48
+       \bar "|.";
+}
+
+vOne = \type Voice = voiceOne \notes\relative c''{
+       r8 g c4~ |      
+       [c8 d16 c][b a g f] |
+       [es8 g' d, f'] |
+       [es16 d c d][e fis g a] |
+%5
+       [bes g fis g][d g fis g] |
+       [c g fis g][a g fis e] |
+       d8 g4 fis8 |
+       g r r4 |
+%9
+       r16 [c, fis, g][a bes c8~] |
+       [c16 bes a bes][c d e fis] |
+       [g8 fis16 g~] g4~ |
+       [g8 e16 g~] g4~ |
+       [g8 e16 f~] f4~ |
+       [f8~ d16 f~] f4~ |
+       [f16 es d f][es d c b] |
+       [c b c d][es f g8~]
+%17
+       [g16 f es g ][f es d c] |
+       [b a b c][d es f8~] |
+       [f16 as g f][es d c bes!] |
+       [as c f es][d c b d] |
+%21
+       [g f es g][f es d f] |
+%stemmekryss ugh
+       r16 [c b c][g c b c] |
+       [es c a' es][c' es, d c] |
+       [d bes a bes][f bes a bes] |
+%25
+       [d bes g' d][bes' d, c bes] |
+       [c a g a][fis a g a] |
+       [c a fis' c][a' c, bes a] |
+       [bes8 d] g4~ |
+%29
+       [g8 a16 g][fis e d c] |
+       [bes8 d' a, c'] |
+       [g, bes'16 a][g8 bes] |
+       [e, g bes, e] |
+%33
+       [f, as'16 g][f8 as] |
+       [d, f as, d] |
+       es,4 r8 c' |
+       as4 r |
+%37
+       r8 g c4~ |
+       [c8 d16 c][b a g f] |
+       [es8 g' d, f'~] |
+       [f16 es d f][es d c bes] |
+%41
+       [as g as bes][c d es8~] |
+       [es16 d c es][d c bes as] |
+       [g f g as][bes c des8~] |
+       [des16 c bes des][c bes as g] |
+%45
+       as2~ |
+       [as8 g] g4~ |
+       [g8 as16 g][f es d c] |
+       g'2 |
+%49
+       r8 d' g,4~|
+       [g8 f16 g][a b c d] |
+       [es8 c, f' d,]
+       [g'16 as g f][es d c bes] |
+%53
+       [as8 f' g, e'] |
+       [f16 c' e, f] r [c' e, f~] |
+       f4 r |
+       r8 [f16 g][as bes c d,] |
+%57
+       es8 r r4 |
+       r8 [es16 f][g as bes! g] |
+       as8 r r4 |
+       r16 [g f es][d c b a] |
+%61
+       [b c d es] f4~ |
+       [f16 es b c] r [es b c] |
+       r [d b c] r [c b c~] |
+       [c8 g' d f~] |
+%65
+       [f es16 f] g4~ |
+       [g8 f c es~] |
+       [es d16 es] f4~ |
+       [f8 es16 d][c bes a g] |
+       c2~ |
+       c4. c8 |
+       bes4 a |
+       r16 [a' fis g] r16 [a fis g] |
+%73
+       r8 g es4~ |
+       es8 d4 c8~ |
+       [c es d c] |
+       [bes g'][a, fis'] |
+%77
+       g4 r8 f! |
+       b,4 r |
+       r8 g' c,4~ |
+       [c8 bes16 c][d e f g] |
+%81
+       [as16 c8.][as16 c bes c] |
+       [as c8.][as16 bes as bes] |
+       [g bes8.][g16 bes as bes] |
+       [g bes8.][g16 as g as] |
+%85
+       [f as8.][f16 as g as] |
+       [f as8.][f16 g f g] |
+       [es g d g][c, f bes, es] |
+       [as, c f es] f4 |
+%89
+       r8 c g'4~ |
+       [g8 as16 g][f es d c] |
+       b4 r8 es |
+       c4 r |
+%93
+       r8 g f'4~ |
+       [f8 d g <f as,]> |
+       <es4 g,> <d f,> |
+       <c2 g es>
+}
+
+vTwo = \type Voice = voiceTwo \notes\relative c{
+       es4 r8 es |
+       f4 r8 bes |
+       c4. b8 |
+       c r r4 |
+%5
+       r8 d g4~ |
+       [g8 a16 g][fis e d c] | 
+       [bes8 d' a, c'~] |
+       [c16 bes a c][bes a g f!] |
+%9
+       [es8 c] r8 fis! |
+       g r r a! |
+       [bes16 d8.][bes16 des c des] |
+       [bes16 des8.][bes16 c bes c] |
+%13    
+       [as c8.][as16 c bes c] |
+       [as bes8.][as16 bes as bes] |
+       g8 r r4 |
+       r8 [es16 f][g a b! c] |
+%17
+       d8 r r4 |
+       r8 [d,16 es][f g a! b!] |
+       c8 r r4 |
+       r2 |
+%21
+       r8 c4 b8 |
+       es4 r |
+       s2*5 |
+       r16 [g,, fis g][d g fis g]
+%29
+       [c, g' fis g][a g fis e] |
+       d8 g4 fis8 |
+       r16 [g fis g][d g fis g] |
+       [bes g e' bes][g' bes, as g] |
+%33
+       [as f e f][c f e f] |
+       [as f d' as][f' as, g f] |
+       [g8 bes] es4~
+       [es8 f16 es][d c bes as] |
+%37
+       g4 r8 c |
+       f4 r |
+       r8 [es, f g~] |
+       [g g] c4~ |
+%41
+       [c8 c16 d][es f g as] |
+       bes8 f, bes4~ | % HACK vil bruke [...] her
+       [bes8 bes16 c][des es f g] |
+       as8 [g, f e] |  % HACK vil bruke [...] her
+%45
+       [f16 f' e g][f es d! c] |
+       b4 r8 es |
+       c2 |
+       b2 |
+%49
+       b4 r8 d |
+       g, c4 b8 |
+       r16 [g as g] r [f g f] |
+       es8 g' c,4~ | % HACK vil egentlig bruke [...]
+%53
+       [c8 bes16 c][d e f g] |
+       [as8 f,][bes' g,] |
+       [c'16 des c bes][as g f es!] |
+       [d!16 c d es][f g as8~] |
+%57
+       [as16 c bes as][g f es d] |
+       [c b c d][es f g8~] |
+       [g16 bes as g][f es d c] |
+       b8 r r4 |
+%61
+       r4 r8 d'8 |
+       g,4 f |
+       es d |
+       [es8 es' b d~] |
+%65
+       d4. [c16 bes] |
+       a4. c8 |
+       c4. [bes16 as] |
+       g4 r |
+%69
+       r8 [bes as g] |
+       [fis a] d,4~ |
+       [d8 c16 d][e fis g a!] |
+       [bes8 g,][c' a,]
+%73
+       d'4. c8 |
+       fis, bes4 a8~ |
+       [a fis g a] |
+       d, r r16 [es' d c] |
+%77
+       [b8 d] g,4~ |
+       [g8 f16 g][a b! c d] |
+       [es b, c d][es f g as!] |
+       [bes! as g as][bes c d e!] |
+%81
+       [f8 e16 f~] f4~ |
+       [f8 e16 f~] f4~ |
+       [f8 d16 es!~] es4~ |
+       [es8 d16 es~] es4~ |
+%85
+       [es8 c16 d~] d4~ |
+       [d8 c16 d~] d4 |
+       [c8 bes! as g] |
+       f4 r16 [c' b d] |
+%89
+       g,4 r8 es' |
+       c4 r |
+       r8 d, g4~ |
+       [g8 as16 g][f es d c] |
+%93
+       b4 r8 d' |
+       [g, b c d~] |
+% ???
+% What have i misunderstood? I want the note_head not to collide with
+% i hotehead i vOne
+       \property Voice.hshift = -1
+       d 
+       \property Voice.hshift = 0
+       c4 b8 |
+}
+vThree = \type Voice = voiceThree \notes\relative c{
+       \stemdown
+       c4 r8 c |
+       d4 r |
+       r8 [es f g] |
+       [c, c' bes! a] |
+%5
+       g4 r8 g |
+       a4 r |
+       r8 [bes, c d] |
+       [g, d'] g4~ |
+%9
+       [g8 a16 g][fis e d c] |
+       [bes8 d' a, c'] |
+       [g, bes' f,! as'!] |
+       [e, g' c,, e']
+%13
+       [f, as' es,! g'] |
+       [d, f' bes,, d'] |
+       [es, es' f g] |
+       as r8 r4 |
+%17
+       r8 [d, es f] |
+       g r8 r4 |
+       r8 g c4~ |
+       [c8 d16 c][b a g f] |
+%21
+       [es8 g' d, f'] |
+       [c, es'16 d][c8 es] |
+       [a, c f, a] |
+       [bes, d'16 c][bes8 d] |
+%25
+       [g, bes es, g] |
+       [a, c'16 bes][a8 c] |
+       [fis, a d, fis] |
+       g,8 r bes r |
+%29
+       a r c r |
+       r [bes c d] |
+       g, r bes r |
+       r4 c8 r |
+%33
+       f r as, r |
+       r4 bes8 r |
+       r16 [f'16 es d][c bes as g] |
+       [f es' d c][bes as g f] |
+%37
+       [es d' c bes][as g f es] |
+       [d c' b a][g f es d] |
+       c8 c'4 b8 |
+       c4 r16 [c d es] |
+%41
+       f8 r r4 |
+       bes,4 r16 [bes c d] |
+       es8 r r4 |
+       r8 [as, bes c] |
+%45
+       [f, c'] f4~ |
+       [f16 es d f][es d c bes] |
+       [as8 g] as4^\mordent |
+       g2
+%49
+       g'4 r8 f |
+       es4 d |
+       c8 r d r |
+       es4 r8 e |
+%53
+       f4 [bes8 c] |
+       f8 r g r |
+       [as f,g as] |
+       bes r r4 |
+%57
+       r8 [es, f g] |
+       as r r4 |
+       r8 [d, es f] |
+       [g d] g,4~ |
+%61
+       [g8 f16 g][a b c d] |
+       [es8 c, f' d,] |
+       [g' es, as' f,] |
+       [g'16 g, g' as][g f es d] |
+%65
+       [c g' c d][c bes a g] |
+       [f f, f' g][f es d c] |
+       [bes f' bes c][bes as! g f] |
+       [es es, es' f][es d c bes] |
+%69
+       [a g a bes][c d es c] |
+       [d c d e][fis g a fis] |
+       [g8 es c d] |
+       g, r es' r |
+%73
+       [bes16 g' fis g][c, a' fis g] |
+       [d bes' fis g][es c' fis, g] |
+       [fis, es' d c][bes a g fis] |
+       [g f! es d][c8 d] |
+%77
+       [g16 fis g a][b c d es] |
+       [f es d es][f g a b] |
+       c8 r r c |
+       e, r r c' |
+%81
+       [f, as' es, g'] |
+       [d, f' bes,, d'] |
+       [es, g' d, f'] |
+       [c, es' as,, c'] |
+%85
+       [d,8 f' c, es'] |
+       [b, d' g,, b'] |
+       [c, g'] c4~ |
+       [c8 d16 c][b a g f] |
+%89
+       [es d c d][es f g es] |
+       [as g f g] as4~ |
+       [as16 as g f][es d c bes!] |
+       [as g' f es][d c b a] |
+%93
+       [g es' d c][b a g f] |
+       [es as g f][es d es f] |
+       [g c es fis][g8 g,] |
+       <c2 c,>
+}
+
+vOneSwitch = \type Voice = voiceOne \notes{
+       s2*4
+%5
+       \stemup s2*17
+%22
+       \stemdown s16*1
+       \stemboth s16*7
+%23
+       s2*12 
+%35
+       s4 \stemup s4 
+       s2*3
+%39
+       \stemboth s2*2
+%41
+       \stemup s2*8
+%49
+       \stemboth s2*3
+%52
+       \stemup s2*8
+%60
+       \stemboth s2
+%61
+       \stemup s2*35
+%96
+       \stemboth
+}
+
+vTwoSwitch = \type Voice = voiceTwo \notes{
+       \stemup s2*4 
+%5
+       \stemdown \translator Staff = treble s2*17
+%22
+       \stemup
+       s2*6
+%28
+       \translator Staff = bass s2*7
+%35
+       s4 \translator Staff = treble \stemdown s4
+       s2*3
+%39    
+       \translator Staff = bass \stemup s2*2
+%41
+       s4 \translator Staff = treble \stemdown s4
+%42
+       s8 \translator Staff = bass \stemup s8*3 
+%43
+       s4 \translator Staff = treble \stemdown s4
+%44
+       s8 \translator Staff = bass \stemup s8*3
+%45
+       \translator Staff = treble \stemdown s2*4
+%49
+       \stemup \translator Staff = bass s2*3
+%52
+       s8*1 \stemdown \translator Staff = treble \stemdown s8*3
+       s2*7
+%60
+       \stemup \translator Staff = bass s2
+%61
+       \translator Staff = treble \stemdown s2*35
+}
+
+vThreeSwitch = \type Voice = voiceThree \notes{
+       \stemdown s2*6
+%7
+       \stemboth s2*21
+%28
+       \stemdown s2*7
+%35
+       s4 \stemboth s4
+%36
+       s2*3
+%39
+       \stemdown s2*7
+%46
+       \stemboth s2*3
+%49
+       \stemdown s2*3
+%52
+       s4 \stemboth s4
+       s2
+%54
+       s2*2 %HACK evt endre her, sammenlikne med Henle 
+%56
+       s2*4
+%60
+       \stemdown 
+}
+
+\score{
+       \type GrandStaff<
+               \type Staff = treble <
+                       \global
+                       \vOneSwitch
+                       \vOne
+               >
+               \type Staff = bass <                    
+                       \clef bass;
+                       \global
+                       \vTwoSwitch
+                       \vTwo
+                       \vThreeSwitch
+                       \vThree
+               >
+       >
+       \paper{
+       }
+       \midi{\tempo=60;}
+}
index ffaa8941cd97f9f4ed944c7e3fb0b63ce310e5c0..b6936163370ef5f394a93717dda14fb5fb5b82e2 100644 (file)
@@ -29,8 +29,8 @@ either.
 
       /Mats
 
-Tested Features: Note placement, multipart score, figured base, \breve,
-       time signature styles
+
+Tested Features: Note placement, multipart score, figured base, \breve
 
 %}
 %{
@@ -47,28 +47,8 @@ definition below. --MB
 
 \version "1.0.7";
 
-global = \notes {
-  \property StaffGroup.timeSignatureStyle = "old"
-  \time 4/4;
-  \tempo 4=80;
-  \skip 1*31;
-  \property StaffGroup.timeSignatureStyle = "1"
-  \time 3/2;
-  \bar ":|:";
-  \tempo 2=140;
-  \skip 1.*15;
-  \property StaffGroup.timeSignatureStyle = "old"
+vi1=\notes \relative c'' {
   \time 4/4;
-  \tempo 4=80;
-  \skip 1;
-  \bar ":|:";
-  \skip 1*13;
-  \bar "|.";
-}
-
-vi1=\type Staff = vi1 <
-\global
-\notes \relative c'' {
 
   [d8 d d d] d4 [a16 b c a] |
   [b8 g ][ g g16 a][ b8 g ][ g g16 a] | 
@@ -100,8 +80,9 @@ vi1=\type Staff = vi1 <
   [c8 g ][ g g16 f] e4 d |
   r8 g [g g16 f] e4 d |
   r8 [d16 a ][ b8 b16 c] a2 |
-  b1 | 
-
+  b1 |
+  \time 3/2;
+  \tempo 2=140;
   r4 d d d d d |
   e1. |
   r4 c c c c c |
@@ -117,7 +98,8 @@ vi1=\type Staff = vi1 <
   a4 [c8 b] a4 [b8 c] f,4 [g8 a] |
   d,4 g g g g g |
   a [d,8 c] b4 [c8 d] a2 |
-
+  \time 4/4;
+  \tempo 4=80;
   b1 |
   [d8 d d d] d4 [a16 b c a] |
   [b8 g ][ g g16 a] [b8 g ][ g g16 a] | 
@@ -132,11 +114,11 @@ vi1=\type Staff = vi1 <
   fis4 g2 fis!4 |
   \cadenza 1;
   g\breve
-}>
+  \bar "|.";
+}
 
-vi2=\type Staff = vi2 <
-\global
-\notes \relative c'' {
+vi2=\notes \relative c'' {
+  \time 4/4;
 
   r1 | r | r | 
   [d8 d d d] d4 [a16 b c a] |
@@ -167,7 +149,7 @@ vi2=\type Staff = vi2 <
   e4 d r8 [c16 g ][ b8 b16 c] |
   a4 g2 fis4 |
   g1 |
-
+  \time 3/2;
   r1. |
   r4 [g'8 f] e4 [f8 g] c,4 [d8 e] |
   a,1. |
@@ -183,7 +165,7 @@ vi2=\type Staff = vi2 <
   c,4 a a a a a |
   b [d8 c] b4 [c8 d] d,4 e |
   fis2 g fis! |
-
+  \time 4/4;
   g1 |
   r1 | r1 |
   [g'8 g g g] g4 [d16 e f d] |
@@ -197,13 +179,13 @@ vi2=\type Staff = vi2 <
   [a d c b ][ a g fis e] d4 d' |
   \cadenza 1;
   b\breve
-}>
+  \bar "|.";
+}
 
 
-bc=\type Staff = bc <
-\global
-\notes\transpose c'{
+bc=\notes\transpose c'{
   \clef "bass";
+  \time 4/4;
 
   G2 d^"4 3" | G1 |
   g2 c4 G | d1^"3 4 3" |
@@ -221,7 +203,7 @@ bc=\type Staff = bc <
   G1^"3 4 3" | c4 B c g |
   c B c G | d1^"3 4 3" |
   G1 |
-
+  \time 3/2;
   g1. | c |
   f | d^"\\textsharp" |
   g | c |
@@ -230,9 +212,8 @@ bc=\type Staff = bc <
   d^"\\textsharp" | e |
   f | g1 B2 |
   d1.^"3 4 3" |
-
+  \time 4/4;
   G1 |
-  \bar ":|:";
   g2 fis | g G |
   g1^"3 4 3" | c |
   G^"3 4 3" | c2 G |
@@ -241,10 +222,12 @@ bc=\type Staff = bc <
   ) d^"3 4 3" | 
   \cadenza 1;
   G\breve 
-}>
+  \bar "|.";
+}
 
 \score{
   \type StaffGroup <
+    \property StaffGroup.timeSignatureStyle = "old"
     \vi1
     \vi2
     \bc
index 6f414ded45ce9eccb0b67374d6c251dd69af98e4..b954530259223cea10bec4414641b8e92cd06d24 100644 (file)
@@ -1,7 +1,7 @@
 # bin/Makefile
 
 depth = ..
-SEXECUTABLES=convert-mudela mudela-book ly2dvi ly2dvi32
+SEXECUTABLES=convert-mudela mudela-book ly2dvi 
 STEPMAKE_TEMPLATES=script
 
 
index a51f700c675e7f28656fa1afc94fc07a7eda2303..ee6d05a22938dffc670d2335678df600fe3fda2d 100644 (file)
@@ -22,11 +22,11 @@ import sys
 import __main__
 import getopt
 from string import *
-import regex
-import regsub
+import re
+
 import time
-mudela_version_re_str ='\\\\version *\"\(.*\)\"'
-mudela_version_re = regex.compile(mudela_version_re_str)
+mudela_version_re_str = '\\\\version *\"(.*)\"'
+mudela_version_re = re.compile(mudela_version_re_str)
 
 def program_id ():
        return '%s version %s' %(program_name,  version);
@@ -65,8 +65,9 @@ def version_cmp (t1, t2):
 
 def guess_mudela_version(filename):
        s = gulp_file (filename)
-       if mudela_version_re.search(s) <> -1:
-               return mudela_version_re.group(1)
+       m = mudela_version_re.search (s)
+       if m:
+               return m.group(1)
        else:
                return ''
 
@@ -97,7 +98,7 @@ if 1:                                 # need new a namespace
        def conv (lines):
                found =0
                for x in lines:
-                       if regex.search ('\\\\octave', x) <> -1:
+                       if re.search ('\\\\octave', x):
                                found = 1
                                break
                if found:
@@ -114,9 +115,9 @@ if 1:                                       # need new a namespace
        def conv (lines):
                newlines = []
                for x in lines:
-                       x = regsub.gsub ('\\\\textstyle\\([^;]+\\);',
+                       x = re.sub ('\\\\textstyle([^;]+);',
                                         '\\\\property Lyrics . textstyle = \\1', x)
-                       x = regsub.gsub ('\\\\key\\([^;]+\\);', '\\\\accidentals \\1;', x)
+                       x = re.sub ('\\\\key([^;]+);', '\\\\accidentals \\1;', x)
                        newlines.append (x)
                return newlines
                
@@ -129,9 +130,9 @@ if 1:                                       # need new a namespace
        def conv (lines):
                newlines = []
                for x in lines:
-                       x = regsub.gsub ('\\\\musical_pitch',
+                       x = re.sub ('\\\\musical_pitch',
                                         '\\\\musicalpitch',x)
-                       x = regsub.gsub ('\\\\meter',
+                       x = re.sub ('\\\\meter',
                                         '\\\\time',x)
                        newlines.append (x)
                return newlines
@@ -153,11 +154,11 @@ if 1:                                     # need new a namespace
        def conv (lines):
                newlines = []
                for x in lines:
-                       x = regsub.gsub ('\\\\accidentals',
-                                        '\\\\keysignature',x)
-                       x = regsub.gsub ('specialaccidentals *= *1',
+                       x = re.sub ('\\\\accidentals',
+                                   '\\\\keysignature',x)
+                       x = re.sub ('specialaccidentals *= *1',
                                         'keyoctaviation = 0',x)
-                       x = regsub.gsub ('specialaccidentals *= *0',
+                       x = re.sub ('specialaccidentals *= *0',
                                         'keyoctaviation = 1',x)
                        newlines.append (x)
                return newlines
@@ -171,7 +172,7 @@ if 1:
        def conv(lines):
                found = 0
                for x in lines:
-                       if regex.search ('\\\\header', x) <> -1:
+                       if re.search ('\\\\header', x):
                                found = 1
                                break
                if found:
@@ -184,7 +185,7 @@ if 1:
        def conv(lines):
                newlines =[]
                for x in lines:
-                       x =  regsub.gsub ('\\\\melodic', '\\\\notes',x)
+                       x =  re.sub ('\\\\melodic', '\\\\notes',x)
                        newlines.append (x)
                return newlines
        
@@ -194,8 +195,8 @@ if 1:
        def conv(lines):
                newlines =[]
                for x in lines:
-                       x =  regsub.gsub ('default_paper *=', '',x)
-                       x =  regsub.gsub ('default_midi *=', '',x)                      
+                       x =  re.sub ('default_paper *=', '',x)
+                       x =  re.sub ('default_midi *=', '',x)                   
                        newlines.append (x)
                return newlines
        
@@ -205,8 +206,8 @@ if 1:
        def conv(lines):
                newlines =[]
                for x in lines:
-                       x =  regsub.gsub ('ChoireStaff', 'ChoirStaff',x)
-                       x =  regsub.gsub ('\\output', 'output = ',x)
+                       x =  re.sub ('ChoireStaff', 'ChoirStaff',x)
+                       x =  re.sub ('\\output', 'output = ',x)
                        newlines.append (x)
                return newlines
        
@@ -215,9 +216,9 @@ if 1:
 if 1:
        def conv(lines):
                newlines =[]
-               found = 0
+               found = None
                for x in lines:
-                       found = regex.search ('[a-zA-Z]+ = *\\translator',x) <> -1
+                       found = re.search ('[a-zA-Z]+ = *\\translator',x)
                        newlines.append (x)
                        if found: break
                if found:
@@ -232,7 +233,7 @@ if 1:
        def conv(lines):
                newlines =[]
                for x in lines:
-                       x =  regsub.gsub ('\\\\lyric', '\\\\lyrics',x)
+                       x =  re.sub ('\\\\lyric', '\\\\lyrics',x)
                        newlines.append (x)
                return newlines
        
@@ -270,7 +271,7 @@ def do_conversion (infile, from_version, outfile, to_version):
 
        for x in lines:
                if last_conversion:
-                       x = regsub.sub (mudela_version_re_str, '\\version \"%s\"' % tup_to_str (last_conversion), x)
+                       x = re.sub (mudela_version_re_str, '\\\\version \"%s\"' % tup_to_str (last_conversion), x)
                outfile.write(x)
 
 class UnknownVersion:
@@ -322,6 +323,7 @@ def do_one_file (infile_name):
                os.rename (infile_name + '.NEW', infile_name)
 
        sys.stderr.write ('\n')
+       sys.stderr.flush ()
 
 edit = 0
 to_version = ()
diff --git a/scripts/ly2dvi-old.sh b/scripts/ly2dvi-old.sh
new file mode 100644 (file)
index 0000000..b2e0330
--- /dev/null
@@ -0,0 +1,1005 @@
+#!/bin/sh
+#
+# Script to make a LaTeX file for Lilypond
+#
+# Written by Jan Arne Fagertun <Jan.A.Fagertun@energy.sintef.no>
+#  Sat Nov 22 22:26:43 CET 1997
+#
+# $Id: ly2dvi.sh,v 1.16 1998/05/08 21:18:34 janaf Exp $
+#
+#  Original LaTeX file made by Mats Bengtsson, 17/8 1997
+#
+
+VERSION="0.12.jcn1"
+NAME=ly2dvi.sh
+IDENTIFICATION="$NAME $VERSION" 
+NOW=`date`
+echo "$IDENTIFICATION" 1>&2
+
+# TODO:
+#  prevent orphaned "Lily is here" strings
+
+# NEWS
+
+# 0.12.jcn1
+#  - mudelaDefs really fixed (sorry, PC)
+
+# 0.12
+#  - -S/--sourcedir switch
+
+#
+#0.11.jcn3
+# - mudelaDefs fixes, (thanks PC)
+#0.11.jcn2
+# - pass -I, --include to Lily
+# - bf: split $LILYINCLUDE and try all dirs
+# - bf: geometry left/top
+#
+#0.11.pc
+# - fix backslash gobbling, reduce number of separate processes used
+# - require readable rc files, allow rc file in /usr/local/share/lilypond/lilyrc
+# - use latex path, not tex path
+# - Don't override if kpsepath returns non-NULL
+# - Don't clobber x.tex if it wasn't created by ly2dvi
+#
+#
+#0.11.jcn1
+# - find .fly files too
+#
+#0.11.hwn1
+# - height vs heigth
+# - robustification: give \nonstopmode as LaTeX arg; no hanging if no TeX file.
+# - robustification: notice failed cp.
+
+#0.11
+#      - more papersizes (thanks Han-Wen) - don't expect LaTeX to accept all...
+#      - -W,--Width=       : set paper width  (points)
+#       - -H,--Height=      : set paper height (points)
+#      - -H and -W is used only when an unknown papersize is to be specified,
+#        and has to be combined with a papersize option known to LaTeX
+#NB!   - -F,--headers=     : name of additional LaTeX headers input file.
+#NB!      Changed from -H to -F
+#      - -d,--dependencies : passed to lilypond
+
+
+#0.10.jcn1
+#      - HEIGHT -> HEIGHT
+#      - vertical margins (for a4), same on both sides
+#      - textheight from lilypond output file (mudelapapertextheight)
+#      - piece titling
+#      - mudelapiece, mudelaopus
+#
+#0.10
+#      - -K,--keeplilypond : Keep lilypond output files (default delete)
+#      - -k,--keeply2dvi   : Keep ly2dvi   output files (default delete)
+#      - -L,--landscape    : Set landscape orientation
+#      - -N,--nonumber     : Turn off page numbering (\pagestyle{empty})
+#      - Could not reinsert "\usepackage[T1]{fontenc}" because
+#        "los-toros" won't work with it
+#      - Ekstra LaTeX headers from input file
+#0.9.hwn1
+#       - option to remove output of lily
+# 0.9
+#      - Trap Lilypond abort
+#      - Replaced "\usepackage[T1]{fontenc}" with
+#        \usepackage[latin1]{inputenc} (takk, Mats)
+#      - Removed "()" around "\LilyIdString" (Janne didn't want it)
+# 0.8  - Trap Lilypond segmentation fault
+#      - Function for cleanup
+#      - Trap line
+#      - More human-readable variables
+#      - Some logics concerning rc-files
+# 0.7
+#      - Improved Lilypond error checking
+#      - Output orientation (landscape...). Overrides mudela file
+#        variable orientation="landscape";
+#      - Paper width and height put into variables (only A4!)
+#      - Adjusted top margin to default.....
+#
+#TODO
+#      - Include more papersizes.
+#      - Manual page.......
+# 0.6.jaf2
+#      - LILYINCLUDE update
+#
+# 0.6.hwn1
+#      - handle LILYINCLUDE
+#       - --output
+#
+# 0.6
+#      - Source rc-files, if present. Files are:
+#        /usr/local/share/lilyrc /etc/lilyrc $HOME/.lilyrc ./.lilyrc
+#      - tee output from Lilypond
+#      - Handles margins for A4 paper (equal on both sides)
+#      - new option -s (--separate) for one LaTeX run per file,
+#        else all files are run together
+#
+# 0.5
+#      - More useful ("two-level") debug.
+#      - The Q&D hack to find file names and not handling \include
+#        is replaced by grabbing output file names from Lilypond.
+#      = Detects multiple output files - adds them when running
+#        LaTeX.
+#      - Works with multiple input files - no matter if they are
+#        (a mix of) input to or output from Lilypond.
+#
+#TODO
+#      - Still no margins handling.
+#      - We have to discuss how to handle multiple output files
+#        from Lilypond - 'ly2dvi standchen' gives a rather odd
+#        result....
+
+# 0.4.1
+#      - Always exit after printing help info
+# 0.4
+#      - Changes to ensure for more strict grep'ing of parameters
+#        Thanks to from G.B.Stott@bolton.ac.uk
+#      - More efficient use of sed -e 's///' -e 's///'
+#        Thanks to Johan Vromans <jvromans@squirrel.nl> and GBS
+#      - Ask tex for location of titledefs.tex (Thanks to JV)
+#      - Accept only exact match of "\def\mudelacomposer{"
+#        (or whatever mudela* defined in titledefs.tex)
+#      - Even more efficient use of sed (Thanks to JV)
+#      - Default file name for single output file implemented.
+#      - Moved help into function - finally included from 0.1.jcn1
+#
+#TODO
+#      - Still doesn't handle \include
+#      - The Q&D for finding output file name from the sequence of
+#        \paper \output \midi \output really needs to be looked at.
+#        I have improved it a lot, but it's only capable of finding
+#        one (the last) file name.
+#        Well, I have to rewrite this entirely to handle \include,
+#        then I can fix it.
+#      - Still no margins handling.
+#
+#WARNING
+#      - Some lines of output from lilypond do NOT start
+#        at first character position, therefore I have removed "^"
+#        in sed'ing and grep'ing.
+
+# 0.3.hwn1
+#      - add "Creator: " line to output
+#
+# 0.3
+#      - multiple input files to make score from several files
+#        (extra files assumed to be Lilypond output)
+#      - cp dvi-file instead of mv, to allow for xdvi reload
+#      - check for illegal long options
+#      - put in pt in text width, if not given
+#      - put in \nonstopmode in LaTeX file
+#      - restored LaTeX exit value check
+# 0.2.1
+#      - temporarily omit LaTeX exit value check
+#      - remove ALL temporary files
+
+# 0.2
+#      - fix for solaris          - included from 0.1.jcn1
+#      - long option hack         - included from 0.1.jcn1 - modified
+#      - moved help into function - NOT included from 0.1.jcn1 yet
+#      - various improvements     - included from 0.1.jcn1
+#      - find mudela definitions from titledefs.tex
+#      - find papersize from lilypond output file (mudelapapersize),
+#        overridden by option '-p size' or '--papersize=size'
+#      - option -l lang or --language=lang overrides
+#        lilypond output file definition (mudelalanguage)
+#      - textwidth from lilypond output file (mudelapaperlinewidth)
+
+# 0.1.jcn1
+#      - fix for solaris
+#      - long option hack
+#      - moved help into function
+
+#
+# Clean up
+#
+cleanup() {
+  if [ "$KEEP_LY2DVI_OUTPUT" != "Y" ]
+  then
+    [ -n "$LatF" -a -f "$LatF" ]       && rm -f $LatF
+    [ -n "$LOGFILE" -a -f "$LOGFILE" ] && rm -f $LOGFILE
+    [ -n "$FN" ]                       && rm -f $FN.*
+    for F in *$$* $TMP/*$$*
+    do
+      rm -f $F
+    done
+  fi
+  if [ "$KEEP_LILY_OUTPUT" != "Y" ]
+  then
+    for F in $LILY_OUTPUT_FILES
+    do
+      [ -f $F ] && rm -f $F
+    done
+  fi
+}
+
+#
+# print usage
+#
+help() {
+  cat << EOF
+Generate dvi file from mudela or lilypond output
+Usage: $0 [OPTION]... [FILE]...
+
+Options:
+  -D,--debug           increase verbosity
+  -F,--headers=        name of additional LaTeX headers file
+  -H,--Height=         set paper height (points) (see manual page)
+  -I,--include=DIR     add DIR to search path of LilyPond
+  -K,--keeplilypond    keep lilypond output files
+  -L,--landscape       set landscape orientation
+  -N,--nonumber        switch off page numbering
+  -O,--orientation=    set orientation (obsolete - use -L instead) 
+  -W,--Width=          set paper width (points) (see manual page)
+  -d,--dependencies    tell lilypond make a dependencies file
+  -h,--help            this help text
+  -k,--keeply2dvi      keep ly2dvi output files
+  -l,--language=       give LaTeX language (babel)
+  -o,--output=         set output directory
+  -p,--papersize=      give LaTeX papersize (eg. a4)
+  -s,--separate        run all files separately through LaTeX
+  -S,--sourcedir       set sourcedir 
+
+  files may be (a mix of) input to or output from lilypond(1)
+EOF
+}
+
+
+#
+# SVr4 echo swallows backslashes, and there's no way to turn it off.
+# Therefore use Echo whenever backslashes may be important.
+# printf is in the posix.2 standard -- which means it's in 
+# all modern shells.
+#
+Echo() {
+       printf "%s\n" "$@"
+}
+
+#
+setPaperZize() {
+case "$PAPERSIZE" in
+  a0*)
+    PWIDTH=2389
+    PHEIGHT=3381
+    PAPERSIZE=a0paper
+    ;;
+  a1|a1p*)
+    PWIDTH=1690
+    PHEIGHT=2389
+    PAPERSIZE=a1paper
+    ;;
+  a2*)
+    PWIDTH=1194
+    PHEIGHT=1690
+    PAPERSIZE=a2paper
+    ;;
+  a3*)
+    PWIDTH=845
+    PHEIGHT=1194
+    PAPERSIZE=a3paper
+    ;;
+  a4*)
+    PWIDTH=597
+    PHEIGHT=845
+    PAPERSIZE=a4paper
+    ;;
+  a5*)
+    PWIDTH=423
+    PHEIGHT=597
+    PAPERSIZE=a5paper
+    ;;
+  a6*)
+    PWIDTH=298
+    PHEIGHT=423
+    PAPERSIZE=a6paper
+    ;;
+  a7*)
+    PWIDTH=211
+    PHEIGHT=298
+    PAPERSIZE=a7paper
+    ;;
+  a8*)
+    PWIDTH=305
+    PHEIGHT=211
+    PAPERSIZE=a8paper
+    ;;
+  a9*)
+    PWIDTH=105
+    PHEIGHT=305
+    PAPERSIZE=a9paper
+    ;;
+  a10*)
+    PWIDTH=74
+    PHEIGHT=105
+    PAPERSIZE=a10paper
+    ;;
+  b0*)
+    PWIDTH=2847
+    PHEIGHT=4023
+    PAPERSIZE=b0paper
+    ;;
+  b1*)
+    PWIDTH=2012
+    PHEIGHT=2847
+    PAPERSIZE=b1paper
+    ;;
+  b2*)
+    PWIDTH=1423
+    PHEIGHT=2012
+    PAPERSIZE=b2paper
+    ;;
+  b3*)
+    PWIDTH=1006
+    PHEIGHT=1423
+    PAPERSIZE=b3paper
+    ;;
+  b4*)
+    PWIDTH=712
+    PHEIGHT=1006
+    PAPERSIZE=b4paper
+    ;;
+  b5*)
+    PWIDTH=503
+    PHEIGHT=712
+    PAPERSIZE=b5paper
+    ;;
+  archA)
+    PWIDTH=650
+    PHEIGHT=867
+    ;;
+  archB)
+    PWIDTH=867
+    PHEIGHT=1301
+    ;;
+  archC)
+    PWIDTH=1301
+    PHEIGHT=1734
+    ;;
+  archD)
+    PWIDTH=1734
+    PHEIGHT=2602
+    ;;
+  archE)
+    PWIDTH=2602
+    PHEIGHT=3469
+    ;;
+  flsa|flse)
+    PWIDTH=614
+    PHEIGHT=940
+    ;;
+  halfletter)
+    PWIDTH=397
+    PHEIGHT=614
+    ;;
+  ledger)
+    PWIDTH=1229
+    PHEIGHT=795
+    ;;
+  legal)
+    PWIDTH=614
+    PHEIGHT=1012
+    ;;
+  letter)
+    PWIDTH=614
+    PHEIGHT=795
+    ;;
+  note)
+    PWIDTH=542
+    PHEIGHT=723
+    ;;
+  *)
+    echo ""
+    echo $0": unknown papersize -- "$PAPERSIZE
+    echo ""
+    ;;
+esac
+}
+
+doRcFiles()
+{
+#
+# RC-files ?
+#
+for D in /usr/local/share/ /usr/local/share/lilypond/ /etc/ $HOME/. ./.
+do
+  RCfile=$D"lilyrc"
+  [ -r $RCfile ] && . $RCfile
+done
+fORI=$ORIENTATION
+fLNG=$LANGUAGE
+fPSZ=$PAPERSIZE
+fLHF=$LATEXHF
+unset ORIENTATION LANGUAGE PAPERSIZE LATEXHF
+}
+
+
+
+#
+# Trap function (cleanup)
+#
+
+
+
+trap cleanup 0 9 15
+
+
+
+#
+# Various defaults
+#
+[ -z "$TMP" ] && TMP=/tmp
+if [ ! -d $TMP ]
+then
+  $debug_echo $IDENTIFICATION": temporary directory "$TMP" not found, set to /tmp"
+  TMP=/tmp
+fi
+LOGFILE=$TMP/lilylog.$$                        # Logfile for lilypond
+PAPERSIZE=a4                            # Default papersize name
+PWIDTH=597                              # Default paperwidth
+PHEIGHT=845                             # Default paperheight
+PNUM="%"                                # Page numbering on
+LILYOPTS=""                             # Options to lilypond
+SOURCEDIR=""
+LILYPOND_EXECUTABLE=lilypond
+doRcFiles
+
+
+
+# Keywords defined in titledefs.tex
+#
+TF="`kpsewhich -n latex tex titledefs.tex`"
+MU_DEF=""
+if [ -r "${TF:=/usr/local/share/texmf/tex/lilypond/titledefs.tex}" ]
+then
+  MU_DEF=`sed -n -e 's/.*newcommand\*{.\(mudela[^}]*\)}.*$/\1/p' "$TF"`
+fi
+
+: "${MU_DEF:=mudelatitle mudelasubtitle mudelacomposer \
+          mudelameter mudelaopus mudelaarranger mudelapiece \
+         mudelapoet mudelainstrument \
+         }"
+
+#
+# debugging
+#
+debug_echo=:
+#
+# All files in one LaTeX run
+#
+SEPFILE=N
+#
+# Find command line options and switches
+#
+# "x:" x takes argument
+#
+switches="DF:H:I:KLNO:W:dhkl:o:p:S:s\?"
+options=""
+#
+# ugh, "\-" is a hack to support long options
+# while getopts \-:$options$switches O
+# must be in double quotes for bash-2.0
+while getopts "\-:$options$switches" O
+do
+  $debug_echo "O: \`$O'"
+  $debug_echo "arg: \`$OPTARG'"
+  case $O in
+    D  )
+      [ $debug_echo = echo ] && set -x
+      debug_echo=echo
+      ;;
+    F  )
+      LATEXHF=$OPTARG
+      ;;
+    H  )
+      PHEIGHT=$OPTARG
+      ;;
+    I  )
+      LILYOPTS="$LILYOPTS -I $OPTARG"
+      LILYINCLUDE="$LILYINCLUDE:$OPTARG"
+      ;;
+    K  )
+      KEEP_LILY_OUTPUT=Y
+      ;;
+    L  )
+      ORIENTATION=landscape
+      ;;
+    O  )
+      ORIENTATION=$OPTARG
+      ;;
+    N  )
+      PNUM="\pagestyle{empty}"
+      ;;
+    W  )
+      PWIDTH=$OPTARG
+      ;;
+    d  )
+      LILYOPTS=$LILYOPTS" -d"
+      ;;
+    h  )
+      help;
+      exit 0
+      ;;
+    k  )
+      KEEP_LY2DVI_OUTPUT=Y
+      ;;
+    l  )
+      LANGUAGE=$OPTARG
+      ;;
+    o  )
+      OUTPUTDIR=$OPTARG
+      ;;
+    p  )
+      PAPERSIZE=$OPTARG
+      ;;
+    s  )
+      SEPFILE=Y
+      ;;
+    S  )
+      SOURCEDIR=$OPTARG
+      ;;
+    \? )
+      help;
+      exit -1
+      ;;
+    # a long option!
+    -)
+      $debug_echo "long option: \`$OPTARG'"
+      case "$OPTARG" in
+        He*|-He*)
+          PHEIGHT"`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"=
+          ;;
+        W*|-W*)
+          PWIDTH="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
+          ;;
+        dep*|-dep*)
+          LILYOPTS="$LILYOPTS -d"
+          ;;
+        d*|-d*)
+          [ $debug_echo = echo ] && set -x
+          debug_echo=echo
+          ;;
+        hea*|-hea*)
+          LATEXHF="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
+          ;;
+        h*|-h*)
+          help;
+         exit 0
+          ;;
+        i*|-i*)
+          dir="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
+         LILYOPTS="$LILYOPTS --include=$dir"
+         LILYINCLUDE="$LILYINCLUDE:$dir"
+         ;;
+        keepli*|-keepli*)
+          KEEP_LILY_OUTPUT=Y
+          ;;
+        k*|-k*)
+          KEEP_LY2DVI_OUTPUT=Y
+          ;;
+        land*|-land*)
+          ORIENTATION=landscape
+          ;;
+        lang*|-lang*)
+          LANGUAGE="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
+          ;;
+       n*|-n*)
+         PNUM="\pagestyle{empty}"
+         ;;
+       or*|-or*)
+         ORIENTATION="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
+         ;;
+       ou*|-ou*)
+         OUTPUTDIR="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
+         ;;
+        p*|-p*)
+          PAPERSIZE="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
+          ;;
+        separa*|-sep*)
+         SEPFILE=Y
+          ;;
+       sourcedir*|-sourcedir*)
+         SOURCEDIR=$OPTARG
+         ;;
+        *|-*)
+          echo "$0: illegal option -- \"$OPTARG\""
+          help;
+          exit -1
+          ;;
+      esac
+  esac
+done
+shift `expr $OPTIND - 1`
+
+if [ "$SOURCEDIR" != "" ]; then
+# apparently MakeTeXTFM can't handle relative dirs
+       SOURCEDIR=`cd $SOURCEDIR; pwd`
+       LILYINCLUDE="$SOURCEDIR/init:$SOURCEDIR/mf/out:$LILYINCLUDE"
+       TEXINPUTS="$SOURCEDIR/tex:$TEXINPUTS:"
+       MFINPUTS="$SOURCEDIR/mf:$MFINPUTS:"
+       LILYPOND_EXECUTABLE="$SOURCEDIR/lily/out/lilypond"
+       export MFINPUTS LILYPOND_EXECUTABLE TEXINPUTS SOURCEDIR 
+fi
+
+#
+# Input file name
+#
+if [ "$1" = "" ]
+then
+  help
+  $debug_echo "$IDENTIFICATION: No input file name given"
+  exit 1
+fi
+# regexp_quote -- quote a string as a regular expression for egrep or sed
+regexp_quote(){
+       Echo "$@" | sed 's/\([]\[\.*?+^$]\)/\\\1/g'
+}
+#
+#
+mudelaDefs(){
+# Include \def\mudela-definitions
+# The aim here is to pick up the definition for the 
+# current file, then any other file.
+#
+mudelatmp=$TMP/mudelaDefs$$
+# Use `cat' to prevent filenames being prepended
+# 
+cat "$File" $OF | fgrep "$MU_DEF" > $mudelatmp
+for L in $MU_DEF
+do
+    # This converts \def\mudelatitle{fred}
+    # to \mudelatitle{fred} or to
+    # \def\mudelatitle{fred}
+    # and stops after the first one found.
+    sed -n '/\\def\\'"$L"'{\([^}]*\)}.*$/{
+       s//'"`regexp_quote \"$1\"`"'\\'"$L"'{\1}%/p
+       q
+    }'  $mudelatmp  >> $LatF
+done
+rm -f $mudelatmp
+}
+#
+#
+startFile(){
+#
+# LaTeX file name
+#
+BN=`basename "$File" .tex`
+FN="$BN.$$"
+if [ "$KEEP_LY2DVI_OUTPUT" != "Y" ]
+then
+  LatF="$TMP/$FN.tex"
+else
+  LatF="$FN.tex"
+fi
+#
+# Find:
+#   paper size        (PAPERSIZE, overridden by command line option -p)
+#   paper orientation (ORIENTATION, overridden by option -o)
+#   language          (LANGUAGE, overridden by option -l)
+#   textwidth
+#
+eval `sed -n \\
+  -e 's/\\\\def\\\\mudelalanguage{\([^}]*\).*$/fLNG=\1;/p' \\
+  -e 's/\\\\def\\\\mudelalatexheaders{\([^}]*\).*$/fLHF=\1;/p' \\
+  -e 's/\\\\def\\\\mudelaorientation{\([^}]*\).*$/fORI=\1;/p' \\
+  -e 's/\\\\def\\\\mudelapaperlinewidth{\([^}]*\).*$/TWN=\1;/p' \\
+  -e 's/\\\\def\\\\mudelapapertextheight{\([^}]*\).*$/THN=\1;/p' \\
+  -e 's/\\\\def\\\\mudelapapersize{\([^}]*\).*$/fPSZ=\1;/p' \\
+    "$File"`
+#
+if [ -z "$LATEXHF" ]
+then
+  LATEXHF="$fLHF"
+fi
+LLHF="%"
+if [ -n "$LATEXHF" ]
+then
+  [ -f         "$LATEXHF" ] && LLHF="\input{$LATEXHF}"
+fi
+#
+if [ -z "$PAPERSIZE" ]
+then
+  PAPERSIZE="$fPSZ"
+fi
+if [ -n "$PAPERSIZE" ]
+then
+  setPaperZize
+  PAPEROPT="$PAPERSIZE"
+fi
+#
+if [ -z "$ORIENTATION" ]
+then
+  ORIENTATION="$fORI"
+fi
+if [ -n "$ORIENTATION" ]
+then
+  if [ -z "$PAPEROPT" ]
+  then
+    PAPEROPT="$ORIENTATION"
+  else
+    PAPEROPT="$PAPEROPT,$ORIENTATION"
+  fi
+fi
+#
+if [ -n "$PAPEROPT" ]
+then
+  PAPER="[$PAPEROPT]"
+fi
+#
+if [ -z "$LANGUAGE" ]
+then
+  LANGUAGE="$fLNG"
+fi
+if [ -n "$LANGUAGE" ]
+then
+  LLNG="\usepackage[$LANGUAGE]{babel}"
+else
+  LLNG="%"
+fi
+
+#
+# Find textwidth
+#
+if [ -n "$TWN" ]
+then
+  TW="$TWN"
+  case "$TW" in
+    *mm)
+      ;;
+    *cm)
+      ;;
+    *pt)
+      ;;
+    *)
+      TW="${TW}pt"
+      ;;
+  esac
+  $debug_echo "Text width = $TW"
+fi
+TWp=`Echo $TW | sed -e 's/\..*$//'`
+PWp="$PWIDTH"
+#
+# Find textheight
+#
+if [ -n "$THN" ]
+then
+  TH=$THN
+  case $TH in
+    *mm)
+      ;;
+    *cm)
+      ;;
+    *pt)
+      ;;
+    *)
+      TH="${TH}pt"
+      ;;
+  esac
+  $debug_echo "Text height = $TH"
+fi
+THp="`echo $TH | sed -e 's/\..*$//'`"
+PHp="$PHEIGHT"
+if [ "$ORIENTATION" = "landscape" ]
+then
+  PWp="$PHEIGHT"
+  PHp="$PWIDTH"
+fi
+HMARG="`expr '(' $PWp - $TWp ')' / 2`"pt
+$debug_echo "Text left = $HMARG"
+VMARG="`expr '(' $PHp - $THp ')' / 2`"pt
+$debug_echo "Text top = $VMARG"
+#
+# Geometry: /var/lib/texmf/latex/geometry/geometry.dvi
+#
+#
+# Write LaTeX file
+#
+cat << EOF > $LatF
+% Creator: $IDENTIFICATION
+% Automatically generated from  $IF, $NOW
+
+\documentclass$PAPER{article}
+
+$LLNG
+\usepackage{geometry}
+\usepackage[latin1]{inputenc}
+%\usepackage[T1]{fontenc}
+$PNUM
+%\addtolength{\oddsidemargin}{-1cm}
+%\addtolength{\topmargin}{-1cm}
+%\setlength{\textwidth}{$TW}
+%\setlength{\textheight}{$TH}
+\geometry{width=$TW, left=$HMARG, height=$TH, top=$VMARG}
+\input lilyponddefs
+\input titledefs
+$LLHF
+\begin{document}
+EOF
+mudelaDefs
+cat << EOF >> $LatF
+\cmrtwenty% ugh
+\makelilytitle
+EOF
+}
+nextFile(){
+cat << EOF >> $LatF
+\def\theopus{}%
+\def\thepiece{}%
+\def\mudelaopus{}%
+\def\mudelapiece{}%
+EOF
+mudelaDefs "\\def"
+cat << EOF >> $LatF
+\def\theopus{\mudelaopus}% ugh
+\def\thepiece{\mudelapiece}%
+\makelilypiecetitle
+EOF
+}
+#
+# Conclusion
+#
+endFile(){
+cat << EOF >> $LatF
+\vfill\hfill{\LilyIdString}
+\end{document}
+EOF
+#
+# Run LaTeX
+#
+latex '\nonstopmode \input '$LatF || exit 5
+#
+# Rename dvi file
+#
+if [ -f $FN.dvi ]
+then
+    RESULT="$BN.dvi"
+    [ -n "$OUTPUTDIR" ] && RESULT="$OUTPUTDIR/$RESULT"
+    
+    cp "$FN.dvi" "$RESULT" || exit 5
+fi
+#
+# Output some info
+#
+cat << EOF
+
+$IDENTIFICATION: dvi file name is $RESULT
+
+EOF
+}
+
+# ugh. GF is side-effect.
+findInput() {
+# should check for LILYINCLUDE
+  OIFS="$IFS"
+  IFS=':'
+  x=`echo $LILYINCLUDE | sed "s!:! !g"`
+  IFS="$OIFS"
+  for lypath in . $x
+  do
+    if [ -f "$lypath/$1" ]
+    then
+      GF="$lypath/$1"
+      return
+    fi
+
+    if [ -f "$lypath/$1.ly" ]
+    then
+      GF="$lypath/$1.ly"
+      return
+    fi
+    if [ -f "$lypath/$1.fly" ]
+    then
+       GF="$lypath/$1.fly"
+       return
+    fi
+  done
+  $debug_echo "$IDENTIFICATION: Input file \"$GF\" not found"
+  echo "$NAME: Input file \"$GF\" not found"                       1>&2
+  exit 2
+}
+#
+# Loop through all files
+#
+
+LILY_OUTPUT_FILES=
+
+for GF 
+do
+    findInput $GF
+
+  #
+  # Check whether the file is input to or output from lilypond
+  #
+  L1=`head -1 $GF` 
+  OP=`echo $L1 | grep "^% Creator: GNU LilyPond"`
+  if [ -n "$OP" ]
+  then
+    #
+    # OK - it's the output from lilypond.
+    #
+    # Get lilypond source file name
+    #
+    OF=$GF
+    IFL=`grep mudelafilename $OF`
+    if [ "$IFL" != "" ]
+    then
+      IF=`echo $IFL | sed -e 's/.*{//' -e 's/}*.$//'`
+      #
+      # Check if source file exists
+      #
+      if [ ! -f $IF ]
+      then
+        $debug_echo $IDENTIFICATION": Mudela file not found."
+        TW=15.5cm
+        TH=25.0cm
+      fi
+    else
+      $debug_echo $IDENTIFICATION": Mudela file name not found."
+      TW=15.5cm
+      TH=25.0cm
+    fi
+  else
+    #
+    # I have to assume this is the lilypond input file
+    # Find output file name, if defined
+    #
+    IF=$GF
+    #
+    # Run lilypond
+    # Grab output file names
+    #
+    $debug_echo "lilypond "$LILYOPTS $IF
+
+    $LILYPOND_EXECUTABLE $LILYOPTS $IF 2>&1  | tee $LOGFILE
+    OF="`sed -n -e 's/TeX output to \([^\.]*\.tex\)\.\.\.$/\1/p' $LOGFILE`"
+    $debug_echo "==> $OF"
+    LILY_OUTPUT_FILES="$LILY_OUTPUT_FILES $OF"
+    STATUS=`egrep -i "error|segmentation|abort" $LOGFILE`
+    echo $STATUS
+    if [ ! -z "$STATUS" ]
+    then
+      exit 10
+    fi
+  fi
+  #
+  # "Spin through" all the files
+  #
+  for File in $OF
+  do
+    $debug_echo "--- "$File
+    #
+    # Check if output file is generated
+    #
+    if [ ! -f "$File" ]
+    then
+      $debug_echo "$IDENTIFICATION: hmm, I could not find the output file $File"
+      exit 4
+    fi
+    #
+    # Is this the first file?
+    #
+    if [ -z "$FFile" ]
+    then
+      FFile="$File"
+      startFile
+    else
+      nextFile
+    fi
+    cat << EOF >> $LatF
+\input{$File}
+EOF
+    if [ $SEPFILE = Y ]
+    then
+      FFile=""
+      endFile
+    fi
+  done
+done
+if [ $SEPFILE = N ]
+then
+  endFile
+fi
+#
+# OK - finished
+#
diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py
new file mode 100644 (file)
index 0000000..74c5495
--- /dev/null
@@ -0,0 +1,1117 @@
+#!@PYTHON@
+
+"""
+=======================================================================
+LilyPond to dvi converter
+
+Features include Title information, paper size specification, and image
+orientation.  
+
+Usage: ly2dvi.py [OPTION]... [FILE]...
+Input: LilyPond source or LilyPond generated TeX files
+Output: DVI file
+=======================================================================
+"""
+
+name = 'ly2dvi'
+version = '0.0.5'
+errorlog = ''
+
+import sys
+import os
+import getopt
+import re
+import string
+import time
+import glob
+
+
+class Input:
+    """
+    This class handles all ly2dvi.py input file methods
+
+    Public methods:
+    
+    __init__()  Constructor
+    open(file)  Open a .ly file or .tex file using lilyinclude path
+    close()     Close current file
+    type()      Determine file type .ly (input) or .tex (output)
+    setVars()   Set title definitions found in .tex (output) file
+    """
+
+    #
+    # Constructors
+    #
+
+    def __init__(this):
+       this.__fd = None 
+
+    #
+    # open
+    #
+    def open(this,file):
+        """
+        open file and set private class variable __fd.  The search
+        sequence is: current directory followed by the directories
+        found in include property list.  Each directory is searched
+        for file, file.ly, and file.fly.
+        
+        input:  file   filename
+        output: void
+        error:  ExitNotFound Exception
+        """
+
+        for i in [''] + Props.get('include')[0:]:
+            ifile = os.path.join(i,file)
+            for j in ['','.ly','.fly']:
+                jfile = ifile+j
+                try:
+                    this.__fd = open( jfile, 'r' )
+                    return
+                except:
+                    pass
+        sys.exit('ExitNotFound', file)
+
+
+    #
+    # close
+    #
+    def close(this):
+        """
+        close file object __fd
+        
+        input:  void
+        output: void
+        error:  None
+        """
+        this.__fd.close()
+
+
+    #
+    # type
+    #
+    def type(this):
+        """
+        Determine input file type.  LilyPond source is 'input' type
+        and LilyPond generated TeX file is 'output' type
+
+        input:  void
+        output: 'input' | 'output'
+        error:  None
+        """
+
+        firstline = this.__fd.readline()
+        this.__fd.seek(0)
+        if  re.match('% Creator: GNU LilyPond [0-9]+[.0-9]+',firstline ):
+            return 'output'
+        else:
+            return 'source'
+
+
+    #
+    # setVars
+    #
+    def setVars(this): 
+        """
+        Search for properties in the current input file and set the
+        appropriate values.  The supported properties names are in
+        local variable varTable along with the property list
+        titledefs.
+
+        input:  void
+        output: None
+        error:  None
+        """
+
+        varTable = [
+            #   regexp              set method
+            #   ------              ----------
+            ( 'language',        Props.setLanguage ),
+            ( 'latexheaders',    Props.setHeader ),
+            ( 'orientation',     Props.setOrientation ),
+            ( 'paperpapersize',  Props.setPaperZize ),
+            ( 'papertextheight', Props.setTextHeight ),
+            ( 'paperlinewidth',  Props.setLineWidth ),
+            ( 'filename',        Props.setFilename ),
+            ]
+
+        titles={}
+        for line in this.__fd.readlines():
+            m=re.match('\\\\def\\\\mudela([\w]+){(.*)}',line)
+            if m:
+                for var in varTable:
+                    if m.group(1) == var[0]:
+                        var[1](m.group(2),'file')
+                        break
+                for var in Props.get('titledefs'):
+                    if m.group(1) == var:
+                        titles[var]=m.group(2)
+                        break
+        Props.setTitles(titles,'file')
+        this.__fd.seek(0)
+
+\f
+
+class TeXOutput:
+    """
+    This class handles all ly2dvi.py output file methods
+
+    private methods:
+     __mudelaDefs(opt)  Send title info to output file
+
+    Public methods:
+    __init__()  Constructor
+    write(str)  Write a string to output file 
+    start(file) Start the latex file
+    next()      Process next output file
+    end()       Finish latex file and run latex 
+    """
+
+    #
+    # constructor
+    #
+    def __init__(this):
+       this.__fd = None 
+       this.__base = ''
+       this.__outfile = ''
+
+    #
+    # __medelaDefs
+    #
+    def __mudelaDefs(this,opt):
+        """
+        Write titles to output
+
+        input:  opt   Supports header and subheader output
+        output: None
+        error:  None
+        """
+
+        titles = Props.get('titles')
+        for key in titles.keys():
+            this.write('%s\\mudela%s{%s}%%\n' % (opt,key,titles[key]))
+
+    #
+    # write
+    #
+    def write(this,str):
+        """
+        Write str to current output file
+
+        input:  str  String to write
+        output: None
+        error:  None
+        """
+        
+        this.__fd.write(str)
+
+    #
+    # start
+    #
+    def start(this,file):
+        """
+        Start LaTeX file.  Calculates the horizontal and vertical
+        margin using pagewidth, pageheight, linewidth, and textheight.
+        Creates temporary output filename and opens it for write.
+        Sends the LaTeX header information to output.  Lastly sends
+        the title information to output.
+
+        input:  file  output file name 
+        output: None
+        error:  None
+        """
+
+        now=time.asctime(time.localtime(time.time()))
+        linewidth = Props.get('linewidth')
+        textheight = Props.get('textheight')
+
+        if Props.get('orientation') == 'landscape':
+            pagewidth = Props.get('pageheight')
+            pageheight = Props.get('pagewidth')
+        else:
+            pageheight = Props.get('pageheight')
+            pagewidth = Props.get('pagewidth')
+                             
+        horizontalMarginArg =  ( (pagewidth - linewidth)/2 )   
+        verticalMarginArg =  ( (pageheight - textheight)/2  )
+
+        top="""\
+%% Creator: %s
+%% Automatically generated from  %s, %s
+
+\\documentclass[%s]{article}
+
+%s 
+\\usepackage{geometry}
+\\usepackage[latin1]{inputenc} 
+%%\\usepackage[T1]{fontenc} 
+%s 
+%%\\addtolength{\\oddsidemargin}{-1cm} 
+%%\\addtolength{\\topmargin}{-1cm} 
+%%\\setlength{\\textwidth}{%s} 
+%%\\setlength{\\textheight}{%s} 
+\\geometry{width=%spt, left=%spt, height=%spt, top=%spt} 
+\\input lilyponddefs 
+\\input titledefs 
+%s 
+\\begin{document}
+""" % ( program_id(), Props.get('filename'), now, Props.get('papersize'),
+        Props.get('language'), Props.get('pagenumber'), linewidth, textheight,
+        linewidth, horizontalMarginArg, textheight, verticalMarginArg,
+        Props.get('header') )
+        
+        pathcomp = os.path.splitext(file)
+        this.__base = pathcomp[0]
+        this.__outfile = '%s.%d%s' % (pathcomp[0], os.getpid(), pathcomp[1])
+        try:
+            this.__fd = open(this.__outfile,"w")
+        except:
+            sys.exit('ExitNoWrite', this.__outfile)
+        this.write(top)
+        this.__mudelaDefs('')
+        this.write("""\
+\\cmrtwenty% ugh
+\\makelilytitle
+""") 
+
+    #
+    # next
+    #
+    def next(this):
+        """
+        Write LaTeX subheader information to support more than one
+        score in a document.  Lastly send current title information to
+        output.
+
+        input:  None
+        output: None
+        error:  None
+        """
+
+        this.write("""\
+\\def\\theopus{}%
+\\def\\thepiece{}%
+\\def\\mudelaopus{}%
+\\def\\mudelapiece{}%
+""")
+        this.__mudelaDefs("\\def")
+        this.write("""\
+\\def\\theopus{\\mudelaopus}% ugh
+\\def\\thepiece{\\mudelapiece}%
+\\makelilypiecetitle
+""")
+
+
+    #
+    # end
+    #
+    def end(this):
+        """
+        Close output file and run latex on it.
+
+        input:  None
+        output: None
+        error:  ExitBadLatex Exception
+        """
+
+        outfile=this.__base + '.dvi'
+        if Props.get('output') != '':
+            outfile = os.path.join(Props.get('output'), outfile )
+            
+        this.write("""\
+\\vfill\\hfill{\\LilyIdString}
+\\end{document}
+""")
+        this.__fd.close()
+        if ( os.name == 'posix' ):
+            stat = os.system('latex \'\\nonstopmode \\input %s\'' %
+                             (this.__outfile))
+        else: # Windows shells don't eat the single quotes
+            stat = os.system('latex \\nonstopmode \\input %s' %
+                             (this.__outfile))
+        if stat:
+            sys.exit('ExitBadLatex')
+        if os.path.isfile(outfile):
+            os.remove(outfile)
+        os.rename(this.__base + '.' + str(os.getpid()) + '.dvi', outfile)
+        sys.stderr.write( '\n' + program_id() + ': dvi file name is %s\n\n'
+                   % (outfile))
+
+        if Props.get('postscript'):
+            psoutfile=this.__base + '.ps'
+            if Props.get('output') != '':
+                psoutfile = os.path.join(Props.get('output'), psoutfile )
+            stat = os.system('dvips -o %s %s 2>&1' % (psoutfile,outfile))
+            if stat:
+                sys.exit('ExitBadPostscript')
+            
+
+\f
+
+class Properties:
+    """
+    This class handles all ly2dvi.py property manipulation
+
+    Public methods:
+    
+    __init__()  Constructor
+    set<property> methods
+    """
+
+    def __init__(this):
+
+        #
+        # Following is the order of priority for property assignment.  The
+        # list is organized from lowest to highest priority.  Each
+        # assignment is overridden by the next requester in the list.
+        #
+        # Requester     Description
+        # ---------     -----------
+        # init          Initial default values
+        # file          The values found in the lilypond generated TeX files
+        # environment   Envrionment variables LILYINCLUDE, LILYPONDPREFIX
+        # rcfile        $LILYPONDPREFIX/share/lilypond/.lilyrc
+        # rcfile        $HOME/.lilyrc
+        # rcfile        ./.lilyrc
+        # commandline   command line arguments
+        # 
+        this.__overrideTable = {
+            'init'        : 0,
+            'file'        : 1,
+            'environment' : 2,
+            'rcfile'      : 3,
+            'commandline' : 4,
+            'program'     : 5
+            }
+
+        this.__roverrideTable = {} # reverse lookup used for debug
+        for i in this.__overrideTable.items():
+            this.__roverrideTable[i[1]]=i[0]
+        
+        this.__data = {
+            'pagewidth'    :  [597, this.__overrideTable['init']],
+            'pageheight'   :  [845, this.__overrideTable['init']],
+            'papersize'    :  ['a4paper', this.__overrideTable['init']],
+            'textheight'   :  [0, this.__overrideTable['init']],
+            'linewidth'    :  [0, this.__overrideTable['init']],
+            'orientation'  :  ['portrait', this.__overrideTable['init']],
+            'language'     :  ['%', this.__overrideTable['init']],
+            'include'      :  [[], this.__overrideTable['init']],
+            'debug'        :  [0, this.__overrideTable['init']],
+            'keeplilypond' :  [0, this.__overrideTable['init']],
+            'keeply2dvi'   :  [0, this.__overrideTable['init']],
+            'pagenumber'   :  ['%', this.__overrideTable['init']],
+            'separate'     :  [0, this.__overrideTable['init']],
+            'output'       :  ['', this.__overrideTable['init']],
+            'header'       :  ['%', this.__overrideTable['init']],
+            'dependencies' :  [0, this.__overrideTable['init']],
+            'root'         :  ['', this.__overrideTable['init']],
+            'tmp'          :  ['d:\tmp', this.__overrideTable['init']],
+            'filename'     :  ['', this.__overrideTable['init']],
+            'titledefs'    :  [[], this.__overrideTable['init']],
+            'titles'       :  [{}, this.__overrideTable['init']],
+            'lilyOutputFiles' :  [[], this.__overrideTable['init']],
+            'postscript'   :  [0, this.__overrideTable['init']],
+            }
+
+        #
+        # Try to set root and HOME first before calling rcfile
+        #
+        if os.environ.has_key('LILYPONDPREFIX'):
+            this.setRoot(os.environ['LILYPONDPREFIX'], 'environment')
+        else:
+            p=os.path.split(sys.argv[0])
+            p=os.path.split(p[0])
+            this.setRoot(p[0],'init')
+
+        if not os.environ.has_key('HOME'):
+            if os.environ.has_key('HOMEDRIVE') and \
+                 os.environ.has_key('HOMEPATH'):
+                os.environ['HOME'] = os.environ['HOMEDRIVE'] + \
+                                     os.environ['HOMEPATH']
+            else:
+                os.environ['HOME'] = os.curdir
+
+        this.rcfile() # Read initialization file(s)
+
+        if os.environ.has_key('LILYINCLUDE'):
+            tmp=this.get('include')
+            for s in string.split(os.environ['LILYINCLUDE'],os.pathsep):
+                tmp.append(s)
+            this.__set('include', tmp, 'environment')    
+
+
+        t=''
+       if os.environ.has_key ('TEXINPUTS'):
+               t = os.pathsep + os.environ['TEXINPUTS']
+        os.environ['TEXINPUTS'] = os.path.join(this.get('root'), 'texmf',
+                                              'tex', 'lilypond' ) + t
+
+        t=''
+       if os.environ.has_key ('MFINPUTS'):
+               t = os.pathsep + os.environ['MFINPUTS']
+        os.environ['MFINPUTS'] = os.path.join(this.get('root'), 'texmf',
+                                              'mf', 'public', 'lilypond' ) + t
+
+        if os.environ.has_key('TMP'):
+            this.__set('tmp',os.environ['TMP'],'environment')
+
+        
+       fd=this.get_texfile_path ('titledefs.tex')
+        mudefs=[]    
+
+        for line in fd.readlines():
+            m=re.match('\\\\newcommand\*{\\\\mudela([\w]+)}',line)
+            if m:
+                mudefs.append(m.group(1))
+       fd.close
+        this.__set('titledefs', mudefs, 'init')
+
+    #
+    # __set
+    #
+    def __set(this,var,value,requester):
+        """
+        All of the set methods call this to set a property.  If the value
+        was last set by a requestor of lesser priority the new value is
+        assigned, else the old value has priority and is unchanged.
+        """
+
+        if this.__overrideTable[requester] < this.__data[var][1]:
+            return 0
+        else:
+            this.__data[var] = [value, this.__overrideTable[requester]]
+
+    #
+    # get
+    #
+    def get(this,var):
+        """
+        All of the get methods call this to get a property value.  List
+        variable types are return by value to facilitate an append operation.
+        """
+
+        if var == 'include' or var == 'lilyOutputFiles':
+            return this.__data[var][0][0:]  # return a copy not a ref
+        else:
+            return this.__data[var][0]
+
+    #
+    # get_texfile_path
+    #
+    def get_texfile_path (this, var):
+        """
+        locate and open titledefs.tex file
+        """
+
+        if os.name == 'nt':
+            path = os.path.join(this.get('root'), 'texmf', 'tex',
+                                'lilypond', var)
+        else:
+            path =''
+            cmd =('kpsewhich tex %s %s' % (var,errorlog))
+            pipe = os.popen (cmd, 'r')
+            path = pipe.readline ()[:-1] # chop off \n
+            return_status =  pipe.close()
+            if return_status and not path:
+                path = os.path.join(this.get('root'), 'texmf', 'tex',
+                                    'lilypond', var)
+       fd = open(path, 'r')
+        return fd
+
+
+    #
+    # Read rc file
+    #
+    def rcfile(this):
+       """
+        Read initialization file(s)
+        """
+        varTable = [
+            #   name              set method
+            #   ----              ----------
+            ( 'DEBUG',          this.setDebug ),
+            ( 'DEPENDENCIES',   this.setDependencies ),
+            ( 'KEEPLILYPOND',   this.setKeeplilypond ),
+            ( 'KEEPLY2DVI',     this.setKeeply2dvi ),
+            ( 'LANGUAGE',       this.setLanguage ),
+            ( 'LATEXHF',        this.setHeader ),
+            ( 'LILYINCLUDE',    this.setInclude ),
+            ( 'LILYPONDPREFIX', this.setRoot ),
+            ( 'NONUMBER',       this.setNonumber ),
+            ( 'ORIENTATION',    this.setOrientation ),
+            ( 'OUTPUTDIR',      this.setOutput ),
+            ( 'PAPERSIZE',      this.setPaperZize ),
+            ( 'PHEIGHT',        this.setTextHeight ),
+            ( 'POSTSCRIPT',     this.setPostscript ),
+            ( 'PWIDTH',         this.setLineWidth ),
+            ( 'SEPARATE',       this.setSeparate ),
+            ( 'TMP',            this.setTmp ),
+            ]
+
+        if ( os.name == 'posix' ):
+            dotFilename='.lilyrc'
+        else: # Windows apps like edit choke on .lilyrc
+            dotFilename='_lilyrc'
+
+       for d in [os.path.join(this.get('root'),'share','lilypond'), \
+                  os.environ['HOME'], os.curdir ]:
+           file=os.path.join(d,dotFilename)
+           try:
+               fd = open( file, 'r' )
+           except:
+               continue
+           
+            for line in fd.readlines():
+               if re.match('#.*',line):
+                   continue
+               m=re.search('([\w]+)=(.*)',line)
+               if m:
+                    for var in varTable:
+                        if m.group(1) == var[0]:
+                            var[1](m.group(2),'rcfile')
+                            break
+           fd.close
+
+    #
+    # setPaperZize
+    #
+    def setPaperZize(this,size,requester):
+        """
+        Set paper size properties
+        """
+
+        paperTable = [
+            # regex          width    height      name
+            # -----          -----    ------      ----
+            ( 'a0.*',        2389,    3381,    'a0paper' ),
+            ( 'a1$|a1p.*',   1690,    2389,    'a1paper' ),
+            ( 'a2.*',        1194,    1690,    'a2paper' ),
+            ( 'a3.*',        845,     1194,    'a3paper' ),
+            ( 'a4.*',        597,     845,     'a4paper' ),
+           ( 'a5.*',        423,     597,     'a5paper' ),
+            ( 'a6.*',        298,     423,     'a6paper' ),
+            ( 'a7.*',        211,     298,     'a7paper' ),
+            ( 'a8.*',        305,     211,     'a8paper' ),
+            ( 'a9.*',        105,     305,     'a9paper' ),
+            ( 'a10.*',       74,      105,     'a10paper' ),
+            ( 'b0.*',        2847,    4023,    'b0paper' ),
+            ( 'b1.*',        2012,    2847,    'b1paper' ),
+            ( 'b2.*',        1423,    2012,    'b2paper' ),
+            ( 'b3.*',        1006,    1423,    'b3paper' ),
+            ( 'b4.*',        712,     1006,    'b4paper' ),
+            ( 'b5.*',        503,     712,     'b5paper' ),
+            ( 'archA$',      650,     867,     'archApaper' ),
+            ( 'archB$',      867,     1301,    'archBpaper' ),
+            ( 'archC$',      1301,    1734,    'archCpaper' ),
+            ( 'archD$',      1734,    2602,    'archDpaper' ),
+            ( 'archE$',      2602,    3469,    'archEpaper' ),
+            ( 'flsa$|flse$', 614,     940,     'flsapaper' ),
+            ( 'halfletter$', 397,     614,     'halfletterpaper' ),
+            ( 'ledger$',     1229,    795,     'ledgerpaper' ),
+            ( 'legal$',      614,     1012,    'legalpaper' ),
+            ( 'letter$',     614,     795,     'letterpaper' ),
+            ( 'note$',       542,     723,     'notepaper' )
+            ]
+
+        found=0
+        for paper in paperTable:
+            if re.match(paper[0],size):
+                found=1
+                this.__set('pagewidth',paper[1],requester)
+                this.__set('pageheight',paper[2],requester)
+                this.__set('papersize',paper[3],requester)
+                break
+
+        if not found:
+            sys.exit('ExitBadPaper',size)
+
+    #
+    # setTextHeight
+    #
+    def setTextHeight(this,size,requester):
+        """
+        Set textheight property
+        """
+
+       m=re.match('([0-9][.0-9]*)(cm|mm|pt|$)',size)
+       if m:
+           if m.group(2) == 'cm':
+               this.__set('textheight',\
+                           float(m.group(1)) * 72.27/2.54, requester )
+           elif m.group(2) == 'mm':
+               this.__set('textheight',\
+                           float(m.group(1)) * 72.27/25.4, requester )
+           elif m.group(2) == 'pt':
+               this.__set('textheight', float(m.group(1)), requester )
+           elif m.group(2) == '':
+               this.__set('textheight', float(m.group(1)), requester )
+           else:
+               sys.exit('ExitBadHeight', m.group(2))
+       else:           
+           sys.exit('ExitBadHeight', size)
+
+    #
+    # setLineWidth
+    #
+    def setLineWidth(this,size,requester):
+        """
+        Set linewidth propery
+        """
+
+       m=re.match('([0-9][.0-9]*)(cm|mm|pt|$)',size)
+       if m:
+           if m.group(2) == 'cm':
+               this.__set('linewidth', \
+               float(m.group(1)) * 72.27/2.54, requester )
+           elif m.group(2) == 'mm':
+               this.__set('linewidth', \
+               float(m.group(1)) * 72.27/25.4, requester )
+           elif m.group(2) == 'pt':
+               this.__set('linewidth', float(m.group(1)), requester )
+           elif m.group(2) == '':
+               this.__set('linewidth', float(m.group(1)), requester )
+           else:
+               sys.exit('ExitBadWidth', m.group(2))
+       else:           
+           sys.exit('ExitBadWidth', size)
+
+    #
+    # setOrientation
+    #
+    def setOrientation(this,orient,requester):
+        """
+        Set orientation property
+        """
+
+       if orient == 'landscape' or orient == 'portrait':
+           this.__set('orientation', orient, requester )
+       else:
+           sys.exit('ExitBadOrient', orient)
+
+    #
+    # setLanguage
+    #
+    def setLanguage(this,lang,requester):
+        """
+        Set language property
+        """
+
+       this.__set('language', '\\usepackage[%s]{babel}' % (lang), requester )
+
+    #
+    # setInclude
+    #
+    def setInclude(this,inc, requester):
+        """
+        Append an include path
+        """
+
+        tmp = this.get('include')
+        tmp.append(inc)
+        this.__set('include', tmp, requester )
+
+    #
+    # setDebug
+    #
+    def setDebug(this,value,requester):
+        """
+        Set or Clear debug flag
+        """
+
+        if int(value) == 1:
+            this.__set('debug',1,requester)
+        else:
+            this.__set('debug',0,requester)
+
+    #
+    # setKeeplilypond
+    #
+    def setKeeplilypond(this, value, requester):       
+        """
+        Set or Clear keeplilypond flag
+        """
+
+        if int(value) == 1:
+            this.__set('keeplilypond',1,requester)
+        else:
+            this.__set('keeplilypond',0,requester)
+
+    #
+    # setKeeply2dvi
+    #
+    def setKeeply2dvi(this, value, requester): 
+        """
+        Set or Clear keeply2dvi flag
+        """
+
+        if int(value) == 1:
+            this.__set('keeply2dvi',1,requester)
+        else:
+            this.__set('keeply2dvi',0,requester)
+
+    #
+    # setNonumber 
+    #
+    def setNonumber(this, value, requester):   
+        """
+        Set nonumber flag
+        """
+
+        if int(value) == 1:
+            this.__set('pagenumber',1,requester)
+        else:
+            this.__set('pagenumber',0,requester)
+
+    #
+    # setSeparate
+    #
+    def setSeparate(this, value, requester):   
+        """
+        Set or Clear separate flag
+        """
+
+        if int(value) == 1:
+            this.__set('separate',1,requester)
+        else:
+            this.__set('separate',0,requester)
+
+    #
+    # Set output directory name
+    #
+    def setOutput(this,out,requester):
+       this.__set('output',out,requester)
+
+    #
+    # Set latex header name
+    #
+    def setHeader(this,head, requester):
+       this.__set('header',head,requester)
+
+    #
+    # Set or Clear Dependencies flag to generate makefile dependencies
+    #
+    def setDependencies(this, requester):      
+        """
+        Set or Clear dependencies flag
+        """
+
+        if int(value) == 1:
+            this.__set('dependencies',1,requester)
+        else:
+            this.__set('dependencies',0,requester)
+
+    #
+    # Set tmp directory
+    #
+    def setTmp(this,dir, requester):   
+       this.__set('tmp',dir,requester)
+
+    #
+    # Set mudela source file name
+    #
+    def setFilename(this,file, requester):     
+       this.__set('filename',file,requester)
+
+    #
+    # Set title commands
+    #
+    def setTitles(this,titles, requester):     
+       this.__set('titles',titles,requester)
+
+    #
+    # Set title commands
+    #
+    def addLilyOutputFiles(this,filelist,requester):
+        """
+        Add a to the lily output list
+        """
+
+        tmp = this.get('lilyOutputFiles')
+        tmp = tmp + filelist
+        this.__set('lilyOutputFiles',tmp,requester)
+
+    #
+    # Set/Clear postscript flag
+    #
+    def setPostscript(this,value,requester):
+        """
+        Set postscript flag
+        """
+
+        if int(value) == 1:
+            this.__set('postscript',1,requester)
+        else:
+            this.__set('postscript',0,requester)
+
+    #
+    # Set root
+    #
+    def setRoot(this,path, requester): 
+        """
+        Set lilypond root directory
+        """
+
+        os.environ['LILYPONDPREFIX'] = path
+       this.__set('root',path,requester)
+
+    #
+    # printProps
+    #
+    def printProps(this):
+        """
+        Print properties
+        """
+        
+        for key in this.__data.keys():
+            print "%s <%s>:<%s>" % (key,this.get(key),
+                                    this.__roverrideTable[this.__data[key][1]])
+
+\f
+
+#
+# Misc functions
+#
+
+def getLilyopts():
+    inc = ''   
+    if len(Props.get('include')) > 0: 
+        inc = '-I ' + string.join(Props.get('include'),os.pathsep)
+    else:
+
+        if Props.get('dependencies'):
+            dep=' -d'
+        else:
+            dep=''
+       return inc + dep
+    return inc
+
+def writeLilylog(contents):
+    if Props.get('keeplilypond'):
+        file='lilylog.' + str(os.getpid())
+        output = Props.get('output')
+        if output != '':
+            file = os.path.join( output, file )
+        try:
+            fd = open( file, 'w' )
+        except:
+            sys.exit('ExitNoWrite', file)
+        fd.write(contents)
+        fd.close()
+
+def getTeXFile(contents):
+    texfiles=[]
+    for line in string.split(contents,'\n'):
+        m = re.search('^TeX output to (.+)\.\.\.', line)
+        if m:
+            texfiles.append(m.group(1))
+
+    if texfiles == []:
+        sys.exit('ExitNoTeXName')
+    else:
+        return texfiles
+
+def program_id ():
+    return name + ' ' + version;
+
+
+def mailaddress():
+    try:
+       return os.environ['MAILADDRESS']
+    except KeyError:
+       return '(address unknown)'
+
+
+def identify ():
+    sys.stderr.write (program_id () + '\n')
+
+def help ():
+    sys.stderr.write (
+        'Generate dvi file from mudela or lilypond output\n'
+        'Usage: ' + name + ' [OPTION]... [FILE]...\n'
+        '\n'
+        'Options:\n'
+        '  -D,--debug           increase verbosity\n'
+        '  -F,--headers=        name of additional LaTeX headers file\n'
+        '  -H,--Height=         set paper height (points) (see manual page)\n'
+        '  -I,--include=DIR     add DIR to LilyPond\'s search path\n'
+        '  -K,--keeplilypond    keep lilypond output files\n'
+        '  -L,--landscape       set landscape orientation\n'
+        '  -N,--nonumber        switch off page numbering\n'
+        '  -O,--orientation=    set orientation (obsolete - use -L instead)\n'
+        '  -P,--postscript      generate postscript file\n'
+        '  -W,--Width=          set paper width (points) (see manual page)\n'
+        '  -d,--dependencies    tell lilypond make a dependencies file\n'
+        '  -h,--help            this help text\n'
+        '  -k,--keeply2dvi      keep ly2dvi output files\n'
+        '  -l,--language=       give LaTeX language (babel)\n'
+        '  -o,--output=         set output directory\n'
+        '  -p,--papersize=      give LaTeX papersize (eg. a4)\n'
+        '  -s,--separate        run all files separately through LaTeX\n'
+        '\n'
+        'files may be (a mix of) input to or output from lilypond(1)\n'
+        )
+
+\f
+
+#
+# main
+#
+
+def main():
+    """Generate dvi files from lilypond source/output"""
+
+    infile = Input()
+    outfile = TeXOutput()
+    texInputFiles=[]
+
+    (options, files) = getopt.getopt (sys.argv[1:],
+                                      'DF:H:I:KLNPW:dhkl:o:p:s',
+                                      ['debug', 'headers=', 'Height=',
+                                       'include=', 'keeplilypond', 'landscape',
+                                       'nonumber', 'Width=', 'dependencies',
+                                       'help', 'keeply2dvi', 'language=',
+                                       'output=', 'papersize=', 'separate',
+                                       'postscript'])
+    for opt in options:
+        o = opt[0]
+        a = opt[1]
+        if o == '--debug' or o == '-D':
+           Props.setDebug(1,'commandline')
+        elif o == '--headers' or o == '-F':
+           Props.setHeader(a,'commandline')
+        elif o == '--include' or o == '-I':
+           Props.setInclude(a,'commandline')
+        elif o == '--Height' or o == '-H':
+           Props.setTextHeight(a,'commandline')
+        elif o == '--keeplilypond' or o == '-K':
+           Props.setKeeplilypond(1,'commandline')
+        elif o == '--landscape' or o == '-L':
+           Props.setOrientation('landscape','commandline')
+        elif o == '--nonumber' or o == '-N':
+           Props.setNonumber('commandline')
+        elif o == '--Width' or o == '-W':
+           Props.setLineWidth(a,'commandline')
+        elif o == '--dependencies' or o == '-d':
+           Props.setDependencies(1,'commandline')
+        elif o == '--help' or o == '-h':
+            help()
+            return 0
+        elif o == '--keeply2dvi' or o == '-k':
+           Props.setKeeply2dvi(1,'commandline')
+        elif o == '--language' or o == '-l':
+           Props.setLanguage(a,'commandline')
+        elif o == '--output' or o == '-o':
+           Props.setOutput(a,'commandline')
+        elif o == '--papersize' or o == '-p':
+           Props.setPaperZize(a,'commandline')
+        elif o == '--separate' or o == '-s':
+           Props.setSeparate(1,'commandline')
+        elif o == '--postscript' or o == '-P':
+           Props.setPostscript(1,'commandline')
+
+    if len(files):
+        for file in files:
+            infile.open(file)
+            type = infile.type()
+            infile.close()
+            if type == 'source':
+                cmd = 'lilypond %s %s 2>&1' % (getLilyopts(), file)
+                fd = os.popen( cmd , 'r' )
+                log = ''
+                line=fd.readline()
+                while line:
+                    log = log + line
+                    sys.stderr.write( line )
+                    line=fd.readline()
+                stat = fd.close()
+                if stat:
+                    sys.exit('ExitBadLily', cmd )
+                texFiles=getTeXFile(log)
+                writeLilylog(log)
+                Props.addLilyOutputFiles(texFiles,'program')
+                texInputFiles = texInputFiles + texFiles
+            else:
+                texInputFiles.append(file)
+
+        firstfile=1
+        for file in texInputFiles:
+            infile.open(file)
+            infile.setVars() # first pass set variables
+            infile.close()
+            if Props.get('debug'):
+                Props.printProps()
+            if firstfile:
+                outfile.start(file)
+            else:
+                outfile.next()
+            outfile.write("""\
+\\input{%s}
+""" % (file))
+            if Props.get('separate'):
+                outfile.end()
+            else:
+                firstfile=0
+        if not Props.get('separate'):
+            outfile.end()
+    else:
+        help()
+        sys.exit('ExitBadArgs','No files specified')
+
+#
+# Exit values
+#
+ExitTable = {
+    'ExitInterupt'         : ['Ouch!', 1 ],
+    'ExitBadArgs'          : ['Wrong number of arguments', 2 ],
+    'ExitNotFound'         : ['File not found', 3 ],
+    'ExitBadPaper'         : ['Unknown papersize', 4 ],
+    'ExitBadHeight'        : ['Invalid Height specification', 5 ],
+    'ExitBadWidth'         : ['Invalid Width specification', 6 ],
+    'ExitBadOrient'        : ['Invalid Orientation specification', 7 ],
+    'ExitNoWrite'          : ['Permission denied', 8 ],
+    'ExitNoTeXName'        : ['hmm, I could not find an output file name', 9 ],
+    'ExitBadLily'          : ['Lilypond failed', 10 ],
+    'ExitBadLatex'         : ['Latex failed', 11 ],
+    'ExitBadPostscript'    : ['Postscript failed', 12 ],
+    'ExitUnknown'          : ['Unknown Exit Code', 20 ],
+    }
+
+def cleanup():
+    lilyfiles = []
+    tmpfiles = []
+    if not Props.get('keeplilypond'):
+        lilyfiles = Props.get('lilyOutputFiles')
+    if not Props.get('keeply2dvi'):
+        tmpfiles = glob.glob('*.' + str(os.getpid()) + '.*' )
+    for file in lilyfiles + tmpfiles:
+        if os.path.isfile(file):
+            os.remove(file)
+
+
+identify()
+Props = Properties()
+
+try:
+    main()
+
+except KeyboardInterrupt:
+    print ExitTable['ExitInterupt'][0]
+    cleanup()
+    sys.exit(ExitTable['ExitInterupt'][1])
+
+except SystemExit, errno:
+    if ExitTable.has_key(errno.args[0]):
+        msg = ExitTable[errno.args[0]]
+    else:
+        msg = ExitTable['ExitUnknown']
+    if len(errno.args) > 1:  
+        sys.stderr.write( '%s: %s: %s\n' % (name, msg[0], errno.args[1]))
+    else:
+        sys.stderr.write( '%s %s\n' % (name, msg[0]))
+    if Props.get('debug'):
+        Props.printProps()
+    cleanup()
+    sys.exit(msg[1])
+else:
+    cleanup()
diff --git a/scripts/ly2dvi.sh b/scripts/ly2dvi.sh
deleted file mode 100644 (file)
index b2e0330..0000000
+++ /dev/null
@@ -1,1005 +0,0 @@
-#!/bin/sh
-#
-# Script to make a LaTeX file for Lilypond
-#
-# Written by Jan Arne Fagertun <Jan.A.Fagertun@energy.sintef.no>
-#  Sat Nov 22 22:26:43 CET 1997
-#
-# $Id: ly2dvi.sh,v 1.16 1998/05/08 21:18:34 janaf Exp $
-#
-#  Original LaTeX file made by Mats Bengtsson, 17/8 1997
-#
-
-VERSION="0.12.jcn1"
-NAME=ly2dvi.sh
-IDENTIFICATION="$NAME $VERSION" 
-NOW=`date`
-echo "$IDENTIFICATION" 1>&2
-
-# TODO:
-#  prevent orphaned "Lily is here" strings
-
-# NEWS
-
-# 0.12.jcn1
-#  - mudelaDefs really fixed (sorry, PC)
-
-# 0.12
-#  - -S/--sourcedir switch
-
-#
-#0.11.jcn3
-# - mudelaDefs fixes, (thanks PC)
-#0.11.jcn2
-# - pass -I, --include to Lily
-# - bf: split $LILYINCLUDE and try all dirs
-# - bf: geometry left/top
-#
-#0.11.pc
-# - fix backslash gobbling, reduce number of separate processes used
-# - require readable rc files, allow rc file in /usr/local/share/lilypond/lilyrc
-# - use latex path, not tex path
-# - Don't override if kpsepath returns non-NULL
-# - Don't clobber x.tex if it wasn't created by ly2dvi
-#
-#
-#0.11.jcn1
-# - find .fly files too
-#
-#0.11.hwn1
-# - height vs heigth
-# - robustification: give \nonstopmode as LaTeX arg; no hanging if no TeX file.
-# - robustification: notice failed cp.
-
-#0.11
-#      - more papersizes (thanks Han-Wen) - don't expect LaTeX to accept all...
-#      - -W,--Width=       : set paper width  (points)
-#       - -H,--Height=      : set paper height (points)
-#      - -H and -W is used only when an unknown papersize is to be specified,
-#        and has to be combined with a papersize option known to LaTeX
-#NB!   - -F,--headers=     : name of additional LaTeX headers input file.
-#NB!      Changed from -H to -F
-#      - -d,--dependencies : passed to lilypond
-
-
-#0.10.jcn1
-#      - HEIGHT -> HEIGHT
-#      - vertical margins (for a4), same on both sides
-#      - textheight from lilypond output file (mudelapapertextheight)
-#      - piece titling
-#      - mudelapiece, mudelaopus
-#
-#0.10
-#      - -K,--keeplilypond : Keep lilypond output files (default delete)
-#      - -k,--keeply2dvi   : Keep ly2dvi   output files (default delete)
-#      - -L,--landscape    : Set landscape orientation
-#      - -N,--nonumber     : Turn off page numbering (\pagestyle{empty})
-#      - Could not reinsert "\usepackage[T1]{fontenc}" because
-#        "los-toros" won't work with it
-#      - Ekstra LaTeX headers from input file
-#0.9.hwn1
-#       - option to remove output of lily
-# 0.9
-#      - Trap Lilypond abort
-#      - Replaced "\usepackage[T1]{fontenc}" with
-#        \usepackage[latin1]{inputenc} (takk, Mats)
-#      - Removed "()" around "\LilyIdString" (Janne didn't want it)
-# 0.8  - Trap Lilypond segmentation fault
-#      - Function for cleanup
-#      - Trap line
-#      - More human-readable variables
-#      - Some logics concerning rc-files
-# 0.7
-#      - Improved Lilypond error checking
-#      - Output orientation (landscape...). Overrides mudela file
-#        variable orientation="landscape";
-#      - Paper width and height put into variables (only A4!)
-#      - Adjusted top margin to default.....
-#
-#TODO
-#      - Include more papersizes.
-#      - Manual page.......
-# 0.6.jaf2
-#      - LILYINCLUDE update
-#
-# 0.6.hwn1
-#      - handle LILYINCLUDE
-#       - --output
-#
-# 0.6
-#      - Source rc-files, if present. Files are:
-#        /usr/local/share/lilyrc /etc/lilyrc $HOME/.lilyrc ./.lilyrc
-#      - tee output from Lilypond
-#      - Handles margins for A4 paper (equal on both sides)
-#      - new option -s (--separate) for one LaTeX run per file,
-#        else all files are run together
-#
-# 0.5
-#      - More useful ("two-level") debug.
-#      - The Q&D hack to find file names and not handling \include
-#        is replaced by grabbing output file names from Lilypond.
-#      = Detects multiple output files - adds them when running
-#        LaTeX.
-#      - Works with multiple input files - no matter if they are
-#        (a mix of) input to or output from Lilypond.
-#
-#TODO
-#      - Still no margins handling.
-#      - We have to discuss how to handle multiple output files
-#        from Lilypond - 'ly2dvi standchen' gives a rather odd
-#        result....
-
-# 0.4.1
-#      - Always exit after printing help info
-# 0.4
-#      - Changes to ensure for more strict grep'ing of parameters
-#        Thanks to from G.B.Stott@bolton.ac.uk
-#      - More efficient use of sed -e 's///' -e 's///'
-#        Thanks to Johan Vromans <jvromans@squirrel.nl> and GBS
-#      - Ask tex for location of titledefs.tex (Thanks to JV)
-#      - Accept only exact match of "\def\mudelacomposer{"
-#        (or whatever mudela* defined in titledefs.tex)
-#      - Even more efficient use of sed (Thanks to JV)
-#      - Default file name for single output file implemented.
-#      - Moved help into function - finally included from 0.1.jcn1
-#
-#TODO
-#      - Still doesn't handle \include
-#      - The Q&D for finding output file name from the sequence of
-#        \paper \output \midi \output really needs to be looked at.
-#        I have improved it a lot, but it's only capable of finding
-#        one (the last) file name.
-#        Well, I have to rewrite this entirely to handle \include,
-#        then I can fix it.
-#      - Still no margins handling.
-#
-#WARNING
-#      - Some lines of output from lilypond do NOT start
-#        at first character position, therefore I have removed "^"
-#        in sed'ing and grep'ing.
-
-# 0.3.hwn1
-#      - add "Creator: " line to output
-#
-# 0.3
-#      - multiple input files to make score from several files
-#        (extra files assumed to be Lilypond output)
-#      - cp dvi-file instead of mv, to allow for xdvi reload
-#      - check for illegal long options
-#      - put in pt in text width, if not given
-#      - put in \nonstopmode in LaTeX file
-#      - restored LaTeX exit value check
-# 0.2.1
-#      - temporarily omit LaTeX exit value check
-#      - remove ALL temporary files
-
-# 0.2
-#      - fix for solaris          - included from 0.1.jcn1
-#      - long option hack         - included from 0.1.jcn1 - modified
-#      - moved help into function - NOT included from 0.1.jcn1 yet
-#      - various improvements     - included from 0.1.jcn1
-#      - find mudela definitions from titledefs.tex
-#      - find papersize from lilypond output file (mudelapapersize),
-#        overridden by option '-p size' or '--papersize=size'
-#      - option -l lang or --language=lang overrides
-#        lilypond output file definition (mudelalanguage)
-#      - textwidth from lilypond output file (mudelapaperlinewidth)
-
-# 0.1.jcn1
-#      - fix for solaris
-#      - long option hack
-#      - moved help into function
-
-#
-# Clean up
-#
-cleanup() {
-  if [ "$KEEP_LY2DVI_OUTPUT" != "Y" ]
-  then
-    [ -n "$LatF" -a -f "$LatF" ]       && rm -f $LatF
-    [ -n "$LOGFILE" -a -f "$LOGFILE" ] && rm -f $LOGFILE
-    [ -n "$FN" ]                       && rm -f $FN.*
-    for F in *$$* $TMP/*$$*
-    do
-      rm -f $F
-    done
-  fi
-  if [ "$KEEP_LILY_OUTPUT" != "Y" ]
-  then
-    for F in $LILY_OUTPUT_FILES
-    do
-      [ -f $F ] && rm -f $F
-    done
-  fi
-}
-
-#
-# print usage
-#
-help() {
-  cat << EOF
-Generate dvi file from mudela or lilypond output
-Usage: $0 [OPTION]... [FILE]...
-
-Options:
-  -D,--debug           increase verbosity
-  -F,--headers=        name of additional LaTeX headers file
-  -H,--Height=         set paper height (points) (see manual page)
-  -I,--include=DIR     add DIR to search path of LilyPond
-  -K,--keeplilypond    keep lilypond output files
-  -L,--landscape       set landscape orientation
-  -N,--nonumber        switch off page numbering
-  -O,--orientation=    set orientation (obsolete - use -L instead) 
-  -W,--Width=          set paper width (points) (see manual page)
-  -d,--dependencies    tell lilypond make a dependencies file
-  -h,--help            this help text
-  -k,--keeply2dvi      keep ly2dvi output files
-  -l,--language=       give LaTeX language (babel)
-  -o,--output=         set output directory
-  -p,--papersize=      give LaTeX papersize (eg. a4)
-  -s,--separate        run all files separately through LaTeX
-  -S,--sourcedir       set sourcedir 
-
-  files may be (a mix of) input to or output from lilypond(1)
-EOF
-}
-
-
-#
-# SVr4 echo swallows backslashes, and there's no way to turn it off.
-# Therefore use Echo whenever backslashes may be important.
-# printf is in the posix.2 standard -- which means it's in 
-# all modern shells.
-#
-Echo() {
-       printf "%s\n" "$@"
-}
-
-#
-setPaperZize() {
-case "$PAPERSIZE" in
-  a0*)
-    PWIDTH=2389
-    PHEIGHT=3381
-    PAPERSIZE=a0paper
-    ;;
-  a1|a1p*)
-    PWIDTH=1690
-    PHEIGHT=2389
-    PAPERSIZE=a1paper
-    ;;
-  a2*)
-    PWIDTH=1194
-    PHEIGHT=1690
-    PAPERSIZE=a2paper
-    ;;
-  a3*)
-    PWIDTH=845
-    PHEIGHT=1194
-    PAPERSIZE=a3paper
-    ;;
-  a4*)
-    PWIDTH=597
-    PHEIGHT=845
-    PAPERSIZE=a4paper
-    ;;
-  a5*)
-    PWIDTH=423
-    PHEIGHT=597
-    PAPERSIZE=a5paper
-    ;;
-  a6*)
-    PWIDTH=298
-    PHEIGHT=423
-    PAPERSIZE=a6paper
-    ;;
-  a7*)
-    PWIDTH=211
-    PHEIGHT=298
-    PAPERSIZE=a7paper
-    ;;
-  a8*)
-    PWIDTH=305
-    PHEIGHT=211
-    PAPERSIZE=a8paper
-    ;;
-  a9*)
-    PWIDTH=105
-    PHEIGHT=305
-    PAPERSIZE=a9paper
-    ;;
-  a10*)
-    PWIDTH=74
-    PHEIGHT=105
-    PAPERSIZE=a10paper
-    ;;
-  b0*)
-    PWIDTH=2847
-    PHEIGHT=4023
-    PAPERSIZE=b0paper
-    ;;
-  b1*)
-    PWIDTH=2012
-    PHEIGHT=2847
-    PAPERSIZE=b1paper
-    ;;
-  b2*)
-    PWIDTH=1423
-    PHEIGHT=2012
-    PAPERSIZE=b2paper
-    ;;
-  b3*)
-    PWIDTH=1006
-    PHEIGHT=1423
-    PAPERSIZE=b3paper
-    ;;
-  b4*)
-    PWIDTH=712
-    PHEIGHT=1006
-    PAPERSIZE=b4paper
-    ;;
-  b5*)
-    PWIDTH=503
-    PHEIGHT=712
-    PAPERSIZE=b5paper
-    ;;
-  archA)
-    PWIDTH=650
-    PHEIGHT=867
-    ;;
-  archB)
-    PWIDTH=867
-    PHEIGHT=1301
-    ;;
-  archC)
-    PWIDTH=1301
-    PHEIGHT=1734
-    ;;
-  archD)
-    PWIDTH=1734
-    PHEIGHT=2602
-    ;;
-  archE)
-    PWIDTH=2602
-    PHEIGHT=3469
-    ;;
-  flsa|flse)
-    PWIDTH=614
-    PHEIGHT=940
-    ;;
-  halfletter)
-    PWIDTH=397
-    PHEIGHT=614
-    ;;
-  ledger)
-    PWIDTH=1229
-    PHEIGHT=795
-    ;;
-  legal)
-    PWIDTH=614
-    PHEIGHT=1012
-    ;;
-  letter)
-    PWIDTH=614
-    PHEIGHT=795
-    ;;
-  note)
-    PWIDTH=542
-    PHEIGHT=723
-    ;;
-  *)
-    echo ""
-    echo $0": unknown papersize -- "$PAPERSIZE
-    echo ""
-    ;;
-esac
-}
-
-doRcFiles()
-{
-#
-# RC-files ?
-#
-for D in /usr/local/share/ /usr/local/share/lilypond/ /etc/ $HOME/. ./.
-do
-  RCfile=$D"lilyrc"
-  [ -r $RCfile ] && . $RCfile
-done
-fORI=$ORIENTATION
-fLNG=$LANGUAGE
-fPSZ=$PAPERSIZE
-fLHF=$LATEXHF
-unset ORIENTATION LANGUAGE PAPERSIZE LATEXHF
-}
-
-
-
-#
-# Trap function (cleanup)
-#
-
-
-
-trap cleanup 0 9 15
-
-
-
-#
-# Various defaults
-#
-[ -z "$TMP" ] && TMP=/tmp
-if [ ! -d $TMP ]
-then
-  $debug_echo $IDENTIFICATION": temporary directory "$TMP" not found, set to /tmp"
-  TMP=/tmp
-fi
-LOGFILE=$TMP/lilylog.$$                        # Logfile for lilypond
-PAPERSIZE=a4                            # Default papersize name
-PWIDTH=597                              # Default paperwidth
-PHEIGHT=845                             # Default paperheight
-PNUM="%"                                # Page numbering on
-LILYOPTS=""                             # Options to lilypond
-SOURCEDIR=""
-LILYPOND_EXECUTABLE=lilypond
-doRcFiles
-
-
-
-# Keywords defined in titledefs.tex
-#
-TF="`kpsewhich -n latex tex titledefs.tex`"
-MU_DEF=""
-if [ -r "${TF:=/usr/local/share/texmf/tex/lilypond/titledefs.tex}" ]
-then
-  MU_DEF=`sed -n -e 's/.*newcommand\*{.\(mudela[^}]*\)}.*$/\1/p' "$TF"`
-fi
-
-: "${MU_DEF:=mudelatitle mudelasubtitle mudelacomposer \
-          mudelameter mudelaopus mudelaarranger mudelapiece \
-         mudelapoet mudelainstrument \
-         }"
-
-#
-# debugging
-#
-debug_echo=:
-#
-# All files in one LaTeX run
-#
-SEPFILE=N
-#
-# Find command line options and switches
-#
-# "x:" x takes argument
-#
-switches="DF:H:I:KLNO:W:dhkl:o:p:S:s\?"
-options=""
-#
-# ugh, "\-" is a hack to support long options
-# while getopts \-:$options$switches O
-# must be in double quotes for bash-2.0
-while getopts "\-:$options$switches" O
-do
-  $debug_echo "O: \`$O'"
-  $debug_echo "arg: \`$OPTARG'"
-  case $O in
-    D  )
-      [ $debug_echo = echo ] && set -x
-      debug_echo=echo
-      ;;
-    F  )
-      LATEXHF=$OPTARG
-      ;;
-    H  )
-      PHEIGHT=$OPTARG
-      ;;
-    I  )
-      LILYOPTS="$LILYOPTS -I $OPTARG"
-      LILYINCLUDE="$LILYINCLUDE:$OPTARG"
-      ;;
-    K  )
-      KEEP_LILY_OUTPUT=Y
-      ;;
-    L  )
-      ORIENTATION=landscape
-      ;;
-    O  )
-      ORIENTATION=$OPTARG
-      ;;
-    N  )
-      PNUM="\pagestyle{empty}"
-      ;;
-    W  )
-      PWIDTH=$OPTARG
-      ;;
-    d  )
-      LILYOPTS=$LILYOPTS" -d"
-      ;;
-    h  )
-      help;
-      exit 0
-      ;;
-    k  )
-      KEEP_LY2DVI_OUTPUT=Y
-      ;;
-    l  )
-      LANGUAGE=$OPTARG
-      ;;
-    o  )
-      OUTPUTDIR=$OPTARG
-      ;;
-    p  )
-      PAPERSIZE=$OPTARG
-      ;;
-    s  )
-      SEPFILE=Y
-      ;;
-    S  )
-      SOURCEDIR=$OPTARG
-      ;;
-    \? )
-      help;
-      exit -1
-      ;;
-    # a long option!
-    -)
-      $debug_echo "long option: \`$OPTARG'"
-      case "$OPTARG" in
-        He*|-He*)
-          PHEIGHT"`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"=
-          ;;
-        W*|-W*)
-          PWIDTH="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
-          ;;
-        dep*|-dep*)
-          LILYOPTS="$LILYOPTS -d"
-          ;;
-        d*|-d*)
-          [ $debug_echo = echo ] && set -x
-          debug_echo=echo
-          ;;
-        hea*|-hea*)
-          LATEXHF="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
-          ;;
-        h*|-h*)
-          help;
-         exit 0
-          ;;
-        i*|-i*)
-          dir="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
-         LILYOPTS="$LILYOPTS --include=$dir"
-         LILYINCLUDE="$LILYINCLUDE:$dir"
-         ;;
-        keepli*|-keepli*)
-          KEEP_LILY_OUTPUT=Y
-          ;;
-        k*|-k*)
-          KEEP_LY2DVI_OUTPUT=Y
-          ;;
-        land*|-land*)
-          ORIENTATION=landscape
-          ;;
-        lang*|-lang*)
-          LANGUAGE="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
-          ;;
-       n*|-n*)
-         PNUM="\pagestyle{empty}"
-         ;;
-       or*|-or*)
-         ORIENTATION="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
-         ;;
-       ou*|-ou*)
-         OUTPUTDIR="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
-         ;;
-        p*|-p*)
-          PAPERSIZE="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"
-          ;;
-        separa*|-sep*)
-         SEPFILE=Y
-          ;;
-       sourcedir*|-sourcedir*)
-         SOURCEDIR=$OPTARG
-         ;;
-        *|-*)
-          echo "$0: illegal option -- \"$OPTARG\""
-          help;
-          exit -1
-          ;;
-      esac
-  esac
-done
-shift `expr $OPTIND - 1`
-
-if [ "$SOURCEDIR" != "" ]; then
-# apparently MakeTeXTFM can't handle relative dirs
-       SOURCEDIR=`cd $SOURCEDIR; pwd`
-       LILYINCLUDE="$SOURCEDIR/init:$SOURCEDIR/mf/out:$LILYINCLUDE"
-       TEXINPUTS="$SOURCEDIR/tex:$TEXINPUTS:"
-       MFINPUTS="$SOURCEDIR/mf:$MFINPUTS:"
-       LILYPOND_EXECUTABLE="$SOURCEDIR/lily/out/lilypond"
-       export MFINPUTS LILYPOND_EXECUTABLE TEXINPUTS SOURCEDIR 
-fi
-
-#
-# Input file name
-#
-if [ "$1" = "" ]
-then
-  help
-  $debug_echo "$IDENTIFICATION: No input file name given"
-  exit 1
-fi
-# regexp_quote -- quote a string as a regular expression for egrep or sed
-regexp_quote(){
-       Echo "$@" | sed 's/\([]\[\.*?+^$]\)/\\\1/g'
-}
-#
-#
-mudelaDefs(){
-# Include \def\mudela-definitions
-# The aim here is to pick up the definition for the 
-# current file, then any other file.
-#
-mudelatmp=$TMP/mudelaDefs$$
-# Use `cat' to prevent filenames being prepended
-# 
-cat "$File" $OF | fgrep "$MU_DEF" > $mudelatmp
-for L in $MU_DEF
-do
-    # This converts \def\mudelatitle{fred}
-    # to \mudelatitle{fred} or to
-    # \def\mudelatitle{fred}
-    # and stops after the first one found.
-    sed -n '/\\def\\'"$L"'{\([^}]*\)}.*$/{
-       s//'"`regexp_quote \"$1\"`"'\\'"$L"'{\1}%/p
-       q
-    }'  $mudelatmp  >> $LatF
-done
-rm -f $mudelatmp
-}
-#
-#
-startFile(){
-#
-# LaTeX file name
-#
-BN=`basename "$File" .tex`
-FN="$BN.$$"
-if [ "$KEEP_LY2DVI_OUTPUT" != "Y" ]
-then
-  LatF="$TMP/$FN.tex"
-else
-  LatF="$FN.tex"
-fi
-#
-# Find:
-#   paper size        (PAPERSIZE, overridden by command line option -p)
-#   paper orientation (ORIENTATION, overridden by option -o)
-#   language          (LANGUAGE, overridden by option -l)
-#   textwidth
-#
-eval `sed -n \\
-  -e 's/\\\\def\\\\mudelalanguage{\([^}]*\).*$/fLNG=\1;/p' \\
-  -e 's/\\\\def\\\\mudelalatexheaders{\([^}]*\).*$/fLHF=\1;/p' \\
-  -e 's/\\\\def\\\\mudelaorientation{\([^}]*\).*$/fORI=\1;/p' \\
-  -e 's/\\\\def\\\\mudelapaperlinewidth{\([^}]*\).*$/TWN=\1;/p' \\
-  -e 's/\\\\def\\\\mudelapapertextheight{\([^}]*\).*$/THN=\1;/p' \\
-  -e 's/\\\\def\\\\mudelapapersize{\([^}]*\).*$/fPSZ=\1;/p' \\
-    "$File"`
-#
-if [ -z "$LATEXHF" ]
-then
-  LATEXHF="$fLHF"
-fi
-LLHF="%"
-if [ -n "$LATEXHF" ]
-then
-  [ -f         "$LATEXHF" ] && LLHF="\input{$LATEXHF}"
-fi
-#
-if [ -z "$PAPERSIZE" ]
-then
-  PAPERSIZE="$fPSZ"
-fi
-if [ -n "$PAPERSIZE" ]
-then
-  setPaperZize
-  PAPEROPT="$PAPERSIZE"
-fi
-#
-if [ -z "$ORIENTATION" ]
-then
-  ORIENTATION="$fORI"
-fi
-if [ -n "$ORIENTATION" ]
-then
-  if [ -z "$PAPEROPT" ]
-  then
-    PAPEROPT="$ORIENTATION"
-  else
-    PAPEROPT="$PAPEROPT,$ORIENTATION"
-  fi
-fi
-#
-if [ -n "$PAPEROPT" ]
-then
-  PAPER="[$PAPEROPT]"
-fi
-#
-if [ -z "$LANGUAGE" ]
-then
-  LANGUAGE="$fLNG"
-fi
-if [ -n "$LANGUAGE" ]
-then
-  LLNG="\usepackage[$LANGUAGE]{babel}"
-else
-  LLNG="%"
-fi
-
-#
-# Find textwidth
-#
-if [ -n "$TWN" ]
-then
-  TW="$TWN"
-  case "$TW" in
-    *mm)
-      ;;
-    *cm)
-      ;;
-    *pt)
-      ;;
-    *)
-      TW="${TW}pt"
-      ;;
-  esac
-  $debug_echo "Text width = $TW"
-fi
-TWp=`Echo $TW | sed -e 's/\..*$//'`
-PWp="$PWIDTH"
-#
-# Find textheight
-#
-if [ -n "$THN" ]
-then
-  TH=$THN
-  case $TH in
-    *mm)
-      ;;
-    *cm)
-      ;;
-    *pt)
-      ;;
-    *)
-      TH="${TH}pt"
-      ;;
-  esac
-  $debug_echo "Text height = $TH"
-fi
-THp="`echo $TH | sed -e 's/\..*$//'`"
-PHp="$PHEIGHT"
-if [ "$ORIENTATION" = "landscape" ]
-then
-  PWp="$PHEIGHT"
-  PHp="$PWIDTH"
-fi
-HMARG="`expr '(' $PWp - $TWp ')' / 2`"pt
-$debug_echo "Text left = $HMARG"
-VMARG="`expr '(' $PHp - $THp ')' / 2`"pt
-$debug_echo "Text top = $VMARG"
-#
-# Geometry: /var/lib/texmf/latex/geometry/geometry.dvi
-#
-#
-# Write LaTeX file
-#
-cat << EOF > $LatF
-% Creator: $IDENTIFICATION
-% Automatically generated from  $IF, $NOW
-
-\documentclass$PAPER{article}
-
-$LLNG
-\usepackage{geometry}
-\usepackage[latin1]{inputenc}
-%\usepackage[T1]{fontenc}
-$PNUM
-%\addtolength{\oddsidemargin}{-1cm}
-%\addtolength{\topmargin}{-1cm}
-%\setlength{\textwidth}{$TW}
-%\setlength{\textheight}{$TH}
-\geometry{width=$TW, left=$HMARG, height=$TH, top=$VMARG}
-\input lilyponddefs
-\input titledefs
-$LLHF
-\begin{document}
-EOF
-mudelaDefs
-cat << EOF >> $LatF
-\cmrtwenty% ugh
-\makelilytitle
-EOF
-}
-nextFile(){
-cat << EOF >> $LatF
-\def\theopus{}%
-\def\thepiece{}%
-\def\mudelaopus{}%
-\def\mudelapiece{}%
-EOF
-mudelaDefs "\\def"
-cat << EOF >> $LatF
-\def\theopus{\mudelaopus}% ugh
-\def\thepiece{\mudelapiece}%
-\makelilypiecetitle
-EOF
-}
-#
-# Conclusion
-#
-endFile(){
-cat << EOF >> $LatF
-\vfill\hfill{\LilyIdString}
-\end{document}
-EOF
-#
-# Run LaTeX
-#
-latex '\nonstopmode \input '$LatF || exit 5
-#
-# Rename dvi file
-#
-if [ -f $FN.dvi ]
-then
-    RESULT="$BN.dvi"
-    [ -n "$OUTPUTDIR" ] && RESULT="$OUTPUTDIR/$RESULT"
-    
-    cp "$FN.dvi" "$RESULT" || exit 5
-fi
-#
-# Output some info
-#
-cat << EOF
-
-$IDENTIFICATION: dvi file name is $RESULT
-
-EOF
-}
-
-# ugh. GF is side-effect.
-findInput() {
-# should check for LILYINCLUDE
-  OIFS="$IFS"
-  IFS=':'
-  x=`echo $LILYINCLUDE | sed "s!:! !g"`
-  IFS="$OIFS"
-  for lypath in . $x
-  do
-    if [ -f "$lypath/$1" ]
-    then
-      GF="$lypath/$1"
-      return
-    fi
-
-    if [ -f "$lypath/$1.ly" ]
-    then
-      GF="$lypath/$1.ly"
-      return
-    fi
-    if [ -f "$lypath/$1.fly" ]
-    then
-       GF="$lypath/$1.fly"
-       return
-    fi
-  done
-  $debug_echo "$IDENTIFICATION: Input file \"$GF\" not found"
-  echo "$NAME: Input file \"$GF\" not found"                       1>&2
-  exit 2
-}
-#
-# Loop through all files
-#
-
-LILY_OUTPUT_FILES=
-
-for GF 
-do
-    findInput $GF
-
-  #
-  # Check whether the file is input to or output from lilypond
-  #
-  L1=`head -1 $GF` 
-  OP=`echo $L1 | grep "^% Creator: GNU LilyPond"`
-  if [ -n "$OP" ]
-  then
-    #
-    # OK - it's the output from lilypond.
-    #
-    # Get lilypond source file name
-    #
-    OF=$GF
-    IFL=`grep mudelafilename $OF`
-    if [ "$IFL" != "" ]
-    then
-      IF=`echo $IFL | sed -e 's/.*{//' -e 's/}*.$//'`
-      #
-      # Check if source file exists
-      #
-      if [ ! -f $IF ]
-      then
-        $debug_echo $IDENTIFICATION": Mudela file not found."
-        TW=15.5cm
-        TH=25.0cm
-      fi
-    else
-      $debug_echo $IDENTIFICATION": Mudela file name not found."
-      TW=15.5cm
-      TH=25.0cm
-    fi
-  else
-    #
-    # I have to assume this is the lilypond input file
-    # Find output file name, if defined
-    #
-    IF=$GF
-    #
-    # Run lilypond
-    # Grab output file names
-    #
-    $debug_echo "lilypond "$LILYOPTS $IF
-
-    $LILYPOND_EXECUTABLE $LILYOPTS $IF 2>&1  | tee $LOGFILE
-    OF="`sed -n -e 's/TeX output to \([^\.]*\.tex\)\.\.\.$/\1/p' $LOGFILE`"
-    $debug_echo "==> $OF"
-    LILY_OUTPUT_FILES="$LILY_OUTPUT_FILES $OF"
-    STATUS=`egrep -i "error|segmentation|abort" $LOGFILE`
-    echo $STATUS
-    if [ ! -z "$STATUS" ]
-    then
-      exit 10
-    fi
-  fi
-  #
-  # "Spin through" all the files
-  #
-  for File in $OF
-  do
-    $debug_echo "--- "$File
-    #
-    # Check if output file is generated
-    #
-    if [ ! -f "$File" ]
-    then
-      $debug_echo "$IDENTIFICATION: hmm, I could not find the output file $File"
-      exit 4
-    fi
-    #
-    # Is this the first file?
-    #
-    if [ -z "$FFile" ]
-    then
-      FFile="$File"
-      startFile
-    else
-      nextFile
-    fi
-    cat << EOF >> $LatF
-\input{$File}
-EOF
-    if [ $SEPFILE = Y ]
-    then
-      FFile=""
-      endFile
-    fi
-  done
-done
-if [ $SEPFILE = N ]
-then
-  endFile
-fi
-#
-# OK - finished
-#
diff --git a/scripts/ly2dvi32.py b/scripts/ly2dvi32.py
deleted file mode 100644 (file)
index 74c5495..0000000
+++ /dev/null
@@ -1,1117 +0,0 @@
-#!@PYTHON@
-
-"""
-=======================================================================
-LilyPond to dvi converter
-
-Features include Title information, paper size specification, and image
-orientation.  
-
-Usage: ly2dvi.py [OPTION]... [FILE]...
-Input: LilyPond source or LilyPond generated TeX files
-Output: DVI file
-=======================================================================
-"""
-
-name = 'ly2dvi'
-version = '0.0.5'
-errorlog = ''
-
-import sys
-import os
-import getopt
-import re
-import string
-import time
-import glob
-
-
-class Input:
-    """
-    This class handles all ly2dvi.py input file methods
-
-    Public methods:
-    
-    __init__()  Constructor
-    open(file)  Open a .ly file or .tex file using lilyinclude path
-    close()     Close current file
-    type()      Determine file type .ly (input) or .tex (output)
-    setVars()   Set title definitions found in .tex (output) file
-    """
-
-    #
-    # Constructors
-    #
-
-    def __init__(this):
-       this.__fd = None 
-
-    #
-    # open
-    #
-    def open(this,file):
-        """
-        open file and set private class variable __fd.  The search
-        sequence is: current directory followed by the directories
-        found in include property list.  Each directory is searched
-        for file, file.ly, and file.fly.
-        
-        input:  file   filename
-        output: void
-        error:  ExitNotFound Exception
-        """
-
-        for i in [''] + Props.get('include')[0:]:
-            ifile = os.path.join(i,file)
-            for j in ['','.ly','.fly']:
-                jfile = ifile+j
-                try:
-                    this.__fd = open( jfile, 'r' )
-                    return
-                except:
-                    pass
-        sys.exit('ExitNotFound', file)
-
-
-    #
-    # close
-    #
-    def close(this):
-        """
-        close file object __fd
-        
-        input:  void
-        output: void
-        error:  None
-        """
-        this.__fd.close()
-
-
-    #
-    # type
-    #
-    def type(this):
-        """
-        Determine input file type.  LilyPond source is 'input' type
-        and LilyPond generated TeX file is 'output' type
-
-        input:  void
-        output: 'input' | 'output'
-        error:  None
-        """
-
-        firstline = this.__fd.readline()
-        this.__fd.seek(0)
-        if  re.match('% Creator: GNU LilyPond [0-9]+[.0-9]+',firstline ):
-            return 'output'
-        else:
-            return 'source'
-
-
-    #
-    # setVars
-    #
-    def setVars(this): 
-        """
-        Search for properties in the current input file and set the
-        appropriate values.  The supported properties names are in
-        local variable varTable along with the property list
-        titledefs.
-
-        input:  void
-        output: None
-        error:  None
-        """
-
-        varTable = [
-            #   regexp              set method
-            #   ------              ----------
-            ( 'language',        Props.setLanguage ),
-            ( 'latexheaders',    Props.setHeader ),
-            ( 'orientation',     Props.setOrientation ),
-            ( 'paperpapersize',  Props.setPaperZize ),
-            ( 'papertextheight', Props.setTextHeight ),
-            ( 'paperlinewidth',  Props.setLineWidth ),
-            ( 'filename',        Props.setFilename ),
-            ]
-
-        titles={}
-        for line in this.__fd.readlines():
-            m=re.match('\\\\def\\\\mudela([\w]+){(.*)}',line)
-            if m:
-                for var in varTable:
-                    if m.group(1) == var[0]:
-                        var[1](m.group(2),'file')
-                        break
-                for var in Props.get('titledefs'):
-                    if m.group(1) == var:
-                        titles[var]=m.group(2)
-                        break
-        Props.setTitles(titles,'file')
-        this.__fd.seek(0)
-
-\f
-
-class TeXOutput:
-    """
-    This class handles all ly2dvi.py output file methods
-
-    private methods:
-     __mudelaDefs(opt)  Send title info to output file
-
-    Public methods:
-    __init__()  Constructor
-    write(str)  Write a string to output file 
-    start(file) Start the latex file
-    next()      Process next output file
-    end()       Finish latex file and run latex 
-    """
-
-    #
-    # constructor
-    #
-    def __init__(this):
-       this.__fd = None 
-       this.__base = ''
-       this.__outfile = ''
-
-    #
-    # __medelaDefs
-    #
-    def __mudelaDefs(this,opt):
-        """
-        Write titles to output
-
-        input:  opt   Supports header and subheader output
-        output: None
-        error:  None
-        """
-
-        titles = Props.get('titles')
-        for key in titles.keys():
-            this.write('%s\\mudela%s{%s}%%\n' % (opt,key,titles[key]))
-
-    #
-    # write
-    #
-    def write(this,str):
-        """
-        Write str to current output file
-
-        input:  str  String to write
-        output: None
-        error:  None
-        """
-        
-        this.__fd.write(str)
-
-    #
-    # start
-    #
-    def start(this,file):
-        """
-        Start LaTeX file.  Calculates the horizontal and vertical
-        margin using pagewidth, pageheight, linewidth, and textheight.
-        Creates temporary output filename and opens it for write.
-        Sends the LaTeX header information to output.  Lastly sends
-        the title information to output.
-
-        input:  file  output file name 
-        output: None
-        error:  None
-        """
-
-        now=time.asctime(time.localtime(time.time()))
-        linewidth = Props.get('linewidth')
-        textheight = Props.get('textheight')
-
-        if Props.get('orientation') == 'landscape':
-            pagewidth = Props.get('pageheight')
-            pageheight = Props.get('pagewidth')
-        else:
-            pageheight = Props.get('pageheight')
-            pagewidth = Props.get('pagewidth')
-                             
-        horizontalMarginArg =  ( (pagewidth - linewidth)/2 )   
-        verticalMarginArg =  ( (pageheight - textheight)/2  )
-
-        top="""\
-%% Creator: %s
-%% Automatically generated from  %s, %s
-
-\\documentclass[%s]{article}
-
-%s 
-\\usepackage{geometry}
-\\usepackage[latin1]{inputenc} 
-%%\\usepackage[T1]{fontenc} 
-%s 
-%%\\addtolength{\\oddsidemargin}{-1cm} 
-%%\\addtolength{\\topmargin}{-1cm} 
-%%\\setlength{\\textwidth}{%s} 
-%%\\setlength{\\textheight}{%s} 
-\\geometry{width=%spt, left=%spt, height=%spt, top=%spt} 
-\\input lilyponddefs 
-\\input titledefs 
-%s 
-\\begin{document}
-""" % ( program_id(), Props.get('filename'), now, Props.get('papersize'),
-        Props.get('language'), Props.get('pagenumber'), linewidth, textheight,
-        linewidth, horizontalMarginArg, textheight, verticalMarginArg,
-        Props.get('header') )
-        
-        pathcomp = os.path.splitext(file)
-        this.__base = pathcomp[0]
-        this.__outfile = '%s.%d%s' % (pathcomp[0], os.getpid(), pathcomp[1])
-        try:
-            this.__fd = open(this.__outfile,"w")
-        except:
-            sys.exit('ExitNoWrite', this.__outfile)
-        this.write(top)
-        this.__mudelaDefs('')
-        this.write("""\
-\\cmrtwenty% ugh
-\\makelilytitle
-""") 
-
-    #
-    # next
-    #
-    def next(this):
-        """
-        Write LaTeX subheader information to support more than one
-        score in a document.  Lastly send current title information to
-        output.
-
-        input:  None
-        output: None
-        error:  None
-        """
-
-        this.write("""\
-\\def\\theopus{}%
-\\def\\thepiece{}%
-\\def\\mudelaopus{}%
-\\def\\mudelapiece{}%
-""")
-        this.__mudelaDefs("\\def")
-        this.write("""\
-\\def\\theopus{\\mudelaopus}% ugh
-\\def\\thepiece{\\mudelapiece}%
-\\makelilypiecetitle
-""")
-
-
-    #
-    # end
-    #
-    def end(this):
-        """
-        Close output file and run latex on it.
-
-        input:  None
-        output: None
-        error:  ExitBadLatex Exception
-        """
-
-        outfile=this.__base + '.dvi'
-        if Props.get('output') != '':
-            outfile = os.path.join(Props.get('output'), outfile )
-            
-        this.write("""\
-\\vfill\\hfill{\\LilyIdString}
-\\end{document}
-""")
-        this.__fd.close()
-        if ( os.name == 'posix' ):
-            stat = os.system('latex \'\\nonstopmode \\input %s\'' %
-                             (this.__outfile))
-        else: # Windows shells don't eat the single quotes
-            stat = os.system('latex \\nonstopmode \\input %s' %
-                             (this.__outfile))
-        if stat:
-            sys.exit('ExitBadLatex')
-        if os.path.isfile(outfile):
-            os.remove(outfile)
-        os.rename(this.__base + '.' + str(os.getpid()) + '.dvi', outfile)
-        sys.stderr.write( '\n' + program_id() + ': dvi file name is %s\n\n'
-                   % (outfile))
-
-        if Props.get('postscript'):
-            psoutfile=this.__base + '.ps'
-            if Props.get('output') != '':
-                psoutfile = os.path.join(Props.get('output'), psoutfile )
-            stat = os.system('dvips -o %s %s 2>&1' % (psoutfile,outfile))
-            if stat:
-                sys.exit('ExitBadPostscript')
-            
-
-\f
-
-class Properties:
-    """
-    This class handles all ly2dvi.py property manipulation
-
-    Public methods:
-    
-    __init__()  Constructor
-    set<property> methods
-    """
-
-    def __init__(this):
-
-        #
-        # Following is the order of priority for property assignment.  The
-        # list is organized from lowest to highest priority.  Each
-        # assignment is overridden by the next requester in the list.
-        #
-        # Requester     Description
-        # ---------     -----------
-        # init          Initial default values
-        # file          The values found in the lilypond generated TeX files
-        # environment   Envrionment variables LILYINCLUDE, LILYPONDPREFIX
-        # rcfile        $LILYPONDPREFIX/share/lilypond/.lilyrc
-        # rcfile        $HOME/.lilyrc
-        # rcfile        ./.lilyrc
-        # commandline   command line arguments
-        # 
-        this.__overrideTable = {
-            'init'        : 0,
-            'file'        : 1,
-            'environment' : 2,
-            'rcfile'      : 3,
-            'commandline' : 4,
-            'program'     : 5
-            }
-
-        this.__roverrideTable = {} # reverse lookup used for debug
-        for i in this.__overrideTable.items():
-            this.__roverrideTable[i[1]]=i[0]
-        
-        this.__data = {
-            'pagewidth'    :  [597, this.__overrideTable['init']],
-            'pageheight'   :  [845, this.__overrideTable['init']],
-            'papersize'    :  ['a4paper', this.__overrideTable['init']],
-            'textheight'   :  [0, this.__overrideTable['init']],
-            'linewidth'    :  [0, this.__overrideTable['init']],
-            'orientation'  :  ['portrait', this.__overrideTable['init']],
-            'language'     :  ['%', this.__overrideTable['init']],
-            'include'      :  [[], this.__overrideTable['init']],
-            'debug'        :  [0, this.__overrideTable['init']],
-            'keeplilypond' :  [0, this.__overrideTable['init']],
-            'keeply2dvi'   :  [0, this.__overrideTable['init']],
-            'pagenumber'   :  ['%', this.__overrideTable['init']],
-            'separate'     :  [0, this.__overrideTable['init']],
-            'output'       :  ['', this.__overrideTable['init']],
-            'header'       :  ['%', this.__overrideTable['init']],
-            'dependencies' :  [0, this.__overrideTable['init']],
-            'root'         :  ['', this.__overrideTable['init']],
-            'tmp'          :  ['d:\tmp', this.__overrideTable['init']],
-            'filename'     :  ['', this.__overrideTable['init']],
-            'titledefs'    :  [[], this.__overrideTable['init']],
-            'titles'       :  [{}, this.__overrideTable['init']],
-            'lilyOutputFiles' :  [[], this.__overrideTable['init']],
-            'postscript'   :  [0, this.__overrideTable['init']],
-            }
-
-        #
-        # Try to set root and HOME first before calling rcfile
-        #
-        if os.environ.has_key('LILYPONDPREFIX'):
-            this.setRoot(os.environ['LILYPONDPREFIX'], 'environment')
-        else:
-            p=os.path.split(sys.argv[0])
-            p=os.path.split(p[0])
-            this.setRoot(p[0],'init')
-
-        if not os.environ.has_key('HOME'):
-            if os.environ.has_key('HOMEDRIVE') and \
-                 os.environ.has_key('HOMEPATH'):
-                os.environ['HOME'] = os.environ['HOMEDRIVE'] + \
-                                     os.environ['HOMEPATH']
-            else:
-                os.environ['HOME'] = os.curdir
-
-        this.rcfile() # Read initialization file(s)
-
-        if os.environ.has_key('LILYINCLUDE'):
-            tmp=this.get('include')
-            for s in string.split(os.environ['LILYINCLUDE'],os.pathsep):
-                tmp.append(s)
-            this.__set('include', tmp, 'environment')    
-
-
-        t=''
-       if os.environ.has_key ('TEXINPUTS'):
-               t = os.pathsep + os.environ['TEXINPUTS']
-        os.environ['TEXINPUTS'] = os.path.join(this.get('root'), 'texmf',
-                                              'tex', 'lilypond' ) + t
-
-        t=''
-       if os.environ.has_key ('MFINPUTS'):
-               t = os.pathsep + os.environ['MFINPUTS']
-        os.environ['MFINPUTS'] = os.path.join(this.get('root'), 'texmf',
-                                              'mf', 'public', 'lilypond' ) + t
-
-        if os.environ.has_key('TMP'):
-            this.__set('tmp',os.environ['TMP'],'environment')
-
-        
-       fd=this.get_texfile_path ('titledefs.tex')
-        mudefs=[]    
-
-        for line in fd.readlines():
-            m=re.match('\\\\newcommand\*{\\\\mudela([\w]+)}',line)
-            if m:
-                mudefs.append(m.group(1))
-       fd.close
-        this.__set('titledefs', mudefs, 'init')
-
-    #
-    # __set
-    #
-    def __set(this,var,value,requester):
-        """
-        All of the set methods call this to set a property.  If the value
-        was last set by a requestor of lesser priority the new value is
-        assigned, else the old value has priority and is unchanged.
-        """
-
-        if this.__overrideTable[requester] < this.__data[var][1]:
-            return 0
-        else:
-            this.__data[var] = [value, this.__overrideTable[requester]]
-
-    #
-    # get
-    #
-    def get(this,var):
-        """
-        All of the get methods call this to get a property value.  List
-        variable types are return by value to facilitate an append operation.
-        """
-
-        if var == 'include' or var == 'lilyOutputFiles':
-            return this.__data[var][0][0:]  # return a copy not a ref
-        else:
-            return this.__data[var][0]
-
-    #
-    # get_texfile_path
-    #
-    def get_texfile_path (this, var):
-        """
-        locate and open titledefs.tex file
-        """
-
-        if os.name == 'nt':
-            path = os.path.join(this.get('root'), 'texmf', 'tex',
-                                'lilypond', var)
-        else:
-            path =''
-            cmd =('kpsewhich tex %s %s' % (var,errorlog))
-            pipe = os.popen (cmd, 'r')
-            path = pipe.readline ()[:-1] # chop off \n
-            return_status =  pipe.close()
-            if return_status and not path:
-                path = os.path.join(this.get('root'), 'texmf', 'tex',
-                                    'lilypond', var)
-       fd = open(path, 'r')
-        return fd
-
-
-    #
-    # Read rc file
-    #
-    def rcfile(this):
-       """
-        Read initialization file(s)
-        """
-        varTable = [
-            #   name              set method
-            #   ----              ----------
-            ( 'DEBUG',          this.setDebug ),
-            ( 'DEPENDENCIES',   this.setDependencies ),
-            ( 'KEEPLILYPOND',   this.setKeeplilypond ),
-            ( 'KEEPLY2DVI',     this.setKeeply2dvi ),
-            ( 'LANGUAGE',       this.setLanguage ),
-            ( 'LATEXHF',        this.setHeader ),
-            ( 'LILYINCLUDE',    this.setInclude ),
-            ( 'LILYPONDPREFIX', this.setRoot ),
-            ( 'NONUMBER',       this.setNonumber ),
-            ( 'ORIENTATION',    this.setOrientation ),
-            ( 'OUTPUTDIR',      this.setOutput ),
-            ( 'PAPERSIZE',      this.setPaperZize ),
-            ( 'PHEIGHT',        this.setTextHeight ),
-            ( 'POSTSCRIPT',     this.setPostscript ),
-            ( 'PWIDTH',         this.setLineWidth ),
-            ( 'SEPARATE',       this.setSeparate ),
-            ( 'TMP',            this.setTmp ),
-            ]
-
-        if ( os.name == 'posix' ):
-            dotFilename='.lilyrc'
-        else: # Windows apps like edit choke on .lilyrc
-            dotFilename='_lilyrc'
-
-       for d in [os.path.join(this.get('root'),'share','lilypond'), \
-                  os.environ['HOME'], os.curdir ]:
-           file=os.path.join(d,dotFilename)
-           try:
-               fd = open( file, 'r' )
-           except:
-               continue
-           
-            for line in fd.readlines():
-               if re.match('#.*',line):
-                   continue
-               m=re.search('([\w]+)=(.*)',line)
-               if m:
-                    for var in varTable:
-                        if m.group(1) == var[0]:
-                            var[1](m.group(2),'rcfile')
-                            break
-           fd.close
-
-    #
-    # setPaperZize
-    #
-    def setPaperZize(this,size,requester):
-        """
-        Set paper size properties
-        """
-
-        paperTable = [
-            # regex          width    height      name
-            # -----          -----    ------      ----
-            ( 'a0.*',        2389,    3381,    'a0paper' ),
-            ( 'a1$|a1p.*',   1690,    2389,    'a1paper' ),
-            ( 'a2.*',        1194,    1690,    'a2paper' ),
-            ( 'a3.*',        845,     1194,    'a3paper' ),
-            ( 'a4.*',        597,     845,     'a4paper' ),
-           ( 'a5.*',        423,     597,     'a5paper' ),
-            ( 'a6.*',        298,     423,     'a6paper' ),
-            ( 'a7.*',        211,     298,     'a7paper' ),
-            ( 'a8.*',        305,     211,     'a8paper' ),
-            ( 'a9.*',        105,     305,     'a9paper' ),
-            ( 'a10.*',       74,      105,     'a10paper' ),
-            ( 'b0.*',        2847,    4023,    'b0paper' ),
-            ( 'b1.*',        2012,    2847,    'b1paper' ),
-            ( 'b2.*',        1423,    2012,    'b2paper' ),
-            ( 'b3.*',        1006,    1423,    'b3paper' ),
-            ( 'b4.*',        712,     1006,    'b4paper' ),
-            ( 'b5.*',        503,     712,     'b5paper' ),
-            ( 'archA$',      650,     867,     'archApaper' ),
-            ( 'archB$',      867,     1301,    'archBpaper' ),
-            ( 'archC$',      1301,    1734,    'archCpaper' ),
-            ( 'archD$',      1734,    2602,    'archDpaper' ),
-            ( 'archE$',      2602,    3469,    'archEpaper' ),
-            ( 'flsa$|flse$', 614,     940,     'flsapaper' ),
-            ( 'halfletter$', 397,     614,     'halfletterpaper' ),
-            ( 'ledger$',     1229,    795,     'ledgerpaper' ),
-            ( 'legal$',      614,     1012,    'legalpaper' ),
-            ( 'letter$',     614,     795,     'letterpaper' ),
-            ( 'note$',       542,     723,     'notepaper' )
-            ]
-
-        found=0
-        for paper in paperTable:
-            if re.match(paper[0],size):
-                found=1
-                this.__set('pagewidth',paper[1],requester)
-                this.__set('pageheight',paper[2],requester)
-                this.__set('papersize',paper[3],requester)
-                break
-
-        if not found:
-            sys.exit('ExitBadPaper',size)
-
-    #
-    # setTextHeight
-    #
-    def setTextHeight(this,size,requester):
-        """
-        Set textheight property
-        """
-
-       m=re.match('([0-9][.0-9]*)(cm|mm|pt|$)',size)
-       if m:
-           if m.group(2) == 'cm':
-               this.__set('textheight',\
-                           float(m.group(1)) * 72.27/2.54, requester )
-           elif m.group(2) == 'mm':
-               this.__set('textheight',\
-                           float(m.group(1)) * 72.27/25.4, requester )
-           elif m.group(2) == 'pt':
-               this.__set('textheight', float(m.group(1)), requester )
-           elif m.group(2) == '':
-               this.__set('textheight', float(m.group(1)), requester )
-           else:
-               sys.exit('ExitBadHeight', m.group(2))
-       else:           
-           sys.exit('ExitBadHeight', size)
-
-    #
-    # setLineWidth
-    #
-    def setLineWidth(this,size,requester):
-        """
-        Set linewidth propery
-        """
-
-       m=re.match('([0-9][.0-9]*)(cm|mm|pt|$)',size)
-       if m:
-           if m.group(2) == 'cm':
-               this.__set('linewidth', \
-               float(m.group(1)) * 72.27/2.54, requester )
-           elif m.group(2) == 'mm':
-               this.__set('linewidth', \
-               float(m.group(1)) * 72.27/25.4, requester )
-           elif m.group(2) == 'pt':
-               this.__set('linewidth', float(m.group(1)), requester )
-           elif m.group(2) == '':
-               this.__set('linewidth', float(m.group(1)), requester )
-           else:
-               sys.exit('ExitBadWidth', m.group(2))
-       else:           
-           sys.exit('ExitBadWidth', size)
-
-    #
-    # setOrientation
-    #
-    def setOrientation(this,orient,requester):
-        """
-        Set orientation property
-        """
-
-       if orient == 'landscape' or orient == 'portrait':
-           this.__set('orientation', orient, requester )
-       else:
-           sys.exit('ExitBadOrient', orient)
-
-    #
-    # setLanguage
-    #
-    def setLanguage(this,lang,requester):
-        """
-        Set language property
-        """
-
-       this.__set('language', '\\usepackage[%s]{babel}' % (lang), requester )
-
-    #
-    # setInclude
-    #
-    def setInclude(this,inc, requester):
-        """
-        Append an include path
-        """
-
-        tmp = this.get('include')
-        tmp.append(inc)
-        this.__set('include', tmp, requester )
-
-    #
-    # setDebug
-    #
-    def setDebug(this,value,requester):
-        """
-        Set or Clear debug flag
-        """
-
-        if int(value) == 1:
-            this.__set('debug',1,requester)
-        else:
-            this.__set('debug',0,requester)
-
-    #
-    # setKeeplilypond
-    #
-    def setKeeplilypond(this, value, requester):       
-        """
-        Set or Clear keeplilypond flag
-        """
-
-        if int(value) == 1:
-            this.__set('keeplilypond',1,requester)
-        else:
-            this.__set('keeplilypond',0,requester)
-
-    #
-    # setKeeply2dvi
-    #
-    def setKeeply2dvi(this, value, requester): 
-        """
-        Set or Clear keeply2dvi flag
-        """
-
-        if int(value) == 1:
-            this.__set('keeply2dvi',1,requester)
-        else:
-            this.__set('keeply2dvi',0,requester)
-
-    #
-    # setNonumber 
-    #
-    def setNonumber(this, value, requester):   
-        """
-        Set nonumber flag
-        """
-
-        if int(value) == 1:
-            this.__set('pagenumber',1,requester)
-        else:
-            this.__set('pagenumber',0,requester)
-
-    #
-    # setSeparate
-    #
-    def setSeparate(this, value, requester):   
-        """
-        Set or Clear separate flag
-        """
-
-        if int(value) == 1:
-            this.__set('separate',1,requester)
-        else:
-            this.__set('separate',0,requester)
-
-    #
-    # Set output directory name
-    #
-    def setOutput(this,out,requester):
-       this.__set('output',out,requester)
-
-    #
-    # Set latex header name
-    #
-    def setHeader(this,head, requester):
-       this.__set('header',head,requester)
-
-    #
-    # Set or Clear Dependencies flag to generate makefile dependencies
-    #
-    def setDependencies(this, requester):      
-        """
-        Set or Clear dependencies flag
-        """
-
-        if int(value) == 1:
-            this.__set('dependencies',1,requester)
-        else:
-            this.__set('dependencies',0,requester)
-
-    #
-    # Set tmp directory
-    #
-    def setTmp(this,dir, requester):   
-       this.__set('tmp',dir,requester)
-
-    #
-    # Set mudela source file name
-    #
-    def setFilename(this,file, requester):     
-       this.__set('filename',file,requester)
-
-    #
-    # Set title commands
-    #
-    def setTitles(this,titles, requester):     
-       this.__set('titles',titles,requester)
-
-    #
-    # Set title commands
-    #
-    def addLilyOutputFiles(this,filelist,requester):
-        """
-        Add a to the lily output list
-        """
-
-        tmp = this.get('lilyOutputFiles')
-        tmp = tmp + filelist
-        this.__set('lilyOutputFiles',tmp,requester)
-
-    #
-    # Set/Clear postscript flag
-    #
-    def setPostscript(this,value,requester):
-        """
-        Set postscript flag
-        """
-
-        if int(value) == 1:
-            this.__set('postscript',1,requester)
-        else:
-            this.__set('postscript',0,requester)
-
-    #
-    # Set root
-    #
-    def setRoot(this,path, requester): 
-        """
-        Set lilypond root directory
-        """
-
-        os.environ['LILYPONDPREFIX'] = path
-       this.__set('root',path,requester)
-
-    #
-    # printProps
-    #
-    def printProps(this):
-        """
-        Print properties
-        """
-        
-        for key in this.__data.keys():
-            print "%s <%s>:<%s>" % (key,this.get(key),
-                                    this.__roverrideTable[this.__data[key][1]])
-
-\f
-
-#
-# Misc functions
-#
-
-def getLilyopts():
-    inc = ''   
-    if len(Props.get('include')) > 0: 
-        inc = '-I ' + string.join(Props.get('include'),os.pathsep)
-    else:
-
-        if Props.get('dependencies'):
-            dep=' -d'
-        else:
-            dep=''
-       return inc + dep
-    return inc
-
-def writeLilylog(contents):
-    if Props.get('keeplilypond'):
-        file='lilylog.' + str(os.getpid())
-        output = Props.get('output')
-        if output != '':
-            file = os.path.join( output, file )
-        try:
-            fd = open( file, 'w' )
-        except:
-            sys.exit('ExitNoWrite', file)
-        fd.write(contents)
-        fd.close()
-
-def getTeXFile(contents):
-    texfiles=[]
-    for line in string.split(contents,'\n'):
-        m = re.search('^TeX output to (.+)\.\.\.', line)
-        if m:
-            texfiles.append(m.group(1))
-
-    if texfiles == []:
-        sys.exit('ExitNoTeXName')
-    else:
-        return texfiles
-
-def program_id ():
-    return name + ' ' + version;
-
-
-def mailaddress():
-    try:
-       return os.environ['MAILADDRESS']
-    except KeyError:
-       return '(address unknown)'
-
-
-def identify ():
-    sys.stderr.write (program_id () + '\n')
-
-def help ():
-    sys.stderr.write (
-        'Generate dvi file from mudela or lilypond output\n'
-        'Usage: ' + name + ' [OPTION]... [FILE]...\n'
-        '\n'
-        'Options:\n'
-        '  -D,--debug           increase verbosity\n'
-        '  -F,--headers=        name of additional LaTeX headers file\n'
-        '  -H,--Height=         set paper height (points) (see manual page)\n'
-        '  -I,--include=DIR     add DIR to LilyPond\'s search path\n'
-        '  -K,--keeplilypond    keep lilypond output files\n'
-        '  -L,--landscape       set landscape orientation\n'
-        '  -N,--nonumber        switch off page numbering\n'
-        '  -O,--orientation=    set orientation (obsolete - use -L instead)\n'
-        '  -P,--postscript      generate postscript file\n'
-        '  -W,--Width=          set paper width (points) (see manual page)\n'
-        '  -d,--dependencies    tell lilypond make a dependencies file\n'
-        '  -h,--help            this help text\n'
-        '  -k,--keeply2dvi      keep ly2dvi output files\n'
-        '  -l,--language=       give LaTeX language (babel)\n'
-        '  -o,--output=         set output directory\n'
-        '  -p,--papersize=      give LaTeX papersize (eg. a4)\n'
-        '  -s,--separate        run all files separately through LaTeX\n'
-        '\n'
-        'files may be (a mix of) input to or output from lilypond(1)\n'
-        )
-
-\f
-
-#
-# main
-#
-
-def main():
-    """Generate dvi files from lilypond source/output"""
-
-    infile = Input()
-    outfile = TeXOutput()
-    texInputFiles=[]
-
-    (options, files) = getopt.getopt (sys.argv[1:],
-                                      'DF:H:I:KLNPW:dhkl:o:p:s',
-                                      ['debug', 'headers=', 'Height=',
-                                       'include=', 'keeplilypond', 'landscape',
-                                       'nonumber', 'Width=', 'dependencies',
-                                       'help', 'keeply2dvi', 'language=',
-                                       'output=', 'papersize=', 'separate',
-                                       'postscript'])
-    for opt in options:
-        o = opt[0]
-        a = opt[1]
-        if o == '--debug' or o == '-D':
-           Props.setDebug(1,'commandline')
-        elif o == '--headers' or o == '-F':
-           Props.setHeader(a,'commandline')
-        elif o == '--include' or o == '-I':
-           Props.setInclude(a,'commandline')
-        elif o == '--Height' or o == '-H':
-           Props.setTextHeight(a,'commandline')
-        elif o == '--keeplilypond' or o == '-K':
-           Props.setKeeplilypond(1,'commandline')
-        elif o == '--landscape' or o == '-L':
-           Props.setOrientation('landscape','commandline')
-        elif o == '--nonumber' or o == '-N':
-           Props.setNonumber('commandline')
-        elif o == '--Width' or o == '-W':
-           Props.setLineWidth(a,'commandline')
-        elif o == '--dependencies' or o == '-d':
-           Props.setDependencies(1,'commandline')
-        elif o == '--help' or o == '-h':
-            help()
-            return 0
-        elif o == '--keeply2dvi' or o == '-k':
-           Props.setKeeply2dvi(1,'commandline')
-        elif o == '--language' or o == '-l':
-           Props.setLanguage(a,'commandline')
-        elif o == '--output' or o == '-o':
-           Props.setOutput(a,'commandline')
-        elif o == '--papersize' or o == '-p':
-           Props.setPaperZize(a,'commandline')
-        elif o == '--separate' or o == '-s':
-           Props.setSeparate(1,'commandline')
-        elif o == '--postscript' or o == '-P':
-           Props.setPostscript(1,'commandline')
-
-    if len(files):
-        for file in files:
-            infile.open(file)
-            type = infile.type()
-            infile.close()
-            if type == 'source':
-                cmd = 'lilypond %s %s 2>&1' % (getLilyopts(), file)
-                fd = os.popen( cmd , 'r' )
-                log = ''
-                line=fd.readline()
-                while line:
-                    log = log + line
-                    sys.stderr.write( line )
-                    line=fd.readline()
-                stat = fd.close()
-                if stat:
-                    sys.exit('ExitBadLily', cmd )
-                texFiles=getTeXFile(log)
-                writeLilylog(log)
-                Props.addLilyOutputFiles(texFiles,'program')
-                texInputFiles = texInputFiles + texFiles
-            else:
-                texInputFiles.append(file)
-
-        firstfile=1
-        for file in texInputFiles:
-            infile.open(file)
-            infile.setVars() # first pass set variables
-            infile.close()
-            if Props.get('debug'):
-                Props.printProps()
-            if firstfile:
-                outfile.start(file)
-            else:
-                outfile.next()
-            outfile.write("""\
-\\input{%s}
-""" % (file))
-            if Props.get('separate'):
-                outfile.end()
-            else:
-                firstfile=0
-        if not Props.get('separate'):
-            outfile.end()
-    else:
-        help()
-        sys.exit('ExitBadArgs','No files specified')
-
-#
-# Exit values
-#
-ExitTable = {
-    'ExitInterupt'         : ['Ouch!', 1 ],
-    'ExitBadArgs'          : ['Wrong number of arguments', 2 ],
-    'ExitNotFound'         : ['File not found', 3 ],
-    'ExitBadPaper'         : ['Unknown papersize', 4 ],
-    'ExitBadHeight'        : ['Invalid Height specification', 5 ],
-    'ExitBadWidth'         : ['Invalid Width specification', 6 ],
-    'ExitBadOrient'        : ['Invalid Orientation specification', 7 ],
-    'ExitNoWrite'          : ['Permission denied', 8 ],
-    'ExitNoTeXName'        : ['hmm, I could not find an output file name', 9 ],
-    'ExitBadLily'          : ['Lilypond failed', 10 ],
-    'ExitBadLatex'         : ['Latex failed', 11 ],
-    'ExitBadPostscript'    : ['Postscript failed', 12 ],
-    'ExitUnknown'          : ['Unknown Exit Code', 20 ],
-    }
-
-def cleanup():
-    lilyfiles = []
-    tmpfiles = []
-    if not Props.get('keeplilypond'):
-        lilyfiles = Props.get('lilyOutputFiles')
-    if not Props.get('keeply2dvi'):
-        tmpfiles = glob.glob('*.' + str(os.getpid()) + '.*' )
-    for file in lilyfiles + tmpfiles:
-        if os.path.isfile(file):
-            os.remove(file)
-
-
-identify()
-Props = Properties()
-
-try:
-    main()
-
-except KeyboardInterrupt:
-    print ExitTable['ExitInterupt'][0]
-    cleanup()
-    sys.exit(ExitTable['ExitInterupt'][1])
-
-except SystemExit, errno:
-    if ExitTable.has_key(errno.args[0]):
-        msg = ExitTable[errno.args[0]]
-    else:
-        msg = ExitTable['ExitUnknown']
-    if len(errno.args) > 1:  
-        sys.stderr.write( '%s: %s: %s\n' % (name, msg[0], errno.args[1]))
-    else:
-        sys.stderr.write( '%s %s\n' % (name, msg[0]))
-    if Props.get('debug'):
-        Props.printProps()
-    cleanup()
-    sys.exit(msg[1])
-else:
-    cleanup()
index 359d68b326958e1b1e544ceac7bd6e5f931b6f7f..596119c3dd975ea18cf24f91568fb30dd558ca68 100644 (file)
@@ -9,10 +9,9 @@
 
 import os
 import string
-import regex
+import re
 import getopt
 import sys
-import regsub
 
 outdir = 'out/'
 program_version = '0.3'
@@ -70,7 +69,7 @@ class Mudela_output:
                self.file.write ('default_paper = \\paper { \\paper_%s\n linewidth = -15.\\cm; }\n' % s)
                
                if self.fragment:
-                       self.file.write ('\\score { \\melodic { ')
+                       self.file.write ('\\score { \\notes { ')
 
        def write (self,s):
                self.file.write (s)
@@ -133,16 +132,16 @@ class Tex_output:
 
 
 
-begin_mudela_re = regex.compile ('^ *\\\\begin{mudela}')
-begin_mudela_opts_re = regex.compile ('^ *\\\\begin{mudela}\[\(.*\)\]')
-end_mudela_re = regex.compile ('^ *\\\\end{mudela}')
-section_re = regex.compile ('\\\\section')
-chapter_re = regex.compile ('\\\\chapter')
-input_re = regex.compile ('^\\\\input[ \t\n]+\\(.*\\)$')
+begin_mudela_re = re.compile ('^ *\\\\begin{mudela}')
+begin_mudela_opts_re = re.compile ('^ *\\\\begin{mudela}\[(.*)\]')
+end_mudela_re = re.compile ('^ *\\\\end{mudela}')
+section_re = re.compile ('\\\\section')
+chapter_re = re.compile ('\\\\chapter')
+input_re = re.compile ('^\\\\input[ \t\n]+(.*)$')
 
 class Tex_input:
        def __init__ (self,name):
-               if regex.search ('\\.[^/\\\\]+',name) == -1:
+               if not re.search ('\\.[^/\\\\]+',name):
                        name = name + '.tex'
                print 'opening %s' % name
                self.filename = name
@@ -152,8 +151,9 @@ class Tex_input:
                lines = self.infile.readlines ()
                (retlines, retdeps) = ([],[self.filename])
                for line in lines:
-                       if input_re.search (line) <> -1:
-                               t = Tex_input (input_re.group (1))
+                       m = input_re.search (line)
+                       if m:
+                               t = Tex_input (m.group (1))
                                ls =t.get_lines ()
                                retlines = retlines + ls[0]
                                retdeps = retdeps + ls[1]
@@ -175,9 +175,9 @@ class Main_tex_input(Tex_input):
                self.mudela = None
                self.deps = []
        def set_sections (self, l):
-               if section_re.search (l) <> -1:
+               if section_re.search (l):
                        self.section = self.section + 1
-               if chapter_re.search (l) <> -1:
+               if chapter_re.search (l):
                        self.section = 0
                        self.chapter = self.chapter + 1
 
@@ -191,9 +191,10 @@ class Main_tex_input(Tex_input):
        def do_it(self):
                (lines, self.deps) = self.get_lines ()
                for line in lines:
-                       if begin_mudela_re.search (line) <> -1:
-                               if begin_mudela_opts_re.search (line) <> -1:
-                                       opts = begin_mudela_opts_re.group (1)
+                       if begin_mudela_re.search (line):
+                               m =begin_mudela_opts_re.search (line) 
+                               if m:
+                                       opts = m.group (1)
                                else:
                                        opts = ''
                                optlist = string.split (opts, ',')
@@ -214,7 +215,7 @@ class Main_tex_input(Tex_input):
 
 
                                continue
-                       elif end_mudela_re.search (line) <> -1:
+                       elif end_mudela_re.search (line):
                                self.mudela.close ()
                                self.mudtex.close_mudela ()
                                self.mudela = None
index a6c1c38b9842c6db88765193f4f65c90ca29542a..e828ae4961999dc0f9641cc008cd7520a0a6b490 100644 (file)
@@ -1,5 +1,7 @@
        * urg, fix flower.py dirname, tarball etc. (package-diff, release)
 
+       * use RE iso REG{SUB,EX} for python stuff.
+
        * (re-)enable use outside of make system, e.g.
          
          - /usr/bin/make-patch for direct use on tarballs
index 2e9645b6dae8de1dad2bc300d2bdb85cfbb273fb..3ca5d629f1e9b1ae6854d5c9fe9316bbebd69a45 100644 (file)
@@ -84,12 +84,6 @@ doc++:
        (cd $(outdir); sh ../$(step-bindir)/tar-docxx.sh $(package)-$(TOPLEVEL_VERSION).tar.gz)
 
 
-update-state-vector:
-ifneq ($(strip $(state-vector)),)
-       if [ "`tail -1 $(state-vector)`" != "$(TOPLEVEL_VERSION)" ]; then\
-         echo $(TOPLEVEL_VERSION) >> $(state-vector); \
-       fi
-endif
 
 local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
        mkdir -p $(distdir)/$(localdir)
index 374f10ef2bd139aa43079e864eda24f8548d09d4..b5423aa25de9e1e897c86e6b96df74853ace8384 100644 (file)
@@ -27,7 +27,6 @@ WWW-clean:
        $(MAKE) CONFIGSUFFIX='www' clean
 
 dist:
-       $(MAKE) update-state-vector
        rm -rf $(distdir)
        $(MAKE) local-dist $(distdir)
        chmod -R a+r $(distdir)
diff --git a/test/hash.cc b/test/hash.cc
new file mode 100644 (file)
index 0000000..ee67572
--- /dev/null
@@ -0,0 +1,39 @@
+#include <stdio.h>
+#include <iostream.h>
+#include "dictionary-iter.hh"
+
+
+
+main ()
+{
+  Dictionary<String> *dict = new Dictionary<String>;
+  
+  char s[1000];
+
+  dict->elem("foo") = "bar";
+  dict->elem("bla") = "ba";
+  dict->elem("blo") = "bar";
+  
+  while (gets (s))
+    {
+      String str (s);
+
+      int l = str.length_i ();
+
+      dict->elem (str.left_str (l/2)) = str.right_str (l/2);
+    }
+
+  int i=1000;
+  while (i--)
+    {
+      Dictionary<String> *dict2=new Dictionary<String> (*dict);
+      delete dict;
+      dict = dict2;
+    }
+
+  for (Dictionary_iter<String> i (*dict); i.ok (); i++)
+    {
+      cout << i.key () << " == " << i.val () << endl;
+      cout << "elem_b: " << dict->elem_b (i.key ()) << ", key " << i.key () << " val " << dict->elem (i.key ()) <<endl;
+    }
+}