]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.2.2
authorfred <fred>
Tue, 26 Mar 2002 22:24:58 +0000 (22:24 +0000)
committerfred <fred>
Tue, 26 Mar 2002 22:24:58 +0000 (22:24 +0000)
13 files changed:
Documentation/bibliography/engraving.bib
Documentation/topdocs/index.yo
TODO
buildscripts/mf-to-table.py
buildscripts/ps-to-pfa.py
flower/include/getopt-long.hh
flower/scalar.cc
make/toplevel.make.in
mf/feta-autometric.mf
midi2ly/version.cc
scripts/ly2dvi.py
stepmake/bin/make-version.py [new file with mode: 0644]
stepmake/stepmake/generic-targets.make

index e423f0c1b04066b128d2a1f56e3b6961db2cb652..2696988d1b4560e5781a90b525b5c619632b2885 100644 (file)
@@ -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.}
+}
+
index 61621f2a6692c3f21cd006e9a29f76f485ca846d..bf794f498e254035541f67047f72710830fb9af2 100644 (file)
@@ -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 673acaf3eb4d0fbca4db07f73c4916b748e54f07..594ae3ad4aa7e8502de376b70109a8e007c78ab8 100644 (file)
--- 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.
index 7b6ecd183e746be2c59d29a9567bd7a66f4aa69b..efbcb7e6613ab8b3f2017cd784c9dd9197ffb820 100644 (file)
@@ -6,20 +6,13 @@
 # 
 # (c) 1997 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
-
-#
-# 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)
 
 
index f1d4d8c38b96fb383e1ae022f64ecaff6aba2062..bab745820d330d367b83a040974b8da639da38f0 100644 (file)
@@ -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
 
index a069e284229a5c5ba330f398dd06e8c6578df586..92de4934dc52610523c688e13cc7f3daa81cafdf 100644 (file)
@@ -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 *); 
 };
 
 
index 6e97eedf8f08dc0d1fe46452a0d12b71669fe1ee..951f50359dce9d8061e155d8078daf462f87a1ad 100644 (file)
@@ -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;
 }
index 288eeed2f6b32d8d5fedaf2ad9eb8512a54fb4dc..c26bfe991e809bdbf42ff57b1dc99fa642bc0511 100644 (file)
@@ -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
index 76a21ed49dfb7b413346ccb70be5a676aec68561..c536c3334b2405ab6f71086cf3490a8e4bd8f4a6 100644 (file)
@@ -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 <hanwen@stack.nl>
 %          Jan Nieuwenhuizen <janneke@gnu.org>
 % 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;
index 6a6306fdab8ebb721f570fed4cd808d628c85176..360b0f886a45543dee2ebf9c92ad516106c3cdc1 100644 (file)
@@ -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 ());
 }
 
index 64afbc5c4d5d1af445f4b435534d8aa0c3187f7d..b2d62ef9db2829ce7610e1cfe6b2080a79dc74f8 100644 (file)
@@ -353,6 +353,10 @@ class TeXOutput:
 
 \f
 
+
+# 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 (file)
index 0000000..4912f0a
--- /dev/null
@@ -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')
+       
index c66a7aa4bc3832581699bbcbd64f05414a373787..4a2a70dbc4cabee70f87e64401410bc9882f10e3 100644 (file)
@@ -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