Programming Guide


Flushes delayed writes to the display

void sm_flush(void);


sm_flush performs delayed writes and flushes all buffered output to the display. It is called automatically by sm_input when the keyboard is opened and there are no keystrokes available—that is, typed ahead.

Frequent calls to this function can significantly slow execution. Because it is called whenever the keyboard opens, the display is always up to date before data entry occurs.

You must use this function if you want timed output or other non-interactive display.


#include <smdefs.h>

/* Update a system time field once per second,
* until a key is pressed. */

while (!sm_keyhit(10))
sm_n_putfield("time_now", "");

/* ...process the key */

See Also

sm_m_flush, sm_rescreen