I tried to run check_nrg.sh but the monvoisin.nrg is not in libcdio/test/; otherwise, the test results are the same before and after nrg.c modification--"cd-info NRG test 1 ok." before "Don't see NRG file [snap]/libcdio/test/monvoisin.nrg. Test skipped." Here is the repository I used:
:pserver:[EMAIL PROTECTED]:/sources/libcdio Please let me know how I should move the regression forward. > From: [EMAIL PROTECTED] > Date: Mon, 3 Mar 2008 07:17:13 -0500 > To: [EMAIL PROTECTED] > CC: [email protected] > Subject: RE: [Libcdio-devel] libcdio release around the ides of March? (March > 15) > > I tried applying the patch. Unfortunately it causes test/check_nrg.sh > to fail because it turns what it thought was a VCD disk into an audio > disk. If you can figure out a way to reconcile this, and come up with > a regression test (in libcdio/test) that works on both the old > existing NRG image and tests your changes, I'd like to apply your > changes. Thanks. > > As for the info_file=strdup(info_file), yes it doesn't look used. I've > removed the --output-info (-i) option altogether. Perhaps the intent > was similar to the newly added --log-summary option. > > Huang William writes: > > Hi, > > > > I would like to contribute the enclosed to diffs for > lib/driver/image/nrg.c and src/cd-paranoia/cd-paranoia.c so I can rip CDDA > tracks contained in NRG image files without using a CD drive emulator. The > nrg.c needs to recognize the size of sectors to be 2352 (98 * 24) bytes when > NRG CUEX says that a track is of audio type. The cd-paranoia.c needs an > option (I choose -N tentatively) for users to pass the NRG image file name to > the tool. I found the cd-paranoia.c statement info_file=strdup(info_file); > illogical but did not touch it. Please let me know how I should proceed. > > > > Thanks, > > > > Chekgiau Ng > > ------- > > > > Index: nrg.c > > =================================================================== > > RCS file: /sources/libcdio/libcdio/lib/driver/image/nrg.c,v > > retrieving revision 1.24 > > diff -c -r1.24 nrg.c > > *** nrg.c 27 Feb 2006 10:23:52 -0000 1.24 > > --- nrg.c 3 Mar 2008 08:35:02 -0000 > > *************** > > *** 311,317 **** > > > > sec_count = UINT32_FROM_BE (_entries[idx + 1].lsn); > > > > ! _register_mapping (p_env, lsn, sec_count*2, > > (lsn+CDIO_PREGAP_SECTORS) * M2RAW_SECTOR_SIZE, > > M2RAW_SECTOR_SIZE, TRACK_FORMAT_XA, true); > > } > > --- 311,322 ---- > > > > sec_count = UINT32_FROM_BE (_entries[idx + 1].lsn); > > > > ! if ((_entries[idx].type & 0x0f) == 0x01) > > ! _register_mapping (p_env, lsn, sec_count - lsn, > > ! (lsn + CDIO_PREGAP_SECTORS)*CDIO_CD_FRAMESIZE_RAW, > > ! CDIO_CD_FRAMESIZE_RAW, TRACK_FORMAT_AUDIO, true); > > ! else > > ! _register_mapping (p_env, lsn, sec_count*2, > > (lsn+CDIO_PREGAP_SECTORS) * M2RAW_SECTOR_SIZE, > > M2RAW_SECTOR_SIZE, TRACK_FORMAT_XA, true); > > } > > *************** > > *** 360,366 **** > > lsn = UINT32_FROM_BE (_entries[idx].lsn); > > sec_count = UINT32_FROM_BE (_entries[idx + 1].lsn); > > > > ! _register_mapping (p_env, lsn, sec_count - lsn, > > (lsn + CDIO_PREGAP_SECTORS)*M2RAW_SECTOR_SIZE, > > M2RAW_SECTOR_SIZE, TRACK_FORMAT_XA, true); > > } > > --- 365,376 ---- > > lsn = UINT32_FROM_BE (_entries[idx].lsn); > > sec_count = UINT32_FROM_BE (_entries[idx + 1].lsn); > > > > ! if ((_entries[idx].type & 0x0f) == 0x01) > > ! _register_mapping (p_env, lsn, sec_count - lsn, > > ! (lsn + CDIO_PREGAP_SECTORS)*CDIO_CD_FRAMESIZE_RAW, > > ! CDIO_CD_FRAMESIZE_RAW, TRACK_FORMAT_AUDIO, true); > > ! else > > ! _register_mapping (p_env, lsn, sec_count - lsn, > > (lsn + CDIO_PREGAP_SECTORS)*M2RAW_SECTOR_SIZE, > > M2RAW_SECTOR_SIZE, TRACK_FORMAT_XA, true); > > } > > > > Index: cd-paranoia.c > > =================================================================== > > RCS file: /sources/libcdio/libcdio/src/cd-paranoia/cd-paranoia.c,v > > retrieving revision 1.34 > > diff -c -r1.34 cd-paranoia.c > > *** cd-paranoia.c 29 Feb 2008 11:34:15 -0000 1.34 > > --- cd-paranoia.c 3 Mar 2008 08:35:43 -0000 > > *************** > > *** 547,553 **** > > } > > #endif /* !TRACE_PARANOIA */ > > > > ! const char *optstring = "aBcCd:efg:hi:l:m:n:o:O:pqQrRsS:Tt:VvwWx:XYZz::"; > > > > struct option options [] = { > > {"abort-on-skip", no_argument, NULL, 'X'}, > > --- 547,553 ---- > > } > > #endif /* !TRACE_PARANOIA */ > > > > ! const char *optstring = > "aBcCd:efg:hi:l:m:N:n:o:O:pqQrRsS:Tt:VvwWx:XYZz::"; > > > > struct option options [] = { > > {"abort-on-skip", no_argument, NULL, 'X'}, > > *************** > > *** 562,567 **** > > --- 562,568 ---- > > {"force-generic-device", required_argument, NULL, 'g'}, > > {"force-read-speed", required_argument, NULL, 'S'}, > > {"force-search-overlap", required_argument, NULL, 'o'}, > > + {"load-nrg-image", required_argument, NULL, 'N'}, > > {"help", no_argument, NULL, 'h'}, > > {"log-summary", required_argument, NULL, 'l'}, > > {"mmc-timeout", required_argument, NULL, 'm'}, > > *************** > > *** 592,597 **** > > --- 593,599 ---- > > static char *span = NULL; > > static char *force_cdrom_device = NULL; > > static char *info_file = NULL; > > + static char *nrg_image_file = NULL; > > > > #define free_and_null(p) \ > > free(p); \ > > *************** > > *** 619,624 **** > > --- 621,627 ---- > > free_and_null(force_cdrom_device); > > free_and_null(span); > > free_and_null(info_file); > > + free_and_null(nrg_image_file); > > if(logfile && logfile != stdout) { > > fclose(logfile); > > logfile = NULL; > > *************** > > *** 686,691 **** > > --- 689,696 ---- > > int search=0; > > int c,long_option_index; > > > > + CdIo_t *p_cdio=NULL; > > + > > atexit(cleanup); > > > > > while((c=getopt_long(argc,argv,optstring,options,&long_option_index))!=EOF){ > > *************** > > *** 756,761 **** > > --- 761,770 ---- > > case 'n': > > get_int_arg(c, &force_cdrom_sectors); > > break; > > + case 'N': > > + if(nrg_image_file)free(nrg_image_file); > > + nrg_image_file=strdup(optarg); > > + break; > > case 'o': > > get_int_arg(c, &force_cdrom_overlap); > > break; > > *************** > > *** 861,871 **** > > }else > > if (argv[optind]) span=strdup(argv[optind]); > > > > report(PARANOIA_VERSION); > > > > /* Query the cdrom/disc; we may need to override some settings */ > > > > ! if(force_cdrom_device) > > d=cdda_identify(force_cdrom_device,verbose,NULL); > > else { > > driver_id_t driver_id; > > --- 870,890 ---- > > }else > > if (argv[optind]) span=strdup(argv[optind]); > > > > + if(nrg_image_file) { > > + p_cdio=cdio_open_nrg(nrg_image_file); > > + if(!p_cdio) { > > + fprintf(stderr,"Cannot open image file %s as source.", > nrg_image_file); > > + exit(1); > > + } > > + } > > + > > report(PARANOIA_VERSION); > > > > /* Query the cdrom/disc; we may need to override some settings */ > > > > ! if(p_cdio) > > ! d=cdio_cddap_identify_cdio(p_cdio,verbose,NULL); > > ! else if(force_cdrom_device) > > d=cdda_identify(force_cdrom_device,verbose,NULL); > > else { > > driver_id_t driver_id; > > > > > > > > > From: [EMAIL PROTECTED] > > > Date: Thu, 28 Feb 2008 18:01:19 -0500 > > > To: [email protected] > > > CC: [EMAIL PROTECTED] > > > Subject: [Libcdio-devel] libcdio release around the ides of March? > (March 15) > > > > > > I've been thinking about making another release to clear out the > > > security bugs that have been reported and fixed in CVS. Also, it might > > > pave the way for a GPL 2 to GPL 3 down the line. (Previously the > > > observation was made that one shouldn't tie security fixes with a > > > license change). > > > > > > A couple of people suggested a possibility of some other additions to > > > libcdio. For example Robert William Fuller suggested adding gap > > > detection via MMC commands, but I gather this has all been rolled into > > > cued, right? > > > > > > So right now unless there's reason not to, I'm shooting for a March > > > 15th release. Comments? > > > > > > > > > > _________________________________________________________________ > > ¥Î³¡¸¨®æ¤À¨É·Ó¤ù¡B¼vµ¡B½ì¨ý¤p¤u¨ã©M³Ì·R²M³æ¡AºÉ±¡¨q¥X§A¦Û¤v ¡X Windows > Live Spaces > > http://spaces.live.com/<html> > > <head> > > <style> > > .hmmessage P > > { > > margin:0px; > > padding:0px > > } > > body.hmmessage > > { > > FONT-SIZE: 9pt; > > FONT-FAMILY:Tahoma > > } > > </style> > > </head> > > <body class='hmmessage'>Hi,<br><br>I would like to contribute the enclosed > to diffs for lib/driver/image/nrg.c and src/cd-paranoia/cd-paranoia.c so I > can rip CDDA tracks contained in NRG image files without using a CD drive > emulator. The nrg.c needs to recognize the size of sectors to be 2352 (98 * > 24) bytes when NRG CUEX says that a track is of audio type. The cd-paranoia.c > needs an option (I choose -N tentatively) for users to pass the NRG image > file name to the tool. I found the cd-paranoia.c statement <span > style="font-weight: bold;">info_file=strdup(info_file);</span> illogical but > did not touch it. Please let me know how I should > proceed.<br><br>Thanks,<br><br>Chekgiau Ng<br>-------<br><br>Index: > nrg.c<br>===================================================================<br>RCS > file: /sources/libcdio/libcdio/lib/driver/image/nrg.c,v<br>retrieving > revision 1.24<br>diff -c -r1.24 nrg.c<br>*** nrg.c 27 Feb > 2006 10:23:52 -0000 1.24<br>-- > > - nrg.c 3 Mar 2008 08:35:02 > -0000<br>***************<br>*** 311,317 ****<br> > <br> > sec_count = UINT32_FROM_BE (_entries[idx + > 1].lsn);<br> <br>! > _register_mapping (p_env, > lsn, sec_count*2, <br> > (lsn+CDIO_PREGAP_SECTORS) * > M2RAW_SECTOR_SIZE,<br> > M2RAW_SECTOR_SIZE, > TRACK_FORMAT_XA, true);<br> > }<br>--- 311,322 ----<br> > <br> > sec_count = UINT32_FROM_BE (_entries[idx + > 1].lsn);<br> > > > <br>! > if ((_entries[idx].type & 0x0f) == > 0x01)<br>! > _register_mapping (p_env, lsn, sec_count - lsn, > <br>! > (lsn + > CDIO_PREGAP_SECTORS)*CDIO_CD_FRAMESIZE_RAW,<br>! > CDIO_CD_FRAMESIZE_RAW, TRACK_FORMAT_AUDIO, > true);<br>! > else<br>! > _register_mapping (p_env, lsn, sec_count*2, <br> > > (lsn+CDIO_PREGAP_SECTORS) * M2RAW_SECTOR_SIZE,<br> &nb > > sp; > M2RAW_SECTOR_SIZE, TRACK_FORMAT_XA, true);<br> > }<br>***************<br>*** 360,366 ****<br> > > lsn = UINT32_FROM_BE > (_entries[idx].lsn);<br> > sec_count = UINT32_FROM_BE (_entries[idx + > 1].lsn);<br> <br>! > _register_mapping (p_env, > lsn, sec_count - lsn, <br> > (lsn + > CDIO_PREGAP_SECTORS)*M2RAW_SECTOR_SIZE,<br> > > M2RAW_SECTOR_SIZE, TRACK_FORMAT_XA, true);<br> > }<br>--- 365,376 ----<br> &nb > > sp; > lsn = UINT32_FROM_BE > (_entries[idx].lsn);<br> > sec_count = UINT32_FROM_BE (_entries[idx + > 1].lsn);<br> > <br>! > if ((_entries[idx].type & 0x0f) == > 0x01)<br>! > _register_mapping (p_env, lsn, sec_count - lsn, > <br>! > (lsn + > CDIO_PREGAP_SECTORS)*CDIO_CD_FRAMESIZE_RAW,<br>! > CDIO_CD_FRAMESIZE_RAW, TRACK_FORMAT_AUDIO, > true);<br>! > els > > e<br>! > _register_mapping (p_env, lsn, sec_count - lsn, <br> > (lsn + > CDIO_PREGAP_SECTORS)*M2RAW_SECTOR_SIZE,<br> > > M2RAW_SECTOR_SIZE, TRACK_FORMAT_XA, true);<br> > }<br><br>Index: > cd-paranoia.c<br>===================================================================<br>RCS > file: /sources/libcdio/libcdio/src/cd-paranoia/cd-paranoia.c,v<br>retrieving > revision 1.34<br>diff -c -r1.34 cd-paranoia.c<br>*** > cd-paranoia.c 29 Feb 2008 11:34:15 -0000 > 1.34<br>--- cd-paranoia.c 3 Mar 2008 08:35:43 > -0000<br>***************<br>*** 547,553 ****<br> }<br> #endif /* > !TRACE_PARANOIA */<br> <br>! const char *optstring = > "aBcCd:efg:hi:l:m:n:o:O:pqQrRsS:Tt > > :VvwWx:XYZz::";<br> <br> struct option options [] = > {<br> > {"abort-on-skip", > no_argument, NULL, 'X'},<br>--- 547,553 > ----<br> }<br> #endif /* !TRACE_PARANOIA */<br> <br>! const > char *optstring = > "aBcCd:efg:hi:l:m:N:n:o:O:pqQrRsS:Tt:VvwWx:XYZz::";<br> <br> > struct option options [] = {<br> > {"abort-on-skip", > no_argument, NULL, > 'X'},<br>***************<br>*** 562,567 ****<br>--- 562,568 ----<br> > {"force-generic-device", > required_argument, NULL, 'g'},<br> > {"force-read-speed", > required_argument, NULL, 'S'},<br> {"force-sear > > ch-overlap", required_argument, NULL, > 'o'},<br>+ > {"load-nrg-image", > required_argument, NULL, 'N'},<br> > {"help", > no_argument, NULL, 'h'},<br> > > {"log-summary", > required_argument, NULL, 'l'},<br> > {"mmc-timeout", > required_argument, NULL, 'm'},<br>***************<br>*** 592,597 ****<br>--- > 593,599 ----<br> static > char > *span = NULL;<br>& > > nbsp; static char *force_cdrom_device = NULL;<br> > static char > *info_file > = NULL;<br>+ static char *nrg_image_file > = NULL;<br> <br> #define free_and_null(p) \<br> > free(p); > \<br>***************<br>*** 619,624 ****<br>--- 621,627 > ----<br> > free_and_null(force_cdrom_device);<br> > free_and_null(span);<br> > free_and_null(info_file);<br>+ > free_and_null(nrg_image_file);<br> if(logfile && > logfile != stdout) {<br> > fclose(logfile);<br> logfile = > NULL;<br>***************<br>*** 686,691 ****<br>--- 689,696 > ----<br> int search=0;<br> int > c,long_option_index;<br> <br>+ CdIo_t * > > p_cdio=NULL;<br>+ <br> atexit(cleanup);<br> > <br> > while((c=getopt_long(argc,argv,optstring,options,&long_option_index))!=EOF){<br>***************<br>*** > 756,761 ****<br>--- 761,770 ----<br> case > 'n':<br> get_int_arg(c, > &force_cdrom_sectors);<br> > break;<br>+ case > 'N':<br>+ > if(nrg_image_file)free(nrg_image_file);<br>+ > nrg_image_file=strdup(optarg);<br>+ > break;<br> case > 'o':<br> get_int_arg(c, > &force_cdrom_overlap);<br> > break;<br>***************<br>*** 861,871 ****<br> > }else<br> if (argv[optind]) > span=strdup(argv[optind]);<br > > > <br> report(PARANOIA_VERSION);<br> > <br> /* Query the cdrom/disc; we may need to override some > settings */<br> <br>! > if(force_cdrom_device)<br> > d=cdda_identify(force_cdrom_device,verbose,NULL);<br> else > {<br> driver_id_t driver_id;<br>--- 870,890 > ----<br> }else<br> if > (argv[optind]) span=strdup(argv[optind]);<br> <br>+ > if(nrg_image_file) {<br>+ > p_cdio=cdio_open_nrg(nrg_image_file);<br>+ > if(!p_cdio) {<br>+ fprintf(stderr,"Cannot > open image file %s as source.", > nrg_image_file);<br>+ > exit(1);<br>+ }<br>+ }<br>+ > <br> report(PARANOIA_VERSION);<br> > <br> /* Query the cdrom/disc; w > > e may need to override some settings */<br> <br>! > if(p_cdio)<br>! > d=cdio_cddap_identify_cdio(p_cdio,verbose,NULL);<br>! else > if(force_cdrom_device)<br> > d=cdda_identify(force_cdrom_device,verbose,NULL);<br> else > {<br> driver_id_t driver_id;<br><br><br><br><hr > id="stopSpelling">> From: [EMAIL PROTECTED]<br>> Date: Thu, 28 Feb 2008 > 18:01:19 -0500<br>> To: [email protected]<br>> CC: [EMAIL > PROTECTED]<br>> Subject: [Libcdio-devel] libcdio release around the ides > of March? (March 15)<br>> <br>> I've been thinking about making another > release to clear out the<br>> security bugs that have been reported and > fixed in CVS. Also, it might<br>> pave the way for a GPL 2 to GPL 3 down > the line. (Previously the<br>> observation was made that one shouldn't tie > security fixes with a<br>> license change).<br>> <br>> A c > > ouple of people suggested a possibility of some other additions > to<br>> libcdio. For example Robert William Fuller suggested adding > gap<br>> detection via MMC commands, but I gather this has all been rolled > into<br>> cued, right?<br>> <br>> So right now unless there's reason > not to, I'm shooting for a March<br>> 15th release. Comments?<br>> > <br>> <br><br /><hr > />¥Î³¡¸¨®æ¤À¨É·Ó¤ù¡B¼vµ¡B½ì¨ý¤p¤u¨ã©M³Ì·R²M³æ¡AºÉ±¡¨q¥X§A¦Û¤v ¡X <a > href='http://spaces.live.com/' target='_new'>Windows Live Spaces</a></body> > > </html> _________________________________________________________________ 聰明搜尋和瀏覽網路的免費工具列 — MSN 搜尋工具列 http://toolbar.live.com/
