1get_nfields(3) GETDATA get_nfields(3)
2
3
4
6 get_nfields — report the number of fields in a dirfile
7
9 #include <getdata.h>
10
11 unsigned int get_nfields(DIRFILE *dirfile);
12
14 The get_nfields() function queries a dirfile(5) database specified by
15 dirfile and returns the number of fields defined in the database. No‐
16 tably, this count does not include /META fields.
17
18 The dirfile argument must point to a valid DIRFILE object previously
19 created by a call to dirfile_open(3).
20
21
23 Upon successful completion, get_nfields() returns the number of defined
24 fields in the dirfile. On error, it returns zero and sets the dirfile
25 error to a non-zero error value. Possible error values are:
26
27 GD_E_BAD_DIRFILE
28 The supplied dirfile was invalid.
29
30 The dirfile error may be retrieved by calling get_error(3). A descrip‐
31 tive error string for the last error encountered can be obtained from a
32 call to get_error_string(3).
33
35 dirfile(5), dirfile_open(3), getdata(3), get_error(3), get_er‐
36 ror_string(3), get_field_list(3), get_nfields_by_type(3), get_nm‐
37 fields(3), get_nvectors(3)
38
39
40
41Version 0.5.0 8 December 2008 get_nfields(3)