Ricoh InfoPrint Pro C900AFP InfoPrint Manager - Page 91
Output record exit, asciinp.c, usr/lpp/psf/acif, outexit, line2afp, work Bytes 1-4, pfattr Bytes 5-8
View all Ricoh InfoPrint Pro C900AFP manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 91 highlights
For more information about using and modifying these programs, see the prologue of the asciinp.c source file that is provided with InfoPrint Manager in the /usr/lpp/psf/acif directory. Output record exit Using the output-record exit, you can modify or ignore the records the line-data transform writes into the output file. The program invoked at this exit is defined by the outexit keyword of the line2afp command. The exit receives control before a record (structured field) is written to the output document file. The exit can request that the record be ignored or processed. The largest record that the exit can process is 32752 bytes, not including the record descriptor word. The exit is not called when the line-data transform is processing resources. Figure 3 contains a sample C language header that describes the control block passed to the exit program. typedef struct _OUTEXIT_PARMS /* Parameters for resource 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 record */ char request; /* Delete or process the record */ char eof; /* Last call indicator */ }OUTEXIT_PARMS; Figure 3. Sample output record exit C language header The address of the control block containing these parameters is passed to the output 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 before the first call. A 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 line-data input file" on page 80 for more information about the format of this data structure and the information it contains. record (Bytes 9-12) A pointer to the first byte of the output record. The record is located in a 32KB (where KB equals 1024 bytes) buffer. The buffer is located in storage allocated by the line-data transform, but the exit program is allowed to modify the output record. recordln (Bytes 13-14) Specifies the length, in bytes, of the output record. If the output record is modified, this parameter must also be updated to reflect the actual length of the record. request (Byte 15) Specifies how the line-data transform processes the record. On entry to the exit program, this parameter is X'00'. When the exit program returns control to the line-data transform, this parameter must have the value X'00' or X'01', where: Chapter 6. User-exit programs (PSF, Generalized Fax, and Email DSS only) 77