had time to look at the recursive code, but it probably has the same types of problems. Added code to set the default locale, so it will work correctly when our locale code is more than just stubs. Added prototypes, etc. to make gcc -Wall happier.