I have a small c program which uses the raw mode of the terminal. When I exit the program (and the raw mode), the terminal is cleared. Other programs like vim can handle that situation and restore the terminal output.
Is there a secret escape sequence or something to restore the terminal as it was before executing my program?