Programming Guide |
Checks whether a screen is in the saved list
int sm_issv(char *screen_name);
screen_name
- The name of the screen to search in the saved list.
- 1 True: The screen is in the saved list.
sm_issv
searches the list of screens saved in memory for the specified screen. Call this function on screen entry to avoid redundant database queries for previously saved screens:
- On screen exit, call sm_svscreen to add the screen to the save list.
- On screen entry, call
sm_issv
to check the save list, to ascertain whether the screen has already been displayed.
/* Perform database query only once */
/* on the screen "results". */
if (!sm_issv("results"))
{
/* do query . . .*/
sm_svscreen(screen_list, 1);
}