From dcf5715beebd25284c05fc98a81228c6b5677435 Mon Sep 17 00:00:00 2001 From: Lex Spoon Date: Thu, 15 Jun 2006 15:30:06 +0000 Subject: removed scalascript and scalaint, and adjusted ... removed scalascript and scalaint, and adjusted see-also sections of the other man pages accordingly --- src/manual/scala/man1/scala.scala | 13 ++-- src/manual/scala/man1/scalac.scala | 4 +- src/manual/scala/man1/scaladoc.scala | 4 +- src/manual/scala/man1/scalaint.scala | 80 ------------------------- src/manual/scala/man1/scalap.scala | 4 +- src/manual/scala/man1/scalascript.scala | 102 -------------------------------- 6 files changed, 12 insertions(+), 195 deletions(-) delete mode 100644 src/manual/scala/man1/scalaint.scala delete mode 100644 src/manual/scala/man1/scalascript.scala (limited to 'src/manual') diff --git a/src/manual/scala/man1/scala.scala b/src/manual/scala/man1/scala.scala index 7b217f567c..2c7a4da4f1 100644 --- a/src/manual/scala/man1/scala.scala +++ b/src/manual/scala/man1/scala.scala @@ -94,7 +94,9 @@ object scala extends Command { "arguments to the " & Bold("main") & " method.", "If a script file is specified to run, then the file is read and all " & - "Scala statements and declarations in the file are processed in order. ", + "Scala statements and declarations in the file are processed in order. " & + "Any arguments specified will be available via the " & Mono("args") & + "variable.", "Script files may have an optional header fthat is ignored if " & "present. There are two ways to format the header: either beginning with " & @@ -124,7 +126,10 @@ object scala extends Command { Definition( MBold("JAVACMD"), "Specify the " & MBold("java") & " command to be used " & - "for running the Scala commands"))) + "for running the Scala code. Arguments may be specified; " & + "they will be expanded by the shell. (Likewise, if the " & + "command includes any spaces, then the command should be " & + "wrapped in explicit quotation marks.)"))) val examples = Section("EXAMPLES", @@ -150,7 +155,7 @@ object scala extends Command { CodeSample( "#!/bin/sh\n" + - "exec scalascript \"$0\" \"$@\"\n" + + "exec scala \"$0\" \"$@\"\n" + "!#\n" + "Console.println(\"Hello, world!\")\n" + "argv.toList foreach Console.println"), @@ -160,7 +165,7 @@ object scala extends Command { CodeSample( "::#!\n" + "@echo off\n" + - "call scalascript %0 %*\n" + + "call scala %0 %*\n" + "goto :eof\n" + "::!#\n" + "Console.println(\"Hello, world!\")\n" + diff --git a/src/manual/scala/man1/scalac.scala b/src/manual/scala/man1/scalac.scala index e63118b00f..6e84d4c886 100644 --- a/src/manual/scala/man1/scalac.scala +++ b/src/manual/scala/man1/scalac.scala @@ -290,9 +290,7 @@ object scalac extends Command { Link(Bold("sbaz") & "(1)", "sbaz.html") & ", " & Link(Bold("scala") & "(1)", "scala.html") & ", " & Link(Bold("scaladoc") & "(1)", "scaladoc.html") & ", " & - Link(Bold("scalaint") & "(1)", "scalaint.html") & ", " & - Link(Bold("scalap") & "(1)", "scalap.html") & ", " & - Link(Bold("scalascript") & "(1)", "scalascript.html")) + Link(Bold("scalap") & "(1)", "scalap.html")) def manpage = new Document { title = command diff --git a/src/manual/scala/man1/scaladoc.scala b/src/manual/scala/man1/scaladoc.scala index 722a251ac5..f541ef1b1f 100644 --- a/src/manual/scala/man1/scaladoc.scala +++ b/src/manual/scala/man1/scaladoc.scala @@ -85,9 +85,7 @@ object scaladoc extends Command { Link(Bold("sbaz") & "(1)", "sbaz.html") & ", " & Link(Bold("scala") & "(1)", "scala.html") & ", " & Link(Bold("scalac") & "(1)", "scalac.html") & ", " & - Link(Bold("scalaint") & "(1)", "scalaint.html") & ", " & - Link(Bold("scalap") & "(1)", "scalap.html") & ", " & - Link(Bold("scalascript") & "(1)", "scalascript.html")) + Link(Bold("scalap") & "(1)", "scalap.html")) def manpage = new Document { title = command diff --git a/src/manual/scala/man1/scalaint.scala b/src/manual/scala/man1/scalaint.scala deleted file mode 100644 index 8921aefebd..0000000000 --- a/src/manual/scala/man1/scalaint.scala +++ /dev/null @@ -1,80 +0,0 @@ -/* NSC -- new Scala compiler - * Copyright 2005-2006 LAMP/EPFL - * @author Stephane Micheloud - */ -//$Id$ - -package scala.man1 - -object scalaint extends Command { - import _root_.scala.tools.docutil.ManPage._ - - protected def cn = new Error().getStackTrace()(0).getClassName() - - val name = Section("NAME", - - MBold(command) & " " & NDash & " Interpreter for the " & - Link("Scala 2", "http://scala.epfl.ch/") & " language") - - val synopsis = Section("SYNOPSIS", - - CmdLine(" [ " & Argument("source file") & " ]")) - - val parameters = Section("PARAMETERS", - - DefinitionList( - Definition( - Mono(Argument("source file")), - "One source file to be interpreted (such as " & - Mono("MyClass.scala") & ")."))) - - val description = Section("DESCRIPTION", - - "The " & MBold(command) & " tool reads class and object definitions, " & - "written in the Scala programming language, and interprets them in an " & - "interactive shell environment.", - - "The shell environment provides the following internal commands:", - - CodeSample("This is an interpreter for Scala.\n" + - "Type in expressions to have them evaluated.\n" + - "Type :quit to exit the interpreter.\n" + - "Type :compile followed by a filename to compile a complete Scala file.\n" + - "Type :load followed by a filename to load a sequence of interpreter commands.\n" + - "Type :replay to reset execution and replay all previous commands.\n" + - "Type :help to repeat this message later.\n\n" + - "scala>")) - - val examples = Section("EXAMPLES", - - DefinitionList( - Definition( - "Interpret a Scala program", - CmdLine("HelloWorld")))) - - val seeAlso = Section("SEE ALSO", - - Link(Bold("sbaz") & "(1)", "sbaz.html") & ", " & - Link(Bold("scala") & "(1)", "scala.html") & ", " & - Link(Bold("scalac") & "(1)", "scalac.html") & ", " & - Link(Bold("scaladoc") & "(1)", "scaladoc.html") & ", " & - Link(Bold("scalap") & "(1)", "scalap.html") & ", " & - Link(Bold("scalascript") & "(1)", "scalascript.html")) - - def manpage = new Document { - title = command - date = "June 8, 2006" - author = "Stephane Micheloud" - version = "0.2" - sections = List( - name, - synopsis, - parameters, - description, - examples, - authors, - bugs, - copyright, - seeAlso) - } -} diff --git a/src/manual/scala/man1/scalap.scala b/src/manual/scala/man1/scalap.scala index d8185a6113..09d3ec02b4 100644 --- a/src/manual/scala/man1/scalap.scala +++ b/src/manual/scala/man1/scalap.scala @@ -85,9 +85,7 @@ object scalap extends Command { Link(Bold("sbaz") & "(1)", "sbaz.html") & ", " & Link(Bold("scala") & "(1)", "scala.html") & ", " & Link(Bold("scalac") & "(1)", "scalac.html") & ", " & - Link(Bold("scaladoc") & "(1)", "scaladoc.html") & ", " & - Link(Bold("scalaint") & "(1)", "scalaint.html") & ", " & - Link(Bold("scalascript") & "(1)", "scalascript.html")) + Link(Bold("scaladoc") & "(1)", "scaladoc.html")) def manpage = new Document { title = command diff --git a/src/manual/scala/man1/scalascript.scala b/src/manual/scala/man1/scalascript.scala deleted file mode 100644 index f73988a682..0000000000 --- a/src/manual/scala/man1/scalascript.scala +++ /dev/null @@ -1,102 +0,0 @@ -/* NSC -- new Scala compiler - * Copyright 2005-2006 LAMP/EPFL - * @author Stephane Micheloud - */ -//$Id$ - -package scala.man1 - -object scalascript extends Command { - import _root_.scala.tools.docutil.ManPage._ - - protected def cn = new Error().getStackTrace()(0).getClassName() - - val name = Section("NAME", - - MBold(command) & " " & NDash & " Script runner for the " & - Link("Scala 2", "http://scala.epfl.ch/") & " language") - - val synopsis = Section("SYNOPSIS", - - CmdLine(" [ " & Argument("compiler args...") & " - ] " & - Argument("scriptfile") & " [ " & Argument("script args...") & " ]")) - - val parameters = Section("PARAMETERS", - - DefinitionList( - Definition( - Mono(Argument("compiler args")), - "Compiler arguments, exactly as for " & MBold("scalac") & ". " & - "The compiler arguments, if present, must be terminated by a " & - "bare hyphen."), - Definition( - Mono(Argument("scriptfile")), - "One source file to be interpreted."), - Definition( - Mono(Argument("script args")), - "Arguments to be passed to the script. They will be available " & - "via the " & Mono("argv") & " variable."))) - - val description = Section("DESCRIPTION", - - "The " & MBold(command) & " tool supports writing script files " & - "in Scala. To write a Scala script on Unix, start the file with the " & - "following header:", - - CodeSample( - "#!/bin/sh\n" + - "exec scalascript \"$0\" \"$@\"\n" + - "!#"), - - "To write a Scala script as a Microsoft Windows batch file, start " & - "the " & Mono(".bat") & " file with the following header:", - - CodeSample( - "::#!\n" + - "@echo off\n" + - "call scalascript %0 %*\n" + - "goto :eof\n" + - "::!#")) - - val examples = Section("EXAMPLES", - - "Here is a complete Scala script for Unix that prints out a " & - "friendly greeting followed by all of the script's arguments:", - - CodeSample( - "#!/bin/sh\n" + - "exec scalascript \"$0\" \"$@\"\n" + - "!#\n" + - "Console.println(\"Hello, world!\")\n" + - "argv.toList foreach Console.println")) - - override val authors = Section("AUTHOR", - - "Written by Lex Spoon.") - - val seeAlso = Section("SEE ALSO", - - Link(Bold("sbaz") & "(1)", "sbaz.html") & ", " & - Link(Bold("scala") & "(1)", "scala.html") & ", " & - Link(Bold("scalac") & "(1)", "scalac.html") & ", " & - Link(Bold("scaladoc") & "(1)", "scaladoc.html") & ", " & - Link(Bold("scalaint") & "(1)", "scalaint.html") & ", " & - Link(Bold("scalap") & "(1)", "scalap.html")) - - def manpage = new Document { - title = command - date = "June 8, 2006" - author = "Stephane Micheloud" - version = "0.2" - sections = List( - name, - synopsis, - parameters, - description, - examples, - authors, - bugs, - copyright, - seeAlso) - } -} -- cgit v1.2.3