dvdrip
2 years agoMerge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/dvdrip master
Mark Wooding [Tue, 22 Mar 2022 21:38:19 +0000 (21:38 +0000)]
Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/dvdrip

* 'master' of git.distorted.org.uk:~mdw/publish/public-git/dvdrip:
  dvd-info.c: Trigger the easy lookup if explicit chapter bounds aren't given.
  dvd-info.c: Don't forget to dump the last titleset.
  dvd-info.c: Add missing `\' in output banner.

2 years agochkdvdimg.c: Open the image file with `open_dvd'.
Mark Wooding [Tue, 22 Mar 2022 21:37:27 +0000 (21:37 +0000)]
chkdvdimg.c: Open the image file with `open_dvd'.

This means that it will wait until we actually insert a disc.  Yay!

2 years agolib.c, and knock-on: Add MODE argument to `open_dvd'.
Mark Wooding [Tue, 22 Mar 2022 21:34:37 +0000 (21:34 +0000)]
lib.c, and knock-on: Add MODE argument to `open_dvd'.

Everyone wants read-only for now.

2 years agodvd-info.c: Trigger the easy lookup if explicit chapter bounds aren't given.
Mark Wooding [Tue, 22 Mar 2022 21:30:10 +0000 (21:30 +0000)]
dvd-info.c: Trigger the easy lookup if explicit chapter bounds aren't given.

2 years agodvd-info.c: Don't forget to dump the last titleset.
Mark Wooding [Tue, 22 Mar 2022 21:29:51 +0000 (21:29 +0000)]
dvd-info.c: Don't forget to dump the last titleset.

2 years agodvd-info.c: Add missing `\' in output banner.
Mark Wooding [Tue, 22 Mar 2022 21:29:11 +0000 (21:29 +0000)]
dvd-info.c: Add missing `\' in output banner.

2 years agoAdd a new program `dvd-info' to report on interesting things.
Mark Wooding [Sat, 19 Mar 2022 14:10:30 +0000 (14:10 +0000)]
Add a new program `dvd-info' to report on interesting things.

I'm getting deeper in here, I know.

2 years agocheckimg: Don't complain about every mismatch.
Mark Wooding [Sat, 19 Mar 2022 14:09:49 +0000 (14:09 +0000)]
checkimg: Don't complain about every mismatch.

We can tell from the summary.

2 years agodvd-sector-copy.c: Use `bad_hi' consistently for the upper bound when done.
Mark Wooding [Sat, 19 Mar 2022 14:08:43 +0000 (14:08 +0000)]
dvd-sector-copy.c: Use `bad_hi' consistently for the upper bound when done.

It's just conceivable that `good' is less than `bad_hi' at this point,
which screws everything up.  It's essential to pick a consistent upper
bound here.

2 years agodvd-sector-copy.c, lib.[ch]: Improve and publish the number parsing functions.
Mark Wooding [Sat, 19 Mar 2022 14:08:07 +0000 (14:08 +0000)]
dvd-sector-copy.c, lib.[ch]: Improve and publish the number parsing functions.

2 years agoMakefile: Factor out the `CFLAGS'.
Mark Wooding [Sat, 19 Mar 2022 14:07:15 +0000 (14:07 +0000)]
Makefile: Factor out the `CFLAGS'.

Makes overriding from the command line less awful.

2 years agodvd-sector-copy.c: Show file ends in the dump.
Mark Wooding [Fri, 11 Mar 2022 11:40:40 +0000 (11:40 +0000)]
dvd-sector-copy.c: Show file ends in the dump.

2 years agodvd-sector-copy.c: Wrap long line properly.
Mark Wooding [Fri, 11 Mar 2022 11:40:16 +0000 (11:40 +0000)]
dvd-sector-copy.c: Wrap long line properly.

2 years agodvdrip-upload: Fix self-call the case where there's no daemon running.
Mark Wooding [Wed, 9 Mar 2022 11:34:04 +0000 (11:34 +0000)]
dvdrip-upload: Fix self-call the case where there's no daemon running.

