Portable C/C++ Console/Terminal Manipulation