Outputs an attribute string for a printer formatter.
None (linked with the pioformat formatter driver)
#include <piostruct.h>
piocmdout (attrname, fileptr, passthru, NULL)
char * attrname;
FILE * fileptr;
int passthru;
The piocmdout subroutine retrieves the specified attribute string from the Printer Attribute database and outputs the string to standard output. In the course of retrieval, this subroutine also resolves any logic and any embedded references to other attribute strings or integers.
The fileptr and passthru parameters are used to pass data that the formatter does not need to scan (for example, graphics data) from the input data stream to standard output.
attrname | Points to a two-character attribute name for a string. The attribute name must be defined in the database and can optionally have been defined to the piogetvals subroutine as a variable string. The attribute should not be one that has been defined to the piogetvals subroutine as an integer. |
fileptr | Specifies a file pointer for the input data stream. If the piocmdout routine is called from the lineout formatter routine, the fileptr value should be the fileptr passed to the lineout routine as a parameter. Otherwise, the fileptr value should be stdin. If the passthru parameter is 0, the fileptr parameter is ignored. |
passthru | Specifies the number of bytes to be passed to standard output unmodified from the input data stream specified by the fileptr parameter. This occurs when the %x escape sequence is found in the attribute string or in a string included by the attribute string. If no %x escape sequence is found, the specified number of bytes is read from the input data stream and discarded. If no bytes are to be passed through, the passthru parameter should be 0. |
Upon successful completion, the piocmdout subroutine returns the length of the constructed string.
If the piocmdout subroutine detects an error, it issues an error message and terminates the print job.
The lineout subroutine, piogetvals subroutine.
Understanding Embedded References in Printer Attribute Strings in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts
Adding a New Printer Type to Your System in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.
Example of Print Formatter in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.