Reports |
This appendix explains how to write your own procedure to write or filter report output to a text driver. This function must be installed as a prototyped function; for more information on installation, refer to "Installing Prototyped Functions" in Application Development Guide.
To use an installed output function, specify it in the device file's procedure
statement. Use the obuffsize
statement to specify a buffer size greater than the default of 256 bytes. Refer to Appendix C, "Report Device Configuration Files," for more information on device configuration files.
Arguments |
The output function is declared with two parameters in this order: an integer-type code, and an output buffer.
RW_P_OPEN
RW_P_CLOSE
RW_P_WRITE
Panther calls the function once with RW_P_OPEN
, once per line of output with RW_P_WRITE
, and once with RW_P_CLOSE
.
RW_P_WRITE
, the buffer contains a line of output, terminated by the NEWLINE and NULL characters. Your procedure can modify the contents of the buffer.
Return Values |
Custom output procedures should return one of the codes listed in the following table.
Invoking the Output Procedure |
To use a custom report output procedure, specify the procedure's name in the procedure
parameter of the device configuration file. The default size for the output buffer is 256 bytes. You can specify a different size through the obuffsize
parameter of the device configuration file.