fdds_lseek8 - seek (8 byte precision) position within DDS binary stream


SYNOPSIS

#include <fdds.h> (fixed-format sources)
#include <f90dds.h> (free-format sources)

integer*8 function fdds_lseek8(bin, tag, offset, whence)

integer bin
integer tag
integer*8 offset
integer whence

DESCRIPTION

This function seeks a new position in a binary stream. Pipe media only supports forward seeks.

INPUT

Bin is a binary tag, previously obtained from fdds_open. It specifies a particular binary stream.

tag is a field tag which specifies a tag associated with bin. This provides an offset from an origin defined by whence. If tag is zero (nominal), it defaults to the target (trace type) associated with bin.

Offset is a position, measured relative to the whence origin. The offset should be an integer number of bytes relative to the absolute origin. Note that if bin was opened with the convenience routine fddx_in, offset will be in terms of traces. If bin was opened with the api routine fdds_in, offset will be in terms of bytes.

whence     seek origin
SEEK_SET   beginning of the file
SEEK_CUR   current file position
SEEK_END   end of the file
    

OUTPUT

The current binary stream position may be changed. The return value is the new offset, or -1 if an error occurred.

EXAMPLES

      integer   :: bin
      integer*8 :: offset, j
      ...
      ! Assuming bin was opened with fddx_in, skips next 10000000 target types (traces)
      offset = 10000000
      j = fdds_lseek8(bin, 0, offset, SEEK_CUR)
    

AUTHOR

R. L. Selzler, EPTG (May, 1994)