Searching for unused functions
Two major points:


The parsing is very fragile and only works when the code is laid out in a certain way. You should look for a proper parser and leverage that.
It is rather inefficient to scan all the files every time you encounter a function declaration. You could use dictionaries to keep track of functions so one pass over the files would suffice.