LEFT | RIGHT |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2001--2019 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2001--2019 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 { | 145 { |
146 SCM sym = scm_caar (s); | 146 SCM sym = scm_caar (s); |
147 SCM val = scm_cdar (s); | 147 SCM val = scm_cdar (s); |
148 string opt_spec = string (INDENT, ' ') | 148 string opt_spec = string (INDENT, ' ') |
149 + ly_symbol2string (sym) | 149 + ly_symbol2string (sym) |
150 + " (" | 150 + " (" |
151 + ly_scm2string (Lily::scm_to_string (val)) | 151 + ly_scm2string (Lily::scm_to_string (val)) |
152 + ")"; | 152 + ")"; |
153 | 153 |
154 if (opt_spec.length () + SEPARATION > HELP_INDENT) | 154 if (opt_spec.length () + SEPARATION > HELP_INDENT) |
155 { | 155 opt_spec += '\n' + string (HELP_INDENT, ' '); |
156 opt_spec += '\n'; | |
157 opt_spec += string (HELP_INDENT, ' '); | |
158 } | |
159 else | 156 else |
160 opt_spec += string (HELP_INDENT - opt_spec.length (), ' '); | 157 opt_spec += string (HELP_INDENT - opt_spec.length (), ' '); |
161 | 158 |
162 SCM opt_help_scm | 159 SCM opt_help_scm |
163 = scm_object_property (sym, | 160 = scm_object_property (sym, |
164 ly_symbol2scm ("program-option-documentation")); | 161 ly_symbol2scm ("program-option-documentation")); |
165 string opt_help = ly_scm2string (opt_help_scm); | 162 string opt_help = ly_scm2string (opt_help_scm); |
166 replace_all (&opt_help, | 163 replace_all (&opt_help, |
167 string ("\n"), | 164 string ("\n"), |
168 string ("\n") + string (HELP_INDENT, ' ')); | 165 string ("\n") + string (HELP_INDENT, ' ')); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 { | 249 { |
253 return ly_hash2alist (option_hash); | 250 return ly_hash2alist (option_hash); |
254 } | 251 } |
255 | 252 |
256 LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var), | 253 LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var), |
257 "Get a global option setting.") | 254 "Get a global option setting.") |
258 { | 255 { |
259 LY_ASSERT_TYPE (ly_is_symbol, var, 1); | 256 LY_ASSERT_TYPE (ly_is_symbol, var, 1); |
260 return scm_hashq_ref (option_hash, var, SCM_BOOL_F); | 257 return scm_hashq_ref (option_hash, var, SCM_BOOL_F); |
261 } | 258 } |
LEFT | RIGHT |