2002-08-18 Jan Nieuwenhuizen <janneke@gnu.org>
+ * lily/score-engraver.cc: Uniformise error message.
+
+ * lily/grob-property.cc (internal_set_grob_property,
+ internal_get_grob_property): [!NDEBUG] Remove, use abort instead
+ of assert; we always want this functionality. Uniformise warning
+ message.
+
* lily/main.cc (main, main_prog): Bugfix: move exit-upon-files
back, until after evaluating init_scheme_code.
void
Grob::internal_set_grob_property (SCM s, SCM v)
{
- /*
- Perhaps we simply do the assq_set, but what the heck.
- */
- if (!live())
- return ;
+ /* Perhaps we simply do the assq_set, but what the heck. */
+ if (!live ())
+ return;
-#ifndef NDEBUG
if (internal_type_checking_global_b)
{
- assert (type_check_assignment (s, v, ly_symbol2scm ("backend-type?")));
- check_interfaces_for_property(this, s);
+ if (type_check_assignment (s, v, ly_symbol2scm ("backend-type?")))
+ abort ();
+ check_interfaces_for_property (this, s);
}
-#endif
mutable_property_alist_ = scm_assq_set_x (mutable_property_alist_, s, v);
}
s = scm_sloppy_assq (sym, immutable_property_alist_);
-#ifndef NDEBUG
if (internal_type_checking_global_b && gh_pair_p (s))
{
- assert (type_check_assignment (sym, gh_cdr (s), ly_symbol2scm ("backend-type?")));
- check_interfaces_for_property(this, sym);
+ if (!type_check_assignment (sym, gh_cdr (s),
+ ly_symbol2scm ("backend-type?")))
+ abort ();
+ check_interfaces_for_property (this, sym);
}
-#endif
return (s == SCM_BOOL_F) ? SCM_EOL : ly_cdr (s);
}
if (type != SCM_EOL && !gh_procedure_p (type))
{
- warning (_f ("Can't find property type-check for `%s' (%s). Perhaps you made a typing error? Doing assignment anyway.",
+ warning (_f ("Can't find property type-check for `%s' (%s).",
ly_symbol2string (sym).to_str0 (),
- ly_symbol2string (type_symbol).to_str0 ()
+ ly_symbol2string (type_symbol).to_str0 ())
+ + " " + _ ("Perhaps you made a typing error?"));
- ));
-
- /*
- Be strict when being anal :)
- */
+ /* Be strict when being anal :) */
if (internal_type_checking_global_b)
- abort();
+ abort ();
+
+ warning (_ ("Doing assignment anyway."));
}
else
{
void
Score_engraver::initialize ()
{
- Font_metric *fm =
- all_fonts_global->find_afm("feta20");
+ Font_metric *fm = all_fonts_global->find_afm("feta20");
if (!fm)
- error (_("Could not find feta20.afm. Fonts have not been installed properly; Aborting"));
+ error (_f ("can't find `%s'", "feta20.afm")
+ + "\n" +_ ("Fonts have not been installed properly. Aborting"));
unsmob_translator_def (definition_)->apply_property_operations (this);