/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 2002-2012 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
/*
*/
#include <ardirlib.h>
{
char* skip;
ssize_t n = 0;
return 0;
if (((ar->fd = open(file, (flags & ARDIR_CREATE) ? (O_CREAT|O_TRUNC|O_RDWR|O_BINARY|O_cloexec) : (flags & ARDIR_UPDATE) ? (O_RDWR|O_BINARY|O_cloexec) : (O_RDONLY|O_BINARY|O_cloexec))) < 0 || fstat(ar->fd, &ar->st) || !S_ISREG(ar->st.st_mode)) && (!meth || !(flags & ARDIR_FORCE)))
{
ardirclose(ar);
return 0;
}
if (ar->fd >= 0 && ((pos = lseek(ar->fd, (off_t)0, SEEK_CUR)) < 0 || (n = read(ar->fd, buf, sizeof(buf))) < 0 || lseek(ar->fd, pos, SEEK_SET) != pos))
{
ardirclose(ar);
return 0;
}
{
break;
{
ardirclose(ar);
return 0;
}
}
{
ardirclose(ar);
return 0;
}
return ar;
}
{
}
{
ssize_t n;
size_t m;
off_t z;
{
return -1;
}
return -1;
while (z > 0)
{
{
break;
}
if (n == 0)
break;
{
break;
}
z -= n;
}
if (z)
{
z = -z;
}
else
return z;
}
int
{
{
return -1;
}
}
int
{
{
return -1;
}
}
const char*
{
{
return 0;
}
}
int
{
int r;
if (!ar)
return -1;
r = -1;
return r;
}
{
return meth;
return 0;
}
{
}