/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 2003-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* pax zoo format
*
* header layout snarfed from the public domain unzoo.c
*/
#include <paxlib.h>
#include <codex.h>
#include <sum.h>
#include <swap.h>
#include <tm.h>
typedef struct Ar_s
{
unsigned int index;
unsigned long checksum;
} Ar_t;
static int
{
if (!ar)
return -1;
return 0;
}
static int
zoo_getprologue(Pax_t* pax, Paxformat_t* fp, register Paxarchive_t* ap, Paxfile_t* f, unsigned char* buf, size_t size)
{
return 0;
{
if (ar)
return paxnospace(pax);
}
{
}
return 1;
}
static int
{
register unsigned char* buf;
register char* s;
long n;
int i;
int mode;
int dosdate;
int dostime;
int doszone;
int ext;
int extdir;
int extname;
int system;
for (;;)
{
break;
return 0;
if (buf[30])
continue;
{
case 0:
break;
case 1:
sfsprintf(ar->method, sizeof(ar->method), "lzd+SIZE=%I*u|%s", sizeof(f->uncompressed), f->uncompressed, SUM);
s = "lzd";
break;
case 2:
sfsprintf(ar->method, sizeof(ar->method), "lzh-8k-s1+SIZE=%I*u|%s", sizeof(f->uncompressed), f->uncompressed, SUM);
break;
default:
break;
}
break;
{
break;
}
else
{
ext = 0;
doszone = 127;
}
if (ext > 0)
{
break;
}
else
extname = 0;
if (ext > 1)
{
break;
}
else
extdir = 0;
{
if (!extname)
if (!extname)
{
}
break;
else
if (extdir)
{
break;
}
}
else
if (ext > n+2)
{
break;
}
else
system = 0;
if (ext > n+4)
{
break;
}
else
mode = 0;
break;
f->linkpath = 0;
{
if (mode & 0x10)
else if (mode & 0x01)
else
{
if ((s = strrchr(f->name, '.')) && (s[1]=='e' || s[1]=='E') && (s[1]=='x' || s[1]=='X') && (s[1]=='e' || s[1]=='E'))
}
}
if (doszone < 127)
else if (doszone > 127)
return 1;
}
}
static int
{
ssize_t n;
int r;
int pop;
return 1;
{
(*pax->errorf)(NiL, pax, 2, "%s: %s: cannot extract %s method=%d version=%d.%d data", ap->name, f->name, ap->format->name, ar->index, ar->majver, ar->minver);
return -1;
}
r = -1;
{
else
{
for (;;)
{
{
break;
}
else if (n == 0)
{
r = 1;
break;
}
break;
}
}
}
return r;
}
{
"zoo",
0,
"zoo archive",
0,
0,
0,
};