1get_mfield_list(3)                  GETDATA                 get_mfield_list(3)
2
3
4

NAME

6       get_mfield_list — retrieve a list of fields in a dirfile
7

SYNOPSIS

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

DESCRIPTION

14       The  get_mfield_list() function queries a dirfile(5) database specified
15       by dirfile and returns a read-only list of names of the all  metafields
16       for the specified parent field in the database.
17
18       The  dirfile  argument  must point to a valid DIRFILE object previously
19       created by a call to dirfile_open(3).
20
21       The array returned will be de-allocated by a call  to  dirfile_close(3)
22       and should not be de-allocated by the caller.  The list returned should
23       not be assumed to be in any particular order.  The array is  terminated
24       by  a NULL pointer.  The number of strings in the array can be obtained
25       from a call to get_nmfields(3).
26
27       The caller may not modify any strings in the array, or  the  array  it‐
28       self.  Doing so may cause database corruption.  The pointer returned is
29       guaranteed to be valid until get_mfield_list() is called again with the
30       same  arguments,  or  until  the  array  is  deallocated  by  a call to
31       dirfile_close(3).
32
33

RETURN VALUE

35       Upon successful completion, get_mfield_list() returns a pointer  to  an
36       array of strings containing the names of all the metafields of the giv‐
37       en parent.  On error it returns NULL and sets the dirfile  error  to  a
38       non-zero error value.  Possible error values are:
39
40       GD_E_ALLOC
41               The library was unable to allocate memory.
42
43       GD_E_BAD_CODE
44               The  supplied parent field code was not found, or referred to a
45               metafield itself.
46
47       GD_E_BAD_DIRFILE
48               The supplied dirfile was invalid.
49
50       The dirfile error may be retrieved by calling get_error(3).  A descrip‐
51       tive error string for the last error encountered can be obtained from a
52       call to get_error_string(3).
53

SEE ALSO

55       dirfile(5),   dirfile_open(3),   getdata(3),   get_error(3),    get_er‐
56       ror_string(3),     get_mfield_list_by_type(3),     get_mvector_list(3),
57       get_nfields(3)
58
59
60
61Version 0.5.0                   8 December 2008             get_mfield_list(3)
Impressum