From: Han-Wen Nienhuys Date: Sun, 12 Jun 2005 18:42:49 +0000 (+0000) Subject: * elisp/lilypond-mode.el (LilyPond-command-alist): remove 2midi X-Git-Tag: release/2.5.31~17 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a31494f4d9f00a32c87ddd5b50ad3265dc29732b;p=lilypond.git * elisp/lilypond-mode.el (LilyPond-command-alist): remove 2midi (LilyPond-command-alist): use -f ps (thanks to Pal Benko) * input/sakura-sakura.ly: add \midi. * buildscripts/mutopia-index.py (find): use /usr/bin/find iso. python find. * ttftool/test.c (main): cosmetics. * ttftool/util.c (surely_lseek): use stdio FILE's for I/O * ttftool/test.c: new file. If compiled with -DTEST_TTFTOOL, create a ttf2ps binary. * scm/backend-library.scm (postscript->png): set rename-page-1 to true. --- diff --git a/ChangeLog b/ChangeLog index 632d44d2f7..4621c03023 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2005-06-12 Han-Wen Nienhuys + * elisp/lilypond-mode.el (LilyPond-command-alist): remove 2midi + (LilyPond-command-alist): use -f ps (thanks to Pal Benko) + + * input/sakura-sakura.ly: add \midi. + + * buildscripts/mutopia-index.py (find): use /usr/bin/find + iso. python find. + + * ttftool/test.c (main): cosmetics. + * ttftool/util.c (surely_lseek): use stdio FILE's for I/O * ttftool/test.c: new file. If compiled with -DTEST_TTFTOOL, diff --git a/buildscripts/mutopia-index.py b/buildscripts/mutopia-index.py index 161151c691..afaf45fdc2 100644 --- a/buildscripts/mutopia-index.py +++ b/buildscripts/mutopia-index.py @@ -9,30 +9,15 @@ import re import stat import sys -_debug = 0 -_prune = ['(*)'] - -def find (pattern, dir = os.curdir): - lst = [] - names = os.listdir (dir) - names.sort () - for name in names: - if name in (os.curdir, os.pardir): - continue - fullname = os.path.join (dir, name) - if fnmatch.fnmatch (name, pattern): - lst.append (fullname) - if os.path.isdir (fullname) and not os.path.islink (fullname): - for p in _prune: - if fnmatch.fnmatch (name, p): - if _debug: - print "skip", `fullname` - break - else: - if _debug: - print "descend into", `fullname` - lst = lst + find (pattern, fullname) - return lst +def find (pat, dir): + f = os.popen ('find %s -name "%s"'% (dir, pat)) + lst = [] + for a in f.readlines(): + a = a[:-1] + lst.append (a) + return lst + + headertext= r""" @@ -124,6 +109,8 @@ hr { border:0; height:1; color: #000000; background-color: #000000; }\n list.write (headertext_nopics) for ex in inputs: + print ex + (base, ext) = os.path.splitext (ex) (base, ext2) = os.path.splitext (base) ext = ext2 + ext @@ -163,13 +150,25 @@ hr { border:0; height:1; color: #000000; background-color: #000000; }\n % (type, size)) pictures = ['jpeg', 'png', 'xpm'] lst.write ('\n') + else: + print "can't find" , `file_name` list_item (base + ext, 'The input', 'ASCII') + + pages_found = 0 for page in range (1, 100): + pages_found += 1 f = base + '-page%d.png' % page - if not os.path.isfile (f): + + if not os.path.isfile (f): break list_item (f, 'See a picture of page %d' % page, 'png') + + if pages_found == 0 and os.path.exists (base + '.png'): + list_item (base + ".png", + 'See a picture', 'png') + + list_item (base + '.pdf', 'Print', 'PDF') list_item (base + '.midi', 'Listen', 'MIDI') list.write ('\n'); diff --git a/elisp/lilypond-mode.el b/elisp/lilypond-mode.el index 9330df71a5..39d15a3861 100644 --- a/elisp/lilypond-mode.el +++ b/elisp/lilypond-mode.el @@ -425,8 +425,7 @@ in LilyPond-include-path." ("LilyPond" . (,(concat LilyPond-lilypond-command " %s") "%s" "%l" "View")) ("TeX" . ("tex '\\nonstopmode\\input %t'" "%t" "%d" "ViewDVI")) ("2Dvi" . (,(concat LilyPond-lilypond-command " -b tex %s") "%s" "%d" "LaTeX")) - ("2PS" . (,(concat LilyPond-lilypond-command "-b ps %s") "%s" "%p" "ViewPS")) - ("2Midi" . (,(concat LilyPond-lilypond-command " -m %s") "%s" "%m" "Midi")) + ("2PS" . (,(concat LilyPond-lilypond-command "-f ps %s") "%s" "%p" "ViewPS")) ("2Gnome" . (,(concat LilyPond-lilypond-command " -b gnome %s"))) ("Book" . ("lilypond-book %x" "%x" "%l" "LaTeX")) diff --git a/input/mutopia/W.A.Mozart/mozart-hrn3-allegro.ily b/input/mutopia/W.A.Mozart/mozart-hrn3-allegro.ily index 653f80e85b..e8e911d422 100644 --- a/input/mutopia/W.A.Mozart/mozart-hrn3-allegro.ily +++ b/input/mutopia/W.A.Mozart/mozart-hrn3-allegro.ily @@ -127,7 +127,9 @@ allegro = \override Stem #'stroke-style = #"grace" \longgrace d16( \endlonggrace \revert Stem #'stroke-style } - c8[) b16 c)] + +%% todo: should insert grace slur here. + c8[ b16 c)] \grace { \override Stem #'stroke-style = #"grace" \longgrace c16 \endlonggrace diff --git a/input/sakura-sakura.ly b/input/sakura-sakura.ly index c3b0ea6ff3..f871be6a83 100644 --- a/input/sakura-sakura.ly +++ b/input/sakura-sakura.ly @@ -7,30 +7,36 @@ subtitle = "(Sakura, sakura)" } -<< - \relative c'' { - %% Beams are melismata, no autobeams. - \set Staff.autoBeaming = ##f - | a4 a b2 | a4 a b2 - | a4 b c b | a4 b8[ a] f2 - | e4 c e f | e4 e8[ c] b2 - | a'4 b c b | a4 b8[ a] f2 - | e4 c e f | e4 e8[ c] b2 - | a'4 a b2 | a4 a b2 - | d,4 e b'8[ a] f4 | e1 \bar "|." - } - \addlyrics { - さ く ら さ く ら - の や ま も さ と も - み わ た す か ぎ り - か す み か く も か - あ さ ひ に に を う - さ く ら さ く ら - は な ざ か り - } ->> +\score { + << + \relative c'' { + %% Beams are melismata, no autobeams. + \set Staff.autoBeaming = ##f + + | a4 a b2 | a4 a b2 + | a4 b c b | a4 b8[ a] f2 + | e4 c e f | e4 e8[ c] b2 + | a'4 b c b | a4 b8[ a] f2 + | e4 c e f | e4 e8[ c] b2 + | a'4 a b2 | a4 a b2 + | d,4 e b'8[ a] f4 | e1 \bar "|." + } + \addlyrics { + さ く ら さ く ら + の や ま も さ と も + み わ た す か ぎ り + か す み か く も か + あ さ ひ に に を う + さ く ら さ く ら + は な ざ か り + } + >> + \layout { } + \midi { \tempo 4=120 } + } + %%% Local Variables: %%% coding: utf-8 %%% End: diff --git a/scm/backend-library.scm b/scm/backend-library.scm index 25b2ae9e7b..edd00941de 100644 --- a/scm/backend-library.scm +++ b/scm/backend-library.scm @@ -94,7 +94,7 @@ ;; (string-append (basename name ".ps") "-page1.png" ))) (let ((paper-size (sanitize-command-option paper-size-name)) (verbose (ly:get-option 'verbose)) - (rename-page-1 #t)) + (rename-page-1 #f)) (ly:message (_ "Converting to ~a...") "PNG") (make-ps-images name resolution paper-size rename-page-1 verbose) (ly:progress "\n"))) diff --git a/ttftool/ps.c b/ttftool/ps.c index 94104d7bdc..1fbf7d0b9a 100644 --- a/ttftool/ps.c +++ b/ttftool/ps.c @@ -8,7 +8,6 @@ #include "proto.h" #include "ttftool.h" -#include "libc-extension.hh" #define CHUNKSIZE 65534 diff --git a/ttftool/test.c b/ttftool/test.c index 76c18f5eb1..49f653eafd 100644 --- a/ttftool/test.c +++ b/ttftool/test.c @@ -12,7 +12,7 @@ main (int argc, char **argv) FILE *in, *out; if (argc != 3) { - fprintf (stderr, "test foo.ttf bar.pfa"); + fprintf (stderr, "%s input.ttf output.pfa", argv[0]); exit (2); } diff --git a/ttftool/util.c b/ttftool/util.c index 12f29da1f9..d06a4fc7f8 100644 --- a/ttftool/util.c +++ b/ttftool/util.c @@ -9,7 +9,6 @@ #include "types.h" #include "proto.h" -#include "libc-extension.hh" #include "ttftool.h"