Another quick note:
Code:
bsearch(&pt, typeq, sizeof(typeq)/sizeof(char *), sizeof(char *), compare)
It's good that you used the variable name (typeq) in the first sizeof expression, however you should use it in both. What you're really after is the size of one element of the typeq array, so do this:
Code:
bsearch(&pt, typeq, sizeof(typeq)/sizeof(typeq[0]), sizeof(typeq[0]), compare)
The main advantage of using the variable name instead of the type is that, if you change the type of typeq, your sizeof expressions, and thus your bsearch call, will still work correctly. If you only do that to part of the expression, you're forfeiting this advantage.