4
<!-- Manpage converted by man2html 3.0.1 -->
6
lCreateList, lFreeList, lCopyList, lAddList, lPSortList,
7
lDumpList, lUndumpList, lWriteList, lWriteListTo, lGetList-
8
Name, lGetListDescr, lGetNumberOfElem
10
generic list manipulation and information functions
15
lList* lCreateList( char *listname, lDescr *descriptor );
17
lList* lCreateElemList( char *listname, lDescr *descriptor,
20
lList* lFreeList( lList *list );
22
lList* lCopyList( char *listname, lList *list );
24
void lAddList( lList *list1, lList *list2 );
26
int lPSortList( lList *list, char *orderstring, ... );
28
int lDumpList( FILE *file, lList *list, int indent );
36
void lWriteList( lList *list );
38
void lWriteListTo( lList *list, FILE *fp );
40
char* lGetListName( lList *list );
42
lDescr* lGetListDescr( lList *list );
44
int lGetNumberOfElem( lList *list );
46
int lGetNumberOfRemainingElem( lListElem *elem );
50
gets the new name of the list to be created and its
51
descriptor which enumerates the fields (name,type),
52
that a list element will contain. The memory for the
53
list is dynamically created and a pointer to the newly
54
created list is returned. If one of the arguments is
55
NULL or if the descriptor contains no fields the return
56
value of <I>lCreateList</I> is NULL. This is also true for any
57
error that might occur. The list must be freed with
58
<I>lFreeList</I> when the list is no longer used (all associ-
59
ated sub-lists and strings are also freed).
62
gets the new name of the list to be created and its
63
descriptor which enumerates the fields (name,type),
64
that a list element will contain. The third argument
65
specifies the number of elements that shall be created.
66
The memory for the list is dynamically created and a
67
pointer to the newly created list is returned. If one
68
of the arguments is NULL, if the descriptor contains no
69
fields or if creation of all requested elements fails
70
the return value of <I>lCreateElemList</I> is NULL. This is
71
also true for any error that might occur. The list
72
must be freed with <I>lFreeList</I> when the list is no longer
73
used (all associated sub-lists and strings are also
77
gets as argument a pointer to a generic list. If the
78
list pointer is NULL the function simply returns, oth-
79
erwise the list, all its sub-lists and its strings are
83
copies an existing generic list with all its sub-lists.
84
The required memory is allocated by <I>lCopyList</I> and must
85
be released via <I>lFreeList</I> if the copied list is no
86
longer used. The first argument to lCopyList is the
87
name of the copied list, the second argument is an
88
existing list. In case of success a pointer to the
89
copied list is returned. Otherwise the return value is
93
concatenates two generic lists. The first argument is
94
the list which is expanded. The second argument is the
95
list that is added to the first list. The descriptors
96
of both lists have to be equal. After appending the
97
elements of the second list to the first list, the
98
second list gets destroyed.
101
sorts a given list corresponding to a given sort order.
102
The first argument is the generic list to be sorted,
103
the second argument is the sort order string and the
104
following variable argument list specifies the fields
105
which act as sorting keys. lPSortList returns -1 in
106
case of error, 0 otherwise.
107
The sort order string has the following syntax:
109
sort order string = %I{+|-} [%I{+|-}...]
111
%I stands for the field and +/- stands for
112
ascending/descending sorting order
113
for every percent sign there is one 'fieldname' in the
114
variable argument list, %I stands for the field and +/-
115
stands for ascending/descending sorting order.
117
The following example may show the usage:
119
lPSortList( list, "%I+ %I-", field1, field2 );
122
writes a generic list and all its sub-lists to a file.
123
The first argument is a FILE pointer, the second argu-
124
ment is a generic list pointer and the third argument
125
is the number of indentation units for the lines in the
126
list file (for better readability).
129
read a dumped list and all its sub-lists from a dump
130
file. The first argument is the FILE pointer of the
131
dump file. The second argument is the program internal
132
name of the read in list or the name of the list in the
133
dump file if NULL is specified. The third argument is
134
the descriptor of the new list or the list descriptor
135
stored in the dump file if NULL is specified. If the
136
new list descriptor is a subset of the descriptor in
137
the dump file the obsolete fields are skipped and a
138
warning message is displayed. If additional fields
139
occur in the new descriptor they remain unchanged (i.e.
140
they keep their creation time value). If <I>lUndumpList</I>
141
is successful, a generic list is created and the list
142
pointer is returned. Otherwise the return value is
146
writes a generic list and all its sub-lists if Monitor-
147
ing Level CULL_LAYER is set to info. The generic list
148
pointer is the only function argument. If the list
149
pointer is NULL the function displays a warning and
153
writes a generic list and all its sub-lists to the
154
stream connected with fp. The generic list pointer is
155
the first function argument. The second argument is the
156
file pointer. If the file pointer is NULL, the function
157
behaves as "lWriteList".
160
returns the name of the specified generic list. If the
161
function argument is NULL, the string 'No List speci-
165
returns the list descriptor of the specified list or
166
NULL if a NULL if the argument is NULL.
169
gets the number of list elements actually contained in
170
the generic list specified as function argument. If the
171
generic list pointer is NULL, -1 is returned, the
172
number of list elements is returned otherwise.
174
lGetNumberOfRemainingElem
175
returns the number of list elements contained in the
176
remainder of a generic list after a specified list ele-
180
In case of error the return value is -1 or NULL, otherwise 0
181
or a valid pointer to the corresponding struct is returned.
184
The following errors may occur. The affected functions are
185
listed in parentheses.
188
No list name specified. (<I>lCreateList</I>)
191
List descriptor is NULL. (<I>lCreateList</I>)
194
<B><A HREF="../htmlman3/Malloc.html">Malloc(3)</A></B> failed. (<I>lCreateList</I>, <I>lUndumpList</I>)
197
<B><A HREF="../htmlman3/Strdup.html">Strdup(3)</A></B> failed. (<I>lCreateList</I>)
200
Counting the descriptor length failed. (<I>lCreateList</I>,
201
<I>lAddList</I>, <I>lUndumpList</I>)
204
List pointer is NULL. (<I>lFreeList</I>, <I>lCopyList</I>, <I>lAddList</I>,
205
<I>lPSortList</I>, <I>lWriteList</I>, <I>lGetListName</I>, <I>lGetListDescr</I>,
206
<I>lGetNumberOfElem</I>, <I>lDumpList</I>)
209
Creation of a new list failed. (<I>lCopyList</I>, <I>lPSortList</I>,
213
<I>lAppendElem</I> function failed. (<I>lCopyList</I>, <I>lAddList</I>, <I>lUn-</I>
217
Unequal descriptors specified. (<I>lAddList</I>)
220
<I>lDechainElem</I> failed. (<I>lAddList</I>, <I>lPSortList</I>)
223
No format string specified. (<I>lPSortList</I>)
226
Parsing the sort order format string failed. (<I>lPSort-</I>
230
Getting number of list elements failed. (<I>lPSortList</I>)
233
File pointer to dump file is NULL. (<I>lDumpList</I>, <I>lUndum-</I>
237
A syntax error occurred. (<I>lUndumpList</I>)
240
Reading a field value failed. (<I>lUndumpList</I>)
243
<I>lUndumpDescr</I> failed. (<I>lUndumpList</I>)
246
<I>lUndumpElem</I> failed. (<I>lUndumpList</I>)
249
<I>lCreateElem</I> failed. (<I>lUndumpList</I>)
252
Copying list element fields failed. (<I>lUndumpList</I>)
255
<B><A HREF="../htmlman1/sge_intro.html">sge_intro(1)</A></B>, <B><A HREF="../htmlman3/list_intro.html">list_intro(3)</A></B>.
258
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>