"Deprecated.")
{
(void) what;
- warning ("ly:set-point-and-click called");
+ warning (_f ("deprecated function called: %s", "ly:set-point-and-click"));
return SCM_UNSPECIFIED;
}
out_file_name.dir_ = "";
if (!output_name_global.is_empty ())
- out_file_name = File_name (output_name_global);
+ {
+ if (is_dir (output_name_global))
+ {
+ char cwd[PATH_MAX];
+ getcwd (cwd, PATH_MAX);
+
+ if (output_name_global != cwd)
+ {
+ global_path.prepend (cwd);
+ message (_f ("Changing working directory to `%s'",
+ output_name_global.to_str0 ()));
+ chdir (output_name_global.to_str0 ());
+
+ }
+ output_name_global = "";
+ }
+ else
+ out_file_name = File_name (output_name_global);
+ }
String init;
if (!init_name_global.is_empty ())
sources.set_path (&global_path);
String mapped_fn = map_file_name (file_name);
- progress_indication (_f ("Processing `%s'", mapped_fn.to_str0 ()));
+ message (_f ("Processing `%s'", mapped_fn.to_str0 ()));
progress_indication ("\n");
Lily_parser *parser = new Lily_parser (&sources);
SCM_ASSERT_TYPE (parser, parser_smob, SCM_ARG1, __FUNCTION__, "parser");
SCM_ASSERT_TYPE (score, score_smob, SCM_ARG2, __FUNCTION__, "score");
- SCM header = ly_c_module_p (score->header_) ? score->header_
+ SCM header = ly_c_module_p (score->header_)
+ ? score->header_
: parser->lexer_->lookup_identifier ("$globalheader");
File_name outname (parser->output_basename_);
if (score->defs_.is_empty ())
{
Output_def *layout = get_layout (parser);
- default_rendering (score->get_music (), layout->self_scm (),
- get_paper (parser)->self_scm (),
+ default_rendering (score->get_music (),
+ layout->self_scm (),
+ paper,
header, os, key->self_scm ());
+
scm_gc_unprotect_object (layout->self_scm ());
}
+ scm_gc_unprotect_object (paper);
scm_gc_unprotect_object (key->self_scm ());
return SCM_UNSPECIFIED;
}