CIF_DUPLICATE(3)
NAME
Cif_Duplicate - Duplicates a compiler information file (CIF) structure
SYNOPSIS
#define CIF_VERSION 2
#include <cif.h>
struct Cif_generic ∗Cif_Duplicate (cif_structure)
struct Cif_generic ∗cif_structure;
IMPLEMENTATION
All Sun SPARC systems
DESCRIPTION
The Cif_Duplicate routine copies an existing CIF structure into newly allocated memory. The new copy exists independently of the memory management mode that is active for the source CIF. You can release the memory associated with the new structure by using the Cif_Free(3) routine.
The Cif_Duplicate routine accepts the following argument:
∗cif_structure Points to an existing, valid generic structure.
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
The Cif_Duplicate routine returns a pointer to the new structure if the duplication operation completes successfully; otherwise, it returns a NULL value.
EXAMPLES
The following example, when used in a program, copies an existing structure into newly allocated memory. It is assumed that ∗rptr1 points to a valid structure. ∗rptr2 points to the copy of the structure produced by Cif_Duplicate. struct Cif_generic ∗rptr1, ∗rptr2; . . . rptr2 = Cif_Duplicate (rptr1); . . .
SEE ALSO
Cif(3) for general information about CIFs
Cif_Close(3), Cif_Errstring(3), Cif_Free(3), Cif_Getpos(3), Cif_Getrecord(3), Cif_Memmode(3), Cif_Msginsert(3), Cif_Open(3), Cif_Release(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: