/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 2002-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> *
* David Korn <dgk@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* portable archive format method
*/
#include <ardirlib.h>
#include <ctype.h>
#include <tm.h>
typedef struct Header_s
{
} Header_t;
{
} State_t;
/*
* closef
*/
static int
{
int r;
r = -1;
else
{
r = 0;
{
r = -1;
else
{
r = -1;
}
}
}
return r;
}
/*
* openf
*/
static int
{
long size;
size_t i;
char* name;
char* e;
if (n < (MAGIC_SIZE + sizeof(Header_t)))
return -1;
return -1;
/*
* check for a symbol directory
*/
return -1;
return -1;
#else
return -1;
{
if (n < (MAGIC_SIZE + sizeof(Header_t) + i))
return -1;
}
{
goto nope;
if ((ar->flags & ARDIR_RANLIB) && (sfsscanf(hdr->ar_date, "%lu", &ar->symtime) != 1 || (unsigned long)ar->st.st_mtime > ar->symtime + (strmatch(name, SYMDIR_strict) ? 0 : SYMDIR_age)))
}
else
{
/*
* there is no symbol directory
*/
else
}
goto nope;
while (read(ar->fd, (char*)hdr, sizeof(state->header)) == sizeof(state->header) && hdr->ar_name[0] == TERM_port)
{
goto nope;
if (!state->names && hdr->ar_name[1] == TERM_port && (hdr->ar_name[2] == ' ' || hdr->ar_name[2] == TERM_port && hdr->ar_name[3] == ' '))
{
/*
* long name string table
*/
goto nope;
*name = 0;
}
break;
goto nope;
}
return 0;
#endif
nope:
return -1;
}
/*
*/
static int
{
int i;
long n;
if (b[5] != ' ')
{
n = 0;
for (i = 0; i < 5; i++)
{
n <<= 6;
n |= b[i] - ' ';
}
n <<= 2;
n |= b[i] - '@';
*p = n;
}
{
return -1;
}
return 0;
}
/*
* nextf
*/
static Ardirent_t*
{
long n;
ssize_t z;
char* s;
{
return 0;
}
{
else if (z > 0)
return 0;
}
{
return 0;
}
{
return 0;
}
return 0;
return 0;
{
return 0;
}
{
return 0;
}
{
{
{
return 0;
}
}
{
return 0;
}
else if (z != n)
{
return 0;
}
}
else
{
for (s = ar->dirent.name + strlen(ar->dirent.name); s > ar->dirent.name && (*(s - 1) == TERM_port || *(s - 1) == TERM_rand); s--);
*s = 0;
}
}
/*
* changef
*/
static int
{
off_t o;
{
return -1;
}
{
return -1;
}
return 0;
}
{
"portable",
"portable archive",
0,
0,
};