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

Item Description
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.