2004-08-26 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / ilasm / Report.cs
index 1e679fc9c0d78345cb8c333697383b579c235952..08fa3f039e6ce4f8ecd9e2c784eb7a9e60aab8e1 100644 (file)
@@ -17,10 +17,17 @@ namespace Mono.ILASM {
 
                 private int error_count;
                 private int mark_count;
+                private bool quiet;
 
-                public Report ()
+                public Report () : this (false)
                 {
-                        error_count = 0;
+
+                }
+
+                public Report (bool quiet)
+                {
+                        this.error_count = 0;
+                        this.quiet = quiet;
                 }
 
                 public int ErrorCount {
@@ -32,14 +39,22 @@ namespace Mono.ILASM {
                 {
                         Console.WriteLine ("Assembling '{0}' , {1}, to {2} --> '{3}'", file,
                                            GetListing (listing), target, output);
+                        Console.WriteLine ();
                 }
 
                 public void Error (string message)
                 {
                         error_count++;
-                        Console.WriteLine ("Error: " + message);
+                        Console.WriteLine (message);
                 }
 
+                public void Message (string message)
+                {
+                        if (quiet)
+                                return;
+                        Console.WriteLine (message);
+                }
+                
                 private string GetListing (string listing)
                 {
                         if (listing == null)