version 1.5, 1996/08/31 22:40:21 |
version 1.6, 1996/09/01 04:30:17 |
|
|
* maximum depth specified |
* maximum depth specified |
*/ |
*/ |
int |
int |
f_mdepth(plan, entry) |
f_maxdepth(plan, entry) |
PLAN *plan; |
PLAN *plan; |
FTSENT *entry; |
FTSENT *entry; |
{ |
{ |
extern FTS *tree; |
extern FTS *tree; |
|
|
if (entry->fts_level >= plan->d_data) |
if (entry->fts_level >= plan->max_data) |
fts_set(tree, entry, FTS_SKIP); |
fts_set(tree, entry, FTS_SKIP); |
return (entry->fts_level <= plan->d_data); |
return (entry->fts_level <= plan->max_data); |
} |
} |
|
|
PLAN * |
PLAN * |
c_mdepth(arg) |
c_maxdepth(arg) |
char *arg; |
char *arg; |
{ |
{ |
PLAN *new; |
PLAN *new; |
|
|
new = palloc(N_MDEPTH, f_mdepth); |
new = palloc(N_MAXDEPTH, f_maxdepth); |
new->d_data = atoi(arg); |
new->max_data = atoi(arg); |
|
return (new); |
|
} |
|
|
|
/* |
|
* - mindepth n functions -- |
|
* |
|
* True if the current search depth is greater than or equal to the |
|
* minimum depth specified |
|
*/ |
|
int |
|
f_mindepth(plan, entry) |
|
PLAN *plan; |
|
FTSENT *entry; |
|
{ |
|
extern FTS *tree; |
|
|
|
return (entry->fts_level >= plan->min_data); |
|
} |
|
|
|
PLAN * |
|
c_mindepth(arg) |
|
char *arg; |
|
{ |
|
PLAN *new; |
|
|
|
new = palloc(N_MINDEPTH, f_mindepth); |
|
new->min_data = atoi(arg); |
return (new); |
return (new); |
} |
} |
|
|