diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-02-01 17:09:49 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-02-01 17:09:49 +0000 |
commit | abada90e3f84dc703b8ddc9efcbed8a946fadead (patch) | |
tree | 2c6f9dccd510ea97cb927a7bd635422efaae547a /java/demo/Freeze/library/RunParser.java | |
parent | removing trace message (diff) | |
download | ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.bz2 ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.xz ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.zip |
Expanded tabs into spaces
Diffstat (limited to 'java/demo/Freeze/library/RunParser.java')
-rw-r--r-- | java/demo/Freeze/library/RunParser.java | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/java/demo/Freeze/library/RunParser.java b/java/demo/Freeze/library/RunParser.java index 426f1beefe7..1fc0e095c7d 100644 --- a/java/demo/Freeze/library/RunParser.java +++ b/java/demo/Freeze/library/RunParser.java @@ -14,26 +14,26 @@ class RunParser static void usage(String appName) { - System.err.println("Usage: " + appName + " [options] [file...]\n"); - System.err.print( - "Options:\n" + - "-h, --help Show this message.\n"); - //"-v, --version Display the Ice version.\n" + System.err.println("Usage: " + appName + " [options] [file...]\n"); + System.err.print( + "Options:\n" + + "-h, --help Show this message.\n"); + //"-v, --version Display the Ice version.\n" } static int runParser(String appName, String[] args, Ice.Communicator communicator) { - String file = null; - int idx = 0; + String file = null; + int idx = 0; - while(idx < args.length) - { - if(args[idx].equals("-h") | args[idx].equals("--help")) - { - usage(appName); - return 0; - } + while(idx < args.length) + { + if(args[idx].equals("-h") | args[idx].equals("--help")) + { + usage(appName); + return 0; + } /* else if(args[idx].equals("-v") || args[idx].equals("--version")) { @@ -41,56 +41,56 @@ class RunParser return 0; } */ - else if(args[idx].charAt(0) == '-') - { - System.err.println(appName + ": unknown option `" + args[idx] + "'"); - usage(appName); - return 1; - } - else - { - if(file == null) - { - file = args[idx]; - } - else - { - System.err.println(appName + ": only one file is supported."); - usage(appName); - return 1; - } - ++idx; - } - } + else if(args[idx].charAt(0) == '-') + { + System.err.println(appName + ": unknown option `" + args[idx] + "'"); + usage(appName); + return 1; + } + else + { + if(file == null) + { + file = args[idx]; + } + else + { + System.err.println(appName + ": only one file is supported."); + usage(appName); + return 1; + } + ++idx; + } + } - Ice.ObjectPrx base = communicator.propertyToProxy("Library.Proxy"); - LibraryPrx library = LibraryPrxHelper.checkedCast(base); - if(library == null) - { - System.err.println(appName + ": invalid object reference"); - return 1; - } + Ice.ObjectPrx base = communicator.propertyToProxy("Library.Proxy"); + LibraryPrx library = LibraryPrxHelper.checkedCast(base); + if(library == null) + { + System.err.println(appName + ": invalid object reference"); + return 1; + } - Parser parser = new Parser(communicator, library); - int status; + Parser parser = new Parser(communicator, library); + int status; - if(file == null) - { - status = parser.parse(); - } - else - { - try - { - status = parser.parse(new java.io.BufferedReader(new java.io.FileReader(file))); - } - catch(java.io.IOException ex) - { - status = 1; - ex.printStackTrace(); - } - } + if(file == null) + { + status = parser.parse(); + } + else + { + try + { + status = parser.parse(new java.io.BufferedReader(new java.io.FileReader(file))); + } + catch(java.io.IOException ex) + { + status = 1; + ex.printStackTrace(); + } + } - return status; + return status; } } |