Description: Handle --help to support help2man
Author: Mathieu Malaterre <malat@debian.org>
Last-Update: 2020-08-18

--- pixelmed-codec-20200328.orig/com/pixelmed/codec/jpeg/Parse.java
+++ pixelmed-codec-20200328/com/pixelmed/codec/jpeg/Parse.java
@@ -507,6 +507,11 @@ public class Parse {
 	 */
 	public static void main(String arg[]) {
 		try {
+    if (arg.length < 1 || arg[0].equals("--help")) {
+      System.err.println("Error: Incorrect number of arguments");
+      System.err.println("Usage: jpegparse input.jpg");
+      System.exit(1);
+    }
 			InputStream in = new FileInputStream(arg[0]);
 			OutputStream copiedCompressedOutput = arg.length > 1 && arg[1].length() > 0 ? new FileOutputStream(arg[1]) : null;
 			DecompressedOutput decompressedOutput = arg.length > 2 && arg[2].length() > 0 ? new DecompressedOutput(new File(arg[2]),ByteOrder.BIG_ENDIAN) : null;
