really need to take the various getXbyY_r() functions and put them in the main source tree, and ditch this file.