/***********************************************************************
* *
* 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 arj format
*/
#include <paxlib.h>
#include <codex.h>
#include <swap.h>
#include <tm.h>
typedef struct Ar_s
{
unsigned int index;
unsigned long checksum;
unsigned char system;
unsigned char type;
} Ar_t;
static int
{
if (!ar)
return -1;
return 0;
}
static int
arj_getprologue(Pax_t* pax, Paxformat_t* fp, register Paxarchive_t* ap, Paxfile_t* f, unsigned char* buf, size_t size)
{
register char* s;
int n;
int r;
return 0;
return paxnospace(pax);
r = -1;
{
goto bad;
}
{
r = 0;
goto bad;
}
goto bad;
goto bad;
return 1;
bad:
return r;
}
static int
{
register unsigned char* buf;
char* s;
unsigned long dostime;
long n;
int mode;
for (;;)
{
return 0;
if (n < 32 || n > 2600 || swapget(3, buf, 2) != MAGIC || !(buf = (unsigned char*)paxget(pax, ap, n + 4, NiL)))
break;
break;
{
case 0:
break;
case 1:
case 2:
case 3:
sfsprintf(ar->method, sizeof(ar->method), "lzh-26624-s1+SIZE=%I*u|%s", sizeof(f->uncompressed), f->uncompressed, SUM);
break;
default:
break;
}
goto bad;
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'))
}
}
return 1;
}
bad:
}
static int
{
ssize_t n;
int r;
int pop;
return 1;
r = -1;
if (fd < 0)
r = 1;
{
else
{
for (;;)
{
{
break;
}
else if (n == 0)
{
r = 1;
break;
}
break;
}
}
}
{
(*pax->errorf)(NiL, pax, 2, "%s: %s: cannot seek past %s format data", ap->name, f->name, ap->format->name);
r = -1;
}
return r;
}
{
"arj",
0,
"arj archive",
0,
0,
0,
};