From f1e0978228298d3062f957b5b773ea2574859932 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 29 Apr 2009 17:38:16 +0200 Subject: [PATCH] More newlines and hierarchical indentation in log messages. --- lily/all-font-metrics.cc | 4 ++-- lily/includable-lexer.cc | 14 ++++++++++++-- lily/lily-guile.cc | 2 +- lily/pfb-scheme.cc | 4 ++-- lily/system.cc | 2 +- lily/ttf.cc | 4 ++-- scm/backend-library.scm | 17 ++++++++--------- scm/lily.scm | 4 ++-- 8 files changed, 30 insertions(+), 21 deletions(-) diff --git a/lily/all-font-metrics.cc b/lily/all-font-metrics.cc index 9721f8e809..344d3a3e75 100644 --- a/lily/all-font-metrics.cc +++ b/lily/all-font-metrics.cc @@ -80,7 +80,7 @@ All_font_metrics::find_pango_font (PangoFontDescription const *description, if (!pango_dict_->try_retrieve (key, &val)) { if (be_verbose_global) - progress_indication ("[" + string (pango_fn)); + progress_indication ("\n[" + string (pango_fn)); Pango_font *pf = new Pango_font (pango_ft2_fontmap_, description, @@ -119,7 +119,7 @@ All_font_metrics::find_otf (string name) return 0; if (be_verbose_global) - progress_indication ("[" + file_name); + progress_indication ("\n[" + file_name); val = Open_type_font::make_otf (file_name); diff --git a/lily/includable-lexer.cc b/lily/includable-lexer.cc index 7d506373f3..2eb5df5cb3 100644 --- a/lily/includable-lexer.cc +++ b/lily/includable-lexer.cc @@ -71,7 +71,12 @@ Includable_lexer::new_input (string name, Sources *sources) state_stack_.push_back (yy_current_buffer); if (be_verbose_global) - progress_indication (string ("[") + file->name_string ()); + { + string spaces = ""; + for (size_t i = 0; i < state_stack_.size (); i++) + spaces += " "; + progress_indication (string ("\n") + spaces + string ("[") + file->name_string ()); + } include_stack_.push_back (file); @@ -94,7 +99,12 @@ Includable_lexer::new_input (string name, string data, Sources *sources) state_stack_.push_back (yy_current_buffer); if (be_verbose_global) - progress_indication (string ("[") + name); + { + string spaces = ""; + for (size_t i = 0; i < state_stack_.size (); i++) + spaces += " "; + progress_indication (string ("\n") + spaces + string ("[") + name); + } include_stack_.push_back (file); yy_switch_to_buffer (yy_create_buffer (file->get_istream (), YY_BUF_SIZE)); diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 3753a77795..d81eec8982 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -89,7 +89,7 @@ gulp_file_to_string (string fn, bool must_exist, int size) string result (&chars[0], chars.size ()); if (be_verbose_global) - progress_indication ("]"); + progress_indication ("]\n"); return result; } diff --git a/lily/pfb-scheme.cc b/lily/pfb-scheme.cc index 6713c1b08f..730442ef05 100644 --- a/lily/pfb-scheme.cc +++ b/lily/pfb-scheme.cc @@ -15,7 +15,7 @@ LY_DEFINE (ly_pfb_2_pfa, "ly:pfb->pfa", string file_name = ly_scm2string (pfb_file_name); if (be_verbose_global) - progress_indication ("[" + file_name); + progress_indication ("\n[" + file_name); vector pfb_string = gulp_file (file_name, 0); char *pfa = pfb2pfa ((Byte *) &pfb_string[0], pfb_string.size ()); @@ -38,7 +38,7 @@ LY_DEFINE (ly_otf_2_cff, "ly:otf->cff", string file_name = ly_scm2string (otf_file_name); if (be_verbose_global) - progress_indication ("[" + file_name); + progress_indication ("\n[" + file_name); FT_Face face = open_ft_face (file_name, 0 /* index */); string table = get_otf_table (face, "CFF "); diff --git a/lily/system.cc b/lily/system.cc index 9054988dab..6f363970ff 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -175,7 +175,7 @@ System::do_break_substitution_and_fixup_refpoints () } if (be_verbose_global) - message (_f ("Element count %d.", count + element_count ())); + message (_f ("Element count %d", count + element_count ()) + "\n"); } SCM diff --git a/lily/ttf.cc b/lily/ttf.cc index 62c6d4695e..d8e2b56f45 100644 --- a/lily/ttf.cc +++ b/lily/ttf.cc @@ -504,7 +504,7 @@ LY_DEFINE (ly_ttf_ps_name, "ly:ttf-ps-name", string file_name = ly_scm2string (ttf_file_name); if (be_verbose_global) - progress_indication ("[" + file_name); + progress_indication ("\n[" + file_name); FT_Face face; @@ -556,7 +556,7 @@ LY_DEFINE (ly_ttf_2_pfa, "ly:ttf->pfa", string file_name = ly_scm2string (ttf_file_name); if (be_verbose_global) - progress_indication ("[" + file_name); + progress_indication ("\n[" + file_name); Memory_out_stream stream; diff --git a/scm/backend-library.scm b/scm/backend-library.scm index a229f8f6d0..301868cb84 100644 --- a/scm/backend-library.scm +++ b/scm/backend-library.scm @@ -77,20 +77,20 @@ ".pdf")) (is-eps (string-match "\\.eps$" name)) (paper-size-string (if is-eps - " -dEPSCrop " - (ly:format "-dDEVICEWIDTHPOINTS=~$ \ --dDEVICEHEIGHTPOINTS=~$ " - paper-width paper-height ))) + "-dEPSCrop" + (ly:format "-dDEVICEWIDTHPOINTS=~$\ + -dDEVICEHEIGHTPOINTS=~$" + paper-width paper-height))) (cmd (simple-format #f "~a\ ~a\ ~a\ ~a\ - -dCompatibilityLevel=1.4 \ + -dCompatibilityLevel=1.4\ -dNOPAUSE\ -dBATCH\ - -r1200 \ + -r1200\ -sDEVICE=pdfwrite\ -sOutputFile=~S\ -c .setpdfwrite\ @@ -100,9 +100,8 @@ (if (ly:get-option 'verbose) "" "-q") (if (or (ly:get-option 'gs-load-fonts) (ly:get-option 'gs-load-lily-fonts)) - - " -dNOSAFER " - " -dSAFER ") + "-dNOSAFER" + "-dSAFER") paper-size-string pdf-name name))) diff --git a/scm/lily.scm b/scm/lily.scm index c39b243648..360e694053 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -242,7 +242,7 @@ second. Dump results to `FILE.stacks' and (ly:error (_ "cannot find: ~A") x)) (primitive-load file-name) (if (ly:get-option 'verbose) - (ly:progress "]")))) + (ly:progress "]\n")))) (define-public DOS (let ((platform (string-tokenize @@ -750,6 +750,6 @@ PIDs or the number of the process." ;; FIXME: soft-code, localize (welcome-ly (string-append ly "Welcome_to_LilyPond.ly")) (cmd (get-editor-command welcome-ly 0 0 0))) - (ly:message (_ "Invoking `~a'...") cmd) + (ly:message (_ "Invoking `~a'...\n") cmd) (system cmd) (exit 1))) -- 2.39.2