1
2
3
4
5
6
7
8
9gd_frameoffset(3) GETDATA gd_frameoffset(3)
10
11
12
14 gd_frameoffset — report the starting frame of fields in a Dirfile
15
16
18 #include <getdata.h>
19
20 off_t gd_frameoffset(DIRFILE *dirfile, int fragment_index);
21
22
24 The gd_frameoffset() function queries a dirfile(5) database specified
25 by dirfile and returns the frame offset (see dirfile-format(5)) for the
26 fragment indexed by fragment_index. The frame offset of a fragment in‐
27 dicate the frame number of the first sample of data stored in binary
28 files associated with RAW fields defined in the specified fragment.
29 The frame offset of a fragment containing no RAW fields is ignored.
30
31 The dirfile argument must point to a valid DIRFILE object previously
32 created by a call to gd_open(3).
33
34
36 Upon successful completion, gd_frameoffset() returns a non-negative in‐
37 teger containing the frame offset of the specified fragment. On error,
38 it returns a negative-valued error code. Possible error codes are:
39
40 GD_E_BAD_DIRFILE
41 The supplied dirfile was invalid.
42
43 GD_E_BAD_INDEX
44 The supplied index was out of range.
45
46 The error code is also stored in the DIRFILE object and may be re‐
47 trieved after this function returns by calling gd_error(3). A descrip‐
48 tive error string for the error may be obtained by calling
49 gd_error_string(3).
50
51
53 The get_frameoffset() function appeared in GetData-0.5.0.
54
55 In GetData-0.7.0, this function was renamed to gd_frameoffset().
56
57 In GetData-0.10.0, the error return from this function changed from -1
58 to a negative-valued error code.
59
60
62 gd_alter_frameoffset(3), gd_error(3), gd_error_string(3), gd_open(3),
63 dirfile(5), dirfile-format(5)
64
65
66
67Version 0.10.0 25 December 2016 gd_frameoffset(3)