2 years agodvd-sector-copy.c: Truncate the event list before processing a lost `stop'.
Mark Wooding [Mon, 7 Mar 2022 23:47:20 +0000 (23:47 +0000)]
dvd-sector-copy.c: Truncate the event list before processing a lost `stop'.

2 years agodvd-sector-copy.c: Report final statistics correctly.
Mark Wooding [Mon, 7 Mar 2022 23:46:52 +0000 (23:46 +0000)]
dvd-sector-copy.c: Report final statistics correctly.

2 years agodvd-sector-copy.c: Dump the event queue before we start processing it.
Mark Wooding [Mon, 7 Mar 2022 23:46:29 +0000 (23:46 +0000)]
dvd-sector-copy.c: Dump the event queue before we start processing it.

2 years agodvd-sector-copy.c: Eliminate unused variable.
Mark Wooding [Mon, 7 Mar 2022 23:45:57 +0000 (23:45 +0000)]
dvd-sector-copy.c: Eliminate unused variable.

2 years agodvd-sector-copy.c: Fix botched debugging code.
Mark Wooding [Mon, 7 Mar 2022 23:45:29 +0000 (23:45 +0000)]
dvd-sector-copy.c: Fix botched debugging code.

2 years agochkdvdimg.c: Name the file when reporting too many trailing zeros.
Mark Wooding [Mon, 7 Mar 2022 12:48:05 +0000 (12:48 +0000)]
chkdvdimg.c: Name the file when reporting too many trailing zeros.

2 years agodvd-sector-copy.c: Add missing handler for the `-i' option.
Mark Wooding [Mon, 7 Mar 2022 00:36:12 +0000 (00:36 +0000)]
dvd-sector-copy.c: Add missing handler for the `-i' option.

2 years agochkdvdimg.c: Retrieve device size using the new function.
Mark Wooding [Sun, 6 Mar 2022 23:57:20 +0000 (23:57 +0000)]
chkdvdimg.c: Retrieve device size using the new function.

... which works on block devices as well as ordinary files.

2 years agodvd-sector-copy.c: Export device-size machinery to the library.
Mark Wooding [Sun, 6 Mar 2022 23:54:02 +0000 (23:54 +0000)]
dvd-sector-copy.c: Export device-size machinery to the library.

2 years agodvdrip: Check for the device size apparently changing during the copy.
Mark Wooding [Sun, 6 Mar 2022 23:53:21 +0000 (23:53 +0000)]
dvdrip: Check for the device size apparently changing during the copy.

This indicates something going horribly wrong.

2 years agodvdrip: Fail if we can't read the `.IFO' hash for the disc id.
Mark Wooding [Sun, 6 Mar 2022 20:42:02 +0000 (20:42 +0000)]
dvdrip: Fail if we can't read the `.IFO' hash for the disc id.

This may help with the kernel reporting stale medium sizes.

2 years agodvd-sector-copy.c: Add option to verify source id.
Mark Wooding [Sun, 6 Mar 2022 20:34:50 +0000 (20:34 +0000)]
dvd-sector-copy.c: Add option to verify source id.

2 years agoscripts: Call utilities via environment variables.
Mark Wooding [Sun, 6 Mar 2022 20:34:17 +0000 (20:34 +0000)]
scripts: Call utilities via environment variables.

2 years agodvd-id.c, lib.[ch]: Improve DVD ID computation.
Mark Wooding [Sun, 6 Mar 2022 17:32:51 +0000 (17:32 +0000)]
dvd-id.c, lib.[ch]: Improve DVD ID computation.

Move the code to the library.  Accept flags (to the library function and
the utility) to fail if portions of the ID can't be determined.

Also, improve `dvd-id' to print IDs for multiple disc images.

2 years agochkdvdimg: Add a new program for checking DVD images.
Mark Wooding [Sun, 6 Mar 2022 16:23:18 +0000 (16:23 +0000)]
chkdvdimg: Add a new program for checking DVD images.

Primarily I'm interested in checking that the length is right, because
one of my DVD drives sometimes reports the wrong medium size
(specifically, I think, the size for the previous medium).  Also,
sometimes there are zero sectors stuck on the end, which complicates
finding the backup UDF anchor descriptor, so provide an option to trim
these.

2 years agolib.h: Publish a `MEMCMP' macro, like `STRCMP'.
Mark Wooding [Sun, 6 Mar 2022 16:22:32 +0000 (16:22 +0000)]
lib.h: Publish a `MEMCMP' macro, like `STRCMP'.

