useful routines for C programming
