From c440fdc04a9d8614a0d93d8cdcfe0216a18a7573 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:39:26 +0000 Subject: [PATCH] lilypond-0.0.52 --- .version | 2 +- flower/.version | 2 +- flower/NEWS | 3 +++ flower/path.cc | 2 ++ lib/source-file.cc | 11 +++++++++-- lib/source.cc | 9 +++++---- lily/head-reg.cc | 10 ---------- lily/include/head-reg.hh | 2 -- lily/include/paper-def.hh | 20 +++++++++++++++++--- lily/include/slur-reg.hh | 10 ++++------ lily/include/voice-regs.hh | 1 + lily/slur-reg.cc | 13 ------------- 12 files changed, 43 insertions(+), 42 deletions(-) diff --git a/.version b/.version index 0e2c17ca28..1457d1972e 100644 --- a/.version +++ b/.version @@ -1,6 +1,6 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 0 -TOPLEVEL_PATCH_LEVEL = 51 +TOPLEVEL_PATCH_LEVEL = 52 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf diff --git a/flower/.version b/flower/.version index 53a4af6a08..8b50ae31c5 100644 --- a/flower/.version +++ b/flower/.version @@ -1,6 +1,6 @@ MAJOR_VERSION = 1 MINOR_VERSION = 1 -PATCH_LEVEL = 11 +PATCH_LEVEL = 12 # use to send patches, always empty for released version: MY_PATCH_LEVEL = # include separator: "-1" or ".a" # diff --git a/flower/NEWS b/flower/NEWS index 1f489e042f..d0c64e59dd 100644 --- a/flower/NEWS +++ b/flower/NEWS @@ -1,3 +1,6 @@ +pl 1.1.11.jcn1 + - No path search for "" and "-" + pl 1.1.11 - template<> class P - assoc elem() methods diff --git a/flower/path.cc b/flower/path.cc index a0bbaca44f..3a2e5dfbc0 100644 --- a/flower/path.cc +++ b/flower/path.cc @@ -65,6 +65,8 @@ File_path::find(String nm)const { fdebug << "looking for " << nm ; + if ( !nm.length_i() || ( nm == "-" ) ) + return nm; for (int i=0; i < size(); i++) { String path = (*this)[i]; diff --git a/lib/source-file.cc b/lib/source-file.cc index fe56cb3551..8f28f9b5f5 100644 --- a/lib/source-file.cc +++ b/lib/source-file.cc @@ -33,13 +33,15 @@ Source_file::Source_file( String filename_str ) istream_p_ = 0; open(); - map(); + if ( fildes_i_ > 0 ) + map(); } istream* Source_file::istream_l() { - assert( fildes_i_ ); + if ( !fildes_i_ ) + return &cin; if ( !istream_p_ ) { if ( size_off_ ) // can-t this be done without such a hack? istream_p_ = new istrstream( ch_C(), size_off_ ); @@ -165,6 +167,11 @@ Source_file::name_str() void Source_file::open() { + if ( !name_str_.length_i() || ( name_str_ == "-" ) ) { + fildes_i_ = 0; + return; + } + fildes_i_ = ::open( name_str_, O_RDONLY ); if ( fildes_i_ == -1 ) { diff --git a/lib/source.cc b/lib/source.cc index 3247c8d82c..8901c8f793 100644 --- a/lib/source.cc +++ b/lib/source.cc @@ -26,17 +26,18 @@ Sources::set_path(File_path *f_C) open a file @param file_str the file to be opened, name might be changed if it - is found in a search path. + is found in a search path. UGH! @return 0 if no file found */ Source_file* -Sources::get_file_l(String &file_str ) +Sources::get_file_l(String &file_str ) //UGH { if (path_C_){ - file_str = path_C_->find(file_str); - if (file_str== "") + String file_str_o = path_C_->find(file_str); + if ( ( file_str_o == "" ) && ( file_str != "" ) ) return 0; + file_str = file_str_o; } Source_file * f_p= (!binary_b_) ? new Source_file(file_str) : new Binary_source_file(file_str); diff --git a/lily/head-reg.cc b/lily/head-reg.cc index fd84da6974..a0a5676a74 100644 --- a/lily/head-reg.cc +++ b/lily/head-reg.cc @@ -13,7 +13,6 @@ Notehead_register::Notehead_register() { note_p_ = 0; - set_feature(Features::dir(0)); post_move_processing(); } @@ -27,12 +26,6 @@ Notehead_register::try_request(Request *req_l) return true; } -void -Notehead_register::set_feature(Features d) -{ - if(d.direction_i_ || d.initialiser_b_) - dir_i_ = d.direction_i_; -} void Notehead_register::process_requests() @@ -63,9 +56,6 @@ void Notehead_register::pre_move_processing() { if (note_p_) { - if (dir_i_ && note_p_->rest_b_ ) { - note_p_->position +=4*dir_i_ ; - } typeset_element(note_p_); note_p_ = 0; } diff --git a/lily/include/head-reg.hh b/lily/include/head-reg.hh index 188db10a26..09941a0554 100644 --- a/lily/include/head-reg.hh +++ b/lily/include/head-reg.hh @@ -12,7 +12,6 @@ struct Notehead_register : Request_register { Notehead* note_p_; Rhythmic_req * note_req_l_; - int dir_i_; /* *************** */ Notehead_register(); @@ -20,7 +19,6 @@ struct Notehead_register : Request_register { virtual void process_requests(); virtual void pre_move_processing(); virtual void post_move_processing(); - void set_feature(Features); NAME_MEMBERS(Notehead_register); }; diff --git a/lily/include/paper-def.hh b/lily/include/paper-def.hh index 5086a0ff0c..cb1c5cbea9 100644 --- a/lily/include/paper-def.hh +++ b/lily/include/paper-def.hh @@ -1,5 +1,5 @@ /* - paper-def.hh -- declare + paper-def.hh -- declare Paper_def source file of the LilyPond music typesetter @@ -7,8 +7,8 @@ */ -#ifndef Paper_def_HH -#define Paper_def_HH +#ifndef PAPER_DEF_HH +#define PAPER_DEF_HH #include "proto.hh" #include "real.hh" #include "string.hh" @@ -41,13 +41,27 @@ public: void set(Lookup*); ~Paper_def(); Paper_def(Paper_def const&); + /** + The distance between lines + */ Real interline()const; + /// half the distance between lines Real internote()const; + + /// thickness of the standard line Real rule_thickness()const; + + /// height of the staff Real standard_height()const; + + /// width of a quaver ball Real note_width() const; void print() const; Lookup const * lookup_l(); // TODO naming + + /** convert a duration to an idealspacing + influence using the geometric_ and whole_width parameters. + */ Real duration_to_dist(Moment); }; diff --git a/lily/include/slur-reg.hh b/lily/include/slur-reg.hh index e357c8795e..f53ed992b3 100644 --- a/lily/include/slur-reg.hh +++ b/lily/include/slur-reg.hh @@ -10,23 +10,21 @@ #include "register.hh" -struct Slur_register : Request_register { +class Slur_register :public Request_register { Array requests_arr_; Array new_slur_req_l_arr_; Array slur_l_stack_; Array end_slur_l_arr_; - int dir_i_; - /* *************** */ - ~Slur_register(); - Slur_register(); +protected: + virtual ~Slur_register(); virtual bool try_request(Request*); virtual void process_requests(); virtual void acknowledge_element(Staff_elem_info); virtual void pre_move_processing(); virtual void post_move_processing(); - virtual void set_feature(Features); +public: NAME_MEMBERS(Slur_register); }; diff --git a/lily/include/voice-regs.hh b/lily/include/voice-regs.hh index 8b565f7735..4172a8385e 100644 --- a/lily/include/voice-regs.hh +++ b/lily/include/voice-regs.hh @@ -19,6 +19,7 @@ public: /* *************** */ NAME_MEMBERS(Voice_registers); + virtual bool acceptable_request_b(Request*); virtual void acknowledge_element(Staff_elem_info info); virtual bool try_request(Request*); diff --git a/lily/slur-reg.cc b/lily/slur-reg.cc index 0921ef27f0..9498dd4c7c 100644 --- a/lily/slur-reg.cc +++ b/lily/slur-reg.cc @@ -13,17 +13,6 @@ #include "debug.hh" #include "notehead.hh" -void -Slur_register::set_feature(Features i) -{ - dir_i_ = i.direction_i_; -} - -Slur_register::Slur_register() -{ - set_feature(Features::dir(0)); -} - bool Slur_register::try_request(Request *req_l) { @@ -80,8 +69,6 @@ void Slur_register::pre_move_processing() { for (int i = 0; i < end_slur_l_arr_.size(); i++) { - if (dir_i_) - end_slur_l_arr_[i]->dir_i_ = dir_i_; typeset_element(end_slur_l_arr_[i]); } end_slur_l_arr_.set_size(0); -- 2.39.5