[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Kernel and Subsystems Technical Reference, Volume 2

piogetopt Subroutine

Purpose

Overlays default flag values from the database colon file with override values from the command line.

Library

None (linked with the pioformat formatter driver)

Syntax

#include <piostruct.h>
int piogetopt (argc, argv, NULL, NULL)
int argc;
char *argv [];

Description

The piogetopt subroutine should be used by a printer formatter's setup routine to perform these three tasks:

The piogetopt subroutine is supplied by the formatter driver.

The database attribute names for flags with integer arguments must have previously been defined to the formatter driver with the piogetvals subroutine. Based on the information that was provided to the piogetvals subroutine, the piogetopt subroutine takes these three actions:

Parameters

argc Same as the argc parameter received by the formatter's setup routine when it was called by the formatter driver.
argv Same as the argv parameter received by the formatter's setup routine when it was called by the formatter driver.
Note: The third parameter, NULL, is a place holder. The fourth parameter, NULL, is reserved for future use. The fourth parameter should be a NULL pointer.

Return Values

A return value of 0 indicates successful completion. If the piogetopt subroutine detects an error, it issues an error message and terminates the print job.

Related Information

The piogetvals subroutine, setup 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.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]