tsr_exit() shouldn't be called by _exit() and also be an atexit() handler. (dm)
Rename getCodePage() to msdosGetCodePage(). (dm)