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

NAME

14       gd_bof — find the start of data in a Dirfile field
15
16

SYNOPSIS

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

DESCRIPTION

24       The  gd_bof()  function  queries  a  dirfile(5)  database  specified by
25       dirfile and finds the beginning-of-field marker for  the  vector  field
26       given by field_code.
27
28       The  caller  should not assume that the beginning-of-field marker falls
29       on a frame boundary.  The beginning-of-field marker is never negative.
30
31       For a RAW field, the beginning-of-field corresponds to the frame offset
32       of  that  field (see gd_frameoffset(3)).  The beginning-of-field marker
33       of the special field INDEX is zero.
34
35       The beginning-of-field of a PHASE field is  the  beginning-of-field  of
36       its  input  adjusted  by the PHASE field's shift (or zero, if the shift
37       would make it negative).  The beginning-of-field for all  other  vector
38       fields is the the latest beginning-of-field of any of its input fields.
39
40       If  the  beginning-of-field marker of a field is greather than or equal
41       to its end-of-field marker (see gd_eof(3)), then that field contains no
42       data.  For a RAW field, the difference between the locations of the be‐
43       ginning- and end-of-field markers indicates the number  of  samples  of
44       data actually stored on disk.
45
46       The  dirfile  argument  must point to a valid DIRFILE object previously
47       created by a call to gd_open(3).
48
49

RETURN VALUE

51       Upon successful completion, gd_bof()  returns  a  non-negative  integer
52       which  is  the  sample  number of the beginning-of-field marker for the
53       specified field.  On error, it returns a  negative-valued  error  code.
54       Possible error codes are:
55
56       GD_E_BAD_CODE
57               The  field specified by field_code or one of the fields it uses
58               as input was not found in the database.
59
60       GD_E_BAD_DIRFILE
61               The supplied dirfile was invalid.
62
63       GD_E_DIMENSION
64               A scalar field was found where a vector field was  expected  in
65               the  definition  of  field_code  or  one of its inputs, or else
66               field_code itself specified a scalar field.
67
68       GD_E_INTERNAL_ERROR
69               An internal error occurred in the library while trying to  per‐
70               form  the  task.   This indicates a bug in the library.  Please
71               report the incident to the GetData developers.
72
73       GD_E_RECURSE_LEVEL
74               Too many levels of recursion were encountered while  trying  to
75               resolve  field_code.   This usually indicates a circular depen‐
76               dency in field specification in the dirfile.
77
78       The error code is also stored in the DIRFILE  object  and  may  be  re‐
79       trieved after this function returns by calling gd_error(3).  A descrip‐
80       tive  error  string  for  the  error  may  be   obtained   by   calling
81       gd_error_string(3).
82
83

HISTORY

85       The gd_bof() function appeared in GetData-0.7.0.
86
87       Before  GetData-0.10.0,  this  function  could also fail with the error
88       code GD_E_ALLOC.
89
90       In GetData-0.10.0, the error return from this function changed from  -1
91       to a negative-valued error code.
92
93

SEE ALSO

95       gd_eof(3),    gd_error(3),    gd_error_string(3),    gd_frameoffset(3),
96       gd_open(3), dirfile(5), dirfile-encoding(5)
97
98
99
100Version 0.10.0                 25 December 2016                      gd_bof(3)
Impressum