2 years agolib.c, lib.h: Introduce `vmoan_syserr' and `moan_syserr'.
Mark Wooding [Sun, 6 Mar 2022 16:21:36 +0000 (16:21 +0000)]
lib.c, lib.h: Introduce `vmoan_syserr' and `moan_syserr'.

This cleans up this little family of functions.  There's a behaviour
change: `vmoan' now prints a newline which it didn't before, and callers
have been adjusted to compensate.

2 years agolib.c: Remove redundant format attributes.
Mark Wooding [Sun, 6 Mar 2022 16:18:00 +0000 (16:18 +0000)]
lib.c: Remove redundant format attributes.

Should use `PRINTF_LIKE' nowadays anyway.

2 years agodvdrip-retry-botched-vobs: Retry using the newly determined block list.
Mark Wooding [Sun, 6 Mar 2022 03:44:54 +0000 (03:44 +0000)]
dvdrip-retry-botched-vobs: Retry using the newly determined block list.

Fortunately, I didn't actually engage this case when I did this to my
collection.

2 years agodvdrip-retry-botched-vobs: Process discs in a useful order.
Mark Wooding [Sun, 6 Mar 2022 01:31:47 +0000 (01:31 +0000)]
dvdrip-retry-botched-vobs: Process discs in a useful order.

2 years agodvdrip-retry-botched-vobs: Eject discs when we're done with them.
Mark Wooding [Sun, 6 Mar 2022 01:27:14 +0000 (01:27 +0000)]
dvdrip-retry-botched-vobs: Eject discs when we're done with them.

2 years agodvdrip-retry-botched-vobs: Delete the retry file correctly.
Mark Wooding [Sun, 6 Mar 2022 01:27:03 +0000 (01:27 +0000)]
dvdrip-retry-botched-vobs: Delete the retry file correctly.

2 years agodvdrip-retry-botched-vobs: Be more vocal about wrong discs.
Mark Wooding [Sun, 6 Mar 2022 01:26:43 +0000 (01:26 +0000)]
dvdrip-retry-botched-vobs: Be more vocal about wrong discs.

2 years agoNew programs for dealing with VOBs ripped without being decrypted.
Mark Wooding [Sun, 6 Mar 2022 01:11:00 +0000 (01:11 +0000)]
New programs for dealing with VOBs ripped without being decrypted.

When my drives were configured with the wrong region, `libdvdcss' would
have to crack the keys the hard way, and it sometimes failed.  I mostly
shrugged my shoulders, but now I've fixed this problem, I thought I'd
track down the miscopied VOBs and make some tools for fixing the
problem.

2 years agodvdrip-monitor: New program to keep track of what's going on.
Mark Wooding [Sun, 6 Mar 2022 01:10:20 +0000 (01:10 +0000)]
dvdrip-monitor: New program to keep track of what's going on.

2 years agodvdrip: Leave a note in the working directory about which device we're using.
Mark Wooding [Sun, 6 Mar 2022 01:08:27 +0000 (01:08 +0000)]
dvdrip: Leave a note in the working directory about which device we're using.

2 years agodvd-sector-copy.c, lib.[ch]: Move the file hacking functions to the library.
Mark Wooding [Sun, 6 Mar 2022 01:08:01 +0000 (01:08 +0000)]
dvd-sector-copy.c, lib.[ch]: Move the file hacking functions to the library.

2 years agoMakefile: Only `dvd-sector-copy' needs `-lm'.
Mark Wooding [Sun, 6 Mar 2022 01:07:32 +0000 (01:07 +0000)]
Makefile: Only `dvd-sector-copy' needs `-lm'.

