]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.2.8 release/1.2.8
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 16 Sep 1999 10:49:32 +0000 (12:49 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 16 Sep 1999 10:49:32 +0000 (12:49 +0200)
44 files changed:
CHANGES
Documentation/footer.html.in
Documentation/index.texi
Documentation/topdocs/INSTALL.texi
Documentation/topdocs/README.texi
Documentation/topdocs/index.tely
TODO
VERSION
buildscripts/genheader.py
buildscripts/html-accents.py [deleted file]
buildscripts/mutopia-index.py
buildscripts/template.py [deleted file]
lily/beam-engraver.cc
lily/beam.cc
lily/break-algorithm.cc
lily/chord-tremolo-engraver.cc
lily/column-x-positions.cc
lily/gourlay-breaking.cc
lily/include/line-spacer.hh
lily/include/simple-spacer.hh
lily/include/spring-spacer.hh
lily/include/word-wrap.hh
lily/line-spacer.cc
lily/simple-spacer.cc
lily/spacing-spanner.cc
lily/spring-spacer.cc
lily/word-wrap.cc
ly/params.ly
make/mutopia-targets.make
make/out/lilypond.lsm
make/out/lilypond.spec
midi2ly/include/mudela-voice.hh
midi2ly/mudela-staff.cc
midi2ly/mudela-stream.cc
midi2ly/mudela-voice.cc
po/nl.po
stepmake/bin/add-html-footer.py
stepmake/bin/fake-yodl.sh [deleted file]
stepmake/bin/latex2yodl.sh [deleted file]
stepmake/bin/package-diff.py
stepmake/bin/pod2yodl.sh [deleted file]
stepmake/bin/release.py
stepmake/bin/template.py [deleted file]
stepmake/bin/update.py [deleted file]

diff --git a/CHANGES b/CHANGES
index aa0865ae7cf771ac034bbb05b0163b2191ac0ef0..8bf0c7b8a6334bed57fd02b6c0cfe23a1eb17b38 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,16 @@
+pl 7.hwn1
+       - website fixes.
+       - spacer cleanups
+       - Simple_spacer: a simpler constraint solver. Enabled by default.
 pl 7.jcn1
        - fixes to nl.po
 
+****************
+
 pl 6.uu1
        - website fixes.
 
+*******
 pl 5.hwn1
        - more .texi; yodl completely removed.
        - rm'd several doc stuff: engraving.yo, gnu-page.yo, translated blurbs (leave it to translation project)
index dd1b299fbc1978882688cf177310314fd7d2e20b..4b99be2c585861054cf3daa34abff02c5dc24efd 100644 (file)
@@ -14,10 +14,11 @@ footer substitutions:
 >
 
 <hr>
+Go <a href=%s>back</a> to index of LilyPond.
 
 <p>
 Please send GNU LilyPond questions and comments to 
-<!-- back to idx. %s > 
+
 <a href="mailto:gnu-music-discuss@gnu.org">
 <em>gnu-music-discuss@gnu.org</em></a>.
 <p>
index ae0c05b1592e98bac0f5a4a52311998cc9687bfb..04466190da24c0cdfdf5f8a6203f8a5e402f7586 100644 (file)
@@ -5,22 +5,7 @@
 @node Top, , , (dir)
 @top
 
-
-
-
-@unnumberedsec NAME
-    
-
-The Documentation of LilyPond -- the GNU Project music typesetter
-
-@unnumberedsec DESCRIPTION
-    
-
-Note: These pages are created from the latest @strong{development snapshots}
-of LilyPond.  You can look at the bottom if you want to know which
-version this was.
-
-@unnumberedsubsec Documentation: Introduction
+@unnumberedsubsec Introduction
 
 @itemize @bullet
 @item @uref{DEDICATION.html,DEDICATION}
@@ -33,8 +18,8 @@ version this was.
 
 @itemize @bullet
 @item  @uref{AIMS.txt,Why?}
-@item @uref{../pictures/out-www/lelieblond.png,The logo} large size}
-@item @uref{../pictures/out-www/lelie_logo.png,The logo} medium size}
+@item @uref{../pictures/out-www/lelieblond.png,The logo} large size
+@item @uref{../pictures/out-www/lelie_logo.png,The logo} medium size
 @end itemize
 
 @unnumberedsubsec Documentation: manuals
index 2888554930a3bf9be9511a45e2989b58c66b1815..dacd2ed0bf4da363b8429b14fccda05080d17102 100644 (file)
@@ -26,7 +26,7 @@ LilyPond more often.
 @section Obtaining
 
 You can get the latest version of LilyPond at
