1get_parent_fragment(3)              GETDATA             get_parent_fragment(3)
2
3
4

NAME

6       get_parent_fragment  —  retrieve the parent fragment of a fragment in a
7       dirfile
8

SYNOPSIS

10       #include <getdata.h>
11
12       int get_parent_fragment(const DIRFILE *dirfile, int fragment_index);
13

DESCRIPTION

15       The get_parent_fragment() function queries a dirfile(5) database speci‐
16       fied  by  dirfile  and returns the index of the fragment which contains
17       the INCLUDE directive for the fragment indexed by fragment_index.
18
19       Since the primary format file fragment is not  included  in  any  other
20       fragment, passing zero for fragment_index will result in an error.
21
22

RETURN VALUE

24       On  success,  get_parent_fragment()  returns the index of the specified
25       fragment's parent.  On error, get_parent_fragment() returns -1 and sets
26       the dirfile error to a non-zero value.  Possible error values are:
27
28       GD_E_BAD_DIRFILE
29               The supplied dirfile was invalid.
30
31       GD_E_BAD_INDEX
32               The supplied index was out of range, or was equal to zero.
33
34       The dirfile error may be retrieved by calling get_error(3).  A descrip‐
35       tive error string for the last error encountered can be obtained from a
36       call to get_error_string(3).
37

SEE ALSO

39       dirfile(5),  dirfile_include(3),  dirfile_open(3), get_fragmentname(3),
40       get_nfragments(3)
41
42
43
44Version 0.5.0                  14 December 2008         get_parent_fragment(3)
Impressum