Resets the terminal to the operating system's default statevoid sm_resetcrt(void);void sm_jresetcrt(void);void sm_jxresetcrt(void);
sm_resetcrtresets terminal characteristics to the operating system's normal state. Use this function only with your own executive. Call
sm_resetcrtwhen leaving the screen manager environment before program exit.
All the memory associated with the display and open screens is freed. However, the buffers that hold the message file, key translation file, and so on, are not released. A subsequent call to sm_initcrt finds them in place. In character-mode,
sm_resetcrtthen clears the screen and turns on the cursor, transmits the
RESETsequence defined in the video file, and resets the operating system channel.
Panther automatically calls
sm_jresetcrtor—in the case of the screen editor—
sm_jxresetcrtas part of its exit processing. These two functions should not be called by application programs except in case of abnormal termination.
/* If an effort to read the first form results in
* failure, clean up the screen and leave. */
if (sm_r_form("first") < 0)