From 11d4eb000c3a49bacc69bbbbe5d7bb7750e58414 Mon Sep 17 00:00:00 2001 From: rocky Date: Sun, 21 Sep 2003 03:35:39 +0000 Subject: [PATCH] Add options processing to cd-read. Had not very useful output on mode1 format1 test. --- NEWS | 3 +- src/cd-info.c | 170 +++++++-------- src/cd-read.c | 444 ++++++++++++++++++++++++++++++++++++--- test/check_cd_read.sh | 6 +- test/isofs-m1-read.right | 275 +++++++++++------------- 5 files changed, 633 insertions(+), 265 deletions(-) diff --git a/NEWS b/NEWS index 24567437..1e570684 100644 --- a/NEWS +++ b/NEWS @@ -1,9 +1,10 @@ 0.64 - Add/expose routines to get/set time. time is reported back in entry - stat. Routines to creat IS0-9660 directories and entries must now + stat. Routines to create ISO-9660 directories and entries must now supply the time to set on the entry. - cd-info: now displays date on iso9660 listing and translates filename to normal conventions +- cd-read: new program to help diagnose reading problems. - Document more functions. 0.63 diff --git a/src/cd-info.c b/src/cd-info.c index d04bd3cf..cdced168 100644 --- a/src/cd-info.c +++ b/src/cd-info.c @@ -1,5 +1,5 @@ /* - $Id: cd-info.c,v 1.34 2003/09/14 09:34:18 rocky Exp $ + $Id: cd-info.c,v 1.35 2003/09/21 03:35:40 rocky Exp $ Copyright (C) 2003 Rocky Bernstein Copyright (C) 1996,1997,1998 Gerd Knorr @@ -187,86 +187,6 @@ enum { char *temp_str; -struct poptOption optionsTable[] = { - {"debug", 'd', POPT_ARG_INT, &opts.debug_level, 0, - "Set debugging to LEVEL"}, - - {"quiet", 'q', POPT_ARG_NONE, &opts.silent, 0, - "Don't produce warning output" }, - - {"no-tracks", 'T', POPT_ARG_NONE, &opts.no_tracks, 0, - "Don't show track information"}, - - {"no-analyze", 'A', POPT_ARG_NONE, &opts.no_analysis, 0, - "Don't filesystem analysis"}, - -#ifdef HAVE_CDDB - {"no-cddb", 'a', POPT_ARG_NONE, &opts.no_cddb, 0, - "Don't look up audio CDDB information or print that"}, - - {"cddb-port", 'P', POPT_ARG_INT, &opts.cddb_port, 0, - "CDDB port number to use (default 8880)"}, - - {"cddb-http", 'H', POPT_ARG_NONE, &opts.cddb_http, 0, - "Lookup CDDB via HTTP proxy (default no proxy)"}, - - {"cddb-server", '\0', POPT_ARG_STRING, &opts.cddb_server, 0, - "CDDB server to contact for information (default: freedb.freedb.org)"}, - - {"cddb-cache", '\0', POPT_ARG_STRING, &opts.cddb_cachedir, 0, - "Location of CDDB cache directory (default ~/.cddbclient)"}, - - {"cddb-email", '\0', POPT_ARG_STRING, &opts.cddb_email, 0, - "Email address to give CDDB server (default me@home"}, - - {"no-cddb-cache", '\0', POPT_ARG_NONE, &opts.cddb_disable_cache, 0, - "Lookup CDDB via HTTP proxy (default no proxy)"}, - - {"cddb-timeout", '\0', POPT_ARG_INT, &opts.cddb_timeout, 0, - "CDDB timeout value in seconds (default 10 seconds)"}, - -#endif - -#ifdef HAVE_VCDINFO - {"no-vcd", 'v', POPT_ARG_NONE, &opts.no_vcd, 0, - "Don't look up Video CD information"}, -#else - {"no-vcd", 'v', POPT_ARG_NONE, &opts.no_vcd, 0, - "Don't look up Video CD information - for this build, this is always set"}, -#endif - {"no-ioctl", 'I', POPT_ARG_NONE, &opts.no_ioctl, 0, - "Don't show ioctl() information"}, - - {"bin-file", 'b', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, - OP_SOURCE_BIN, "set \"bin\" CD-ROM disk image file as source", "FILE"}, - - {"cue-file", 'c', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, - OP_SOURCE_CUE, "set \"cue\" CD-ROM disk image file as source", "FILE"}, - - {"input", 'i', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, - OP_SOURCE_AUTO, - "set source and determine if \"bin\" image or device", "FILE"}, - - {"iso9660", '\0', POPT_ARG_NONE, &opts.print_iso9660, 0, - "print directory contents of any ISO-9660 filesystems"}, - - {"cdrom-device", 'C', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, - OP_SOURCE_DEVICE, - "set CD-ROM device as source", "DEVICE"}, - - {"no-header", '\0', POPT_ARG_NONE, &opts.no_header, - 0, "Don't display header and copyright (for regression testing)"}, - - {"nrg-file", 'N', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, - OP_SOURCE_NRG, "set Nero CD-ROM disk image file as source", "FILE"}, - - {"quiet", 'q', POPT_ARG_NONE, &opts.silent, 0, - "show only critical messages"}, - - {"version", 'V', POPT_ARG_NONE, &opts.version_only, 0, - "display version and copyright information and exit"}, - POPT_AUTOHELP {NULL, 0, 0, NULL, 0} -}; #define DEV_PREFIX "/dev/" static char * @@ -287,12 +207,93 @@ fillout_device_name(const char *device_name) } -/* Parse a single option. */ +/* Parse a all options. */ static bool -parse_options (poptContext optCon) +parse_options (int argc, const char *argv[]) { int opt; + struct poptOption optionsTable[] = { + {"debug", 'd', POPT_ARG_INT, &opts.debug_level, 0, + "Set debugging to LEVEL"}, + + {"quiet", 'q', POPT_ARG_NONE, &opts.silent, 0, + "Don't produce warning output" }, + + {"no-tracks", 'T', POPT_ARG_NONE, &opts.no_tracks, 0, + "Don't show track information"}, + + {"no-analyze", 'A', POPT_ARG_NONE, &opts.no_analysis, 0, + "Don't filesystem analysis"}, + +#ifdef HAVE_CDDB + {"no-cddb", 'a', POPT_ARG_NONE, &opts.no_cddb, 0, + "Don't look up audio CDDB information or print that"}, + + {"cddb-port", 'P', POPT_ARG_INT, &opts.cddb_port, 0, + "CDDB port number to use (default 8880)"}, + + {"cddb-http", 'H', POPT_ARG_NONE, &opts.cddb_http, 0, + "Lookup CDDB via HTTP proxy (default no proxy)"}, + + {"cddb-server", '\0', POPT_ARG_STRING, &opts.cddb_server, 0, + "CDDB server to contact for information (default: freedb.freedb.org)"}, + + {"cddb-cache", '\0', POPT_ARG_STRING, &opts.cddb_cachedir, 0, + "Location of CDDB cache directory (default ~/.cddbclient)"}, + + {"cddb-email", '\0', POPT_ARG_STRING, &opts.cddb_email, 0, + "Email address to give CDDB server (default me@home"}, + + {"no-cddb-cache", '\0', POPT_ARG_NONE, &opts.cddb_disable_cache, 0, + "Lookup CDDB via HTTP proxy (default no proxy)"}, + + {"cddb-timeout", '\0', POPT_ARG_INT, &opts.cddb_timeout, 0, + "CDDB timeout value in seconds (default 10 seconds)"}, +#endif + +#ifdef HAVE_VCDINFO + {"no-vcd", 'v', POPT_ARG_NONE, &opts.no_vcd, 0, + "Don't look up Video CD information"}, +#else + {"no-vcd", 'v', POPT_ARG_NONE, &opts.no_vcd, 0, + "Don't look up Video CD information - for this build, this is always set"}, +#endif + {"no-ioctl", 'I', POPT_ARG_NONE, &opts.no_ioctl, 0, + "Don't show ioctl() information"}, + + {"bin-file", 'b', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, + OP_SOURCE_BIN, "set \"bin\" CD-ROM disk image file as source", "FILE"}, + + {"cue-file", 'c', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, + OP_SOURCE_CUE, "set \"cue\" CD-ROM disk image file as source", "FILE"}, + + {"input", 'i', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, + OP_SOURCE_AUTO, + "set source and determine if \"bin\" image or device", "FILE"}, + + {"iso9660", '\0', POPT_ARG_NONE, &opts.print_iso9660, 0, + "print directory contents of any ISO-9660 filesystems"}, + + {"cdrom-device", 'C', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, + OP_SOURCE_DEVICE, + "set CD-ROM device as source", "DEVICE"}, + + {"no-header", '\0', POPT_ARG_NONE, &opts.no_header, + 0, "Don't display header and copyright (for regression testing)"}, + + {"nrg-file", 'N', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &source_name, + OP_SOURCE_NRG, "set Nero CD-ROM disk image file as source", "FILE"}, + + {"quiet", 'q', POPT_ARG_NONE, &opts.silent, 0, + "show only critical messages"}, + + {"version", 'V', POPT_ARG_NONE, &opts.version_only, 0, + "display version and copyright information and exit"}, + POPT_AUTOHELP {NULL, 0, 0, NULL, 0} + }; + poptContext optCon = poptGetContext (NULL, argc, argv, optionsTable, 0); + while ((opt = poptGetNextOpt (optCon)) != -1) { switch (opt) { @@ -830,7 +831,6 @@ main(int argc, const char *argv[]) int first_data = -1; /* # of first data track */ int first_audio = -1; /* # of first audio track */ cdio_analysis_t cdio_analysis; - poptContext optCon = poptGetContext (NULL, argc, argv, optionsTable, 0); memset(&cdio_analysis, 0, sizeof(cdio_analysis)); @@ -869,7 +869,7 @@ main(int argc, const char *argv[]) /* Parse our arguments; every option seen by `parse_opt' will be reflected in `arguments'. */ - parse_options(optCon); + parse_options(argc, argv); print_version(opts.version_only); diff --git a/src/cd-read.c b/src/cd-read.c index fdec905b..170459eb 100644 --- a/src/cd-read.c +++ b/src/cd-read.c @@ -1,5 +1,5 @@ /* - $Id: cd-read.c,v 1.3 2003/09/19 04:36:06 rocky Exp $ + $Id: cd-read.c,v 1.4 2003/09/21 03:35:40 rocky Exp $ Copyright (C) 2003 Rocky Bernstein @@ -28,24 +28,143 @@ #include #include #include +#ifdef HAVE_STDLIB_H #include +#endif +#ifdef HAVE_STRING_H +#include +#endif #include +#include +/* Accomodate to older popt that doesn't support the "optional" flag */ +#ifndef POPT_ARGFLAG_OPTIONAL +#define POPT_ARGFLAG_OPTIONAL 0 +#endif + +#ifdef ENABLE_NLS +#include +# include +# define _(String) dgettext ("cdinfo", String) +#else +/* Stubs that do something close enough. */ +# define _(String) (String) +#endif + +/* The following test is to work around the gross typo in + systems like Sony NEWS-OS Release 4.0C, whereby EXIT_FAILURE + is defined to 0, not 1. */ +#if !EXIT_FAILURE +# undef EXIT_FAILURE +# define EXIT_FAILURE 1 +#endif + +#ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +#endif + +#define err_exit(fmt, args...) \ + fprintf(stderr, "%s: "fmt, program_name, ##args); \ + myexit(cdio, EXIT_FAILURE) + +char *source_name = NULL; +char *program_name; + +typedef enum +{ + IMAGE_AUTO, + IMAGE_DEVICE, + IMAGE_BIN, + IMAGE_CUE, + IMAGE_NRG, + IMAGE_UNKNOWN +} source_image_t; + +/* Configuration option codes */ +enum { + + /* These correspond to driver_id_t in cdio.h and have to MATCH! */ + OP_SOURCE_UNDEF = DRIVER_UNKNOWN, + OP_SOURCE_AUTO, + OP_SOURCE_BIN, + OP_SOURCE_CUE, + OP_SOURCE_NRG = DRIVER_NRG, + OP_SOURCE_DEVICE = DRIVER_DEVICE, + + /* These are the remaining configuration options */ + OP_READ_MODE, + OP_VERSION, + +}; + +typedef enum +{ + READ_MODE_UNINIT, + READ_AUDIO, + READ_M1F1, + READ_M1F2, + READ_M2F1, + READ_M2F2 +} read_mode_t; + +/* Structure used so we can binary sort and set the --mode switch. */ +typedef struct +{ + char name[30]; + read_mode_t read_mode; + lsn_t start_lsn; +} subopt_entry_t; + + +/* Sub-options for --mode. Note: entries must be sorted! */ +subopt_entry_t modes_sublist[] = { + {"audio", READ_AUDIO}, + {"m1f1", READ_M1F1}, + {"m1f2", READ_M1F2}, + {"m2f1", READ_M2F1}, + {"m2f2", READ_M2F2}, + {"mode1form1", READ_M1F1}, + {"mode1form2", READ_M1F2}, + {"mode2form1", READ_M2F1}, + {"mode2form2", READ_M2F2}, + {"red", READ_AUDIO}, +}; + +/* Used by `main' to communicate with `parse_opt'. And global options + */ +struct arguments +{ + int debug_level; + read_mode_t read_mode; + int version_only; + int no_header; + int print_iso9660; + source_image_t source_image; + lsn_t start_lsn; +} opts; + +/* Comparison function called by bearch() to find sub-option record. */ +static int +compare_subopts(const void *key1, const void *key2) +{ + subopt_entry_t *a = (subopt_entry_t *) key1; + subopt_entry_t *b = (subopt_entry_t *) key2; + return (strncmp(a->name, b->name, 30)); +} + /* CDIO logging routines */ static cdio_log_handler_t gl_default_cdio_log_handler = NULL; -static int debug_level = 0; - static void _log_handler (cdio_log_level_t level, const char message[]) { - if (level == CDIO_LOG_DEBUG && debug_level < 3) + if (level == CDIO_LOG_DEBUG && opts.debug_level < 3) return; - if (level == CDIO_LOG_INFO && debug_level < 2) + if (level == CDIO_LOG_INFO && opts.debug_level < 2) return; - if (level == CDIO_LOG_WARN && debug_level < 1) + if (level == CDIO_LOG_WARN && opts.debug_level < 1) return; gl_default_cdio_log_handler (level, message); @@ -75,44 +194,311 @@ hexdump (uint8_t * buffer, unsigned int len) printf ("\n"); } +/* Do processing of a --mode sub option. + Basically we find the option in the array, set it's corresponding + flag variable to true as well as the "show.all" false. +*/ +static void +process_suboption(const char *subopt, subopt_entry_t *sublist, const int num, + const char *subopt_name) +{ + subopt_entry_t *subopt_rec = + bsearch(subopt, sublist, num, sizeof(subopt_entry_t), + &compare_subopts); + if (subopt_rec != NULL) { + opts.read_mode = subopt_rec->read_mode; + return; + } else { + unsigned int i; + bool is_help=strcmp(subopt, "help")==0; + if (is_help) { + fprintf (stderr, "The list of sub options for \"%s\" are:\n", + subopt_name); + } else { + fprintf (stderr, "Invalid option following \"%s\": %s.\n", + subopt_name, subopt); + fprintf (stderr, "Should be one of: "); + } + for (i=0; i # @@ -33,14 +33,14 @@ BASE=`basename $0 .sh` fname=cdda testnum=CD-DA -test_cd_read "${srcdir}/${fname}.cue 1 0" \ +test_cd_read "-c ${srcdir}/${fname}.cue --mode=red --start=0" \ ${fname}-read.dump ${srcdir}/${fname}-read.right RC=$? check_result $RC "cd-read CUE test $testnum" fname=isofs-m1 testnum=MODE1 -test_cd_read "${srcdir}/${fname}.cue 1 0" \ +test_cd_read "-i ${srcdir}/${fname}.cue --mode m1f1 -s 26" \ ${fname}-read.dump ${srcdir}/${fname}-read.right RC=$? check_result $RC "cd-read CUE test $testnum" diff --git a/test/isofs-m1-read.right b/test/isofs-m1-read.right index 504f325d..7d14446b 100644 --- a/test/isofs-m1-read.right +++ b/test/isofs-m1-read.right @@ -1,148 +1,129 @@ -0x0000: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0010: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0020: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0030: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0100: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0110: 00ff ffff ffff ffff ffff ff00 0002 0001 ................ -0x0120: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0140: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0150: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0160: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0170: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0180: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0190: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x01a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x01b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x01c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x01d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x01e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x01f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0200: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0210: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0220: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0230: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0240: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0250: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0260: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0270: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0280: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0290: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x02a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x02b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x02c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x02d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x02e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x02f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0300: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0310: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0320: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0330: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0340: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0350: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0360: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0370: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0380: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0390: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x03a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x03b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x03c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x03d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x03e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x03f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0400: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0410: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0420: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0430: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0440: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0450: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0460: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0470: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0480: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0490: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x04a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x04b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x04c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x04d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x04e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x04f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0500: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0510: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0520: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0530: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0540: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0550: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0560: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0570: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0580: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0590: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x05a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x05b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x05c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x05d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x05e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x05f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0600: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0610: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0620: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0630: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0640: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0650: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0660: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0670: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0680: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0690: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x06a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x06b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x06c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x06d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x06e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x06f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0700: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0710: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0720: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0730: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0740: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0750: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0760: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0770: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0780: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0790: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x07a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x07b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x07c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x07d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x07e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x07f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0800: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0810: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0820: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0830: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0840: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0850: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0860: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0870: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0880: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0890: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x08a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x08b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x08c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x08d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x08e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x08f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0900: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0910: 0000 0000 0000 0000 0000 0000 0000 0000 ................ -0x0920: c513 682b 0000 0000 0000 0000 00f7 00f5 ..h+............ +0x0000: 0909 2020 2020 474e 5520 4745 4e45 5241 .. GNU GENERA +0x0010: 4c20 5055 424c 4943 204c 4943 454e 5345 L PUBLIC LICENSE +0x0020: 0a09 0920 2020 2020 2020 5665 7273 696f ... Versio +0x0030: 6e20 322c 204a 756e 6520 3139 3931 0a0a n 2, June 1991.. +0x0040: 2043 6f70 7972 6967 6874 2028 4329 2031 Copyright (C) 1 +0x0050: 3938 392c 2031 3939 3120 4672 6565 2053 989, 1991 Free S +0x0060: 6f66 7477 6172 6520 466f 756e 6461 7469 oftware Foundati +0x0070: 6f6e 2c20 496e 632e 0a20 2020 2020 3539 on, Inc.. 59 +0x0080: 2054 656d 706c 6520 506c 6163 652c 2053 Temple Place, S +0x0090: 7569 7465 2033 3330 2c20 426f 7374 6f6e uite 330, Boston +0x00a0: 2c20 4d41 2020 3032 3131 312d 3133 3037 , MA 02111-1307 +0x00b0: 2020 5553 410a 2045 7665 7279 6f6e 6520 USA. Everyone +0x00c0: 6973 2070 6572 6d69 7474 6564 2074 6f20 is permitted to +0x00d0: 636f 7079 2061 6e64 2064 6973 7472 6962 copy and distrib +0x00e0: 7574 6520 7665 7262 6174 696d 2063 6f70 ute verbatim cop +0x00f0: 6965 730a 206f 6620 7468 6973 206c 6963 ies. of this lic +0x0100: 656e 7365 2064 6f63 756d 656e 742c 2062 ense document, b +0x0110: 7574 2063 6861 6e67 696e 6720 6974 2069 ut changing it i +0x0120: 7320 6e6f 7420 616c 6c6f 7765 642e 0a0a s not allowed... +0x0130: 0909 0920 2020 2050 7265 616d 626c 650a ... Preamble. +0x0140: 0a20 2054 6865 206c 6963 656e 7365 7320 . The licenses +0x0150: 666f 7220 6d6f 7374 2073 6f66 7477 6172 for most softwar +0x0160: 6520 6172 6520 6465 7369 676e 6564 2074 e are designed t +0x0170: 6f20 7461 6b65 2061 7761 7920 796f 7572 o take away your +0x0180: 0a66 7265 6564 6f6d 2074 6f20 7368 6172 .freedom to shar +0x0190: 6520 616e 6420 6368 616e 6765 2069 742e e and change it. +0x01a0: 2020 4279 2063 6f6e 7472 6173 742c 2074 By contrast, t +0x01b0: 6865 2047 4e55 2047 656e 6572 616c 2050 he GNU General P +0x01c0: 7562 6c69 630a 4c69 6365 6e73 6520 6973 ublic.License is +0x01d0: 2069 6e74 656e 6465 6420 746f 2067 7561 intended to gua +0x01e0: 7261 6e74 6565 2079 6f75 7220 6672 6565 rantee your free +0x01f0: 646f 6d20 746f 2073 6861 7265 2061 6e64 dom to share and +0x0200: 2063 6861 6e67 6520 6672 6565 0a73 6f66 change free.sof +0x0210: 7477 6172 652d 2d74 6f20 6d61 6b65 2073 tware--to make s +0x0220: 7572 6520 7468 6520 736f 6674 7761 7265 ure the software +0x0230: 2069 7320 6672 6565 2066 6f72 2061 6c6c is free for all +0x0240: 2069 7473 2075 7365 7273 2e20 2054 6869 its users. Thi +0x0250: 730a 4765 6e65 7261 6c20 5075 626c 6963 s.General Public +0x0260: 204c 6963 656e 7365 2061 7070 6c69 6573 License applies +0x0270: 2074 6f20 6d6f 7374 206f 6620 7468 6520 to most of the +0x0280: 4672 6565 2053 6f66 7477 6172 650a 466f Free Software.Fo +0x0290: 756e 6461 7469 6f6e 2773 2073 6f66 7477 undation's softw +0x02a0: 6172 6520 616e 6420 746f 2061 6e79 206f are and to any o +0x02b0: 7468 6572 2070 726f 6772 616d 2077 686f ther program who +0x02c0: 7365 2061 7574 686f 7273 2063 6f6d 6d69 se authors commi +0x02d0: 7420 746f 0a75 7369 6e67 2069 742e 2020 t to.using it. +0x02e0: 2853 6f6d 6520 6f74 6865 7220 4672 6565 (Some other Free +0x02f0: 2053 6f66 7477 6172 6520 466f 756e 6461 Software Founda +0x0300: 7469 6f6e 2073 6f66 7477 6172 6520 6973 tion software is +0x0310: 2063 6f76 6572 6564 2062 790a 7468 6520 covered by.the +0x0320: 474e 5520 4c69 6272 6172 7920 4765 6e65 GNU Library Gene +0x0330: 7261 6c20 5075 626c 6963 204c 6963 656e ral Public Licen +0x0340: 7365 2069 6e73 7465 6164 2e29 2020 596f se instead.) Yo +0x0350: 7520 6361 6e20 6170 706c 7920 6974 2074 u can apply it t +0x0360: 6f0a 796f 7572 2070 726f 6772 616d 732c o.your programs, +0x0370: 2074 6f6f 2e0a 0a20 2057 6865 6e20 7765 too... When we +0x0380: 2073 7065 616b 206f 6620 6672 6565 2073 speak of free s +0x0390: 6f66 7477 6172 652c 2077 6520 6172 6520 oftware, we are +0x03a0: 7265 6665 7272 696e 6720 746f 2066 7265 referring to fre +0x03b0: 6564 6f6d 2c20 6e6f 740a 7072 6963 652e edom, not.price. +0x03c0: 2020 4f75 7220 4765 6e65 7261 6c20 5075 Our General Pu +0x03d0: 626c 6963 204c 6963 656e 7365 7320 6172 blic Licenses ar +0x03e0: 6520 6465 7369 676e 6564 2074 6f20 6d61 e designed to ma +0x03f0: 6b65 2073 7572 6520 7468 6174 2079 6f75 ke sure that you +0x0400: 0a68 6176 6520 7468 6520 6672 6565 646f .have the freedo +0x0410: 6d20 746f 2064 6973 7472 6962 7574 6520 m to distribute +0x0420: 636f 7069 6573 206f 6620 6672 6565 2073 copies of free s +0x0430: 6f66 7477 6172 6520 2861 6e64 2063 6861 oftware (and cha +0x0440: 7267 6520 666f 720a 7468 6973 2073 6572 rge for.this ser +0x0450: 7669 6365 2069 6620 796f 7520 7769 7368 vice if you wish +0x0460: 292c 2074 6861 7420 796f 7520 7265 6365 ), that you rece +0x0470: 6976 6520 736f 7572 6365 2063 6f64 6520 ive source code +0x0480: 6f72 2063 616e 2067 6574 2069 740a 6966 or can get it.if +0x0490: 2079 6f75 2077 616e 7420 6974 2c20 7468 you want it, th +0x04a0: 6174 2079 6f75 2063 616e 2063 6861 6e67 at you can chang +0x04b0: 6520 7468 6520 736f 6674 7761 7265 206f e the software o +0x04c0: 7220 7573 6520 7069 6563 6573 206f 6620 r use pieces of +0x04d0: 6974 0a69 6e20 6e65 7720 6672 6565 2070 it.in new free p +0x04e0: 726f 6772 616d 733b 2061 6e64 2074 6861 rograms; and tha +0x04f0: 7420 796f 7520 6b6e 6f77 2079 6f75 2063 t you know you c +0x0500: 616e 2064 6f20 7468 6573 6520 7468 696e an do these thin +0x0510: 6773 2e0a 0a20 2054 6f20 7072 6f74 6563 gs... To protec +0x0520: 7420 796f 7572 2072 6967 6874 732c 2077 t your rights, w +0x0530: 6520 6e65 6564 2074 6f20 6d61 6b65 2072 e need to make r +0x0540: 6573 7472 6963 7469 6f6e 7320 7468 6174 estrictions that +0x0550: 2066 6f72 6269 640a 616e 796f 6e65 2074 forbid.anyone t +0x0560: 6f20 6465 6e79 2079 6f75 2074 6865 7365 o deny you these +0x0570: 2072 6967 6874 7320 6f72 2074 6f20 6173 rights or to as +0x0580: 6b20 796f 7520 746f 2073 7572 7265 6e64 k you to surrend +0x0590: 6572 2074 6865 2072 6967 6874 732e 0a54 er the rights..T +0x05a0: 6865 7365 2072 6573 7472 6963 7469 6f6e hese restriction +0x05b0: 7320 7472 616e 736c 6174 6520 746f 2063 s translate to c +0x05c0: 6572 7461 696e 2072 6573 706f 6e73 6962 ertain responsib +0x05d0: 696c 6974 6965 7320 666f 7220 796f 7520 ilities for you +0x05e0: 6966 2079 6f75 0a64 6973 7472 6962 7574 if you.distribut +0x05f0: 6520 636f 7069 6573 206f 6620 7468 6520 e copies of the +0x0600: 736f 6674 7761 7265 2c20 6f72 2069 6620 software, or if +0x0610: 796f 7520 6d6f 6469 6679 2069 742e 0a0a you modify it... +0x0620: 2020 466f 7220 6578 616d 706c 652c 2069 For example, i +0x0630: 6620 796f 7520 6469 7374 7269 6275 7465 f you distribute +0x0640: 2063 6f70 6965 7320 6f66 2073 7563 6820 copies of such +0x0650: 6120 7072 6f67 7261 6d2c 2077 6865 7468 a program, wheth +0x0660: 6572 0a67 7261 7469 7320 6f72 2066 6f72 er.gratis or for +0x0670: 2061 2066 6565 2c20 796f 7520 6d75 7374 a fee, you must +0x0680: 2067 6976 6520 7468 6520 7265 6369 7069 give the recipi +0x0690: 656e 7473 2061 6c6c 2074 6865 2072 6967 ents all the rig +0x06a0: 6874 7320 7468 6174 0a79 6f75 2068 6176 hts that.you hav +0x06b0: 652e 2020 596f 7520 6d75 7374 206d 616b e. You must mak +0x06c0: 6520 7375 7265 2074 6861 7420 7468 6579 e sure that they +0x06d0: 2c20 746f 6f2c 2072 6563 6569 7665 206f , too, receive o +0x06e0: 7220 6361 6e20 6765 7420 7468 650a 736f r can get the.so +0x06f0: 7572 6365 2063 6f64 652e 2020 416e 6420 urce code. And +0x0700: 796f 7520 6d75 7374 2073 686f 7720 7468 you must show th +0x0710: 656d 2074 6865 7365 2074 6572 6d73 2073 em these terms s +0x0720: 6f20 7468 6579 206b 6e6f 7720 7468 6569 o they know thei +0x0730: 720a 7269 6768 7473 2e0a 0a20 2057 6520 r.rights... We +0x0740: 7072 6f74 6563 7420 796f 7572 2072 6967 protect your rig +0x0750: 6874 7320 7769 7468 2074 776f 2073 7465 hts with two ste +0x0760: 7073 3a20 2831 2920 636f 7079 7269 6768 ps: (1) copyrigh +0x0770: 7420 7468 6520 736f 6674 7761 7265 2c20 t the software, +0x0780: 616e 640a 2832 2920 6f66 6665 7220 796f and.(2) offer yo +0x0790: 7520 7468 6973 206c 6963 656e 7365 2077 u this license w +0x07a0: 6869 6368 2067 6976 6573 2079 6f75 206c hich gives you l +0x07b0: 6567 616c 2070 6572 6d69 7373 696f 6e20 egal permission +0x07c0: 746f 2063 6f70 792c 0a64 6973 7472 6962 to copy,.distrib +0x07d0: 7574 6520 616e 642f 6f72 206d 6f64 6966 ute and/or modif +0x07e0: 7920 7468 6520 736f 6674 7761 7265 2e0a y the software.. +0x07f0: 0a20 2041 6c73 6f2c 2066 6f72 2065 6163 . Also, for eac