Performs setup processing for the print formatter.
None (provided by the formatter).
#include <piostruct.h>
struct shar_vars *setup (argc, argv,
passthru)
unsigned argc;
char *
argv [ ];
int passthru;
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.
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 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.