diff --git a/src/cd-info.c b/src/cd-info.c index 65909557..14edf490 100644 --- a/src/cd-info.c +++ b/src/cd-info.c @@ -1,5 +1,5 @@ /* - $Id: cd-info.c,v 1.42 2003/10/06 04:04:05 rocky Exp $ + $Id: cd-info.c,v 1.43 2003/10/15 01:59:51 rocky Exp $ Copyright (C) 2003 Rocky Bernstein Copyright (C) 1996,1997,1998 Gerd Knorr @@ -482,7 +482,10 @@ print_iso9660_recurse (CdIo *cdio, const char pathname[], cdio_fs_anal_t fs, printf ("%s:\n", pathname); - cdio_assert (entlist != NULL); + if (NULL == entlist) { + fprintf (stderr, "Error getting above directory information\n"); + return; + } /* Iterate over files in this directory */ @@ -500,8 +503,11 @@ print_iso9660_recurse (CdIo *cdio, const char pathname[], cdio_fs_anal_t fs, snprintf (_fullname, sizeof (_fullname), "%s%s", pathname, iso_name); - if (iso9660_fs_stat (cdio, _fullname, &statbuf, is_mode2)) - cdio_assert_not_reached (); + if (iso9660_fs_stat (cdio, _fullname, &statbuf, is_mode2)) { + fprintf(stderr, "Error getting file info for directory %s/\n", + _fullname); + continue; + } strncat (_fullname, "/", sizeof (_fullname)); @@ -535,7 +541,7 @@ print_iso9660_recurse (CdIo *cdio, const char pathname[], cdio_fs_anal_t fs, printf ("\n"); - /* Now wecurse over the directories. */ + /* Now recurse over the directories. */ _CDIO_LIST_FOREACH (entnode, dirlist) { @@ -815,7 +821,7 @@ main(int argc, const char *argv[]) printf(STRONG "CD-ROM Track List (%i - %i)\n" NORMAL, first_track_num, num_tracks); - printf(" #: MSF LSN Type\n"); + printf(" #: MSF LSN Type Green?\n"); } /* Read and possibly print track information. */ @@ -834,12 +840,12 @@ main(int argc, const char *argv[]) (long unsigned int) cdio_msf_to_lsn(&msf)); break; } else if (!opts.no_tracks) { - printf("%3d: %2.2x:%2.2x:%2.2x %06lu %s\n", + printf("%3d: %2.2x:%2.2x:%2.2x %06lu %-5s %s\n", (int) i, msf.m, msf.s, msf.f, (long unsigned int) cdio_msf_to_lsn(&msf), - track_format2str[cdio_get_track_format(cdio, i)]); - + track_format2str[cdio_get_track_format(cdio, i)], + cdio_get_track_green(cdio, i)? "true" : "false"); } if (TRACK_FORMAT_AUDIO == cdio_get_track_format(cdio, i)) { diff --git a/src/cd-read.c b/src/cd-read.c index 830dacd7..6fe9e258 100644 --- a/src/cd-read.c +++ b/src/cd-read.c @@ -1,5 +1,5 @@ /* - $Id: cd-read.c,v 1.10 2003/10/03 01:33:30 rocky Exp $ + $Id: cd-read.c,v 1.11 2003/10/15 01:59:51 rocky Exp $ Copyright (C) 2003 Rocky Bernstein @@ -57,6 +57,9 @@ typedef enum READ_M1F2, READ_M2F1, READ_M2F2 +#if AUTO_FINISHED + READ_AUTO +#endif } read_mode_t; /* Structure used so we can binary sort and set the --mode switch. */ @@ -481,6 +484,15 @@ main(int argc, const char *argv[]) blocklen=M2F2_SECTOR_SIZE; cdio_read_mode2_sector(cdio, &buffer, opts.start_lsn, true); break; +#if AUTO_FINISHED + case READ_AUTO: + /* Find what track lsn is in. Then + switch cdio_get_track_format(cdio, i) + and also test using is_green + + */ + break; +#endif case READ_MODE_UNINIT: err_exit("%s: Reading mode not set\n", program_name); break; diff --git a/test/cdda.right b/test/cdda.right index 48d63b0a..a8172c89 100644 --- a/test/cdda.right +++ b/test/cdda.right @@ -3,8 +3,8 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ CD-ROM Track List (1 - 1) - #: MSF LSN Type - 1: 00:02:00 000000 audio + #: MSF LSN Type Green? + 1: 00:02:00 000000 audio false 170: 00:06:02 000302 leadout Media Catalog Number (MCN): not available __________________________________ diff --git a/test/check_opts2.right b/test/check_opts2.right index b9aa8ed7..ee529fe9 100644 --- a/test/check_opts2.right +++ b/test/check_opts2.right @@ -3,7 +3,7 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ CD-ROM Track List (1 - 1) - #: MSF LSN Type - 1: 00:02:00 000000 data + #: MSF LSN Type Green? + 1: 00:02:00 000000 data false 170: 00:06:02 000302 leadout Media Catalog Number (MCN): 0000010271955 diff --git a/test/check_opts3.right b/test/check_opts3.right index b9aa8ed7..ee529fe9 100644 --- a/test/check_opts3.right +++ b/test/check_opts3.right @@ -3,7 +3,7 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ CD-ROM Track List (1 - 1) - #: MSF LSN Type - 1: 00:02:00 000000 data + #: MSF LSN Type Green? + 1: 00:02:00 000000 data false 170: 00:06:02 000302 leadout Media Catalog Number (MCN): 0000010271955 diff --git a/test/check_opts4.right b/test/check_opts4.right index f4d9d616..b9f8060c 100644 --- a/test/check_opts4.right +++ b/test/check_opts4.right @@ -3,8 +3,8 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ CD-ROM Track List (1 - 1) - #: MSF LSN Type - 1: 00:02:00 000000 data + #: MSF LSN Type Green? + 1: 00:02:00 000000 data false 170: 00:06:02 000302 leadout Media Catalog Number (MCN): 0000010271955 __________________________________ diff --git a/test/check_opts5.right b/test/check_opts5.right index f4d9d616..b9f8060c 100644 --- a/test/check_opts5.right +++ b/test/check_opts5.right @@ -3,8 +3,8 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ CD-ROM Track List (1 - 1) - #: MSF LSN Type - 1: 00:02:00 000000 data + #: MSF LSN Type Green? + 1: 00:02:00 000000 data false 170: 00:06:02 000302 leadout Media Catalog Number (MCN): 0000010271955 __________________________________ diff --git a/test/check_opts6.right b/test/check_opts6.right index f4d9d616..b9f8060c 100644 --- a/test/check_opts6.right +++ b/test/check_opts6.right @@ -3,8 +3,8 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ CD-ROM Track List (1 - 1) - #: MSF LSN Type - 1: 00:02:00 000000 data + #: MSF LSN Type Green? + 1: 00:02:00 000000 data false 170: 00:06:02 000302 leadout Media Catalog Number (MCN): 0000010271955 __________________________________ diff --git a/test/check_opts7.right b/test/check_opts7.right index f4d9d616..b9f8060c 100644 --- a/test/check_opts7.right +++ b/test/check_opts7.right @@ -3,8 +3,8 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ CD-ROM Track List (1 - 1) - #: MSF LSN Type - 1: 00:02:00 000000 data + #: MSF LSN Type Green? + 1: 00:02:00 000000 data false 170: 00:06:02 000302 leadout Media Catalog Number (MCN): 0000010271955 __________________________________ diff --git a/test/isofs-m1.right b/test/isofs-m1.right index 09a607f6..1698f9c9 100644 --- a/test/isofs-m1.right +++ b/test/isofs-m1.right @@ -3,8 +3,8 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ CD-ROM Track List (1 - 1) - #: MSF LSN Type - 1: 00:02:00 000000 data + #: MSF LSN Type Green? + 1: 00:02:00 000000 data false 170: 00:06:02 000302 leadout Media Catalog Number (MCN): 0000010271955 __________________________________ diff --git a/test/monvoisin.right b/test/monvoisin.right index d629885a..bc91c8f2 100644 --- a/test/monvoisin.right +++ b/test/monvoisin.right @@ -3,9 +3,9 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ CD-ROM Track List (1 - 2) - #: MSF LSN Type - 1: 00:02:00 000000 XA - 2: 00:18:51 001251 XA + #: MSF LSN Type Green? + 1: 00:02:00 000000 XA true + 2: 00:18:51 001251 XA true 170: 00:39:71 002846 leadout Media Catalog Number (MCN): not available __________________________________ diff --git a/test/svcd_ogt_test_ntsc.right b/test/svcd_ogt_test_ntsc.right index f80e3cd7..6961f669 100644 --- a/test/svcd_ogt_test_ntsc.right +++ b/test/svcd_ogt_test_ntsc.right @@ -3,9 +3,9 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ CD-ROM Track List (1 - 2) - #: MSF LSN Type - 1: 00:02:00 000000 XA - 2: 00:09:01 000526 XA + #: MSF LSN Type Green? + 1: 00:02:00 000000 XA true + 2: 00:09:01 000526 XA true 170: 00:56:56 004106 leadout Media Catalog Number (MCN): not available __________________________________ diff --git a/test/svcdgs.right b/test/svcdgs.right index 448df46c..d414ac13 100644 --- a/test/svcdgs.right +++ b/test/svcdgs.right @@ -3,9 +3,9 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ CD-ROM Track List (1 - 2) - #: MSF LSN Type - 1: 00:02:00 000000 XA - 2: 00:22:53 001553 XA + #: MSF LSN Type Green? + 1: 00:02:00 000000 XA true + 2: 00:22:53 001553 XA true 170: 01:17:62 005687 leadout Media Catalog Number (MCN): not available __________________________________ diff --git a/test/vcd_demo.right b/test/vcd_demo.right index e920f621..7a4d9b9b 100644 --- a/test/vcd_demo.right +++ b/test/vcd_demo.right @@ -3,10 +3,10 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ CD-ROM Track List (1 - 3) - #: MSF LSN Type - 1: 00:02:00 000000 XA - 2: 00:17:57 001182 XA - 3: 00:24:71 001721 XA + #: MSF LSN Type Green? + 1: 00:02:00 000000 XA true + 2: 00:17:57 001182 XA true + 3: 00:24:71 001721 XA true 170: 00:30:10 002110 leadout Media Catalog Number (MCN): not available __________________________________ diff --git a/test/vcd_demo_vcdinfo.right b/test/vcd_demo_vcdinfo.right index 942b7521..b9880847 100644 --- a/test/vcd_demo_vcdinfo.right +++ b/test/vcd_demo_vcdinfo.right @@ -3,10 +3,10 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ CD-ROM Track List (1 - 3) - #: MSF LSN Type - 1: 00:02:00 000000 XA - 2: 00:17:57 001182 XA - 3: 00:24:71 001721 XA + #: MSF LSN Type Green? + 1: 00:02:00 000000 XA true + 2: 00:17:57 001182 XA true + 3: 00:24:71 001721 XA true 170: 00:30:10 002110 leadout Media Catalog Number (MCN): not available __________________________________ diff --git a/test/videocd.right b/test/videocd.right index b487560f..4c2c6d55 100644 --- a/test/videocd.right +++ b/test/videocd.right @@ -3,12 +3,12 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ CD-ROM Track List (1 - 5) - #: MSF LSN Type - 1: 00:02:00 000000 XA - 2: 00:13:01 000826 XA - 3: 00:16:01 001051 XA - 4: 00:19:01 001276 XA - 5: 00:22:01 001501 XA + #: MSF LSN Type Green? + 1: 00:02:00 000000 XA true + 2: 00:13:01 000826 XA true + 3: 00:16:01 001051 XA true + 4: 00:19:01 001276 XA true + 5: 00:22:01 001501 XA true 170: 00:25:01 001726 leadout Media Catalog Number (MCN): not available __________________________________