#include <stdio.h>
#include <assert.h>
#include <locale.h>
-#include <stdio.h>
+#include <string.h>
#include "config.h"
#include "string.hh"
#include "main.hh"
#include "file-path.hh"
-#include "file-results.hh"
+#include "input-file-results.hh"
#include "warn.hh"
#include "lily-guile.hh"
#include "paper-def.hh"
follow regular localisation guidelines).
*/
static Long_option_init options_static[] = {
- /* print example usage: lilypond -e "" ? */
- {_i ("EXPR"), "evaluate", 'e',_i ("Scheme options: try -e \"(set-lily-option 'help 0)\" for more help.")},
+ {_i ("EXPR"), "evaluate", 'e',
+ _i ("set options, use -e '(ly-option-usage)' for help")},
/* another bug in option parser: --output=foe is taken as an abbreviation
for --output-format */
- {_i ("EXT"), "format", 'f', _i ("use output format EXT")},
+ {_i ("EXT"), "format", 'f', _i ("use output format EXT")},
{0, "help", 'h', _i ("this help")},
{_i ("FIELD"), "header", 'H', _i ("write header field to BASENAME.FIELD")},
{_i ("DIR"), "include", 'I', _i ("add DIR to search path")},
for (char **s = suffixes; *s; s++)
{
String p = prefix_directory[i] + to_string ('/') + String (*s);
- global_path.add (p);
+ global_path.prepend (p);
#if !KPATHSEA
/* Urg: GNU make's $ (word) index starts at 1 */
prepend_load_path (String (prefix_directory[i]) + "/scm");
}
- SCM_RECORD_POSITIONS_P = 1;
if (verbose_global_b)
dirinfo (stderr);
ly_init_guile ();
- printf ("\n");
+ progress_indication ("\n");
call_constructors ();
all_fonts_global = new All_font_metrics (global_path.string ());
int p=0;
const char *arg = oparser_p_static->get_next_arg ();
-
+
+ /* Only exit until after running init_scheme_code, for
+ (ly-option-usage) or
+ -e "(ly-set-option 'help #t)" */
+ if (!arg)
+ {
+ usage ();
+ /* No FILE arguments is now a usage error */
+ exit (2);
+ }
+
do
{
String infile (arg);
exit (0);
}
-
- if (!oparser_p_static->current_arg () )
- {
- usage ();
- /* No FILE arguments is now a usage error */
- exit (2);
- }
-
-#ifdef WINNT
- scm_boot_guile (argc, argv, main_prog, 0);
-#else
scm_boot_guile (argc, argv, (void (*) (void*, int, char**))main_prog, 0);
-#endif
return 0; // unreachable
}
-
-