Programming Guide



sm_isabort

Tests and sets the abort control flag

#include <smumisc.h>
int sm_isabort(int flag);

flag
The flag to set for abort control, one of the following defined in smumisc.h:

ABT_ON
Set abort flag.

ABT_OFF
Clear abort flag.

ABT_DISABLE
Turn abort reporting off.

ABT_NOCHANGE
Do not alter the flag.

Returns

Description

sm_isabort sets the abort flag to the value of flag and returns the old value. Abort reporting provides a quick way out of processing in the Panther library, which otherwise might involve nested calls to sm_input. The triggering event is the detection of an abort condition by sm_getkey, either an ABORT keystroke, or a call to this function with ABT_ON—for example, from an asynchronous function.

Example

#include <smdefs.h>

/* Establish an abort condition */

sm_isabort(ABT_ON);

/* Verify that an abort condition exists, without
* altering it. */

if (sm_isabort(ABT_NOCHANGE) == ABT_ON)
...