1get_nframes(3) GETDATA get_nframes(3)
2
3
4
6 get_nframes — report the size of a dirfile
7
9 #include <getdata.h>
10
11 off_t get_nframes(DIRFILE *dirfile);
12
14 The get_nframes() function queries a dirfile(5) database specified by
15 dirfile and returns the number of frames in the database. Since dif‐
16 ferent fields may have differing number of frames, the Dirfile Stan‐
17 dards (see dirfile(5)) dictate that the number of frames in the data‐
18 base is defined to be equal to the number of frames in the first raw
19 field specified in the format file.
20
21 If no vector fields are defined in the database, get_nframes() returns
22 zero and succeeds.
23
24 The dirfile argument must point to a valid DIRFILE object previously
25 created by a call to dirfile_open(3).
26
27
29 Upon successful completion, get_nframes() returns the number of frames
30 in the dirfile. On error, it returns zero and sets the dirfile error
31 to a non-zero error value. Possible error values are:
32
33 GD_E_BAD_DIRFILE
34 The supplied dirfile was invalid.
35
36 GD_E_RAW_IO
37 An attempt to stat(2) the file associated with first raw field
38 defined in the format failed.
39
40 GD_E_UNSUPPORTED
41 Reading from dirfiles with the encoding scheme of the specified
42 dirfile is not supported by the library. See dirfile-encod‐
43 ing(5) for details on dirfile encoding schemes.
44
45 The dirfile error may be retrieved by calling get_error(3). A descrip‐
46 tive error string for the last error encountered can be obtained from a
47 call to get_error_string(3).
48
50 dirfile(5), dirfile-encoding(5), dirfile_open(3), getdata(3), get_er‐
51 ror(3), get_error_string(3)
52
53
54
55Version 0.5.0 8 December 2008 get_nframes(3)