cdds_offset - field offset within DDS type
SYNOPSIS
#include "cdds.h"
int cdds_offset(bin_tag, field_tag);
-
BIN_TAG bin_tag
FIELD_TAG field_tag
DESCRIPTION
This function returns the byte offset of a field within a DDS binary.
INPUT
bin_tag is a binary tag, previously obtained from
cdds_open.
It specifies a particular binary stream.
field_tag is a tag that identifies a field within bin_tag.
OUTPUT
The return value is the byte offset of field_tag within
bin_tag, or -1 if an error occurred.
EXAMPLE
-
BIN_TAG bin;
char *buf;
short *RecNum;
...
/* find RecNum field within buf (short int) */
field = cdds_member(bin, 0, "RecNum");
RecNum = (short*)(buf + cdds_offset(bin, field));
SEE ALSO
cdds_index Field index with DDS type
AUTHOR
R. L. Selzler, EPTG (Oct 1995)