1get_nmfields(3)                     GETDATA                    get_nmfields(3)
2
3
4

NAME

6       get_nmfields — report the number of metafields in a dirfile
7

SYNOPSIS

9       #include <getdata.h>
10
11       unsigned int get_nmfields(DIRFILE *dirfile, const char *parent);
12

DESCRIPTION

14       The  get_nmfields() function queries a dirfile(5) database specified by
15       dirfile and returns the number of metafields defined  in  the  database
16       for the parent field specified by parent.
17
18       The  dirfile  argument  must point to a valid DIRFILE object previously
19       created by a call to dirfile_open(3).
20
21

RETURN VALUE

23       Upon successful completion, get_nmfields() returns the  number  of  de‐
24       fined  metafields  for the given parent.  On error, it returns zero and
25       sets the dirfile error to a non-zero error value.  Possible error  val‐
26       ues are:
27
28       GD_E_BAD_CODE
29               The  supplied parent field code was not found, or referred to a
30               metafield itself.
31
32       GD_E_BAD_DIRFILE
33               The supplied dirfile was invalid.
34
35       The dirfile error may be retrieved by calling get_error(3).  A descrip‐
36       tive error string for the last error encountered can be obtained from a
37       call to get_error_string(3).
38

SEE ALSO

40       dirfile(5),   dirfile_open(3),    get_error(3),    get_error_string(3),
41       get_mfield_list(3), get_nfields(3), get_nmfields_by_type(3), get_nmvec‐
42       tors(3)
43
44
45
46Version 0.5.0                   8 December 2008                get_nmfields(3)
Impressum