IBM Version 4 Universal Remote User Manual


 
memcpy(exit_pgm_lib,
((Qus_EXTI2_Entry_t ᑍ)rcv_ptr)Program_Library,1);
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ Resolve to the exit program. If an error occurs on the ᑍ/
/ᑍ resolve operation to the library, the rsl_ok indicator is ᑍ/
/ᑍ set to failed in the RSL_PGM_HDLR exception handler. ᑍ/
/ᑍ The RSLVSP MI instruction signals all errors to this ᑍ/
/ᑍ program; therefore, enable the exception handler to ᑍ/
/ᑍ capture any errors that may occur. ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
#pragma exception_handler (RSLVSP_PGM_HDLR,rsl_ok,,_C2_MH_ESCAPE)
exit_pgm_ptr=((Pgm_OS ᑍ)rslvsp(_Program,
exit_pgm_name,
exit_pgm_lib,
_AUTH_POINTER));
#pragma disable_handler
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ If the resolve is successful, call the exit program. ᑍ/
/ᑍ If not, move on to the next exit program. ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
if (rsl_ok)
{
exit_pgm_ptr(info_for_exit_pgm);
}
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ Set the receiver variable to point to the next exit program ᑍ/
/ᑍ that is returned. ᑍ/
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
rsl_ok=1;
rcv_ptr=rcv_var +
((Qus_EXTI2_Entry_t ᑍ)rcv_ptr)Offset_Next_Entry;
}
Registration Facility Using ILE APIs—Examples
Following are the entire program listings for the ILE C programs discussed in the
preceding topics. The programs perform the following tasks:
Register an exit point and add an exit program
Retrieve exit point and exit program information
Remove an exit program and deregister an exit point
These example programs are also shown in additional languages in “Integrated
Language Environment (ILE) APIs—Examples” on page B-47.
Register Exit Point and Add Exit Program—ILE C Example
The following program registers an exit point with the registration facility and adds
an exit program to the exit point.
/ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ/
/ᑍ PROGRAM: Register an Exit Point ᑍ/
/ᑍ Add an Exit Program ᑍ/
/ᑍ ᑍ/
/ᑍ LANGUAGE: ILE C ᑍ/
Chapter 4. Common Information across APIs—Advanced (ILE) Example 4-9