From f0b99c917949223fa6ad29adaa36036d55767bfa Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Wed, 6 Oct 2010 20:40:54 +0200 Subject: [PATCH] himddump now uses getopt for option parsing. - Replaced old option parsing mechanism with getopt. - Updated usage message to be "compatible" to the new option parsing mechanism. TODO: - Test if this will compile on non-gnu compilers / modify makefiles if necessary. On my Linux machine with gcc it works great :-). --- himddump/himddump.c | 182 +++++++++++++++++++++++++++++++++++++------------- 1 files changed, 134 insertions(+), 48 deletions(-) diff --git a/himddump/himddump.c b/himddump/himddump.c index 48d5829..29cce74 100644 --- a/himddump/himddump.c +++ b/himddump/himddump.c @@ -6,22 +6,23 @@ #include #include #include +#include #include "himd.h" #include "sony_oma.h" void usage(char * cmdname) { - printf("Usage: %s , where is either of:\n\n\ - strings - dumps all strings found in the tracklist file\n\ - tracks - lists all tracks on disc\n\ - tracks verbose - lists details of all tracks on disc\n\ - discid - reads the disc id of the inserted medium\n\ - holes - lists all holes on disc\n\ - mp3key - show the MP3 encryption key for track \n\ - dumptrack - dump track \n\ - dumpmp3 - dump MP3 track \n\ - dumpnonmp3 - dump non-MP3 tracl \n", cmdname); + printf("Usage: %s