eliminate warning from some fastidious compilers
add more robust character classification functions