-@url{ ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/}.  Refer to the links
+@uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/,ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/}.  Refer to the links
 document for mirror sites.
 
 @emph{If you upgrade by patching do remember to rerun autoconf after
@@ -48,30 +48,30 @@ disk-space run configure with @code{--disable-debugging}.
 Although we recommend to use Unix, LilyPond is known to run on Windows
 NT/95/98 as well.  See Section @xref{w32}.
 
-@item  EGCS 1.1 or newer. Check out @url{ ftp://ftp.gnu.org/pub/gcc/}
+@item  EGCS 1.1 or newer. Check out @uref{ ftp://ftp.gnu.org/pub/gcc/, ftp://ftp.gnu.org/pub/gcc/}
 
 @item  Python 1.5,
 Check out
-@url{ftp://ftp.python.org} or @url{ftp://ftp.cwi.nl/pub/python}.
+@uref{ftp://ftp.python.org,ftp://ftp.python.org} or @uref{ftp://ftp.cwi.nl/pub/python,ftp://ftp.cwi.nl/pub/python}.
 
-@item  GUILE 1.3,  check out @url{http://www.gnu.org/software/guile/guile.html}.
+@item  GUILE 1.3,  check out @uref{http://www.gnu.org/software/guile/guile.html,http://www.gnu.org/software/guile/guile.html}.
 
 @item GNU make. 
-Check out @url{ftp://ftp.gnu.org/make/}.
+Check out @uref{ftp://ftp.gnu.org/make/,ftp://ftp.gnu.org/make/}.
 
 @item Flex (version 2.5.4 or newer). 
-Check out @url{ftp://ftp.gnu.org/flex/}.
+Check out @uref{ftp://ftp.gnu.org/flex/,ftp://ftp.gnu.org/flex/}.
 
 @item Bison (version 1.25 or newer).
-Check out @url{ftp://ftp.gnu.org/bison/}.
+Check out @uref{ftp://ftp.gnu.org/bison/,ftp://ftp.gnu.org/bison/}.
 
-@item Texinfo. Check out @url{ftp://ftp.gnu.org/pub/texinfo/}.
+@item Texinfo. Check out @uref{ftp://ftp.gnu.org/pub/texinfo/,ftp://ftp.gnu.org/pub/texinfo/}.
 Most documentation is in texinfo.
 
 @item The geometry package for LaTeX is needed to use ly2dvi.  
 Available at 
-@url{ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry}
-or at mirror site @url{ftp://ftp.dante.de}
+@uref{ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry,ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry}
+or at mirror site @uref{ftp://ftp.dante.de,ftp://ftp.dante.de}
 
 @item MetaPost, if you want to use direct PostScript output. Please
 note  that  tetex-0.4pl8 (included with Redhat 5.x) does not include
@@ -89,7 +89,7 @@ following software
 @item A PostScript printer and/or viewer (such as Ghostscript) is strongly
     recommended.  Xdvi will show all embedded PostScript too if you have
     Ghostscript installed.
-@item  GUILE 1.3, check out @url{http://www.gnu.org/programs/guile.html}
+@item  GUILE 1.3, check out @uref{http://www.gnu.org/programs/guile.html,http://www.gnu.org/programs/guile.html}
 @end itemize
 
 For running LilyPond successfully you have to help TeX and MetaFont
@@ -128,11 +128,11 @@ conversion tools.
 @item xpmtoppm (from the Portable Bitmap Utilities) (For RedHat Linux
             users: it is included within the package libgr-progs).
        the original is at
-@url{ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.p1.tar.gz}
+@uref{ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.p1.tar.gz,ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.p1.tar.gz}
 
 @item pnmtopng, which is also in libgr-progs for RedHat. The original is
 at
-@url{ftp://swrinde.nde.swri.edu/pub/png/applications/pnmtopng-2.37.2.tar.gz}.i
+@uref{ftp://swrinde.nde.swri.edu/pub/png/applications/pnmtopng-2.37.2.tar.gz,ftp://swrinde.nde.swri.edu/pub/png/applications/pnmtopng-2.37.2.tar.gz}.i
 
 The version of @file{pnmtopng} that is distributed with RedHat 5.1 and
 5.2 contains a bug: pnmtopng is dynamically linked to the wrong
@@ -152,9 +152,9 @@ problem.
 
 You can then install the new pnmtopng into @file{/usr/local/bin/}
 
-@item Bib2html @url{http://pertsserver.cs.uiuc.edu/~hull/bib2html.}
+@item Bib2html @uref{http://pertsserver.cs.uiuc.edu/~hull/bib2html.,http://pertsserver.cs.uiuc.edu/~hull/bib2html.}
     Which, in turn depends on man2html for proper installation.
-man2html can be had from @url{http://askdonald.ask.uni-karlsruhe.de/hppd/hpux/Networking/WWW/Man2html-1.05}.
+man2html can be had from @uref{http://askdonald.ask.uni-karlsruhe.de/hppd/hpux/Networking/WWW/Man2html-1.05,http://askdonald.ask.uni-karlsruhe.de/hppd/hpux/Networking/WWW/Man2html-1.05}.
 
 The website will build without this utility, but you will not see our
 hypertextified bibliography.
@@ -325,8 +325,8 @@ You can make the rpm by issuing
 @end example 
 
 Precompiled i386 RedHat RPMS are available from
-@url{ftp://freshmeat.net/pub/rpms/lilypond/} and
-@url{http://linux.umbc.edu/software/lilypond/rpms/}.
+@uref{ftp://freshmeat.net/pub/rpms/lilypond/,ftp://freshmeat.net/pub/rpms/lilypond/} and
+@uref{http://linux.umbc.edu/software/lilypond/rpms/,http://linux.umbc.edu/software/lilypond/rpms/}.
 
 For compilation on a RedHat system you need these packages,
 in addition to the those needed for running:
@@ -349,7 +349,7 @@ A Debian package is also available; contact Anthony Fok
 
 
 Separate instructions on building for W32 are available
-@url{../../outdir/README-W32.html}.
+@uref{../../outdir/README-W32.html,README-W32}.
 
 @section Bugs
 
index d7eb7764b80bb7bbce6685cfdaeeabb9a77df5dc..91b663fd488269afb6b40570d761f7b903d6ccb5 100644 (file)
@@ -97,8 +97,8 @@ and @emph{not} to us personally.  See @file{Documentation/links.yo} for more inf
 @section windows 32
 
 If you have received this file as part of a DOS/Window32 distribution
-(LilyPond-*.zip), then it is advisable to also download the source
-package, since it might contain more documentation
+(@file{LilyPond-*.zip}), then it is advisable to also download the
+source package, since it might contain more documentation
 @uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/}
 
 If you decide to build LilyPond from source, please read the INSTALL.txt
@@ -120,9 +120,9 @@ a script to do this for you is in @file{buildscripts/clean-fonts.sh}
 @node bugs, cdrom distributions, caveats, This is the toplevel README to LilyPond
 @section bugs
 
-Send bug reports to bug-gnu-music@@gnu.org.  For help and questions use
-help-gnu-music@@gnu.org and gnu-music-discuss@@gnu.org.  Please consult
-the faq before mailing your problems.
+Send bug reports to @email{bug-gnu-music@@gnu.org}.  For help and questions use
+ @email{help-gnu-music@@gnu.org} and @email{gnu-music-discuss@@gnu.org}.
+Please consult the faq before mailing your problems.
 
 @node cdrom distributions, Top, bugs, This is the toplevel README to LilyPond
 @section cdrom distributions
index c944f2c2c5d33db8655bdc59d82563eb957cbb33..f40f3edc7c959db0200682067e016d7be630df90 100644 (file)
@@ -59,10 +59,10 @@ LilyPond handling real music.  MIDI, view PNG, PostScript, and Source.
     
 
 @itemize @bullet
-@item @uref{http://www.gnu.org/software/...}  LilyPond is part of the GNU
+@item @uref{http://www.gnu.org/software/lilypond}  LilyPond is part of the GNU
 project.  The webpages for the stable version reside at GNU.
 
-@item @uref{http://www.cs.uu.nl/people/hanwen/lilypond/} Han-Wen's site
+@item @uref{http://www.cs.uu.nl/~hanwen/lilypond/} Han-Wen's site
 has the development pages.
 @item @uref{http://sca.uwaterloo.ca/lilypond/} Eric's mirror
 @item @uref{http://home.austin.rr.com/jbr/jeff/lilypond/} Jeff's Windows NT Distribution site
diff --git a/TODO b/TODO
index cb02f6a3d4ad6ae4bbcc6451ca8a2f4774e853e4..00661c54a5f9ab7034a71f4f20b798f24fe4369d 100644 (file)
--- a/TODO
+++ b/TODO
@@ -10,13 +10,10 @@ Grep -i for TODO, FIXME and ugh/ugr/urg.
 
 .* TODO
 . * use Rhythmic_head::position_i () for all Staff_referenced 
-. * bug: dots.
+. * rerun profile
 . * mmrests
-. * web: download link.
-. * guile detection.
 . * Break_req handling is silly (break_forbid () + \break fucks up.)
 . * script engraver
-
 . * HaraKiriStaffContext removes bar lines and doesn't remove
     staff margin text on removed staff lines.
 . * Mondrup:
diff --git a/VERSION b/VERSION
index 9c751cbaaa9c3a2ffc48f3ecfd11893c38049e9a..fd4e7556abc74754a2aff7bc167f3f55cca93607 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=2
-PATCH_LEVEL=7
-MY_PATCH_LEVEL=jcn1
+PATCH_LEVEL=8
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 4dbb07f35813e0494929d024b2ad06cdf9e9e276..2f57d1a9582dbdd317a6aa07bbaccac4d99d1064 100644 (file)
@@ -9,8 +9,7 @@
 import os
 import sys
 import pwd
-import regex
-import regsub
+import re
 import string
 import getopt
 import time
@@ -31,19 +30,19 @@ def name():
 #   return pwd.getpwuid(os.getuid())[4]
 
 def c_commentify(str):
-    return  '/* ' + regsub.gsub('^','  ', str) + '\n */';
+    return  '/* ' + re.sub('^','  ', str) + '\n */';
 
 def sh_commentify(str):
-    return regsub.gsub('^', '# ', str)
+    return re.sub('^', '# ', str)
 
 def tex_commentify(str):
-    return regsub.gsub('^', '% ', str)
+    return re.sub('^', '% ', str)
 
 def project_str():
     cwd = os.getcwd()
-    if regex.search('flower', cwd) <> -1:
+    if re.search('flower', cwd):
        PROJECT = "the Flower Library"
-    elif regex.search('mf$', cwd) <> -1:
+    elif re.search('mf$', cwd):
        PROJECT = "the Feta (defintively not an abbreviation for Font-En-Tja) music font"
     else:
        PROJECT = "the GNU LilyPond music typesetter"
@@ -123,7 +122,7 @@ def do_file(nm):
 
 def extension(ext,nm):
     ext = '\\.' + ext
-    return regex.search(ext, nm) <> -1
+    return re.search(ext, nm) <> None
 
 def c_extension(nm):
     return extension('hh',nm) or extension('cc',nm) \
diff --git a/buildscripts/html-accents.py b/buildscripts/html-accents.py
deleted file mode 100644 (file)
index 228ed74..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-#!@PYTHON@
-
-# html-accents.py -- convert (some) latin1 chars to html
-# pod2html is so broken...
-# 
-# source file of the GNU LilyPond music typesetter
-# 
-# (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
-
-name = 'html-accents'
-version = '0.1'
-
-import os
-import sys
-sys.path.append ('@abs-step-bindir@')
-sys.path.append (os.environ['HOME'] + '/usr/src/lilypond/stepmake/bin')
-
-import getopt
-from string import *
-import regex
-import regsub
-import time
-
-def program_id ():
-    return name + ' version ' + version;
-
-def identify ():
-    sys.stdout.write (program_id () + '\n')
-
-def help ():
-    sys.stdout.write ("Usage: " + name + " [options] INFILE OUTFILE\n"
-                + "Convert (some) latin1 chars to html &xxx;\n\n"
-                + "Options:\n"
-                + "  -h, --help             print this help\n"
-                + "  -p, --package=DIR      specify package\n"
-                     )
-    sys.exit (0)
-
-# chars = {'è':'&egrave;', }
-chars = { 
-'á':'&aacute;',
-'â':'&acirc;', 
-'æ':'&aelig;',
-'à':'&agrave;', 
-'Ã¥':'&aring;', 
-'ã':'&atilde;',
-'ä':'&auml;',
-
-'ç':'&ccedil;',
-
-'é':'&eacute;', 
-'ê':'&ecirc;',
-'è':'&egrave;', 
-'ë':'&euml;',
-
-'í':'&iacute;',
-'î':'&icirc;',
-'ì':'&igrave;', 
-'ï':'&iuml;',
-
-'ñ':'&ntilde;',
-
-'ó':'&oacute;',
-'ô':'&ocirc;',
-'ò':'&ograve;', 
-'ø':'&oslash;',
-'õ':'&otilde;',
-'ö':'&ouml;',
-
-'ú':'&uacute;',
-'û':'&ucirc;',
-'ù':'&ugrave;', 
-'ü':'&uuml;' 
-}
-
-def convert_accents (inname, outname):
-    from flower import *
-    text = File (inname)
-    # ugh
-    html = File (outname, 'w')
-
-    while not text.eof ():
-       line = text.readline ()
-       for i in chars.keys ():
-           line = regsub.gsub (i, chars[i], line)
-       html.write (line)
-    text.close ()
-    html.close ()
-
-def main ():
-    identify ()
-    (options, files) = getopt.getopt (
-       sys.argv[1:], 'hp:', ['help', 'package='])
-    for opt in options:
-       o = opt[0]
-       a = opt[1]
-       if o== '--help' or o == '-h':
-           help ()
-       elif o == '-p' or o == '--package':
-           topdir = a
-       else:
-           print o
-           raise getopt.error
-
-    sys.path.append (topdir + '/stepmake/bin')
-    from packagepython import *
-    package = Package (topdir)
-    packager = Packager ()
-
-    from flower import *
-
-    convert_accents (files[0], files[1])
-
-main ()
-
index 5ea6bad2f2e974c0e2325bc88b08f67ca84bd81b..be4163087bd25fb365783db9736e676364d23134 100644 (file)
@@ -3,26 +3,32 @@
 
 name = 'mutopia-index'
 
-import regex
+import find
+import re
 import os
 import sys
 import stat
-sys.path.append ('@abs-step-bindir@')
-
 
 def gulp_file (fn):
-       f = open (fn)
+       try:
+               f = open (fn)
+       except:
+               raise 'not there' , fn
        return f.read ()
 
+def file_exist_b (fn):
+       try:
+               f = open (fn)
+               return 1
+       except:
+               return 0
 
-header_regex = regex.compile('\\header[ \t\n]*{\([^}]*\)}')
-header_entry_regex = regex.compile('[\n\t ]*\([^\n\t ]+\)[\n\t ]*=[\n \t]*\([^;]+\)[\n \t]*;')
 
 headertext= r"""
 These example files are taken from the LilyPond distribution. 
 LilyPond currently only outputs TeX and MIDI.  The pictures and 
 PostScript files were generated using TeX, Ghostscript and some 
-graphics tools.  The papersize used for these examples is A4. 
+graphics tools.         The papersize used for these examples is A4. 
 The  images are in PNG format, and should be viewable with any current browser.
 We don't use GIFS due to <a href="http://www.gnu.org/philosophy/gif.html">patent problems</a>.
 <p>
@@ -31,7 +37,7 @@ out</em> the samples first.
 """
 
 headertext_nopics = r"""This is a subdirectory of the LilyPond example
-set.  We decided not to show any examples from this directory.  If you
+set.  We decided not to show any examples from this directory. If you
 want to view them, then you have to download LilyPond and compile them
 yourself."""
 
@@ -41,152 +47,134 @@ yourself."""
 #
 def read_mudela_header (fn):
        s = gulp_file(fn)
-       s = regsub.gsub('%.*$', '', s)
-       s = regsub.gsub('\n', ' ', s)   
+       s = re.sub('%.*$', '', s)
+       s = re.sub('\n', ' ', s)                
 
        dict = {}
-       if header_regex.search(s) <> -1:
-               h = header_regex.group(1)
-       else:
-               return dict
-
-       while regex.search('=', h) <> -1: 
-
-               if header_entry_regex.search (h) == -1:
+       m = re.search (r"""\\header\s*{([^}]*)}""", s)
 
-                       raise 'format error'
-
-               h = regsub.sub(header_entry_regex, '', h)
-               left = header_entry_regex.group(1)
-               right = header_entry_regex.group(2)
+       if m:
+                       s = m.group(1)
+       else:
+                       return dict
 
-               right = regsub.gsub('\([^\\]\)\"', '\\1', right)
-               right = regsub.gsub('^"', '', right)            
-               left = regsub.gsub('\([^\\]\)\"', '', left)
-               left = regsub.gsub('^"', '', left)
+       while s:
+               m = re.search (r"""\s*(\S+)\s*=\s*([^;]+)\s*;""", s)
+               if m == None:
+                       s = ''
+               else:
+                       s = s[m.end (0):]
+                       left  = m.group  (1)
+                       right = m.group (2)
 
-               dict[left] = right
+                       left = re.sub ('"', '', left)
+                       right = re.sub ('"', '', right)
+                       dict[left] = right
 
        return dict
-   
-
-
 
 def help ():
-    sys.stdout.write ("Usage: " + name + " [options] INFILE OUTFILE\n"
-                + "Generate index for mutopia\n\n"
-                + "Options:\n"
-                + "  -h, --help             print this help\n"
-                + "  -p, --package=DIR      specify package\n"
-                + "  --prefix=PRE           specify prefix\n"
-                + "  -s, --subdirs=DIR      add subdir\n"
-                + "  --suffix=SUF           specify suffix\n"
-                     )
-    sys.exit (0)
-
+       sys.stdout.write (r"""Usage: mutopia-index [options] INFILE OUTFILE
+Generate index for mutopia\n
+Options:
+  -h, --help                        print this help
+  --prefix=PRE                  specify prefix
+  -s, --subdirs=DIR         add subdir
+  --suffix=SUF                  specify suffix"""
+                                         )
+       sys.exit (0)
+
+# ugh.
 def gen_list(inputs, subdir, filename):
-    (pre, subdirs, post)=subdir
-    print "generating HTML list %s\n" % filename
-    list = open(filename, 'w')
-    list.write ('<html><TITLE>Rendered Examples</TITLE>\n')
-    list.write ('<body bgcolor=white>')
-    if subdirs:
-       list.write  ('<h2>subdirectories</h2>')
-       list.write  ('<ul>')    
-        for ex in subdirs:
-           print 'subdir %s ' % ex
-           list.write ('<li><a href=%s/index.html>Subdirectory: %s</a></li>\n' % (pre + ex + post , ex))
+       (pre, subdirs, post)=subdir
+       print "generating HTML list %s\n" % filename
+       list = open(filename, 'w')
+       list.write ('<html><TITLE>Rendered Examples</TITLE>\n')
+       list.write ('<body bgcolor=white>')
+       if subdirs:
+               list.write  ('<h2>subdirectories</h2>')
+               list.write  ('<ul>')                
+               for ex in subdirs:
+                       print 'subdir %s ' % ex
+                       list.write ('<li><a href=%s/index.html>Subdirectory: %s</a></li>\n' % (pre + ex + post , ex))
 
-       list.write ('</ul>')
+               list.write ('</ul>')
 
 
 
-    if inputs:
-           list.write('<h2>Contents of this directory</h2>\n');
+       if inputs:
+                       list.write('<h2>Contents of this directory</h2>\n');
 
-           list.write (headertext)
-    else:
-           list.write (headertext_nopics)
+                       list.write (headertext)
+       else:
+                       list.write (headertext_nopics)
 
 
-    for ex in inputs:
-       ex_ext = '.ly'
-       print '%s, ' % ex
-       try:
-           header = read_mudela_header(ex + ex_ext + '.txt')
-       except:
-           ex_ext = '.fly'
-           header = read_mudela_header(ex + ex_ext + '.txt')
-       
-       def read_dict(s, default, h =header):
+       for ex in inputs:
+               ex_ext = '.ly'
+               print '%s, ' % ex
                try:
-                   ret = h[s]
-               except KeyError:
-                   ret = default
-               return ret
-       head = read_dict('title', ex)
-       composer = read_dict('composer', '')
-       desc = read_dict('description', '')
-       list.write('<hr>')
-       list.write('<h1>example file: %s</h1>' % head);
-       if composer <> '':
-           list.write('<h2>%s</h2>\n' % composer)
-       if desc <> '':
-           list.write('%s<p>' % desc)
-       list.write ('<ul>')
-       def list_item(filename, desc, type, l = list):
-           if file_exist_b(filename):
-               l.write ('<li><a href=%s>%s</a>' % (filename, desc))
-               size=os.stat(filename)[stat.ST_SIZE]
-               l.write (' (%s %dk)' % (type, (size + 512) / 1024))
-               pictures = ['jpeg', 'png', 'xpm']
-               # silly, no?
-               if 0 and type in pictures:
-                   l.write (' <a href="http://www.gnu.org/philosophy/gif.html">no gifs due to patent problems</a>')
-               l.write ('\n')
-       list_item(ex + ex_ext + '.txt', 'The input', 'ASCII')
-       for pageno in range(1,100):
-           f  = ex + '-page%d.png' % pageno
-           if not file_exist_b (f):
-               break
-           list_item(f, 'The output, page %d' % pageno, 'png')
-       list_item(ex + '.ps.gz', 'The output', 'gzipped PostScript')
-       list_item(ex + '.midi', 'The output', 'MIDI')
-       list.write ("</ul>");
-
-    list.write( "</BODY></HTML>");
-    list.close()
+                       header = read_mudela_header(ex + ex_ext + '.txt')
+               except:
+                       ex_ext = '.fly'
+                       header = read_mudela_header(ex + ex_ext + '.txt')
+               
+               def read_dict(s, default, h =header):
+                               try:
+                                       ret = h[s]
+                               except KeyError:
+                                       ret = default
+                               return ret
+               head = read_dict('title', ex)
+               composer = read_dict('composer', '')
+               desc = read_dict('description', '')
+               list.write('<hr>')
+               list.write('<h1>example file: %s</h1>' % head);
+               if composer <> '':
+                       list.write('<h2>%s</h2>\n' % composer)
+               if desc <> '':
+                       list.write('%s<p>' % desc)
+               list.write ('<ul>')
+               def list_item(filename, desc, type, l = list):
+                       if file_exist_b(filename):
+                               l.write ('<li><a href=%s>%s</a>' % (filename, desc))
+                               size=os.stat(filename)[stat.ST_SIZE]
+                               l.write (' (%s %dk)' % (type, (size + 512) / 1024))
+                               pictures = ['jpeg', 'png', 'xpm']
+                               l.write ('\n')
+               list_item(ex + ex_ext + '.txt', 'The input', 'ASCII')
+               for pageno in range(1,100):
+                       f  = ex + '-page%d.png' % pageno
+                       if not file_exist_b (f):
+                               break
+                       list_item(f, 'The output, page %d' % pageno, 'png')
+               list_item(ex + '.ps.gz', 'The output', 'gzipped PostScript')
+               list_item(ex + '.midi', 'The output', 'MIDI')
+               list.write ("</ul>");
+
+       list.write( "</BODY></HTML>");
+       list.close()
 
 import getopt
 
 (options, files) = getopt.getopt(sys.argv[1:], 
-  'hp:s:', ['help', 'subdirs=', 'suffix=', 'package=', 'prefix='])
+  'hp:s:', ['help', 'subdirs=', 'suffix=',  'prefix='])
 subdir_pre=''
 subdir_suf =''
 
 subdirs =[]
 for opt in options:
-    o = opt[0]
-    a = opt[1]
-    if o == '--subdirs' or o == '-s':
-       subdirs.append (a)
-    elif o == '--prefix':
-       subdir_pre = a
-    elif o == '-p' or o == '--package':
-       topdir = a
-    elif o == '--suffix':
-       subdir_suf = a
-
-    sys.path.append (topdir + '/stepmake/bin')
-    from packagepython import *
-    package = Package (topdir)
-    packager = Packager ()
-
-    from flower import *
-
-       
-# huh?
-allfiles = multiple_find (['*.*ly.txt'], '.')
+       o = opt[0]
+       a = opt[1]
+       if o == '--subdirs' or o == '-s':
+               subdirs.append (a)
+       elif o == '--prefix':
+               subdir_pre = a
+       elif o == '--suffix':
+               subdir_suf = a
+
+               
+allfiles = find.find ('*.ly') + find.find ('*.ly.txt')
 
 gen_list (files, (subdir_pre, subdirs, subdir_suf), 'index.html')
 
diff --git a/buildscripts/template.py b/buildscripts/template.py
deleted file mode 100644 (file)
index f1a45e0..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#!@PYTHON@
-
-# template.py -- 
-# 
-# source file of the GNU LilyPond music typesetter
-# 
-# (c) 1998 
-
-program_name = 'template'
-version = '0.1'
-
-import os
-import sys
-
-sys.path.append ('@abs-step-bindir@')
-sys.path.append (os.environ['HOME'] + '/usr/src/lilypond/stepmake/bin')
-
-import getopt
-from string import *
-import regex
-import regsub
-import time
-
-def program_id ():
-    return name + ' version ' + version;
-
-def identify ():
-    sys.stdout.write (program_id () + '\n')
-
-def help ():
-    sys.stdout.write ("Usage: %s [options] [files]\n"
-                      "I'm not a program, use me as a template to create one\n\n"
-                      + "Options:\n"
-                      + "  -h, --help             print this help\n"
-                      % (program_name)
-                     )
-    sys.exit (0)
-
-identify ()
-(options, files) = getopt.getopt (
-    sys.argv[1:], 'hp:', ['help', 'package'])
-for opt in options:
-    o = opt[0]
-    a = opt[1]
-    if o== '--help' or o == '-h':
-       help ()
-    elif o == '-p' or o == '--package':
-       topdir = a
-    else:
-       print o
-       raise getopt.error
-
-sys.path.append (topdir + '/stepmake/bin')
-from packagepython import *
-package = Package (topdir)
-packager = Packager ()
-
-from flower import *
-
index 7568a7f700de906bb5ff532773ca5cdf6da5987b..d76252ae27be139e23084cfed4902936ed6e89d8 100644 (file)
@@ -39,7 +39,7 @@ Beam_engraver::do_try_music (Music *m)
 
       if (d == STOP && !beam_p_)
        {
-         m->warning (_ ("No Beam to end"));
+         m->warning (_ ("no beam to end"));
          return false;
        }
       reqs_drul_[d ] = c;
@@ -55,7 +55,7 @@ Beam_engraver::do_process_requests ()
   if (reqs_drul_[STOP])
     {
       if (!beam_p_)
-       reqs_drul_[STOP]->warning (_("No beam to end"));
+       reqs_drul_[STOP]->warning (_("no beam to end"));
       prev_start_req_ =0;
       finished_beam_p_ = beam_p_;
       finished_beam_info_p_ = beam_info_p_;
index b6b65d681dad5e44167db0deb56ed063cae22e60..22735719719340c4a64759ffc79b7e4994a74266 100644 (file)
@@ -309,8 +309,8 @@ Beam::check_stemlengths_f (bool set_b)
        { 
          // when all too short, normal stems win..
          if (dy_f < -epsilon_f)
-           warning (_ ("weird beam shift, check your knees"));
-         dy_f = dy_f >? sinfo_[i].miny_f_ - y;
+           warning (_ ("weird beam vertical offset"));
+         dy_f = dy_f >? sinfo_[i].miny_f_ - y; 
        }
     }
   return dy_f;
index 8291f81a2372de3c28679f6860dcfad85991a8fd..6674d5bcf0e8c1b130a3fb1a2050bbf7845748d4 100644 (file)
@@ -16,6 +16,9 @@
 #include "paper-column.hh"
 #include "cpu-timer.hh"
 #include "command-request.hh"
+#include "spring-spacer.hh"
+#include "simple-spacer.hh"
+
 
 String
 Col_stats::str () const
@@ -76,7 +79,6 @@ Break_algorithm::find_breaks () const
     if (all[i]->breakable_b ())
       retval.push (all[i]);
 
-
   if (linelength <=0)
     while (retval.size () >2)
       retval.del (1);
@@ -85,29 +87,34 @@ Break_algorithm::find_breaks () const
 }
 
 
-
-
-
 Line_spacer*
 Break_algorithm::generate_spacing_problem (Line_of_cols curline, Interval line) const
 {
-  // ugh
-  Spring_spacer * sp= dynamic_cast<Spring_spacer*> ((*get_line_spacer) ());
+  Real r = pscore_l_->paper_l_->get_var ("simple_spacing_solver");
+    
+  Line_spacer * sp = 0;
+  if (r)
+    sp = new Simple_spacer;
+  else
+    sp = new Spring_spacer;
+  
+  sp->default_space_f_ = pscore_l_->paper_l_->get_var ("loose_column_distance");
 
-  sp->paper_l_ = pscore_l_->paper_l_;
-  sp->add_column (curline[0], true, line[LEFT]);
-  for (int i=1; i< curline.size ()-1; i++)
-    sp->add_column (curline[i]);
+  sp->indent_f_ = line[LEFT];
 
-  if (line.length () > 0)
+  /*
+    sort out how interfacing this should work;
+   */
+  if (line.empty_b())
     {
-      sp->add_column (curline.top (), true, line[RIGHT]);
-      sp->energy_normalisation_f_  = sqr (line.length ());
+     sp->line_len_f_ = -1;
     }
   else
-    sp->add_column (curline.top ());
-
+    sp->line_len_f_ = line.length ();
+  
+  sp->add_columns (curline);
   sp->prepare ();
+
   return sp;
 }
 
index d41c8185a21010c153b5cd89cc6ab905c5b7cfde..eac8f66427e9e16786b2ba0d64880c5100bdaf0b 100644 (file)
@@ -38,7 +38,7 @@ Chord_tremolo_engraver::do_try_music (Music* m)
 
       if ((d == STOP) && !abeam_p_)
        {
-         m->warning (_ ("No abbreviation beam to end"));
+         m->warning (_ ("no tremolo beam to end"));
          return false;
        }
 
@@ -55,7 +55,7 @@ Chord_tremolo_engraver::do_process_requests ()
   if (reqs_drul_[STOP])
     {
       if (!abeam_p_)
-       reqs_drul_[STOP]->warning (_("No abbreviation beam to end"));
+       reqs_drul_[STOP]->warning (_("no tremolo beam to end"));
       prev_start_req_ = 0;
       finished_abeam_p_ = abeam_p_;
       abeam_p_ = 0;
@@ -80,7 +80,7 @@ Chord_tremolo_engraver::do_process_requests ()
     {
       if (abeam_p_)
        {
-         reqs_drul_[START]->warning (_ ("Already have an abbreviation beam"));
+         reqs_drul_[START]->warning (_ ("already have a tremolo beam"));
          return;
        }
 
@@ -121,7 +121,7 @@ Chord_tremolo_engraver::do_removal_processing ()
   typeset_beam ();
   if (abeam_p_)
     {
-      prev_start_req_->warning (_ ("Unfinished abbreviation beam"));
+      prev_start_req_->warning (_ ("unfinished tremolo beam"));
       finished_abeam_p_ = abeam_p_;
       typeset_beam ();
     }
index 894844de4502aa4979391ad0a4de7f817132b58c..988cf4f054e2410d2b5685821dfc57026726b70c 100644 (file)
@@ -59,7 +59,7 @@ Column_x_positions::set_stupid_solution(Vector v)
 void
 Column_x_positions::stupid_solution()
 {
-  set_stupid_solution (spacer_l_->default_solution());
+  //  set_stupid_solution (spacer_l_->default_solution());
 }
 
 void
index 9eceda73c7add2636d995531315f1fc4b8fc8ded..e9d0ecb801aa80167c4b4c8762dfb890e31ffcc2 100644 (file)
@@ -191,7 +191,6 @@ Gourlay_breaking::do_solve () const
 
 Gourlay_breaking::Gourlay_breaking ()
 {
-  get_line_spacer = Spring_spacer::constructor;
   energy_bound_f_ = infinity_f;
   max_measures_i_ = INT_MAX;
 }
index 07f4b6757094552d3db61125e3161fe14907dfbd..ee51de47706799efc559a72acdc6eb1ce73c20bc 100644 (file)
@@ -25,8 +25,10 @@ class Line_spacer
 {
     
 public:
-  Paper_def * paper_l_;
-  Paper_def *paper_l() const;
+  Real indent_f_;
+  Real line_len_f_;
+  Real default_space_f_;
+
   Line_spacer();
     
   /** solve the spacing problem
@@ -38,27 +40,13 @@ public:
     return a lower bound on the energy
     */
   virtual void lower_bound_solution (Column_x_positions *) const=0;
-    
-  /** add a col to the problem. columns have to be added left to
-    right. The column contains info on it's minimum width.  */
-  virtual void add_column (Paper_column  *, bool fixed=false, Real fixpos=0.0)=0;
+   
 
   /**
-    can the posed problem be solved?
-      
-    @pre
-
-    prepare() was called
-      
-    */
-  virtual bool check_constraints (Vector v) const=0;
-
-  /**
-    generate a solution which can't fail
-    */
-  virtual Vector default_solution() const=0;
+     Define the problem. LINELEN < 0 signifies natural width spacing.
+   */
 
-    
+  virtual void add_columns (Link_array<Paper_column>)=0;
   virtual void OK() const{}
   virtual void print() const{}
     
index c122c64e2cc11445bc277a9c40f75c4caca5be23..80f7a32904e504633d5e8e80a4b18e742949fc48 100644 (file)
 #ifndef SIMPLE_SPACER_HH
 #define SIMPLE_SPACER_HH
 
-class Simple_spacer {
+#include "parray.hh"
+#include "line-spacer.hh"
 
+
+struct Spring_description
+{
+  Real ideal_f_;
+  Real hooke_f_;
+  bool active_b_;
+
+  Real block_force_f_;
+
+  Real length (Real force) const;
+  Spring_description ();
+  Real energy_f (Real) const;
+};
+
+/**
+   A simple spacing constraint solver. The approach:
+
+   Stretch the line uniformly until none of the constraints (rods)
+   block.  It then is very wide.
+
+
+      Compress until the next constraint blocks,
+
+      Mark the springs over the constrained part to be non-active.
+      
+   Repeat with the smaller set of non-active constraints, until all
+   constraints blocked, or until the line is as short as desired.
+
+   This is much simpler, and much much faster than full scale
+   Constrained QP. On the other hand, a situation like this will not
+   be typeset as dense as possible, because
+
+   c4                   c4           c4                  c4
+   veryveryverylongsyllable2         veryveryverylongsyllable2
+   " "4                 veryveryverylongsyllable2        syllable4
+
+
+   can be further compressed to
+
+
+   c4    c4                        c4   c4
+   veryveryverylongsyllable2       veryveryverylongsyllable2
+   " "4  veryveryverylongsyllable2      syllable4
+
+
+   Perhaps this is not a bad thing, because the 1st looks better anyway.  */
+struct Simple_spacer: public Line_spacer
+{
+  Array<Spring_description> springs_;
+  Real force_f_;
+
+  Simple_spacer ();
+  
+  virtual void solve (Column_x_positions *) const;
+  virtual void lower_bound_solution (Column_x_positions *) const;
+  virtual void add_columns (Link_array<Paper_column>);
+    
+  void my_solve_linelen ();
+  void my_solve_natural_len ();
+  Real active_springs_stiffness () const;
+  Real range_stiffness (int, int) const;
+  void add_rod (int l, int r, Real dist);
+  Real range_ideal_len (int l, int r)const;
+  Real active_blocking_force ()const;
+  Real configuration_length ()const;
+  void set_active_states ();
+  Real energy_f () const;
+
+  bool active_b () const;
 };
 
 #endif /* SIMPLE_SPACER_HH */
index ffab17f066a23bf43a690d7963825ab67c0f39a2..7359f6a1a6cb7296ce42fd948951f3f8d8b24370 100644 (file)
@@ -51,7 +51,7 @@ private:
   Spring_spacer (Spring_spacer const&s);
   Cons<Idealspacing> *ideal_p_list_;
   Array<Column_info> cols_;
-
+  Real indent_f_;
   
   /// the index of #c# in #cols#
   int col_id (Paper_column const *c) const;
@@ -86,7 +86,8 @@ public:
   virtual ~Spring_spacer ();  
   virtual void solve (Column_x_positions*) const;
   virtual void lower_bound_solution (Column_x_positions*) const;
-  virtual void add_column (Paper_column  *, bool fixed=false, Real fixpos=0.0);
+  virtual void add_columns (Link_array<Paper_column>);
+  void add_column (Paper_column *, bool,  Real);  
 
   virtual Vector default_solution() const;
   virtual bool check_constraints (Vector v) const;
index 454fb14bd12d387c1716b49c867fc46217bf0ac2..b81751e20a970bc59bea84685e99bc4a5c38ed5e 100644 (file)
@@ -15,7 +15,6 @@
 /// wordwrap type algorithm: move to next line if current is optimal.
 struct Word_wrap : Break_algorithm {
     virtual Array<Column_x_positions> do_solve() const;
-    Word_wrap();
 };
 
 #endif // WORD_WRAP_HH
index cd42a1d827997f79ca73674f5f46d02b1e0c55af..e99204b27d05440cd8f0994a11e2967c7b6af55a 100644 (file)
@@ -8,17 +8,16 @@
 
 
 #include "line-spacer.hh"
+#include "dimensions.hh"
 
 Line_spacer::Line_spacer()
 {
-  paper_l_ =0;
-}
-Paper_def*
-Line_spacer::paper_l() const
-{ 
-  return paper_l_ ;
+  indent_f_ =0.0;
+  default_space_f_ = 20 PT;
 }
 
+
 Line_spacer::~Line_spacer ()
 {
 }
+
index 3616155b02534700bc4142eb5c1e1193b79d2adb..47eff23a031ed7d91a4b6f29b2ae0387e3285687 100644 (file)
 /*   
-  simple-spacer.cc --  implement Simple_spacer
+  simple-spacer.cc -- implement Simple_spacer
   
   source file of the GNU LilyPond music typesetter
   
   (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+  TODO:
+  - add support for different stretch/shrink constants?
+  - Use force as a minimizing function, and use it to discourage mixes of
+  wide and tight lines.
   
- */
+*/
+
+
+#include "simple-spacer.hh"
+#include "paper-column.hh"
+#include "spring.hh"
+#include "rod.hh"
+#include "warn.hh"
+#include "column-x-positions.hh"
+
+Simple_spacer::Simple_spacer ()
+{
+  force_f_ = 0.;
+}
+
+void
+Simple_spacer::add_rod (int l, int r, Real dist)
+{
+  Real c = range_stiffness (l,r);
+  Real d = range_ideal_len (l,r);
+  Real block_stretch = dist - d;
+  
+  Real block_force = c * block_stretch;
+  force_f_ = force_f_ >? block_force;
+  
+  for (int i=l; i < r; i++)
+    springs_[i].block_force_f_ = block_force >?
+      springs_[i].block_force_f_ ;
+}
+
+Real
+Simple_spacer::range_ideal_len (int l, int r)   const
+{
+  Real d =0.;
+  for (int i=l; i < r; i++)
+    d += springs_[i].ideal_f_;
+  return d;
+}
+
+Real
+Simple_spacer::range_stiffness (int l, int r) const
+{
+  Real den =0.0;
+  for (int i=l; i < r; i++)
+    den += 1 / springs_[i].hooke_f_;
+
+  return 1 / den;
+}
+
+Real
+Simple_spacer::active_blocking_force () const
+{
+  Real bf = - infinity_f; 
+  for (int i=0; i < springs_.size (); i++)
+    if (springs_[i].active_b_)
+      {
+       bf = bf >? springs_[i].block_force_f_;
+      }
+  return bf;
+}
+
+Real
+Simple_spacer::active_springs_stiffness () const
+{
+  Real den = 0.0;
+  for (int i=0; i < springs_.size (); i++)
+    if (springs_[i].active_b_)
+      {
+       den += 1 / springs_[i].hooke_f_;
+      }
+  return 1/den;
+}
+
+void
+Simple_spacer::set_active_states ()
+{
+  // safe, since
+  // force is only copied.
+  for (int i=0 ; i <springs_.size (); i++)
+    if (springs_[i].block_force_f_ >= force_f_) 
+      springs_[i].active_b_ = false;
+}   
+
+Real
+Simple_spacer::configuration_length () const
+{
+  Real l =0.;
+  for (int i=0; i < springs_.size (); i++)
+    l += springs_[i].length (force_f_);
+
+  return l;
+}
+
+Real
+Spring_description::length (Real f) const
+{
+  if (!active_b_)
+    f = block_force_f_;
+  return ideal_f_ + f / hooke_f_ ;
+}
+
+bool
+Simple_spacer::active_b () const
+{
+   for (int i=0; i < springs_.size (); i++)
+    if (springs_[i].active_b_)
+      return true;
+   return false;
+}
+
+void
+Simple_spacer::my_solve_linelen ()
+{
+  while (active_b ())
+    {
+      force_f_ = active_blocking_force ();
+      Real conf = configuration_length ();
+
+      if (conf < line_len_f_)
+       {
+         force_f_ +=  (line_len_f_  - conf) * active_springs_stiffness ();
+         break;
+       }
+      else
+       set_active_states ();
+    }
+}
+
+
+void
+Simple_spacer::my_solve_natural_len ()
+{
+  while (active_b ())
+    {
+      force_f_ = active_blocking_force () >? 0.0;
+
+      if (force_f_ < 1e-8) // ugh.,
+       break;
+      
+      set_active_states ();
+    }
+}
+
+void
+Simple_spacer::add_columns (Link_array<Paper_column> cols)
+{
+  for (int i=0; i < cols.size () - 1; i++)
+    {
+      Paper_column * c = cols [i];
+      Column_spring *to_next = 0;
+      for (int j =0; !to_next && j < c->spring_arr_drul_[RIGHT].size( ); j++)
+       {
+         Column_spring &sp = c->spring_arr_drul_[RIGHT] [j];
+         if (sp.other_l_ != cols[i+1])
+           continue;
+
+         to_next = &sp;
+       }
+
+      Spring_description desc;
+      if (to_next)
+       {
+         desc.hooke_f_ = to_next->strength_f_;
+         desc.ideal_f_ = to_next->distance_f_;
+       }
+      else
+       {
+         desc.hooke_f_ = 1.0;
+         desc.ideal_f_ = default_space_f_;
+       }
+      desc.block_force_f_ = - desc.hooke_f_ * desc.ideal_f_; // block at distance 0
+      springs_.push  (desc);
+    }
+  
+  for (int i=0; i < cols.size () - 1; i++)
+    {
+      Array<Column_rod> * rods = &cols [i]->minimal_dists_arr_drul_[RIGHT];
+      for (int j =0; j < rods->size( ); j++)
+       {
+         int oi = cols.find_i (rods->elem (j).other_l_ );
+         if (oi >= 0)
+           {
+             add_rod (i, oi, rods->elem (j).distance_f_);
+           }
+       }
+    }
+
+  if (line_len_f_ < 0)
+    my_solve_natural_len ();
+  else
+    my_solve_linelen ();
+}
+
+void
+Simple_spacer::solve (Column_x_positions *positions) const
+{
+  positions->energy_f_  = energy_f ();  // abs (force_f_);
+  positions->config_.push (indent_f_);
+  for (int i=0; i <springs_.size (); i++)
+    {
+      positions->config_.push (positions->config_.top () + springs_[i].length (force_f_));
+    }
+
+  positions->satisfies_constraints_b_ = active_b ();
+}
+
+void
+Simple_spacer::lower_bound_solution (Column_x_positions * posns) const
+{
+  solve (posns);
+}
+
+
+Spring_description::Spring_description( )
+{
+  ideal_f_ =0.0;
+  hooke_f_ =0.0;
+  active_b_ = true;
+  block_force_f_ = 0.0;
+}
+
+Real
+Spring_description::energy_f (Real force) const
+{
+  Real stretch = (force >? block_force_f_) / hooke_f_;
+  Real e = 0.5 * stretch * stretch * hooke_f_;
+
+  /*
+    be harder to compress.
+   */
+  if (stretch < 0)
+    e *= 4;
+
+  return e;
+}
 
+Real
+Simple_spacer::energy_f () const
+{
+  Real e =0.;
 
+  for (int i=0; i <springs_.size (); i++)
+    e += springs_[i].energy_f (force_f_);
+      
+  return e;
+}
index 64ebe46a6b9b52b76cedb9eb4f8ed46c3f32c473..edc59bb49a170da802deb020a79541bfaaf81a23 100644 (file)
@@ -215,14 +215,13 @@ Spacing_spanner::note_spacing (Score_column *lc, Score_column *rc, Moment shorte
   Moment shortest_playing_len = lc->shortest_playing_mom_;
   if (! shortest_playing_len)
     {
-      warning (_f ("can't find a ruling note at %s", 
-                  lc->when_mom ().str ()));
+      programming_error ("can't find a ruling note at " + lc->when_mom ().str ());
       shortest_playing_len = 1;
     }
+  
   if (! shortest)
     {
-      warning (_f ("no minimum in measure at %s", 
-                  lc->when_mom ().str ()));
+      programming_error ("no minimum in measure at " + lc->when_mom ().str ());
       shortest = 1;
     }
   Moment delta_t = rc->when_mom () - lc->when_mom ();
index 0e552f015c71c86b0fcb6f3db35652ca4d4f6d74..004f9350505e5f730078376ebb773a106ffeba24 100644 (file)
@@ -79,7 +79,7 @@ Spring_spacer::handle_loose_cols()
   /*
     If columns do not have spacing information set, we need to supply our own.
    */
-  Real d = paper_l ()->get_var ("loose_column_distance");
+  Real d = default_space_f_;
   for (int i = cols_.size(); i--;)
     {
       if (! connected.equiv (fixed[0], i))
@@ -259,6 +259,8 @@ Spring_spacer::lower_bound_solution (Column_x_positions*positions) const
   Vector start (cols_.size());
   start.fill (0.0);
   Vector solution_vec (lp.solve (start));
+  for (int i=0; i < solution_vec.dim (); i++)
+    solution_vec(i) += indent_f_;
 
   DOUT << "Lower bound sol: " << solution_vec;
   positions->energy_f_ = calculate_energy_f (solution_vec);
@@ -275,8 +277,6 @@ Spring_spacer::Spring_spacer ()
 void
 Spring_spacer::solve (Column_x_positions*positions) const
 {
-  DOUT << "Spring_spacer::solve ()...";
-
   Vector solution_try;
     
   bool constraint_satisfaction = try_initial_solution_and_tell (solution_try); 
@@ -286,14 +286,19 @@ Spring_spacer::solve (Column_x_positions*positions) const
       make_matrices (lp.quad_,lp.lin_, lp.const_term_);
       make_constraints (lp);
       set_fixed_cols (lp);
-       
+
+
       Vector solution_vec (lp.solve (solution_try));
-       
+      for (int i=0; i < solution_vec.dim (); i++)
+       solution_vec(i) += indent_f_;
+
+      
       positions->satisfies_constraints_b_ = check_constraints (solution_vec);
       if (!positions->satisfies_constraints_b_)
        {
-         WARN << _ ("solution doesn't satisfy constraints") << '\n' ;
+         warning (_("solution doesn't satisfy constraints"));
        }
+      
       positions->energy_f_ = calculate_energy_f (solution_vec);
       positions->config_ = solution_vec;
     }
@@ -302,11 +307,12 @@ Spring_spacer::solve (Column_x_positions*positions) const
       positions->set_stupid_solution (solution_try);
     }
 
-  DOUT << "Finished Spring_spacer::solve ()...";
 }
 
 /**
   add one column to the problem.
+
+  TODO: ugh merge with add_columns.
 */
 void
 Spring_spacer::add_column (Paper_column  *col, bool fixed, Real fixpos)
@@ -352,6 +358,22 @@ Spring_spacer::add_column (Paper_column  *col, bool fixed, Real fixpos)
 }
 
 
+void
+Spring_spacer::add_columns (Link_array<Paper_column> cols)
+{
+  energy_normalisation_f_  = sqr (line_len_f_);
+  add_column (cols[0], true, 0.0);
+  for (int i=1; i< cols.size ()-1; i++)
+    add_column (cols[i],false,0.0);
+
+  if (line_len_f_ > 0)
+    add_column (cols.top (), true, line_len_f_);
+  else
+    add_column (cols.top (), false, 0);
+}
+
+
+
 void
 Spring_spacer::print() const
 {
@@ -403,14 +425,6 @@ Spring_spacer::prepare()
   print();
 }
 
-Line_spacer*
-Spring_spacer::constructor()
-{
-  return new Spring_spacer;
-}
-
-
-
 
 Spring_spacer::~Spring_spacer()
 {
index d6f6cbf7ceb763ea867cdf20190adcf3baa99253..28f96e852c630d83450418df78f4ed607c3ff967 100644 (file)
@@ -125,7 +125,3 @@ Word_wrap::do_solve () const
   return breaking;
 }
 
-Word_wrap::Word_wrap ()
-{
-  get_line_spacer = Spring_spacer::constructor;
-}
index 203169f394078ff9cbcbcfa206afbf2045862fcb..354779e019bfd033dc4046b1db2a87f3094e0db8 100644 (file)
@@ -282,6 +282,8 @@ stem_default_neutral_direction = 1.0;
 % in interline
 articulation_script_padding_default = 1.0;
 
+% 1.0 -> faster.
+simple_spacing_solver = 1.0;
 \include "engraver.ly";
 
 
index 5080ace0e4cf62283b54396d889e07563e829e2d..133f2dd536ef214583ebb6fadb994d2f24ccda8e 100644 (file)
@@ -4,7 +4,7 @@ all: $(OUT_FILES)
 
 
 local-WWW: $(ly_examples) $(fly_examples) $(ps_examples) $(png_examples)
-       (cd $(outdir); $(PYTHON) ../$(buildscripts)/mutopia-index.py --package=$(topdir) --prefix=../ --suffix=/$(outdir) $(html_subdirs) $(all_examples))
+       (cd $(outdir); $(PYTHON) ../$(buildscripts)/mutopia-index.py --prefix=../ --suffix=/$(outdir) $(html_subdirs) $(all_examples))
        echo $^ > $(depth)/wwwlist
 
 convert-mudela: local-convert-mudela
index 6285d3d72b32a2a771c2e886fc73d68dcb121b21..5affaef77f020148b0acaba53235499aaafe6ea6 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title: LilyPond
-Version: 1.2.7
-Entered-date: 14SEP99
+Version: 1.2.8
+Entered-date: 16SEP99
 Description: 
 LilyPond is a music typesetter.  It produces beautiful sheet music
 using a high level description file as input.  LilyPond is part of 
@@ -11,8 +11,8 @@ Author: hanwen@cs.uu.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
-       1000k lilypond-1.2.7.tar.gz 
+       1000k lilypond-1.2.8.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.2.7.tar.gz 
+       1000k lilypond-1.2.8.tar.gz 
 Copying-policy: GPL
 End
index d54aa38317b29c42349c51fade8268cd64d16e21..36ec873828734f83911951bf029e78d5ec9b4d3d 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.2.7
+Version: 1.2.8
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.2.7.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.2.8.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>
index 2c82a4b4b2e95b75f944dd03d6796f357d72f1a4..6272266da2eabb6f60e70b7401991d576db10c7b 100644 (file)
@@ -16,10 +16,12 @@ public:
   Mudela_voice (Mudela_staff* mudela_staff_l);
   void add_item (Mudela_item* mudela_item_l);
   void output (Mudela_stream& mudela_stream_r);
-
+  String get_clef () const;
+  Mudela_item * last_item_l_;
 private:
   Mudela_staff* mudela_staff_l_;
   Cons_list<Mudela_item> mudela_item_l_list_;
+
 };
 
 #endif // MUDELA_VOICE_HH
index 2f109da5d998af70db91c280b11baec2b6680f14..a8feafb0f4b7f9f11ae8add41c60d97f0bf5b105 100644 (file)
@@ -39,7 +39,13 @@ Mudela_staff::add_item (Mudela_item* mudela_item_p)
   if (mudela_item_p->mudela_column_l_)
     mudela_item_p->mudela_column_l_->add_item (mudela_item_p);
 }
+/**
+   Walk ITEMS and find voices.  Remove categorised items.
 
+   TODO: collect all channels into separate voices. Use chords for sim
+   notes on same channel.
+   
+ */
 void
 Mudela_staff::eat_voice (Cons_list<Mudela_item>& items)
 {
@@ -52,9 +58,6 @@ Mudela_staff::eat_voice (Cons_list<Mudela_item>& items)
   for (Cons<Mudela_item>** pp = &items.head_; *pp;)
     {
       Cons<Mudela_item>* i = *pp;
-      LOGOUT (DEBUG_ver) << "At: " << i->car_->at_mom ().str () << "; ";
-      LOGOUT (DEBUG_ver) << "dur: " << i->car_->duration_mom ().str () << "; ";
-      LOGOUT (DEBUG_ver) << "mom: " << mom.str () << " -> ";
       if (i->car_->at_mom () > mom)
        {
          Moment dur = i->car_->at_mom () - mom;
@@ -62,17 +65,67 @@ Mudela_staff::eat_voice (Cons_list<Mudela_item>& items)
          Mudela_column* start = mudela_score_l_g->find_column_l (mom);
          voice_p->add_item (new Mudela_skip (start, dur));
          mom = i->car_->at_mom ();
+         continue;             // unnecessary
        }
-      if (i->car_->at_mom () == mom)
+      
+      Link_array<Mudela_item> now_items;
+      for (Cons<Mudela_item> *cp = i; cp && cp->car_->at_mom () == mom; cp = cp->next_)
+       now_items.push (i->car_);
+
+      Mudela_item * which = 0;
+      Mudela_note * last_note = dynamic_cast<Mudela_note*> (voice_p->last_item_l_);
+
+      for (int i=0; !which && last_note && i < now_items.size (); i++)
        {
-         mom = i->car_->at_mom () + i->car_->duration_mom ();
-         Cons<Mudela_item>* c = items.remove_cons (pp);
-         voice_p->add_item (c->car_);
-         delete c;
+         Mudela_note * now_note = dynamic_cast<Mudela_note*> (now_items[i]);
+         if (now_note && last_note->channel_i_ != now_note->channel_i_)
+           which = now_note;
        }
-      else if (*pp)
-       pp = &i->next_;
-      LOGOUT (DEBUG_ver) << "mom: " << mom.str () << '\n';
+
+#if 0
+      // use pitch difference for determining which item to pick.
+      if (!which)
+       {
+         int mindiff = 100000; // ugh
+         for (int i=0; !which && last_note && i < now_items.size (); i++)
+           {
+             Mudela_note *nt = dynamic_cast<Mudela_note*> (now_items[i]);
+             if (!nt)
+               continue;
+             int diff = abs (last_note->pitch_i_ - nt->pitch_i_ );
+             if(diff < mindiff)
+               {
+                 mindiff =  diff;
+                 which = now_items [i];
+               }
+           }
+
+         if (which && mindiff > 18)            // more than 1.5 octaves apart.  Don't put in same voice.
+           {
+             which =0;
+           }
+
+       }
+#endif
+      
+      if (!which && now_items.size ())
+       which = now_items[0];
+
+      
+
+      if (!which)
+       {
+         pp = &(*pp)->next_;
+         continue;
+       }
+      
+      while ((*pp)->car_ != which)
+       pp = &(*pp)->next_;
+      
+      mom += (*pp)->car_->duration_mom ();
+      Cons<Mudela_item>* c = items.remove_cons (pp);
+      voice_p->add_item (c->car_);
+      delete c;
     }
 }
 
@@ -105,25 +158,27 @@ Mudela_staff::name_str ()
 void
 Mudela_staff::output (Mudela_stream& mudela_stream_r)
 {
-  mudela_stream_r << id_str () << " = \\notes";
-  mudela_stream_r << (mudela_voice_p_list_.size_i () > 1 ? "<" : "{");
-  mudela_stream_r << '\n';
+  int c =0;
+  
+  String trackbody = "";
+  for (Cons<Mudela_voice>* i = mudela_voice_p_list_.head_; i; i = i->next_)
+    {
+      String voicename = id_str () + "voice" + to_str (char (c + 'A'));
+      
+      mudela_stream_r << voicename << " = \\notes ";
+
+      trackbody += "\\"  + voicename + "\n";
+
+      mudela_stream_r << "\n";
+      i->car_->output (mudela_stream_r);
+      c++;      
+    }
+
   mudela_stream_r << _ ("% midi copyright:") << copyright_str_ << '\n';
   mudela_stream_r << _ ("% instrument:") << instrument_str_ << '\n';
+  mudela_stream_r << id_str () << " = ";
+  mudela_stream_r << "<\n " << trackbody << " >\n";
 
-  // don't use last duration mode
-  //  mudela_stream_r << "\\duration 4;\n";
-  if (mudela_voice_p_list_.size_i () == 1)
-    mudela_voice_p_list_.head_->car_->output (mudela_stream_r);
-  else
-      for (Cons<Mudela_voice>* i = mudela_voice_p_list_.head_; i; i = i->next_)
-      {
-       mudela_stream_r << "{ ";
-       i->car_->output (mudela_stream_r);
-       mudela_stream_r << "} ";
-      }
-
-  mudela_stream_r << (mudela_voice_p_list_.size_i () > 1 ? "\n>" : "\n}");
   mudela_stream_r << " % " << name_str () << '\n';
 }
 
index 402b6142b3aa29bba8c82eb22ff811862876cb4d..5484b658a25c5aafa850cc92bf4f4d9b474c08d5 100644 (file)
@@ -92,7 +92,7 @@ Mudela_stream::header()
   *os_p_ << filename_str_g;
   *os_p_ << "\n\n";
   // ugh
-  *os_p_ << "\\version \"1.1.60\";\n";
+  *os_p_ << "\\version \"1.2.7\";\n";
 }
 
 void
index 67070742efa884e48d0431fb29baf94eaaf37db9..65691d073c4c5436c318f2a86daa61c7a61e0b25 100644 (file)
@@ -17,26 +17,55 @@ extern Mudela_score* mudela_score_l_g;
 Mudela_voice::Mudela_voice (Mudela_staff* mudela_staff_l)
 {
   mudela_staff_l_ = mudela_staff_l;
+  last_item_l_ =0;
 }
 
 void
 Mudela_voice::add_item (Mudela_item* mudela_item_l)
 {
+  last_item_l_  = mudela_item_l;
   mudela_item_l_list_.append (new Cons<Mudela_item> (mudela_item_l, 0));
 }
 
+/**
+   analyse pitches to determine clef.
+ */
+String
+Mudela_voice::get_clef () const
+{
+  Mudela_note * n =0;
+
+  for (Cons<Mudela_item> *cp = mudela_item_l_list_.head_; !n && cp; cp = cp->next_)
+    {
+      n = dynamic_cast<Mudela_note*> (cp->car_);
+    }
+  
+  if (!n)
+    return "";
+
+  const int c0_pitch = 60;
+  int p = n->pitch_i_;
+
+  if (p < 56)
+    return "\\clef \"bass\";\n";
+  else if (p > 67)
+    return "\\clef \"treble\";\n";
+  else
+    return "";
+}
 
 static int const FAIRLY_LONG_VOICE_i = 6;
 
 void
 Mudela_voice::output (Mudela_stream& mudela_stream_r)
 {
-  if (!mudela_item_l_list_.size_i ())
-    return;
-  
+  mudela_stream_r << "{ ";
   if (mudela_item_l_list_.size_i () > FAIRLY_LONG_VOICE_i)
     mudela_stream_r << '\n';
 
+
+  mudela_stream_r << get_clef () << '\n';
+  
   int current_bar_i = 0;
   Moment bar_mom = mudela_staff_l_->mudela_time_signature_l_->bar_mom ();
 
@@ -65,5 +94,8 @@ Mudela_voice::output (Mudela_stream& mudela_stream_r)
 
   if (mudela_item_l_list_.size_i () > FAIRLY_LONG_VOICE_i)
     mudela_stream_r << '\n';
+
+  mudela_stream_r << "} ";
 }
 
+
index cc9af4ee7c3f7cbbfa1885085e437fa876459f37..64d3a1ebb20f4ae6071a8fff6128cec2d6ffb4fb 100644 (file)
--- a/po/nl.po
+++ b/po/nl.po
@@ -338,7 +338,7 @@ msgstr "kan niet vinden"
 
 #: lookup.cc:103
 msgid "can't find font: `%s'"
-msgstr "kan font niet vinden: `%s'\n"
+msgstr "kan font niet vinden: `%s'"
 
 #: lookup.cc:105
 msgid "Aborting"
index 1ab9987e84319aa2ee6b9a7694bb5ff2664a26a7..ca38faf6e9cfc7eaec52e13eab4eaf0ef56ea185 100644 (file)
@@ -26,7 +26,7 @@ except KeyError:
        pass
 
 
-webmaster= ''
+webmaster= mail_address
 try:
        webmaster= os.environ['WEBMASTER']
 except KeyError:
diff --git a/stepmake/bin/fake-yodl.sh b/stepmake/bin/fake-yodl.sh
deleted file mode 100644 (file)
index d865baa..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-IDENTIFICATION=fake-yodl.sh
-
-OUTPUT='/dev/null'
-
-while getopts ':d:o:' OPT;
-do
-case $OPT in
-o)
-    OUTPUT=$OPTARG
-    ;;
-*)
-    ;;
-    esac
-done
-
-
-
-shift `expr $OPTIND - 1`
-#
-# Input file name
-#
-if [ "$1" = "" ]
-then
-  echo "$IDENTIFICATION: No input file name given"
-  exit 1
-fi
-
-echo Faking Yodl: copying $1 to $OUTPUT
-
-
-echo THIS IS A SURROGATE. Please install YODL for a formatted document  > $OUTPUT
-cat $1 >> $OUTPUT
diff --git a/stepmake/bin/latex2yodl.sh b/stepmake/bin/latex2yodl.sh
deleted file mode 100644 (file)
index 42be94d..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-# latex2yodl.sh -- one time convert helper
-
-if test $# -lt 1
-then
-   echo "Usage: latex2yodl FILE..."; 
-   exit 2
-fi
-for i in $*
-do
-    echo $i
-    base=`basename $base .latex`
-    base=`basename $base .tex`
-    base=`basename $i .doc`
-    yo=$base.yo
-    rm -f $yo
-    perl -pe '
-       s/([a-zA-Z][a-zA-Z]*)\~/bind($1)/g;
-       s/%(.*)/COMMENT($1)/g;
-       s/\$\^{([^}]*)}$/ sups($1)/g;
-       s/\$\_{([^}]*)}$/ subs($1)/g;
-       s/\$\^(.)$/ sups($1)/g;
-       s/\$\_(.)$/ subs($1)/g;
-       s/\\appendix/appendix()/g;
-       s/\\footnote{([^}]*)}/ footnote($1)/g;
-       s/\\cite{([^}]*)}/ cite($1)/g;
-       s/(\\marginpar{[^}]*})/latexcommand($1)/g;
-       s/\\chapter *{([^}]*)}/chapter($1)/g;
-       s/\\chapter *\* *{([^}]*)}/nchapter($1)/g;
-       s/\\section *{([^}]*)}/sect($1)/g;
-       s/\\section *\* *{([^}]*)}/nsect($1)/g;
-       s/\\subsection *{([^}]*)}/subsect($1)/g;
-       s/\\subsection *\* *{([^}]*)}/nsubsect($1)/g;
-       s/\\begin{itemize}.*/itemize(/g;
-       s/\\item *{([^}]*)}/dit($1)/g;
-       s/\\item *[[]([^]]*)[]]/dit($1)/g;
-       s/\\item */it()/g;
-       s/\\(caption{[^}]*})/latexcommand(XXX$1)/g;
-       s/\\(begin{figure}.*)/latexcommand(XXX$1)/g;
-       s/\\(end{figure}.*)/latexcommand(XXX$1\n)/g;
-       s/\\begin{mudela}[[]([^]]*)[]]/mudela($1)(/g;
-       s/\\begin{mudela}.*/mudela()(/g;
-       s/\\end{mudela}/)/g;
-       s/\\(begin{table}.*)/latexcommand(XXX$1)/g;
-       s/\\(end{table}.*)/latexcommand(XXX$1)/g;
-       s/\\begin{tabular}{(.*)}/table(ncol)($1)(/g;
-       s/\\begin{verbatim}.*/verb(/g;
-       s/\\begin{([^}]*)}/$1(/g;
-       s/\\end{([^}]*)}/)/g;
-       s/{\\em ([^}]*)}/em($1)/g;
-       s/\\emph{([^}]*)}/em($1)/g;
-       s/\\ref{([^}]*)}/ref($1)/g;
-       s/\\texttt{([^}]*)}/code($1)/g;
-       s/\\file{([^}]*)}/file($1)/g;
-       s/\\label{([^}]*)}/label($1)/g;
-       s/\\verb[+]([^+]*)[+]/code($1)/g;
-       s/\\verb[|]([^|]*)[|]/code($1)/g;
-       s/XXX/\\/g;
-       ' $i > $yo
-done
-
index d9e6cff3f363541f39727af563c8a066b4e7d0a0..72481671147dd5c594a9c41225b735cf7811c03a 100644 (file)
@@ -1,14 +1,13 @@
 #!@PYTHON@
 
-name = 'package-diff'
-version = '0.62'
 
+import find
 import sys
 import os
 import string
 import getopt
 import pipes
-
+topdir = ''
 def gulp_file(f):
        try:
                i = open(f)
@@ -24,9 +23,6 @@ def gulp_file(f):
        i.close ()
        return s
 
-def program_id ():
-       return name + ' ' + version;
-
 
 def mailaddress():
        try:
@@ -35,8 +31,6 @@ def mailaddress():
                return '(address unknown)'
 
 
-def identify ():
-       sys.stdout.write (program_id () + '\n')
 
 class Flags:
        def __init__ (self):
@@ -66,12 +60,18 @@ def untar (fn):
 
 def remove_automatic (dirnames):
        files = []
-       # urg, again?
-       from flower import *
-       files = files + multiple_find (pats, dirnames)
-       dirs = multiple_find (['out'], dirnames)
+
+       for d in dirnames:
+               for p in pats:
+                       files = files + find.find (p, d)
+
+       dirs = map (lambda d: find.find ('out', d), dirnames)
+       dirs = reduce (lambda x,y:  x + y, dirs)
+       
+       print dirs 
        for d in dirs:
-               files = files + multiple_find (['*'], [d])
+               files = files + find.find ('*', d)
+               
        for f in files:
                try:
                        os.remove (f)
@@ -92,23 +92,21 @@ def released_tarball(v):
 
 def remove_configure (dir):
        os.chdir (dir)
+
        # ugh
        os.system ('rm -f *.ly')
 
        # should do 'make distclean ?'
-       os.system ('rm -rf debian/out')
-       os.system ('rm -f GNUmakefile config.cache config.h config.hh config.log config.make config.status configure')
-       os.system ('rm -f stepmake/GNUmakefile stepmake/config.hh stepmake/config.log stepmake/config.status stepmake/config.make')
+       os.system ('rm -rf debian/out GNUmakefile config.cache config.h config.hh config.log config.make config.status configure stepmake/GNUmakefile stepmake/config.hh stepmake/config.log stepmake/config.status stepmake/config.make')
 
        # ugh: symlinks
-       os.system ('rm -f stepmake/stepmake/stepmake')
-       os.system ('rm -f stepmake/stepmake/bin')
+       os.system ('rm -f stepmake/stepmake/stepmake stepmake/stepmake/bin')
 
 
 # ugh, how to get rid of .tex files generated by lily?
 pats = ['configure', '*.diff', '*.diff.gz', '*.pyc',  '*.txt']
 
-header = """Generated by %s using %s,
+header = """Generated by %s,
 From = %s, To = %s
 
 usage 
@@ -141,7 +139,7 @@ def makediff (fromdir, todir, patch_name):
 
        f = open (patch_name, 'w')
        f.write (header %
-               (mailaddress (), program_id (),  fromname, toname, 
+               (mailaddress (),   fromname, toname, 
                 flags.package.name, os.path.basename (patch_name)))
 
        f.close ()
@@ -152,133 +150,130 @@ def makediff (fromdir, todir, patch_name):
        os.system ('diff -urN %s . >> %s' % (fromdir, patch_name))
        os.system ('gzip --quiet -9f %s' % patch_name)
    
-def main ():
-       os.environ['GZIP'] = '-q'
-       identify ()
-       print 'argv: ' + string.join (sys.argv[2:])
-       (options, files) = getopt.getopt (sys.argv[1:], 
-               'hF:f:o:p:rT:t:', ['from=', 'dir-from=', 'dir-to=', 'help', 'output=', 'package=', 'release', 'to='])
-
-       patch_name = ''
+
+os.environ['GZIP'] = '-q'
+print 'argv: ' + string.join (sys.argv[2:])
+(options, files) = getopt.getopt (sys.argv[1:], 
+       'hF:f:o:p:rT:t:', ['from=', 'dir-from=', 'dir-to=', 'help', 'output=', 'package=', 'release', 'to='])
+
+patch_name = ''
+from_src = ''
+to_src = ''
+release=0
+from_version=0
+to_version=0
+for opt in options:
+       o = opt[0]
+       a = opt[1]
+       if o == '--from' or o == '-f':
+                from_version = a
+       elif o == '--to' or o == '-t':
+                to_version = a
+       elif o == '--dir-from' or o == '-F':
+                from_src = a;
+       elif o == '--dir-to' or o == '-T':
+                to_src = a;
+       elif o == '--help' or o == '-h':
+               help ()
+               sys.exit (0)
+       elif o == '--output' or o == '-o':
+               patch_name = os.path.join (os.getcwd (), a)
+       elif o == '-p' or o == '--package':
+               topdir = a
+       elif o == '--release' or o == '-r':
+               release=1
+       else:
+               raise getopt.error
+
+sys.path.append (topdir + '/stepmake/bin')
+from packagepython import *
+package = Package (topdir)
+flags.package = package
+packager = Packager ()
+
+if from_src:
+       from_package = Package (from_src)
+       flags.from_version = from_package.version
+if from_version:
+       flags.from_version = version_str_to_tuple (from_version)
        from_src = ''
+
+if to_src:
+       to_package = Package (to_src)
+       flags.to_version = to_package.version
+if to_version:
+       flags.to_version = version_str_to_tuple (to_version)
        to_src = ''
-       release=0
-       from_version=0
-       to_version=0
-       for opt in options:
-               o = opt[0]
-               a = opt[1]
-               if o == '--from' or o == '-f':
-                        from_version = a
-               elif o == '--to' or o == '-t':
-                        to_version = a
-               elif o == '--dir-from' or o == '-F':
-                        from_src = a;
-               elif o == '--dir-to' or o == '-T':
-                        to_src = a;
-               elif o == '--help' or o == '-h':
-                       help ()
-                       return 0;
-               elif o == '--output' or o == '-o':
-                       patch_name = os.path.join (os.getcwd (), a)
-               elif o == '-p' or o == '--package':
-                       topdir = a
-               elif o == '--release' or o == '-r':
-                       release=1
-               else:
-                       raise getopt.error
-
-       sys.path.append (topdir + '/stepmake/bin')
-       from packagepython import *
-       package = Package (topdir)
-       flags.package = package
-       packager = Packager ()
-       from flower import *
 
-       if from_src:
-               from_package = Package (from_src)
-               flags.from_version = from_package.version
-       if from_version:
-               flags.from_version = version_str_to_tuple (from_version)
-               from_src = ''
-                       
-       if to_src:
-               to_package = Package (to_src)
-               flags.to_version = to_package.version
-       if to_version:
-               flags.to_version = version_str_to_tuple (to_version)
-               to_src = ''
-                       
-       if not flags.to_version:
-               flags.to_version = package.version
+if not flags.to_version:
+       flags.to_version = package.version
 
-       if not flags.from_version:
-               flags.from_version = prev_version (flags.to_version)
+if not flags.from_version:
+       flags.from_version = prev_version (flags.to_version)
 
-       # urg
-       if release:
-               flags.from_version = (flags.from_version[0], 
-                       flags.from_version[1], flags.from_version[2], '');
+# urg
+if release:
+       flags.from_version = (flags.from_version[0], 
+               flags.from_version[1], flags.from_version[2], '');
 
-       import tempfile
-       prev_cwd = os.getcwd ();
+import tempfile
+prev_cwd = os.getcwd ();
 
-       os.system ('rm -rf /tmp/package-diff') 
-       try:
-               os.mkdir ('/tmp/package-diff')
-       except:
-               pass
-               
-       from_diff = dirname (flags.from_version)
-       to_diff =  dirname (flags.to_version)
-       if to_diff == from_diff:
-               if from_src:
-                     from_diff = from_diff + '.src'
-               elif to_src:
-                     to_diff = to_diff + '.src'
-               else:
-                     sys.stderr.write (name + ': nothing to do: to == from == ' + from_diff + '\n')
-                     sys.exit (1)
-
-       if not patch_name:
-               pn = to_diff + '.diff'
-               patch_name =  os.path.join (os.getcwd (), pn)
-
-       from_diff = '/tmp/package-diff/' + from_diff
-       to_diff =  '/tmp/package-diff/' + to_diff
-
-       if not from_src:
-               os.chdir ('/tmp/package-diff')
-               untar (released_tarball (flags.from_version))
-               os.chdir (prev_cwd)
-       else:
-               sys.stderr.write ('copying ' + from_src + ' to ' + from_diff + '\n')
-               # os.system ('cp -pr %s %s' % (srcdir, from_diff))
-               os.system ('mkdir -p %s '% (from_diff))
-               os.chdir (from_src)
-               os.system ('tar cf - --exclude out --exclude out-www . \
-                       | tar -xf - -C %s' % from_diff)
-
-
-       if not to_src:
-               os.chdir ('/tmp/package-diff')
-               untar (released_tarball (flags.to_version))
-               os.chdir (prev_cwd)
+os.system ('rm -rf /tmp/package-diff') 
+try:
+       os.mkdir ('/tmp/package-diff')
+except:
+       pass
+
+from_diff = dirname (flags.from_version)
+to_diff =  dirname (flags.to_version)
+if to_diff == from_diff:
+       if from_src:
+             from_diff = from_diff + '.src'
+       elif to_src:
+             to_diff = to_diff + '.src'
        else:
-               sys.stderr.write ('copying ' + to_src + ' to ' + to_diff + '\n')
-               os.system ('mkdir -p %s '% (to_diff))
-               # os.system ('cp -pr %s %s'  (to_src, to_diff))%
-               os.chdir (to_src)
-               os.system ('tar -cf - --exclude out --exclude out-www . \
-                       . | tar -xf - -C %s ' % to_diff)
+             sys.stderr.write (name + ': nothing to do: to == from == ' + from_diff + '\n')
+             sys.exit (1)
+
+if not patch_name:
+       pn = to_diff + '.diff'
+       patch_name =  os.path.join (os.getcwd (), pn)
+
+from_diff = '/tmp/package-diff/' + from_diff
+to_diff =  '/tmp/package-diff/' + to_diff
+
+if not from_src:
+       os.chdir ('/tmp/package-diff')
+       untar (released_tarball (flags.from_version))
+       os.chdir (prev_cwd)
+else:
+       sys.stderr.write ('copying ' + from_src + ' to ' + from_diff + '\n')
+       # os.system ('cp -pr %s %s' % (srcdir, from_diff))
+       os.system ('mkdir -p %s '% (from_diff))
+       os.chdir (from_src)
+       os.system ('tar cf - --exclude out --exclude out-www . \
+               | tar -xf - -C %s' % from_diff)
 
-       os.chdir (to_diff)
-       makediff (from_diff, to_diff, patch_name) 
 
+if not to_src:
        os.chdir ('/tmp/package-diff')
-       sys.stderr.write ('cleaning ... ')
-       os.system ('rm -fr %s %s' % (from_diff, to_diff))
-       sys.stderr.write ('\n')
+       untar (released_tarball (flags.to_version))
        os.chdir (prev_cwd)
+else:
+       sys.stderr.write ('copying ' + to_src + ' to ' + to_diff + '\n')
+       os.system ('mkdir -p %s '% (to_diff))
+       # os.system ('cp -pr %s %s'  (to_src, to_diff))%
+       os.chdir (to_src)
+       os.system ('tar -cf - --exclude out --exclude out-www . \
+               . | tar -xf - -C %s ' % to_diff)
+
+os.chdir (to_diff)
+makediff (from_diff, to_diff, patch_name) 
+
+os.chdir ('/tmp/package-diff')
+sys.stderr.write ('cleaning ... ')
+os.system ('rm -fr %s %s' % (from_diff, to_diff))
+sys.stderr.write ('\n')
+os.chdir (prev_cwd)
 
-main ()
diff --git a/stepmake/bin/pod2yodl.sh b/stepmake/bin/pod2yodl.sh
deleted file mode 100644 (file)
index a94937e..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-# pod2yodl.sh -- one time convert helper
-
-if test $# -lt 1
-then
-   echo "Usage: pod2yodl FILE..."; 
-   exit 2
-fi
-for i in $*
-do
-    echo $i
-    base=`basename $i .in`
-    base=`basename $base .pod`
-    yo=$base.yo
-    rm -f $yo
-    perl -pe '
-       s/=head1 *(.*)/nsect($1)/g;
-       s/=head2 *(.*)/nsubsect($1)/g;
-       s/=head3 *(.*)/nsubsubsect($1)/g;
-       s/=over.*(.*)/itemize(/g;
-       s/=item *\*/it()/g;
-       s/=item *(.*)/dit($1)/g;
-       s/=back.*/)/g;
-       s/=begin.*//g;
-       s/=end.*//g;
-       s/C<([^>]*)>/code($1)/g;
-       s/F<([^>]*)>/file($1)/g;
-       s/B<([^>]*)>/bf($1)/g;
-       s/I<([^>]*)>/em($1)/g;
-       s/<[Aa] *[Hh][Rr][Ee][Ff]=\"*([^>\"])\"([^<]*)<\/[Aa]>/ url($2)($1)/g;
-       s/<[Aa] *[Hh][Rr][Ee][Ff]=\"*([^>\"])\"([^<]*)/ url($2)($1)/g;
-       s/<[Aa] *[Hh][Rr][Ee][Ff]=\"*([^>\"])\"/ url()($1)/g;
-       s/.*<\/[Aa]>/($1)/g;
-       s/<(.*@.*)>/email($1)/g;
-       s/(http:\/\/[^ ]*)/ lurl($1)/g;
-       s/(ftp:\/\/[^ ]*)/ lurl($1)/g;
-       s/@([A-Z_]*)@/verbinclude($1.in)/g;
-       ' $i > $yo
-done
-
index d614eb5cd3e1568173a56920bc625ec9ed9892ad..d8ca76751c7ac8ba47608ed41e0a7bf411e9a579 100755 (executable)
@@ -31,7 +31,7 @@ sys.path.append (topdir + '/stepmake/bin')
 from packagepython import *
 package = Package (topdir)
 packager = Packager ()
-from flower import *
+
 
 os.chdir(package.topdir)
 status =os.system('make dist')
diff --git a/stepmake/bin/template.py b/stepmake/bin/template.py
deleted file mode 100644 (file)
index d98efed..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#!@PYTHON@
-
-# template.py -- 
-# 
-# source file of the GNU LilyPond music typesetter
-# 
-# (c) 1998 
-
-program_name = 'template'
-version = '0.1'
-
-import os
-import sys
-
-sys.path.append ('@abs-step-bindir@')
-sys.path.append (os.environ['HOME'] + '/usr/src/lilypond/stepmake/bin')
-
-import getopt
-from string import *
-import regex
-import regsub
-import time
-
-def program_id ():
-    return program_name + ' version ' + version;
-
-def identify ():
-    sys.stdout.write (program_id () + '\n')
-
-def help ():
-    sys.stdout.write ("Usage: %s [OPTION]... [FILE]...\n"
-                      "I'm not a program, use me as a template to create one\n\n"
-                      + "Options:\n"
-                      + "  -h, --help           print this help\n"
-                     + "  -p, --package=DIR    specify package\n"
-                      % (program_name)
-                     )
-    sys.exit (0)
-
-identify ()
-(options, files) = getopt.getopt (
-    sys.argv[1:], 'hp:', ['help', 'package='])
-for opt in options:
-    o = opt[0]
-    a = opt[1]
-    if o == '--help' or o == '-h':
-       help ()
-    elif o == '-p' or o == '--package':
-       topdir = a
-    else:
-       print o
-       raise getopt.error
-
-sys.path.append (topdir + '/stepmake/bin')
-from packagepython import *
-package = Package (topdir)
-packager = Packager ()
-
-from flower import *
-
diff --git a/stepmake/bin/update.py b/stepmake/bin/update.py
deleted file mode 100644 (file)
index 60521ae..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-#!@PYTHON@
-
-# update.py -- update current source tree
-# 
-# source file of the GNU LilyPond music typesetter
-# 
-# (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
-
-program_name = 'update'
-version = '0.1'
-
-import os
-import sys
-
-sys.path.append ('@abs-step-bindir@')
-sys.path.append (os.environ['HOME'] + '/usr/src/lilypond/stepmake/bin')
-
-import getopt
-from string import *
-import regex
-import regsub
-import time
-
-def program_id ():
-    return program_name + ' version ' + version;
-
-def identify ():
-    sys.stdout.write (program_id () + '\n')
-
-def help ():
-    sys.stdout.write ("Usage: %s [OPTION]...\n"
-                      "Update sourcetree\n\n"
-                      + "Options:\n"
-                     + "  -f, --file=FILE      specify patch file\n"
-                      + "  -h, --help           print this help\n"
-                     + "  -p, --package=DIR    specify package\n"
-                     + "  -v, --version=VER    specify patch version\n"
-                      % (program_name)
-                     )
-    sys.exit (0)
-
-identify ()
-(options, files) = getopt.getopt (
-    sys.argv[1:], 'f:hp:v:', ['file=', 'help', 'package=', 'version='])
-patch=''
-ver=''
-for opt in options:
-    o = opt[0]
-    a = opt[1]
-    if o == '--help' or o == '-h':
-       help ()
-    elif o == '-f' or o == '--file':
-       patch = a
-    elif o == '-p' or o == '--package':
-       topdir = a
-    elif o == '-v' or o == '--version':
-       ver = a
-    else:
-       print o
-       raise getopt.error
-
-sys.path.append (topdir + '/stepmake/bin')
-from packagepython import *
-package = Package (topdir)
-packager = Packager ()
-
-from flower import *
-
-def read_patch_vector (patch):
-    vec = []
-    pipe = os.popen ('gzip -dc ' + patch)
-    line = pipe.readline ()
-    while line and line != '--state\n':
-       line = pipe.readline ()
-    line = pipe.readline ()
-    while line and line != '++state\n':
-       vec.append (line[:len (line)-1])
-       line = pipe.readline ()
-    pipe.close ()
-    return vec 
-    
-def read_state_vector (states):
-    vec = []
-    file = File (states)
-    while not file.eof ():
-       line = file.readline ()
-       if line:
-           vec.append (line[:len (line)-1])
-    return vec
-
-def read_relevant_state_vector (states, from_str):
-    vec = read_state_vector (states)
-    for i in range (len (vec)):
-       if vec[i] == from_str:
-           return vec[i:]
-    return []
-
-def find_revert (states, patch):
-    for i in range (len (state_vector)):
-       for j in doubles:
-           if j in state_vector[:i+1]:
-               return state_vector[i:]
-    return []
-
-if patch == '' and ver != '':
-    patch = package.patch_dir + '/' + package.name + '-%s.diff.gz' % ver
-if patch == '':
-    if 0:
-       files = os.listdir (package.patch_dir)
-       patches = []
-       for i in files:
-           if regex.search (package.name + '-.*.diff.gz', i) == 0:
-               patches.append (i)
-       # urg: sort
-       patch = package.patch_dir + '/' + patches[len (patches) -1]
-    else:
-       os.chdir (package.patch_dir)
-       pipe = os.popen ('/bin/ls -t1 ' + package.name 
-           + '-*.diff.gz 2> /dev/null')
-       patch = pipe.readline ()
-       patch = patch[:len (patch) -1]
-       pipe.close ()
-       if not patch:
-           raise 'patch not found'
-       patch = package.patch_dir + '/' + patch
-       print patch
-
-os.chdir (package.topdir)
-patch_vector = read_patch_vector (patch)
-print 'patch vector: ' + str (patch_vector)
-from_str = patch_vector[0]
-state_vector = read_relevant_state_vector ('make/STATE-VECTOR', from_str)
-print 'relevant state vector: ' + str (state_vector)
-
-doubles = []
-for i in patch_vector[1:]:
-    if i in state_vector:
-       doubles.append (i)
-print 'doubles: ' + str (doubles)
-
-revert = find_revert (state_vector, patch_vector)
-redo = []
-for i in revert:
-    redo.append (i)
-revert.reverse ()
-
-for i in doubles:
-    redo.remove (i)
-
-if revert or redo or doubles:
-    print 'not smart enough; please do:'
-    print '  * revert: ' + str (revert)
-    print '  * apply: ' + os.path.basename (patch)
-    print '  * redo: ' + str (redo)
-    sys.exit (1)
-
-status = os.system ('echo "gzip -dc %s | patch -p1 -E --force"' % patch)
-if status:
-    raise 'apply patch failed'
-
-sys.stdout.write ('checking...')
-rejects = my_find (['*.rej'], '.')
-if len (rejects):
-    print 'rejects found:'
-    for i in rejects:
-       print i
-    sys.exit (1)
-print 'ok'
-sys.stdout.write ('cleaning...')
-origs = my_find (['*.orig'], '.')
-for i in origs:
-    os.remove (i)
-print 'ok'