Performs setup processing for the print formatter.
None (provided by the formatter).
The setup subroutine performs the following tasks:
The setup subroutine should not send commands or data to the printer since the formatter driver performs additional error checking when the setup subroutine returns.
|argc||Specifies the number of formatting arguments from the command line (including the command name).|
|argv||Points to a list of pointers to the formatting arguments.|
|passthru||Indicates whether the input data stream should be formatted (the passthru value is 0) or passed through without modification (the passthru value is1). The value for this parameter is the argument value for the -# flag specified to the pioformat formatter driver. If the -# flag is not specified, the passthru value is 0.|
Upon successful completion, the setup subroutine returns one of the following pointers:
Returning a pointer to a shar_vars structure causes the formatter driver to invoke the formatter's lineout function for each line to be printed. Returning a null pointer causes the formatter driver to invoke the formatter's passthru function once instead.
If the setup subroutine detects an error, it uses the piomsgout subroutine to issue an error message. The setup subroutine then invokes the pioexit subroutine with a value of PIOEXITBAD. Note that if the piogetvals, piogetopt, piocmdout, or piogetstr subroutine detects an error, it automatically issues its own error message and terminates the print job.
The piocmdout subroutine, pioexit subroutine, piogetopt subroutine, piogetstr subroutine, piogetvals subroutine, piomsgout subroutine.
The qdaemon daemon.
Understanding Embedded References in Printer Attribute Strings in AIX Kernel Extensions and Device Support Programming Concepts.
Adding a New Printer Type to Your System in AIX Kernel Extensions and Device Support Programming Concepts.
Example of Print Formatter in AIX General Programming Concepts: Writing and Debugging Programs.