]> git.donarmstrong.com Git - lilypond.git/commitdiff
use -d options for --preview and --no-pages.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 4 Feb 2007 22:44:01 +0000 (23:44 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 4 Feb 2007 22:44:01 +0000 (23:44 +0100)
Documentation/topdocs/NEWS.tely
Documentation/user/running.itely
lily/include/main.hh
lily/main.cc
lily/paper-book.cc
scm/lily.scm

index 2387c9250eaf45b0720d871e378d126bf61d966b..23f2fb67455820361283d7aab7ceecda817a54e8 100644 (file)
@@ -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
index dbf5e5d53d475186d6544d9b618d8a2dacef5c20..dbaf3b9bd8eaae40188d69589a9a3bf0ccead634 100644 (file)
@@ -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}
index bf02837d93762aac6f8da4fadb59dc19e95ba625..3db38a564f7d71cfcba52d4c489f807a12e36cd2 100644 (file)
@@ -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<string> failed_files;
 extern int exit_status_global;
index fd61dbb8c6c49be9779c28eeee0dccb0c5dc9aeb..6019678ae8818e7fa54e8a9fda787c257fe82a4c 100644 (file)
@@ -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_));
index 195e978f65a1581e84d1f4913e6d45c104ae76d2..950ca5c12105f9a8434780df62431ef0d503878c 100644 (file)
@@ -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);
index bccfc72d1d6d801f6fdf6f0f3dcfe403ab1f2c3d..f83d96bec152875f3b26c336d287c4986d07c172 100644 (file)
@@ -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.")