2 years agomultiprogress.c: Leave the cursor at the start of the last line.
Mark Wooding [Sun, 6 Mar 2022 01:06:28 +0000 (01:06 +0000)]
multiprogress.c: Leave the cursor at the start of the last line.

Things still go wrong when stray characters get echoed but it's less
bad.  I think.

2 years agomultiprogress.c: Probe termcap/info for newline sequence.
Mark Wooding [Sun, 6 Mar 2022 01:05:54 +0000 (01:05 +0000)]
multiprogress.c: Probe termcap/info for newline sequence.

Just to show willing.  Provide the obvious default, because it seems to
be necessary!

2 years agomultiprogress.c: Provide the obvious default for `cr'.
Mark Wooding [Sun, 6 Mar 2022 01:04:42 +0000 (01:04 +0000)]
multiprogress.c: Provide the obvious default for `cr'.

2 years agodvd-cache-keys.c: Allow multiple devices and/or image files.
Mark Wooding [Sun, 6 Mar 2022 01:03:49 +0000 (01:03 +0000)]
dvd-cache-keys.c: Allow multiple devices and/or image files.

2 years agodvd-cache-keys.c: Move the existence check into `kick_vob'.
Mark Wooding [Sun, 6 Mar 2022 01:03:17 +0000 (01:03 +0000)]
dvd-cache-keys.c: Move the existence check into `kick_vob'.

Much neater.

2 years agodvd-cache-keys.c: Pass index and titleness as unsigned.
Mark Wooding [Sun, 6 Mar 2022 00:59:52 +0000 (00:59 +0000)]
dvd-cache-keys.c: Pass index and titleness as unsigned.

2 years agodvd-sector-copy.c: Allow averaging `alpha' to be set as a parameter.
Mark Wooding [Sun, 6 Mar 2022 00:58:58 +0000 (00:58 +0000)]
dvd-sector-copy.c: Allow averaging `alpha' to be set as a parameter.

2 years agodvd-sector-copy.c: Reinterpret the `step' as being beyond the high bound.
Mark Wooding [Sun, 6 Mar 2022 00:58:20 +0000 (00:58 +0000)]
dvd-sector-copy.c: Reinterpret the `step' as being beyond the high bound.

2 years agodvd-sector-copy.c: Just a light reformatting.
Mark Wooding [Sun, 6 Mar 2022 00:57:28 +0000 (00:57 +0000)]
dvd-sector-copy.c: Just a light reformatting.

2 years agodvd-sector-copy.c: Go back to showing just disc progress when continuing.
Mark Wooding [Sun, 6 Mar 2022 00:57:05 +0000 (00:57 +0000)]
dvd-sector-copy.c: Go back to showing just disc progress when continuing.

2 years agodvd-sector-copy.c: Remove the pointless `status' variable.
Mark Wooding [Sun, 6 Mar 2022 00:55:55 +0000 (00:55 +0000)]
dvd-sector-copy.c: Remove the pointless `status' variable.

Relic of former days when `dvdrip' used the return code to infer that
there were bad blocks.  Nowadays it checks for the `badblocks' file.

2 years agodvd-sector-copy.c: Report the number of bad sectors in the bad-blocks file.
Mark Wooding [Tue, 1 Mar 2022 18:34:45 +0000 (18:34 +0000)]
dvd-sector-copy.c: Report the number of bad sectors in the bad-blocks file.

2 years agoA big mess of changes all at once.
Mark Wooding [Tue, 1 Mar 2022 16:18:47 +0000 (16:18 +0000)]
A big mess of changes all at once.

I'm usually quite good about factoring out all of the changes I make, but
in this case it doesn't seem worth the bother.

2 years agodvdrip: Squish some code a bit.
Mark Wooding [Sat, 26 Feb 2022 11:40:42 +0000 (11:40 +0000)]
dvdrip: Squish some code a bit.

2 years agodvdrip: Abolish the affordances for using `dvdbackup'.
Mark Wooding [Sat, 26 Feb 2022 11:40:07 +0000 (11:40 +0000)]
dvdrip: Abolish the affordances for using `dvdbackup'.

