Abstract read and seek in unarchiving code, convert bunzip to file descriptors, support tar -j

This commit is contained in:
Glenn L McGrath
2002-11-03 14:05:15 +00:00
parent 2fc54a9258
commit 237ae42fc9
28 changed files with 466 additions and 332 deletions

View File

@ -92,7 +92,7 @@ extern int xopen(const char *pathname, int flags)
{
int ret;
ret = open(pathname, flags);
ret = open(pathname, flags, 0777);
if (ret == -1) {
perror_msg_and_die("%s", pathname);
}
@ -121,17 +121,6 @@ extern void xread_all(int fd, void *buf, size_t count)
return;
}
extern ssize_t xread_all_eof(int fd, void *buf, size_t count)
{
ssize_t size;
size = xread(fd, buf, count);
if ((size != 0) && (size != count)) {
error_msg_and_die("Short read");
}
return(size);
}
extern unsigned char xread_char(int fd)
{
char tmp;