Closes the current windowint sm_close_window(void);
sm_close_windowcloses a screen opened as a window by sm_r_window, sm_r_at_cur, or one of their variants.
sm_close_windowerases the currently open window and restores the screen to its state before the window opened. If LDB processing is active,
sm_lstorewrites data from the named fields to the LDB; otherwise, all window data is lost. If the closed window was spawned by another one, Panther makes the parent window the current one and restores the cursor to its last position in that window.
Panther automatically calls
sm_close_windowwhen you close a form with sm_jclose.
sm_jclosecalls sm_jform to pop the form stack and calls
sm_close_windowto empty the form's window stack.
sm_close_windowdoes not close the base screen in a window stack—that is, the active form. To close the active form, call sm_jclose.
/* In a validation function, if the field contains a */
/* special value, open up a window to prompt for a */
/* second value and save it in another field. */
int validate (field, data, occur, bits)
int field, occur, bits;
if (bits & VALIDED)
if (strcmp(data, "other") == 0)
if (sm_input(IN_DATA) != EXIT)
buf = 0;