Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+#include "lily-guile.hh"
+
#include <cstdio>
#include <cstdlib>
#include <cstring> /* strdup, strchr */
#include <cctype>
-#include <libintl.h> // gettext on macos x
#include "config.hh"
-#include "version.hh"
-#include "lily-guile.hh"
+
+#include "dimensions.hh"
+#include "direction.hh"
+#include "file-path.hh"
+#include "international.hh"
#include "libc-extension.hh"
#include "main.hh"
-#include "file-path.hh"
-#include "warn.hh"
-#include "direction.hh"
+#include "misc.hh"
#include "offset.hh"
#include "pitch.hh"
-#include "dimensions.hh"
#include "source-file.hh"
-#include "misc.hh"
+#include "version.hh"
+#include "warn.hh"
// #define TEST_GC
#if KPATHSEA
if (is_TeX_format_global)
- {
- initialize_kpathsea ();
- }
+ initialize_kpathsea ();
#endif
scm_primitive_load_path (scm_makfrom0str ("lily.scm"));
return src;
}
-SCM
-ly_chain_assoc_get (SCM key, SCM achain, SCM dfault)
-{
- if (scm_is_pair (achain))
- {
- SCM handle = scm_assoc (key, scm_car (achain));
- if (scm_is_pair (handle))
- return scm_cdr (handle);
- else
- return ly_chain_assoc (key, scm_cdr (achain));
- }
- else
- return dfault;
-}
-SCM
-ly_chain_assoc (SCM key, SCM achain)
-{
- if (scm_is_pair (achain))
- {
- SCM handle = scm_assoc (key, scm_car (achain));
- if (scm_is_pair (handle))
- return handle;
- else
- return ly_chain_assoc (key, scm_cdr (achain));
- }
- else
- return SCM_BOOL_F;
-}
/* looks the key up in the cdrs of the alist-keys
- ignoring the car and ignoring non-pair keys.
if (type != SCM_EOL && !ly_c_procedure_p (type))
{
- warning (_f ("Can't find property type-check for `%s' (%s).",
+ warning (_f ("can't find property type-check for `%s' (%s).",
ly_symbol2string (sym).to_str0 (),
ly_symbol2string (type_symbol).to_str0 ())
- + " " + _ ("Perhaps you made a typing error?"));
+ + " " + _ ("perhaps a typing error?"));
/* Be strict when being anal :) */
if (do_internal_type_checking_global)
abort ();
- warning (_ ("Doing assignment anyway."));
+ warning (_ ("doing assignment anyway"));
}
else
{
&& ly_c_procedure_p (type)
&& scm_call_1 (type, val) == SCM_BOOL_F)
{
- SCM errport = scm_current_error_port ();
ok = false;
SCM typefunc = ly_lily_module_constant ("type-name");
SCM type_name = scm_call_1 (typefunc, type);
- scm_puts (_f ("Type check for `%s' failed; value `%s' must be of type `%s'",
- ly_symbol2string (sym).to_str0 (),
- print_scm_val (val),
- ly_scm2string (type_name).to_str0 ()).to_str0 (),
- errport);
- scm_puts ("\n", errport);
+ message (_f ("type check for `%s' failed; value `%s' must be of type `%s'",
+ ly_symbol2string (sym).to_str0 (),
+ print_scm_val (val),
+ ly_scm2string (type_name).to_str0 ()));
+ progress_indication ("\n");
}
}
return ok;