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 '{':
else
{
name = fn;
- f = fopen (fn, "r");
+ f = fopen (fn.ch_C (), "r");
}
if (!f)
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;
}
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)
{
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)
{
{
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
void
Item::do_unlink()
{
+ Link_array<Spanner> 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)
{
return paper_l_ ;
}
+
+Line_spacer::~Line_spacer ()
+{
+}
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_ + "\'");
}
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_);
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";
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 ")
int
My_lily_lexer::lookup_keyword (String s)
{
- return keytable_p_->lookup (s);
+ return keytable_p_->lookup (s.ch_C ());
}
Identifier*
Tex_outputter::output_molecule (Molecule const*m, Offset o)
{
String t = m->TeX_string();
- if (!t)
+ if (t.empty_b ())
return ;
String s ("\\placebox{%}{%}{%}");
{
// output
String outname = paper_l_->outfile_str_ ;
- if (!outname)
+ if (outname.empty_b ())
outname = default_out_str_+ ".tex";
*mlog << "TeX output to " << outname << " ...\n";
print ();
String out=midi_l_->outfile_str_;
- if (!out)
+ if (out.empty_b ())
out = default_out_str_ + ".midi";
Midi_stream midi_stream (out);
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);
}
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);
}
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);
void
Spanner::set_bounds(Direction d, Item*i)
{
-
if (spanned_drul_[d])
spanned_drul_[d]->attached_span_l_arr_.substitute(this,0);
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
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;
Tex_stream::operator<<(String s)
{
- for (char const *cp = s; *cp; cp++)
+ for (char const *cp = s.ch_C (); *cp; cp++)
{
if (outputting_comment)
{
{
Moment m = tr_l->partial()->duration_;
String error = time_.try_set_partial_str (m);
- if (error)
+ if (error.length_i ())
{
tr_l->warning (error);
}
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++)
}
else
{
- if (id_str_)
+ if (id_str_.length_i ())
DOUT << "ID: " << id_str_ ;
DOUT << " iterators: " << iterator_count_<< "\n";
}
\font\italicfont=cmti10
\font\dynfont=dyn10 scaled \magstep2
\font\musicmathfont=cmsy10
- \font\fontentja=font-en-tja20
+ \font\fontentja=font-en-tja20
}
\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
\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}