1GENDERS_NODELIST_CREATE(3) LIBGENDERS GENDERS_NODELIST_CREATE(3)
2
3
4
6 genders_nodelist_create, genders_nodelist_clear, gen‐
7 ders_nodelist_destroy, genders_attrlist_create, genders_attrlist_clear,
8 genders_attrlist_destroy, genders_vallist_create, genders_val‐
9 list_clear, genders_vallist_destroy - list create, clear, and destroy
10 routines
11
13 #include <genders.h>
14
15 int genders_nodelist_create(genders_t handle, char ***nodelist);
16
17 int genders_nodelist_clear(genders_t handle, char **nodelist);
18
19 int genders_nodelist_destroy(genders_t handle, char **nodelist);
20
21 int genders_attrlist_create(genders_t handle, char ***attrlist);
22
23 int genders_attrlist_clear(genders_t handle, char **attrlist);
24
25 int genders_attrlist_destroy(genders_t handle, char **attrlist);
26
27 int genders_vallist_create(genders_t handle, char ***vallist);
28
29 int genders_vallist_clear(genders_t handle, char **vallist);
30
31 int genders_vallist_destroy(genders_t handle, char **vallist);
32
34 genders_nodelist_create(), genders_nodelist_clear(), gen‐
35 ders_nodelist_destroy(), genders_attrlist_create(), gen‐
36 ders_attrlist_clear(), genders_attrlist_destroy(), genders_vallist_cre‐
37 ate(), genders_vallist_clear(), and genders_vallist_destroy() are used
38 to create, clear, and destroy lists (arrays of strings) for use with
39 genders_getnodes(3), genders_getattr(3), and genders_getattr_all(3).
40
41 genders_nodelist_create(), genders_attrlist_create(), and genders_val‐
42 list_create() creates a list with minimum size to store nodes,
43 attributes, and attribute values respectively. nodelist, attrlist, and
44 vallist are respectively set to point to the created list. The created
45 lists are guaranteed to store all the node, attribute, and value infor‐
46 mation returned from genders_getnodes(3), genders_getattr(3), and gen‐
47 ders_getattr_all(3).
48
49 genders_nodelist_clear(), genders_attrlist_clear(), and genders_val‐
50 list_clear() clear any information stored in the lists pointed to by
51 nodelist, attrlist, and vallist repectively. They do not have be
52 called after their respective create functions. They only have to be
53 called after they are used in genders_getnodes(3), genders_getattr(3),
54 and genders_getattr_all(3), and the programmer wishes to re-use the
55 list.
56
57 genders_nodelist_destroy(), genders_attrlist_destroy(), and gen‐
58 ders_vallist_destroy() destroy the lists pointed to by nodelist,
59 attrlist, and vallist respectively.
60
61 If no attributes or values are listed in the genders database all of
62 the attrlist and vallist functions will do nothing. The pointer passed
63 into genders_attrlist_create() and genders_vallist_create() will not be
64 set.
65
66
68 On success, genders_nodelist_create(), genders_attrlist_create(), and
69 genders_vallist_create() return the number of elements the created list
70 can store. On success, genders_nodelist_clear(), gen‐
71 ders_attrlist_clear(), genders_vallist_clear() gen‐
72 ders_nodelist_destroy(), genders_attrlist_destroy(), genders_val‐
73 list_destroy() return 0. On error, -1 is returned, and an error code
74 is returned in handle. The error code can be retrieved via gen‐
75 ders_errnum(3) , and a description of the error code can be retrieved
76 via genders_strerror(3). Error codes are defined in genders.h.
77
79 GENDERS_ERR_NULLHANDLE
80 The handle parameter is NULL. The genders handle must be cre‐
81 ated with genders_handle_create(3).
82
83 GENDERS_ERR_NOTLOADED
84 genders_load_data(3) has not been called to load genders data.
85 Before lists of appropriate size can be created, the genders
86 file must be read and parsed.
87
88 GENDERS_ERR_PARAMETERS
89 An incorrect parameter has been passed in.
90
91 GENDERS_ERR_NULLPTR
92 A null pointer has been found in the list passed in.
93
94 GENDERS_ERR_OUTMEM
95 malloc(3) has failed internally, system is out of memory.
96
97 GENDERS_ERR_MAGIC
98 handle has an incorrect magic number. handle does not point to
99 a genders handle or handle has been destroyed by genders_han‐
100 dle_destroy(3).
101
103 /usr/include/genders.h
104
106 libgenders(3), genders_handle_create(3), genders_load_data(3), gen‐
107 ders_getnodes(3), genders_getattr(3), genders_getattr_all(3), gen‐
108 ders_errnum(3), genders_strerror(3)
109
110
111
112LLNL August 2003 GENDERS_NODELIST_CREATE(3)