2 years agodvdrip: Add `-r' option to retry the failed blocks.
Mark Wooding [Thu, 24 Feb 2022 17:02:51 +0000 (17:02 +0000)]
dvdrip: Add `-r' option to retry the failed blocks.

2 years agodvd-sector-copy.c (report_progress): Fiddle with the averaging parameter.
Mark Wooding [Thu, 24 Feb 2022 17:02:00 +0000 (17:02 +0000)]
dvd-sector-copy.c (report_progress): Fiddle with the averaging parameter.

2 years agodvd-sector-copy.c (report_progress): Show a throbber to help gauge speed.
Mark Wooding [Thu, 24 Feb 2022 17:01:26 +0000 (17:01 +0000)]
dvd-sector-copy.c (report_progress): Show a throbber to help gauge speed.

2 years agodvd-sector-copy.c (recovered): Don't print comment if outside a VOB file.
Mark Wooding [Thu, 24 Feb 2022 17:00:38 +0000 (17:00 +0000)]
dvd-sector-copy.c (recovered): Don't print comment if outside a VOB file.

2 years agodvd-sector-copy.c, dvdrip: Cue prompt to check image from `badblocks' file.
Mark Wooding [Sat, 19 Feb 2022 21:32:13 +0000 (21:32 +0000)]
dvd-sector-copy.c, dvdrip: Cue prompt to check image from `badblocks' file.

The exit status from the final run isn't helpful, but the bad-blocks
file is.

2 years agodvdrip: Prepare the `dest' file early, so that it can be edited.
Mark Wooding [Sat, 19 Feb 2022 19:06:25 +0000 (19:06 +0000)]
dvdrip: Prepare the `dest' file early, so that it can be edited.

2 years agodvd-sector-copy.c: Use the correct character to match comments.
Mark Wooding [Sat, 19 Feb 2022 15:23:04 +0000 (15:23 +0000)]
dvd-sector-copy.c: Use the correct character to match comments.

Oops.

2 years agosort-badblocks: Another handy testing utility.
Mark Wooding [Sat, 19 Feb 2022 11:54:20 +0000 (11:54 +0000)]
sort-badblocks: Another handy testing utility.

2 years agodvd-sector-copy.c: Limit `recovery_read' return value to length requested.
Mark Wooding [Sat, 19 Feb 2022 11:53:22 +0000 (11:53 +0000)]
dvd-sector-copy.c: Limit `recovery_read' return value to length requested.

Otherwise the caller gets properly confused.

2 years agodvd-sector-copy.c: Add more debugging about the recovery algorithm.
Mark Wooding [Sat, 19 Feb 2022 11:53:06 +0000 (11:53 +0000)]
dvd-sector-copy.c: Add more debugging about the recovery algorithm.

2 years agodvdrip-upload: Make script sexecutable, like it should be.
Mark Wooding [Sat, 19 Feb 2022 09:49:52 +0000 (09:49 +0000)]
dvdrip-upload: Make script sexecutable, like it should be.

2 years agodvd-sector-copy.c: Secret option to dump the exact bad sectors encountered.
Mark Wooding [Sat, 19 Feb 2022 02:02:24 +0000 (02:02 +0000)]
dvd-sector-copy.c: Secret option to dump the exact bad sectors encountered.

I don't think this one quite works properly yet.

2 years agodvd-sector-copy.c: Include file-relative information in bad-blocks file.
Mark Wooding [Sat, 19 Feb 2022 02:01:26 +0000 (02:01 +0000)]
dvd-sector-copy.c: Include file-relative information in bad-blocks file.

Also, tolerate these comments when reading them back in.

2 years agodvd-sector-copy.c: Read into the correct part of the buffer. Again.
Mark Wooding [Sat, 19 Feb 2022 02:00:28 +0000 (02:00 +0000)]
dvd-sector-copy.c: Read into the correct part of the buffer.  Again.

2 years agodvd-sector-copy.c: Remove broken field-width specifier.
Mark Wooding [Sat, 19 Feb 2022 01:59:03 +0000 (01:59 +0000)]
dvd-sector-copy.c: Remove broken field-width specifier.

