Determining What Function Is Associated with an Event Code

The get function from event table function, et_getfp() allows you to determine the function that is associated with an event code in an event table. The call for et_getfp() is as follows:

EVENTFP et_getfp(eventcode, ETP)
 
int eventcode;
/* Event code to find associated function for
*/
ETPTR ETP;
/* Event table to search
*/

The event function associated with the specified event code is returned. If a NULLFP is returned, a NULL function pointer is associated with the event code.

For example, the following call returns the function associated with the event code KEY_F1, which is kd_help(), in the form event table (FMETP):

EVENTFP whatis_fp;

whatis_fp = et_getfp(KEY_F1, FMETP);


Home Contents Previous Next