1GENDERS_GETNUMNODES(3) LIBGENDERS GENDERS_GETNUMNODES(3)
2
3
4
6 genders_getnumnodes, genders_getnumattrs, genders_getmaxattrs, gen‐
7 ders_getmaxnodelen, genders_getmaxattrlen, genders_getmaxvallen - gen‐
8 ders statistics routines
9
11 #include <genders.h>
12
13 int genders_getnumnodes(genders_t handle);
14
15 int genders_getnumattrs(genders_t handle);
16
17 int genders_getmaxattrs(genders_t handle);
18
19 int genders_getmaxnodelen(genders_t handle);
20
21 int genders_getmaxattrlen(genders_t handle);
22
23 int genders_getmaxvallen(genders_t handle);
24
26 genders_getnumnodes(), genders_getnumattrs(), genders_getmaxattrs(),
27 genders_getmaxnodelen(), genders_getmaxattrlen(), and genders_getmax‐
28 vallen() get statistics about the genders file associated with handle.
29
30 genders_getnumnodes() returns the number of nodes stored in the genders
31 file.
32
33 genders_getnumattrs() returns the number of attributes listed in the
34 genders file.
35
36 genders_getmaxattrs() returns the maximum number of attributes listed
37 with a node in the genders file.
38
39 genders_getmaxnodelen() returns the maximum length of any node listed
40 in the genders file.
41
42 genders_getmaxattrlen() returns the maximum length of any attribute
43 listed in the genders file.
44
45 genders_getmaxvallen() returns the maximum length of any attribute
46 value listed in the genders file.
47
48 In general, genders_getnumnodes(), genders_getnumattrs(), genders_get‐
49 maxattrs(), genders_getmaxnodelen(), genders_getmaxattrlen(), and gen‐
50 ders_getmaxvallen() are used so a programmer can dynamically allocate a
51 proper amount of memory to store genders file information in.
52
54 On success, 0 is returned. On error, -1 is returned, and an error code
55 is returned in handle. The error code can be retrieved via gen‐
56 ders_errnum(3) , and a description of the error code can be retrieved
57 via genders_strerror(3). Error codes are defined in genders.h.
58
60 GENDERS_ERR_NULLHANDLE
61 The handle parameter is NULL. The genders handle must be cre‐
62 ated with genders_handle_create(3).
63
64 GENDERS_ERR_NOTLOADED
65 genders_load_data(3) has not been called to load genders data.
66
67 GENDERS_ERR_MAGIC
68 handle has an incorrect magic number. handle does not point to
69 a genders handle or handle has been destroyed by genders_han‐
70 dle_destroy(3).
71
73 /usr/include/genders.h
74
76 libgenders(3), genders_handle_create(3), genders_load_data(3), gen‐
77 ders_errnum(3), genders_strerror(3)
78
79
80
81LLNL August 2003 GENDERS_GETNUMNODES(3)