]> git.donarmstrong.com Git - lilypond.git/commitdiff
Loglevels: Add basic_progress and replace success
authorReinhold Kainhofer <reinhold@kainhofer.com>
Mon, 15 Aug 2011 18:16:07 +0000 (20:16 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Sat, 3 Sep 2011 15:08:06 +0000 (17:08 +0200)
-) Add basic_progress function
-) use it for 'Processing xxx.ly...' message
-) new ly:basic-progress
-) get rid of the success function, use basic_progress instead

Documentation/contributor/programming-work.itexi
flower/include/warn.hh
flower/warn.cc
lily/lily-parser-scheme.cc
lily/warn-scheme.cc
scm/documentation-lib.scm
scm/lily.scm

index aa243e0e0c7c9434be2031f68ef12d68f1a5e68f..8fa3d6ed9cc08e33d756a5f441b778def8078053 100644 (file)
@@ -795,7 +795,7 @@ treated as if @code{Input::error} was called.
 @tab @code{Input::warning (msg)}
 
 @item BASIC
-@tab @code{successful (msg)}
+@tab @code{basic_progress (msg)}
 @tab -
 
 @item PROGRESS
@@ -855,7 +855,7 @@ treated as if @code{Input::error} was called.
 @tab @code{(ly:input-warning input msg args)}
 
 @item BASIC
-@tab @code{(ly:success msg args)}
+@tab @code{(ly:basic-progress msg args)}
 @tab -
 
 @item PROGRESS
index 7d381f1f08e3d01c832e16f7650922b57848fd16..3b66f65b7bf48bbeb149a1c3dfed35265ec7ad66 100644 (file)
@@ -47,7 +47,7 @@ void error (string s, string location = ""); // Fatal error, exits lilypond!
 void programming_error (string s, string location = "");
 void non_fatal_error (string, string location = "");
 void warning (string s, string location = "");
-void successful (string s, string location = "");
+void basic_progress (string s, string location = "");
 /* progress_indication does by default *NOT* start on a new line */
 void progress_indication (string s, bool newline = false, string location = "");
 void message (string s, bool newline = true, string location = "");
index 870420380ed4729c9c9d54be25ab09011837b71b..a6e1fa5f90b27c1c3416877e78eb80a8ad4ebc49 100644 (file)
@@ -162,9 +162,9 @@ warning (string s, string location)
 
 /* Display a success message.  */
 void
-successful (string s, string location)
+basic_progress (string s, string location)
 {
-  print_message (LOG_BASIC, location, _f ("success: %s", s) + "\n", true);
+  print_message (LOG_BASIC, location, s + "\n", true);
 }
 
 /* Display information about the progress.  */
index dc6b652b3d285503ff089ea1b587632868f5c80e..0848ec70f6114018ceaf3ebabbdf2f70f313491c 100644 (file)
@@ -114,8 +114,7 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
       sources.set_path (&global_path);
 
       string mapped_fn = map_file_name (file_name);
-      message (_f ("Processing `%s'", mapped_fn.c_str ()));
-      progress_indication ("\n");
+      basic_progress (_f ("Processing `%s'", mapped_fn.c_str ()));
 
       Lily_parser *parser = new Lily_parser (&sources);
 
index 1587d7f5abf477d18b7aae76369e25ebf7c53c3f..69fba1b8b7d94b14fed096a679e337e37e9db935 100644 (file)
@@ -85,14 +85,14 @@ LY_DEFINE (ly_progress, "ly:progress",
   return SCM_UNSPECIFIED;
 }
 
-LY_DEFINE (ly_success, "ly:success",
+LY_DEFINE (ly_basic_progress, "ly:basic-progress",
            1, 0, 1, (SCM str, SCM rest),
-           "A Scheme callable function to issue a success message @var{str}."
+           "A Scheme callable function to issue a basic progress message @var{str}."
            "  The message is formatted with @code{format} and @var{rest}.")
 {
   LY_ASSERT_TYPE (scm_is_string, str, 1);
   str = scm_simple_format (SCM_BOOL_F, str, rest);
-  successful (ly_scm2string (str));
+  basic_progress (ly_scm2string (str));
   return SCM_UNSPECIFIED;
 }
 
index 013cc2a4377bc0b373db7364221feedc96fe6d95..a033186067d998e51af075c695b9ce2fcaae7ec3 100644 (file)
@@ -56,7 +56,7 @@
        (node-children node)))
 
 (define (processing name)
-  (ly:message (_ "Processing ~S...") name))
+  (ly:basic-progress (_ "Processing ~S...") name))
 
 (define (self-evaluating? x)
   (or (number? x) (string? x) (procedure? x) (boolean? x)))
index 55d989e2d2ba7d8260f90955bbf86d0cc720a9c6..91b34e290aa2b5b1fc7c28dd22db0ba0b60a2c57 100644 (file)
@@ -642,7 +642,7 @@ LilyPond safe mode.  The syntax is the same as `define*-public'."
                        ".scm"))
         (outfile (open-file out-file-name "w")))
     (set! gc-dumping #t)
-    (format #t "Dumping GC statistics ~a...\n" out-file-name)
+    (ly:progress "Dumping GC statistics ~a...\n" out-file-name)
     (for-each (lambda (y)
                 (let ((x (car y))
                       (c (cdr y)))
@@ -662,16 +662,16 @@ LilyPond safe mode.  The syntax is the same as `define*-public'."
     (newline outfile)
     (if (defined? 'gc-live-object-stats)
         (let* ((stats #f))
-          (display "Live object statistics: GC'ing\n")
+          (ly:progress "Live object statistics: GC'ing\n")
           (ly:reset-all-fonts)
           (gc)
           (gc)
-          (display "Asserting dead objects\n")
+          (ly:progress "Asserting dead objects\n")
           (ly:set-option 'debug-gc-assert-parsed-dead #t)
           (gc)
           (ly:set-option 'debug-gc-assert-parsed-dead #f)
           (set! stats (gc-live-object-stats))
-          (display "Dumping live object statistics.\n")
+          (ly:progress "Dumping live object statistics.\n")
           (dump-live-object-stats outfile)))
     (newline outfile)
     (let* ((stats (gc-stats)))
@@ -727,7 +727,7 @@ PIDs or the number of the process."
   "Exit function for lilypond"
   (if (not silently)
       (case status
-        ((0) (ly:success (_ "Compilation successfully completed")))
+        ((0) (ly:basic-progress (_ "Success: compilation successfully completed")))
         ((1) (ly:warning (_ "Compilation completed with warnings or errors")))
         (else (ly:message ""))))
   (exit status))