~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to doc/htmlman/htmlman3/lFindLast.html

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<HTML>
 
2
<BODY BGCOLOR=white>
 
3
<PRE>
 
4
<!-- Manpage converted by man2html 3.0.1 -->
 
5
NAME
 
6
     lCreateElem, lFreeElem, lCopyElem, lAppendElem, lInsertElem,
 
7
     lDechainElem,   lFirst,  lLast,  lNext,  lPrev,  lFindFirst,
 
8
     lFindLast,  lFindNext,  lFindPrev,  lDumpElem,  lUndumpElem,
 
9
     lWriteElem, lWriteElemTo, lGetPosViaElem
 
10
 
 
11
     generic list element manipulation and information functions
 
12
 
 
13
SYNOPSIS
 
14
     #include "cull.h"
 
15
 
 
16
     lListElem* lCreateElem( lDescr *descriptor );
 
17
 
 
18
     void lFreeElem( lListElem *element );
 
19
 
 
20
     lListElem* lCopyElem( lListElem *source );
 
21
 
 
22
     lListElem* lAppendElem( lList *list, lListElem *newelem );
 
23
 
 
24
     lListElem* lDechainElem(
 
25
          lList* list,
 
26
          lListElem* element
 
27
     );
 
28
 
 
29
     lListElem* lFirst( lList* list );
 
30
 
 
31
     lListElem* lLast( lList* list );
 
32
 
 
33
     lListElem* lNext( lListElem* element );
 
34
 
 
35
     lListElem* lPrev( lListElem* element );
 
36
 
 
37
     lListElem* lFindFirst(
 
38
          lList* list,
 
39
          lCondition* condition
 
40
     );
 
41
 
 
42
     lListElem* lFindLast(
 
43
          lList* list,
 
44
          lCondition* condition
 
45
     );
 
46
 
 
47
     lListElem* lFindNext(
 
48
          lListElem* element,
 
49
          lCondition* element
 
50
     );
 
51
 
 
52
     lListElem* lFindPrev(
 
53
          lListElem* element,
 
54
          lCondition* element
 
55
     );
 
56
 
 
57
     int lDumpElem(
 
58
          FILE *file,
 
59
          lListElem *element,
 
60
          int indent,
 
61
          int number
 
62
     );
 
63
 
 
64
     lListElem* lUndumpElem( FILE *file, lDescr *descriptor );
 
65
 
 
66
     void lWriteElem( lListElem *element );
 
67
 
 
68
     void lWriteElemTo( lListElem *element, FILE *fp );
 
69
 
 
70
     int lGetPosViaElem( lListElem *element, int nm );
 
71
 
 
72
DESCRIPTION
 
73
     lCreateElem
 
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
 
79
          <I>lFreeElem</I>.
 
80
 
 
81
     lFreeElem
 
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-
 
85
          ply returns.
 
86
 
 
87
     lCopyElem
 
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>.
 
93
 
 
94
     lAppendElem
 
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
 
100
          <I>lCopyList</I>).
 
101
 
 
102
     lInsertElem
 
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
 
109
          <I>lCopyList</I>).
 
110
 
 
111
     lDechainElem
 
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.
 
116
 
 
117
     lFirst, lLast
 
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
 
121
          element is returned.
 
122
 
 
123
     lNext, lPrev
 
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.
 
128
 
 
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.
 
140
 
 
141
     lFindNext, lFindPrev
 
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.
 
151
 
 
152
     lDumpElem
 
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>.
 
159
 
 
160
     lUndumpElem
 
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.
 
169
 
 
170
     lWriteElem
 
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.
 
174
 
 
175
     lWriteElemTo
 
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.
 
181
 
 
182
     lGetPosViaElem
 
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.
 
187
 
 
188
RETURN VALUES
 
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.
 
191
 
 
192
ERRORS
 
193
     The following errors may occur. The affected  functions  are
 
194
     listed in parentheses.
 
195
 
 
196
     LECOUNTDESCR
 
197
          Counting the descriptor  length  failed.  (<I>lCreateElem</I>,
 
198
          <I>lUndumpElem</I>)
 
199
 
 
200
     LEMALLOC
 
201
          <B><A HREF="../htmlman3/Malloc.html">Malloc(3)</A></B> failed. (<I>lCreateElem</I>)
 
202
 
 
203
     LEELEMNULL
 
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>)
 
207
 
 
208
     LELISTNULL
 
209
          List is NULL. (<I>lAppendElem</I>, <I>lInsertElem</I>,  <I>lDechainElem</I>,
 
210
          <I>lFindFirst</I>)
 
211
 
 
212
     LECREATEELEM
 
213
          Creation of a list element failed. (<I>lCopyElem</I>,  <I>lUndum-</I>
 
214
          <I>pElem</I>)
 
215
 
 
216
     LEFILENULL
 
217
          File pointer is NULL. (<I>lDumpElem</I>, <I>lUndumpElem</I>)
 
218
 
 
219
     LEDESCRNULL
 
220
          List descriptor pointer is NULL. (<I>lUndumpElem</I>)
 
221
 
 
222
     LECOPYSWITCH
 
223
          Copying a list element field failed. (<I>lCopyElem</I>)
 
224
 
 
225
     LESYNTAX
 
226
          A syntax error occurred  (missing  opening  or  closing
 
227
          brackets).  (<I>lUndumpElem</I>)
 
228
 
 
229
SEE ALSO
 
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>.
 
231
 
 
232
COPYRIGHT
 
233
     See <B><A HREF="../htmlman1/sge_intro.html">sge_intro(1)</A></B> for a full statement of rights and  permis-
 
234
     sions.
 
235
 
 
236
 
 
237
 
 
238
 
 
239
 
 
240
 
 
241
 
 
242
 
 
243
 
 
244
 
 
245
 
 
246
 
 
247
 
 
248
 
 
249
 
 
250
 
 
251
 
 
252
 
 
253
 
 
254
 
 
255
 
 
256
 
 
257
 
 
258
 
 
259
 
 
260
 
 
261
 
 
262
 
 
263
 
 
264
 
 
265
</PRE>
 
266
<HR>
 
267
<ADDRESS>
 
268
Man(1) output converted with
 
269
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
 
270
</ADDRESS>
 
271
</BODY>
 
272
</HTML>