From 0f033c0693cf1b62465d551b0fea20cb5d7cbfd0 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 23:10:35 +0000 Subject: [PATCH] lilypond-1.3.43 --- buildscripts/make-cygwin-cross.sh | 47 +++--- lily/score-element.cc | 7 +- lily/staff-margin-engraver.cc | 196 -------------------------- make/lilypond.spec.in | 4 + mf/GNUmakefile | 5 +- mf/feta-accordion.mf | 57 +++++--- mf/feta-beugel.mf | 4 +- mf/feta-generic.mf | 4 +- stepmake/stepmake/metafont-rules.make | 15 +- stepmake/stepmake/metapost-rules.make | 4 +- 10 files changed, 101 insertions(+), 242 deletions(-) diff --git a/buildscripts/make-cygwin-cross.sh b/buildscripts/make-cygwin-cross.sh index 73a1a40990..6d9bd3b1ff 100644 --- a/buildscripts/make-cygwin-cross.sh +++ b/buildscripts/make-cygwin-cross.sh @@ -163,7 +163,8 @@ build () a=$tp fi - rpm_package=`find_path $name*.rpm "$topdir/RPMS/$cto:$topdir/RPMS/$tp"` + ##rpm_package=`find_path $name*.rpm "$topdir/RPMS/$cto:$topdir/RPMS/$tp"` + rpm_package=`find_path $package*.rpm "$topdir/RPMS/$cto:$topdir/RPMS/$tp"` if [ "$rpm_package" != "" ]; then echo "$rpm_package: package exists" #echo "$rpm_package: refreshing installation only" @@ -550,7 +551,7 @@ cat > $distdir/setup.sh < \$dll/cygwin1.dll @@ -560,8 +561,8 @@ gunzip rpm.gz || exit 1 #gunzip cygwin1.dll.gz #cp -f cygwin1.dll \$old_dll echo > rpmrc -mkdir -p \$ROOT/var/lib -mkdir -p \$ROOT/bin +# mkdir -p \$ROOT/var/lib +# mkdir -p \$ROOT/bin rem # touch \$ROOT/bin/rpm \$ROOT/bin/rpm.exe echo > \$ROOT/bin/rpm; echo > \$ROOT/bin/rpm.exe ./rpm --root \$ROOT --rcfile rpmrc --initdb @@ -575,12 +576,27 @@ cat > $distdir/setup.bat < newdll; echo \$wdll \$wdll.orig\$\$ > olddll' if not errorlevel 0 goto nobash rem # mv -f \$old_dll \$old_dll.orig\$\$ @@ -622,7 +638,7 @@ EOF cd $distdir rm -f $CYGWIN_DLL.gz -cp -f $PREFIX/bin/$CYGWIN_DLL +cp -f $PREFIX/bin/$CYGWIN_DLL . rm -f rpm.gz cp -f `/bin/ls -d1 $ROOT/bin/rpm* |head -1` rpm @@ -630,7 +646,7 @@ rm -f bash.gz cp -f `/bin/ls -d1 $ROOT/bin/bash* |head -1` bash rm -f cygpath.gz -cp -f `/bin/ls -d1 $ROOT/bin/cygpath* |head -1` cygpath +cp -f `/bin/ls -d1 $PREFIX/bin/cygpath* |head -1` cygpath distbase=`basename $distdir` rm -f RPMS @@ -638,13 +654,13 @@ ln -s ../redhat/RPMS . www=`dirname $distdir` cd $www -for i in bash-2 guile-1 rpm-3 lilypond; do +for i in bash-2 guile-1 rpm-3 lilypond-$lilypond_version; do rpm=`find_path $i*.rpm $distbase/RPMS/$tp` dist_rpms="$dist_rpms $rpm" done -rm -f $www/setup.zip -cd $www && zip setup.zip lily-w32 $distbase/* $dist_rpms +rm -f $www/setup*.zip +cd $www && zip setup-lilypond-$lilypond_version.zip lily-w32 $distbase/* $dist_rpms # make small zip dist available # @@ -654,7 +670,7 @@ mkdir -p $zipdir rm -f $zipdir/$CYGWIN_DLL.zip cd $ROOT/bin && zip $zipdir/$CYGWIN_DLL.zip $CYGWIN_DLL -for i in bash-2 guile-1 rpm-3 lilypond; do +for i in bash-2 guile-1 rpm-3 lilypond-$lilypond_version; do found=`find_path $i*.rpm $distdir/RPMS/$tp` if [ "$found" = "" ]; then echo "$i: no such .rpm" @@ -677,6 +693,3 @@ gzip -f rpm gzip -f bash gzip -f cygpath - - - diff --git a/lily/score-element.cc b/lily/score-element.cc index 447426519b..868cc82aff 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -239,7 +239,12 @@ Score_element::calculate_dependencies (int final, int busy, if (status_i_ >= final) return; - assert (status_i_!= busy); + if (status_i_== busy) + { + programming_error ("Element is busy, come back later"); + return; + } + status_i_= busy; for (SCM d= get_elt_property ("dependencies"); d != SCM_EOL; d = gh_cdr (d)) diff --git a/lily/staff-margin-engraver.cc b/lily/staff-margin-engraver.cc index d200746bed..e69de29bb2 100644 --- a/lily/staff-margin-engraver.cc +++ b/lily/staff-margin-engraver.cc @@ -1,196 +0,0 @@ -/* - staff-margin-engraver.cc -- implement Staff_margin_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1998--2000 Jan Nieuwenhuizen -*/ - -#include "translator.hh" -#include "engraver.hh" -#include "bar.hh" -#include "span-bar.hh" -#include "dimension-cache.hh" -#include "directional-element-interface.hh" -#include "timing-translator.hh" -#include "text-item.hh" -#include "side-position-interface.hh" -#include "bar-script-engraver.hh" -#include "staff-symbol-referencer.hh" -#include "staff-symbol.hh" - -/* - TODO: - - * align over full score - * text aligment: left, centred, right - * merge with/derive from/add functionality to Bar_script_engraver - */ - - -/** - put (instrument) text to left of line - */ -class Staff_margin_engraver : public Engraver -{ -public: - VIRTUAL_COPY_CONS (Translator); - Staff_margin_engraver (); - -protected: - virtual void do_pre_move_processing (); - virtual void acknowledge_element (Score_element_info); - -private: - String type_; - Text_item* text_p_; - Item* left_edge_p_; - void create_text (SCM); -}; - -ADD_THIS_TRANSLATOR (Staff_margin_engraver); - - -Staff_margin_engraver::Staff_margin_engraver () -{ - type_ = "margin"; - text_p_ = 0; - left_edge_p_ = 0; -} - -void -Staff_margin_engraver::acknowledge_element (Score_element_info info) -{ - SCM s = get_property ("instrument"); - - if (now_mom () > Moment (0)) - s = get_property ("instr"); - - if (gh_string_p (s)) - { - if (Bar* b= dynamic_cast (info.elem_l_)) - { - create_text (s); - if (Span_bar* s= dynamic_cast (b)) - { - text_p_->set_parent (s, Y_AXIS); - } - } - } -} - -void -Staff_margin_engraver::create_text (SCM text) -{ - if (!text_p_) - { - assert (!left_edge_p_); - left_edge_p_ = new Item; - left_edge_p_->set_elt_property ("breakable", SCM_BOOL_T); - left_edge_p_->set_elt_property ("break-align-symbol", ly_symbol2scm ("Left_edge_item")); - - announce_element (Score_element_info (left_edge_p_, 0)); - - Staff_symbol_referencer_interface sl (left_edge_p_); - sl.set_interface (); - - Text_item* t = new Text_item; - - t->set_elt_property ("self-alignment-Y", gh_int2scm (0)); - t->add_offset_callback (Side_position_interface::aligned_on_self, Y_AXIS); - - t->set_parent (left_edge_p_, X_AXIS); - t->set_parent (left_edge_p_, Y_AXIS); - - // 'just to be sure': see Clef_item::do_add_processing - left_edge_p_->add_dependency (t); - - - /* - Hmm. - In almost every score that uses "instrument" and "instr" - we need two different paddings. - Let's try one of those first: - instrumentScriptPadding/instrScriptPadding - */ - SCM s = get_property (String (now_mom () ? "instr" : "instrument") - + "ScriptPadding"); - if (!gh_number_p (s)) - s = get_property (type_ + "ScriptPadding"); - - Real padding = 0; - if (gh_number_p (s)) - padding = gh_scm2double (s); - - s = get_property (type_ + "ScriptTextStyle"); - if (gh_string_p (s)) - t->set_elt_property ("style", s); - - s = get_property (type_ + "ScriptHorizontalAlignment"); - /* - Allow centred, - */ - if (gh_number_p (s) && !gh_scm2int (s)) - { - t->set_elt_property ("self-alignment-X", gh_int2scm (0)); - t->add_offset_callback (Side_position_interface::aligned_on_self, X_AXIS); - /* -% Centred is still broken, it always requires proper padding. - */ - padding *= -1; - if (padding) - t->translate_axis (padding, X_AXIS); - } - /* - left or right alignment. - */ - else - { - side_position (t).set_axis (X_AXIS); - side_position (t).add_support (left_edge_p_); - - Direction d; - if (isdir_b (s)) - d = to_dir (s); - /* - By default, align at left edge of Left_edge_item, - (which makes text right-aligned) - so that we don't collide with staff. - */ - else - d = LEFT; - - directional_element (t).set (d); - padding *= -d; - if (padding) - t->set_elt_property ("padding", gh_double2scm (padding)); - } - - - announce_element (Score_element_info (t, 0)); - text_p_ = t; - } - - - text_p_->set_elt_property ("text", text); -} - -void -Staff_margin_engraver::do_pre_move_processing () -{ - if (text_p_) - { - /* - Let's not allow user settings for visibility function (yet). - Although end-of-line would work, to some extent, we should - make a properly ordered Right_edge_item, if that need arises. - */ - text_p_->set_elt_property("visibility-lambda", - scm_eval (ly_symbol2scm ("begin-of-line-visible"))); - typeset_element (text_p_); - text_p_ = 0; - - typeset_element (left_edge_p_); - left_edge_p_ = 0; - } -} diff --git a/make/lilypond.spec.in b/make/lilypond.spec.in index 1c4f427152..bea597ab76 100644 --- a/make/lilypond.spec.in +++ b/make/lilypond.spec.in @@ -67,6 +67,10 @@ mkdir -p out/examples/ tar -cf - input/ | tar -C out/examples/ -xf- || true %ifos cygwin +# urg, this symlink doesn't come through on cygwin +# this is the way symlinks work over there, let's fake one +rm -f $RPM_BUILD_ROOT%{_prefix}/share/lilypond/cmtfm +echo '!c:\\texmf\\fonts\\tfm\\public\\cm' > $RPM_BUILD_ROOT%{_prefix}/share/lilypond/cmtfm %{fix_suffixes} %endif diff --git a/mf/GNUmakefile b/mf/GNUmakefile index f0c0a7642b..4549535290 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -18,7 +18,9 @@ AFM_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.afm) $(AF_FILES:.af=.afm)) TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm)) PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa)) -ALL_GEN_FILES= $(TEXTABLES) $(LOG_FILES) $(AFM_FILES) $(TFM_FILES) $(PFA_FILES) +# Make tfm files first, log files last, +# so that normally log files aren't made twice +ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(PFA_FILES) $(LOG_FILES) #PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)" INSTALLATION_DIR=$(datadir)/mf/ @@ -52,3 +54,4 @@ $(outdir)/%.afm $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log localclean: rm -f mfplain.mem mfplain.log mpout.log rm -f *.tfm *.log + diff --git a/mf/feta-accordion.mf b/mf/feta-accordion.mf index 7694cc3a18..e08c90bf00 100644 --- a/mf/feta-accordion.mf +++ b/mf/feta-accordion.mf @@ -1,11 +1,6 @@ % -*- Fundamental -*- accreg_dot_size# := .5staff_space#; - -% FIXME -% 'strange turning path' in accSB and others: -% mf '\mode=laserjet; input feta11' -% mf '\mode=laserjet; input feta13' accreg_linethickness# := 1.3stafflinethickness#; % This dimention is the same on all registersymbols. @@ -69,7 +64,8 @@ fet_beginchar("accBayanbase", "accBayanbase", "accBayanbase") % set_char_box(accreg_lh#, accreg_lh#, 3accreg_lh#, 0); set_char_box(accreg_lh#, accreg_lh#, 0, 3accreg_lh#); pickup pencircle scaled accreg_linethickness; - draw (0, 0)--(2w, 0)--(2w, 3accreg_lh)--(0, 3accreg_lh)--(0, 0); + %draw (0, 0)--(2w, 0)--(2w, 3accreg_lh)--(0, 3accreg_lh)--(0, 0); + draw (0, 0)--(2w, 0)--(2w, 3accreg_lh)--(0, 3accreg_lh)--cycle; draw (0, accreg_lh)--(2w, accreg_lh); draw (0, 2accreg_lh)--(2w, 2accreg_lh); currentpicture := currentpicture shifted (-w, 0);% -3lh); @@ -84,6 +80,7 @@ def def_B(expr w, h) = penpos12(thick, 0); penpos13(thin, 90); penpos14(thin, 90); + penpos15(thick, 180); penpos16(thin, -90); penpos17(thin, -90); @@ -135,8 +132,16 @@ def def_some_vars = save hs, mb, mt, thin, thick, height, width, cOne, cTwo; width = .8staffsize; height = 2.4staff_space; - thin = 0.05staff_space; - thick = 0.2staff_space; + % URG. smaller sizes should be wider and fatter + %thin = 0.05staff_space; + %thick = 0.2staff_space; + save bx,hx; 4hx+bx=1.15; 10hx+bx=1; + fatten:=designsize*hx+bx*1.2; + thick:= 0.2staff_space*fatten; + % urg: mustn't ever go thinner than blot! + thin#:= blot_diameter#; + define_pixels (thin); + hs = 0.4staff_space; mb = .53; mt = .47; @@ -144,14 +149,17 @@ def def_some_vars = cTwo = 0.60; enddef; -%%% strange turning path. +def print_penpos (suffix $)= + message str $ &": ("&decimal x.$.l&", "&decimal y.$.l&"); ("&decimal x.$.r&", "&decimal y.$.r&");"; +enddef; + fet_beginchar("accSB", "accSB", "accSB") set_char_box(.4staffsize#, .4staffsize#, 0, 2.4staff_space#); def_some_vars; def_B(.35width, .7height); - % FIXME -- strange turning path: - penstroke z10e--z11e{right}..z12e{up}..z13e{left}--z14e; + penstroke z10e--z11e{right}..z12e..z13e{left}--z14e; + penlabels(10, 11, 12, 13, 14); penstroke z13e{right}..z15e{up}..z16e{left}--z17e; penstroke z18e--z19e; @@ -160,7 +168,7 @@ fet_beginchar("accSB", "accSB", "accSB") currentpicture := currentpicture shifted(.40width, 0); def_S(.35width, .7height); -% penlabels(1, 2, 3, 4, 5, 6, 7, 8, 9); + penlabels(1, 2, 3, 4, 5, 6, 7, 8, 9); filldraw z1r--z8r--z8l--subpath(t, 1) of bue--cycle; filldraw subpath(t, 1) of bueoverst--z7l--z9r--z9l--cycle; penstroke z1e{down}..z2e{right}..z3e @@ -174,17 +182,16 @@ fet_beginchar("accSB", "accSB", "accSB") currentpicture := currentpicture shifted (0, 2.4staff_space); fet_endchar; -%%% strange turning path. fet_beginchar("accBB", "accBB", "accBB") set_char_box(.4staffsize#, .4staffsize#, 0, 2.4staff_space#); def_some_vars; def_B(.35width, .7height); - % FIXME -- strange turning path: penstroke z10e--z11e{right}..z12e{up}..z13e{left}--z14e; penstroke z13e{right}..z15e{up}..z16e{left}--z17e; penstroke z18e--z19e; + penlabels(1, 2, 3, 4, 5, 6, 7, 8, 9); pickup pencircle scaled .5thick; drawdot(.37width, .10thick); currentpicture := currentpicture shifted (.40width, 0); @@ -195,6 +202,7 @@ fet_beginchar("accBB", "accBB", "accBB") currentpicture := currentpicture shifted(-.40width, -.85height); draw (-.5width, 0)--(.5width, 0)--(.5width, -height) --(-.5width, -height)--(-.5width, 0); + penlabels(10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ); currentpicture := currentpicture shifted (0, 2.4staff_space); fet_endchar; @@ -235,8 +243,22 @@ fet_beginchar("accOldEES", "accOldEES", "accOldEES") save thin, thick, sw, ch, cw, mb, mt; ch = .6h; cw = .8w; - thin = .05cw; - thick = .17w; + % URG. smaller sizes should be wider and fatter + %thin = .05cw; + %thick = .17w; + save bx,hx; 4hx+bx=1.15; 10hx+bx=1; + fatten:=designsize*hx+bx*1.2; + thick:= .17w*fatten; + + % urg: mustn't ever go thinner than blot! + %thin = 0.05staff_space; + %blot#:=.4pt#; + thin#:= blot_diameter#; + define_pixels (thin); + + + hs = 0.4staff_space; + mb = .53; mt = .47; sw = .8thick; z1 = (0, ch-.5thin); penpos1 (thin, -90); @@ -248,12 +270,13 @@ fet_beginchar("accOldEES", "accOldEES", "accOldEES") z7 = (1.2cw, 0); penpos7(thin, 90); z8 = (1.3cw, .2mb*ch); penpos8(thin, 180); penlabels(1, 2, 3, 4, 5, 6, 7, 8); + + %%AAARG pickup pencircle scaled 0.001pt; filldraw (0, 0)--(0, thin)--(sw, thin)--(sw, ch-thin) --(sw+thick, ch-thin)--(sw+thick, thin) --(2sw+thick, thin)--(2sw+thick, 0)--cycle; - % FIXME -- strange turning path: penstroke z1e--z2e{right}..z3e..z4e{left}--z5e; penstroke z4e{right}..z6e{down}..z7e{right}..z8e{up}; diff --git a/mf/feta-beugel.mf b/mf/feta-beugel.mf index c51128173a..0deab25aab 100644 --- a/mf/feta-beugel.mf +++ b/mf/feta-beugel.mf @@ -40,5 +40,7 @@ enddef; for h := 2 staffsize# step 1 pt# until (7 * staffsize#): - draw_brace(h, staff_space# ); + % note: define_pixels (x) multiplies x by hppp, + % we must never get bigger than infinity + draw_brace (min (h, infinity/hppp - 1), staff_space#); endfor diff --git a/mf/feta-generic.mf b/mf/feta-generic.mf index 9d082d27a4..94c8c67611 100644 --- a/mf/feta-generic.mf +++ b/mf/feta-generic.mf @@ -35,12 +35,12 @@ if test = 0: input feta-klef; input feta-timesig; else: - input feta-bolletjes; +% input feta-bolletjes; % input feta-banier; % input feta-eindelijk; % input feta-klef; % input feta-toevallig; -% input feta-schrift; + input feta-schrift; % input feta-haak; % input feta-timesig; fi diff --git a/stepmake/stepmake/metafont-rules.make b/stepmake/stepmake/metafont-rules.make index a582c885bc..54b858c2f5 100644 --- a/stepmake/stepmake/metafont-rules.make +++ b/stepmake/stepmake/metafont-rules.make @@ -1,24 +1,27 @@ +# Don't remove $(outdir)/.log's. Logs are a target! + $(outdir)/%.dvi: %.mf $(METAFONT) "\nonstopmode; input $<;" gftodvi $(basename $<) - mv $(basename $<).dvi $(outdir) + mv $(basename $<).dvi $(outdir) rm $(basename $<).*gf $(outdir)/%.log: %.mf $(METAFONT) $< mv $(@F) $@ - rm $(basename $< ).*gf + rm $(basename $(@F)).*gf -$(outdir)/%.tfm: %.mf +$(outdir)/%.tfm $(outdir)%.log: %.mf $(METAFONT) "\mode:=$(MFMODE); nonstopmode; input $<;" - mv $(@F) $(outdir) - rm $(basename $<).*gf $(basename $<).*log +# Let's keep this log output, it saves another mf run. + mv $(basename $(@F)).log $(basename $(@F)).tfm $(outdir) + rm $(basename $(@F)).*gf $(outdir)/%.$(XPM_RESOLUTION)gf: %.mf $(METAFONT) "\\mode=$(XPM_MODE); \\input $<" mv $(@F) out - rm -f $(basename $<).log $(basename $<).tfm + rm -f $(basename $(@F)).tfm $(basename $(@F)).*log $(outdir)/%.$(XPM_RESOLUTION)pk: $(outdir)/%.$(XPM_RESOLUTION)gf gftopk $< $@ diff --git a/stepmake/stepmake/metapost-rules.make b/stepmake/stepmake/metapost-rules.make index 7f820ab4e5..fa6e37233a 100644 --- a/stepmake/stepmake/metapost-rules.make +++ b/stepmake/stepmake/metapost-rules.make @@ -1,4 +1,6 @@ +# Don't remove $(outdir)/.log's. Logs are a target! + $(outdir)/%.0: %.mf mfplain.mem -$(METAPOST) "&mfplain \mode=lowres; \mag=1.0; nonstopmode; input $<" @@ -9,5 +11,5 @@ mfplain.mem: $(MFPLAIN_MP) $(outdir)/%.pfa: $(outdir)/%.0 $(PYTHON) $(depth)/buildscripts/ps-to-pfa.py --output $(basename $<).pfa $< rm -f $(basename $(@F)).[0-9]* - rm -f $(basename $<).log + rm -f $(basename $(@F)).tfm $(basename $(@F)).log -- 2.39.5