ToolTalk User's Guide

Undeclaring Process Types

There may be cases when you need to retract a declared ptype; for example, in the CASE environment:

To unregister a ptype, use tt_ptype_undeclare. This call reverses the effect of the tt_ptype_declare call; that is, all patterns generated from the ptype are unregistered and the process is removed from the session's list of active processes with this ptype. This call returns a status of TT_ERR_PTYPE if the named ptype was not declared by the calling process.


Caution - Caution -

One invocation of tt_type_undeclare will completely unregister the ptype regardless of how many times the process has declared the ptype; that is, multiple declarations of the ptype are the same as declaring it once.


Example 10-1 is an example of how to retract a a declared ptype.


Example 10-1 Undeclaring a Ptype

/*

 * Obtain procid
 */
tt_open();

/*

 * Undeclared Ptype

 */
tt_ptype_undeclare(ptype);