NAME Cif_Getpos, Cif_Setpos - Retrieves or sets the current posi- tion 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 argu- ment 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 rou- tine. See the Cif(3) man page for a discussion about CIF informa- tion, format, and versions. RETURN VALUES If the return value is positive, it is a valid file posi- tion; 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 informa- tion about general CIF library routines Cif_Getfiledir(3), Cif_Getunitdir(3), Cif_Recgroup(3) for information about binary format specific CIF library rou- tines cifconv(1) for information about ASCII to binary format conversion in the Compiler information file CIF Compiler information Compiler listings
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |