From 2c0de703f7a684b22320f3176af6b217d27a6404 Mon Sep 17 00:00:00 2001 From: rocky Date: Mon, 14 Apr 2003 04:58:49 +0000 Subject: [PATCH] libpopt options need to be integers. Change order of include to accomodate libcddb. Make distcheck now works. --- src/cdinfo.c | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/src/cdinfo.c b/src/cdinfo.c index 38a262d5..2bc967cf 100644 --- a/src/cdinfo.c +++ b/src/cdinfo.c @@ -1,5 +1,5 @@ /* - $Id: cdinfo.c,v 1.8 2003/04/14 04:26:17 rocky Exp $ + $Id: cdinfo.c,v 1.9 2003/04/14 04:58:49 rocky Exp $ Copyright (C) 2003 Rocky Bernstein Copyright (C) 1996,1997,1998 Gerd Knorr @@ -40,6 +40,16 @@ #define POPT_ARGFLAG_OPTIONAL 0 #endif +#include "config.h" + +#ifdef HAVE_CDDB +#include +#endif + +#include "cdio.h" +#include "logging.h" +#include "util.h" + #include #include #ifdef __linux__ @@ -53,15 +63,6 @@ #include #include -#include "config.h" -#include "cdio.h" -#include "logging.h" -#include "util.h" - -#ifdef HAVE_CDDB -#include -#endif - #ifdef ENABLE_NLS #include # include @@ -232,18 +233,20 @@ typedef enum } source_image_t; #ifdef HAVE_CDDB -bool no_cddb = false; #endif /* Used by `main' to communicate with `parse_opt'. And global options */ struct arguments { - bool no_tracks; - bool no_ioctl; - bool no_analysis; + int no_tracks; + int no_ioctl; + int no_analysis; +#ifdef HAVE_CDDB + int no_cddb; +#endif int debug_level; - bool silent; + int silent; source_image_t source_image; } opts; @@ -286,7 +289,7 @@ struct poptOption optionsTable[] = { "Don't filesystem analysis"}, #ifdef HAVE_CDDB - {"nocddb", 'a', POPT_ARG_NONE, &no_cddb, 0, + {"nocddb", 'a', POPT_ARG_NONE, &opts.no_cddb, 0, "Don't look up audio CDDB information or print that"}, #endif @@ -754,7 +757,7 @@ print_analysis(int fs, int num_audio) if (num_audio > 0) { printf("Audio CD, CDDB disc ID is %08lx\n", cddb_discid()); #ifdef HAVE_CDDB - if (!no_cddb) print_cddb_info(); + if (!opts.no_cddb) print_cddb_info(); #endif } break; @@ -842,9 +845,10 @@ main(int argc, const char *argv[]) /* Default option values. */ opts.silent = false; opts.debug_level = 0; - opts.no_tracks = false; - opts.no_ioctl = false; - opts.no_analysis = false; + opts.no_tracks = 0; + opts.no_cddb = 0; + opts.no_ioctl = 0; + opts.no_analysis = 0; opts.source_image = IMAGE_UNKNOWN;