From: Bastian Dehn Date: Thu, 3 Feb 2022 16:18:21 +0000 (+0100) Subject: add: version and useage X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=26fc46aeefae24e2504b5d986c23913a1b4dc3c7;p=discspan-java.git add: version and useage --- diff --git a/src/de/hhaalo/parameter.java b/src/de/hhaalo/parameter.java index be33a33..265456f 100644 --- a/src/de/hhaalo/parameter.java +++ b/src/de/hhaalo/parameter.java @@ -42,19 +42,38 @@ public class parameter _split = Long.parseUnsignedLong(g.getOptarg()); break; case 'h': - //show_version(); - //useage(); - System.out.println("help"); + showVersion(); + useage(); System.exit(0); break; case 'v': - //show_version(); + showVersion(); System.exit(0); break; default: - System.out.println("WARNING: " + g.getopt() + " unknown option"); + System.err.println("WARNING: " + g.getopt() + " unknown option"); break; } } } + + private void showVersion() + { + System.out.println("discspan 0.1"); + } + + private void useage() + { + System.out.print("\nUsage: discspan