Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xil_get_attribute(3) — Solaris 2.4 x86 SDK

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_get_device_attribute(3)

xil_set_device_attribute(3)

xil_cis_get_attribute(3)

xil_cis_set_attribute(3)

xil_get_attribute(3)

NAME

xil_get_attribute, xil_set_attribute − get and set the client attributes of images

SYNOPSIS

#include <xil/xil.h>

int xil_get_attribute (XilImage image,

char ∗attribute,
void ∗∗value);

int xil_set_attribute (XilImage image,

char ∗attribute,
void ∗value);

DESCRIPTION

These routines get and set values of client attributes of images.  Names of the attributes can be arbitrarily assigned and are simply saved for later retrieval.  attribute is the name of the attribute whose value is to be retrieved or set.  value is the status of the specified attribute. 

xil_get_attribute() returns XIL_SUCCESS if the attribute is available, and XIL_FAILURE if the specified attribute is not available.

xil_set_attribute() returns XIL_SUCCESS if the attribute is successfully set, and XIL_FAILURE otherwise.

ERRORS

For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide. 

EXAMPLES

Set the date that a photograph was taken:

XilImage image;
char ∗attribute;
status = xil_set_attribute (image, "DATE", (void ∗)date);
if(status==XIL_FAILURE)
   fprintf(stderr,"Failed to set DATE attribute0);

Get the favorite ice cream flavor of the person in the photograph:

XilImage image;
char ∗attribute;
status = xil_get_attribute (image, "favorite flavor", (void ∗∗)&(flavor));
if(status==XIL_FAILURE)
   fprintf(stderr,"Failed to get flavor attribute0);

NOTES

These functions are not intended to to be used as a database interface.  If the image does not contain the specified attribute, the parent is searched for the attribute, then the parent’s parent is searched, and so on, until there are no more parents. 

SEE ALSO

xil_get_device_attribute(3), xil_set_device_attribute(3), xil_cis_get_attribute(3), xil_cis_set_attribute(3). 

SunOS   —  Last change: 17 August 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026