#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.32 2001/04/10 12:46:53 stelian Exp $";
+ "$Id: tape.c,v 1.34 2001/04/12 16:03:30 stelian Exp $";
#endif /* not lint */
#include <config.h>
static char *decompress_tapebuf __P((struct tapebuf *, int));
static void msg_read_error __P((char *));
#endif
-static int read_a_block __P((int, void *, size_t, long *));
+static int read_a_block __P((int, char *, size_t, long *));
#define PREFIXSIZE sizeof(struct tapebuf)
#define COMPARE_ONTHEFLY 1
(*fill)((char *)buf, (size_t)(curblk * TP_BSIZE) + size);
last_write_was_hole = 0;
}
+ if (size > 0) {
+ fprintf(stderr, "Missing blocks at the end of %s, assuming hole\n", curfile.name);
+ (*skip)(clearedbuf, size);
+ last_write_was_hole = 1;
+ }
if (last_write_was_hole) {
ftruncate(ofile, origsize);
}
/*
* Read a block of data handling all of the messy details.
*/
-static int read_a_block(int fd, void *buf, size_t len, long *lengthread)
+static int read_a_block(int fd, char *buf, size_t len, long *lengthread)
{
long i = 1, size;