version 1.5, 2003/06/03 02:56:08 |
version 1.6, 2006/03/25 19:06:35 |
|
|
* given this parent, depth first number its children. |
* given this parent, depth first number its children. |
*/ |
*/ |
void |
void |
dfn( parentp ) |
dfn(nltype *parentp) |
nltype *parentp; |
|
{ |
{ |
arctype *arcp; |
arctype *arcp; |
|
|
|
|
* push a parent onto the stack and mark it busy |
* push a parent onto the stack and mark it busy |
*/ |
*/ |
void |
void |
dfn_pre_visit( parentp ) |
dfn_pre_visit(nltype *parentp) |
nltype *parentp; |
|
{ |
{ |
|
|
dfn_depth += 1; |
dfn_depth += 1; |
|
|
* are we already numbered? |
* are we already numbered? |
*/ |
*/ |
bool |
bool |
dfn_numbered( childp ) |
dfn_numbered(nltype *childp) |
nltype *childp; |
|
{ |
{ |
|
|
return ( childp -> toporder != DFN_NAN && childp -> toporder != DFN_BUSY ); |
return ( childp -> toporder != DFN_NAN && childp -> toporder != DFN_BUSY ); |
|
|
* are we already busy? |
* are we already busy? |
*/ |
*/ |
bool |
bool |
dfn_busy( childp ) |
dfn_busy(nltype *childp) |
nltype *childp; |
|
{ |
{ |
|
|
if ( childp -> toporder == DFN_NAN ) { |
if ( childp -> toporder == DFN_NAN ) { |
|
|
* MISSING: an explanation |
* MISSING: an explanation |
*/ |
*/ |
void |
void |
dfn_findcycle( childp ) |
dfn_findcycle(nltype *childp) |
nltype *childp; |
|
{ |
{ |
int cycletop; |
int cycletop; |
nltype *cycleheadp; |
nltype *cycleheadp; |
|
|
* for lint: ARGSUSED |
* for lint: ARGSUSED |
*/ |
*/ |
void |
void |
dfn_self_cycle( parentp ) |
dfn_self_cycle(nltype *parentp) |
nltype *parentp; |
|
{ |
{ |
/* |
/* |
* since we are taking out self-cycles elsewhere |
* since we are taking out self-cycles elsewhere |
|
|
* and pop it off the stack |
* and pop it off the stack |
*/ |
*/ |
void |
void |
dfn_post_visit( parentp ) |
dfn_post_visit(nltype *parentp) |
nltype *parentp; |
|
{ |
{ |
nltype *memberp; |
nltype *memberp; |
|
|