+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)
>
<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>
@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}
@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
@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
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
@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
@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
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.
@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:
Separate instructions on building for W32 are available
-@url{../../outdir/README-W32.html}.
+@uref{../../outdir/README-W32.html,README-W32}.
@section Bugs
@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
@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
@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
.* 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:
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.
import os
import sys
import pwd
-import regex
-import regsub
+import re
import string
import getopt
import time
# 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"
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) \
+++ /dev/null
-#!@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 = {'è':'è', }
-chars = {
-'á':'á',
-'â':'â',
-'æ':'æ',
-'Ã ':'à',
-'Ã¥':'å',
-'ã':'ã',
-'ä':'ä',
-
-'ç':'ç',
-
-'é':'é',
-'ê':'ê',
-'è':'è',
-'ë':'ë',
-
-'Ã':'í',
-'î':'î',
-'ì':'ì',
-'ï':'ï',
-
-'ñ':'ñ',
-
-'ó':'ó',
-'ô':'ô',
-'ò':'ò',
-'ø':'ø',
-'õ':'õ',
-'ö':'ö',
-
-'ú':'ú',
-'û':'û',
-'ù':'ù',
-'ü':'ü'
-}
-
-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 ()
-
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>
"""
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."""
#
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')
+++ /dev/null
-#!@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 *
-
if (d == STOP && !beam_p_)
{
- m->warning (_ ("No Beam to end"));
+ m->warning (_ ("no beam to end"));
return false;
}
reqs_drul_[d ] = c;
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_;
{
// 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;
#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
if (all[i]->breakable_b ())
retval.push (all[i]);
-
if (linelength <=0)
while (retval.size () >2)
retval.del (1);
}
-
-
-
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;
}
if ((d == STOP) && !abeam_p_)
{
- m->warning (_ ("No abbreviation beam to end"));
+ m->warning (_ ("no tremolo beam to end"));
return false;
}
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;
{
if (abeam_p_)
{
- reqs_drul_[START]->warning (_ ("Already have an abbreviation beam"));
+ reqs_drul_[START]->warning (_ ("already have a tremolo beam"));
return;
}
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 ();
}
void
Column_x_positions::stupid_solution()
{
- set_stupid_solution (spacer_l_->default_solution());
+ // set_stupid_solution (spacer_l_->default_solution());
}
void
Gourlay_breaking::Gourlay_breaking ()
{
- get_line_spacer = Spring_spacer::constructor;
energy_bound_f_ = infinity_f;
max_measures_i_ = INT_MAX;
}
{
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
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{}
#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 */
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;
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;
/// 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
#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 ()
{
}
+
/*
- 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;
+}
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 ();
/*
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))
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);
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);
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;
}
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)
}
+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
{
print();
}
-Line_spacer*
-Spring_spacer::constructor()
-{
- return new Spring_spacer;
-}
-
-
-
Spring_spacer::~Spring_spacer()
{
return breaking;
}
-Word_wrap::Word_wrap ()
-{
- get_line_spacer = Spring_spacer::constructor;
-}
% in interline
articulation_script_padding_default = 1.0;
+% 1.0 -> faster.
+simple_spacing_solver = 1.0;
\include "engraver.ly";
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
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
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
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>
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
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)
{
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;
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;
}
}
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';
}
*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
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 ();
if (mudela_item_l_list_.size_i () > FAIRLY_LONG_VOICE_i)
mudela_stream_r << '\n';
+
+ mudela_stream_r << "} ";
}
+
#: 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"
pass
-webmaster= ''
+webmaster= mail_address
try:
webmaster= os.environ['WEBMASTER']
except KeyError:
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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
-
#!@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)
i.close ()
return s
-def program_id ():
- return name + ' ' + version;
-
def mailaddress():
try:
return '(address unknown)'
-def identify ():
- sys.stdout.write (program_id () + '\n')
class Flags:
def __init__ (self):
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)
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
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 ()
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 ()
+++ /dev/null
-#!/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
-
from packagepython import *
package = Package (topdir)
packager = Packager ()
-from flower import *
+
os.chdir(package.topdir)
status =os.system('make dist')
+++ /dev/null
-#!@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 *
-
+++ /dev/null
-#!@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'