From db202a305fb517db6e3104707ccd0ada356f0077 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 4 Feb 2007 23:44:01 +0100 Subject: [PATCH] use -d options for --preview and --no-pages. --- Documentation/topdocs/NEWS.tely | 8 +++----- Documentation/user/running.itely | 14 ++++++++------ lily/include/main.hh | 3 --- lily/main.cc | 22 +--------------------- lily/paper-book.cc | 5 +++-- scm/lily.scm | 2 ++ 6 files changed, 17 insertions(+), 37 deletions(-) diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely index 2387c9250e..23f2fb6745 100644 --- a/Documentation/topdocs/NEWS.tely +++ b/Documentation/topdocs/NEWS.tely @@ -66,11 +66,9 @@ which scares away people. @end ignore @item -The backend is now switched with the @code{-d} option, e.g., -@example -lilypond -dbackend=svg input-file.ly -@end example - +The following options are now changed as a @code{-d} sub-option: +@code{--backend}, @code{--safe}, @code{--preview} and +@code{--no-pages} (which became @code{-dno-print-pages}). @item Improved testing procedure now catch changes in CPU and memory diff --git a/Documentation/user/running.itely b/Documentation/user/running.itely index dbf5e5d53d..dbaf3b9bd8 100644 --- a/Documentation/user/running.itely +++ b/Documentation/user/running.itely @@ -216,6 +216,14 @@ This mode is used by default by lilypond-book. Example: @code{lilypond -dbackend=svg filename.ly} @cindex output format, setting + +@item preview +Generate an output file containing the titles and the first system + +@item print-pages +Generate the full pages, the default. @code{-dno-print-pages} is +useful in combination with @code{-dpreview}. + @end table @@ -256,12 +264,6 @@ Generate pictures of each page, in PNG format. This implies @item --pdf Generate PDF. This implies @code{--ps}. -@item --preview -Generate an output file containing the titles and the first system - -@item --no-pages -Do not generate the full pages. Useful in combination with -@code{--preview}. @item -j,--jail=@var{user},@var{group},@var{jail},@var{dir} diff --git a/lily/include/main.hh b/lily/include/main.hh index bf02837d93..3db38a564f 100644 --- a/lily/include/main.hh +++ b/lily/include/main.hh @@ -46,9 +46,6 @@ extern string init_scheme_variables_global; */ extern string output_format_global; -extern bool make_preview; -extern bool make_print; - /* misc */ extern vector failed_files; extern int exit_status_global; diff --git a/lily/main.cc b/lily/main.cc index fd61dbb8c6..6019678ae8 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -77,20 +77,7 @@ bool be_verbose_global = false; string init_scheme_code_global; string init_scheme_variables_global; -/* Generate preview of first system. */ -bool make_preview = false; - -/* Generate printed output. */ -bool make_print = true; - - -bool relocate_binary = -#if 1 - true; -#else - false -#endif - ; +bool relocate_binary = true; /* @@ -465,10 +452,6 @@ parse_argv (int argc, char **argv) || string (opt->longname_str0_) == "ps" || string (opt->longname_str0_) == "tex") add_output_format (opt->longname_str0_); - else if (string (opt->longname_str0_) == "preview") - make_preview = true; - else if (string (opt->longname_str0_) == "no-pages") - make_print = false; else if (string (opt->longname_str0_) == "relocate") relocate_binary = true; break; @@ -540,9 +523,6 @@ parse_argv (int argc, char **argv) case 'V': be_verbose_global = true; break; - case 'p': - make_preview = true; - break; default: programming_error (to_string ("unhandled short option: %c", opt->shortname_char_)); diff --git a/lily/paper-book.cc b/lily/paper-book.cc index 195e978f65..950ca5c121 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -110,7 +110,8 @@ Paper_book::output (SCM output_channel) string mod_nm = "scm framework-" + get_output_backend_name (); SCM mod = scm_c_resolve_module (mod_nm.c_str ()); - if (make_print) + + if (get_program_option ("print-pages")) { SCM func = scm_c_module_lookup (mod, "output-framework"); @@ -122,7 +123,7 @@ Paper_book::output (SCM output_channel) SCM_UNDEFINED)); } - if (make_preview) + if (get_program_option ("preview")) { SCM func = scm_c_module_lookup (mod, "output-preview-framework"); func = scm_variable_ref (func); diff --git a/scm/lily.scm b/scm/lily.scm index bccfc72d1d..f83d96bec1 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -58,6 +58,8 @@ similar to chord syntax") (point-and-click #t "use point & click") (paper-size "a4" "the default paper size") (pixmap-format "png16m" "GS format to use for pixel images") + (preview #f "make a incipit image. ") + (print-pages #t "print pages normally. ") (protected-scheme-parsing #t "continue when finding errors in inline scheme are caught in the parser. If off, halt on errors, and print a stack trace.") -- 2.39.5