ffpos(3C)
ffpos - Positions files opened using flexible file I/O
As shipped in IRIX 6.5.30. Last changed in IRIX 6.5.19.
NAME ffpos - Positions files opened using flexible file I/O SYNOPSIS #include <ffio.h> off_t ffpos (int fd, int cmd, void *arg , int len, struct ffsw *stat); DESCRIPTION The ffpos function provides a way of positioning files opened by ffopen or ffopens (see ffopen(3C)), using flexible file I/O (FFIO). The arguments are as follows: fd Value returned by ffopen or ffopens. cmd Specifies a value defined in header file ffio.h. See the following subsection, VALUES FOR cmd ARGUMENT. arg The type and value of this argument is cmd specific. See preceding descriptions. len If cmd = FP_GETPOS or FP_SETPOS, len specifies the number of Cray words in arg. This parameter is ignored for other values of cmd. stat Pointer to the status return structure. Values for cmd Argument The following values can be used for the cmd argument introduced above. FP_GABS Returns information about the current position in arg, which can later be used by a call to ffpos with cmd = FP_SABS. arg is a pointer to structure fp_abs (defined in header file ffio.h). ffp_nv Number of volumes to position; should always be a positive number. A volume number of 0 indicates no volume positioning is to be performed. ffp_nvs_p Indicates the direction of volume positioning. The following values are defined in header file ffio.h: FP_TPOS_FORW The number of volumes to skip forward, relative to the current position. FP_TPOS_BACK The number of volumes to skip backward, relative to the current position. FP_TPOS_ABS Specifies an absolute volume number, relative to the beginning of the volume identifier list (specified on the tpmnt(1) command.) ffp_vi Name of volume identifier to be mounted. A nonzero ffp_vi field is invalid if ffp_nbs_p is FP_TPOS_FORW or FP_TPOS_BACK or if ffp_nvs is FP_TPOS_FORW or FP_TPOS_BACK and ffp_nv is nonzero. RETURN VALUES If cmd is FP_BSEEK, ffpos returns the new bit position of the file on success. For other values of cmd, the ffpos function returns 0 on success. On failure, it returns -1 and the sw_error field of the stat structure contains the error number. SEE ALSO ffopen(3C) tpmnt(1) in the