LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
bool profile_property_accesses = false;
/*
crash if internally the wrong type is used for a grob property.
bool profile_property_accesses = false;
/*
crash if internally the wrong type is used for a grob property.
- else if (var == ly_symbol2scm ("profile-property-accesses"))
- {
- profile_property_accesses = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
- else if (var == ly_symbol2scm ("point-and-click"))
+ else if (varstr == "profile-property-accesses")
- lily_1_8_relative = to_boolean (val);
- /* Needs to be reset for each file that uses this option. */
- lily_1_8_compatibility_used = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
+ strict_infinity_checking = valbool;
+ val = val_scm_bool;
- else if (var == ly_symbol2scm ("debug-page-breaking-scoring"))
- {
- debug_page_breaking_scoring = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
- else if (var == ly_symbol2scm ("datadir"))
+ else if (varstr == "datadir")
- + ly_symbol2string (sym)
- + " ("
- + ly_scm2string (scm_call_1 (converter, val))
- + ")";
+ + ly_symbol2string (sym)
+ + " ("
+ + ly_scm2string (Lily::scm_to_string (val))
+ + ")";
- = scm_object_property (sym,
- ly_symbol2scm ("program-option-documentation"));
+ = scm_object_property (sym,
+ ly_symbol2scm ("program-option-documentation"));
-
-LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 0, 0, (),
- "Print @code{ly:set-option} usage.")
+LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 1, 0, (SCM port),
+ "Print @code{ly:set-option} usage. Optional @var{port} argument"
+ "for the destination defaults to current output port.")
LY_DEFINE (ly_add_option, "ly:add-option", 3, 0, 0,
LY_DEFINE (ly_add_option, "ly:add-option", 3, 0, 0,
- (SCM sym, SCM val, SCM description),
- "Add a program option @var{sym}. @var{val} is the default"
- " value and @var{description} is a string description.")
+ (SCM sym, SCM val, SCM description),
+ "Add a program option @var{sym}. @var{val} is the default"
+ " value and @var{description} is a string description.")
LY_ASSERT_TYPE (ly_is_symbol, sym, 1);
LY_ASSERT_TYPE (scm_is_string, description, 3);
internal_set_option (sym, val);
scm_set_object_property_x (sym, ly_symbol2scm ("program-option-documentation"),
LY_ASSERT_TYPE (ly_is_symbol, sym, 1);
LY_ASSERT_TYPE (scm_is_string, description, 3);
internal_set_option (sym, val);
scm_set_object_property_x (sym, ly_symbol2scm ("program-option-documentation"),
LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val),
LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val),
if (varstr.substr (0, 3) == string ("no-"))
{
var = ly_symbol2scm (varstr.substr (3, varstr.length () - 3).c_str ());
if (varstr.substr (0, 3) == string ("no-"))
{
var = ly_symbol2scm (varstr.substr (3, varstr.length () - 3).c_str ());
warning (_f ("no such internal option: %s", varstr.c_str ()));
internal_set_option (var, val);
return SCM_UNSPECIFIED;
}
warning (_f ("no such internal option: %s", varstr.c_str ()));
internal_set_option (var, val);
return SCM_UNSPECIFIED;
}
LY_DEFINE (ly_command_line_options, "ly:command-line-options", 0, 0, 0, (),
LY_DEFINE (ly_command_line_options, "ly:command-line-options", 0, 0, 0, (),
LY_DEFINE (ly_command_line_code, "ly:command-line-code", 0, 0, 0, (),
LY_DEFINE (ly_command_line_code, "ly:command-line-code", 0, 0, 0, (),
-
-LY_DEFINE (ly_command_line_verbose_p, "ly:command-line-verbose?", 0, 0, 0, (),
- "Was @code{be_verbose_global} set?")
+LY_DEFINE (ly_verbose_output_p, "ly:verbose-output?", 0, 0, 0, (),
+ "Was verbose output requested, i.e. loglevel at least @code{DEBUG}?")
LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var),
LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var),
{
LY_ASSERT_TYPE (ly_is_symbol, var, 1);
return scm_hashq_ref (option_hash, var, SCM_BOOL_F);
{
LY_ASSERT_TYPE (ly_is_symbol, var, 1);
return scm_hashq_ref (option_hash, var, SCM_BOOL_F);