* lily/parser.yy (bass_figure): set_spot() for bass figures. This
fixes weird line numbers for point & click.
* lily/source-file.cc (get_counts): init line/column/char counts.
+2005-12-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * GNUmakefile.in: add dir argument for find command.
+
+ * lily/parser.yy (bass_figure): set_spot() for bass figures. This
+ fixes weird line numbers for point & click.
+
+ * lily/source-file.cc (get_counts): init line/column/char counts.
+
+2005-12-16 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/main.cc: remove ARGV0_RELOCATION, instead use --relocate.
+
2005-12-16 Graham Percival <gpermus@gmail.com>
* Documentation/user/basic-notation.itely, advanced-notation.itely:
2005-12-16 Graham Percival <gpermus@gmail.com>
* Documentation/user/basic-notation.itely, advanced-notation.itely:
cat $(outdir)/weblist | (cd $(top-build-dir); tar -cf- -T- ) | \
tar -C $(outdir)/web-root/ -xf -
cd $(outdir)/web-root/ && \
cat $(outdir)/weblist | (cd $(top-build-dir); tar -cf- -T- ) | \
tar -C $(outdir)/web-root/ -xf -
cd $(outdir)/web-root/ && \
- for a in `find -name out-www`; do \
+ for a in `find . -name out-www`; do \
mv $$a/* $$a/.. ; \
rmdir $$a ; \
done
mv $$a/* $$a/.. ; \
rmdir $$a ; \
done
/* Generate printed output. */
bool make_print = true;
/* Generate printed output. */
bool make_print = true;
+
+bool relocate_binary =
+#ifdef __MINGW32__
+ false
+#else
+ true;
+#endif
+ ;
+
+
/*
* Miscellaneous global stuff.
*/
/*
* Miscellaneous global stuff.
*/
for --output-format. */
{_i ("FORMATs"), "formats", 'f', _i ("dump FORMAT,... Also as separate options:")},
{0, "dvi", 0, _i ("generate DVI (tex backend only)")},
for --output-format. */
{_i ("FORMATs"), "formats", 'f', _i ("dump FORMAT,... Also as separate options:")},
{0, "dvi", 0, _i ("generate DVI (tex backend only)")},
+ {0, "relocate", 0, _i("relocate using path to binary")},
{0, "pdf", 0, _i ("generate PDF (default)")},
{0, "png", 0, _i ("generate PNG")},
{0, "ps", 0, _i ("generate PostScript")},
{0, "pdf", 0, _i ("generate PDF (default)")},
{0, "png", 0, _i ("generate PNG")},
{0, "ps", 0, _i ("generate PostScript")},
fprintf (out, "\nEffective prefix: \"%s\"\n", prefix_directory.to_str0 ());
fprintf (out, "\nEffective prefix: \"%s\"\n", prefix_directory.to_str0 ());
-#if ARGV0_RELOCATION
- env_var_info (out, "FONTCONFIG_FILE");
- env_var_info (out, "FONTCONFIG_PATH");
- env_var_info (out, "GS_FONTPATH");
- env_var_info (out, "GS_LIB");
- env_var_info (out, "GUILE_LOAD_PATH");
- env_var_info (out, "PANGO_RC_FILE");
- env_var_info (out, "PATH");
-#endif
+ if (relocate_binary)
+ {
+ env_var_info (out, "FONTCONFIG_FILE");
+ env_var_info (out, "FONTCONFIG_PATH");
+ env_var_info (out, "GS_FONTPATH");
+ env_var_info (out, "GS_LIB");
+ env_var_info (out, "GUILE_LOAD_PATH");
+ env_var_info (out, "PANGO_RC_FILE");
+ env_var_info (out, "PATH");
+ }
{
prefix_directory = LILYPOND_DATADIR;
{
prefix_directory = LILYPOND_DATADIR;
-#if ARGV0_RELOCATION
-
- if (getenv ("LILYPOND_VERBOSE"))
- be_verbose_global = true;
+ if (relocate_binary)
+ {
+ if (getenv ("LILYPOND_VERBOSE"))
+ be_verbose_global = true;
- /* Find absolute ARGV0 name, using PATH. */
- File_path path;
- path.parse_path (getenv ("PATH"));
+ /* Find absolute ARGV0 name, using PATH. */
+ File_path path;
+ path.parse_path (getenv ("PATH"));
#if defined (__CYGWIN__) || defined (__MINGW32__)
#if defined (__CYGWIN__) || defined (__MINGW32__)
- String s = argv0;
- s.substitute ('\\', '/');
- argv0 = s.to_str0 ();
+ String s = argv0;
+ s.substitute ('\\', '/');
+ argv0 = s.to_str0 ();
#endif /* __CYGWIN__ || __MINGW32__ */
#ifndef __MINGW32__
#endif /* __CYGWIN__ || __MINGW32__ */
#ifndef __MINGW32__
- String argv0_abs = path.find (argv0);
+ String argv0_abs = path.find (argv0);
- char const *ext[] = {"exe", "", 0 };
- String argv0_abs = path.find (argv0, ext);
+ char const *ext[] = {"exe", "", 0 };
+ String argv0_abs = path.find (argv0, ext);
- if (argv0_abs.is_empty ())
- {
- File_name name (argv0);
- /* If NAME contains slashes and its DIR is not absolute, it can
- only be referenced from CWD. */
- if (name.to_string ().index ('/') >= 0 && name.dir_[0] != '/')
+ if (argv0_abs.is_empty ())
- char cwd[PATH_MAX];
- getcwd (cwd, PATH_MAX);
- argv0_abs = String (cwd) + "/" + argv0;
+ File_name name (argv0);
+ /* If NAME contains slashes and its DIR is not absolute, it can
+ only be referenced from CWD. */
+ if (name.to_string ().index ('/') >= 0 && name.dir_[0] != '/')
+ {
+ char cwd[PATH_MAX];
+ getcwd (cwd, PATH_MAX);
+ argv0_abs = String (cwd) + "/" + argv0;
+ }
+ else
+ programming_error ("can't find absolute argv0");
- else
- programming_error ("can't find absolute argv0");
- }
- String bindir = dir_name (argv0_abs);
- String argv0_prefix = dir_name (bindir);
- if (argv0_prefix != dir_name (dir_name (dir_name (prefix_directory))))
- set_relocation (bindir, argv0_prefix);
-#else
- (void) argv0;
-#endif /* ARGV0_RELOCATION */
+ String bindir = dir_name (argv0_abs);
+ String argv0_prefix = dir_name (bindir);
+ if (argv0_prefix != dir_name (dir_name (dir_name (prefix_directory))))
+ set_relocation (bindir, argv0_prefix);
+ }
+ else
+ (void) argv0;
/* FIXME: use LILYPOND_DATADIR. */
if (char const *env = getenv ("LILYPONDPREFIX"))
/* FIXME: use LILYPOND_DATADIR. */
if (char const *env = getenv ("LILYPONDPREFIX"))
make_preview = true;
else if (String (opt->longname_str0_) == "no-pages")
make_print = false;
make_preview = true;
else if (String (opt->longname_str0_) == "no-pages")
make_print = false;
+ else if (String (opt->longname_str0_) == "relocate")
+ relocate_binary = true;
main (int argc, char **argv)
{
setup_localisation ();
main (int argc, char **argv)
{
setup_localisation ();
- setup_paths (argv[0]);
- setup_guile_env ();
parse_argv (argc, argv);
if (isatty (STDIN_FILENO))
identify (stderr);
parse_argv (argc, argv);
if (isatty (STDIN_FILENO))
identify (stderr);
+ setup_paths (argv[0]);
+ setup_guile_env ();
scm_boot_guile (argc, argv, main_with_guile, 0);
/* Only reachable if GUILE exits. That is an error. */
scm_boot_guile (argc, argv, main_with_guile, 0);
/* Only reachable if GUILE exits. That is an error. */
Music *bfr = MY_MAKE_MUSIC ("BassFigureEvent");
$$ = bfr->self_scm ();
bfr->unprotect ();
Music *bfr = MY_MAKE_MUSIC ("BassFigureEvent");
$$ = bfr->self_scm ();
bfr->unprotect ();
}
| bass_number {
Music *bfr = MY_MAKE_MUSIC ("BassFigureEvent");
}
| bass_number {
Music *bfr = MY_MAKE_MUSIC ("BassFigureEvent");
bfr->set_property ("text", $1);
bfr->unprotect ();
bfr->set_property ("text", $1);
bfr->unprotect ();
}
| bass_figure ']' {
$$ = $1;
}
| bass_figure ']' {
$$ = $1;
int *line_char,
int *column) const
{
int *line_char,
int *column) const
{
+ *line_number = 0;
+ *line_char = 0;
+ *column = 0;
+
if (!contains (pos_str0))
return;
if (!contains (pos_str0))
return;