/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-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> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
*
* ftwalk on top of fts
*/
#include <ast.h>
#include <ftwalk.h>
static struct
{
} state;
/*
* why does fts take FTSENT** instead of FTSENT*
*/
static int
{
}
/*
* the real thing -- well it used to be
*/
int
{
register FTS* f;
register FTSENT* e;
register int children;
register int rv;
int oi;
int ns;
int os;
int nd;
FTSENT* x;
flags ^= FTS_ONEPATH;
flags |= FTS_NOPREORDER;
else
flags |= FTS_NOPOSTORDER;
flags |= FTS_SEEDOT;
{
return -1;
return -1;
e->parent = e;
free(e);
return rv;
}
rv = 0;
if (children && (e = fts_children(f, 0)))
{
nd = 0;
for (x = e; x; x = x->link)
{
break;
}
while (nd > 0)
for (x = e; x; x = x->link)
}
{
nd = 0;
switch (e->info)
{
case FTS_D:
case FTS_DNX:
if (children)
for (x = fts_children(f, 0); x; x = x->link)
{
break;
}
break;
case FTS_DOT:
continue;
case FTS_ERR:
break;
case FTS_NSOK:
break;
case FTS_SLNONE:
break;
}
while (nd > 0)
}
fts_close(f);
return rv;
}