# HG changeset patch # User wenzelm # Date 1399053705 -7200 # Node ID e3ccf0809d513641cf0c6ce0f51718be9490b361 # Parent e760242101fcdf8d9ca56f6fb59672e5e4ecc139 prefer scala.Console with its support for thread-local redirection; diff -r e760242101fc -r e3ccf0809d51 src/Pure/General/output.scala --- a/src/Pure/General/output.scala Fri May 02 19:51:40 2014 +0200 +++ b/src/Pure/General/output.scala Fri May 02 20:01:45 2014 +0200 @@ -12,8 +12,8 @@ def warning_text(msg: String): String = cat_lines(split_lines(msg).map("### " + _)) def error_text(msg: String): String = cat_lines(split_lines(msg).map("*** " + _)) - def writeln(msg: String) { System.err.println(msg) } - def warning(msg: String) { System.err.println(warning_text(msg)) } - def error_message(msg: String) { System.err.println(error_text(msg)) } + def writeln(msg: String) { Console.err.println(msg) } + def warning(msg: String) { Console.err.println(warning_text(msg)) } + def error_message(msg: String) { Console.err.println(error_text(msg)) } } diff -r e760242101fc -r e3ccf0809d51 src/Pure/System/isabelle_process.scala --- a/src/Pure/System/isabelle_process.scala Fri May 02 19:51:40 2014 +0200 +++ b/src/Pure/System/isabelle_process.scala Fri May 02 20:01:45 2014 +0200 @@ -12,7 +12,7 @@ class Isabelle_Process( - receiver: Prover.Message => Unit = System.out.println(_), + receiver: Prover.Message => Unit = Console.println(_), prover_args: List[String] = Nil) { /* text and tree data */ diff -r e760242101fc -r e3ccf0809d51 src/Pure/System/options.scala --- a/src/Pure/System/options.scala Fri May 02 19:51:40 2014 +0200 +++ b/src/Pure/System/options.scala Fri May 02 20:01:45 2014 +0200 @@ -147,13 +147,13 @@ val options = (Options.init() /: more_options)(_ + _) if (get_option != "") - System.out.println(options.check_name(get_option).value) + Console.println(options.check_name(get_option).value) if (export_file != "") File.write(Path.explode(export_file), YXML.string_of_body(options.encode)) if (get_option == "" && export_file == "") - System.out.println(options.print) + Console.println(options.print) case _ => error("Bad arguments:\n" + cat_lines(args)) } diff -r e760242101fc -r e3ccf0809d51 src/Pure/Tools/build.scala --- a/src/Pure/Tools/build.scala Fri May 02 19:51:40 2014 +0200 +++ b/src/Pure/Tools/build.scala Fri May 02 20:01:45 2014 +0200 @@ -32,7 +32,7 @@ class Console_Progress(verbose: Boolean) extends Progress { - override def echo(msg: String) { System.out.println(msg) } + override def echo(msg: String) { Console.println(msg) } override def theory(session: String, theory: String): Unit = if (verbose) echo(session + ": theory " + theory) diff -r e760242101fc -r e3ccf0809d51 src/Pure/Tools/doc.scala --- a/src/Pure/Tools/doc.scala Fri May 02 19:51:40 2014 +0200 +++ b/src/Pure/Tools/doc.scala Fri May 02 20:01:45 2014 +0200 @@ -77,7 +77,7 @@ def view(path: Path) { - if (path.is_file) System.out.println(Library.trim_line(File.read(path))) + if (path.is_file) Console.println(Library.trim_line(File.read(path))) else { val pdf = path.ext("pdf") if (pdf.is_file) Isabelle_System.pdf_viewer(pdf) @@ -92,7 +92,7 @@ { Command_Line.tool0 { val entries = contents() - if (args.isEmpty) System.out.println(cat_lines(contents_lines().map(_._2))) + if (args.isEmpty) Console.println(cat_lines(contents_lines().map(_._2))) else { args.foreach(arg => entries.collectFirst { case Doc(name, _, path) if arg == name => path } match {