X-Git-Url: https://git.distorted.org.uk/~mdw/dvdrip/blobdiff_plain/7ea9ce2be26022ace385842dd14ef8c21c105fb6..502323844014498c5123e462f85ef56af9465f6c:/lib.h diff --git a/lib.h b/lib.h index dc8d7de..8a63e58 100644 --- a/lib.h +++ b/lib.h @@ -43,6 +43,7 @@ #define STRCMP(a, op, b) (strcmp((a), (b)) op 0) #define STRNCMP(a, op, b, n) (strncmp((a), (b), (n)) op 0) +#define MEMCMP(a, op, b, n) (memcmp((a), (b), (n)) op 0) #ifdef DEBUG # define D(x) x @@ -79,6 +80,7 @@ extern void open_file_on_demand(const char *file, FILE **fp_inout, const char *what); extern void check_write(FILE *fp, const char *what); extern void carefully_fclose(FILE *fp, const char *what); +extern off_t device_size(int fd, const char *file, int *blksz_out); enum { RAW, IFO, VOB, BUP }; typedef uint_least32_t ident; @@ -92,6 +94,11 @@ static inline unsigned id_part(ident id) { return ((id >> 16)&0x0ff); } #define MAXFNSZ (1 + 8 + 1 + 12 + 1) extern void store_filename(char *buf, ident id); +#define DIF_MUSTVOLINF 1u +#define DIF_MUSTIFOHASH 2u +#define MAXIDSZ 99 +extern int dvd_id(char *p, dvd_reader_t *dvd, unsigned f, const char *file); + struct banner_progress_item { struct progress_item _base; const char *msg;