[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 2

restore Subroutine


Restores the printer to its default state.


None (provided by the formatter)


#include <piostruct.h>
int restore ()


The restore subroutine is invoked by the formatter driver after either the lineout subroutine or the passthru subroutine has reported that printing has completed.

If the -J flag passed from the command line has a nonzero value (True), the initialize subroutine should use the piocmdout subroutine to send a command string to the printer to restore the printer to its default state. This default state is defined by the attribute values in the database. Any variables referenced by the command string should be values from the database that have not been overridden by values from the command line. This can be accomplished by placing a %o escape sequence at the beginning of the command string.

Return Values

A return value of 0 indicates a successful operation. If the restore subroutine detects an error, it uses the piomsgout subroutine to issue an error message. The restore subroutine then invokes the pioexit subroutine with a value of PIOEXITBAD. If either the piocmdout or piogetstr subroutines detect an error, then the subroutine that detects the error issues an error message and terminates the print job.

Related Information

The initialize subroutine, lineout subroutine, passthru subroutine, piocmdout subroutine, pioexit subroutine, piogetstr subroutine.

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.

[ Previous | Next | Contents | Home | Search ]