summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorR. Bernstein <rocky@gnu.org>2012-03-04 22:38:17 -0500
committerR. Bernstein <rocky@gnu.org>2012-03-04 22:38:17 -0500
commit09917474d54ff9cc51cd5e4e8e77999f287c32ee (patch)
tree369677f1f623916b6191ebd18fc6d077a3d8018a /src
parentb21bb347f1b1b67c041ea3fac13ddd43237799df (diff)
Remove more paranoia code
Diffstat (limited to 'src')
-rw-r--r--src/cd-paranoia/.gitignore12
-rw-r--r--src/cd-paranoia/Makefile.am57
-rw-r--r--src/cd-paranoia/buffering_write.c112
-rw-r--r--src/cd-paranoia/buffering_write.h35
-rw-r--r--src/cd-paranoia/cd-paranoia.c1379
-rw-r--r--src/cd-paranoia/doc/.gitignore2
-rw-r--r--src/cd-paranoia/doc/FAQ.txt620
-rw-r--r--src/cd-paranoia/doc/Makefile.am27
-rw-r--r--src/cd-paranoia/doc/en/.gitignore3
-rw-r--r--src/cd-paranoia/doc/en/Makefile.am30
-rw-r--r--src/cd-paranoia/doc/en/cd-paranoia.1.in381
-rw-r--r--src/cd-paranoia/doc/ja/.gitignore3
-rw-r--r--src/cd-paranoia/doc/ja/Makefile.am72
-rw-r--r--src/cd-paranoia/doc/ja/cd-paranoia.1.in359
-rw-r--r--src/cd-paranoia/doc/overlapdef.txt18
-rw-r--r--src/cd-paranoia/getopt.c1056
-rw-r--r--src/cd-paranoia/getopt.h126
-rw-r--r--src/cd-paranoia/getopt1.c190
-rw-r--r--src/cd-paranoia/header.c132
-rw-r--r--src/cd-paranoia/header.h32
-rwxr-xr-xsrc/cd-paranoia/pod2c.pl46
-rw-r--r--src/cd-paranoia/report.c65
-rw-r--r--src/cd-paranoia/report.h20
-rw-r--r--src/cd-paranoia/usage-copy.h143
-rw-r--r--src/cd-paranoia/usage.txt.in124
-rw-r--r--src/cd-paranoia/utils.h39
-rw-r--r--src/cd-paranoia/version.h29
27 files changed, 0 insertions, 5112 deletions
diff --git a/src/cd-paranoia/.gitignore b/src/cd-paranoia/.gitignore
deleted file mode 100644
index ac9e6260..00000000
--- a/src/cd-paranoia/.gitignore
+++ /dev/null
@@ -1,12 +0,0 @@
-/*.exe
-/*.o
-/.deps
-/.libs
-/Makefile
-/Makefile.in
-/cd-paranoia
-/*.orig
-/*~
-/*.rej
-/usage.h
-/usage.txt
diff --git a/src/cd-paranoia/Makefile.am b/src/cd-paranoia/Makefile.am
deleted file mode 100644
index e8cbb707..00000000
--- a/src/cd-paranoia/Makefile.am
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright (C) 2004, 2005, 2006, 2007, 2008,
-# Rocky Bernstein <rocky@gnu.org>
-# Copyright (C) 1998 Monty xiphmont@mit.edu
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-transform = s,cd-paranoia,@CDPARANOIA_NAME@,
-
-if BUILD_CD_PARANOIA
-
-SUBDIRS = doc
-
-GETOPT_C = getopt1.c getopt.c
-
-EXTRA_DIST = usage.txt.in usage-copy.h pod2c.pl \
- doc/FAQ.txt doc/overlapdef.txt $(GETOPT_C) getopt.h
-
-noinst_HEADERS = header.h report.h $(GETOPT_H)
-
-cd_paranoia_SOURCES = cd-paranoia.c \
- buffering_write.c buffering_write.h \
- header.c report.c utils.h version.h $(GETOPT_C)
-
-cd_paranoia_LDADD = $(LIBCDIO_LIBS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_PARANOIA_LIBS) $(LTLIBICONV)
-
-cd_paranoia_DEPENDENCIES = $(LIBCDIO_DEPS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_PARANOIA_LIBS)
-
-bin_PROGRAMS = cd-paranoia
-
-INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS)
-
-cd-paranoia.$(OBJEXT): usage.h
-
-#: create header file used in help text: the "usage" help.
-if HAVE_PERL
-usage.h: usage.txt $(srcdir)/pod2c.pl
- $(PERL) $(srcdir)/pod2c.pl usage.txt >usage.h
-else
-usage.h: usage-copy.h
- cp usage-copy.h $@
-endif
-
-endif
-
-MOSTLYCLEANFILES = usage.h usage.txt
-
diff --git a/src/cd-paranoia/buffering_write.c b/src/cd-paranoia/buffering_write.c
deleted file mode 100644
index d2017708..00000000
--- a/src/cd-paranoia/buffering_write.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- $Id: buffering_write.c,v 1.4 2008/06/19 15:44:28 flameeyes Exp $
-
- Copyright (C) 2004, 2008 Rocky Bernstein <rocky@gnu.org>
- Copyright (C) 1998, 1999 Monty <xiphmont@mit.edu>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/* Eliminate teeny little writes. patch submitted by
- Rob Ross <rbross@parl.ces.clemson.edu> --Monty 19991008 */
-
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdio.h>
-
-#define OUTBUFSZ 32*1024
-
-#include "utils.h"
-#include "buffering_write.h"
-
-
-/* GLOBALS FOR BUFFERING CALLS */
-static int bw_fd = -1;
-static long bw_pos = 0;
-static char bw_outbuf[OUTBUFSZ];
-
-
-
-static long int
-blocking_write(int outf, char *buffer, long num){
- long int words=0,temp;
-
- while(words<num){
- temp=write(outf,buffer+words,num-words);
- if(temp==-1){
- if(errno!=EINTR && errno!=EAGAIN)
- return(-1);
- temp=0;
- }
- words+=temp;
- }
- return(0);
-}
-
-/** buffering_write() - buffers data to a specified size before writing.
- *
- * Restrictions:
- * - MUST CALL BUFFERING_CLOSE() WHEN FINISHED!!!
- *
- */
-long int
-buffering_write(int fd, char *buffer, long num)
-{
- if (fd != bw_fd) {
- /* clean up after buffering for some other file */
- if (bw_fd >= 0 && bw_pos > 0) {
- if (blocking_write(bw_fd, bw_outbuf, bw_pos)) {
- perror("write (in buffering_write, flushing)");
- }
- }
- bw_fd = fd;
- bw_pos = 0;
- }
-
- if (bw_pos + num > OUTBUFSZ) {
- /* fill our buffer first, then write, then modify buffer and num */
- memcpy(&bw_outbuf[bw_pos], buffer, OUTBUFSZ - bw_pos);
- if (blocking_write(fd, bw_outbuf, OUTBUFSZ)) {
- perror("write (in buffering_write, full buffer)");
- return(-1);
- }
- num -= (OUTBUFSZ - bw_pos);
- buffer += (OUTBUFSZ - bw_pos);
- bw_pos = 0;
- }
- /* save data */
- memcpy(&bw_outbuf[bw_pos], buffer, num);
- bw_pos += num;
-
- return(0);
-}
-
-/** buffering_close() - writes out remaining buffered data before
- * closing file.
- *
- */
-int
-buffering_close(int fd)
-{
- if (fd == bw_fd && bw_pos > 0) {
- /* write out remaining data and clean up */
- if (blocking_write(fd, bw_outbuf, bw_pos)) {
- perror("write (in buffering_close)");
- }
- bw_fd = -1;
- bw_pos = 0;
- }
- return(close(fd));
-}
diff --git a/src/cd-paranoia/buffering_write.h b/src/cd-paranoia/buffering_write.h
deleted file mode 100644
index 0fb9e6fc..00000000
--- a/src/cd-paranoia/buffering_write.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- $Id: buffering_write.h,v 1.4 2008/06/19 15:44:30 flameeyes Exp $
-
- Copyright (C) 2004, 2008 Rocky Bernstein <rocky@gnu.org>
- Copyright (C) 1998 Monty <xiphmont@mit.edu>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/** buffering_write() - buffers data to a specified size before writing.
- *
- * Restrictions:
- * - MUST CALL BUFFERING_CLOSE() WHEN FINISHED!!!
- *
- */
-extern long buffering_write(int outf, char *buffer, long num);
-
-/** buffering_close() - writes out remaining buffered data before
- * closing file.
- *
- */
-extern int buffering_close(int fd);
-
-
diff --git a/src/cd-paranoia/cd-paranoia.c b/src/cd-paranoia/cd-paranoia.c
deleted file mode 100644
index f93e2546..00000000
--- a/src/cd-paranoia/cd-paranoia.c
+++ /dev/null
@@ -1,1379 +0,0 @@
-/*
- Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011
- Rocky Bernstein <rocky@gnu.org>
- Copyright (C) 1998 Monty <xiphmont@mit.edu>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- See ChangeLog for recent changes.
-*/
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-# define __CDIO_CONFIG_H__ 1
-#endif
-
-#ifdef HAVE_STDIO_H
-# include <stdio.h>
-#endif
-
-#ifdef HAVE_STDARG_H
-# include <stdarg.h>
-#endif
-
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#include "getopt.h"
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-
-#include <math.h>
-#include <sys/time.h>
-
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if !defined(HAVE_GETTIMEOFDAY)
-/* MinGW uses sys/time.h and sys/timeb.h to roll its own gettimeofday() */
-# if defined(HAVE_SYS_TIME_H) && defined(HAVE_SYS_TIMEB_H)
-# include <sys/time.h>
-# include <sys/timeb.h>
-static void gettimeofday(struct timeval* tv, void* timezone);
-# endif
-#endif /* !defined(HAVE_GETTIMEOFDAY) */
-
-#include <cdio/cdio.h>
-#include <cdio/cd_types.h>
-#include <cdio/cdda.h>
-#include <cdio/paranoia.h>
-#include <cdio/bytesex.h>
-#include <cdio/mmc.h>
-#include "utils.h"
-#include "report.h"
-#include "version.h"
-#include "header.h"
-#include "buffering_write.h"
-
-extern int verbose;
-extern int quiet;
-
-/* I wonder how many alignment issues this is gonna trip in the
- future... it shouldn't trip any... I guess we'll find out :) */
-
-static int
-bigendianp(void)
-{
- int test=1;
- char *hack=(char *)(&test);
- if(hack[0])return(0);
- return(1);
-}
-
-static long
-parse_offset(cdrom_drive_t *d, char *offset, int begin)
-{
- track_t i_track= CDIO_INVALID_TRACK;
- long hours = -1;
- long minutes = -1;
- long seconds = -1;
- long sectors = -1;
- char *time = NULL;
- char *temp = NULL;
- long ret;
-
- if (!offset) return -1;
-
- /* separate track from time offset */
- temp=strchr(offset,']');
- if(temp){
- *temp='\0';
- temp=strchr(offset,'[');
- if(temp==NULL){
- report("Error parsing span argument");
- exit(1);
- }
- *temp='\0';
- time=temp+1;
- }
-
- /* parse track */
- {
- int chars=strspn(offset,"0123456789");
- if(chars>0){
- offset[chars]='\0';
- i_track=atoi(offset);
- if ( i_track > d->tracks ) {
- /*take track i_first_track-1 as pre-gap of 1st track*/
- char buffer[256];
- snprintf(buffer, sizeof(buffer),
- "Track #%d does not exist.", i_track);
- report(buffer);
- exit(1);
- }
- }
- }
-
- while(time){
- long val,chars;
- char *sec=strrchr(time,'.');
- if(!sec)sec=strrchr(time,':');
- if(!sec)sec=time-1;
-
- chars=strspn(sec+1,"0123456789");
- if(chars)
- val=atoi(sec+1);
- else
- val=0;
-
- switch(*sec){
- case '.':
- if(sectors!=-1){
- report("Error parsing span argument");
- exit(1);
- }
- sectors=val;
- break;
- default:
- if(seconds==-1)
- seconds=val;
- else
- if(minutes==-1)
- minutes=val;
- else
- if(hours==-1)
- hours=val;
- else{
- report("Error parsing span argument");
- exit(1);
- }
- break;
- }
-
- if (sec<=time) break;
- *sec='\0';
- }
-
- if (i_track == CDIO_INVALID_TRACK) {
- if (seconds==-1 && sectors==-1) return -1;
- if (begin==-1) {
- ret=cdda_disc_firstsector(d);
- } else
- ret = begin;
- } else {
- if ( seconds==-1 && sectors==-1 ) {
- if (begin==-1){
- /* first half of a span */
- return(cdda_track_firstsector(d, i_track));
- }else{
- return(cdda_track_lastsector(d, i_track));
- }
- } else {
- /* relative offset into a track */
- ret=cdda_track_firstsector(d, i_track);
- }
- }
-
- /* OK, we had some sort of offset into a track */
-
- if (sectors != -1) ret += sectors;
- if (seconds != -1) ret += seconds*CDIO_CD_FRAMES_PER_SEC;
- if (minutes != -1) ret += minutes*CDIO_CD_FRAMES_PER_MIN;
- if (hours != -1) ret += hours *60*CDIO_CD_FRAMES_PER_MIN;
-
- /* We don't want to outside of the track; if it's relative, that's OK... */
- if( i_track != CDIO_INVALID_TRACK ){
- if (cdda_sector_gettrack(d,ret) != i_track) {
- report("Time/sector offset goes beyond end of specified track.");
- exit(1);
- }
- }
-
- /* Don't pass up end of session */
-
- if( ret>cdda_disc_lastsector(d) ) {
- report("Time/sector offset goes beyond end of disc.");
- exit(1);
- }
-
- return(ret);
-}
-
-static void
-display_toc(cdrom_drive_t *d)
-{
- long audiolen=0;
- track_t i;
-
- report("\nTable of contents (audio tracks only):\n"
- "track length begin copy pre ch\n"
- "===========================================================");
-
- for( i=1; i<=d->tracks; i++)
- if ( cdda_track_audiop(d,i) ) {
- char buffer[256];
-
- lsn_t sec=cdda_track_firstsector(d,i);
- lsn_t off=cdda_track_lastsector(d,i)-sec+1;
-
- sprintf(buffer,
- "%3d. %7ld [%02d:%02d.%02d] %7ld [%02d:%02d.%02d] %s %s %s",
- i,
- (long int) off,
- (int) (off/(CDIO_CD_FRAMES_PER_MIN)),
- (int) ((off/CDIO_CD_FRAMES_PER_SEC) % CDIO_CD_SECS_PER_MIN),
- (int) (off % CDIO_CD_FRAMES_PER_SEC),
- (long int) sec,
- (int) (sec/(CDIO_CD_FRAMES_PER_MIN)),
- (int) ((sec/CDIO_CD_FRAMES_PER_SEC) % CDIO_CD_SECS_PER_MIN),
- (int) (sec % CDIO_CD_FRAMES_PER_SEC),
- cdda_track_copyp(d,i)?" OK":" no",
- cdda_track_preemp(d,i)?" yes":" no",
- cdda_track_channels(d,i)==2?" 2":" 4");
- report(buffer);
- audiolen+=off;
- }
- {
- char buffer[256];
- sprintf(buffer, "TOTAL %7ld [%02d:%02d.%02d] (audio only)",
- audiolen,
- (int) (audiolen/(CDIO_CD_FRAMES_PER_MIN)),
- (int) ((audiolen/CDIO_CD_FRAMES_PER_SEC) % CDIO_CD_SECS_PER_MIN),
- (int) (audiolen % CDIO_CD_FRAMES_PER_SEC));
- report(buffer);
- }
- report("");
-}
-
-#include "usage.h"
-static void usage(FILE *f)
-{
- fprintf( f, usage_help);
-}
-
-static long callbegin;
-static long callend;
-static long callscript=0;
-
-static int skipped_flag=0;
-static int abort_on_skip=0;
-static FILE *logfile = NULL;
-
-#if TRACE_PARANOIA
-static void
-callback(long int inpos, paranoia_cb_mode_t function)
-{
-}
-#else
-static const char *callback_strings[15]={
- "wrote",
- "finished",
- "read",
- "verify",
- "jitter",
- "correction",
- "scratch",
- "scratch repair",
- "skip",
- "drift",
- "backoff",
- "overlap",
- "dropped",
- "duped",
- "transport error"};
-
-static void
-callback(long int inpos, paranoia_cb_mode_t function)
-{
- /*
-
- (== PROGRESS == [--+!---x--------------> | 007218 01 ] == :-) . ==)
-
- */
-
- int graph=30;
- char buffer[256];
- static long c_sector=0, v_sector=0;
- static char dispcache[]=" ";
- static int last=0;
- static long lasttime=0;
- long int sector, osector=0;
- struct timeval thistime;
- static char heartbeat=' ';
- int position=0,aheadposition=0;
- static int overlap=0;
- static int printit=-1;
-
- static int slevel=0;
- static int slast=0;
- static int stimeout=0;
- const char *smilie="= :-)";
-
- if (callscript)
- fprintf(stderr, "##: %d [%s] @ %ld\n",
- function, ((int) function >= -2 && (int) function < 13 ?
- callback_strings[function+2] : ""),
- inpos);
-
- if(!quiet){
- long test;
- osector=inpos;
- sector=inpos/CD_FRAMEWORDS;
-
- if(printit==-1){
- if(isatty(STDERR_FILENO)){
- printit=1;
- }else{
- printit=0;
- }
- }
-
- if(printit==1){ /* else don't bother; it's probably being
- redirected */
- position=((float)(sector-callbegin)/
- (callend-callbegin))*graph;
-
- aheadposition=((float)(c_sector-callbegin)/
- (callend-callbegin))*graph;
-
- if(function==-2){
- v_sector=sector;
- return;
- }
- if(function==-1){
- last=8;
- heartbeat='*';
- slevel=0;
- v_sector=sector;
- }else
- if(position<graph && position>=0)
- switch(function){
- case PARANOIA_CB_VERIFY:
- if(stimeout>=30){
- if(overlap>CD_FRAMEWORDS)
- slevel=2;
- else
- slevel=1;
- }
- break;
- case PARANOIA_CB_READ:
- if(sector>c_sector)c_sector=sector;
- break;
-
- case PARANOIA_CB_FIXUP_EDGE:
- if(stimeout>=5){
- if(overlap>CD_FRAMEWORDS)
- slevel=2;
- else
- slevel=1;
- }
- if(dispcache[position]==' ')
- dispcache[position]='-';
- break;
- case PARANOIA_CB_FIXUP_ATOM:
- if(slevel<3 || stimeout>5)slevel=3;
- if(dispcache[position]==' ' ||
- dispcache[position]=='-')
- dispcache[position]='+';
- break;
- case PARANOIA_CB_READERR:
- slevel=6;
- if(dispcache[position]!='V')
- dispcache[position]='e';
- break;
- case PARANOIA_CB_SKIP:
- slevel=8;
- dispcache[position]='V';
- break;
- case PARANOIA_CB_OVERLAP:
- overlap=osector;
- break;
- case PARANOIA_CB_SCRATCH:
- slevel=7;
- break;
- case PARANOIA_CB_DRIFT:
- if(slevel<4 || stimeout>5)slevel=4;
- break;
- case PARANOIA_CB_FIXUP_DROPPED:
- case PARANOIA_CB_FIXUP_DUPED:
- slevel=5;
- if(dispcache[position]==' ' ||
- dispcache[position]=='-' ||
- dispcache[position]=='+')
- dispcache[position]='!';
- break;
- case PARANOIA_CB_REPAIR:
- case PARANOIA_CB_BACKOFF:
- break;
- }
-
- switch(slevel){
- case 0: /* finished, or no jitter */
- if(skipped_flag)
- smilie=" 8-X";
- else
- smilie=" :^D";
- break;
- case 1: /* normal. no atom, low jitter */
- smilie=" :-)";
- break;
- case 2: /* normal, overlap > 1 */
- smilie=" :-|";
- break;
- case 4: /* drift */
- smilie=" :-/";
- break;
- case 3: /* unreported loss of streaming */
- smilie=" :-P";
- break;
- case 5: /* dropped/duped bytes */
- smilie=" 8-|";
- break;
- case 6: /* scsi error */
- smilie=" :-0";
- break;
- case 7: /* scratch */
- smilie=" :-(";
- break;
- case 8: /* skip */
- smilie=" ;-(";
- skipped_flag=1;
- break;
-
- }
-
- gettimeofday(&thistime,NULL);
- test=thistime.tv_sec*10+thistime.tv_usec/100000;
-
- if(lasttime!=test || function==-1 || slast!=slevel){
- if(lasttime!=test || function==-1){
- last++;
- lasttime=test;
- if(last>7)last=0;
- stimeout++;
- switch(last){
- case 0:
- heartbeat=' ';
- break;
- case 1:case 7:
- heartbeat='.';
- break;
- case 2:case 6:
- heartbeat='o';
- break;
- case 3:case 5:
- heartbeat='0';
- break;
- case 4:
- heartbeat='O';
- break;
- }
- if(function==-1)
- heartbeat='*';
-
- }
- if(slast!=slevel){
- stimeout=0;
- }
- slast=slevel;
-
- if(abort_on_skip && skipped_flag && function !=-1){
- sprintf(buffer,
- "\r (== PROGRESS == [%s| %06ld %02d ] ==%s %c ==) ",
- " ...aborting; please wait... ",
- v_sector,overlap/CD_FRAMEWORDS,smilie,heartbeat);
- }else{
- if(v_sector==0)
- sprintf(buffer,
- "\r (== PROGRESS == [%s| ...... %02d ] ==%s %c ==) ",
- dispcache,overlap/CD_FRAMEWORDS,smilie,heartbeat);
-
- else
- sprintf(buffer,
- "\r (== PROGRESS == [%s| %06ld %02d ] ==%s %c ==) ",
- dispcache,v_sector,overlap/CD_FRAMEWORDS,smilie,heartbeat);
-
- if(aheadposition>=0 && aheadposition<graph && !(function==-1))
- buffer[aheadposition+19]='>';
- }
-
- if(isatty(STDERR_FILENO))
- fprintf(stderr, "%s", buffer);
-
- if (logfile != NULL && function==-1) {
- fprintf(logfile, "%s", buffer+1);
- fprintf(logfile,"\n\n");
- fflush(logfile);
- }
- }
- }
- }
-
- /* clear the indicator for next batch */
- if(function==-1)
- memset(dispcache,' ',graph);
-}
-#endif /* !TRACE_PARANOIA */
-
-static const char optstring[] = "aBcCd:efg:hi:l:m:n:o:O:pqQrRsS:Tt:VvwWx:XYZz::";
-
-static const struct option options [] = {
- {"abort-on-skip", no_argument, NULL, 'X'},
- {"batch", no_argument, NULL, 'B'},
- {"disable-extra-paranoia", no_argument, NULL, 'Y'},
- {"disable-fragmentation", no_argument, NULL, 'F'},
- {"disable-paranoia", no_argument, NULL, 'Z'},
- {"force-cdrom-big-endian", no_argument, NULL, 'C'},
- {"force-cdrom-device", required_argument, NULL, 'd'},
- {"force-cdrom-little-endian", no_argument, NULL, 'c'},
- {"force-default-sectors", required_argument, NULL, 'n'},
- {"force-generic-device", required_argument, NULL, 'g'},
- {"force-read-speed", required_argument, NULL, 'S'},
- {"force-search-overlap", required_argument, NULL, 'o'},
- {"help", no_argument, NULL, 'h'},
- {"log-summary", required_argument, NULL, 'l'},
- {"mmc-timeout", required_argument, NULL, 'm'},
- {"never-skip", optional_argument, NULL, 'z'},
- {"output-aifc", no_argument, NULL, 'a'},
- {"output-aiff", no_argument, NULL, 'f'},
- {"output-raw", no_argument, NULL, 'p'},
- {"output-raw-big-endian", no_argument, NULL, 'R'},
- {"output-raw-little-endian", no_argument, NULL, 'r'},
- {"output-wav", no_argument, NULL, 'w'},
- {"query", no_argument, NULL, 'Q'},
- {"quiet", no_argument, NULL, 'q'},
- {"sample-offset", required_argument, NULL, 'O'},
- {"search-for-drive", no_argument, NULL, 's'},
- {"stderr-progress", no_argument, NULL, 'e'},
- {"test-mode", required_argument, NULL, 'x'},
- {"toc-bias", no_argument, NULL, 'T'},
- {"toc-offset", required_argument, NULL, 't'},
- {"verbose", no_argument, NULL, 'v'},
- {"version", no_argument, NULL, 'V'},
-
- {NULL,0,NULL,0}
-};
-
-static cdrom_drive_t *d = NULL;
-static cdrom_paranoia_t *p = NULL;
-static char *span = NULL;
-static char *force_cdrom_device = NULL;
-
-#define free_and_null(p) \
- free(p); \
- p=NULL;
-
-#if !defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) && defined(HAVE_SYS_TIMEB_H)
-static void
-gettimeofday(struct timeval* tv, void* timezone)
-{
- struct timeb timebuffer;
- ftime( &timebuffer );
- tv->tv_sec=timebuffer.time;
- tv->tv_usec=1000*timebuffer.millitm;
-}
-#endif
-
-/* This is run automatically before leaving the program.
- Free allocated resources.
-*/
-static void
-cleanup (void)
-{
- if (p) paranoia_free(p);
- if (d) cdda_close(d);
- free_and_null(force_cdrom_device);
- free_and_null(span);
- if(logfile && logfile != stdout) {
- fclose(logfile);
- logfile = NULL;
- }
-}
-
-/* Returns true if we have an integer argument.
- If so, pi_arg is set.
- If no argument or integer argument found, we give an error
- message and return false.
-*/
-static bool
-get_int_arg(char c, long int *pi_arg)
-{
- long int i_arg;
- char *p_end;
- if (!optarg) {
- /* This shouldn't happen, but we'll check anyway. */
- fprintf(stderr,
- "An (integer) argument for option -%c was expected "
- " but not found. Option ignored\n", c);
- return false;
- }
- errno = 0;
- i_arg = strtol(optarg, &p_end, 10);
- if ( (LONG_MIN == i_arg || LONG_MAX == i_arg) && (0 != errno) ) {
- fprintf(stderr,
- "Value '%s' for option -%c out of range. Value %ld "
- "used instead.\n", optarg, c, i_arg);
- *pi_arg = i_arg;
- return false;
- } else if (*p_end) {
- fprintf(stderr,
- "Can't convert '%s' for option -%c completely into an integer. "
- "Option ignored.\n", optarg, c);
- return false;
- } else {
- *pi_arg = i_arg;
- return true;
- }
-}
-
-int
-main(int argc,char *argv[])
-{
- int toc_bias = 0;
- int force_cdrom_endian = -1;
- int output_type = 1; /* 0=raw, 1=wav, 2=aifc */
- int output_endian = 0; /* -1=host, 0=little, 1=big */
- int query_only = 0;
- int batch = 0;
- long int force_cdrom_overlap = -1;
- long int force_cdrom_sectors = -1;
- long int force_cdrom_speed = -1;
- long int sample_offset = 0;
- long int test_flags = 0;
- long int toc_offset = 0;
- long int max_retries = 20;
-
- /* full paranoia, but allow skipping */
- int paranoia_mode=PARANOIA_MODE_FULL^PARANOIA_MODE_NEVERSKIP;
-
- int out;
-
- int search=0;
- int c,long_option_index;
-
- atexit(cleanup);
-
- while((c=getopt_long(argc,argv,optstring,options,&long_option_index))!=EOF){
- switch(c){
- case 'a':
- output_type=2;
- output_endian=1;
- break;
- case 'B':
- batch=1;
- break;
- case 'c':
- force_cdrom_endian=0;
- break;
- case 'C':
- force_cdrom_endian=1;
- break;
- case 'e':
- callscript=1;
- fprintf(stderr,
- "Sending all callback output to stderr for wrapper script\n");
- break;
- case 'f':
- output_type=3;
- output_endian=1;
- break;
- case 'F':
- paranoia_mode&=~(PARANOIA_MODE_FRAGMENT);
- break;
- case 'g':
- case 'd':
- if (force_cdrom_device) {
- fprintf(stderr,
- "Multiple cdrom devices given. Previous device %s ignored\n",
- force_cdrom_device);
- free(force_cdrom_device);
- }
- force_cdrom_device=strdup(optarg);
- break;
- case 'h':
- usage(stdout);
- exit(0);
- case 'l':
- if(logfile && logfile != stdout)fclose(logfile);
- if(!strcmp(optarg,"-"))
- logfile=stdout;
- else{
- logfile=fopen(optarg,"w");
- if(logfile==NULL){
- report3("Cannot open log summary file %s: %s",(char*)optarg,
- strerror(errno));
- exit(1);
- }
- }
- break;
- case 'm':
- {
- long int mmc_timeout_sec;
- if (get_int_arg(c, &mmc_timeout_sec)) {
- mmc_timeout_ms = 1000*mmc_timeout_sec;
- }
- }
- break;
- case 'n':
- get_int_arg(c, &force_cdrom_sectors);
- break;
- case 'o':
- get_int_arg(c, &force_cdrom_overlap);
- break;
- case 'O':
- get_int_arg(c, &sample_offset);
- break;
- case 'p':
- output_type=0;
- output_endian=-1;
- break;
- case 'r':
- output_type=0;
- output_endian=0;
- break;
- case 'q':
- verbose=CDDA_MESSAGE_FORGETIT;
- quiet=1;
- break;
- case 'Q':
- query_only=1;
- break;
- case 'R':
- output_type=0;
- output_endian=1;
- break;
- case 's':
- search=1;
- break;
- case 'S':
- get_int_arg(c, &force_cdrom_speed);
- break;
- case 't':
- get_int_arg(c, &toc_offset);
- break;
- case 'T':
- toc_bias=-1;
- break;
- case 'v':
- verbose=CDDA_MESSAGE_PRINTIT;
- quiet=0;
- break;
- case 'V':
- fprintf(stderr,PARANOIA_VERSION);
- fprintf(stderr,"\n");
- exit(0);
- break;
- case 'w':
- output_type=1;
- output_endian=0;
- break;
- case 'W':
- paranoia_mode&=~PARANOIA_MODE_REPAIR;
- break;
- case 'x':
- get_int_arg(c, &test_flags);
- break;
- case 'X':
- /*paranoia_mode&=~(PARANOIA_MODE_SCRATCH|PARANOIA_MODE_REPAIR);*/
- abort_on_skip=1;
- break;
- case 'Y':
- paranoia_mode|=PARANOIA_MODE_OVERLAP; /* cdda2wav style overlap
- check only */
- paranoia_mode&=~PARANOIA_MODE_VERIFY;
- break;
- case 'Z':
- paranoia_mode=PARANOIA_MODE_DISABLE;
- break;
- case 'z':
- if (optarg) {
- get_int_arg(c, &max_retries);
- paranoia_mode&=~PARANOIA_MODE_NEVERSKIP;
- } else {
- paranoia_mode|=PARANOIA_MODE_NEVERSKIP;
- }
- break;
- default:
- usage(stderr);
- exit(1);
- }
- }
-
- if(logfile){
- /* log command line and version */
- int i;
- for (i = 0; i < argc; i++)
- fprintf(logfile,"%s ",argv[i]);
- fprintf(logfile,"\n");
-
- fprintf(logfile,VERSION);
- fprintf(logfile,"\n");
- fflush(logfile);
- }
-
- if(optind>=argc && !query_only){
- if(batch)
- span=NULL;
- else{
- /* D'oh. No span. Fetch me a brain, Igor. */
- usage(stderr);
- exit(1);
- }
- }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;
- char **ppsz_cd_drives = cdio_get_devices_with_cap_ret(NULL,
- CDIO_FS_AUDIO,
- false,
- &driver_id);
- if (ppsz_cd_drives && *ppsz_cd_drives) {
- d=cdda_identify(*ppsz_cd_drives,verbose, NULL);
- } else {
- report("\nUnable find or access a CD-ROM drive with an audio CD"
- " in it.");
- report("\nYou might try specifying the drive, especially if it has"
- " mixed-mode (and non-audio) format tracks");
- exit(1);
- }
-
- cdio_free_device_list(ppsz_cd_drives);
- }
-
- if(!d){
- if(!verbose)
- report("\nUnable to open cdrom drive; -v might give more information.");
- exit(1);
- }
-
- if(verbose)
- cdda_verbose_set(d,CDDA_MESSAGE_PRINTIT,CDDA_MESSAGE_PRINTIT);
- else
- cdda_verbose_set(d,CDDA_MESSAGE_PRINTIT,CDDA_MESSAGE_FORGETIT);
-
- /* possibly force hand on endianness of drive, sector request size */
- if(force_cdrom_endian!=-1){
- d->bigendianp=force_cdrom_endian;
- switch(force_cdrom_endian){
- case 0:
- report("Forcing CDROM sense to little-endian; ignoring preset and autosense");
- break;
- case 1:
- report("Forcing CDROM sense to big-endian; ignoring preset and autosense");
- break;
- }
- }
- if (force_cdrom_sectors!=-1) {
- if(force_cdrom_sectors<0 || force_cdrom_sectors>100){
- report("Default sector read size must be 1<= n <= 100\n");
- cdda_close(d);
- d=NULL;
- exit(1);
- }
- {
- char buffer[256];
- sprintf(buffer,"Forcing default to read %ld sectors; "
- "ignoring preset and autosense", force_cdrom_sectors);
- report(buffer);
- d->nsectors=force_cdrom_sectors;
- }
- }
- if (force_cdrom_overlap!=-1) {
- if (force_cdrom_overlap<0 || force_cdrom_overlap>CDIO_CD_FRAMES_PER_SEC) {
- report("Search overlap sectors must be 0<= n <=75\n");
- cdda_close(d);
- d=NULL;
- if(logfile && logfile != stdout)
- fclose(logfile);
- exit(1);
- }
- {
- char buffer[256];
- sprintf(buffer,"Forcing search overlap to %ld sectors; "
- "ignoring autosense", force_cdrom_overlap);
- report(buffer);
- }
- }
-
- switch( cdda_open(d) ) {
- case -2:case -3:case -4:case -5:
- report("\nUnable to open disc. Is there an audio CD in the drive?");
- exit(1);
- case -6:
- report("\nCdparanoia could not find a way to read audio from this drive.");
- exit(1);
- case 0:
- break;
- default:
- report("\nUnable to open disc.");
- exit(1);
- }
-
- d->i_test_flags = test_flags;
-
- /* Dump the TOC */
- if (query_only || verbose ) display_toc(d);
-
- if (query_only) exit(0);
-
- /* bias the disc. A hack. Of course. this is never the default. */
- /*
- Some CD-ROM/CD-R drives will add an offset to the position on
- reading audio data. This is usually around 500-700 audio samples
- (ca. 1/75 second) on reading. So when this program queries a
- specific sector, it might not receive exactly that sector, but
- shifted by some amount.
-
- Note that if ripping includes the end of the CD, this will this
- cause this program to attempt to read partial sectors before or
- past the known user data area of the disc, probably causing read
- errors on most drives and possibly even hard lockups on some
- buggy hardware.
-
- [Note to libcdio driver hackers: make sure all CD-drivers don't
- try to read outside of the stated disc boundaries.]
- */
- if(sample_offset){
- toc_offset+=sample_offset/588;
- sample_offset%=588;
- if(sample_offset<0){
- sample_offset+=588;
- toc_offset--;
- }
- }
-
- if (toc_bias) {
- toc_offset = -cdda_track_firstsector(d,1);
- }
-
- {
- int i;
- for( i=0; i < d->tracks+1; i++ )
- d->disc_toc[i].dwStartSector+=toc_offset;
- }
-
- if (force_cdrom_speed != -1) {
- cdda_speed_set(d,force_cdrom_speed);
- }
-
- if (d->nsectors==1) {
- report("WARNING: The autosensed/selected sectors per read value is\n"
- " one sector, making it very unlikely Paranoia can \n"
- " work.\n\n"
- " Attempting to continue...\n\n");
- }
-
- /* parse the span, set up begin and end sectors */
-
- {
- long i_first_lsn;
- long i_last_lsn;
- long batch_first;
- long batch_last;
- int batch_track;
-
- if (span) {
- /* look for the hyphen */
- char *span2=strchr(span,'-');
- if(strrchr(span,'-')!=span2){
- report("Error parsing span argument");
- exit(1);
- }
-
- if (span2!=NULL) {
- *span2='\0';
- span2++;
- }
-
- i_first_lsn=parse_offset(d, span, -1);
-
- if(i_first_lsn==-1)
- i_last_lsn=parse_offset(d, span2, cdda_disc_firstsector(d));
-
- else
- i_last_lsn=parse_offset(d, span2, i_first_lsn);
-
- if (i_first_lsn == -1) {
- if (i_last_lsn == -1) {
- report("Error parsing span argument");
- exit(1);
- } else {
- i_first_lsn=cdda_disc_firstsector(d);
- }
- } else {
- if (i_last_lsn==-1) {
- if (span2) { /* There was a hyphen */
- i_last_lsn=cdda_disc_lastsector(d);
- } else {
- i_last_lsn=
- cdda_track_lastsector(d,cdda_sector_gettrack(d, i_first_lsn));
- }
- }
- }
- } else {
- i_first_lsn = cdda_disc_firstsector(d);
- i_last_lsn = cdda_disc_lastsector(d);
- }
-
- {
- char buffer[250];
- int track1 = cdda_sector_gettrack(d, i_first_lsn);
- int track2 = cdda_sector_gettrack(d, i_last_lsn);
- long off1 = i_first_lsn - cdda_track_firstsector(d, track1);
- long off2 = i_last_lsn - cdda_track_firstsector(d, track2);
- int i;
-
- for( i=track1; i<=track2; i++ )
- if(i != 0 && !cdda_track_audiop(d,i)){
- report("Selected span contains non audio tracks. Aborting.\n\n");
- exit(1);
- }
-
- sprintf(buffer, "Ripping from sector %7ld (track %2d [%d:%02d.%02d])\n"
- "\t to sector %7ld (track %2d [%d:%02d.%02d])\n",
- i_first_lsn,
- track1,
- (int) (off1/(CDIO_CD_FRAMES_PER_MIN)),
- (int) ((off1/CDIO_CD_FRAMES_PER_SEC) % CDIO_CD_SECS_PER_MIN),
- (int) (off1 % CDIO_CD_FRAMES_PER_SEC),
- i_last_lsn,
- track2,
- (int) (off2/(CDIO_CD_FRAMES_PER_MIN)),
- (int) ((off2/CDIO_CD_FRAMES_PER_SEC) % CDIO_CD_SECS_PER_MIN),
- (int) (off2 % CDIO_CD_FRAMES_PER_SEC));
- report(buffer);
-
- }
-
- {
- long cursor;
- int16_t offset_buffer[1176];
- int offset_buffer_used=0;
- int offset_skip=sample_offset*4;
-
- p=paranoia_init(d);
- paranoia_modeset(p,paranoia_mode);
- if(force_cdrom_overlap!=-1)paranoia_overlapset(p,force_cdrom_overlap);
-
- if(verbose) {
- cdda_verbose_set(d,CDDA_MESSAGE_LOGIT,CDDA_MESSAGE_LOGIT);
- cdio_loglevel_default = CDIO_LOG_INFO;
- } else
- cdda_verbose_set(d,CDDA_MESSAGE_FORGETIT,CDDA_MESSAGE_FORGETIT);
-
- paranoia_seek(p,cursor=i_first_lsn,SEEK_SET);
-
- /* this is probably a good idea in general */
-#if defined(HAVE_GETUID) && defined(HAVE_SETEUID)
- seteuid(getuid());
-#endif
-#if defined(HAVE_GETGID) && defined(HAVE_SETEGID)
- setegid(getgid());
-#endif
-
- /* we'll need to be able to read one sector past user data if we
- have a sample offset in order to pick up the last bytes. We
- need to set the disc length forward here so that the libs are
- willing to read past, assuming that works on the hardware, of
- course */
- if(sample_offset)
- d->disc_toc[d->tracks].dwStartSector++;
-
- while(cursor<=i_last_lsn){
- char outfile_name[256];
- if ( batch ){
- batch_first = cursor;
- batch_track = cdda_sector_gettrack(d,cursor);
- batch_last = cdda_track_lastsector(d, batch_track);
- if (batch_last>i_last_lsn) batch_last=i_last_lsn;
- } else {
- batch_first = i_first_lsn;
- batch_last = i_last_lsn;
- batch_track = -1;
- }
-
- callbegin=batch_first;
- callend=batch_last;
-
- /* argv[optind] is the span, argv[optind+1] (if exists) is outfile */
-
- if (optind+1<argc) {
- if (!strcmp(argv[optind+1],"-") ){
- out = dup(fileno(stdout));
- if(out==-1){
- report2("Cannot dupplicate stdout: %s",
- strerror(errno));
- exit(1);
- }
- if(batch)
- report("Are you sure you wanted 'batch' "
- "(-B) output with stdout?");
- report("outputting to stdout\n");
- if(logfile){
- fprintf(logfile,"outputting to stdout\n");
- fflush(logfile);
- }
- outfile_name[0]='\0';
- } else {
- char path[256];
-
- char *post=strrchr(argv[optind+1],'/');
- int pos=(post?post-argv[optind+1]+1:0);
- char *file=argv[optind+1]+pos;
-
- path[0]='\0';
-
- if(pos)
- strncat(path,argv[optind+1],pos>256?256:pos);
-
- if(batch)
- snprintf(outfile_name, 246, " %strack%02d.%s", path,
- batch_track, file);
- else
- snprintf(outfile_name, 246, "%s%s", path, file);
-
- if(file[0]=='\0'){
- switch (output_type) {
- case 0: /* raw */
- strncat(outfile_name, "cdda.raw", sizeof("cdda.raw"));
- break;
- case 1:
- strncat(outfile_name, "cdda.wav", sizeof("cdda.wav"));
- break;
- case 2:
- strncat(outfile_name, "cdda.aifc", sizeof("cdda.aifc"));
- break;
- case 3:
- strncat(outfile_name, "cdda.aiff", sizeof("cdda.aiff"));
- break;
- }
- }
-
- out=open(outfile_name,O_RDWR|O_CREAT|O_TRUNC,0666);
- if(out==-1){
- report3("Cannot open specified output file %s: %s",
- outfile_name, strerror(errno));
- exit(1);
- }
- report2("outputting to %s\n", outfile_name);
- if(logfile){
- fprintf(logfile,"outputting to %s\n",outfile_name);
- fflush(logfile);
- }
- }
- } else {
- /* default */
- if (batch)
- sprintf(outfile_name,"track%02d.", batch_track);
- else
- outfile_name[0]='\0';
-
- switch(output_type){
- case 0: /* raw */
- strncat(outfile_name, "cdda.raw", sizeof("cdda.raw"));
- break;
- case 1:
- strncat(outfile_name, "cdda.wav", sizeof("cdda.wav"));
- break;
- case 2:
- strncat(outfile_name, "cdda.aifc", sizeof("cdda.aifc"));
- break;
- case 3:
- strncat(outfile_name, "cdda.aiff", sizeof("cdda.aiff"));
- break;
- }
-
- out = open(outfile_name, O_RDWR|O_CREAT|O_TRUNC, 0666);
- if(out==-1){
- report3("Cannot open default output file %s: %s", outfile_name,
- strerror(errno));
- exit(1);
- }
- report2("outputting to %s\n", outfile_name);
- if(logfile){
- fprintf(logfile,"outputting to %s\n",outfile_name);
- fflush(logfile);
- }
-
- }
-
- switch(output_type) {
- case 0: /* raw */
- break;
- case 1: /* wav */
- WriteWav(out, (batch_last-batch_first+1)*CDIO_CD_FRAMESIZE_RAW);
- break;
- case 2: /* aifc */
- WriteAifc(out, (batch_last-batch_first+1)*CDIO_CD_FRAMESIZE_RAW);
- break;
- case 3: /* aiff */
- WriteAiff(out, (batch_last-batch_first+1)*CDIO_CD_FRAMESIZE_RAW);
- break;
- }
-
- /* Off we go! */
-
- if(offset_buffer_used){
- /* partial sector from previous batch read */
- cursor++;
- if (buffering_write(out,
- ((char *)offset_buffer)+offset_buffer_used,
- CDIO_CD_FRAMESIZE_RAW-offset_buffer_used)){
- report2("Error writing output: %s", strerror(errno));
- exit(1);
- }
- }
-
- skipped_flag=0;
- while(cursor<=batch_last){
- /* read a sector */
- int16_t *readbuf=paranoia_read_limited(p, callback, max_retries);
- char *err=cdda_errors(d);
- char *mes=cdda_messages(d);
-
- if(mes || err)
- fprintf(stderr,"\r "
- " \r%s%s\n",
- mes?mes:"",err?err:"");
-
- if (err) free(err);
- if (mes) free(mes);
- if( readbuf==NULL) {
- skipped_flag=1;
- report("\nparanoia_read: Unrecoverable error, bailing.\n");
- break;
- }
- if(skipped_flag && abort_on_skip){
- cursor=batch_last+1;
- break;
- }
-
- skipped_flag=0;
- cursor++;
-
- if (output_endian!=bigendianp()) {
- int i;
- for (i=0; i<CDIO_CD_FRAMESIZE_RAW/2; i++)
- readbuf[i]=UINT16_SWAP_LE_BE_C(readbuf[i]);
- }
-
- callback(cursor*(CD_FRAMEWORDS)-1,-2);
-
- if (buffering_write(out,((char *)readbuf)+offset_skip,
- CDIO_CD_FRAMESIZE_RAW-offset_skip)){
- report2("Error writing output: %s", strerror(errno));
- exit(1);
- }
- offset_skip=0;
-
- if (output_endian != bigendianp()){
- int i;
- for (i=0; i<CDIO_CD_FRAMESIZE_RAW/2; i++)
- readbuf[i] = UINT16_SWAP_LE_BE_C(readbuf[i]);
- }
-
- /* One last bit of silliness to deal with sample offsets */
- if(sample_offset && cursor>batch_last){
- int i;
- /* read a sector and output the partial offset. Save the
- rest for the next batch iteration */
- readbuf=paranoia_read_limited(p,callback,max_retries);
- err=cdda_errors(d);mes=cdda_messages(d);
-
- if(mes || err)
- fprintf(stderr,"\r "
- " \r%s%s\n",
- mes?mes:"",err?err:"");
-
- if(err)free(err);if(mes)free(mes);
- if(readbuf==NULL){
- skipped_flag=1;
- report("\nparanoia_read: Unrecoverable error reading through "
- "sample_offset shift\n\tat end of track, bailing.\n");
- break;
- }
- if (skipped_flag && abort_on_skip) break;
- skipped_flag=0;
- /* do not move the cursor */
-
- if(output_endian!=bigendianp())
- for(i=0;i<CDIO_CD_FRAMESIZE_RAW/2;i++)
- offset_buffer[i]=UINT16_SWAP_LE_BE_C(readbuf[i]);
- else
- memcpy(offset_buffer,readbuf,CDIO_CD_FRAMESIZE_RAW);
- offset_buffer_used=sample_offset*4;
-
- callback(cursor*(CD_FRAMEWORDS),-2);
-
- if(buffering_write(out,(char *)offset_buffer,
- offset_buffer_used)){
- report2("Error writing output: %s", strerror(errno));
- exit(1);
- }
- }
- }
- callback(cursor*(CDIO_CD_FRAMESIZE_RAW/2)-1,-1);
- buffering_close(out);
- if(skipped_flag){
- /* remove the file */
- report2("\nRemoving aborted file: %s", outfile_name);
- unlink(outfile_name);
- /* make the cursor correct if we have another track */
- if(batch_track!=-1){
- batch_track++;
- cursor=cdda_track_firstsector(d,batch_track);
- paranoia_seek(p,cursor, SEEK_SET);
- offset_skip=sample_offset*4;
- offset_buffer_used=0;
- }
- }
- report("\n");
- }
-
- paranoia_free(p);
- p=NULL;
- }
- }
-
- report("Done.\n\n");
-
- return 0;
-}
diff --git a/src/cd-paranoia/doc/.gitignore b/src/cd-paranoia/doc/.gitignore
deleted file mode 100644
index b336cc7c..00000000
--- a/src/cd-paranoia/doc/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/Makefile
-/Makefile.in
diff --git a/src/cd-paranoia/doc/FAQ.txt b/src/cd-paranoia/doc/FAQ.txt
deleted file mode 100644
index 5a099d73..00000000
--- a/src/cd-paranoia/doc/FAQ.txt
+++ /dev/null
@@ -1,620 +0,0 @@
-
-CDDA Paranoia FAQ
-
-----------------------------------------------------------------------------
-
- "Suspicion Breeds Confidence!"
- --Brazil
-
-----------------------------------------------------------------------------
-
-August 20, 1999
-
-For those new to Paranoia and cdparanoia, this is the
-best, first place to look for information and answers to
-your questions.
-
-More information can be found on the cdparanoia homepage:
-
-http://www.xiph.org/paranoia/
-
-----------------------------------------------------------------------------
-Table of Contents
-
-1. Questions about the Paranoia and cdparanoia projects
- 1. What is cdparanoia?
- 2. Why use cdparanoia?
- 3. What is Paranoia?
- 4. Is cdparanoia / Paranoia portable?
- 5. What is Paranoia's history?
- 6. Is cdparanoia/Paranoia related to cdda2wav?
- 7. What are the differences between Paranoia II, III and IV?
- 8. Are there cdparanoia mailing lists for users or developers?
- 9. What is Paranoia IV's current development status?
- 10. Will cdparanoia, and cdda2wav or xcdroast merge anytime in the future?
-
-2. Questions about using Paranoia and cdparanoia
- 1. Requirements to run cdparanoia (as of alpha 3)
- 2. Does Cdparanoia support ATAPI drives? SCSI Emulation? Parallel port
- drives?
- 3. I can play audio CDs perfectly; why is reading the CD into a file so
- difficult and prone to errors?
- 4. Does cdparanoia lose quality from the CD recording?
- 5. Can cdparanoia detect pregaps? Can it remove the two second gaps
- between tracks?
- 6. Why don't you implement CDDB? A GUI? Four million other features I want?
- 7. The progress meter: What is that weird bargraph during ripping?
- 8. How can I tell if my drive would be OK with regular cdda2wav?
- 9. What is the biggest value of SG_BIG_BUFF I can use?
- 10. Why do the binary files from two reads differ when compared?
- 11. Why does CDParanoia rip files off into WAV format (and other sample
- formats) but not CDDA format?
-
--------------------------------------------------------------------------
-
- Questions about the Paranoia and cdparanoia projects
-
- What is cdparanoia?
-
- Cdparanoia is a Compact Disc Digital Audio (CDDA) extraction tool,
- commonly known on the net as a 'ripper'. The application is built on
- top of the Paranoia library, which is doing the real work (the
- Paranoia source is included in the cdparanoia source distribution).
- Like the original cdda2wav, cdparanoia package reads audio from the
- CDROM directly as data, with no analog step between, and writes the
- data to a file or pipe in WAV, AIFC or raw 16 bit linear PCM.
-
- Cdparanoia is a bit different than most other CDDA extration tools. It
- contains few-to-no 'extra' features, concentrating only on the ripping
- process and knowing as much as possible about the hardware performing
- it. Cdparanoia will read correct, rock-solid audio data from
- inexpensive drives prone to misalignment, frame jitter and loss of
- streaming during atomic reads. Cdparanoia will also read and repair
- data from CDs that have been damaged in some way.
-
- At the same time, however, cdparanoia turns out to be easy to use and
- administrate; It has no compile time configuration, happily
- autodetecting the CDROM, its type, its interface and other aspects of
- the ripping process at runtime. A single binary can serve the diverse
- hardware of the do-it-yourself computer laboratory from Hell...
-
------------------------------------------------------------------------
-
- Why use cdparanoia?
-
- All CDROM drives are not created equal. You'll need cdparanoia if
- yours is a little less equal than others-- or maybe you just keep your
- CD collection in a box of full of gravel. Jewel cases are for wimps;
- you know what I'm talking about.
-
- Unfortunately, cdda2wav and readcdda cannot work properly with a large
- number of CDROM drives in the desktop world today. The most common
- problem is sporadic or regular clicks and pops in the read sample,
- regardless of 'nsector' or 'overlap' settings. Cdda2wav also cannot do
- anything about scratches (and they can cause cdda2wav to break).
- Cdparanoia is also smarter about probing CDDA support from SCSI and
- IDE-SCSI drives; many drives that do not work at all with cdda2wav,
- readcdda, tosha, etc, will work just fine with cdparanoia.
-
------------------------------------------------------------------------
-
- What is Paranoia?
-
- Paranoia is a library project that provides a platform independent,
- unified, robust interface for packet-command based devices. In the
- case of CDROM drives for example, handling and programming cdrom
- drives becomes identical whether on Solaris or Linux, or if the Linux
- drive is SCSI, ATAPI or on the parallel port. In this way, Paranoia is
- similar to Joerg Schilling's SCG library.
-
- In addition to device/platform unification, the library provides tools
- for automatically identifying devices, and intelligent
- handling/correction of errors at all levels of the interface. On top
- of a generic low-level packet command layer, Paranoia implements
- high-level error-correcting interfaces for tasks such as CDDA where
- broken or vastly non-standard devices are the rule, rather than the
- exception.
-
- The Paranoia libraries are incomplete; the first release for use will
- be Paranoia IV, to be bundled with cdparanoia alpha release 10.
- Programming documentation for Paranoia IV will appear shortly on the
- documentation page as Programming with Paranoia IV. Programmers
- interested in contributing to Paranoia IV should read the heading
- Paranoia IV development information.
-
------------------------------------------------------------------------
-
- Is cdparanoia / Paranoia portable?
-
- Paranoia III is Linux only (although it runs on all the flavors of
- linux with a 2.0 or later kernel. It is not only for x86).
-
- Paranoia IV (cdparanoia alpha 10 and later) is a port to other UNIX
- flavors and uses a substantially revised infrastructure. NetBSD and
- Solaris will be first; others will be added as time and outside
- assistance allow.
-
- Suggestions on the proper way to handle each OS's native configuration
- idioms are welcome. I want Rhapsody cdparanoia to look just like other
- Rhapsody apps just as much as I want Linux cdparanoia to look like a
- Linux app.
-
------------------------------------------------------------------------
-
- What is Paranoia's history?
-
- Is cdparanoia/Paranoia related to cdda2wav?
-
- Paranoia I/II and cdparanoia began life as a set of patches to Heiko
- Eissfeldt's 'cdda2wav' application. Cdparanoia gained its own life as
- a rewrite of cdda2wav in January of 1998 as "Paranoia III". Paranoia
- III proved to have an inadequate structure for extention and use on
- other platforms, so Paranoia IV began to take form in fall of 1998.
-
- Modern Paranoia no longer has any relation to cdda2wav aside from
- general cooperation in sharing details between the two projects. In
- fact, cdda2wav itself doesn't look much like the cdda2wav of a year or
- two ago.
-
------------------------------------------------------------------------
-
- What are the differences between Paranoia II, III and IV?
-
- Paranoia I and II were a set of patches to Heiko Eissfeldt's cdda2wav
- 0.8. These patches did nothing more than add some error checks to the
- standard cdda2wav. They were inefficient and only worked with some
- drives.
-
- Paranoia III was the first version to be written seperately from
- cdda2wav in the form of a standalone library. It was not terribly
- portable, however, and the API proved to be inadequate for extension.
-
- Paranoia IV is the upcoming new generation of CDDA Paranoia. It is
- both portable and more capable than Paranoia III.
-
------------------------------------------------------------------------
-
- Are there cdparanoia mailing lists for users or developers?
-
- Yes. In addition to the mailing lists below, read-only CVS access to
- Paranoia III and IV will be availble from xiph.org soon (Paranoia IV
- is not yet under CVS). See http://www.xiph.org/paranoia/ for upto
- date information and automated ways of subscribing.
-
- Mailing list for Paranoia and Cdparanoia users (paranoia@xiph.org):
-
- To join: send a message containing only the one-word line
- 'subscribe' in the body to paranoia-request@xiph.org. Do not send
- subscription requests directly to the main list. The list server at
- xiph.org should respond fairly quickly with a welcome message.
-
- Mailing list for Paranoia IV developers: paranoia-dev@xiph.org
-
- The developers list is intended for focused development discussion
- amongst the core Paranoia development team and outside groups
- developing their own applications using Paranoia. Of course, anyone is
- welcome to read.
-
- To join: send a message containing only the one-word line
- 'subscribe' in the body to paranoia-dev-request@xiph.org. Do not
- send subscription requests directly to the main list.
-
- List for general CDROM tools
-
- There's also a general mailing list for those using/developing CDDA
- extraction and CD writing tools
- (cdwrite@other.debian.org). Subscribe by sending mail to
- other-cdwrite-request@lists.debian.org containing only the word
- subscribe in the body. Do not send subscription requests directly to
- the main list.
-
------------------------------------------------------------------------
-
- What is Paranoia IV's current development status?
-
- Paranoia IV code will soon be available for internal evaluation,
- testing and development work to the developers involved in the
- Paranoia project; read-only CVS access should also be available soon.
- A public release does not yet set for any firm date.
-
- Those interested in contributing to the development of Paranoia, or
- who wich to contribute to porting to other platforms, please contact
- us. Paranoia IV prerelease code will be available to porters soon; I
- prefer to be in contact with those porting to other platforms so that
- Paranoia development has consistent quality across platforms.
-
- At the moment, volunteers have contacted me for most major platforms,
- but more help is still welcome on every OS.
-
------------------------------------------------------------------------
-
- Will cdparanoia, and cdda2wav or xcdroast merge anytime in the future?
-
- Probably not beyond the point it already has. Versions of XCDRoast
- (and other GUI frontends; see the links page) that make use of
- cdparanoia already exist.
-
- Although the cdrecord/cdda2wav and Paranoia projects cooperate,
- they're likely to remain seperate as the former is committed to Joerg
- Schilling's libscg (part of the cdrecord package), just as cdparanoia
- is committed to using Paranoia IV.
-
------------------------------------------------------------------------
-
- Questions about using Paranoia and cdparanoia
-
- Requirements to run cdparanoia (as of alpha 3)
-
- 1. A CDDA capable CDROM drive
- 2. Linux 2.0, 2.1, 2.2 or 2.3
- 1. kernel support for the particular CDROM in use
- 2. kernel support for the generic SCSI interface (if using a
- SCSI CDROM drive) and proper device (/dev/sg?) files (get
- them with the MAKEDEV script) in /dev. Most distributions
- already have the /dev/sg? files.
-
- The cdparanoia binary will likely work with Linux 1.2 and 1.3, but I
- do not actively support kernels older than 2.0 I do know for a fact
- that the source will not build on kernel installs older than 2.0, but
- the problems are mostly related to the ever-changing locations of
- proprietary cdrom include files.
-
- Also, although a 2.0 stock SCSI setup will work, performance will be
- better if linux/include/scsi/sg.h defines SG_BIG_BUFF to 65536 (it
- can't be bigger). Recent kernels (2.0.30+?) already set it to 32768;
- that's OK. Cdparanoia will tell you how big your generic SCSI buffer
- is. 2.2+ does not use a static DMA pool for SG, so there is nothing
- to tune.
-
- Unlike cdda2wav, cdparanoia does not require threading, IPC or
- (optionally) sound card support. /proc filesystem support is no longer
- required (but encouraged!), and /dev/sr? or /dev/scd? devices are not
- required for SCSI, although they do add functionality if present.
-
------------------------------------------------------------------------
-
- Does Cdparanoia support ATAPI drives? SCSI Emulation? Parallel port
- drives?
-
- Alpha 9 supports the full ATAPI, IDE-SCSI and SCSI generic interfaces
- under Linux.
-
- Note that the native ATAPI driver is supported, but that IDE-SCSI
- emulation works better with ATAPI drives. This is an issue of control;
- the emulation interface gives cdparanoia complete control over the
- drive whereas the native ATAPI driver insists on hiding the device
- under an abstraction layer with poor error handling capabilities. Note
- also that a number of ATAPI drives that do not work at all with the
- ATAPI driver (error 006: Could not read audio) *will* work with
- IDE-SCSI emulation.
-
- Parallel port based CDROM (paride) drives are not yet supported;
- support for these drives in Linux will appear in alpha release 10
- (Paranoia IV).
-
------------------------------------------------------------------------
-
- I can play audio CDs perfectly; why is reading the CD into a file so
- difficult and prone to errors? It's just the same thing.
-
- Unfortunately, it isn't that easy.
-
- The audio CD is not a random access format. It can only be played from
- some starting point in sequence until it is done, like a vinyl LP.
- Unlike a data CD, there are no synchronization or positioning headers
- in the audio data (a CD, audio or data, uses 2352 byte sectors. In a
- data CD, 304 bytes of each sector is used for header, sync and error
- correction. An audio CD uses all 2352 bytes for data). The audio CD
- *does* have a continuous fragmented subchannel, but this is only good
- for seeking +/-1 second (or 75 sectors or ~176kB) of the desired area,
- as per the SCSI spec.
-
- When the CD is being played as audio, it is not only moving at 1x, the
- drive is keeping the media data rate (the spin speed) exactly locked
- to playback speed. Pick up a portable CD player while it's playing and
- rotate it 90 degrees. Chances are it will skip; you disturbed this
- delicate balance. In addition, a player is never distracted from what
- it's doing... it has nothing else taking up its time. Now add a
- non-realtime, (relatively) high-latency, multitasking kernel into the
- mess; it's like picking up the player and constantly shaking it.
-
- CDROM drives generally assume that any sort of DAE will be linear and
- throw a readahead buffer at the task. However, the OS is reading the
- data as broken up, seperated read requests. The drive is doing
- readahead buffering and attempting to store additional data as it
- comes in off media while it waits for the OS to get around to reading
- previous blocks. Seeing as how, at 36x, data is coming in at
- 6.2MB/second, and each read is only 13 sectors or ~30k (due to DMA
- restrictions), one has to get off 208 read requests a second, minimum
- without any interruption, to avoid skipping. A single swap to disc or
- flush of filesystem cache by the OS will generally result in loss of
- streaming, assuming the drive is working flawlessly. Oh, and virtually
- no PC on earth has that kind of I/O throughput; a Sun Enterprise
- server might, but a PC does not. Most don't come within a factor of
- five, assuming perfect realtime behavior.
-
- To keep piling on the difficulties, faster drives are often prone to
- vibration and alignment problems; some are total fiascos. They lose
- streaming *constantly* even without being interrupted. Philips
- determined 15 years ago that the CD could only be spun up to 50-60x
- until the physical CD (made of polycarbonate) would deform from
- centripetal force badly enough to become unreadable. Today's players
- are pushing physics to the limit. Few do so terribly reliably.
-
- Note that CD 'playback speed' is an excellent example of advertisers
- making numbers lie for them. A 36x cdrom is generally not spinning at
- 36x a normal drive's speed. As a 1x drive is adjusting velocity
- depending on the access's distance from the hub, a 36x drive is
- probably using a constant angular velocity across the whole surface
- such that it gets 36x max at the edge. Thus it's actually spinning
- slower, assuming the '36x' isn't a complete lie, as it is on some
- drives.
-
- Because audio discs have no headers in the data to assist in picking
- up where things got lost, most drives will just guess.
-
- This doesn't even *begin* to get into stupid firmware bugs. Even
- Plextors have occasionally had DAE bugs (although in every case,
- Plextor has fixed the bug *and* replaced/repaired drives for free).
- Cheaper drives are often complete basket cases.
-
- Rant Update (for those in the know):
-
- Several folks, through personal mail and on Usenet, have pointed out
- that audio discs do place absolute positioning information for (at
- least) nine out of every ten sectors into the Q subchannel, and that
- my original statement of +/-75 sectors above is wrong. I admit to it
- being misleading, so I'll try to clarify.
-
- The positioning data certainly is in subchannel Q; the point is moot
- however, for a couple of reasons.
-
- 1. The SCSI and ATAPI specs (there are a couple of each, pick one)
- don't give any way to retrieve the subchannel from a desired
- sector. The READ SUB-CHANNEL command will hand you Q all right,
- you just don't have any idea where exactly that Q came from. The
- command was intended for getting rough positioning information
- from audio discs that are paused or playing. This is audio;
- missing by several sectors is a tiny fraction of a second.
-
- 2. Older CDROM drives tended not to expect 'READ SUB-CHANNEL' unless
- the drive was playing audio; calling it during data reads could
- crash the drive and lock up the system. I had one of these drives
- (Apple 803i, actually a repackaged Sony CD-8003).
-
- 3. MMC-2 *does* give a way to retrieve the Q subchannel along with
- user data in the READ CD command. Although the drive is required
- to recognize the fetaure, it is allowed to simply return zeroes
- (effectively leaving the feature unimplemented). Guess how many
- drives actually implement this feature: not many.
-
- 4. Assuming you *can* get back the subchannel, most CDROM drives
- seem to understand audio discs primarily at the "little frame"
- level; thus sector-level structures aren't reliable. One might
- get a reassembled subQ, but if the read began in the middle of a
- sector (or dropped a little frame in the middle; many do), the
- subQ is likely corrupt and useless.
-
- As reassembling uncorrupted frames is easy without the subchannel, and
- corrupted reads likely result in a corrupted subchannel too,
- cdparanoia treats the subchannel as more trouble than it's worth
- (during verification).
-
- At least one other package (Exact Audio Copy for Win32) manages to use
- the subchannel to enhance the Table of Contents information. I don't
- know if this only works on MMC-2 drives that support returning Q with
- READ CD, but I think I'm going to revisit using the subchannel for
- extra TOC information.
-
------------------------------------------------------------------------
-
- Does cdparanoia lose quality from the CD recording? Does it just
- re-record the analog signal played from the CDROM drive?
-
- No to both. Cdparanoia (and all other true CD digital audio extraction
- tools) reads the values off the CDROM in digital form. The data never
- comes anywhere near the soundcard, and does not pass through any
- conversion to analog first.
-
------------------------------------------------------------------------
-
- Can cdparanoia detect pregaps? Can it remove the two second gaps
- between tracks
-
- Not yet. This feature is slated to appear in a release of alpha 10
- (Paranoia IV).
-
------------------------------------------------------------------------
-
- Why don't you implement CDDB? A GUI? Four million other features I
- want?
-
- Too many features spoil the broth. "Software is not perfect when there
- is nothing left to add, but rather when there is nothing extraneous
- left to take away." The goal of cdparanoia is perfect, rock-solid
- audio from every capable cdrom on every platform. As this goal has not
- yet been met, I'm uninterested in adding unrelated capability to the
- core engine.
-
- Several GUIs that incorporate cdparanoia already exist; I'm in the
- process of compiling a list (see the links page). Other software that
- implements new features by wrapping around cdpar anoia (like CDDB
- lookup) also exist.
-
- 'Cdparanoia' will not play to sound cards (you can always pipe the
- output to a WAV player), do MD5 signatures, read CD catalog or serial
- numbers (this *is* a feature I plan to add), search indexes, do rate
- reduction (use Sox, Ogg or a million others), or generally make use of
- the maximum speed available from a CDROM drive.
-
- If your CDROM drive is *not* prone to jitter and you don't have
- scratched discs to worry about, you might want to look at the original
- cdda2wav for features cdparanoia does not have. Keep in mind however
- that even the really good drives do occasionally stumble. I know of at
- least one cdparanoia user who insists on using full paranoia with his
- Plextor UltraPlex because it once botched a single sector from a rip;
- he'd already burned the track to several CD-Rs before noticing...
-
------------------------------------------------------------------------
-
- The progress meter: What is that weird bargraph during ripping?
-
- It's a progress/status indicator. There's a completion bargraph, a
- number indicating the last sector number completely verified of the
- read currently happening, an overlap indicator, a gratuitous smilie,
- and a heartbeat indicator to show if the process is still alive, hung,
- or spinning.
-
- The bargraph also marks points during the read with characters to
- indicate where various 'paranoia' features were tripped into action.
- Different bargraph characters indicate different things occurred
- during that part of the read. The letters are heirarchical; for
- example if a trasport error occurs in the same sector as jitter, the
- bargraph will print 'e' instead of '-'.
-
- Legend of
- characters
- A hyphen indicates that two blocks overlapped properly,
- - but they were skewed (frame jitter). This case is
- completely corrected by Paranoia and is not a cause for
- concern.
- A plus indicates not only frame jitter, but an
- unreported, uncorrected loss of streaming in the middle
- + of an atomic read operation. That is, the drive lost
- its place while reading data, and restarted in some
- random incorrect location without alerting the kernel.
- This case is also corrected by Paranoia.
- An 'e' indicates that a transport level SCSI or ATAPI
- e error was caught and corrected. Paranoia will
- completely repair such an error without audible
- defects.
- An "X" indicates a scratch was caught and corrected.
- X Cdparanoia wil interpolate over any missing/corrupt
- samples.
- An asterisk indicates a scratch and jitter both
- * occurred in this general area of the read. Cdparanoia
- wil interpolate over any missing/corrupt samples.
- A ! indicates that a read error got through the stage
- one of error correction and was caught by stage two.
- Many '!' are a cause for concern; it means that the
- drive is making continuous silent errors that look
- ! identical on each re-read, a condition that can't
- always be detected. Although the presence of a '!'
- means the error was corrected, it also means that
- similar errors are probably passing by unnoticed.
- Upcoming releases of cdparanoia will address this
- issue.
- A V indicates a skip that could not be repaired or a
- V sector totally obliterated on the medium (hard read
- error). A 'V' marker generally results in some audible
- defect in the sample.
-
- The smilie is actually relevant. It makes different faces depending on
- the current errors it's correcting.
-
- Legend of
- smilies
-
- :-) Normal operation. No errors to report; if any jitter is
- present, it's small.
- :-| Normal operation, but average jitter is quite large.
- A rift was found in the middle of an atomically read
- block; in other words, the drive lost streaming in the
- :-P middle of a read and did not abort, alert the kernel , or
- restart in the proper location. The drive silently
- continued reading in so me random location.
-
- :-/ The read appears to be drifting; cdparanoia is shifting
- all of its reads to make up for it.
- Two matching vectors were found to disagree even after
- first stage verification; this is an indication that the
- drive is reliably dropping/adding bytes at consistent
- locations. Because the verification algorithm is partially
- 8-| based on rereading and comparing vectors, if two vectors
- read incorrectly but identically, cdparanoia may never
- detect the problem. This smilie indicates that such a
- situation *was* detected; other instances may be slipping
- through.
- Transport or drive error. This is normally not a cause for
- concern; cdparanoia can repair just about any error that
- :-0 it actually detects. For more information about these
- errors, run cdparanoia with the -v option. Any all all
- errors and a description will dump to stderr.
- :-( Cdparanoia detected a scratch.
- Cdparanoia gave up trying to repair a sector; it could not
- read consistent enough information from the drive to do
- ;-( so. At this point cdparanoia will make the best guess it
- has available and continue (a V appears in the bargraph at
- this point). This often results in an audible defect.
- Cdparanoia displays this smilie both when finished reading
- :^D a track and also if no error correction mechanism has been
- tripped so far reading a new track.
-
------------------------------------------------------------------------
-
- How can I tell if my drive would be OK with regular cdda2wav?
-
- Easy. Run cdparanoia; if the progress meter never shows any characters
- but the little arrow going across the screen, the CDROM drive is
- probably one of the (currently) few drives that can read a pristine
- stream of data off an audio disc regardless of circumstances. This
- drive will work quite well with cdda2wav (or cdparanoia using the '-Z'
- option)
-
- A drive that results in a bargraph of all hyphens would *likely* work
- OK with cdda2wav, but it's less certain.
-
- Any other characters in the bargraph (colons, semicolons, pluses, Xs,
- etc..) indicate that a fixups had to be performed at that point during
- the read; that read would have failed or 'popped' using cdda2wav.
-
------------------------------------------------------------------------
-
- What is the biggest value of SG_BIG_BUFF I can use?
-
- This is relevant only to 2.0 kernels and early 2.2 kernels.
- Modern Linux kernels no longer have a single static SG DMS pool.
-
- For 2.0, 65536 (64 kilobytes). Some motherboards can use 128kB
- DMA, but attempting to use 128kB DMA on a machine that can't do
- it will crash the machine. Cdparanoia will not use larger than
- 64kB requests.
-
------------------------------------------------------------------------
-
- Why do the binary files from two reads differ when compared?
-
- The problem is the beginning point of the read. Cdparanoia enforces
- consistency from whatever the drive considers to be the starting point
- of the data, and the drive is returning a slightly different beginning
- point each time. The beginning point should not vary by much, and if
- this shift is accounted for when comparing the files, they should
- indeed turn out to be the same (aside from errors duly reported during
- the read; scratch correction or any reported skips will very likely
- also result in different files).
-
------------------------------------------------------------------------
-
- Why do CDParanoia, CDDA2WAV et al. rip files off into WAV format (and
- other sample formats) but not CDDA format?
-
- WAV and AIFC are simply convenient formats that include enough header
- information such that multipurpose audio software can uniquely
- identify the form of the data in the sample. In raw form, mulaw, SND
- and CDDA look exactly alike to a program like xplay, and are very
- likely to blow your ears (and stereo) out when played! Header formats
- are more versatile and safer. By default, cdparanoia and cdda2wav
- write WAV files.
-
- That said, cdparanoia (and cdda2wav) will write raw, headerless
- formats if explicitly told to. Cdparanoia writes headerless, signed 16
- bit, 44.1kHz stero files in little endian format (LSB first) when
- given the -r option, and the same in big endian (MSB) format when
- given -R. All files written by cdparanoia are a multiple of 2352 bytes
- long (minus the header, if any) as required by cd writer software.
-
-
-Cdparanoia and the Laser-Playback-Head-of-Omniscience logo are
-trademarks (tm) of Xiphophorus (xiph.org). This document copyright (C)
-1994-1999 Xiphophorus. All rights reserved. Comments and questions
-are welcome.
diff --git a/src/cd-paranoia/doc/Makefile.am b/src/cd-paranoia/doc/Makefile.am
deleted file mode 100644
index 725c241a..00000000
--- a/src/cd-paranoia/doc/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-# $Id: Makefile.am,v 1.4 2008/04/17 17:39:48 karl Exp $
-#
-# Copyright (C) 2005, 2007, 2008 Rocky Bernstein <rocky@gnu.org>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-SUBDIRS = en ja
-EXTRA_DIST = FAQ.txt overlapdef.txt
-
-mostlyclean-generic:
- -rm -f *~ \#* .*~ .\#*
-
-maintainer-clean-generic:
- -@echo "This command is intended for maintainers to use;"
- -@echo "it deletes files that may require special tools to rebuild."
- -rm -f Makefile.in
diff --git a/src/cd-paranoia/doc/en/.gitignore b/src/cd-paranoia/doc/en/.gitignore
deleted file mode 100644
index 6304f6b1..00000000
--- a/src/cd-paranoia/doc/en/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/Makefile
-/Makefile.in
-/cd-paranoia.1
diff --git a/src/cd-paranoia/doc/en/Makefile.am b/src/cd-paranoia/doc/en/Makefile.am
deleted file mode 100644
index b70fbe8b..00000000
--- a/src/cd-paranoia/doc/en/Makefile.am
+++ /dev/null
@@ -1,30 +0,0 @@
-# $Id: Makefile.am,v 1.3 2008/04/17 17:39:48 karl Exp $
-#
-# Copyright (C) 2005, 2008 Rocky Bernstein <rocky@gnu.org>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-manfiles = cd-paranoia.1
-man_MANS = $(manfiles)
-transform = s,cd-paranoia,@CDPARANOIA_NAME@,
-
-EXTRA_DIST = $(manfiles) cd-paranoia.1.in
-
-mostlyclean-generic:
- -rm -f *~ \#* .*~ .\#*
-
-maintainer-clean-generic:
- -@echo "This command is intended for maintainers to use;"
- -@echo "it deletes files that may require special tools to rebuild."
- -rm -f Makefile.in $(manfiles)
diff --git a/src/cd-paranoia/doc/en/cd-paranoia.1.in b/src/cd-paranoia/doc/en/cd-paranoia.1.in
deleted file mode 100644
index ecf409a2..00000000
--- a/src/cd-paranoia/doc/en/cd-paranoia.1.in
+++ /dev/null
@@ -1,381 +0,0 @@
-.TH @CDPARANOIA_NAME@ 1 "version III release alpha 9.8 libcdio"
-.SH NAME
-@CDPARANOIA_NAME@ 9.8 (Paranoia release III via libcdio) \- an audio CD reading utility which includes extra data verification features
-.SH SYNOPSIS
-.B @CDPARANOIA_NAME@
-.RB [ options ]
-.B span
-.RB [ outfile ]
-.SH DESCRIPTION
-.B @CDPARANOIA_NAME@
-retrieves audio tracks from CDDA capable CD-ROM drives. The data can
-be saved to a file or directed to standard output in WAV, AIFF, AIFF-C
-or raw format. Most ATAPI, SCSI and several proprietary CD-ROM drive
-makes are supported;
-.B @CDPARANOIA_NAME@
-can determine if the target drive is CDDA capable.
-.P
-In addition to simple reading,
-.B @CDPARANOIA_NAME@
-adds extra-robust data verification, synchronization, error handling
-and scratch reconstruction capability.
-.P
-This version uses the libcdio library for interaction with a CD-ROM
-drive. The jitter and error correction however are the same as used in
-Xiph's cdparanoia.
-.SH OPTIONS
-
-.TP
-.B \-v --verbose
-Be absurdly verbose about the autosensing and reading process. Good
-for setup and debugging.
-
-.TP
-.B \-q --quiet
-Do not print any progress or error information during the reading process.
-
-.TP
-.B \-e --stderr-progress
-Force output of progress information to stderr (for wrapper scripts).
-
-.TP
-.B \-V --version
-Print the program version and quit.
-
-.TP
-.B \-Q --query
-Perform CD-ROM drive autosense, query and print the CD-ROM table of
-contents, then quit.
-
-.TP
-.B \-s --search-for-drive
-Forces a complete search for a cdrom drive, even if the /dev/cdrom link exists.
-
-.TP
-.B \-h --help
-Print a brief synopsis of
-.B @CDPARANOIA_NAME@
-usage and options.
-
-.TP
-.BI "\-l --log-summary " file
-Save result summary to file.
-
-.TP
-.B \-p --output-raw
-Output headerless data as raw 16 bit PCM data with interleaved samples in host byte order. To force little or big endian byte order, use
-.B \-r
-or
-.B \-R
-as described below.
-
-.TP
-.B \-r --output-raw-little-endian
-Output headerless data as raw 16 bit PCM data with interleaved samples in LSB first byte order.
-
-.TP
-.B \-R --output-raw-big-endian
-Output headerless data as raw 16 bit PCM data with interleaved samples in MSB first byte order.
-
-.TP
-.B \-w --output-wav
-Output data in Micro$oft RIFF WAV format (note that WAV data is always
-LSB first byte order).
-
-.TP
-.B \-f --output-aiff
-Output data in Apple AIFF format (note that AIFC data is
-always in MSB first byte order).
-
-.TP
-.B \-a --output-aifc
-Output data in uncompressed Apple AIFF-C format (note that AIFF-C data is
-always in MSB first byte order).
-
-.TP
-.BI "\-B --batch "
-
-Cdda2wav-style batch output flag; @CDPARANOIA_NAME@ will split the output
-into multiple files at track boundaries. Output file names are
-prepended with 'track#.'
-
-.TP
-.B \-c --force-cdrom-little-endian
-Some CD-ROM drives misreport their endianness (or do not report it at
-all); it's possible that @CDPARANOIA_NAME@ will guess wrong. Use
-.B \-c
-to force @CDPARANOIA_NAME@ to treat the drive as a little endian device.
-
-.TP
-.B \-C --force-cdrom-big-endian
-As above but force @CDPARANOIA_NAME@ to treat the drive as a big endian device.
-
-.TP
-.BI "\-n --force-default-sectors " n
-Force the interface backend to do atomic reads of
-.B n
-sectors per read. This number can be misleading; the kernel will often
-split read requests into multiple atomic reads (the automated Paranoia
-code is aware of this) or allow reads only wihin a restricted size
-range.
-.B This option should generally not be used.
-
-.TP
-.BI "\-d --force-cdrom-device " device
-Force the interface backend to read from
-.B device
-rather than the first readable CD-ROM drive it finds containing a
-CD-DA disc. This can be used to specify devices of any valid
-interface type (ATAPI, SCSI or proprietary).
-
-.TP
-.BI "\-g --force-generic-device " device
-This option is an alias for
-.B \-d
-and is retained for compatibility.
-
-.TP
-.BI "\-S --force-read-speed " number
-Use this option explicitly to set the read rate of the CD drive (where
-supported). This can reduce underruns on machines with slow disks, or
-which are low on memory.
-
-.TP
-.BI "\-t --toc-offset " number
-Use this option to force the entire disc LBA addressing to shift by
-the given amount; the value is added to the beginning offsets in the
-TOC. This can be used to shift track boundaries for the whole disc
-manually on sector granularity. The next option does something
-similar...
-
-.TP
-.BI "\-T --toc-bias "
-Some drives (usually random Toshibas) report the actual track
-beginning offset values in the TOC, but then treat the beginning of
-track 1 index 1 as sector 0 for all read operations. This results in
-every track seeming to start too late (losing a bit of the beginning
-and catching a bit of the next track).
-\-T accounts for this behavior. Note that this option will cause
-@CDPARANOIA_NAME@ to attempt to read sectors before or past the known user
-data area of the disc, resulting in read errors at disc edges on most
-drives and possibly even hard lockups on some buggy hardware.
-
-.TP
-.BI "\-O --sample-offset " number
-Some CD-ROM/CD-R drives will add an offset to the position on reading
-audio data. This is usually around 500-700 audio samples (ca. 1/75
-second) on reading. So when @CDPARANOIA_NAME@ queries a specific
-sector, it might not receive exactly that sector, but shifted by some
-amount.
-.P
-Use this option to force the entire disc to shift sample position
-output by the given amount; This can be used to shift track boundaries
-for the whole disc manually on sample granularity. Note that if you
-are ripping something including the ending of the CD (e.g. the entire
-disk), this option will cause @CDPARANOIA_NAME@ to attempt to read
-partial sectors before or past the known user data area, probably
-causing read errors on most drives and possibly even hard lockups on
-some buggy hardware.
-
-.TP
-.B \-Z --disable-paranoia
-Disable
-.B all
-data verification and correction features. When using -Z, @CDPARANOIA_NAME@
-reads data exactly as would cdda2wav with an overlap setting of zero.
-This option implies that
-.B \-Y
-is active.
-
-.TP
-.B \-z --never-skip[=max_retries]
-Do not accept any skips; retry forever if needed. An optional maximum
-number of retries can be specified; for comparison, default without -z is
-currently 20.
-
-.TP
-.B \-Y --disable-extra-paranoia
-Disables intra-read data verification; only overlap checking at read
-boundaries is performed. It can wedge if errors occur in the attempted overlap area. Not recommended.
-
-.TP
-.B \-X --abort-on-skip
-If the read skips due to imperfect data, a scratch, whatever, abort reading this track. If output is to a file, delete the partially completed file.
-
-.TP
-.B \-x --test-flags mask
-Simulate CD-reading errors. This is used in regression testing, but
-other uses might be to see how well a CD-ROM performs under
-(simulated) CD degradation. mask specifies the artificial kinds of
-errors to introduced; "or"-ing values from the selection below will
-simulate the kind of specified failure.
-.P
- 0x10 - Simulate under-run reading
-.TP
-
-
-.SH OUTPUT SMILIES
-.TP
-.B
- :-)
-Normal operation, low/no jitter
-.TP
-.B
- :-|
-Normal operation, considerable jitter
-.TP
-.B
- :-/
-Read drift
-.TP
-.B
- :-P
-Unreported loss of streaming in atomic read operation
-.TP
-.B
- 8-|
-Finding read problems at same point during reread; hard to correct
-.TP
-.B
- :-0
-SCSI/ATAPI transport error
-.TP
-.B
- :-(
-Scratch detected
-.TP
-.B
- ;-(
-Gave up trying to perform a correction
-.TP
-.B
- 8-X
-Aborted read due to known, uncorrectable error
-.TP
-.B
- :^D
-Finished extracting
-
-.SH PROGRESS BAR SYMBOLS
-.TP
-.B
-<space>
-No corrections needed
-.TP
-.B
- -
-Jitter correction required
-.TP
-.B
- +
-Unreported loss of streaming/other error in read
-.TP
-.B
- !
-Errors found after stage 1 correction; the drive is making the
-same error through multiple re-reads, and @CDPARANOIA_NAME@ is having trouble
-detecting them.
-.TP
-.B
- e
-SCSI/ATAPI transport error (corrected)
-.TP
-.B
- V
-Uncorrected error/skip
-
-.SH SPAN ARGUMENT
-
-The span argument specifies which track, tracks or subsections of
-tracks to read. This argument is required.
-.B NOTE:
-Unless the span is a simple number, it's generally a good idea to
-quote the span argument to protect it from the shell.
-.P
-The span argument may be a simple track number or an offset/span
-specification. The syntax of an offset/span takes the rough form:
-.P
-1[ww:xx:yy.zz]-2[aa:bb:cc.dd]
-.P
-Here, 1 and 2 are track numbers; the numbers in brackets provide a
-finer grained offset within a particular track. [aa:bb:cc.dd] is in
-hours/minutes/seconds/sectors format. Zero fields need not be
-specified: [::20], [:20], [20], [20.], etc, would be interpreted as
-twenty seconds, [10:] would be ten minutes, [.30] would be thirty
-sectors (75 sectors per second).
-.P
-When only a single offset is supplied, it is interpreted as a starting
-offset and ripping will continue to the end of the track. If a single
-offset is preceeded or followed by a hyphen, the implicit missing
-offset is taken to be the start or end of the disc, respectively. Thus:
-
-.TP
-.B 1:[20.35]
-Specifies ripping from track 1, second 20, sector 35 to the end of
-track 1.
-.TP
-.B 1:[20.35]-
-Specifies ripping from 1[20.35] to the end of the disc
-.TP
-.B \-2
-Specifies ripping from the beginning of the disc up to (and including) track 2
-.TP
-.B \-2:[30.35]
-Specifies ripping from the beginning of the disc up to 2:[30.35]
-.TP
-.B 2-4
-Specifies ripping from the beginning of track 2 to the end of track 4.
-.P
-Again, don't forget to protect square brackets and preceeding hyphens from
-the shell.
-
-.SH EXAMPLES
-
-A few examples, protected from the shell:
-.TP
-Query only with exhaustive search for a drive and full reporting of autosense:
-.P
- @CDPARANOIA_NAME@ -vsQ
-.TP
-Extract an entire disc, putting each track in a seperate file:
-.P
- @CDPARANOIA_NAME@ -B
-.TP
-Extract from track 1, time 0:30.12 to 1:10.00:
-.P
- @CDPARANOIA_NAME@ "1[:30.12]-1[1:10]"
-.TP
-Extract from the beginning of the disc up to track 3:
-.P
- @CDPARANOIA_NAME@ -- "-3"
-.TP
-The "--" above is to distinguish "-3" from an option flag.
-.SH OUTPUT
-
-The output file argument is optional; if it is not specified,
-@CDPARANOIA_NAME@ will output samples to one of
-.BR cdda.wav ", " cdda.aifc ", or " cdda.raw
-depending on whether
-.BR \-w ", " \-a ", " \-r " or " \-R " is used (" \-w
-is the implicit default). The output file argument of
-.B \-
-specifies standard output; all data formats may be piped.
-
-.SH ACKNOWLEDGEMENTS
-@CDPARANOIA_NAME@ sprang from and once drew heavily from the interface of
-Heiko Eissfeldt's (heiko@colossus.escape.de) 'cdda2wav'
-package. @CDPARANOIA_NAME@ would not have happened without it.
-.P
-Joerg Schilling has also contributed SCSI expertise through his
-generic SCSI transport library.
-.P
-.SH AUTHOR
-Monty <monty@xiph.org>
-.P
-Cdparanoia's homepage may be found at:
-http://www.xiph.org/paranoia/
-.P
-Revised for use with libcdio by Rocky <rocky@gnu.org>
-.P
-The libcdio homepage may be found at:
-http://www.gnu.org/software/libcdio
diff --git a/src/cd-paranoia/doc/ja/.gitignore b/src/cd-paranoia/doc/ja/.gitignore
deleted file mode 100644
index 6304f6b1..00000000
--- a/src/cd-paranoia/doc/ja/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/Makefile
-/Makefile.in
-/cd-paranoia.1
diff --git a/src/cd-paranoia/doc/ja/Makefile.am b/src/cd-paranoia/doc/ja/Makefile.am
deleted file mode 100644
index bf4f7170..00000000
--- a/src/cd-paranoia/doc/ja/Makefile.am
+++ /dev/null
@@ -1,72 +0,0 @@
-# $Id: Makefile.am,v 1.2 2008/04/17 17:39:48 karl Exp $
-#
-# Copyright (C) 2005, 2008 Rocky Bernstein <rocky@gnu.org>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-mansubdir=/jp/man1
-manfiles = cd-paranoia.1
-man_MANS = $(manfiles) cd-paranoia.1
-transform = s,cd-paranoia,@CDPARANOIA_NAME@,
-
-EXTRA_DIST = $(manfiles) cd-paranoia.1.in
-
-install-man1: $(man_MANS)
- @$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(mandir)$(mansubdir)"
- @list='$(man1_MANS)'; \
- l2='$(man_MANS)'; for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 1*) ;; \
- *) ext='1' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)$(mansubdir)/$$inst"; \
- $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)$(mansubdir)/$$inst; \
- done
-
-uninstall-man1:
- @$(NORMAL_UNINSTALL)
- @list='$(man1_MANS)'; \
- l2='$(man_MANS)'; for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f $(DESTDIR)$(mandir)$(mansubdir)/$$inst"; \
- rm -f $(DESTDIR)$(mandir)$(mansubdir)/$$inst; \
- done
-
-mostlyclean-generic:
- -rm -f *~ \#* .*~ .\#*
-
-maintainer-clean-generic:
- -@echo "This command is intended for maintainers to use;"
- -@echo "it deletes files that may require special tools to rebuild."
- -rm -f Makefile.in $(manfiles)
diff --git a/src/cd-paranoia/doc/ja/cd-paranoia.1.in b/src/cd-paranoia/doc/ja/cd-paranoia.1.in
deleted file mode 100644
index 5143e06e..00000000
--- a/src/cd-paranoia/doc/ja/cd-paranoia.1.in
+++ /dev/null
@@ -1,359 +0,0 @@
-.TH @CDPARANOIA_NAME@ 1
-.\" Translated Sun Aug 22 18:02:41 JST 1999
-.\" by FUJIWARA Teruyoshi <fujiwara@linux.or.jp>
-.SH ̾Á°
-@CDPARANOIA_NAME@ (Paranoia release III libcdio) \- ¥ª¡¼¥Ç¥£¥ª CD Æɤ߼è¤ê¥æ¡¼¥Æ¥£¥ê¥Æ¥£¡£ÆÃÊ̤ʥǡ¼¥¿¾È¹çµ¡Ç½¤ò»ý¤Ä¡£
-.SH ÆüÉÕ
-¥Ð¡¼¥¸¥ç¥óIII ¥ê¥ê¡¼¥¹¦Á9.6 (17 Aug 1999)
-.SH ½ñ¼°
-.B @CDPARANOIA_NAME@
-.RB [ options ]
-.B span
-.RB [ outfile ]
-.SH ÀâÌÀ
-.B @CDPARANOIA_NAME@
-¤Ï CD-DA µ¡Ç½¤ò»ý¤Ä CD-ROM ¥É¥é¥¤¥Ö¤«¤é¥ª¡¼¥Ç¥£¥ª¥È¥é¥Ã¥¯¤ò¼è¤ê½Ð¤·¤Þ
-¤¹¡£¤³¤Î¥Ç¡¼¥¿¤Ï WAV, AIFF, AIFF-C, raw ·Á¼°¤Ç¥Õ¥¡¥¤¥ë¤Ë¥»¡¼¥Ö¤¹¤ë¤³¤È
-¤ä¡¢É¸½à½ÐÎϤËÁ÷¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤Û¤È¤ó¤É¤Î ATAPI, SCSI, ¥á¡¼¥«¡¼Æȼ«
-¤Î CD-ROM ¥É¥é¥¤¥Ö¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
-.B @CDPARANOIA_NAME@
-¤ÏÂоݤΥɥ饤¥Ö¤¬ CD-DA µ¡Ç½¤ò»ý¤Ã¤Æ¤¤¤ë¤«¤É¤¦¤«¤òȽÊ̤Ǥ­¤Þ¤¹¡£
-.P
-ñ½ã¤ÊÆɤ߼è¤ê¤À¤±¤Ç¤Ê¤¯¡¢
-.B @CDPARANOIA_NAME@
-¤ÏÆÃÊ̤˴è·ò¤Ê¥Ç¡¼¥¿¾È¹çµ¡Ç½¡¢Æ±´üµ¡Ç½¡¢¥¨¥é¡¼½èÍýµ¡Ç½¡¢ÇË»¥Ç¡¼¥¿¤ÎºÆ
-¹½À®µ¡Ç½¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£
-.SH ¥ª¥×¥·¥ç¥ó
-
-.TP
-.B \-v --verbose
-¼«Æ°¸¡½Ð¤ÈÆɤ߼è¤ê¤Î½èÍý¤Ë¤Ä¤¤¤Æ¡¢¤Ð¤«¤Ð¤«¤·¤¤¤Û¤É¾éŤÊɽ¼¨¤ò¹Ô¤¤¤Þ¤¹¡£
-ÀßÄê¤ä¥Ç¥Ð¥Ã¥°¤ÎºÝ¤ËÊØÍø¤Ç¤¹¡£
-
-.TP
-.B \-q --quiet
-Æɤ߼è¤ê½èÍý¤ÎÅÓÃæ¤Ë¡¢¿Ê¹Ô¾õ¶·¤ä¥¨¥é¡¼¾ðÊó¤òÁ´¤¯É½¼¨¤·¤Þ¤»¤ó¡£
-
-.TP
-.B \-e --stderr-progress
-¿Ê¹Ô¾õ¶·¤ò(¥é¥Ã¥Ñ¥¹¥¯¥ê¥×¥È¤Î¤¿¤á¤Ë)ɸ½à¥¨¥é¡¼½ÐÎϤ˽ÐÎϤ·¤Þ¤¹¡£
-
-.TP
-.B \-V --version
-¥×¥í¥°¥é¥à¤Î¥Ð¡¼¥¸¥ç¥ó¤òɽ¼¨¤·¤Æ½ªÎ»¤·¤Þ¤¹¡£
-
-.TP
-.B \-Q --query
-CD-ROM ¥É¥é¥¤¥Ö¤Î¼«Æ°¸¡½Ð¤ò¹Ô¤¤¡¢CD-ROM ¤Î TOC ¤ÎÌ䤤¹ç¤ï¤»¤Èɽ¼¨¤ò¹Ô
-¤¤¡¢½ªÎ»¤·¤Þ¤¹¡£
-
-.TP
-.B \-s --search-for-drive
-¤¿¤È¤¨ /dev/cdrom ¤Î¥ê¥ó¥¯¤¬Â¸ºß¤·¤Æ¤¤¤Æ¤â¡¢CD-ROM ¥É¥é¥¤¥Ö¤Î´°Á´¤Ê
-¸¡º÷¤ò¹Ô¤¤¤Þ¤¹¡£
-
-.TP
-.B \-h --help
-.B @CDPARANOIA_NAME@
-¤Î»È¤¤Êý¤È¥ª¥×¥·¥ç¥ó¤ò´Êñ¤ÊÀâÌÀ¤ò½ÐÎϤ·¤Þ¤¹¡£
-
-.TP
-.B \-p --output-raw
-¥Ø¥Ã¥À̵¤·¤Î¥Ç¡¼¥¿¤ò¥Û¥¹¥È¤Î¥Ð¥¤¥È½ç¤Ç¡¢¥¤¥ó¥¿¥ê¡¼¥Ö½èÍý¤ò»Ü¤·¤¿
-¥µ¥ó¥×¥ë²»À¼¤ò´Þ¤à raw ·Á¼°¤Î 16 ¥Ó¥Ã¥È PCM ¥Ç¡¼¥¿¤È¤·¤Æ½ÐÎϤ·¤Þ¤¹¡£
-¥Ð¥¤¥È½ç¤È¤·¤Æ¥ê¥È¥ë¥¨¥ó¥Ç¥£¥¢¥ó¤¢¤ë¤¤¤Ï¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¤ò»ØÄꤹ¤ë¤Ë
-¤Ï¡¢¸å½Ò¤Î
-.B \-r
-¤Þ¤¿¤Ï
-.B \-R
-¥ª¥×¥·¥ç¥ó¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£
-
-.TP
-.B \-r --output-raw-little-endian
-¥Ø¥Ã¥À̵¤·¤Î¥Ç¡¼¥¿¤ò LSB first ¤Î¥Ð¥¤¥È½ç¤Ç¡¢¥¤¥ó¥¿¥ê¡¼¥Ö½èÍý¤ò»Ü¤·¤¿
-¥µ¥ó¥×¥ë²»À¼¤ò´Þ¤à raw ·Á¼°¤Î 16 ¥Ó¥Ã¥È PCM ¥Ç¡¼¥¿¤È¤·¤Æ½ÐÎϤ·¤Þ¤¹¡£
-
-.TP
-.B \-R --output-raw-big-endian
-¥Ø¥Ã¥À̵¤·¤Î¥Ç¡¼¥¿¤ò MSB first ¤Î¥Ð¥¤¥È½ç¤Ç¡¢¥¤¥ó¥¿¥ê¡¼¥Ö½èÍý¤ò»Ü¤·¤¿
-¥µ¥ó¥×¥ë²»À¼¤ò´Þ¤à raw ·Á¼°¤Î 16 ¥Ó¥Ã¥È PCM ¥Ç¡¼¥¿¤È¤·¤Æ½ÐÎϤ·¤Þ¤¹¡£
-
-.TP
-.B \-w --output-wav
-¥Ç¡¼¥¿¤ò Micro$oft ¤Î RIFF WAV ·Á¼°¤Ç½ÐÎϤ·¤Þ¤¹(WAV ¥Ç¡¼¥¿¤Î¥Ð¥¤¥È½ç¤Ï
-ɬ¤º LSB first ¤Ç¤¢¤ëÅÀ¤ËÃí°Õ)¡£
-
-.TP
-.B \-f --output-aiff
-¥Ç¡¼¥¿¤ò Apple ¤Î AIFF ·Á¼°¤Ç½ÐÎϤ·¤Þ¤¹(AIFC ¥Ç¡¼¥¿¤Î¥Ð¥¤¥È½ç¤Ïɬ¤º
-MSB first ¤Ç¤¢¤ëÅÀ¤ËÃí°Õ)¡£
-
-.TP
-.B \-a --output-aifc
-¥Ç¡¼¥¿¤ò̵°µ½Ì ¤Î Apple AIFF-C ·Á¼°¤Ç½ÐÎϤ·¤Þ¤¹(AIFF-C ¥Ç¡¼¥¿¤Î¥Ð¥¤¥È
-½ç¤Ïɬ¤º MSB first ¤Ç¤¢¤ëÅÀ¤ËÃí°Õ)¡£
-
-.TP
-.BI "\-B --batch "
-cdda2wav ·Á¼°¤Î¥Ð¥Ã¥Á½ÐÎϤò¹Ô¤¤¤Þ¤¹¡£@CDPARANOIA_NAME@ ¤Ï½ÐÎϤò¥È¥é¥Ã¥¯¶­³¦¤Ç
-Ê£¿ô¥Õ¥¡¥¤¥ë¤Ëʬ³ä¤·¤Þ¤¹¡£½ÐÎÏ¥Õ¥¡¥¤¥ë¤Î¥Õ¥¡¥¤¥ë̾¤ÎÀèƬÉôʬ¤Ï¡¢'track(ÈÖ¹æ)'
-¤È¤Ê¤ê¤Þ¤¹¡£
-
-.TP
-.B \-c --force-cdrom-little-endian
-°ìÉô¤Î CD-ROM ¤Ï´Ö°ã¤Ã¤¿¥¨¥ó¥Ç¥£¥¢¥ó¤òÊó¹ð¤·¤Þ¤¹(¤¢¤ë¤¤¤Ï¥¨¥ó¥Ç¥£¥¢¥ó
-¤Ë´Ø¤¹¤ë¾ðÊó¤òÁ´¤¯Êó¹ð¤·¤Þ¤»¤ó)¡£¤½¤Î¤¿¤á¡¢@CDPARANOIA_NAME@ ¤¬¥¨¥ó¥Ç¥£¥¢¥ó¤ò
-´Ö°ã¤¨¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£¥É¥é¥¤¥Ö¤ò¥ê¥È¥ë¥¨¥ó¥Ç¥£¥¢¥ó¤Î¥Ç¥Ð¥¤¥¹¤È¤·¤Æ
-@CDPARANOIA_NAME@ ¤Ë°·¤ï¤»¤ë¤Ë¤Ï¡¢
-.B \-c
-¥ª¥×¥·¥ç¥ó¤ò»È¤¤¤Þ¤¹¡£
-
-.TP
-.B \-C --force-cdrom-big-endian
-Á°¤Î¥ª¥×¥·¥ç¥ó¤ÎµÕ¤Ç¡¢¥Ç¥Ð¥¤¥¹¤ò¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¤Î¥Ç¥Ð¥¤¥¹¤È¤·¤Æ
-@CDPARANOIA_NAME@ ¤Ë°·¤ï¤»¤Þ¤¹¡£
-
-.TP
-.BI "\-n --force-default-sectors " n
-¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î¥Ð¥Ã¥¯¥¨¥ó¥É¤¬¹Ô¤¦ºÇ¾®Ã±°Ì¤ÎÆɤ߼è¤ê¤ò¡¢
-1 ²ó¤ÎÆɤ߼è¤ê¤´¤È¤Ë
-.B n
-¥»¥¯¥¿¤È¤·¤Þ¤¹¡£¤³¤Î¿ô¤ÏÌäÂê¤òµ¯¤³¤¹¤ª¤½¤ì¤¬¤¢¤ê¤Þ¤¹¡£¥«¡¼¥Í¥ë¤Ï¿¤¯¤Î
-¾ì¹ç¡¢Æɤ߼è¤êÍ×µá¤òºÇ¾®Ã±°Ì¤ÎÆɤ߼è¤ê(@CDPARANOIA_NAME@ ¤Ë¤è¤ë¼«Æ°½èÍý¤Ï¤³¤ì
-¤ËÂбþ¤·¤Æ¤¤¤Þ¤¹)Ê£¿ô¸Ä¤Ëʬ³ä¤¹¤ë¤«¡¢À©¸Â¤µ¤ì¤¿Â礭¤µ¤ÎÈϰϤǤ·¤«
-Æɤ߼è¤ê¤òµö²Ä¤·¤Þ¤»¤ó¡£
-.B ÉáÄ̤Ϥ³¤Î¥ª¥×¥·¥ç¥ó¤ò»È¤¦¤Ù¤­¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
-
-.TP
-.BI "\-d --force-cdrom-device " device
-¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î¥Ð¥Ã¥¯¥¨¥ó¥É¤Ë¤è¤ëÆɤ߼è¤ê¤ò¡¢ºÇ½é¤Ë¸«¤Ä¤±¤¿Æɤ߼è¤ê²Ä
-ǽ¤Ê CD-ROM ¥É¥é¥¤¥Ö¤Ç¤Ï¤Ê¤¯¡¢»ØÄꤷ¤¿
-.B device
-¤«¤é¹Ô¤¦¤è¤¦¤Ë¤·¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤Ç¤Ï¡¢ÍøÍѲÄǽ¤Ç¤¢¤ëǤ°Õ¤Î
-¥¤¥ó¥¿¥Õ¥§¡¼¥¹(ATAPI, SCSI, ¥á¡¼¥«¡¼Æȼ«)¤ò»ý¤Ä¥Ç¥Ð¥¤¥¹¤ò»ØÄꤹ¤ë¤³¤È
-¤¬¤Ç¤­¤Þ¤¹¡£
-
-.TP
-.BI "\-g --force-generic-device " device
-¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢SCSI CD-ROM ¤ÈÈÆÍѥǥХ¤¥¹¤ÎÀßÄê¤òÌÀ¼¨Åª¤ËÊÌ¡¹¤ËÀ©¸æ
-¤·¤¿¤¤»þ¤Ë
-.B \-d
-¥ª¥×¥·¥ç¥ó¤ÈÁȤ߹ç¤ï¤»¤Æ»È¤¤¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤¬ÌòΩ¤Ä¤Î¤Ï¡¢SCSI ¤Î
-ÀßÄ꤬ɸ½à¤È°Û¤Ê¤ë¾ì¹ç¤À¤±¤Ç¤¹¡£
-
-.TP
-.BI "\-S --force-read-speed " number
-CD ¥É¥é¥¤¥Ö¤«¤é¤ÎÆɤ߹þ¤ß®ÅÙ¤òÀßÄꤹ¤ë¤Ë¤Ï¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤òÌÀ¼¨Åª¤Ë
-»È¤Ã¤Æ¤¯¤À¤µ¤¤(¥É¥é¥¤¥Ö¤¬Âбþ¤·¤Æ¤¤¤ë¾ì¹ç)¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤òÍѤ¤¤ë¤È¡¢
-¥Ç¥£¥¹¥¯¤¬ÃÙ¤¤¾ì¹ç¤ä¥á¥â¥ê¤¬¾¯¤Ê¤¤¾ì¹ç¤Ëµ¯¤³¤ë¥¢¥ó¥À¡¼¥é¥ó¤ò¸º¤é¤¹¤³¤È
-¤¬¤Ç¤­¤Þ¤¹¡£
-
-.TP
-.B \-Z --disable-paranoia
-¥Ç¡¼¥¿¾È¹ç¤ÈÄûÀµµ¡Ç½¤ò
-.b Á´¤Æ
-̵¸ú¤Ë¤·¤Þ¤¹¡£-Z ¥ª¥×¥·¥ç¥ó¤òÍѤ¤¤ë¤È¡¢@CDPARANOIA_NAME@ ¤Ï
-¥ª¡¼¥Ð¡¼¥é¥Ã¥×¤ÎÀßÄ꤬ 0 ¤Ç¤¢¤ë cdda2wav ¤ÈÁ´¤¯Æ±¤¸¤è¤¦¤Ë¥Ç¡¼¥¿¤Î
-Æɤ߼è¤ê¤ò¹Ô¤¤¤Þ¤¹¡£
-¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤È
-.B \-W ,
-.B \-X ,
-.B \-Y
-¥ª¥×¥·¥ç¥ó¤âÍ­¸ú¤Ë¤Ê¤ê¤Þ¤¹¤¬¡¢
-.B \-Z \-W \-X \-Y
-¤ÈÁ´¤¯Æ±¤¸¤Ç¤Ï
-.B ¤¢¤ê¤Þ¤»¤ó¡£
-¤Ê¤¼¤Ê¤é¡¢
-.B \-W
-¤«¤é
-.B \-Z
-¤Þ¤Ç¤Î¥ª¥×¥·¥ç¥ó¤Ë¤è¤ê¾È¹ç¤Î¥ì¥Ù¥ë¤¬³¬ÁØŪ¤ËÊѤï¤ë¤«¤é¤Ç¤¹¡£¼ÂºÝ¤ËÍ­¸ú
-¤Ë¤Ê¤ë¤Î¤ÏºÇ¸å¤Ë»ØÄꤷ¤¿¥ª¥×¥·¥ç¥ó¤À¤±¤Ç¤¹¡£
-
-.TP
-.B \-Y --disable-extra-paranoia
-Æɤ߼è¤Ã¤¿¥Ç¡¼¥¿¤ÎÃæ´Ö¤Ë¤ª¤±¤ë¥Ç¡¼¥¿¾È¹ç¤ò¹Ô¤¤¤Þ¤»¤ó¡£¤Ä¤Þ¤ê¡¢
-¥Ç¡¼¥¿¤ÎÆɤ߼è¤ê¶­³¦¤Ë¤ª¤±¤ë¥ª¡¼¥Ð¡¼¥é¥Ã¥×Éôʬ¤Î¥Á¥§¥Ã¥¯¤·¤«¹Ô¤¤¤Þ¤»¤ó¡£
-
-.TP
-.B \-X --disable-scratch-detection
-¾È¹ç¤ÎÅÓÃæ¤Ç¤Ï½ý¤Îõºº¤â¹Ô¤ï¤º¡¢½ý¤ËÂФ·¤Æ´è·ò¤ÊƱ´ü½èÍý¤â¹Ô¤¤¤Þ¤»¤ó¡£
-.B \-X
-¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤¿¾ì¹ç¡¢½ý¤Ä¤¤¤¿ CD ¤òÍ¿¤¨¤ë¤È @CDPARANOIA_NAME@ ¤ÏÆɤ߼è¤ê
-¤Î¼ºÇÔ¤òµ¯¤³¤·¤Þ¤¹¡£
-
-.TP
-.B \-W --disable-scratch-repair
-½ý¤ò¸¡½Ð¤·¡¢Æ±´ü¤òÊݤĽèÍý¤ò¹Ô¤¤¤Þ¤¹¡£¤¿¤À¤·²õ¤ì¤¿¥Ç¡¼¥¿¤Î½¤Éü¤Ï¹Ô¤¤¤Þ
-¤»¤ó¡£¥í¥°¥Õ¥¡¥¤¥ë¤Î½ÐÎϤò¹Ô¤¦¤È(
-.RB \-i
-¥ª¥×¥·¥ç¥ó)¡¢Á´¤Æ¤Î½ý¤Î¥Õ¥ì¡¼¥à°ÌÃÖ¤¬¥í¥°¥Õ¥¡¥¤¥ë¤Ë½ÐÎϤµ¤ì¤Þ¤¹¡£
-
-.SH ½ÐÎϤµ¤ì¤ë´éʸ»ú
-.TP
-.B
- :-)
-Àµ¾ïÆ°ºî¡£¥¸¥Ã¥¿¤Ï¾¯¤Ê¤¤¤«¡¢Á´¤¯¤Ê¤¤
-.TP
-.B
- :-|
-Àµ¾ïÆ°ºî¡£¥¸¥Ã¥¿¤ÏµöÍÆÈÏ°Ï
-.TP
-.B
- :-/
-Æɤ߼è¤ê¤Ç¥É¥ê¥Õ¥È¤¬È¯À¸
-.TP
-.B
- :-P
-ºÇ¾®Ã±°Ì¤ÎÆɤ߼è¤êÁàºî¤Ë¤ª¤¤¤Æ¡¢Êó¹ð¤µ¤ì¤Æ¤¤¤Ê¤¤Â»¼º¤¬¥¹¥È¥ê¡¼¥ß¥ó¥°¤Ë¤¢¤ë
-.TP
-.B
- 8-|
-·«¤êÊÖ¤·¤ÆÆɤ߼è¤ê¤ò¹Ô¤Ã¤¿¤¬¡¢Æ±¤¸°ÌÃÖ¤ÇÌäÂ꤬µ¯¤­¤¿¡£½¤Àµ¤Ïº¤Æñ¤Ç¤¢¤ë
-.TP
-.B
- :-0
-SCSI/ATAPI ¤Î¥Ç¡¼¥¿Å¾Á÷¥¨¥é¡¼
-.TP
-.B
- :-(
-½ý¤¬¸¡½Ð¤µ¤ì¤¿
-.TP
-.B
- ;-(
-¥Ç¡¼¥¿¤ÎÄûÀµ¤ò¤¢¤­¤é¤á¤¿
-.TP
-.B
- :^D
-Æɤ߼è¤ê½ªÎ»
-
-.SH ¿Ê¹Ôɽ¼¨¤Î°ÕÌ£
-.TP
-.B
-<¥¹¥Ú¡¼¥¹>
-ÄûÀµ¤ÏÉÔÍ×
-.TP
-.B
- -
-¥¸¥Ã¥¿¤ÎÄûÀµ¤¬É¬Í×
-.TP
-.B
- +
-Êó¹ð¤µ¤ì¤Æ¤¤¤Ê¤¤Â»¼º¤¬¥¹¥È¥ê¡¼¥ß¥ó¥°¤Ë¤¢¤ë¡£¤¢¤ë¤¤¤ÏÊ̤Υ¨¥é¡¼¤¬Æɤ߼è¤ê
-»þ¤ËȯÀ¸¤·¤¿
-.TP
-.B
- !
-¥¹¥Æ¡¼¥¸ 1 ÄûÀµ¤Î¸å¤Ë¥¨¥é¡¼¤¬¸«¤Ä¤«¤Ã¤¿¡£Æɤ߼è¤ê¤òÊ£¿ô²ó·«¤êÊÖ¤·¤Æ¤â
-Ʊ¤¸¥¨¥é¡¼¤¬È¯À¸¤·¡¢@CDPARANOIA_NAME@ ¤Ï¤½¤Î¥¨¥é¡¼¤ò¤¦¤Þ¤¯¸¡½Ð¤Ç¤­¤Ê¤¤¡£
-.TP
-.B
- e
-SCSI/ATAPI ¤Î¥Ç¡¼¥¿Å¾Á÷¥¨¥é¡¼(ÄûÀµºÑ¤ß)
-.TP
-.B
- V
-ÄûÀµ¤Ç¤­¤Ê¤¤¥¨¥é¡¼/¥Ç¡¼¥¿¤Î¥¹¥­¥Ã¥×
-
-.SH °ú¤­¿ô 'span'
-
-°ú¤­¿ô span ¤Ï¡¢Æɤ߼è¤ê¤ò¹Ô¤¦¥È¥é¥Ã¥¯¤Þ¤¿¤Ï¥È¥é¥Ã¥¯¤Î°ìÉô¤ò»ØÄꤷ¤Þ¤¹¡£
-¤³¤Î°ú¤­¿ô¤Ïɬ¤ºÉ¬ÍפǤ¹¡£
-.B Ãí°Õ:
-span ¤¬Ã±¤Ê¤ë¿ô»ú¤Ç¤Ê¤±¤ì¤Ð¡¢¥·¥§¥ë¤¬°ú¤­¿ô span ¤òŸ³«¤·¤Æ¤·¤Þ¤ï¤Ê¤¤
-¤è¤¦¤Ë¥¯¥©¡¼¥È¤¹¤ë¤Î¤¬ÉáÄ̤Ǥ·¤ç¤¦¡£
-.P
-°ú¤­¿ô span ¤Ï¡¢Ã±¤Ê¤ë¥È¥é¥Ã¥¯Èֹ椫¡¢¥ª¥Õ¥»¥Ã¥È¤È¥¹¥Ñ¥ó¤ÎÁȹ礻¤Î»ØÄê
-¤È¤Ê¤ê¤Þ¤¹¡£¥ª¥Õ¥»¥Ã¥È¤È¥¹¥Ñ¥ó¤ÎÁȹ礻¤ò»ØÄꤹ¤ëÊýË¡¤Ï¡¢¤À¤¤¤¿¤¤°Ê²¼¤Î
-¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹:
-.P
-1[ww:xx:yy.zz]-2[aa:bb:cc.dd]
-.P
-¤³¤³¤Ç 1 ¤È 2 ¤Ï¥È¥é¥Ã¥¯ÈÖ¹æ¤Ç¤¹¡£³Ñ³ç¸Ì¤ÎÃæ¤Î¿ôÃͤϡ¢»ØÄꤵ¤ì¤¿¥È¥é¥Ã¥¯
-¤Ë¤ª¤±¤ë¡¢¤è¤êºÙ¤«¤¤¥ª¥Õ¥»¥Ã¥È»ØÄê¤Ç¤¹¡£[aa:bb:cc.dd] ¤Ï
-¡Ö»þ´Ö/ʬ/ÉÃ/¥»¥¯¥¿¡×¤Î·Á¼°¤Ç¤¹¡£Ãͤ¬ 0 ¤Ç¤¢¤ë¥Õ¥£¡¼¥ë¥É¤Ï»ØÄꤷ¤Ê¤¯¤Æ
-¤â¹½¤¤¤Þ¤»¤ó¡£¤Ä¤Þ¤ê [::20], [:20], [20], [20.] Åù¤Ï 20 ÉäȲò¼á¤µ¤ì¡¢
-[10:] ¤Ï 10 ÉäȲò¼á¤µ¤ì¡¢[.30] ¤Ï 30 ¥»¥¯¥¿¤È²ò¼á¤µ¤ì¤Þ¤¹(75 ¥»¥¯¥¿¤Ç
-1 ÉäǤ¹)¡£
-.P
-¥ª¥Õ¥»¥Ã¥È¤ò 1 ¤Ä¤·¤«»ØÄꤷ¤Ê¤±¤ì¤Ð¡¢¤³¤ì¤Ï³«»Ï°ÌÃ֤Υª¥Õ¥»¥Ã¥È¤òɽ¤·¡¢
-µÛ¤¤½Ð¤·¤Ï¤½¤Î¥È¥é¥Ã¥¯¤Î½ª¤ï¤ê¤Þ¤Ç¹Ô¤ï¤ì¤Þ¤¹¡£¥ª¥Õ¥»¥Ã¥È¤¬ 1 ¤Ä¤À¤±¤¢
-¤ê¡¢¤½¤ÎÁ°¸å¤Ë¥Ï¥¤¥Õ¥ó(-)¤¬¤¢¤ë¾ì¹ç¤Ë¤Ï¡¢¾Êά¤µ¤ì¤Æ¤¤¤ë¥ª¥Õ¥»¥Ã¥È¤Ï
-¥Ç¥£¥¹¥¯¤ÎÀèƬ¤¢¤ë¤¤¤ÏËöÈø¤È¤·¤Æ²ò¼á¤µ¤ì¤Þ¤¹¡£Îã¤ò°Ê²¼¤Ë¼¨¤·¤Þ¤¹:
-
-.TP
-.B 1:[20.35]
-¥È¥é¥Ã¥¯ 1 ¤Î 20 Éá¢35 ¥»¥¯¥¿¤Î°ÌÃÖ¤«¤é¡¢¥È¥é¥Ã¥¯ 1 ¤ÎËöÈø¤Þ¤Ç¤òµÛ¤¤
-½Ð¤·¤Þ¤¹¡£
-.TP
-.B 1:[20.35]-
-1[20.35] ¤Î°ÌÃÖ¤«¤é¥Ç¥£¥¹¥¯¤ÎËöÈø¤Þ¤Ç¤òµÛ¤¤½Ð¤·¤Þ¤¹¡£
-.TP
-.B \-2
-¥Ç¥£¥¹¥¯¤ÎÀèƬ¤«¤é¥È¥é¥Ã¥¯ 2 ¤Þ¤Ç(¥È¥é¥Ã¥¯ 2 ¤â´Þ¤ß¤Þ¤¹)¤òµÛ¤¤½Ð¤·¤Þ¤¹¡£
-.TP
-.B \-2:[30.35]
-¥Ç¥£¥¹¥¯¤ÎÀèƬ¤«¤é 2:[30.35] ¤Î°ÌÃ֤ޤǵۤ¤½Ð¤·¤Þ¤¹¡£
-.TP
-.B 2-4
-¥È¥é¥Ã¥¯ 2 ¤ÎÀèƬ¤«¤é¥È¥é¥Ã¥¯ 4 ¤ÎËöÈø¤Þ¤Ç¤òµÛ¤¤½Ð¤·¤Þ¤¹¡£
-.P
-·«¤êÊÖ¤·¤Ë¤Ê¤ê¤Þ¤¹¤¬¡¢³Ñ³ç¸Ì¤ª¤è¤Óñ¸ì¤ÎÀèƬ¤Ë¤¢¤ë¥Ï¥¤¥Õ¥ó¤Ïɬ¤º¥¯¥©¡¼¥È
-¤·¤Æ¡¢¥·¥§¥ë¤ËŸ³«¤µ¤ì¤Ê¤¤¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£
-
-.SH »ØÄêÎã
-
-¥¯¥©¡¼¥È¤â´Þ¤á¤¿»ØÄêÎã¤ò¤¤¤¯¤Ä¤«¼¨¤·¤Þ¤¹:
-.TP
-¥É¥é¥¤¥Ö¤ÎÄ´ºº¤À¤±¤òÅ°ÄìŪ¤Ë¹Ô¤¤¡¢¼«Æ°¸¡½Ð¤Î·ë²Ì¤òÁ´¤ÆÊó¹ð¤·¤Þ¤¹:
-.P
- @CDPARANOIA_NAME@ -vsQ
-.TP
-¥Ç¥£¥¹¥¯Á´ÂΤòµÛ¤¤½Ð¤·¤Þ¤¹¡£¤½¤ì¤¾¤ì¤Î¥È¥é¥Ã¥¯¤ÏÊÌ¡¹¤Î¥Õ¥¡¥¤¥ë¤Ë¤·¤Þ¤¹:
-.P
- @CDPARANOIA_NAME@ -B "1-"
-.TP
-¥È¥é¥Ã¥¯ 1 ¤Î»þ¹ï 0:30.12 ¤«¤é»þ¹ï 1:10.00 ¤Þ¤Ç¤òµÛ¤¤½Ð¤·¤Þ¤¹:
-.P
- @CDPARANOIA_NAME@ "1[:30.12]-1[1:10]"
-.TP
-¥È¥é¥Ã¥¯ 1 ¤Î»þ¹ï 0:30.12 ¤«¤é 1 ʬ´Ö¤Î¥Ç¡¼¥¿¤òµÛ¤¤½Ð¤·¤Þ¤¹:
-.P
- @CDPARANOIA_NAME@ "1[:30.12]-[1:00]"
-
-.SH ½ÐÎÏ
-
-½ÐÎÏ¥Õ¥¡¥¤¥ë¤ò»ØÄꤹ¤ë°ú¤­¿ô¤Ï¾Êά²Äǽ¤Ç¤¹¡£»ØÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¡¢
-@CDPARANOIA_NAME@ ¤Ï¥µ¥ó¥×¥ë²»À¼¤ò
-.BR cdda.wav ", " cdda.aifc ", " cdda.raw
-¤Î¤¤¤º¤ì¤«¤Ë½ÐÎϤ·¤Þ¤¹¡£¤É¤Î¥Õ¥¡¥¤¥ë¤Ë½ÐÎϤµ¤ì¤ë¤Î¤«¤Ï¡¢¥ª¥×¥·¥ç¥ó
-.BR \-w ", " \-a ", " \-r "," \-R
-¤Î¤¦¤Á¤¤¤º¤ì¤ò»È¤¦¤«¤Ë¤è¤Ã¤Æ·è¤Þ¤ê¤Þ¤¹(²¿¤â»ØÄꤷ¤Ê¤±¤ì¤Ð
-.BR \-w
-¤¬¥Ç¥Õ¥©¥ë¥ÈÃͤǤ¹)¡£½ÐÎÏ¥Õ¥¡¥¤¥ë¤ò»ØÄꤹ¤ë°ú¤­¿ô¤¬
-.B \-
-¤Ê¤é¤Ð¡¢½ÐÎϤÏɸ½à½ÐÎϤËÂФ·¤Æ¹Ô¤ï¤ì¤Þ¤¹¡£¤É¤Î¥Ç¡¼¥¿·Á¼°¤Ç¤â¥Ñ¥¤¥×¤ËÁ÷
-¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
-
-.SH ¼Õ¼­
-@CDPARANOIA_NAME@ ¤Î´ð¤È¤Ê¤Ã¤¿¤Î¤Ï Heiko Eissfeldt ¤µ¤ó
-(heiko@colossus.escape.de)¤¬ºîÀ®¤·¤¿ 'cdda2wav' ¥Ñ¥Ã¥±¡¼¥¸¤Ç¤¢¤ê¡¢
-°ÊÁ°¤Ï @CDPARANOIA_NAME@ ¤Î¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ÎÂçÉôʬ¤Ï cdda2wav ¤«¤é¤â¤é¤Ã¤Æ¤­¤¿
-¤â¤Î¤Ç¤·¤¿¡£cdda2wav ¤¬¤Ê¤±¤ì¤Ð¡¢@CDPARANOIA_NAME@ ¤¬ºî¤é¤ì¤ë¤³¤È¤Ï¤Ê¤«¤Ã¤¿¤Ç
-¤·¤ç¤¦¡£
-.P
-Joerg Schilling ¤µ¤ó¤¬ºîÀ®¤·¤¿ÈÆÍÑ SCSI ¥Ç¡¼¥¿Å¾Á÷¥é¥¤¥Ö¥é¥ê¤«¤é¡¢SCSI
-¤ÎÀìÌçÃ챤ò¿¤¯³Ø¤Ð¤»¤Æ¤¤¤¿¤À¤­¤Þ¤·¤¿¡£
-.P
-.SH ºî¼Ô
-Monty <monty@xiph.org>
-.P
-cdparanoia ¤Î¥Û¡¼¥à¥Ú¡¼¥¸¤Ï°Ê²¼¤Î¾ì½ê¤Ë¤¢¤ê¤Þ¤¹:
-.P
-.ce
-http://www.xiph.org/paranoia/
-.P
-libcdio ¤Î¥Û¡¼¥à¥Ú¡¼¥¸¤Ï°Ê²¼¤Î¾ì½ê¤Ë¤¢¤ê¤Þ¤¹:
-.P
-.ce
-http://www.gnu.org/libcdio/
diff --git a/src/cd-paranoia/doc/overlapdef.txt b/src/cd-paranoia/doc/overlapdef.txt
deleted file mode 100644
index be51ffa0..00000000
--- a/src/cd-paranoia/doc/overlapdef.txt
+++ /dev/null
@@ -1,18 +0,0 @@
- 0 70 100
-A |----------|-----|
-B |-----|---------|
- 0 40 100
-
-offset=-30
-begin=30
-end=100
-
- 0 70 100
-A |----------|-----|
-B |-----|---------|
- 50 90 150
-
-offset=20
-begin=30
-end=100
-
diff --git a/src/cd-paranoia/getopt.c b/src/cd-paranoia/getopt.c
deleted file mode 100644
index c41531e6..00000000
--- a/src/cd-paranoia/getopt.c
+++ /dev/null
@@ -1,1056 +0,0 @@
-/* Getopt for GNU.
- NOTE: getopt is now part of the C library, so if you don't know what
- "Keep this file name-space clean" means, talk to drepper@gnu.org
- before changing it!
-
- Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98
- Free Software Foundation, Inc.
-
- NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@gnu.org.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA. */
-
-/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
- Ditto for AIX 3.2 and <stdlib.h>. */
-#ifndef _NO_PROTO
-# define _NO_PROTO
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if !defined __STDC__ || !__STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-# ifndef const
-# define const
-# endif
-#endif
-
-#include <stdio.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#define GETOPT_INTERFACE_VERSION 2
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
-# include <gnu-versions.h>
-# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-# define ELIDE_CODE
-# endif
-#endif
-
-#ifndef ELIDE_CODE
-
-
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-/* Don't include stdlib.h for non-GNU C libraries because some of them
- contain conflicting prototypes for getopt. */
-# include <stdlib.h>
-# include <unistd.h>
-#endif /* GNU C library. */
-
-#ifdef VMS
-# include <unixlib.h>
-# if HAVE_STRING_H - 0
-# include <string.h>
-# endif
-#endif
-
-#ifndef _
-/* This is for other GNU distributions with internationalized messages.
- When compiling libc, the _ macro is predefined. */
-# ifdef HAVE_LIBINTL_H
-# include <libintl.h>
-# define _(msgid) gettext (msgid)
-# else
-# define _(msgid) (msgid)
-# endif
-#endif
-
-/* This version of `getopt' appears to the caller like standard Unix `getopt'
- but it behaves differently for the user, since it allows the user
- to intersperse the options with the other arguments.
-
- As `getopt' works, it permutes the elements of ARGV so that,
- when it is done, all the options precede everything else. Thus
- all application programs are extended to handle flexible argument order.
-
- Setting the environment variable POSIXLY_CORRECT disables permutation.
- Then the behavior is completely standard.
-
- GNU application programs can use a third alternative mode in which
- they can distinguish the relative order of options and other arguments. */
-
-#include "getopt.h"
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-char *optarg = NULL;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-/* 1003.2 says this must be 1 before any call. */
-int optind = 1;
-
-/* Formerly, initialization of getopt depended on optind==0, which
- causes problems with re-calling getopt as programs generally don't
- know that. */
-
-int __getopt_initialized = 0;
-
-/* The next char to be scanned in the option-element
- in which the last option character we returned was found.
- This allows us to pick up the scan where we left off.
-
- If this is zero, or a null string, it means resume the scan
- by advancing to the next ARGV-element. */
-
-static char *nextchar;
-
-/* Callers store zero here to inhibit the error message
- for unrecognized options. */
-
-int opterr = 1;
-
-/* Set to an option character which was unrecognized.
- This must be initialized on some systems to avoid linking in the
- system's own getopt implementation. */
-
-int optopt = '?';
-
-/* Describe how to deal with options that follow non-option ARGV-elements.
-
- If the caller did not specify anything,
- the default is REQUIRE_ORDER if the environment variable
- POSIXLY_CORRECT is defined, PERMUTE otherwise.
-
- REQUIRE_ORDER means don't recognize them as options;
- stop option processing when the first non-option is seen.
- This is what Unix does.
- This mode of operation is selected by either setting the environment
- variable POSIXLY_CORRECT, or using `+' as the first character
- of the list of option characters.
-
- PERMUTE is the default. We permute the contents of ARGV as we scan,
- so that eventually all the non-options are at the end. This allows options
- to be given in any order, even with programs that were not written to
- expect this.
-
- RETURN_IN_ORDER is an option available to programs that were written
- to expect options and other ARGV-elements in any order and that care about
- the ordering of the two. We describe each non-option ARGV-element
- as if it were the argument of an option with character code 1.
- Using `-' as the first character of the list of option characters
- selects this mode of operation.
-
- The special argument `--' forces an end of option-scanning regardless
- of the value of `ordering'. In the case of RETURN_IN_ORDER, only
- `--' can cause `getopt' to return -1 with `optind' != ARGC. */
-
-static enum
-{
- REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
-} ordering;
-
-/* Value of POSIXLY_CORRECT environment variable. */
-static char *posixly_correct;
-
-#ifdef __GNU_LIBRARY__
-/* We want to avoid inclusion of string.h with non-GNU libraries
- because there are many ways it can cause trouble.
- On some systems, it contains special magic macros that don't work
- in GCC. */
-# include <string.h>
-# define my_index strchr
-#else
-
-# if HAVE_STRING_H
-# include <string.h>
-# else
-# if HAVE_STRINGS_H
-# include <strings.h>
-# endif
-# endif
-
-/* Avoid depending on library functions or files
- whose names are inconsistent. */
-
-#ifndef getenv
-extern char *getenv ();
-#endif
-
-static char *
-my_index (str, chr)
- const char *str;
- int chr;
-{
- while (*str)
- {
- if (*str == chr)
- return (char *) str;
- str++;
- }
- return 0;
-}
-
-/* If using GCC, we can safely declare strlen this way.
- If not using GCC, it is ok not to declare it. */
-#ifdef __GNUC__
-/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
- That was relevant to code that was here before. */
-# if (!defined __STDC__ || !__STDC__) && !defined strlen
-/* gcc with -traditional declares the built-in strlen to return int,
- and has done so at least since version 2.4.5. -- rms. */
-extern int strlen (const char *);
-# endif /* not __STDC__ */
-#endif /* __GNUC__ */
-
-#endif /* not __GNU_LIBRARY__ */
-
-/* Handle permutation of arguments. */
-
-/* Describe the part of ARGV that contains non-options that have
- been skipped. `first_nonopt' is the index in ARGV of the first of them;
- `last_nonopt' is the index after the last of them. */
-
-static int first_nonopt;
-static int last_nonopt;
-
-#ifdef _LIBC
-/* Bash 2.0 gives us an environment variable containing flags
- indicating ARGV elements that should not be considered arguments. */
-
-/* Defined in getopt_init.c */
-extern char *__getopt_nonoption_flags;
-
-static int nonoption_flags_max_len;
-static int nonoption_flags_len;
-
-static int original_argc;
-static char *const *original_argv;
-
-/* Make sure the environment variable bash 2.0 puts in the environment
- is valid for the getopt call we must make sure that the ARGV passed
- to getopt is that one passed to the process. */
-static void
-__attribute__ ((unused))
-store_args_and_env (int argc, char *const *argv)
-{
- /* XXX This is no good solution. We should rather copy the args so
- that we can compare them later. But we must not use malloc(3). */
- original_argc = argc;
- original_argv = argv;
-}
-# ifdef text_set_element
-text_set_element (__libc_subinit, store_args_and_env);
-# endif /* text_set_element */
-
-# define SWAP_FLAGS(ch1, ch2) \
- if (nonoption_flags_len > 0) \
- { \
- char __tmp = __getopt_nonoption_flags[ch1]; \
- __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
- __getopt_nonoption_flags[ch2] = __tmp; \
- }
-#else /* !_LIBC */
-# define SWAP_FLAGS(ch1, ch2)
-#endif /* _LIBC */
-
-/* Exchange two adjacent subsequences of ARGV.
- One subsequence is elements [first_nonopt,last_nonopt)
- which contains all the non-options that have been skipped so far.
- The other is elements [last_nonopt,optind), which contains all
- the options processed since those non-options were skipped.
-
- `first_nonopt' and `last_nonopt' are relocated so that they describe
- the new indices of the non-options in ARGV after they are moved. */
-
-#if defined __STDC__ && __STDC__
-static void exchange (char **);
-#endif
-
-static void
-exchange (argv)
- char **argv;
-{
- int bottom = first_nonopt;
- int middle = last_nonopt;
- int top = optind;
- char *tem;
-
- /* Exchange the shorter segment with the far end of the longer segment.
- That puts the shorter segment into the right place.
- It leaves the longer segment in the right place overall,
- but it consists of two parts that need to be swapped next. */
-
-#ifdef _LIBC
- /* First make sure the handling of the `__getopt_nonoption_flags'
- string can work normally. Our top argument must be in the range
- of the string. */
- if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
- {
- /* We must extend the array. The user plays games with us and
- presents new arguments. */
- char *new_str = malloc (top + 1);
- if (new_str == NULL)
- nonoption_flags_len = nonoption_flags_max_len = 0;
- else
- {
- memset (__mempcpy (new_str, __getopt_nonoption_flags,
- nonoption_flags_max_len),
- '\0', top + 1 - nonoption_flags_max_len);
- nonoption_flags_max_len = top + 1;
- __getopt_nonoption_flags = new_str;
- }
- }
-#endif
-
- while (top > middle && middle > bottom)
- {
- if (top - middle > middle - bottom)
- {
- /* Bottom segment is the short one. */
- int len = middle - bottom;
- register int i;
-
- /* Swap it with the top part of the top segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[top - (middle - bottom) + i];
- argv[top - (middle - bottom) + i] = tem;
- SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
- }
- /* Exclude the moved bottom segment from further swapping. */
- top -= len;
- }
- else
- {
- /* Top segment is the short one. */
- int len = top - middle;
- register int i;
-
- /* Swap it with the bottom part of the bottom segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[middle + i];
- argv[middle + i] = tem;
- SWAP_FLAGS (bottom + i, middle + i);
- }
- /* Exclude the moved top segment from further swapping. */
- bottom += len;
- }
- }
-
- /* Update records for the slots the non-options now occupy. */
-
- first_nonopt += (optind - last_nonopt);
- last_nonopt = optind;
-}
-
-/* Initialize the internal data when the first call is made. */
-
-#if defined __STDC__ && __STDC__
-static const char *_getopt_initialize (int, char *const *, const char *);
-#endif
-static const char *
-_getopt_initialize (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
-{
- /* Start processing options with ARGV-element 1 (since ARGV-element 0
- is the program name); the sequence of previously skipped
- non-option ARGV-elements is empty. */
-
- first_nonopt = last_nonopt = optind;
-
- nextchar = NULL;
-
- posixly_correct = getenv ("POSIXLY_CORRECT");
-
- /* Determine how to handle the ordering of options and nonoptions. */
-
- if (optstring[0] == '-')
- {
- ordering = RETURN_IN_ORDER;
- ++optstring;
- }
- else if (optstring[0] == '+')
- {
- ordering = REQUIRE_ORDER;
- ++optstring;
- }
- else if (posixly_correct != NULL)
- ordering = REQUIRE_ORDER;
- else
- ordering = PERMUTE;
-
-#ifdef _LIBC
- if (posixly_correct == NULL
- && argc == original_argc && argv == original_argv)
- {
- if (nonoption_flags_max_len == 0)
- {
- if (__getopt_nonoption_flags == NULL
- || __getopt_nonoption_flags[0] == '\0')
- nonoption_flags_max_len = -1;
- else
- {
- const char *orig_str = __getopt_nonoption_flags;
- int len = nonoption_flags_max_len = strlen (orig_str);
- if (nonoption_flags_max_len < argc)
- nonoption_flags_max_len = argc;
- __getopt_nonoption_flags =
- (char *) malloc (nonoption_flags_max_len);
- if (__getopt_nonoption_flags == NULL)
- nonoption_flags_max_len = -1;
- else
- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
- '\0', nonoption_flags_max_len - len);
- }
- }
- nonoption_flags_len = nonoption_flags_max_len;
- }
- else
- nonoption_flags_len = 0;
-#endif
-
- return optstring;
-}
-
-/* Scan elements of ARGV (whose length is ARGC) for option characters
- given in OPTSTRING.
-
- If an element of ARGV starts with '-', and is not exactly "-" or "--",
- then it is an option element. The characters of this element
- (aside from the initial '-') are option characters. If `getopt'
- is called repeatedly, it returns successively each of the option characters
- from each of the option elements.
-
- If `getopt' finds another option character, it returns that character,
- updating `optind' and `nextchar' so that the next call to `getopt' can
- resume the scan with the following option character or ARGV-element.
-
- If there are no more option characters, `getopt' returns -1.
- Then `optind' is the index in ARGV of the first ARGV-element
- that is not an option. (The ARGV-elements have been permuted
- so that those that are not options now come last.)
-
- OPTSTRING is a string containing the legitimate option characters.
- If an option character is seen that is not listed in OPTSTRING,
- return '?' after printing an error message. If you set `opterr' to
- zero, the error message is suppressed but we still return '?'.
-
- If a char in OPTSTRING is followed by a colon, that means it wants an arg,
- so the following text in the same ARGV-element, or the text of the following
- ARGV-element, is returned in `optarg'. Two colons mean an option that
- wants an optional arg; if there is text in the current ARGV-element,
- it is returned in `optarg', otherwise `optarg' is set to zero.
-
- If OPTSTRING starts with `-' or `+', it requests different methods of
- handling the non-option ARGV-elements.
- See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
-
- Long-named options begin with `--' instead of `-'.
- Their names may be abbreviated as long as the abbreviation is unique
- or is an exact match for some defined option. If they have an
- argument, it follows the option name in the same ARGV-element, separated
- from the option name by a `=', or else the in next ARGV-element.
- When `getopt' finds a long-named option, it returns 0 if that option's
- `flag' field is nonzero, the value of the option's `val' field
- if the `flag' field is zero.
-
- The elements of ARGV aren't really const, because we permute them.
- But we pretend they're const in the prototype to be compatible
- with other systems.
-
- LONGOPTS is a vector of `struct option' terminated by an
- element containing a name which is zero.
-
- LONGIND returns the index in LONGOPT of the long-named option found.
- It is only valid when a long-named option has been found by the most
- recent call.
-
- If LONG_ONLY is nonzero, '-' as well as '--' can introduce
- long-named options. */
-
-int
-_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
- int argc;
- char *const *argv;
- const char *optstring;
- const struct option *longopts;
- int *longind;
- int long_only;
-{
- optarg = NULL;
-
- if (optind == 0 || !__getopt_initialized)
- {
- if (optind == 0)
- optind = 1; /* Don't scan ARGV[0], the program name. */
- optstring = _getopt_initialize (argc, argv, optstring);
- __getopt_initialized = 1;
- }
-
- /* Test whether ARGV[optind] points to a non-option argument.
- Either it does not have option syntax, or there is an environment flag
- from the shell indicating it is not an option. The later information
- is only used when the used in the GNU libc. */
-#ifdef _LIBC
-# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
- || (optind < nonoption_flags_len \
- && __getopt_nonoption_flags[optind] == '1'))
-#else
-# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
-#endif
-
- if (nextchar == NULL || *nextchar == '\0')
- {
- /* Advance to the next ARGV-element. */
-
- /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
- moved back by the user (who may also have changed the arguments). */
- if (last_nonopt > optind)
- last_nonopt = optind;
- if (first_nonopt > optind)
- first_nonopt = optind;
-
- if (ordering == PERMUTE)
- {
- /* If we have just processed some options following some non-options,
- exchange them so that the options come first. */
-
- if (first_nonopt != last_nonopt && last_nonopt != optind)
- exchange ((char **) argv);
- else if (last_nonopt != optind)
- first_nonopt = optind;
-
- /* Skip any additional non-options
- and extend the range of non-options previously skipped. */
-
- while (optind < argc && NONOPTION_P)
- optind++;
- last_nonopt = optind;
- }
-
- /* The special ARGV-element `--' means premature end of options.
- Skip it like a null option,
- then exchange with previous non-options as if it were an option,
- then skip everything else like a non-option. */
-
- if (optind != argc && !strcmp (argv[optind], "--"))
- {
- optind++;
-
- if (first_nonopt != last_nonopt && last_nonopt != optind)
- exchange ((char **) argv);
- else if (first_nonopt == last_nonopt)
- first_nonopt = optind;
- last_nonopt = argc;
-
- optind = argc;
- }
-
- /* If we have done all the ARGV-elements, stop the scan
- and back over any non-options that we skipped and permuted. */
-
- if (optind == argc)
- {
- /* Set the next-arg-index to point at the non-options
- that we previously skipped, so the caller will digest them. */
- if (first_nonopt != last_nonopt)
- optind = first_nonopt;
- return -1;
- }
-
- /* If we have come to a non-option and did not permute it,
- either stop the scan or describe it to the caller and pass it by. */
-
- if (NONOPTION_P)
- {
- if (ordering == REQUIRE_ORDER)
- return -1;
- optarg = argv[optind++];
- return 1;
- }
-
- /* We have found another option-ARGV-element.
- Skip the initial punctuation. */
-
- nextchar = (argv[optind] + 1
- + (longopts != NULL && argv[optind][1] == '-'));
- }
-
- /* Decode the current option-ARGV-element. */
-
- /* Check whether the ARGV-element is a long option.
-
- If long_only and the ARGV-element has the form "-f", where f is
- a valid short option, don't consider it an abbreviated form of
- a long option that starts with f. Otherwise there would be no
- way to give the -f short option.
-
- On the other hand, if there's a long option "fubar" and
- the ARGV-element is "-fu", do consider that an abbreviation of
- the long option, just like "--fu", and not "-f" with arg "u".
-
- This distinction seems to be the most useful approach. */
-
- if (longopts != NULL
- && (argv[optind][1] == '-'
- || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
- {
- char *nameend;
- const struct option *p;
- const struct option *pfound = NULL;
- int exact = 0;
- int ambig = 0;
- int indfound = -1;
- int option_index;
-
- for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
- /* Do nothing. */ ;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
- {
- if ((unsigned int) (nameend - nextchar)
- == (unsigned int) strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else
- /* Second or later nonexact match found. */
- ambig = 1;
- }
-
- if (ambig && !exact)
- {
- if (opterr)
- fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
- argv[0], argv[optind]);
- nextchar += strlen (nextchar);
- optind++;
- optopt = 0;
- return '?';
- }
-
- if (pfound != NULL)
- {
- option_index = indfound;
- optind++;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- optarg = nameend + 1;
- else
- {
- if (opterr)
- {
- if (argv[optind - 1][1] == '-')
- /* --option */
- fprintf (stderr,
- _("%s: option `--%s' doesn't allow an argument\n"),
- argv[0], pfound->name);
- else
- /* +option or -option */
- fprintf (stderr,
- _("%s: option `%c%s' doesn't allow an argument\n"),
- argv[0], argv[optind - 1][0], pfound->name);
-
- nextchar += strlen (nextchar);
-
- optopt = pfound->val;
- return '?';
- }
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (optind < argc)
- optarg = argv[optind++];
- else
- {
- if (opterr)
- fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]);
- nextchar += strlen (nextchar);
- optopt = pfound->val;
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- nextchar += strlen (nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
-
- /* Can't find it as a long option. If this is not getopt_long_only,
- or the option starts with '--' or is not a valid short
- option, then it's an error.
- Otherwise interpret it as a short option. */
- if (!long_only || argv[optind][1] == '-'
- || my_index (optstring, *nextchar) == NULL)
- {
- if (opterr)
- {
- if (argv[optind][1] == '-')
- /* --option */
- fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
- argv[0], nextchar);
- else
- /* +option or -option */
- fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
- argv[0], argv[optind][0], nextchar);
- }
- nextchar = (char *) "";
- optind++;
- optopt = 0;
- return '?';
- }
- }
-
- /* Look at and handle the next short option-character. */
-
- {
- char c = *nextchar++;
- char *temp = my_index (optstring, c);
-
- /* Increment `optind' when we start to process its last character. */
- if (*nextchar == '\0')
- ++optind;
-
- if (temp == NULL || c == ':')
- {
- if (opterr)
- {
- if (posixly_correct)
- /* 1003.2 specifies the format of this message. */
- fprintf (stderr, _("%s: illegal option -- %c\n"),
- argv[0], c);
- else
- fprintf (stderr, _("%s: invalid option -- %c\n"),
- argv[0], c);
- }
- optopt = c;
- return '?';
- }
- /* Convenience. Treat POSIX -W foo same as long option --foo */
- if (temp[0] == 'W' && temp[1] == ';')
- {
- char *nameend;
- const struct option *p;
- const struct option *pfound = NULL;
- int exact = 0;
- int ambig = 0;
- int indfound = 0;
- int option_index;
-
- /* This is an option that requires an argument. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- optind++;
- }
- else if (optind == argc)
- {
- if (opterr)
- {
- /* 1003.2 specifies the format of this message. */
- fprintf (stderr, _("%s: option requires an argument -- %c\n"),
- argv[0], c);
- }
- optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- return c;
- }
- else
- /* We already incremented `optind' once;
- increment it again when taking next ARGV-elt as argument. */
- optarg = argv[optind++];
-
- /* optarg is now the argument, see if it's in the
- table of longopts. */
-
- for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
- /* Do nothing. */ ;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
- {
- if ((unsigned int) (nameend - nextchar) == strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else
- /* Second or later nonexact match found. */
- ambig = 1;
- }
- if (ambig && !exact)
- {
- if (opterr)
- fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
- argv[0], argv[optind]);
- nextchar += strlen (nextchar);
- optind++;
- return '?';
- }
- if (pfound != NULL)
- {
- option_index = indfound;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- optarg = nameend + 1;
- else
- {
- if (opterr)
- fprintf (stderr, _("\
-%s: option `-W %s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-
- nextchar += strlen (nextchar);
- return '?';
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (optind < argc)
- optarg = argv[optind++];
- else
- {
- if (opterr)
- fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]);
- nextchar += strlen (nextchar);
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- nextchar += strlen (nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
- nextchar = NULL;
- return 'W'; /* Let the application handle it. */
- }
- if (temp[1] == ':')
- {
- if (temp[2] == ':')
- {
- /* This is an option that accepts an argument optionally. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- optind++;
- }
- else
- optarg = NULL;
- nextchar = NULL;
- }
- else
- {
- /* This is an option that requires an argument. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- optind++;
- }
- else if (optind == argc)
- {
- if (opterr)
- {
- /* 1003.2 specifies the format of this message. */
- fprintf (stderr,
- _("%s: option requires an argument -- %c\n"),
- argv[0], c);
- }
- optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- }
- else
- /* We already incremented `optind' once;
- increment it again when taking next ARGV-elt as argument. */
- optarg = argv[optind++];
- nextchar = NULL;
- }
- }
- return c;
- }
-}
-
-int
-getopt (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
-{
- return _getopt_internal (argc, argv, optstring,
- (const struct option *) 0,
- (int *) 0,
- 0);
-}
-
-#endif /* Not ELIDE_CODE. */
-
-#ifdef TEST
-
-/* Compile with -DTEST to make an executable for use in testing
- the above definition of `getopt'. */
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- int c;
- int digit_optind = 0;
-
- while (1)
- {
- int this_option_optind = optind ? optind : 1;
-
- c = getopt (argc, argv, "abc:d:0123456789");
- if (c == -1)
- break;
-
- switch (c)
- {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value `%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
- }
-
- if (optind < argc)
- {
- printf ("non-option ARGV-elements: ");
- while (optind < argc)
- printf ("%s ", argv[optind++]);
- printf ("\n");
- }
-
- exit (0);
-}
-
-#endif /* TEST */
diff --git a/src/cd-paranoia/getopt.h b/src/cd-paranoia/getopt.h
deleted file mode 100644
index 348e0fe5..00000000
--- a/src/cd-paranoia/getopt.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Declarations for getopt.
- Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
-
- NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@gnu.org.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA. */
-
-#ifndef _GETOPT_H
-#define _GETOPT_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-extern char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-extern int optind;
-
-/* Callers store zero here to inhibit the error message `getopt' prints
- for unrecognized options. */
-
-extern int opterr;
-
-/* Set to an option character which was unrecognized. */
-
-extern int optopt;
-
-/* Describe the long-named options requested by the application.
- The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
- of `struct option' terminated by an element containing a name which is
- zero.
-
- The field `has_arg' is:
- no_argument (or 0) if the option does not take an argument,
- required_argument (or 1) if the option requires an argument,
- optional_argument (or 2) if the option takes an optional argument.
-
- If the field `flag' is not NULL, it points to a variable that is set
- to the value given in the field `val' when the option is found, but
- left unchanged if the option is not found.
-
- To have a long-named option do something other than set an `int' to
- a compiled-in constant, such as set a value from `optarg', set the
- option's `flag' field to zero and its `val' field to a nonzero
- value (the equivalent single-letter option character, if there is
- one). For long options that have a zero `flag' field, `getopt'
- returns the contents of the `val' field. */
-
-struct option
-{
-#if defined (__STDC__) && __STDC__
- const char *name;
-#else
- char *name;
-#endif
- /* has_arg can't be an enum because some compilers complain about
- type mismatches in all the code that assumes it is an int. */
- int has_arg;
- int *flag;
- int val;
-};
-
-/* Names for the values of the `has_arg' field of `struct option'. */
-
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
-
-#if defined (__STDC__) && __STDC__
-extern int getopt (int argc, char *const *argv, const char *optstring);
-extern int getopt_long (int argc, char *const *argv, const char *shortopts,
- const struct option *longopts, int *longind);
-extern int getopt_long_only (int argc, char *const *argv,
- const char *shortopts,
- const struct option *longopts, int *longind);
-
-/* Internal only. Users should not call this directly. */
-extern int _getopt_internal (int argc, char *const *argv,
- const char *shortopts,
- const struct option *longopts, int *longind,
- int long_only);
-#else /* not __STDC__ */
-extern int getopt ();
-extern int getopt_long ();
-extern int getopt_long_only ();
-
-extern int _getopt_internal ();
-#endif /* __STDC__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* getopt.h */
diff --git a/src/cd-paranoia/getopt1.c b/src/cd-paranoia/getopt1.c
deleted file mode 100644
index ff257374..00000000
--- a/src/cd-paranoia/getopt1.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
- Free Software Foundation, Inc.
-
- NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@gnu.org.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "getopt.h"
-
-#if !defined __STDC__ || !__STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-#ifndef const
-#define const
-#endif
-#endif
-
-#include <stdio.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#define GETOPT_INTERFACE_VERSION 2
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
-#include <gnu-versions.h>
-#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-#define ELIDE_CODE
-#endif
-#endif
-
-#ifndef ELIDE_CODE
-
-
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-#include <stdlib.h>
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-int
-getopt_long (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
-{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
-}
-
-/* Like getopt_long, but '-' as well as '--' can indicate a long option.
- If an option that starts with '-' (not '--') doesn't match a long option,
- but does match a short option, it is parsed as a short option
- instead. */
-
-int
-getopt_long_only (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
-{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
-}
-
-
-#endif /* Not ELIDE_CODE. */
-
-#ifdef TEST
-
-#include <stdio.h>
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- int c;
- int digit_optind = 0;
-
- while (1)
- {
- int this_option_optind = optind ? optind : 1;
- int option_index = 0;
- static struct option long_options[] =
- {
- {"add", 1, 0, 0},
- {"append", 0, 0, 0},
- {"delete", 1, 0, 0},
- {"verbose", 0, 0, 0},
- {"create", 0, 0, 0},
- {"file", 1, 0, 0},
- {0, 0, 0, 0}
- };
-
- c = getopt_long (argc, argv, "abc:d:0123456789",
- long_options, &option_index);
- if (c == -1)
- break;
-
- switch (c)
- {
- case 0:
- printf ("option %s", long_options[option_index].name);
- if (optarg)
- printf (" with arg %s", optarg);
- printf ("\n");
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value `%s'\n", optarg);
- break;
-
- case 'd':
- printf ("option d with value `%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
- }
-
- if (optind < argc)
- {
- printf ("non-option ARGV-elements: ");
- while (optind < argc)
- printf ("%s ", argv[optind++]);
- printf ("\n");
- }
-
- exit (0);
-}
-
-#endif /* TEST */
diff --git a/src/cd-paranoia/header.c b/src/cd-paranoia/header.c
deleted file mode 100644
index 51312729..00000000
--- a/src/cd-paranoia/header.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- Copyright (C) 2004 Rocky Bernstein <rocky@gnu.org
- Copyright (C) 1998 Monty xiphmont@mit.edu
- and Heiko Eissfeldt heiko@escape.colossus.de
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/** \file header.h
- * \brief WAV, AIFF and AIFC header-writing routines.
- */
-
-#include "header.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-static void PutNum(long num,int f,int endianness,int bytes){
- int i;
- unsigned char c;
-
- if(!endianness)
- i=0;
- else
- i=bytes-1;
- while(bytes--){
- c=(num>>(i<<3))&0xff;
- if(write(f,&c,1)==-1){
- perror("Could not write to output.");
- exit(1);
- }
- if(endianness)
- i--;
- else
- i++;
- }
-}
-
-/** Writes WAV headers */
-void
-WriteWav(int f, long int bytes)
-{
- /* quick and dirty */
-
- write(f,"RIFF",4); /* 0-3 */
- PutNum(bytes+44-8,f,0,4); /* 4-7 */
- write(f,"WAVEfmt ",8); /* 8-15 */
- PutNum(16,f,0,4); /* 16-19 */
- PutNum(1,f,0,2); /* 20-21 */
- PutNum(2,f,0,2); /* 22-23 */
- PutNum(44100,f,0,4); /* 24-27 */
- PutNum(44100*2*2,f,0,4); /* 28-31 */
- PutNum(4,f,0,2); /* 32-33 */
- PutNum(16,f,0,2); /* 34-35 */
- write(f,"data",4); /* 36-39 */
- PutNum(bytes,f,0,4); /* 40-43 */
-}
-
-/** Writes AIFF headers */
-void
-WriteAiff(int f, long int bytes)
-{
- long size=bytes+54;
- long frames=bytes/4;
-
- /* Again, quick and dirty */
-
- write(f,"FORM",4); /* 4 */
- PutNum(size-8,f,1,4); /* 8 */
- write(f,"AIFF",4); /* 12 */
-
- write(f,"COMM",4); /* 16 */
- PutNum(18,f,1,4); /* 20 */
- PutNum(2,f,1,2); /* 22 */
- PutNum(frames,f,1,4); /* 26 */
- PutNum(16,f,1,2); /* 28 */
- write(f,"@\016\254D\0\0\0\0\0\0",10); /* 38 (44.100 as a float) */
-
- write(f,"SSND",4); /* 42 */
- PutNum(bytes+8,f,1,4); /* 46 */
- PutNum(0,f,1,4); /* 50 */
- PutNum(0,f,1,4); /* 54 */
-
-}
-
-/** Writes AIFC headers */
-void
-WriteAifc(int f, long bytes)
-{
- long size=bytes+86;
- long frames=bytes/4;
-
- /* Again, quick and dirty */
-
- write(f,"FORM",4); /* 4 */
- PutNum(size-8,f,1,4); /* 8 */
- write(f,"AIFC",4); /* 12 */
- write(f,"FVER",4); /* 16 */
- PutNum(4,f,1,4); /* 20 */
- PutNum(2726318400UL,f,1,4); /* 24 */
-
- write(f,"COMM",4); /* 28 */
- PutNum(38,f,1,4); /* 32 */
- PutNum(2,f,1,2); /* 34 */
- PutNum(frames,f,1,4); /* 38 */
- PutNum(16,f,1,2); /* 40 */
- write(f,"@\016\254D\0\0\0\0\0\0",10); /* 50 (44.100 as a float) */
-
- write(f,"NONE",4); /* 54 */
- PutNum(14,f,1,1); /* 55 */
- write(f,"not compressed",14); /* 69 */
- PutNum(0,f,1,1); /* 70 */
-
- write(f,"SSND",4); /* 74 */
- PutNum(bytes+8,f,1,4); /* 78 */
- PutNum(0,f,1,4); /* 82 */
- PutNum(0,f,1,4); /* 86 */
-
-}
-
diff --git a/src/cd-paranoia/header.h b/src/cd-paranoia/header.h
deleted file mode 100644
index 99f94f9d..00000000
--- a/src/cd-paranoia/header.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- $Id: header.h,v 1.2 2008/04/11 15:44:00 karl Exp $
-
- Copyright (C) 2008 Rocky Bernstein <rocky@gnu.org>
- Copyright (C) 1998 Monty <xiphmont@mit.edu>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/** \file header.h
- * \brief header for WAV, AIFF and AIFC header-writing routines.
- */
-
-/** Writes WAV headers */
-extern void WriteWav(int f,long int i_bytes);
-
-/** Writes AIFC headers */
-extern void WriteAifc(int f,long int i_bytes);
-
-/** Writes AIFF headers */
-extern void WriteAiff(int f,long int_bytes);
diff --git a/src/cd-paranoia/pod2c.pl b/src/cd-paranoia/pod2c.pl
deleted file mode 100755
index a37d2a2c..00000000
--- a/src/cd-paranoia/pod2c.pl
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/perl
-# $Id: pod2c.pl,v 1.4 2008/06/19 15:44:31 flameeyes Exp $
-# Utility to turn pieces of pod text to help text.
-use File::Basename;
-
-die "Expecting exactly one argument, a filename" if @ARGV != 1;
-$filename = shift;
-
-($name, $path, $suffix)=fileparse($filename,"\.txt");
-close(STDIN);
-open(STDIN, "<$filename")
- || die "Can't open $filename for reading:\n$!";
-
-#$outfile="../${filename}.h";
-#open(STDOUT, ">$outfile")
-# || die "Can't open $outfile for writing:\n$!";
-
-print "/*
- Copyright (C) 1999, 2005, 2007, 2008 Rocky Bernstein
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-static const char ${name}_help[] =\n";
-while(<STDIN>) {
- s/["]/\\"/g;
- # Change POD'ed items to quoted items, e.g. See L<y> and L<z> becomes
- # See "y" and "z" (with \'s around the quotes)
- s/[C,L,I,B,F]<(.+?)>/\\"$1\\"/g;
- chomp;
- if ( $^O eq "cygwin" ) {
- s/\ //
- }
- print "\"$_\\n\"\n";
-}
-print ";\n";
diff --git a/src/cd-paranoia/report.c b/src/cd-paranoia/report.c
deleted file mode 100644
index 775d02a9..00000000
--- a/src/cd-paranoia/report.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- Copyright (C) 2004, 2008, 2010, 2011 Rocky Bernstein <rocky@gnu.org>
- Copyright (C) 1998 Monty xiphmont@mit.edu
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/******************************************************************
- *
- * reporting/logging routines
- *
- ******************************************************************/
-
-
-/* config.h has to come first else _FILE_OFFSET_BITS are redefined in
- say opensolaris. */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-# define __CDIO_CONFIG_H__ 1
-#endif
-
-#include <stdio.h>
-#include <cdio/cdda.h>
-#include "report.h"
-
-int quiet=0;
-int verbose=CDDA_MESSAGE_FORGETIT;
-
-void
-report(const char *s)
-{
- if (!quiet) {
- fprintf(stderr, "%s", s);
- fputc('\n',stderr);
- }
-}
-
-void
-report2(const char *s, char *s2)
-{
- if (!quiet) {
- fprintf(stderr,s,s2);
- fputc('\n',stderr);
- }
-}
-
-void
-report3(const char *s, char *s2, char *s3)
-{
- if (!quiet) {
- fprintf(stderr,s,s2,s3);
- fputc('\n',stderr);
- }
-}
diff --git a/src/cd-paranoia/report.h b/src/cd-paranoia/report.h
deleted file mode 100644
index d3031dfd..00000000
--- a/src/cd-paranoia/report.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- Copyright (C) 2008 Rocky Bernstein <rocky@gnu.org>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-extern void report(const char *s);
-extern void report2(const char *s, char *s2);
-extern void report3(const char *s, char *s2, char *s3);
diff --git a/src/cd-paranoia/usage-copy.h b/src/cd-paranoia/usage-copy.h
deleted file mode 100644
index 1c52f11e..00000000
--- a/src/cd-paranoia/usage-copy.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- Copyright (C) 1999, 2005, 2008, 2009 Rocky Bernstein
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-const char usage_help[] =
-"USAGE:\n"
-" cd-paranoia [options] <span> [outfile]\n"
-"\n"
-"OPTIONS:\n"
-" -v --verbose : extra verbose operation\n"
-" -q --quiet : quiet operation\n"
-" -e --stderr-progress : force output of progress information to\n"
-" -l --log-summary <file> : save result summary to file\n"
-" stderr (for wrapper scripts)\n"
-" -V --version : print version info and quit\n"
-" -Q --query : autosense drive, query disc and quit\n"
-" -B --batch : 'batch' mode (saves each track to a\n"
-" seperate file.\n"
-" -s --search-for-drive : do an exhaustive search for drive\n"
-" -h --help : print help\n"
-"\n"
-" -p --output-raw : output raw 16 bit PCM in host byte \n"
-" order\n"
-" -r --output-raw-little-endian : output raw 16 bit little-endian PCM\n"
-" -R --output-raw-big-endian : output raw 16 bit big-endian PCM\n"
-" -w --output-wav : output as WAV file (default)\n"
-" -f --output-aiff : output as AIFF file\n"
-" -a --output-aifc : output as AIFF-C file\n"
-"\n"
-" -c --force-cdrom-little-endian : force treating drive as little endian\n"
-" -C --force-cdrom-big-endian : force treating drive as big endian\n"
-" -n --force-default-sectors <n> : force default number of sectors in read\n"
-" to n sectors\n"
-" -o --force-search-overlap <n> : force minimum overlap search during\n"
-" verification to n sectors\n"
-" -d --force-cdrom-device <dev> : use specified device; disallow \n"
-" autosense\n"
-" -g --force-generic-device <dev> : really an alias for -d. Kept for \n"
-" compatibility.\n"
-" -S --force-read-speed <n> : read from device at specified speed\n"
-" -t --toc-offset <n> : Add <n> sectors to the values reported\n"
-" when addressing tracks. May be negative\n"
-" -T --toc-bias : Assume that the beginning offset of \n"
-" track 1 as reported in the TOC will be\n"
-" addressed as LBA 0. Necessary for some\n"
-" Toshiba drives to get track boundaries\n"
-" correct\n"
-" -m --mmc-timeout <n> : Set SCSI-MMC timeout to <n> seconds.\n"
-" -O --sample-offset <n> : Add <n> samples to the offset when\n"
-" reading data. May be negative.\n"
-" -z --never-skip[=n] : never accept any less than perfect\n"
-" data reconstruction (don't allow 'V's)\n"
-" but if [n] is given, skip after [n]\n"
-" retries without progress.\n"
-" -Z --disable-paranoia : disable all paranoia checking\n"
-" -Y --disable-extra-paranoia : only do cdda2wav-style overlap checking\n"
-" -X --abort-on-skip : abort on imperfect reads/skips\n"
-" -x --test-flags=mask : simulate CD-reading errors of ilk-mask n\n"
-" mask & 0x10 - simulate underrun errors\n"
-"\n"
-"OUTPUT SMILIES:\n"
-" :-) Normal operation, low/no jitter\n"
-" :-| Normal operation, considerable jitter\n"
-" :-/ Read drift\n"
-" :-P Unreported loss of streaming in atomic read operation\n"
-" 8-| Finding read problems at same point during reread; hard to correct\n"
-" :-0 SCSI/ATAPI transport error\n"
-" :-( Scratch detected\n"
-" ;-( Gave up trying to perform a correction\n"
-" 8-X Aborted (as per -X) due to a scratch/skip\n"
-" :^D Finished extracting\n"
-"\n"
-"PROGRESS BAR SYMBOLS:\n"
-"<space> No corrections needed\n"
-" - Jitter correction required\n"
-" + Unreported loss of streaming/other error in read\n"
-" ! Errors are getting through stage 1 but corrected in stage2\n"
-" e SCSI/ATAPI transport error (corrected)\n"
-" V Uncorrected error/skip\n"
-"\n"
-"SPAN ARGUMENT:\n"
-"The span argument may be a simple track number or a offset/span\n"
-"specification. The syntax of an offset/span takes the rough form:\n"
-" \n"
-" 1[ww:xx:yy.zz]-2[aa:bb:cc.dd] \n"
-"\n"
-"Here, 1 and 2 are track numbers; the numbers in brackets provide a\n"
-"finer grained offset within a particular track. [aa:bb:cc.dd] is in\n"
-"hours/minutes/seconds/sectors format. Zero fields need not be\n"
-"specified: [::20], [:20], [20], [20.], etc, would be interpreted as\n"
-"twenty seconds, [10:] would be ten minutes, [.30] would be thirty\n"
-"sectors (75 sectors per second).\n"
-"\n"
-"When only a single offset is supplied, it is interpreted as a starting\n"
-"offset and ripping will continue to the end of he track. If a single\n"
-"offset is preceeded or followed by a hyphen, the implicit missing\n"
-"offset is taken to be the start or end of the disc, respectively. Thus:\n"
-"\n"
-" 1:[20.35] Specifies ripping from track 1, second 20, sector 35 to \n"
-" the end of track 1.\n"
-"\n"
-" 1:[20.35]- Specifies ripping from 1[20.35] to the end of the disc\n"
-"\n"
-" -2 Specifies ripping from the beginning of the disc up to\n"
-" (and including) track 2\n"
-"\n"
-" -2:[30.35] Specifies ripping from the beginning of the disc up to\n"
-" 2:[30.35]\n"
-"\n"
-" 2-4 Specifies ripping from the beginning of track two to the\n"
-" end of track 4.\n"
-"\n"
-"Don't forget to protect square brackets and preceeding hyphens from\n"
-"the shell...\n"
-"\n"
-"A few examples, protected from the shell:\n"
-" A) query only with exhaustive search for a drive and full reporting\n"
-" of autosense:\n"
-" cd-paranoia -vsQ\n"
-"\n"
-" B) extract up to and including track 3, putting each track in a seperate\n"
-" file:\n"
-" cd-paranoia -B -- \"-3\"\n"
-"\n"
-" C) extract from track 1, time 0:30.12 to 1:10.00:\n"
-" cd-paranoia \"[:30.12]-1[1:10]\"\n"
-"\n"
-"Submit bug reports to bug-libcdio@gnu.org\n"
-"\n"
-;
diff --git a/src/cd-paranoia/usage.txt.in b/src/cd-paranoia/usage.txt.in
deleted file mode 100644
index dbd95ab0..00000000
--- a/src/cd-paranoia/usage.txt.in
+++ /dev/null
@@ -1,124 +0,0 @@
-USAGE:
- @CDPARANOIA_NAME@ [options] <span> [outfile]
-
-OPTIONS:
- -v --verbose : extra verbose operation
- -q --quiet : quiet operation
- -e --stderr-progress : force output of progress information to
- stderr (for wrapper scripts)
- -l --log-summary <file> : save result summary to file
- -V --version : print version info and quit
- -Q --query : autosense drive, query disc and quit
- -B --batch : 'batch' mode (saves each track to a
- seperate file.
- -s --search-for-drive : do an exhaustive search for drive
- -h --help : print help
-
- -p --output-raw : output raw 16 bit PCM in host byte
- order
- -r --output-raw-little-endian : output raw 16 bit little-endian PCM
- -R --output-raw-big-endian : output raw 16 bit big-endian PCM
- -w --output-wav : output as WAV file (default)
- -f --output-aiff : output as AIFF file
- -a --output-aifc : output as AIFF-C file
-
- -c --force-cdrom-little-endian : force treating drive as little endian
- -C --force-cdrom-big-endian : force treating drive as big endian
- -n --force-default-sectors <n> : force default number of sectors in read
- to n sectors
- -o --force-search-overlap <n> : force minimum overlap search during
- verification to n sectors
- -d --force-cdrom-device <dev> : use specified device; disallow
- autosense
- -g --force-generic-device <dev> : really an alias for -d. Kept for
- compatibility.
- -S --force-read-speed <n> : read from device at specified speed
- -t --toc-offset <n> : Add <n> sectors to the values reported
- when addressing tracks. May be negative
- -T --toc-bias : Assume that the beginning offset of
- track 1 as reported in the TOC will be
- addressed as LBA 0. Necessary for some
- Toshiba drives to get track boundaries
- correct
- -m --mmc-timeout <n> : Set SCSI-MMC timeout to <n> seconds.
- -O --sample-offset <n> : Add <n> samples to the offset when
- reading data. May be negative.
- -z --never-skip[=n] : never accept any less than perfect
- data reconstruction (don't allow 'V's)
- but if [n] is given, skip after [n]
- retries without progress.
- -Z --disable-paranoia : disable all paranoia checking
- -Y --disable-extra-paranoia : only do cdda2wav-style overlap checking
- -X --abort-on-skip : abort on imperfect reads/skips
- -x --test-flags=mask : simulate CD-reading errors of ilk-mask n
- mask & 0x10 - simulate underrun errors
-
-OUTPUT SMILIES:
- :-) Normal operation, low/no jitter
- :-| Normal operation, considerable jitter
- :-/ Read drift
- :-P Unreported loss of streaming in atomic read operation
- 8-| Finding read problems at same point during reread; hard to correct
- :-0 SCSI/ATAPI transport error
- :-( Scratch detected
- ;-( Gave up trying to perform a correction
- 8-X Aborted (as per -X) due to a scratch/skip
- :^D Finished extracting
-
-PROGRESS BAR SYMBOLS:
-<space> No corrections needed
- - Jitter correction required
- + Unreported loss of streaming/other error in read
- ! Errors are getting through stage 1 but corrected in stage2
- e SCSI/ATAPI transport error (corrected)
- V Uncorrected error/skip
-
-SPAN ARGUMENT:
-The span argument may be a simple track number or a offset/span
-specification. The syntax of an offset/span takes the rough form:
-
- 1[ww:xx:yy.zz]-2[aa:bb:cc.dd]
-
-Here, 1 and 2 are track numbers; the numbers in brackets provide a
-finer grained offset within a particular track. [aa:bb:cc.dd] is in
-hours/minutes/seconds/sectors format. Zero fields need not be
-specified: [::20], [:20], [20], [20.], etc, would be interpreted as
-twenty seconds, [10:] would be ten minutes, [.30] would be thirty
-sectors (75 sectors per second).
-
-When only a single offset is supplied, it is interpreted as a starting
-offset and ripping will continue to the end of he track. If a single
-offset is preceeded or followed by a hyphen, the implicit missing
-offset is taken to be the start or end of the disc, respectively. Thus:
-
- 1:[20.35] Specifies ripping from track 1, second 20, sector 35 to
- the end of track 1.
-
- 1:[20.35]- Specifies ripping from 1[20.35] to the end of the disc
-
- -2 Specifies ripping from the beginning of the disc up to
- (and including) track 2
-
- -2:[30.35] Specifies ripping from the beginning of the disc up to
- 2:[30.35]
-
- 2-4 Specifies ripping from the beginning of track two to the
- end of track 4.
-
-Don't forget to protect square brackets and preceeding hyphens from
-the shell...
-
-A few examples, protected from the shell:
- A) query only with exhaustive search for a drive and full reporting
- of autosense:
- @CDPARANOIA_NAME@ -vsQ
-
- B) extract up to and including track 3, putting each track in a separate
- file:
- @CDPARANOIA_NAME@ -B -- "-3"
-
- C) extract from track 1, time 0:30.12 to 1:10.00:
- @CDPARANOIA_NAME@ "[:30.12]-1[1:10]"
-
-Submit bug reports to bug-libcdio@gnu.org
-
diff --git a/src/cd-paranoia/utils.h b/src/cd-paranoia/utils.h
deleted file mode 100644
index 895229ba..00000000
--- a/src/cd-paranoia/utils.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- $Id: utils.h,v 1.5 2008/04/11 15:44:00 karl Exp $
-
- Copyright (C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>
- Copyright (C) 1998 Monty <xiphmont@mit.edu>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#define copystring(s) (s) ? s : NULL;
-
-static inline char *
-catstring(char *buff, const char *s)
-{
- if(s){
- if(buff)
- buff=realloc(buff,strlen(buff)+strlen(s)+1);
- else
- buff=calloc(strlen(s)+1,1);
- strcat(buff,s);
- }
- return(buff);
-}
-
diff --git a/src/cd-paranoia/version.h b/src/cd-paranoia/version.h
deleted file mode 100644
index 6a366c97..00000000
--- a/src/cd-paranoia/version.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- $Id: version.h,v 1.6 2008/04/11 15:44:00 karl Exp $
-
- Copyright (C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>
- Copyright (C) 2001 Monty <xiphmont@mit.edu>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-/******************************************************************
- * cdda_paranoia generation III release 9.8 libcdio
- ******************************************************************/
-#include <cdio/version.h>
-
-#define PARANOIA_VERSION \
- "cdparanoia III release 9.8 libcdio " CDIO_VERSION "\n" \
- "(C) 2001 Monty <monty@xiph.org> and Xiphophorus\n" \
- "(C) 2004, 2005, 2008 Rocky Bernstein <rocky@gnu.org>\n\n" \
- "Report bugs to bug-libcdio@gnu.org\n"