From: fred Date: Tue, 26 Mar 2002 22:24:58 +0000 (+0000) Subject: lilypond-1.2.2 X-Git-Tag: release/1.5.59~2189 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=77ea954bef34dfd416f5322fc134357186e8cdef;p=lilypond.git lilypond-1.2.2 --- diff --git a/Documentation/bibliography/engraving.bib b/Documentation/bibliography/engraving.bib index e423f0c1b0..2696988d1b 100644 --- a/Documentation/bibliography/engraving.bib +++ b/Documentation/bibliography/engraving.bib @@ -225,16 +225,6 @@ year={1989} } - -@Book{unknown69:_music_notat, - author = {--}, - title = {Music Notation}, - publisher = {Crescendo books}, - year = 1969, - note = {Heussenstamm writes: An extremely thorough exploration of musical notation [..]} -} - - @Book {gerou96, note = {A concise, alphabetically ordered list of typesetting and music (notation) issues with a rather simplistic attitude but in most cases "good-enough" answers JCN}, year = {1996}, @@ -274,7 +264,7 @@ year={1989} title = {Handbuch der Notationskunde}, address={Leipzig}, publisher={Breitkopf & Hartel}, - note= {Very thorough treatment (in two volumes) of the history musical notation}, + note= {Very thorough treatment (in two volumes) of the history of music notation}, } @Book {rosenthal67, @@ -313,3 +303,12 @@ year={1989} +@Book{tyboni94:_noter_handb_i_tradit_noter, + author = {B\"oje Tyboni}, + title = {Noter Handbok I Traditionell Notering}, + publisher = {Gehrmans Musikf\"orlag}, + year = 1994, + address = {Stockholm}, + note = {Swedish book on music notation.} +} + diff --git a/Documentation/topdocs/index.yo b/Documentation/topdocs/index.yo index 61621f2a66..bf794f498e 100644 --- a/Documentation/topdocs/index.yo +++ b/Documentation/topdocs/index.yo @@ -18,10 +18,6 @@ center(mudela(fragment)( \relative c'' { \key es; r8 [c16 b] [c8 g] [as c16 b] [c8 d] | g,4 } )) - - - - nsect(Free Software) Of course LilyPond, being part of the GNU project, is url(free @@ -29,6 +25,12 @@ software)(http://www.fsf.org/copyleft/copyleft.html). For more url(information)(http://www.fsf.org/philosophy/philosophy.html), see the url(Free Software Foundation)(http://www.fsf.org/). +LilyPond comes in two variants, a stable one, and a development +snapshots. The webpages matching the stable versions are at +lurl(http://www.gnu.org/software/...), the development pages are at +lurl(http://www.cs.uu.nl/~hanwen/lilypond/). + + nsect(Preview) itemize( diff --git a/TODO b/TODO index 673acaf3eb..594ae3ad4a 100644 --- a/TODO +++ b/TODO @@ -8,8 +8,9 @@ m Most of the items are marked in the code as well Grep -i for TODO, FIXME and ugh/ugr/urg. -.* TODO after 1.2 +.* TODO . * Break_req handling is silly (break_forbid () + \break fucks up.) +. * redo all --help messages. . * HaraKiriStaffContext removes bar lines and doesn't remove staff margin text on removed staff lines. . * make all Feta (including dynamics) available to the user in @@ -24,7 +25,19 @@ abc2ly, midi2ly? . * Junk ghost positioning objects eg, Script leans on Staffside leans on Staff. . * bracket ps code. -. * mudela-book. +. * mudela-book +. * center option (??) +. * make mudela-book understand usepackage{geometry} +. * check that linewidth set in \paper is not wider than actual linewidth? +. * the following fails because mudelabook doesn't care that the + last } after \end{mudela} finishes the marginpar: + \marginpar{ + \begin{mudela} + c d e f g + \end{mudela}} +. * force-verbatim is maybe not that useful since latex fails with footnotes, + marginpars and others +""" . * Key_engraver, Local_key_item . * Think of comprehensive solution for "if (grace_b == self_grace_b_)" . * String[String.length] doesn't trap. diff --git a/buildscripts/mf-to-table.py b/buildscripts/mf-to-table.py index 7b6ecd183e..efbcb7e661 100644 --- a/buildscripts/mf-to-table.py +++ b/buildscripts/mf-to-table.py @@ -6,20 +6,13 @@ # # (c) 1997 Han-Wen Nienhuys - -# -# TODO: Should use RE. -# - import os import sys import getopt -from string import * -import regex -import regsub +import string +import re import time - (options, files) = getopt.getopt( sys.argv[1:], 'a:d:hl:o:p:t:', ['afm=', 'outdir=', 'dep=', 'tex=', 'debug', 'help', 'package=']) @@ -30,92 +23,49 @@ for opt in options: if o == '-p' or o == '--package': topdir = a -sys.path.append (topdir + '/stepmake/bin') -from packagepython import * -package = Package (topdir) -packager = Packager () - -from packagepython import * -from flower import * +def gulp_file(f): + try: + i = open(f) + i.seek (0, 2) + n = i.tell () + i.seek (0,0) + except: + print 'can\'t open file: ' + f + '\n' + return '' + s = i.read (n) + if len (s) <= 0: + print 'gulped empty file: ' + f + '\n' + i.close () + return s + +version = '0.9' -begin_autometric_re = regex.compile('@{') -end_autometric_re = regex.compile('@}') -include_re = regex.compile ('(\([a-zA-Z_0-9-]+\.mf\)') -autometric_re = regex.compile('@{\(.*\)@}') -version = '0.8' postfixes = ['log', 'dvi', '2602gf', 'tfm'] -class Feta_file(File): - """Read Feta metrics from a metafont log-file.""" - - def include_scan (self, line): - include_pos = include_re.search (line) - while include_pos <> -1: - self.dependencies.append (include_re.group (1)) - - line = line[include_pos + 1:] - include_pos = include_re.search (line) - - def read_autometricline(self): - line = '' - while end_autometric_re.search(line) == -1 and not self.eof(): - suf = File.readline(self) - self.include_scan (suf) - if begin_autometric_re.search(line) == -1: - line = '' - line = line + regsub.sub('\n','', suf) - line = regsub.sub('\r','', line) - - if self.eof(): - return '' - - return line; - def readline(self): - """return what is enclosed in one @{ @} pair""" - line = ''; - while autometric_re.search(line) == -1 and not self.eof(): - line = self.read_autometricline() - - if self.eof(): - return ''; - - return autometric_re.group(1); - def __init__(self, nm): - File.__init__(self, nm) - self.dependencies = [] - def do_file(infile_nm): - infile = readline(); - -# -# FIXME: should parse output for {} to do indenting. -# -class Indentable_file(File): - """Output file with support for indentation""" - def __init__(self,nm, mode): - File.__init__(self,nm,mode) - self.current_indent_ = 0 - self.delta_indent_ = 4 - def writeline (self, str): - File.write(self, str) - def writeeol(self): - File.write(self, '\n') - File.write(self, ' '* self.current_indent_) - - def indent(self): - self.current_indent_ = self.delta_indent_ + self.current_indent_; - def dedent(self): - self.current_indent_ = self.current_indent_ - self.delta_indent_; - if self.current_indent_ < 0: - raise 'Nesting!' - - def write(self, str): - lines = split(str, '\n') - for l in lines[:-1]: - self.writeline(l) - self.writeeol() - self.writeline (lines[-1]) - -class Afm_file (File): +print re + +def read_log_file (fn): + str = gulp_file (fn) + str = re.sub ('\n', '', str) + str = re.sub ('[\t ]+', ' ', str) + + deps = [] + autolines = [] + def include_func (match, d = deps): + d.append (match.group (1)) + return '' + + def auto_func (match, a = autolines): + a.append (match.group (1)) + return '' + + str = re.sub ('\(([a-zA-Z_0-9-]+\.mf)', include_func, str) + str = re.sub ('@{(.*?)@}', auto_func, str) + + return (autolines, deps) + + +class Afm_file: def print_dimen(self, f): f = f * 1000 / self.fontsize @@ -127,8 +77,8 @@ class Afm_file (File): self.write( dimstr +' '); def def_symbol (self, code, lily_id, tex_id, xdim, ydim): - xdim = map (atof, xdim) - ydim = map (atof, ydim) + xdim = map (string.atof, xdim) + ydim = map (string.atof, ydim) wid = xdim[0] + xdim[1] self.write ('C %s ; ' % code) @@ -143,30 +93,36 @@ class Afm_file (File): self.print_dimen(ydim [1]) self.write (' ;\n'); - + def write (self, str): + self.file.write (str) + def __init__ (self, fn): + self.file = open (fn,'w') def start (self,nm): self.write ('Start%s\n' % nm) def end (self,nm): self.write ('End%s\n' % nm) + class Log_reader: """Read logs, destill info, and put into output files""" def output_label(self, line): if not line: return; - tags = split(line, '@:') + + tags = string.split(line, '@:') label = tags[0] name = tags[1] afm = self.afmfile + print tags if tags[0] == 'font': self.texfile.write("% name\n") afm.write ('FontName %s\n' % name) afm.start ('FontMetrics') afm.start ('CharMetrics') - afm.fontsize = atof(tags[2]) + afm.fontsize = string.atof(tags[2]) elif label == "group": self.texfile.write("% " + name + "\n") afm.groupname = name @@ -203,18 +159,17 @@ class Log_reader: def do_file(self,filenm): self.texfile.write ('\n% input from ' + filenm + '\n') - feta = Feta_file(filenm) - while not feta.eof(): - line = feta.readline() - self.output_label(line) - feta.close() + (autolines, deps) = read_log_file (filenm) + + for a in autolines: + self.output_label(a) - self.writedeps (feta.dependencies) + self.writedeps (deps) def __init__(self, texfile_nm, depfile_nm, afmfile_nm): - self.texfile = Indentable_file(texfile_nm, 'w') - self.depfile = File (depfile_nm, 'w') - self.afmfile = Afm_file (afmfile_nm, 'w') + self.texfile = open(texfile_nm, 'w') + self.depfile = open (depfile_nm, 'w') + self.afmfile = Afm_file (afmfile_nm) headerstr = '%% Creator: %s\n%% Automatically generated on\n%% Do not edit' % \ (program_id() ) @@ -238,17 +193,17 @@ def identify(): sys.stdout.write(program_id() + '\n') def help(): - sys.stdout.write("Usage: mf-to-table [options] LOGFILEs\n" - + "Generate mozarella metrics table from preparated feta log\n\n" - + "Options:\n" - + " -a, --afm=FILE .afm file\n" - + " -d, --dep=FILE print dependency info to FILE\n" - + " -h, --help print this help\n" - + " -l, --ly=FILE name output table\n" - + " -o, --outdir=DIR prefix for dependency info\n" - + " -p, --package=DIR specify package\n" - + " -t, --tex=FILE name output tex chardefs\n" - ) + sys.stdout.write(r"""Usage: mf-to-table [options] LOGFILEs +Generate feta metrics table from preparated feta log\n +Options: + -a, --afm=FILE .afm file + -d, --dep=FILE print dependency info to FILE + -h, --help print this help + -l, --ly=FILE name output table + -o, --outdir=DIR prefix for dependency info + -p, --package=DIR specify package + -t, --tex=FILE name output tex chardefs""" +) sys.exit (0) diff --git a/buildscripts/ps-to-pfa.py b/buildscripts/ps-to-pfa.py index f1d4d8c38b..bab745820d 100644 --- a/buildscripts/ps-to-pfa.py +++ b/buildscripts/ps-to-pfa.py @@ -16,12 +16,8 @@ datadir = '' import find import os import sys - import getopt from string import * -import regsub - -# todo, port: see http://starship.skyport.net/crew/amk/regex/regex-to-re.html import re import time diff --git a/flower/include/getopt-long.hh b/flower/include/getopt-long.hh index a069e28422..92de4934dc 100644 --- a/flower/include/getopt-long.hh +++ b/flower/include/getopt-long.hh @@ -9,11 +9,18 @@ class ostream; a struct this for initialising the commandline options. */ struct Long_option_init { - bool take_arg; - char const * longname; - char shortname; + char const * take_arg_sz_; + char const * longname_sz_; + char shortname_ch_; + char const * help_sz_; + String str () const; + String str_for_help () const; + // NO constructor! + + static int compare (Long_option_init const&,Long_option_init const&); + static String table_str (Long_option_init *); }; diff --git a/flower/scalar.cc b/flower/scalar.cc index 6e97eedf8f..951f50359d 100644 --- a/flower/scalar.cc +++ b/flower/scalar.cc @@ -55,7 +55,7 @@ Scalar::isnum_b () const if (length_i ()) { long l =0; - conv = sscanf (strh_.ch_C (), "%ld", &l); + conv = sscanf (strh_.ch_C (), "%lf", &l); } return length_i () && conv; } diff --git a/make/toplevel.make.in b/make/toplevel.make.in index 288eeed2f6..c26bfe991e 100644 --- a/make/toplevel.make.in +++ b/make/toplevel.make.in @@ -15,7 +15,7 @@ SUBDIRS = scripts buildscripts flower lib lily mf midi2ly po debian \ SCRIPTS = configure aclocal.m4 README_FILES = BUGS DEDICATION ANNOUNCE-0.1 ANNOUNCE-1.0 ANNOUNCE-1.2 \ - COPYING NEWS-0.1 NEWS-1.0 NEWS-0.0 NEWS-1.1 NEWS TODO AIMS ChangeLog + COPYING NEWS-0.1 NEWS-1.0 NEWS-0.0 NEWS-1.1 NEWS TODO AIMS CHANGES README_TXT_FILES = README.txt AUTHORS.txt INSTALL.txt PATCHES.txt IN_FILES := $(wildcard *.in) EXTRA_DIST_FILES = dstreamrc mudela-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) TASKS diff --git a/mf/feta-autometric.mf b/mf/feta-autometric.mf index 76a21ed49d..c536c3334b 100644 --- a/mf/feta-autometric.mf +++ b/mf/feta-autometric.mf @@ -1,7 +1,8 @@ % % autometric.mf -- administrative MF routines % -% source file of the Feta (Font-En-Tja) pretty-but-neat music font +% source file of the Feta (not an acronym for Font-En-Tja) +% pretty-but-neat music font % % (c) 1997, 1998 Han-Wen Nienhuys % Jan Nieuwenhuizen @@ -10,6 +11,11 @@ % to automate generation of lily tables and tex backend % The output should be parsed by the mf-to-table script +message "******************************************************"; +message "Using feta Autometric macros. "; +message "Do not worry about the @ signs in the output, they are not errors. "; +message "******************************************************"; + % font or database? def fet_beginfont(expr name,size) = font_identifier:=name&decimal size; diff --git a/midi2ly/version.cc b/midi2ly/version.cc index 6a6306fdab..360b0f886a 100644 --- a/midi2ly/version.cc +++ b/midi2ly/version.cc @@ -3,11 +3,9 @@ const char * midi2ly_version_sz(); -// should simply have Root class... String midi2ly_version_str() { - return String (midi2ly_version_sz ()) - + " " + _("of") + " " + __DATE__ + " " + __TIME__; + return String (midi2ly_version_sz ()); } diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 64afbc5c4d..b2d62ef9db 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -353,6 +353,10 @@ class TeXOutput: + +# ARG! THIS CODE IS BLOATED: +# FIXME: Junk all set/get methods. + class Properties: """ This class handles all ly2dvi.py property manipulation diff --git a/stepmake/bin/make-version.py b/stepmake/bin/make-version.py new file mode 100644 index 0000000000..4912f0a2a7 --- /dev/null +++ b/stepmake/bin/make-version.py @@ -0,0 +1,27 @@ + +import re +import sys + + +vf = 'VERSION' +if sys.argv[1:]: + vf = sys.argv[1] + +f = open (vf) +ls = f.readlines () +mypatch = 0 +defs = [] +for l in ls: + l = re.sub ('#.*','', l) + m = re.search ('([^ =]*)[\t ]*=[ \t]*([^ \t]*)[ \t]*\n', l) + if m: + defs.append ((m.group(1), m.group(2))) + + +sys.stdout.write ('/* automatically generated */') +for d in defs: + sys.stdout.write ('#define %s \"%s\"\n' % d) + +if ('MY_PATCH_LEVEL', '') in defs: + sys.stdout.write ('#define NO_MY_PATCHLEVEL') + diff --git a/stepmake/stepmake/generic-targets.make b/stepmake/stepmake/generic-targets.make index c66a7aa4bc..4a2a70dbc4 100644 --- a/stepmake/stepmake/generic-targets.make +++ b/stepmake/stepmake/generic-targets.make @@ -131,7 +131,7 @@ $(outdir)/VERSION: $(depth)/VERSION cp $< $@ $(outdir)/version.hh: $(outdir)/VERSION - sh $(step-bindir)/make-version.sh $< > $@ + $(PYTHON) $(step-bindir)/make-version.py $< > $@ # should this be in Rules? configure: configure.in aclocal.m4