From: fred Date: Sun, 24 Mar 2002 20:07:57 +0000 (+0000) Subject: lilypond-0.1.57 X-Git-Tag: release/1.5.59~3311 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5ebeb69b36b77135b97b5e2f60116b58fc6ede37;p=lilypond.git lilypond-0.1.57 --- diff --git a/flower/dstream.cc b/flower/dstream.cc index f22365bf55..28f7a472aa 100644 --- a/flower/dstream.cc +++ b/flower/dstream.cc @@ -58,7 +58,7 @@ Dstream::identify_as (String name) idx = cl; else { - (*silent_assoc_p_)[idx] = false; + (*silent_assoc_p_)[idx] = default_silence_b_; } local_silence_b_ = (*silent_assoc_p_)[idx]; if (current_classname_str_ != idx && !local_silence_b_) @@ -138,6 +138,7 @@ Dstream::Dstream (ostream *r, char const * cfg_nm) { os_l_ = r; silent_assoc_p_ = new Assoc; + default_silence_b_ = false; indent_level_i_ = 0; if (!os_l_) return; @@ -160,6 +161,8 @@ Dstream::Dstream (ostream *r, char const * cfg_nm) (*silent_assoc_p_)[r[0]] = (bool)(int)(Scalar (r[1])); } + if ((*silent_assoc_p_).elt_b ("Dstream_default_silence")) + default_silence_b_ = (*silent_assoc_p_)["Dstream_default_silence"]; } diff --git a/flower/include/dstream.hh b/flower/include/dstream.hh index 752b78bca4..d9f896e434 100644 --- a/flower/include/dstream.hh +++ b/flower/include/dstream.hh @@ -34,31 +34,32 @@ struct Assoc; */ class Dstream { - ostream *os_l_; - int indent_level_i_; - bool local_silence_b_; - String current_classname_str_; - void output (String s); - Assoc *silent_assoc_p_; + ostream *os_l_; + int indent_level_i_; + bool local_silence_b_; + bool default_silence_b_; + String current_classname_str_; + void output (String s); + Assoc *silent_assoc_p_; public: - void clear_silence(); - bool silent_b (String) const; + void clear_silence(); + bool silent_b (String) const; - /** - if rcfile == 0, then do not read any rc file. - */ - Dstream (ostream *r, char const * rcfile); - virtual ~Dstream(); - Dstream &identify_as (String s); + /** + if rcfile == 0, then do not read any rc file. + */ + Dstream (ostream *r, char const * rcfile); + virtual ~Dstream(); + Dstream &identify_as (String s); -/** Output a string via the Dstream. This is the only output - interface. It delegates all conversion to String class. */ - Dstream &operator << (String s); - /** - Output memory locations. - */ - Dstream &operator << (void const *); - Dstream &operator << (char const *); + /** Output a string via the Dstream. This is the only output + interface. It delegates all conversion to String class. */ + Dstream &operator << (String s); + /** + Output memory locations. + */ + Dstream &operator << (void const *); + Dstream &operator << (char const *); }; #endif