gd_spf(3)

NAME
gd_spf — returns the samples per frame for a field in a dirfile

SYNOPSIS
#include <getdata.h>

unsigned int gd_spf(DIRFILE *dirfile, const char *field_code);

DESCRIPTION
The function queries a dirfile(5) database specified by and determines the number of samples per frame for the field This information is also available from The argument must point to a valid DIRFILE object previously created by a call to

RETURN VALUE
Upon successful completion, returns a positive integer indicating the number of samples per frame for the field specified. On error, it returns zero and stores a negative-valued error code in the DIRFILE object which may be retrieved by a subsequent call to Possible error codes are: The field specified by was not found in the database. The supplied dirfile was invalid. A scalar field was found where a vector field was expected. An internal error occurred in the library while trying to perform the task. This indicates a bug in the library. Please report the incident to the maintainer. Too many levels of recursion were encountered while trying to resolve This usually indicates a circular dependency in field specification in the dirfile.

A descriptive error string for the error may be obtained by calling

HISTORY
The function appeared in GetData-0.3.0. In GetData-0.7.0, this function was renamed to In GetData-0.10.0, the error return from this function changed from -1 to a negative-valued error code.

SEE ALSO
dirfile(5)