Resource exit
You can use a resource exit in ACIF to filter
resources so they are not included in the resource file. If you want to exclude a
specific type of resource (for example, an overlay), you can control it with the RESTYPE
parameter. This exit is useful in controlling resources at the file name level. For
example, assume that you are going to send ACIF output to InfoPrint Manager and you
only wanted to send those fonts that were not included with the InfoPrint Manager
product. You can code this exit program to contain a table of all fonts included with
InfoPrint Manager and filter those fonts from the resource file. Security is another
consideration for using this exit because you can prevent certain named resources
from being included. The program that is run by this exit is defined by the RESEXIT
parameter.
This exit receives control before a resource is read from a library. The exit program can request that the resource is processed or ignored (skipped), but it cannot substitute another resource name in place of the requested one. If the exit requests that any overlay to be ignored, ACIF automatically ignores any resources the overlay references (that is, fonts and page segments).
AIX or Windows sample resource exit C language header contains a sample C language header that describes the control block that is passed to the AIX or Windows exit program.
AIX or Windows sample resource exit C language header
typedef struct _RESEXIT_PARMS/*Parameters for the resource record exit */ { char *work; /*Address of 16-byte static work area */ PFATTR *pfattr; /*Address print file attribute information*/ char resname[8];/*Name of requested resource (8 byte) */ char restype; /*Type of resource */ char request; /*Ignore or process the resource */ char eof; /*Last call indicator */ unsigned short resnamel; /*Length of resource name */ char pad1[3]; /*Padding byte */ char resnamf[250];/*Resource name if more than 8 bytes */ } RESEXIT_PARMS;
The address of the control block that contains the following parameters is passed to the resource exit. For AIX and Windows, the address is passed by the first