/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1987-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 pds format
*/
#include "format.h"
#include <tm.h>
typedef struct Pdsdir_s
{
char* link;
unsigned long block;
} Pdsdir_t;
typedef struct Pds_s
{
char* format;
unsigned char* map;
} Pds_t;
static int
pds_getprologue(Pax_t* pax, Format_t* fp, register Archive_t* ap, File_t* f, unsigned char* buf, size_t size)
{
register unsigned char* b;
register unsigned char* e;
register size_t n;
register size_t i;
register size_t m;
return 0;
b = buf;
e = b + b[1];
while (b != e)
{
n = 12 + 2 * (b[11] & 0x1f);
if ((e - b) < n)
return 0;
b += n;
}
i = 0;
m = 32;
nospace();
links = 0;
{
n = b[1];
b += 2;
e = b + n;
while ((e - b) >= 12)
{
goto done;
n = 12 + 2 * (b[11] & 0x1f);
if ((e - b) < n)
break;
if (i >= m)
{
m += 32;
nospace();
}
pds->dir[i].time = (n > 25) ? tmscan(sfprints("%02x %02x%01x %02x %02x", b[21], b[22], b[23] >> 4, b[24], b[25]), NiL, "%y %j %H %M", NiL, NiL, 0) : NOW;
if (b[11] & 0x80)
{
links++;
}
else
b += n;
i++;
}
}
done:
{
return 0;
}
m = 0;
while (links > 0)
{
m++;
for (n = 0; n < i; n++)
break;
if (n < m)
{
}
else if (n < i)
else
m++;
links--;
}
return 1;
}
static int
{
{
}
return 0;
}
static int
{
return 0;
return 1;
}
static int
{
return 1;
}
{
"pds",
0,
"mvs partitioned dataset",
0,
0,
0,
};