1GETCONFENT(3)                   Common      Library     Functions
2GETCONFENT(3)
3
4
5
6[1mNAME[0m
7       getconfent, getconfent_r ‐ Get configuration entry
8
9[1mSYNOPSIS[0m
10       [1mchar * getconfent ([0m
11                      [1mconst char *[4m[22mcategory[24m[1m,[0m
12                      [1mconst char *[4m[22mname[24m[1m,[0m
13                      [1mint [4m[22mflags[24m[1m);[0m
14
15       [1mchar * getconfent_r ([0m
16                      [1mconst char *[4m[22mcategory[24m[1m,[0m
17                      [1mconst char *[4m[22mname[24m[1m,[0m
18                      [1mint [4m[22mflags[24m[1m,[0m
19                      [1mchar *[4m[22mbuffer[24m[1m,[0m
20                      [1mint [4m[22mbufsiz[24m[1m);[0m
21
22[1mDESCRIPTION[0m
23       [1mgetconfent()  [22mget  the  [4mname[24m entry from  the
24configuration file.  Every
25       entry  in  the  configuration  file  is  categorized.  The
26[4mcategory[24m  parameter
27       is  its  specifier. The [1mgetconfent_r() [22mfunction  is
28a re‐entrant version
29       of  [1mgetconfent() [22musing the passed [4mbuffer[24m pa‐
30rameter instead of an  inter‐
31       nal static buffer.
32
33       If  threads  are  created  usint  the  [1mCthread_create()
34[22minterface, it is not
35       mandatory to call [1mgetconfent_r() [22min order to assure
36thread‐safe  code.
37       In that case [1mgetconfent() [22mcalls the re‐entrant ver‐
38sion internally using
39       a buffer allocated in thread local storage.
40
41[1mRETURN VALUE[0m
42       [1mgetconfent()  [22mand [1mgetconfent_r() [22mreturn NULL
43if the entry is not  found.
44       Otherwise,  it  returns  the  matched entry.  If  [1mflags
45[22mis not null, the
46       return  value  is  a pointer to the full string matched in
47the  configura‐
48       tion  file.  Otherwise,  only  the pointer  to  the  first
49blank separated
50       token is returned.
51
52[1mERRORS[0m
53       If  the [1mgetconfent(), getconfent_r() [22mfunction fail,
54[1mserrno [22mmay be set to
55       one of the following values:
56
57       [1mSENOCONFIG[0m
58              configuration file not found.
59
60[1mSEE ALSO[0m
61       [1mshift.conf(4), Cthread_create(3)[0m
62
63[1mAUTHOR[0m
64       [1mLCG Grid Deployment [22mTeam
65
66
67
68LCG                         $Date:    2005/03/29    09:27:19    $
69GETCONFENT(3)
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum