get_working_directory ()
{
char cwd[PATH_MAX];
- getcwd (cwd, PATH_MAX);
-
- return string (cwd);
+ // getcwd returns NULL upon a failure, contents of cwd would be undefined!
+ return string (getcwd (cwd, PATH_MAX));
}
/* Join components to full file_name. */
"
}
-#(set-paper-size "a6")
-
\layout { ragged-right= ##t }
"
}
-#(set-paper-size "a6")
-
\layout { ragged-right= ##t }
continue;
int n1 = robust_scm2int (scm_car (candidate), -1);
int n2 = robust_scm2int (scm_cdr (candidate), -1);
- if (n1 < 0 || n2 < 0 || n1 >= note_heads.size ())
+ if ((n1 < 0) || (n2 < 0) || (size_t(n1) >= note_heads.size ()))
continue;
note_column_1.push_back (vsize (n1));
note_column_2.push_back (vsize (n2));
else
{
File_name out (output_name);
- if (is_dir (out.dir_part ()))
- {
- dir = out.dir_part ();
- out_file_name = out.file_part ();
- }
+ dir = out.dir_part ();
+ out_file_name = out.file_part ();
}
if (dir != "" && dir != "." && dir != get_working_directory ())
{
global_path.prepend (get_working_directory ());
- message (_f ("Changing working directory to: `%s'",
- dir.c_str ()));
- chdir (dir.c_str ());
+ message (_f ("Changing working directory to: `%s'", dir));
+ // If we can't change to the output dir (not existing, wrong
+ // permissions), exit lilypond
+ if (chdir (dir.c_str ()) != 0)
+ error (_f ("unable to change directory to: `%s'", dir));
}
else
out_file_name = File_name (output_name);
IMPLEMENT_LISTENER (Lyric_combine_music_iterator, check_new_context)
void
-Lyric_combine_music_iterator::check_new_context (SCM sev)
+Lyric_combine_music_iterator::check_new_context (SCM /*sev*/)
{
if (!ok ())
return;
added to it.
*/
-Skyline::Skyline (Skyline const &src, Real horizon_padding, Axis a)
+Skyline::Skyline (Skyline const &src, Real horizon_padding, Axis /*a*/)
{
/*
We extract boxes from the skyline, then build a new skyline from
list<Box> boxes;
// establish a baseline box
+ // FIXME: This has hardcoded logic, assuming a == X_AXIS!
boxes.push_back (Box (Interval (-infinity_f, infinity_f),
Interval (0, 0)));
list<Building>::const_iterator end = src.buildings_.end ();
shiftDurations =
#(define-music-function (parser location dur dots arg)
(integer? integer? ly:music?)
- (_i "Scale @var{arg} up by a factor of @var{2^dur*(2-(1/2)^dots)}.")
+ (_i "Scale @var{arg} up by a factor of 2^@var{dur}*(2-(1/2)^@var{dots}).")
(music-map
(lambda (x)
#(define-music-function (parser location key-symbol tuning shape-definition)
(symbol? pair? string-or-pair?)
(_i "Add chord shape @var{shape-definition} to the @var{chord-shape-table}
-hash with the key @var{(cons key-symbol tuning)}.")
+hash with the key @code{(cons @var{key-symbol} @var{tuning})}.")
(hash-set! chord-shape-table
(cons key-symbol tuning)
shape-definition)
return extract_sections (filepath)[1]
if not (include_name in known_missing_files):
# Not found
- print 'No such file: ' + include_name
- print 'Search path: ' + ':'.join (include_path)
+ print 'Warning: No such file: ' + include_name + \
+ ' (search path: ' + ':'.join (include_path)+')'
return ''
lang_re = re.compile (r'^@documentlanguage (.+)', re.M)