/* * getpassword version 0 -- outline of what it has to do */ main() { turn off keyboard echo() read a line of text() // use fgets or read or getchar restore keyboard settings() do something with the line of text } turn_off_keyboard_echo() { copy the current terminal settings from the driver into a struct store those original settings change echo to OFF send the struct back to the driver } restore keyboard settings() { copy the saved original settings back to the driver }