in reply to Source-Code Analysis?

I think you are probably on the right track. I just finished a similar code clean project on one part of my code base. To start, I just wanted to narrow my search for each variable to the files it appeared in. The below code, for windows, outputs into a seperate text file for each variable a list of all files containing the reference. The text file is empty if no file contains the reference. It was actually quite simple from that point to review the specific files for redundancy etc from the list.
echo. echo Building file list ... dir K:\WorkingData /S/b/A-D | grep ".plx" - | gawk "BEGIN{ DQ = 34 }{ +if(/Copy /) ; else printf \"%%c%%s%%c\n\", DQ, $0, DQ }" >> plxlst01_ +%1.txt dir J:\ /S/b/A-D | grep ".plx" - | gawk "{ if(/RECYCLER/) ; else print +f \"%%c%%s%%c\n\", DQ, $0, DQ }" >> plxlst01_%1.txt echo. REM REM The following command line searches (grep) each file in plxlst01_% +1.txt for the term in parentheses and outputs the file names. REM The resultant file names are piped to gawk to append a CRLF pair t +o file same. This list is then sorted (sort) and duplicate REM file names are removed (sed) and the resultant list is output to t +he file specified. Note: For some reason, sort -u and uniq don't REM work properly in Windows REM echo Searching for ChkMsgType() ... for /F %%f IN (plxlst01_%1.txt) DO grep -l "ChkMsgType" %%f | gawk "{ +print $0 }" | J:\usr\bin\sort -u >> ChkMsgType_%1.txt

PJ
We are drowning in information and starving for knowledge - Rutherford D. Rogers
What good is knowledge if you have to pull teeth to get it - anonymous