I failed to include space for the decimal point and fraction, so it
didn't actually do anything.  And it turns out that I'm happy with it
like this.

2 years agodvd-sector-copy.c: Factor out some file-hacking machinery.
Mark Wooding [Sat, 19 Feb 2022 01:58:34 +0000 (01:58 +0000)]
dvd-sector-copy.c: Factor out some file-hacking machinery.

2 years agodvdrip: Collect together bad-blocks lists from repeated runs.
Mark Wooding [Sat, 19 Feb 2022 01:55:28 +0000 (01:55 +0000)]
dvdrip: Collect together bad-blocks lists from repeated runs.

2 years agocheckimg, distill: A couple of scripts useful for testing and debugging.
Mark Wooding [Fri, 18 Feb 2022 23:01:13 +0000 (23:01 +0000)]
checkimg, distill: A couple of scripts useful for testing and debugging.

2 years agodvd-sector-copy.c: Leave progress report visible before debugging.
Mark Wooding [Fri, 18 Feb 2022 23:00:18 +0000 (23:00 +0000)]
dvd-sector-copy.c: Leave progress report visible before debugging.

2 years agodvd-sector-copy.c: Fix formatting for debugging code.
Mark Wooding [Fri, 18 Feb 2022 22:58:34 +0000 (22:58 +0000)]
dvd-sector-copy.c: Fix formatting for debugging code.

2 years agodvd-sector-copy.c: Dump buffer after final recovery.
Mark Wooding [Fri, 18 Feb 2022 23:00:00 +0000 (23:00 +0000)]
dvd-sector-copy.c: Dump buffer after final recovery.

2 years agodvd-sector-copy.c: Don't dump fake-bad-block search if no bad blocks.
Mark Wooding [Fri, 18 Feb 2022 22:59:00 +0000 (22:59 +0000)]
dvd-sector-copy.c: Don't dump fake-bad-block search if no bad blocks.

2 years agodvd-sector-copy.c: Fix final recovery.
Mark Wooding [Fri, 18 Feb 2022 22:57:13 +0000 (22:57 +0000)]
dvd-sector-copy.c: Fix final recovery.

Write this the other way around, because it's easier to read that way.
And then notice that it's broken because it doesn't actually set the
return value properly.

2 years agodvd-sector-copy.c: Write new data into the correct part of the buffer.
Mark Wooding [Fri, 18 Feb 2022 22:55:57 +0000 (22:55 +0000)]
dvd-sector-copy.c: Write new data into the correct part of the buffer.

The debugging message had the right value, which made this annoyingly
hard to track down.

2 years agodvd-sector-copy.c: Check more carefully for overflow conditions.
Mark Wooding [Fri, 18 Feb 2022 22:55:33 +0000 (22:55 +0000)]
dvd-sector-copy.c: Check more carefully for overflow conditions.

2 years agodvd-sector-copy.c: Check `n' nonnegative before comparing with unsigned.
Mark Wooding [Fri, 18 Feb 2022 22:54:19 +0000 (22:54 +0000)]
dvd-sector-copy.c: Check `n' nonnegative before comparing with unsigned.

Otherwise it might be coerced to unsigned, at which point the comparison
means something completely different.

2 years agodvd-sector-copy.c: Adjust the base position when shifting.
Mark Wooding [Fri, 18 Feb 2022 22:51:28 +0000 (22:51 +0000)]
dvd-sector-copy.c: Adjust the base position when shifting.

Fixes stupid bug.

2 years agodvd-sector-copy.c: Fix formatting for `ssize_t'.
Mark Wooding [Fri, 18 Feb 2022 22:50:16 +0000 (22:50 +0000)]
dvd-sector-copy.c: Fix formatting for `ssize_t'.

2 years agodvd-sector-copy.c: Rewrite the bad-sector recovery machinery.
Mark Wooding [Fri, 18 Feb 2022 19:00:48 +0000 (19:00 +0000)]
dvd-sector-copy.c: Rewrite the bad-sector recovery machinery.

