Package fmpp.tools
Class CommandLine
- java.lang.Object
-
- fmpp.tools.CommandLine
-
public class CommandLine extends java.lang.ObjectCommand-line tool for preprocessing single files or entire directories.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFMPP_CONSOLE_COLSThe number of console (terminal) columns can be passed in with this environment variable, supposedly by the OS-specific starter executable (shell script).
-
Constructor Summary
Constructors Constructor Description CommandLine()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intexecute(java.lang.String[] args, java.io.PrintWriter stdout, java.io.PrintWriter stderr)Emulates the command-line invocation of the tool.static voidmain(java.lang.String[] args)Runs the command line interface.
-
-
-
Field Detail
-
FMPP_CONSOLE_COLS
public static final java.lang.String FMPP_CONSOLE_COLS
The number of console (terminal) columns can be passed in with this environment variable, supposedly by the OS-specific starter executable (shell script). Note that if theSettings.NAME_COLUMNSis set, that will override this (but by default it isn't set). The value of the environment variable should be just an integer (with possible white space around it), however, if it's not a number,CommandLinewill attempt to parse it as the output of the Windowsmode con /statuscommand (also then[BR]can be used instead of real line-breaks, to ease bat programming). On UN*X-es usually this should be the output oftput cols.- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
Runs the command line interface.- See Also:
FMPP_CONSOLE_COLS
-
execute
public static int execute(java.lang.String[] args, java.io.PrintWriter stdout, java.io.PrintWriter stderr)Emulates the command-line invocation of the tool.- Parameters:
args- the command line argumentsstdout- thePrintWriterused as stdout. If it isnullthen it defaults to the real stdout.stderr- thePrintWriterused as stderr. If it isnullthen it defaults to the real stderr.- Returns:
- exit code. 0 if everything was OK, non-0 if there was an error.
-
-