summaryrefslogtreecommitdiff
path: root/docs/man/src/man/man1/Command.scala
diff options
context:
space:
mode:
Diffstat (limited to 'docs/man/src/man/man1/Command.scala')
-rw-r--r--docs/man/src/man/man1/Command.scala45
1 files changed, 45 insertions, 0 deletions
diff --git a/docs/man/src/man/man1/Command.scala b/docs/man/src/man/man1/Command.scala
new file mode 100644
index 0000000000..bfb6944e72
--- /dev/null
+++ b/docs/man/src/man/man1/Command.scala
@@ -0,0 +1,45 @@
+/* NSC -- new Scala compiler
+ * Copyright 2005-2006 LAMP/EPFL
+ * @author Stephane Micheloud
+ */
+//$Id: $
+
+package man.man1
+
+trait Command {
+ import ManPage._
+
+ protected val cn: String
+ val command = cn.substring(cn.lastIndexOf(".") + 1, cn.length() - 1)
+
+ protected def MBold(contents: AbstractText) = Mono(Bold(contents))
+ protected def MItalic(contents: AbstractText) = Mono(Italic(contents))
+
+ protected def CmdLine(opts: AbstractText) =
+ MBold(command) & Mono(" " & opts)
+
+ protected def CmdOption(opt: String, params: AbstractText) =
+ Mono(Bold(NDash & opt) & " " & params & " ")
+
+ protected def CmdOption(opt: String): AbstractText =
+ CmdOption(opt, "")
+
+ protected def Argument(arg: String): AbstractText =
+ "<" & Italic(arg) & ">"
+
+ def authors = Section("AUTHOR",
+
+ "Written by Stephane Micheloud.")
+
+ def copyright = Section("COPYRIGHT",
+
+ "This is free software; see the distribution for copying conditions. " &
+ "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A " &
+ "PARTICULAR PURPOSE.")
+
+ def bugs = Section("REPORTING BUGS",
+
+ "Report bugs to " & Mono("<scala@listes.epfl.ch>") & ".")
+
+ def manpage: Document
+}