From: Mark Wooding Date: Fri, 15 Apr 2022 15:58:21 +0000 (+0100) Subject: dvd-sector-copy.c: Make constants local to the only function which uses them. X-Git-Url: https://git.distorted.org.uk/~mdw/dvdrip/commitdiff_plain/e05f519ba124f2ad0dbaca2f182ddc6983d8ac49 dvd-sector-copy.c: Make constants local to the only function which uses them. --- diff --git a/dvd-sector-copy.c b/dvd-sector-copy.c index 019e382..8408f41 100644 --- a/dvd-sector-copy.c +++ b/dvd-sector-copy.c @@ -700,9 +700,6 @@ static double sectors_to_angle(secaddr base, secaddr low, secaddr high) #undef K } -#define LAYER_LIMIT 2298496 /* maximum (user) sectors on layer */ -#define DVDROM_OFFSET 0x30000 /* usual initial physical sector */ - enum { FLAT, /* not actually a real DVD */ SINGLE, /* disc with only one layer */ @@ -733,6 +730,9 @@ static void setup_geometry(struct geometry *g, int fd, unsigned f, #endif secaddr t; +#define LAYER_LIMIT 2298496 /* maximum (user) sectors on layer */ +#define DVDROM_OFFSET 0x30000 /* usual initial physical sector */ + if (!(f&GF_BLKDEV)) { /* We're reading from a regular file. Assume that progress will be * linear. @@ -804,6 +804,9 @@ guess_structure: t -= DVDROM_OFFSET; g->midpoint = t; } + +#undef LAYER_LIMIT +#undef DVDROM_OFFSET } static double linear_progress(const struct geometry *g,