You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by tm...@apache.org on 2002/04/25 15:47:37 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Compile.java
tmiller 02/04/25 06:47:37
Modified: java/src/org/apache/xalan/xsltc/cmdline Compile.java
Log:
added a -v option to compiler,prints out version
Revision Changes Path
1.10 +15 -4 xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/Compile.java
Index: Compile.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/Compile.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Compile.java 24 Apr 2002 20:50:14 -0000 1.9
+++ Compile.java 25 Apr 2002 13:47:36 -0000 1.10
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: Compile.java,v 1.9 2002/04/24 20:50:14 santiagopg Exp $
+ * @(#)$Id: Compile.java,v 1.10 2002/04/25 13:47:36 tmiller Exp $
*
* The Apache Software License, Version 1.1
*
@@ -80,6 +80,12 @@
public final class Compile {
+ // Versioning numbers for the compiler -v option output
+ private static int VERSION_MAJOR = 1;
+ private static int VERSION_MINOR = 0;
+ private static int VERSION_DELTA = 0;
+
+
// This variable should be set to false to prevent any methods in this
// class from calling System.exit(). As this is a command-line tool,
// calling System.exit() is normally OK, but we also want to allow for
@@ -87,7 +93,11 @@
private static boolean _allowExit = true;
public static void printUsage() {
- System.err.println(new ErrorMsg(ErrorMsg.COMPILE_USAGE_STR));
+ StringBuffer vers = new StringBuffer("XSLTC version " +
+ VERSION_MAJOR + "." + VERSION_MINOR +
+ ((VERSION_DELTA > 0) ? ("."+VERSION_DELTA) : ("")));
+ System.err.println(vers + "\n" +
+ new ErrorMsg(ErrorMsg.COMPILE_USAGE_STR));
if (_allowExit) System.exit(-1);
}
@@ -103,8 +113,7 @@
boolean inputIsURL = false;
boolean useStdIn = false;
boolean classNameSet = false;
-
- final GetOpt getopt = new GetOpt(args, "o:d:j:p:uxhsin");
+ final GetOpt getopt = new GetOpt(args, "o:d:j:p:uxhsinv");
if (args.length < 1) printUsage();
final XSLTC xsltc = new XSLTC();
@@ -141,6 +150,8 @@
case 'n':
xsltc.setTemplateInlining(false);
break;
+ case 'v':
+ // fall through to case h
case 'h':
default:
printUsage();
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org