/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
#include "dirlib.h"
#if _dir_ok || _lib_getdents
#else
/*
* getdents
*
* read directory entries into directory block
*
* NOTE: directory entries must fit within DIRBLKSIZ boundaries
*/
#ifndef MAXNAMLEN
#define MAXNAMLEN 255
#endif
#if _lib_dirread
extern int dirread(int, char*, int);
#endif
extern int getdirentries(int, char*, int, long*);
#endif
{
{
return(-1);
}
{
#ifdef ENOTDIR
#else
#endif
return(-1);
}
{
long off;
}
#else
#if _lib_dirread
{
register char* sp; /* system */
char* u;
int n;
int m;
int i;
m = roundof(m, 8);
if (n > 0)
{
sp[n] = 0;
{
i = 0;
if (*sp++)
{
*u = 0;
}
}
}
}
#else
#else
{
register char* s;
register char* u;
int n;
int m;
/*
* we assume sizeof(struct dirent) > sizeof(struct direct)
*/
do
{
{
{
u = tmp;
*u++ = *s++;
*u = 0;
}
sp++;
}
}
#endif
#endif
#endif
}
#endif