chiark
/
gitweb
/
~mdw
/
dvdrip
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3b455ee
)
dvd-sector-copy.c: Make `outfd' be global variable.
author
Mark Wooding
<mdw@distorted.org.uk>
Wed, 16 Feb 2022 21:10:54 +0000
(21:10 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Wed, 16 Feb 2022 23:29:33 +0000
(23:29 +0000)
dvd-sector-copy.c
patch
|
blob
|
blame
|
history
diff --git
a/dvd-sector-copy.c
b/dvd-sector-copy.c
index b0cd78d9fb7f41713c5e2712bbe9b00984620eb7..dceab3f80d9fa6f205bba435aba18131ee4182fa 100644
(file)
--- a/
dvd-sector-copy.c
+++ b/
dvd-sector-copy.c
@@
-382,7
+382,7
@@
static void report_bad_blocks_progress(secaddr lo, secaddr hi, int err)
}
static dvd_reader_t *dvd;
}
static dvd_reader_t *dvd;
-static int dvdfd = -1;
+static int dvdfd = -1
, outfd = -1
;
static dvd_file_t *vob;
static const char *mapfile; static FILE *mapfp;
static dvd_file_t *vob;
static const char *mapfile; static FILE *mapfp;
@@
-407,7
+407,7
@@
again:
return (n);
}
return (n);
}
-static void emit(
int outfd,
secaddr start, secaddr end)
+static void emit(secaddr start, secaddr end)
{
#define BUFSECTORS 512
{
#define BUFSECTORS 512
@@
-605,7
+605,7
@@
int main(int argc, char *argv[])
unsigned long start, end;
const struct event *ev;
const char *device = "/dev/dvd", *outfile = 0;
unsigned long start, end;
const struct event *ev;
const char *device = "/dev/dvd", *outfile = 0;
- int opt,
err, outfd = -1,
blksz;
+ int opt, blksz;
unsigned n;
size_t i;
FILE *fp;
unsigned n;
size_t i;
FILE *fp;
@@
-812,7
+812,7
@@
int main(int argc, char *argv[])
for (pos = 0, i = 0; i < eventq.n; i++) {
ev = &eventq.v[i];
if (ev->pos > pos) {
for (pos = 0, i = 0; i < eventq.n; i++) {
ev = &eventq.v[i];
if (ev->pos > pos) {
- if (f&f_write) emit(
outfd,
pos, ev->pos);
+ if (f&f_write) emit(pos, ev->pos);
pos = ev->pos;
#ifdef DEBUG
clear_progress();
pos = ev->pos;
#ifdef DEBUG
clear_progress();