From a760b67b894425dee7f351b741b9c44eea95f43a Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 5 Feb 2004 17:18:58 +0000 Subject: [PATCH] *** empty log message *** --- ChangeLog | 6 ++ buildscripts/lilypond.words.py | 11 +-- buildscripts/wiki-slurp.py | 156 --------------------------------- lily/include/lily-guile.hh | 2 +- lily/pitch-squash-engraver.cc | 11 ++- scm/lily.scm | 7 ++ 6 files changed, 22 insertions(+), 171 deletions(-) delete mode 100644 buildscripts/wiki-slurp.py diff --git a/ChangeLog b/ChangeLog index c1996c1aae..6fa94cc7d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-02-05 Han-Wen Nienhuys + + * VERSION (PACKAGE_NAME): release 2.1.19. + 2004-02-05 Jan Nieuwenhuizen * scripts/filter-lilypond-book.py @@ -5,6 +9,8 @@ 2004-02-05 Han-Wen Nienhuys + * buildscripts/lilypond.words.py (F): remove drums.scm reference. + * Grand 2003 -> 2004 search replace. * lily/parser.yy (chord_body_element): add DRUM_PITCH to chords diff --git a/buildscripts/lilypond.words.py b/buildscripts/lilypond.words.py index 21b936dfb1..0de3329c80 100755 --- a/buildscripts/lilypond.words.py +++ b/buildscripts/lilypond.words.py @@ -84,16 +84,7 @@ for name in [ notes = notes + ['' + m.group(2)] F.close() -# (short) drum names -for name in [ -'scm/drums.scm' -]: - F = open(name, 'r') - for line in F.readlines(): - m = re.search(r"^(\s*\([a-z]+\s*)([a-z]+)(\s*,\(ly:make-pitch)",line) - if m: - notes = notes + ['' + m.group(2)] - F.close() + # reserved words for name in [ diff --git a/buildscripts/wiki-slurp.py b/buildscripts/wiki-slurp.py deleted file mode 100644 index efed0c7fea..0000000000 --- a/buildscripts/wiki-slurp.py +++ /dev/null @@ -1,156 +0,0 @@ -#!@PYTHON@ - -# -# translate an entire Wiki site into local html. -# - -import re -import urllib -import sys -import getopt -import os -program_version = '@TOPLEVEL_VERSION@' -if program_version == '@' + 'TOPLEVEL_VERSION' + '@': - program_version = '1.5.69' - - -def help (): - print """Usage: wiki-slurp.py [OPTIONS]... ENTRY-PATTERN... - -Download a WikiWiki site and convert to local html. - -Example: wiki-slurp.py -d /tmp/output 'http://c2.com/cgi-bin/wiki?' - -Options: - -h, --help show this help - -m, --mangle mangle file names to be shorter - -d, --outdir=DIR set output directory to DIR - -v, --version show version information - -Warning: downloading an entire Wiki site generates a huge amount of -traffic and server load. Consider asking for a copy of the database. -See also http://c2.com/cgi-bin/wiki?WikiSlurp. - -Report bugs to bug-lilypond@gnu.org. - -Written by Han-Wen Nienhuys . - -""" - -def print_version (): - print r"""wiki-slurp.py %s - -This is free software. It is covered by the GNU General Public License, -and you are welcome to change it and/or distribute copies of it under -certain conditions. Invoke as `midi2ly --warranty' for more information. - -Copyright (c) 2000--2004 by Han-Wen Nienhuys -""" % program_version - -(options, files) = getopt.getopt (sys.argv[1:], 'vd:hm', ['help','mangle','version', 'outdir=']) - - -def identity (name): - return name - -def mangle (name): - return '%d' % hash (name) - -mangler = identity - -outdir = '/tmp/' - -for opt in options: - o = opt[0] - a = opt[1] - if o== '--help' or o == '-h': - help () - sys.exit (0) - elif o == '--version' or o == '-v': - print_version () - sys.exit(0) - elif o == '--mangle' or o == '-m': - mangler = mangle - elif o == '--outdir' or o == '-d': - outdir = a - else: - print o - raise getopt.error - - -patterns = files - -if not patterns: - help () - sys.stderr.write ("\n") - sys.exit (2) - -re_patterns = [] -for pattern in patterns: - re_patterns.append (re.sub ('([?.])', '\\\\\\1', pattern)) - -todo = ["FrontPage"] - -print 'here!' -done = { - 'EditText': 1, - } - -def unwiki (str, pat, mangler): - local = '([A-Za-z]+)' % pat - - newurls = [] - def do_replace (match, us = newurls, mangler = mangler): - newurl = match.group (1) - local = mangler (newurl) - - replacement = '%s' % (local,newurl) - us.append (newurl) - return replacement - - str = re.sub (local, do_replace, str) - otherurl = '([?A-Za-z]+)' % pat - str = re.sub (otherurl, '\\1', str) - - imagesrc = '(]*>)' % pat - str = re.sub (imagesrc, '\\1', str) - - return (str, newurls) - - -while todo: - f = todo[-1] - todo = todo[:-1] - - if done.has_key (f): - continue - done [f] = 1 - - mangled = mangler (f) - - sys.stderr.write ("reading `%s' ... " % f) - sys.stderr.flush () - - page = urllib.urlopen (patterns[0] + f).read () - sys.stderr.write ('done. ') - sys.stderr.flush () - - for re_pattern in re_patterns: - (page, nus) = unwiki (page, re_pattern, mangler) - todo.extend (nus) - - outname = os.path.join (outdir, mangled) + '.html' - fo = open (outname, 'w') - - sys.stderr.write ("Writing `%s'\n" % outname) - fo.write (page) - fo.close () - - -# test -if 0: - page = open ('/tmp/FrontPage.html').read() - (str, us)=unwiki (page, re_patterns) - print str - print us - diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index c56177af8b..443713b6b6 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -82,7 +82,7 @@ inline SCM scm_c_make_vector (int k, SCM val) { #define scm_gc_unregister_collectable_memory(a,b,c) scm_done_free(b) #define scm_gc_register_collectable_memory(a,b,c) scm_done_malloc(b) #define SCM_VECTOR_REF(v,i) (SCM_VELTS((v))[(i)]) - +#define scm_hash_table_p scm_vector_p #endif diff --git a/lily/pitch-squash-engraver.cc b/lily/pitch-squash-engraver.cc index ef5f335803..197b589fa4 100644 --- a/lily/pitch-squash-engraver.cc +++ b/lily/pitch-squash-engraver.cc @@ -36,10 +36,13 @@ Pitch_squash_engraver::Pitch_squash_engraver() } ENTER_DESCRIPTION(Pitch_squash_engraver, -/* descr */ "Treat all pitches as middle C. Note that the notes move, but " -"the locations of accidentals stay the same. " -"Set the position field of all note heads to zero. This useful for " -"making a single line staff that demonstrates the rhythm of a melody.", +/* descr */ + "Set the vertical position of noteheads to " + "@code{squashedPosition}, if that " + "property is set. " + "This can be used to make a single line staff " + "demonstrating the rhythm of a melody.", + /* creats*/ "", /* accepts */ "", /* acks */ "note-head-interface", diff --git a/scm/lily.scm b/scm/lily.scm index 882445dae3..c10fe8241c 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -162,6 +162,13 @@ (map-alist-keys func (cdr list))) )) +;;;;;;;;;;;;;;;; +;; hash + + + +(if (not (defined? 'hash-table?)) ; guile 1.6 compat + (define hash-table? vector?)) (define-public (hash-table->alist t) "Convert table t to list" -- 2.39.2