Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ Cif_Getpos(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_Getrecord(3)

Cif_Memmode(3)

Cif_Msginsert(3)

Cif_Open(3)

Cif_Release(3)

Cif_Getfiledir(3)

Cif_Getunitdir(3)

Cif_Recgroup(3)

cifconv(1)

CIF_GETPOS(3)

NAME

Cif_Getpos, Cif_Setpos - Retrieves or sets the current position of a CIF

SYNOPSIS

#define CIF_VERSION 2
#include <cif.h>
 long Cif_Getpos (cifd)
int cifd;
 int Cif_Setpos (cifd, cifpos)
int cifd;
long cifpos;

IMPLEMENTATION

All Sun SPARC systems

DESCRIPTION

The Cif_Getpos routine retrieves the current record position of a CIF.  This position can be used in a subsequent call to Cif_Setpos to position the CIF to a particular record. 

The Cif_Setpos routine sets a CIF to the record position cifpos.  The Cif_Getpos routine must have returned this record position. 

These routines accept the following options:

cifd Specifies a descriptor that identifies the CIF.  The descriptor is assigned by the Cif_Open routine and must be used for all subsequent references to the CIF, including references made by Cif_Getpos and Cif_Setpos. 

cifpos Specifies the record position of the CIF.  This argument can be used only with the Cif_Setpos routine. 

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

If the return value is positive, it is a valid file position; otherwise, it indicates an error condition. 

EXAMPLES

The following examples show how to use the Cif_Getpos and Cif_Setpos routines. 

Example 1:  The following example, when used in a program, returns the current position in the CIF that is identified by the descriptor mycif.  The descriptor is assigned by the Cif_Open routine.  int mycif; long myposition;      .       .       .  myposition = Cif_Getpos (mycif);      .       .       .  Example 2:  The following example, when used in a program, sets the position in the CIF that is identified by the descriptor mycif to the position returned by the Cif_Getpos routine shown in the previous example.  int mycif; long myposition;      .       .       .  (void) Cif_Setpos (mycif, myposition);      .       .       . 

SEE ALSO

Cif(3) for general information about CIFs
Cif_Close(3), Cif_Duplicate(3), Cif_Errstring(3), Cif_Free(3), Cif_Getrecord(3), Cif_Memmode(3), Cif_Msginsert(3), Cif_Open(3), Cif_Release(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