Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xil_storage_set_name(3) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_storage_create(3)

xil_storage_get_by_name(3)

NAME

xil_storage_get_by_name, xil_storage_get_name, xil_storage_set_name − get and set a storage object name and get a handle to a storage object  by specifying a name

SYNOPSIS

#include <xil/xil.h>

XilStorage xil_storage_get_by_name (XilSystemState State,

char ∗name);

char∗ xil_storage_get_name (XilStorage storage);

void xil_storage_set_name (XilStorage storage,

char ∗name);

DESCRIPTION

Use these functions to assign names to storage objects, to read a storage object’s name, and to retrieve storage objects by name. 

xil_storage_get_by_name() returns the handle to the storage object with the specified name.  If such a storage object does not exist, NULL is returned.  xil_storage_get_by_name () does not make a copy of the storage object.

xil_storage_get_name() returns a copy of the specified storage object’s name. A call to free (3) should be used to free the space allocated by xil_storage_get_name() If the specified storage object has no name, NULL is returned.

xil_storage_set_name() sets the name of the specified storage object to the one provided.

ERRORS

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

EXAMPLES

Create a storage object associated with my_image and call it "my_image’s storage". Then create a storage object associated with your_image and call it "your image’s storage" :

XilSystemState State;
XilImage my_image;
XilImage your_image;
XilStorage storage1;
XilStorage storage2;
my_image = xil_create(State,64,64,3,XIL_BYTE);
your_image = xil_create(State,64,64,3,XIL_BYTE);
       .... load data into my_image and your_image......
 storage1 = xil_storage_create(State,my_image);
storage2 = xil_storage_create(State,your_image);
xil_storage_set_name(storage1, "my_image’s storage");
xil_storage_set_name(storage2, "your_image’s storage");

NOTES

If you give two storage objects the same name, it is not defined which storage object will be retrieved by a call to xil_storage_get_by_name().

SEE ALSO

xil_storage_create(3). 

SunOS 5.6  —  Last change: 01 January 1997

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