1
2
3
4
5
6
7
8
9gd_spf(3)                           GETDATA                          gd_spf(3)
10
11
12

NAME

14       gd_spf — returns the samples per frame for a field in a dirfile
15
16

SYNOPSIS

18       #include <getdata.h>
19
20       unsigned int gd_spf(DIRFILE *dirfile, const char *field_code);
21
22

DESCRIPTION

24       The  gd_spf()  function  queries  a  dirfile(5)  database  specified by
25       dirfile and determines the number of samples per frame  for  the  field
26       field_code.  This information is also available from gd_entry(3).
27
28       The  dirfile  argument  must point to a valid DIRFILE object previously
29       created by a call to gd_open(3).
30
31

RETURN VALUE

33       Upon successful completion, gd_spf() returns a positive  integer  indi‐
34       cating the number of samples per frame for the field specified.  On er‐
35       ror, it returns zero and stores a negative-valued  error  code  in  the
36       DIRFILE  object  which  may  be  retrieved  by  a  subsequent  call  to
37       gd_error(3).  Possible error codes are:
38
39       GD_E_BAD_CODE
40               The field specified by field_code was not found  in  the  data‐
41               base.
42
43       GD_E_BAD_DIRFILE
44               The supplied dirfile was invalid.
45
46       GD_E_DIMENSION
47               A scalar field was found where a vector field was expected.
48
49       GD_E_INTERNAL_ERROR
50               An  internal error occurred in the library while trying to per‐
51               form the task.  This indicates a bug in  the  library.   Please
52               report the incident to the maintainer.
53
54       GD_E_RECURSE_LEVEL
55               Too  many  levels of recursion were encountered while trying to
56               resolve field_code.  This usually indicates a  circular  depen‐
57               dency in field specification in the dirfile.
58
59       A  descriptive  error  string  for the error may be obtained by calling
60       gd_error_string(3).
61
62

HISTORY

64       The get_spf() function appeared in GetData-0.3.0.
65
66       In GetData-0.7.0, this function was renamed to gd_spf().
67
68       In GetData-0.10.0, the error return from this function changed from  -1
69       to a negative-valued error code.
70
71

SEE ALSO

73       gd_entry(3), gd_error(3), gd_error_string(3), gd_open(3), dirfile(5)
74
75
76
77Version 0.10.0                 25 December 2016                      gd_spf(3)
Impressum