Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ Cif_Release(3) — Sun WorkShop 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Cif(3)

Cif_Close(3)

Cif_Duplicate(3)

Cif_Errstring(3)

Cif_Free(3)

Cif_Getpos(3)

Cif_Getrecord(3)

Cif_Memmode(3)

Cif_Msginsert(3)

Cif_Open(3)

Cif_Setpos(3)

Cif_Getfiledir(3)

Cif_Getunitdir(3)

Cif_Recgroup(3)

cifconv(1)

CIF_RELEASE(3)

NAME

Cif_Release - Frees memory that is associated with a CIF

SYNOPSIS

#define CIF_VERSION 2
#include <cif.h>
 int Cif_Release (cifd, freemode)
int freemode;

IMPLEMENTATION

All Sun SPARC systems

DESCRIPTION

The Cif_Release routine releases all memory that is currently associated with the specified CIF.  The CIF is identified by the descriptor cifd.  The descriptor is assigned by the Cif_Open(3) routine and must be used for all subsequent references to the CIF, including references made by Cif_Release. 

The Cif_Release routine can be used only with CIFs that have a memory management mode of CIF_MEM_MANAGED.  You can set the memory management mode for a CIF by using the Cif_Memmode(3) routine. 

The Cif_Release routine accepts the following arguments:

cifd Specifies the CIF to use. 

freemode Indicates what should be done with the memory that is associated with the specified file. 

The following actions may be taken:

CIF_MEM_KEEP
Retains space that is associated with the CIF for use with structures from other CIFs.

CIF_MEM_FREE
Releases space that is associated with the CIF by using free().

CIF_VERSION defines the library version.  The default is 1.  The newest version is 2 and should be used with this routine. 

See the Cif(3) man page for a discussion about CIF information, format, and versions. 

RETURN VALUES

A positive return value indicates successful completion.  A negative return value indicates that an error occurred. 

EXAMPLES

The following example, when used in a program, releases the structures, but it retains all of the space that is associated with the CIF identified by the descriptor mycif.  int mycif;      .       .       .  (void) Cif_Release (mycif, CIF_MEM_KEEP);      .       .       . 

SEE ALSO

Cif(3) for general information about CIFs
Cif_Close(3), Cif_Duplicate(3), Cif_Errstring(3), Cif_Free(3), Cif_Getpos(3), Cif_Getrecord(3), Cif_Memmode(3), Cif_Msginsert(3), Cif_Open(3), Cif_Setpos(3) for information about general CIF library routines
Cif_Getfiledir(3), Cif_Getunitdir(3), Cif_Recgroup(3) for information about binary-format specific CIF library routines

cifconv(1) for information about ASCII to binary format conversion in the

Compiler information file CIF Compiler information Compiler listings

SunOS 3.0.1  —  Last change:

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