.
[SXSI/xpathcomp.git] / results.h
1
2 typedef struct
3   { int n,lgn;
4     int *tree;
5   } results;
6
7         // creates empty results data structure for n nodes numbered 0..n-1
8 results createResults (int n);
9
10         // frees R
11 void freeResults (results R);
12
13         // returns 0/1 telling whether result p is not/is present in R
14 int readResult (results R, int p);
15
16         // inserts result p into R
17 void setResult (results R, int p);
18
19         // clears all results p1..p2 in R
20 void clearRange (results R, int p1, int p2);
21
22         // returns pos of next(p) in R, or -1 if none
23 int nextResult (results R, int p);
24
25         // for debugging, prints the data structure
26 void printTree (results R);
27