It's now much more aggressive about skipping good sectors squished
between bad ones.

2 years agodvd-sector-copy.c: Extract the post-recovery code into a function.
Mark Wooding [Fri, 18 Feb 2022 18:58:47 +0000 (18:58 +0000)]
dvd-sector-copy.c: Extract the post-recovery code into a function.

The `goto' is ugly.

2 years agodvd-sector-copy.c: Sink `report_bad_blocks_progress' towards recovery.
Mark Wooding [Fri, 18 Feb 2022 18:54:54 +0000 (18:54 +0000)]
dvd-sector-copy.c: Sink `report_bad_blocks_progress' towards recovery.

2 years agodvd-sector-copy.c: Make `read_sectors' more persistent after short reads.
Mark Wooding [Fri, 18 Feb 2022 18:50:27 +0000 (18:50 +0000)]
dvd-sector-copy.c: Make `read_sectors' more persistent after short reads.

It now continues trying to read until it gets an error, end-of-file, or
it completes the task requested of it.  For consistency, we must also
report an error after a short read forced by a synthetic bad sector,
which requires a little additional machinery.

2 years agodvd-sector-copy.c: Move `i' to the debug-only variables block.
Mark Wooding [Fri, 18 Feb 2022 18:46:13 +0000 (18:46 +0000)]
dvd-sector-copy.c: Move `i' to the debug-only variables block.

2 years agodvd-sector-copy.c: Split bad-block recovery out into its own function.
Mark Wooding [Thu, 17 Feb 2022 00:16:58 +0000 (00:16 +0000)]
dvd-sector-copy.c: Split bad-block recovery out into its own function.

2 years agodvd-sector-copy.c: Add machinery for installing pretend bad sectors.
Mark Wooding [Wed, 16 Feb 2022 23:37:50 +0000 (23:37 +0000)]
dvd-sector-copy.c: Add machinery for installing pretend bad sectors.

For testing the recovery algorithm(s).

2 years agodvd-sector-copy.c: Force return to start of line on progress output.
Mark Wooding [Wed, 16 Feb 2022 21:20:10 +0000 (21:20 +0000)]
dvd-sector-copy.c: Force return to start of line on progress output.

2 years agodvd-sector-copy.c: Merge adjacent retry ranges when reading from a file.
Mark Wooding [Wed, 16 Feb 2022 21:19:42 +0000 (21:19 +0000)]
dvd-sector-copy.c: Merge adjacent retry ranges when reading from a file.

2 years agodvd-sector-copy.c, dvdrip: Make input and output files positional args.
Mark Wooding [Wed, 16 Feb 2022 21:15:22 +0000 (21:15 +0000)]
dvd-sector-copy.c, dvdrip: Make input and output files positional args.

They're not really optional.

2 years agodvd-sector-copy.c: Hoist out the common sector-range parsing machinery.
Mark Wooding [Wed, 16 Feb 2022 21:13:46 +0000 (21:13 +0000)]
dvd-sector-copy.c: Hoist out the common sector-range parsing machinery.

2 years agodvd-sector-copy.c: Make `outfd' be global variable.
Mark Wooding [Wed, 16 Feb 2022 21:10:54 +0000 (21:10 +0000)]
dvd-sector-copy.c: Make `outfd' be global variable.

2 years agodvd-sector-copy.c: Hoist `carefully_write' up near the system utilities.
Mark Wooding [Wed, 16 Feb 2022 21:09:15 +0000 (21:09 +0000)]
dvd-sector-copy.c: Hoist `carefully_write' up near the system utilities.

2 years agodvd-sector-copy.c: Split up the things which used to be in `struct source'.
Mark Wooding [Wed, 16 Feb 2022 18:55:24 +0000 (18:55 +0000)]
dvd-sector-copy.c: Split up the things which used to be in `struct source'.

2 years agodvd-sector-copy.c: Eliminate `struct source'; just make the things global.
Mark Wooding [Wed, 16 Feb 2022 18:53:16 +0000 (18:53 +0000)]
dvd-sector-copy.c: Eliminate `struct source'; just make the things global.