From: Jan Nieuwenhuizen Date: Wed, 3 Nov 2004 22:45:23 +0000 (+0000) Subject: * lily/lily-parser.cc (LY_DEFINE): Remove "Now " from message. X-Git-Tag: release/2.4.2~3^2~20 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=87c76f9661ab6c7c24be704336fd207597ce5b3d;p=lilypond.git * lily/lily-parser.cc (LY_DEFINE): Remove "Now " from message. * lily/main.cc (main): Invoke identify. * scm/lily.scm (postscript->pdf): Remove progress newline. Write progress to stderr. * lily/paper-book.cc (output): Remove progress newline. * scm/framework-tex.scm (convert-to-dvi, convert-to-ps): Call gettext on user messages, and remove whitespace. * lily/paper-outputter.cc (get_paper_outputter): Add progress newline. * lily/main.cc (usage): Typo. --- diff --git a/ChangeLog b/ChangeLog index de6e5ffd7a..42be61ba09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,19 @@ 2004-11-03 Jan Nieuwenhuizen + * lily/lily-parser.cc (LY_DEFINE): Remove "Now " from message. + + * lily/main.cc (main): Invoke identify. + + * scm/lily.scm (postscript->pdf): Remove progress newline. + Write progress to stderr. + + * lily/paper-book.cc (output): Remove progress newline. + + * scm/framework-tex.scm (convert-to-dvi, convert-to-ps): Call + gettext on user messages, and remove whitespace. + + * lily/paper-outputter.cc (get_paper_outputter): Add progress newline. + * scripts/lilypond-latex.py (program_name): Bugfix: use only basename of argv[0] (Thomas Scharkowski). diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index e487ca2416..5285d6baa8 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -236,15 +236,17 @@ lilypond test.ly You will see something resembling @example -lilypond (GNU LilyPond) 2.2.0 -Running lilypond... -Now processing `/home/fred/ly/test.ly' +lilypond test.ly +GNU LilyPond 2.5.0 +Processing `test.ly' Parsing... -Interpreting music...[1] -@emph{... more interesting stuff ... } -DVI output to `test.dvi'... -PDF output to `test.pdf'... -PS output to `test.ps'... +Interpreting music... [1] +Preprocessing graphical objects... +Calculating line breaks... [2] +Layout output to `test.tex'... +Converting to `test.dvi'... +Converting to `test.ps'... +Converting to `test.pdf'... @end example @cindex DVI file diff --git a/lily/lily-parser.cc b/lily/lily-parser.cc index 355791e719..253cae0467 100644 --- a/lily/lily-parser.cc +++ b/lily/lily-parser.cc @@ -281,7 +281,7 @@ LY_DEFINE (ly_parse_file, "ly:parse-file", Sources sources; sources.set_path (&global_path); - progress_indication (_f ("Now processing `%s'", file_name.to_str0 ())); + progress_indication (_f ("Processing `%s'", file_name.to_str0 ())); progress_indication ("\n"); Lily_parser *parser = new Lily_parser (&sources); diff --git a/lily/main.cc b/lily/main.cc index edd9ba013e..30f2c6c13b 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -175,13 +175,13 @@ static void identify (FILE *out) { fputs (gnu_lilypond_version_string ().to_str0 (), out); + fputs ("\n", out); } static void notice () { identify (stdout); - printf ("\n"); printf (_f (NOTICE, PROGRAM_NAME).to_str0 ()); printf ("\n"); copyright (); @@ -309,7 +309,6 @@ main_with_guile (void *, int, char **) ly_c_init_guile (); call_constructors (); - progress_indication ("\n"); determine_output_options (); all_fonts_global = new All_font_metrics (global_path.to_string ()); @@ -454,6 +453,7 @@ parse_argv (int argc, char **argv) if (help_b) { + identify (stdout); usage (); if (verbose_global_b) dir_info (stdout); @@ -464,9 +464,10 @@ parse_argv (int argc, char **argv) int main (int argc, char **argv) { - setup_localisation (); + setup_localisation (); setup_paths (); parse_argv (argc, argv); + identify (stderr); initialize_kpathsea (argv[0]); scm_boot_guile (argc, argv, main_with_guile, 0); diff --git a/lily/paper-book.cc b/lily/paper-book.cc index f7ead445a9..08367608b3 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -127,10 +127,10 @@ Paper_book::post_processing (SCM module, {make_ps, "convert-to-ps"}, {make_pdf, "convert-to-pdf"}, {make_png, "convert-to-png"}, - {0,0} + {0, 0}, }; - for (int i= 0; settings[i].func_name_; i++) + for (int i = 0; settings[i].func_name_; i++) { if (settings[i].do_it_) { @@ -139,7 +139,7 @@ Paper_book::post_processing (SCM module, { func = scm_variable_ref (func); if (ly_c_procedure_p (func)) - scm_call_2 (func, self_scm(), file_name); + scm_call_2 (func, self_scm (), file_name); } } } @@ -207,9 +207,8 @@ Paper_book::output (String outname) post_processing (mod, scm_makfrom0str (file_name.to_str0 ())); } - - progress_indication ("\n"); } + progress_indication ("\n"); } void diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index 43c6e842b9..0a28aa242e 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -115,6 +115,7 @@ get_paper_outputter (String outname, String f) { progress_indication (_f ("Layout output to `%s'...", outname == "-" ? String ("") : outname)); + progress_indication ("\n"); return new Paper_outputter (outname, f); } diff --git a/lily/performance.cc b/lily/performance.cc index 379e024793..65e091bf69 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -47,9 +47,9 @@ Performance::output (Midi_stream& midi_stream) midi_stream << Midi_header (1, tracks_i, clocks_per_4_i); output_header_track (midi_stream); progress_indication ("\n"); - progress_indication (_ ("Track ... ")); + progress_indication (_ ("Track...") + " "); int channel = 0; - for (int i =0; i < audio_staffs_.size (); i++) + for (int i = 0; i < audio_staffs_.size (); i++) { Audio_staff *s = audio_staffs_[i]; if (verbose_global_b) diff --git a/scm/framework-tex.scm b/scm/framework-tex.scm index 20a04f5a16..a7ecaae996 100644 --- a/scm/framework-tex.scm +++ b/scm/framework-tex.scm @@ -288,17 +288,16 @@ (if (ly:get-option 'verbose) " " - " 2>&1 1>& /dev/null ") - ))) + " 2>&1 1>& /dev/null ")))) (if (ly:get-option 'verbose) (begin (newline (current-error-port)) - - (display (format #f (_ "Invoking ~S") cmd) (current-error-port)) + (format (current-error-port) (_ "Invoking ~S") cmd) (newline (current-error-port))) - (display (format #f "Converting to `~a.ps'...\n" base) (current-error-port)) - ) + (begin + (format (current-error-port) (_ "Converting to `~a.ps'...") base) + (newline (current-error-port)))) (system cmd))) (define-public (convert-to-dvi book name) @@ -313,16 +312,16 @@ "latex \\\\nonstopmode \\\\input " name (if (ly:get-option 'verbose) " " - " 2>&1 1>& /dev/null ") - - ))) + " 2>&1 1>& /dev/null ")))) (setenv "extra_mem_top" (number->string (max curr-extra-mem 1024000))) (if (ly:get-option 'verbose) (begin (newline (current-error-port)) - (display (format #f (_ "Invoking ~S") cmd) (current-error-port)) + (format (current-error-port) (_ "Invoking ~S") cmd) (newline (current-error-port))) - (format (current-error-port) "Converting to `~a.dvi'...\n" base)) + (begin + (format (current-error-port) (_ "Converting to `~a.dvi'...") base) + (newline (current-error-port)))) ;; fixme: set in environment? (if (ly:get-option 'safe) diff --git a/scm/lily.scm b/scm/lily.scm index 01de0a300a..82bbfaa384 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -563,29 +563,19 @@ possibly turned off." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-public (ly:system command) - (let* - ((status 0)) - + (let* ((status 0)) (if (ly:get-option 'verbose) - (display (format (_ "Invoking `~a'...\n") command) (current-error-port))) - + (format (current-error-port) (_ "Invoking `~a'...\n") command)) (set! status (system command)) - - (if (> status 0) - (display (format (_ "Error invoking `~a'. Return value ~a") - command status))) - )) + (format (current-error-port) (_ "Error invoking `~a'. Return value ~a") + command status)))) (define-public (postscript->pdf papersizename name) (let* ((cmd (string-append "ps2pdf -sPAPERSIZE=" papersizename " " name)) (output-name (regexp-substitute/global #f "\\.ps" name 'pre ".pdf" 'post))) - - (newline (current-error-port)) - (display (format (_ "Converting to `~a'...") output-name) - (current-error-port)) - + (format (current-error-port) (_ "Converting to `~a'...") output-name) (ly:system cmd))) (define-public (postscript->png resolution name)