#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")},
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);
{
String combine = String (key) + "=" + String (value);
char * s = strdup(combine.to_str0 ());
- // return putenv (s);
+ return putenv (s);
}
return -1;
}
{
setup_paths ();
- /* Prepare GUILE for heavy memory usage. If you have plenty memory,
- this may speed up GUILE a bit. If you're short on memory, these
- settings
+ /*
- export GUILE_INIT_SEGMENT_SIZE_1=36000
- export GUILE_MAX_SEGMENT_SIZE=576000
+ These settings hopefully prepare lily for a lot of memory usage.
- may considerably decrease memory footprint (~*0.85), with a small
- execution time penalty (~*1.10). However, if this 15% gain in memory
- usage prevents swapping, the execution time falls drastically. */
-
+ In practice the effect on GC times is barely measurable -- larger
+ segments cost slighly less time for the conservative marking. (but
+ not impressively much)
+
+ */
sane_putenv ("GUILE_INIT_SEGMENT_SIZE_1", "4194304", false);
sane_putenv ("GUILE_MAX_SEGMENT_SIZE", "8388608", false);
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
}
-
-