4
<!-- Manpage converted by man2html 3.0.1 -->
6
lCreateElem, lFreeElem, lCopyElem, lAppendElem, lInsertElem,
7
lDechainElem, lFirst, lLast, lNext, lPrev, lFindFirst,
8
lFindLast, lFindNext, lFindPrev, lDumpElem, lUndumpElem,
9
lWriteElem, lWriteElemTo, lGetPosViaElem
11
generic list element manipulation and information functions
16
lListElem* lCreateElem( lDescr *descriptor );
18
void lFreeElem( lListElem *element );
20
lListElem* lCopyElem( lListElem *source );
22
lListElem* lAppendElem( lList *list, lListElem *newelem );
24
lListElem* lDechainElem(
29
lListElem* lFirst( lList* list );
31
lListElem* lLast( lList* list );
33
lListElem* lNext( lListElem* element );
35
lListElem* lPrev( lListElem* element );
37
lListElem* lFindFirst(
64
lListElem* lUndumpElem( FILE *file, lDescr *descriptor );
66
void lWriteElem( lListElem *element );
68
void lWriteElemTo( lListElem *element, FILE *fp );
70
int lGetPosViaElem( lListElem *element, int nm );
74
creates a new list element specified by descriptor. In
75
case of success, a pointer to the list element is
76
returned, otherwise the return value is NULL. All list
77
element fields are set to zero. There is memory allo-
78
cated for the list element, that must be released with
82
frees the memory allocated by <I>lCreateElem</I>. If there are
83
sub-list or string fields their memory is also
84
released. If the list element is NULL the function sim-
88
duplicates a list element with all its sub-lists and
89
strings. If an error occurs NULL is returned, otherwise
90
a pointer to the copied list element is returned. If
91
the copied list element is no longer used, the allo-
92
cated memory has to be released with <I>lFreeElem</I>.
95
append a list element to a generic list as the last
96
element. The first argument is the list to which the
97
new element shall be appended. The second argument is
98
the new element. Sometimes it may be useful to use a
99
copy of the element to be inserted in the list (see
103
inserts a new element after the specified element in
104
the list. The first argument is the list, the second
105
argument is the list element, after which the new ele-
106
ment shall be inserted, and the third element is the
107
new list element. Sometimes it may be useful to use a
108
copy of the element to be inserted in the list (see
112
dechains the specified element from the generic list. A
113
pointer to the list element is returned. The list ele-
114
ment is not destroyed. If it shall be destroyed
115
<I>lFreeElem</I> should be called.
118
get the first/last element of the specified list. If no
119
list is specified or no elements are contained, NULL is
120
returned. Otherwise a pointer to the first/last list
124
get the successor/predecessor of the specified element.
125
If the specified element is NULL or the last/first ele-
126
ment in the list, NULL is returned. Otherwise a pointer
127
to the successor/predecessor is returned.
129
lFindFirst, lFindLast
130
find the first/last element matching the specified con-
131
dition. The first argument is the generic list where
132
the requested list element may be contained. The
133
second element is the condition that shall be fulfilled
134
by the element. The list is searched in the order
135
first/last to last/first element. If there is no ele-
136
ment that matches the condition NULL is returned. If
137
there is no list specified, the return value is also
138
NULL, otherwise a pointer to the first/last matching
139
list element is returned.
142
find the next/previous element matching the specified
143
condition. The first argument is the list element
144
returned by <I>lFindFirst</I>/<I>lFindLast</I> or
145
<I>lFindNext</I>/<I>lFindPrev</I>. The second argument is the condi-
146
tion which should be equal to the one stated in the
147
corresponding <I>lFindFirst</I>/<I>lFindLast</I> call. The return
148
value is NULL, if the specified list element is NULL or
149
no matching element is found. Otherwise a pointer to
150
the matching list element is returned.
153
dumps a list element in ASCII format to a file. The
154
first argument is a FILE pointer, the second argument
155
is the list element to be dumped, the third argument is
156
the number of indentation units for formatting purposes
157
and the fourth argument is the number of the element.
158
This function is normally called by <B><A HREF="../htmlman3/lDumpList.html">lDumpList(3)</A></B>.
161
undumps a list element from a dump file. The first
162
argument is a FILE pointer of the dump file. The second
163
argument is the descriptor of the list element. If one
164
or both of the function arguments are NULL, NULL is
165
retuned. Otherwise a pointer to the newly created list
166
element is returned. If the element is no longer used,
167
<I>lFreeElem</I> has to be called. This function is normally
168
called by <B><A HREF="../htmlman3/lUndumpList.html">lUndumpList(3)</A></B> only.
171
writes the contents of a list element with all its
172
sub-lists if Monitoring Level CULL_LAYER is set to
173
info. The only argument is a list element.
176
writes the contents of a list element with all its
177
sub-lists to the stream connected with the file pointer
178
fp. The first argument is a list element, the second
179
argument is a file pointer or NULL. If the file pointer
180
is NULL, this function behaves exactly as lWriteElemTo.
183
get the field position of a field with name nm in the
184
list element element. The position of the field named
185
nm is returned. If the field does not exist in the list
186
element -1 is returned.
189
In case of error the return value is -1 or NULL, otherwise 0
190
or a valid pointer to the corresponding struct is returned.
193
The following errors may occur. The affected functions are
194
listed in parentheses.
197
Counting the descriptor length failed. (<I>lCreateElem</I>,
201
<B><A HREF="../htmlman3/Malloc.html">Malloc(3)</A></B> failed. (<I>lCreateElem</I>)
204
List element is NULL. (<I>lFreeElem</I>, <I>lCopyElem</I>, <I>lAppen-</I>
205
<I>dElem</I>, <I>lInsertElem</I>, <I>lDechainElem</I>, <I>lFindNext</I>, <I>lWri-</I>
206
<I>teElem</I>, <I>lGetPosViaElem</I>, <I>lDumpElem</I>)
209
List is NULL. (<I>lAppendElem</I>, <I>lInsertElem</I>, <I>lDechainElem</I>,
213
Creation of a list element failed. (<I>lCopyElem</I>, <I>lUndum-</I>
217
File pointer is NULL. (<I>lDumpElem</I>, <I>lUndumpElem</I>)
220
List descriptor pointer is NULL. (<I>lUndumpElem</I>)
223
Copying a list element field failed. (<I>lCopyElem</I>)
226
A syntax error occurred (missing opening or closing
227
brackets). (<I>lUndumpElem</I>)
230
<B><A HREF="../htmlman1/sge_intro.html">sge_intro(1)</A></B>, <B><A HREF="../htmlman3/list_intro.html">list_intro(3)</A></B>.
233
See <B><A HREF="../htmlman1/sge_intro.html">sge_intro(1)</A></B> for a full statement of rights and permis-
268
Man(1) output converted with
269
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>