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

piogetstr Subroutine

Purpose

Retrieves an attribute string for a printer formatter.

Library

None (linked with the pioformat formatter driver)

Syntax

#include <piostruct.h>

piogetstr (attrname, bufrptr, bufsiz, NULL)
char * attrname,* bufptr;
int bufsiz;

Description

The piogetstr subroutine retrieves the specified attribute string from the Printer Attribute database and returns the string to the caller. In the course of retrieval, this subroutine also resolves any logic and any embedded references to other attribute strings or integers.

Parameters

attrname Points to a two-character attribute name for a string. The attribute name must be defined in the database. It may optionally have been defined to the piogetvals subroutine as a variable string. The attribute should not be one that has been defined to the piogetvals subroutine as an integer.
bufptr Points to where the constructed attribute string is to be stored.
bufsiz Specifies the amount of memory that is available for storage of the string.
Note: The fourth parameter is reserved for future use. This parameter should be a NULL pointer.

Return Values

Upon successful completion, the piogetstr subroutine returns the length of the constructed string. The null character placed at the end of a constructed string by the piogetstr subroutine is not included in the length.

If the piogetstr subroutine detects an error, it issues an error message and terminates the print job.

Related Information

The piogetvals 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 ]