IBM S544-5285-01 Printer User Manual


 
For more information on using and modifying these programs, refer to the prolog of
the asciinp.c source file that is provided with PSF for AIX in the /usr/lpp/psf/acif
directory.
Index Record Exit
ACIF provides an exit that allows you to modify or ignore the records that ACIF
writes in the index object file. The program invoked at this exit is defined by the
ACIF indxexit parameter.
This exit receives control before a record (structured field) is written to the index
object file. The exit program can request that the record be ignored or processed.
The largest record that can be processed is 32752 bytes (this does not include the
record descriptor word).
Figure 15 contains a sample C language header that describes the control block
that is passed to the exit program.
typedef struct _INDXEXIT_PARMS /ᑍ Parameters for the index record exit ᑍ/
{
char ᑍwork; /ᑍ Address of 16-byte static work area ᑍ/
PFATTR ᑍpfattr; /ᑍ Address of print file attribute information ᑍ/
char ᑍrecord; /ᑍ Address of the record to be written ᑍ/
unsigned short recordln; /ᑍ Length of the output index record ᑍ/
char request; /ᑍ Delete or process the record ᑍ/
char eof; /ᑍ Last call indicator to ACIF ᑍ/
} INDXEXIT_PARMS;
Figure 15. Sample Index Record Exit C Language Header
The address of the control block containing the following parameters is passed to
the index record exit:
work (Bytes 1–4)
A pointer to a static, 16-byte memory block. The exit program can use this
parameter to save information across calls (for example, pointers to work
areas). The 16-byte work area is aligned on a full word boundary and is
initialized to binary zeros prior to the first call. The user-written exit program
must provide the code required to manage this work area.
pfattr (Bytes 5–8)
A pointer to the print file attribute data structure. See “Attributes of the Input
Print File” on page 74 for more information on the format of this data structure
and the information it contains.
record (Bytes 9–12)
A pointer to the first byte of the index record including the carriage control
character. The record resides in a 32KB (where KB equals 1024 bytes) buffer.
The buffer resides in storage allocated by ACIF, but the exit program is allowed
to modify the index record.
recordln (Bytes 13–14)
Specifies the length, in bytes, of the index record. If the index record is
modified, this parameter must also be updated to reflect the actual length of the
record.
Chapter 4. User Exits and Attributes of the Input Print File in AIX 69