1get_nmfields_by_type(3)             GETDATA            get_nmfields_by_type(3)
2
3
4

NAME

6       get_nmfields_by_type — report the number of fields of a given type in a
7       dirfile
8

SYNOPSIS

10       #include <getdata.h>
11
12       unsigned int get_nmfields_by_type(DIRFILE *dirfile, const char *parent,
13              gd_entype_t type);
14

DESCRIPTION

16       The get_nmfields_by_type() function queries a dirfile(5) database spec‐
17       ified by dirfile and returns the number of metafields  defined  in  the
18       database for the supplied parent field.
19
20       The  dirfile  argument  must point to a valid DIRFILE object previously
21       created by a call to dirfile_open(3).  The type argument should be  one
22       of the following symbols indicating the type of field to count:
23
24              GD_LINCOM_ENTRY, GD_LINTERP_ENTRY, GD_BIT_ENTRY,
25              GD_MULTIPLY_ENTRY, GD_PHASE_ENTRY, GD_CONST_ENTRY,
26              GD_STRING_ENTRY, GD_INDEX_ENTRY
27
28

RETURN VALUE

30       Upon  successful  completion, get_nmfields_by_type() returns the number
31       of defined metafields for the given parent.  On error, it returns  zero
32       and  sets  the dirfile error to a non-zero error value.  Possible error
33       values are:
34
35       GD_E_BAD_CODE
36               The supplied parent field code was not found, or referred to  a
37               metafield itself.
38
39       GD_E_BAD_DIRFILE
40               The supplied dirfile was invalid.
41
42       The dirfile error may be retrieved by calling get_error(3).  A descrip‐
43       tive error string for the last error encountered can be obtained from a
44       call to get_error_string(3).
45

SEE ALSO

47       dirfile(5),    dirfile_open(3),    get_error(3),   get_error_string(3),
48       get_mfield_list_by_type(3), get_nmfields(3), get_nfields_by_type(3)
49
50
51
52Version 0.5.0                   8 December 2008        get_nmfields_by_type(3)
Impressum