From: fred Date: Sun, 24 Mar 2002 19:58:26 +0000 (+0000) Subject: lilypond-0.1.16 X-Git-Tag: release/1.5.59~3846 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a522200855944284d610544618d8030101e6a256;p=lilypond.git lilypond-0.1.16 --- diff --git a/flower/dstream.cc b/flower/dstream.cc index 16d83d6890..533cd13a7c 100644 --- a/flower/dstream.cc +++ b/flower/dstream.cc @@ -105,7 +105,7 @@ Dstream::output (String s) if (local_silence_b_|| !os_l_) return ; - for (char const *cp = s ; *cp; cp++) + for (char const *cp = s.ch_C (); *cp; cp++) switch (*cp) { case '{': diff --git a/flower/text-stream.cc b/flower/text-stream.cc index 530c6f8ecd..f9a8307226 100644 --- a/flower/text-stream.cc +++ b/flower/text-stream.cc @@ -12,7 +12,7 @@ Text_stream::Text_stream (String fn) else { name = fn; - f = fopen (fn, "r"); + f = fopen (fn.ch_C (), "r"); } if (!f) diff --git a/lib/includable-lexer.cc b/lib/includable-lexer.cc index 05d9d9aa42..fbb5c920d2 100644 --- a/lib/includable-lexer.cc +++ b/lib/includable-lexer.cc @@ -26,7 +26,8 @@ Includable_lexer::new_input(String s, Sources * global_sources) Source_file * sl = global_sources->get_file_l(s); if (!sl) { - LexerError("Can't find file `" + s+ "'"); + String msg ="Can't find file `" + s+ "'"; + LexerError(msg.ch_C ()); return; } diff --git a/lib/mapped-file-storage.cc b/lib/mapped-file-storage.cc index 2267164ae7..d260569570 100644 --- a/lib/mapped-file-storage.cc +++ b/lib/mapped-file-storage.cc @@ -53,7 +53,7 @@ Mapped_file_storage::map() void Mapped_file_storage::open(String name_str) { - fildes_i_ = ::open(name_str, O_RDONLY); + fildes_i_ = ::open(name_str.ch_C (), O_RDONLY); if (fildes_i_ == -1) { diff --git a/lib/simple-file-storage.cc b/lib/simple-file-storage.cc index b618e11634..3ef231a3e4 100644 --- a/lib/simple-file-storage.cc +++ b/lib/simple-file-storage.cc @@ -34,7 +34,7 @@ Simple_file_storage::Simple_file_storage(String s) let's hope that "b" opens anything binary, and does not apply CR/LF translation */ - FILE * f = (s) ? fopen (s.ch_C(), "rb") : stdin; + FILE * f = (s.length_i ()) ? fopen (s.ch_C(), "rb") : stdin; if (!f) { diff --git a/lily/include/line-spacer.hh b/lily/include/line-spacer.hh index 053e59a902..d91901bdfe 100644 --- a/lily/include/line-spacer.hh +++ b/lily/include/line-spacer.hh @@ -25,47 +25,48 @@ class Line_spacer { public: - Paper_def * paper_l_; - Paper_def *paper_l() const; - Line_spacer(); + Paper_def * paper_l_; + Paper_def *paper_l() const; + Line_spacer(); - /** solve the spacing problem - */ - virtual void solve (Col_hpositions *) const=0; + /** solve the spacing problem + */ + virtual void solve (Col_hpositions *) const=0; - /** - Approximate the spacing problem: - return a lower bound on the energy - */ - virtual void lower_bound_solution (Col_hpositions *) const=0; + /** + Approximate the spacing problem: + return a lower bound on the energy + */ + virtual void lower_bound_solution (Col_hpositions *) const=0; - /** add a col to the problem. columns have to be added left to - right. The column contains info on it's minimum width. */ - virtual void add_column (Paper_column *, bool fixed=false, Real fixpos=0.0)=0; + /** add a col to the problem. columns have to be added left to + right. The column contains info on it's minimum width. */ + virtual void add_column (Paper_column *, bool fixed=false, Real fixpos=0.0)=0; - /** - can the posed problem be solved? + /** + can the posed problem be solved? - @pre + @pre - prepare() was called + prepare() was called - */ - virtual bool check_constraints (Vector v) const=0; + */ + virtual bool check_constraints (Vector v) const=0; - /** - generate a solution which can't fail - */ - virtual Vector default_solution() const=0; + /** + generate a solution which can't fail + */ + virtual Vector default_solution() const=0; - virtual void OK() const{} - virtual void print() const{} + virtual void OK() const{} + virtual void print() const{} - /** - Call after construction before solving - */ - virtual void prepare(){} + /** + Call after construction before solving + */ + virtual void prepare(){} + virtual ~Line_spacer (); }; #endif diff --git a/lily/item.cc b/lily/item.cc index 40df46783f..21c96bc273 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -145,6 +145,8 @@ Item::do_junk_links() void Item::do_unlink() { + Link_array attached = attached_span_l_arr_; + for (int i=0; i < attached_span_l_arr_.size (); i++) { Spanner *&s= attached_span_l_arr_[i]; if (s->spanned_drul_[LEFT] == this) diff --git a/lily/line-spacer.cc b/lily/line-spacer.cc index c59589481a..6f9c317fd9 100644 --- a/lily/line-spacer.cc +++ b/lily/line-spacer.cc @@ -18,3 +18,7 @@ Line_spacer::paper_l() const { return paper_l_ ; } + +Line_spacer::~Line_spacer () +{ +} diff --git a/lily/midi-stream.cc b/lily/midi-stream.cc index 874f367a42..05d9421388 100644 --- a/lily/midi-stream.cc +++ b/lily/midi-stream.cc @@ -62,7 +62,7 @@ Midi_stream::operator <<(int i) void Midi_stream::open() { - os_p_ = new ofstream (filename_str_); + os_p_ = new ofstream (filename_str_.ch_C ()); if (!*os_p_) error ("can't open `" + filename_str_ + "\'"); } diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 9c1f2c733e..9c79248914 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -135,7 +135,7 @@ Music_iterator::static_get_iterator_p (Music *m, else if (m->is_type_b (Change_translator::static_name ())) p = new Change_iterator((Change_translator*) m); - if (m -> translator_type_str_) + if (m -> translator_type_str_.length_i ()) { Translator_group* a =report_l-> find_create_translator_l (m-> translator_type_str_, m->translator_id_str_); diff --git a/lily/music.cc b/lily/music.cc index 053275cc1f..93a3f093b0 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -24,7 +24,7 @@ Music::print() const if (! check_debug) return ; DOUT << name() << "{"; - if (translator_type_str_) + if (translator_type_str_.length_i ()) DOUT << translator_type_str_ << " = " << translator_id_str_; do_print(); DOUT << "}\n"; diff --git a/lily/musical-request.cc b/lily/musical-request.cc index 5b69a4f581..4c6ce789de 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -451,7 +451,7 @@ String Absolute_dynamic_req::loudness_str () const { String s = loudness_static_str (loudness_); - if (!s) + if (s.empty_b ()) { s = "mf"; warning (String ("Never heard of dynamic scale ") diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 13a479956c..4c7f72e598 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -79,7 +79,7 @@ My_lily_lexer::My_lily_lexer() int My_lily_lexer::lookup_keyword (String s) { - return keytable_p_->lookup (s); + return keytable_p_->lookup (s.ch_C ()); } Identifier* diff --git a/lily/outputter.cc b/lily/outputter.cc index a533ea8e48..81ef2c793e 100644 --- a/lily/outputter.cc +++ b/lily/outputter.cc @@ -23,7 +23,7 @@ void Tex_outputter::output_molecule (Molecule const*m, Offset o) { String t = m->TeX_string(); - if (!t) + if (t.empty_b ()) return ; String s ("\\placebox{%}{%}{%}"); diff --git a/lily/p-score.cc b/lily/p-score.cc index 0591e5cc1e..39de484d98 100644 --- a/lily/p-score.cc +++ b/lily/p-score.cc @@ -190,7 +190,7 @@ Paper_score::tex_output () { // output String outname = paper_l_->outfile_str_ ; - if (!outname) + if (outname.empty_b ()) outname = default_out_str_+ ".tex"; *mlog << "TeX output to " << outname << " ...\n"; diff --git a/lily/performance.cc b/lily/performance.cc index 439e6c7190..ed74df07b4 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -114,7 +114,7 @@ Performance::process() print (); String out=midi_l_->outfile_str_; - if (!out) + if (out.empty_b ()) out = default_out_str_ + ".midi"; Midi_stream midi_stream (out); diff --git a/lily/property-iterator.cc b/lily/property-iterator.cc index 7fbab5fe9d..2a191dead8 100644 --- a/lily/property-iterator.cc +++ b/lily/property-iterator.cc @@ -18,7 +18,7 @@ Property_iterator::Property_iterator (Translation_property *prop_l) void Property_iterator::process_and_next (Moment m) { - if (property_l_->var_str_) + if (property_l_->var_str_.length_i ()) report_to_l ()->set_property (property_l_->var_str_, property_l_->value_); Music_iterator::process_and_next (m); } diff --git a/lily/scoreline.cc b/lily/scoreline.cc index f65690cafb..9a6438a5ed 100644 --- a/lily/scoreline.cc +++ b/lily/scoreline.cc @@ -126,6 +126,7 @@ Line_of_score::get_extra_dependencies () const void Line_of_score::do_unlink () { + Spanner::do_unlink (); for (int i=0; i < cols.size (); i++) cols[i]->line_l_ =0; cols.set_size (0); diff --git a/lily/span-bar.cc b/lily/span-bar.cc index d4bd26f0a9..6076dd7d86 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -68,9 +68,9 @@ Span_bar::do_pre_processing() } else { - if (!type_str_) + if (type_str_.empty_b ()) type_str_ = spanning_l_arr_[0]->type_str_; - if (!type_str_) + if (type_str_.empty_b ()) { transparent_b_=true; set_empty (true); diff --git a/lily/spanner.cc b/lily/spanner.cc index 3685865b8f..1dafeadf86 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -78,7 +78,6 @@ Spanner::set_my_columns() void Spanner::set_bounds(Direction d, Item*i) { - if (spanned_drul_[d]) spanned_drul_[d]->attached_span_l_arr_.substitute(this,0); @@ -164,16 +163,8 @@ Spanner::broken_b() const void Spanner::do_unlink() { - if (spanned_drul_[LEFT]) - { - spanned_drul_[LEFT]->attached_span_l_arr_.substitute (this,0); - spanned_drul_[LEFT] =0; - } - if (spanned_drul_[RIGHT]) - { - spanned_drul_[RIGHT]->attached_span_l_arr_.substitute (this,0); - spanned_drul_[RIGHT] = 0; - } + set_bounds (LEFT, 0); + set_bounds (RIGHT, 0); } void diff --git a/lily/tex-stream.cc b/lily/tex-stream.cc index a9d826c3c7..eed823e575 100644 --- a/lily/tex-stream.cc +++ b/lily/tex-stream.cc @@ -24,7 +24,7 @@ const int MAXLINELEN = 200; Tex_stream::Tex_stream (String filename) { - os = new ofstream (filename); + os = new ofstream (filename.ch_C ()); if (!*os) error ("can't open `" + filename+"\'"); nest_level = 0; @@ -51,7 +51,7 @@ Tex_stream & Tex_stream::operator<<(String s) { - for (char const *cp = s; *cp; cp++) + for (char const *cp = s.ch_C (); *cp; cp++) { if (outputting_comment) { diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index c282d0c608..8bb57faf35 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -73,7 +73,7 @@ Timing_translator::do_process_requests() { Moment m = tr_l->partial()->duration_; String error = time_.try_set_partial_str (m); - if (error) + if (error.length_i ()) { tr_l->warning (error); } diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 29bd652ded..1521ede70d 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -66,7 +66,7 @@ Translator_group::removable_b() const Translator_group * Translator_group::find_existing_translator_l (String n, String id) { - if (is_alias_b (n) && (id_str_ == id || !id)) + if (is_alias_b (n) && (id_str_ == id || id.empty_b ())) return this; Translator_group* r = 0; for (int i =0; !r && i < group_l_arr ().size(); i++) @@ -290,7 +290,7 @@ Translator_group::do_print() const } else { - if (id_str_) + if (id_str_.length_i ()) DOUT << "ID: " << id_str_ ; DOUT << " iterators: " << iterator_count_<< "\n"; } diff --git a/tex/taupindefs.tex b/tex/taupindefs.tex index 0469356a63..769d2a4880 100644 --- a/tex/taupindefs.tex +++ b/tex/taupindefs.tex @@ -14,7 +14,7 @@ \font\italicfont=cmti10 \font\dynfont=dyn10 scaled \magstep2 \font\musicmathfont=cmsy10 - \font\fontentja=font-en-tja20 + \font\fontentja=font-en-tja20 } @@ -33,7 +33,7 @@ \font\dynfont=dyn10 scaled \magstep1 \font\musicdraw=musixsps \font\musicmathfont=cmsy8 - \font\fontentja=font-en-tja16 + \font\fontentja=font-en-tja16 } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % provide interface to musixtex fonts @@ -52,9 +52,8 @@ \musicdef\longaball{'047} \musicdef\halfrest{'074} \musicdef\wholerest{'075} - \musicdef\breverest{'072} -\musicdef\breverest{'073} %% <- Mats, is this cool? +\musicdef\longarest{'073} %% hmm \musicdef\outsidehalfrest{10}