From: fred Date: Sun, 24 Mar 2002 20:14:26 +0000 (+0000) Subject: lilypond-1.0.12 X-Git-Tag: release/1.5.59~2947 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6b67f88cc6315e38c2cf999bc104dea40ccde2a9;p=lilypond.git lilypond-1.0.12 --- diff --git a/buildscripts/genheader.py b/buildscripts/genheader.py index 8e6f396037..2c1d6be308 100644 --- a/buildscripts/genheader.py +++ b/buildscripts/genheader.py @@ -25,7 +25,10 @@ my_options = My_options() def name(): - return pwd.getpwuid(os.getuid())[4] + return os.environ['USERNAME'] + +# field 4 of passwd is also used for finger info (phone no., office etc) +# return pwd.getpwuid(os.getuid())[4] def c_commentify(str): return '/* ' + regsub.gsub('^',' ', str) + '\n */'; diff --git a/lily/include/lookup.hh b/lily/include/lookup.hh index 763beb8d42..5dc56d279c 100644 --- a/lily/include/lookup.hh +++ b/lily/include/lookup.hh @@ -41,6 +41,7 @@ struct Lookup { Atom vbrace (Real &dy) const; Atom vbracket (Real &dy) const; Atom time_signature (Array) const; + Atom special_time_signature (String) const; Atom stem (Real y1_pos, Real y2_pos) const; Atom rule_symbol (Real height, Real width) const; Atom accidental (int) const; diff --git a/lily/include/time-signature.hh b/lily/include/time-signature.hh index 762f465b98..ed079a29ff 100644 --- a/lily/include/time-signature.hh +++ b/lily/include/time-signature.hh @@ -18,12 +18,16 @@ */ class Time_signature: public Item { - Array args; + + protected: virtual Molecule*brew_molecule_p() const; public: - Time_signature (Array args) ; + Time_signature () ; + Array args_; + String time_sig_type_str_; + DECLARE_MY_RUNTIME_TYPEINFO; SCORE_ELEMENT_CLONE(Time_signature); }; diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index 75d803226b..b72d784608 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -39,10 +39,12 @@ Time_signature_engraver::do_process_requests() args.push (req->beats_i_); args.push (req->one_beat_i_); - time_signature_p_ = new Time_signature (args); + time_signature_p_ = new Time_signature (); + time_signature_p_->args_ = args; time_signature_p_->break_priority_i_ = 1; // ugh } + if (time_signature_p_) announce_element (Score_element_info (time_signature_p_, req)); } @@ -52,6 +54,12 @@ Time_signature_engraver::do_pre_move_processing() { if (time_signature_p_) { + Scalar sigstyle = get_property ("timeSignatureStyle"); + if (sigstyle.length_i ()) + { + time_signature_p_->time_sig_type_str_ = sigstyle; + } + typeset_element (time_signature_p_); time_signature_p_ =0; } diff --git a/lily/time-signature.cc b/lily/time-signature.cc index e882c55582..931766ccc8 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -1,11 +1,19 @@ +/* + time-signature.cc -- implement Time_signature + + source file of the GNU LilyPond music typesetter + + (c) 1996--1998 Han-Wen Nienhuys + + */ + #include "scalar.hh" #include "molecule.hh" #include "time-signature.hh" #include "paper-def.hh" #include "lookup.hh" -Time_signature::Time_signature (Arraya) - :args (a) +Time_signature::Time_signature () { breakable_b_ = true; } @@ -13,7 +21,13 @@ Time_signature::Time_signature (Arraya) Molecule* Time_signature::brew_molecule_p() const { - Atom s = lookup_l ()->time_signature (args); + Atom s; + if (time_sig_type_str_.length_i ()) + { + s = lookup_l ()-> special_time_signature (time_sig_type_str_); + } + else + s = lookup_l ()->time_signature (args_); s.translate_axis (-s.extent()[Y_AXIS].center (), Y_AXIS); return new Molecule (Atom (s)); }