Sample code:
68
void
69
append(keylist, nelem, depth, fp, put, ftbl)
70
const u_char **keylist;
71
int nelem;
72
int depth;
73
FILE *fp;
74
put_func_t put;
75
struct field *ftbl;
76
{
77
u_char *wts, *wts1;
78
int n, odepth=0;
79
const u_char **cpos, **ppos, **lastkey;
80
const u_char *cend, *pend, *start;
81
const struct recheader *crec, *prec;
82
83
if (*keylist == '\0' && UNIQUE)
84
return;
85
wts1 = wts = ftbl[0].weights;
86
if ((!UNIQUE) && SINGL_FLD) {
87
if ((ftbl[0].flags & F) && (ftbl[0].flags & R))
88
wts1 = Rascii;
89
else if (ftbl[0].flags & F)
90
wts1 = ascii;
91
odepth = depth;
92
}
93
lastkey = keylist + nelem;
94
depth += sizeof(TRECHEADER);
95
if (SINGL_FLD && (UNIQUE || wts1 != wts)) {
96
ppos = keylist;
97
prec = (const RECHEADER *) (*ppos - depth);
The result of the analysis of the above code section is:
200101
1
0
0
and
10211
0 0 0
0 0
0 1
0
0
0.
Basically what I am envisioning is to record all instantiated variables as I have described in the previous post, and to record below it corresponding changes to the level of pointers to that variable as the code progresses down.