DDS Developers Documentation → "C" API → lseek8


Index
cdds_addaxis
cdds_align
cdds_axis_prod
cdds_binfd
cdds_calloc
cdds_check
cdds_close
cdds_closepr
cdds_closepr2
cdds_copy
cdds_count
cdds_datadefn
cdds_dict
cdds_errors
cdds_fflush
cdds_free
cdds_genus
cdds_get
cdds_history
cdds_in
cdds_index
cdds_info
cdds_initmpi
cdds_initmpix
cdds_initopenmp
cdds_isreg
cdds_key
cdds_lseek
cdds_lseek8
cdds_malloc
cdds_map
cdds_member
cdds_memuse
cdds_mod
cdds_name
cdds_newer
cdds_next
cdds_object
cdds_offset
cdds_open
cdds_openm
cdds_openpr
cdds_out
cdds_parent
cdds_prec
cdds_prev
cdds_prime
cdds_printf
cdds_printt
cdds_printv
cdds_prtcon
cdds_prterr
cdds_prthdr
cdds_prtmsg
cdds_put
cdds_read
cdds_readm
cdds_realloc
cdds_rmaxis
cdds_savepr
cdds_scale
cdds_scanf
cdds_scank
cdds_scant
cdds_scantn
cdds_scanv
cdds_switch
cdds_write
cdds_writem
setargcv

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

SYNOPSIS

#include "cdds.h"

long cdds_lseek8(bin , tag, offset, whence);

BIN_TAG bin
FIELD_TAG tag
long long offset
int whence

[ Input | Output | Examples ]


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 cdds_open. It specifies a particular binary stream.

tag is a field tag which specifies a tag associated with bin. This provides an offset relative to an absolute origin as 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 integral number of bytes relative to the absolute origin. Note that if bin was opened with the convenience routine cddx_in, offset will be in terms of traces. If bin was opened with the api routine cdds_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

BIN_TAG bin;
...
/* Assuming bin was opened with cddx_in, skips next 10000000 target types (traces) */
cdds_lseek8(bin, 0, +10000000L, SEEK_CUR);
        

AUTHOR

R. L. Selzler, EPTG (Oct 1995)
For additional help, open an issue here
i