[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Kernel and Subsystems, 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 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.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]