~ubuntu-branches/debian/jessie/glib2.0/jessie

« back to all changes in this revision

Viewing changes to docs/reference/glib/html/glib-Singly-Linked-Lists.html

Tags: upstream-2.16.1
Import upstream version 2.16.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
<th width="100%" align="center">GLib Reference Manual</th>
37
37
<td><a accesskey="n" href="glib-Double-ended-Queues.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
38
38
</tr>
39
 
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3127045" class="shortcut">Top</a>
 
39
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3249902" class="shortcut">Top</a>
40
40
                  &#160;|&#160;
41
 
                  <a href="#id3127955" class="shortcut">Description</a></nobr></td></tr>
 
41
                  <a href="#id3250812" class="shortcut">Description</a></nobr></td></tr>
42
42
</table>
43
43
<div class="refentry" lang="en">
44
44
<a name="glib-Singly-Linked-Lists"></a><div class="titlepage"></div>
45
45
<div class="refnamediv"><table width="100%"><tr>
46
46
<td valign="top">
47
47
<h2>
48
 
<a name="id3127045"></a><span class="refentrytitle">Singly-Linked Lists</span>
 
48
<a name="id3249902"></a><span class="refentrytitle">Singly-Linked Lists</span>
49
49
</h2>
50
50
<p>Singly-Linked Lists &#8212; linked lists containing integer values or pointers to data, limited to
51
51
iterating over the list in one direction</p>
127
127
</pre>
128
128
</div>
129
129
<div class="refsect1" lang="en">
130
 
<a name="id3127955"></a><h2>Description</h2>
 
130
<a name="id3250812"></a><h2>Description</h2>
131
131
<p>
132
132
The <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> structure and its associated functions provide a standard
133
133
singly-linked list data structure.
183
183
</p>
184
184
</div>
185
185
<div class="refsect1" lang="en">
186
 
<a name="id3128256"></a><h2>Details</h2>
 
186
<a name="id3251113"></a><h2>Details</h2>
187
187
<div class="refsect2" lang="en">
188
 
<a name="id3128266"></a><h3>
 
188
<a name="id3251124"></a><h3>
189
189
<a name="GSList"></a>GSList</h3>
190
 
<a class="indexterm" name="id3128279"></a><pre class="programlisting">typedef struct {
 
190
<a class="indexterm" name="id3251136"></a><pre class="programlisting">typedef struct {
191
191
  gpointer data;
192
192
  GSList *next;
193
193
} GSList;
216
216
</div>
217
217
<hr>
218
218
<div class="refsect2" lang="en">
219
 
<a name="id3128359"></a><h3>
 
219
<a name="id3251216"></a><h3>
220
220
<a name="g-slist-alloc"></a>g_slist_alloc ()</h3>
221
 
<a class="indexterm" name="id3128372"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_alloc                       (void);</pre>
 
221
<a class="indexterm" name="id3251229"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_alloc                       (void);</pre>
222
222
<p>
223
223
Allocates space for one <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> element.
224
224
It is called by the <a class="link" href="glib-Singly-Linked-Lists.html#g-slist-append"><code class="function">g_slist_append()</code></a>, <a class="link" href="glib-Singly-Linked-Lists.html#g-slist-prepend"><code class="function">g_slist_prepend()</code></a>, <a class="link" href="glib-Singly-Linked-Lists.html#g-slist-insert"><code class="function">g_slist_insert()</code></a> and
237
237
</div>
238
238
<hr>
239
239
<div class="refsect2" lang="en">
240
 
<a name="id3128468"></a><h3>
 
240
<a name="id3251326"></a><h3>
241
241
<a name="g-slist-append"></a>g_slist_append ()</h3>
242
 
<a class="indexterm" name="id3128481"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_append                      (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
242
<a class="indexterm" name="id3251339"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_append                      (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
243
243
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
244
244
<p>
245
245
Adds a new element on to the end of the list.
246
246
</p>
247
 
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
248
 
<h3 class="title">Note</h3>
249
 
<p>
250
 
The return value is the new start of the list, which may have changed, so
251
 
make sure you store the new value.
252
 
</p>
253
 
</div>
254
 
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
255
 
<h3 class="title">Note</h3>
256
 
<p>
257
 
Note that <a class="link" href="glib-Singly-Linked-Lists.html#g-slist-append"><code class="function">g_slist_append()</code></a> has to traverse the entire list to find the end,
258
 
which is inefficient when adding multiple elements. A common idiom to
259
 
avoid the inefficiency is to prepend the elements and reverse the list 
260
 
when all elements have been added. 
261
 
</p>
262
 
</div>
 
247
<p>
 
248
</p>
 
249
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
 
250
<h3 class="title">Note</h3>
 
251
<p>
 
252
The return value is the new start of the list, which may 
 
253
have changed, so make sure you store the new value.
 
254
</p>
 
255
</div>
 
256
<p>
 
257
</p>
 
258
<p>
 
259
</p>
 
260
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
 
261
<h3 class="title">Note</h3>
 
262
<p>
 
263
Note that <a class="link" href="glib-Singly-Linked-Lists.html#g-slist-append"><code class="function">g_slist_append()</code></a> has to traverse the entire list 
 
264
to find the end, which is inefficient when adding multiple 
 
265
elements. A common idiom to avoid the inefficiency is to prepend 
 
266
the elements and reverse the list when all elements have been added.
 
267
</p>
 
268
</div>
 
269
<p>
 
270
</p>
 
271
<p>
 
272
</p>
263
273
<div class="informalexample"><pre class="programlisting">
264
 
  /* Notice that these are initialized to the empty list. */
265
 
  GSList *list = NULL, *number_list = NULL;
266
 
 
267
 
  /* This is a list of strings. */
268
 
  list = g_slist_append (list, "first");
269
 
  list = g_slist_append (list, "second");
270
 
 
271
 
  /* This is a list of integers. */
272
 
  number_list = g_slist_append (number_list, GINT_TO_POINTER (27));
273
 
  number_list = g_slist_append (number_list, GINT_TO_POINTER (14));
 
274
/* Notice that these are initialized to the empty list. */
 
275
GSList *list = NULL, *number_list = NULL;
 
276
 
 
277
/* This is a list of strings. */
 
278
list = g_slist_append (list, "first");
 
279
list = g_slist_append (list, "second");
 
280
 
 
281
/* This is a list of integers. */
 
282
number_list = g_slist_append (number_list, GINT_TO_POINTER (27));
 
283
number_list = g_slist_append (number_list, GINT_TO_POINTER (14));
274
284
</pre></div>
 
285
<p>
 
286
 
 
287
</p>
275
288
<div class="variablelist"><table border="0">
276
289
<col align="left" valign="top">
277
290
<tbody>
278
291
<tr>
279
292
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
280
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
293
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
281
294
</td>
282
295
</tr>
283
296
<tr>
284
297
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
285
 
<td>the data for the new element.
 
298
<td> the data for the new element
286
299
</td>
287
300
</tr>
288
301
<tr>
289
302
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
290
 
<td>the new start of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
291
 
 
292
 
 
 
303
<td> the new start of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
293
304
</td>
294
305
</tr>
295
306
</tbody>
297
308
</div>
298
309
<hr>
299
310
<div class="refsect2" lang="en">
300
 
<a name="id3128620"></a><h3>
 
311
<a name="id3251484"></a><h3>
301
312
<a name="g-slist-prepend"></a>g_slist_prepend ()</h3>
302
 
<a class="indexterm" name="id3128632"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_prepend                     (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
313
<a class="indexterm" name="id3251497"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_prepend                     (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
303
314
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
304
315
<p>
305
316
Adds a new element on to the start of the list.
306
317
</p>
 
318
<p>
 
319
</p>
307
320
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
308
321
<h3 class="title">Note</h3>
309
322
<p>
310
 
The return value is the new start of the list, which may have changed, so
311
 
make sure you store the new value.
 
323
The return value is the new start of the list, which 
 
324
may have changed, so make sure you store the new value.
312
325
</p>
313
326
</div>
 
327
<p>
 
328
</p>
 
329
<p>
 
330
</p>
314
331
<div class="informalexample"><pre class="programlisting">
315
 
  /* Notice that it is initialized to the empty list. */
316
 
  GSList *list = NULL;
317
 
  list = g_slist_prepend (list, "last");
318
 
  list = g_slist_prepend (list, "first");
 
332
/* Notice that it is initialized to the empty list. */
 
333
GSList *list = NULL;
 
334
list = g_slist_prepend (list, "last");
 
335
list = g_slist_prepend (list, "first");
319
336
</pre></div>
 
337
<p>
 
338
 
 
339
</p>
320
340
<div class="variablelist"><table border="0">
321
341
<col align="left" valign="top">
322
342
<tbody>
323
343
<tr>
324
344
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
325
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
345
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
326
346
</td>
327
347
</tr>
328
348
<tr>
329
349
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
330
 
<td>the data for the new element.
 
350
<td> the data for the new element
331
351
</td>
332
352
</tr>
333
353
<tr>
334
354
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
335
 
<td>the new start of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
336
 
 
337
 
 
 
355
<td> the new start of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
338
356
</td>
339
357
</tr>
340
358
</tbody>
342
360
</div>
343
361
<hr>
344
362
<div class="refsect2" lang="en">
345
 
<a name="id3128746"></a><h3>
 
363
<a name="id3251616"></a><h3>
346
364
<a name="g-slist-insert"></a>g_slist_insert ()</h3>
347
 
<a class="indexterm" name="id3128758"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_insert                      (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
365
<a class="indexterm" name="id3251628"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_insert                      (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
348
366
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
349
367
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> position);</pre>
350
368
<p>
351
 
Inserts a new element into the list at the given position.
 
369
Inserts a new element into the list at the given position.</p>
 
370
<p>
 
371
 
352
372
</p>
353
373
<div class="variablelist"><table border="0">
354
374
<col align="left" valign="top">
355
375
<tbody>
356
376
<tr>
357
377
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
358
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
378
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
359
379
</td>
360
380
</tr>
361
381
<tr>
362
382
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
363
 
<td>the data for the new element.
 
383
<td> the data for the new element
364
384
</td>
365
385
</tr>
366
386
<tr>
367
387
<td><p><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></p></td>
368
 
<td>the position to insert the element. If this is negative, or is
369
 
larger than the number of elements in the list, the new element is added on
370
 
to the end of the list.
 
388
<td> the position to insert the element. 
 
389
    If this is negative, or is larger than the number 
 
390
    of elements in the list, the new element is added on
 
391
    to the end of the list.
371
392
</td>
372
393
</tr>
373
394
<tr>
374
395
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
375
 
<td>the new start of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
376
 
 
377
 
 
 
396
<td> the new start of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
378
397
</td>
379
398
</tr>
380
399
</tbody>
382
401
</div>
383
402
<hr>
384
403
<div class="refsect2" lang="en">
385
 
<a name="id3128878"></a><h3>
 
404
<a name="id3251751"></a><h3>
386
405
<a name="g-slist-insert-before"></a>g_slist_insert_before ()</h3>
387
 
<a class="indexterm" name="id3128891"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_insert_before               (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *slist,
 
406
<a class="indexterm" name="id3251765"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_insert_before               (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *slist,
388
407
                                                         <a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *sibling,
389
408
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
390
409
<p>
391
 
Inserts a node before <em class="parameter"><code>sibling</code></em> containing <em class="parameter"><code>data</code></em>. Returns the new head of the list.
 
410
Inserts a node before <em class="parameter"><code>sibling</code></em> containing <em class="parameter"><code>data</code></em>.</p>
 
411
<p>
 
412
 
392
413
</p>
393
414
<div class="variablelist"><table border="0">
394
415
<col align="left" valign="top">
395
416
<tbody>
396
417
<tr>
397
418
<td><p><span class="term"><em class="parameter"><code>slist</code></em>&#160;:</span></p></td>
398
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
419
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
399
420
</td>
400
421
</tr>
401
422
<tr>
402
423
<td><p><span class="term"><em class="parameter"><code>sibling</code></em>&#160;:</span></p></td>
403
 
<td>node to insert <em class="parameter"><code>data</code></em> before.
 
424
<td> node to insert <em class="parameter"><code>data</code></em> before
404
425
</td>
405
426
</tr>
406
427
<tr>
407
428
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
408
 
<td>data to put in the newly-inserted node.
 
429
<td> data to put in the newly-inserted node
409
430
</td>
410
431
</tr>
411
432
<tr>
412
433
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
413
 
<td>new head of the list.
414
 
 
415
 
 
 
434
<td> the new head of the list.
416
435
</td>
417
436
</tr>
418
437
</tbody>
420
439
</div>
421
440
<hr>
422
441
<div class="refsect2" lang="en">
423
 
<a name="id3129019"></a><h3>
 
442
<a name="id3251895"></a><h3>
424
443
<a name="g-slist-insert-sorted"></a>g_slist_insert_sorted ()</h3>
425
 
<a class="indexterm" name="id3129032"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_insert_sorted               (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
444
<a class="indexterm" name="id3251908"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_insert_sorted               (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
426
445
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
427
446
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareFunc">GCompareFunc</a> func);</pre>
428
447
<p>
429
 
Inserts a new element into the list, using the given comparison function
430
 
to determine its position.
 
448
Inserts a new element into the list, using the given 
 
449
comparison function to determine its position.</p>
 
450
<p>
 
451
 
431
452
</p>
432
453
<div class="variablelist"><table border="0">
433
454
<col align="left" valign="top">
434
455
<tbody>
435
456
<tr>
436
457
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
437
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
458
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
438
459
</td>
439
460
</tr>
440
461
<tr>
441
462
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
442
 
<td>the data for the new element.
 
463
<td> the data for the new element
443
464
</td>
444
465
</tr>
445
466
<tr>
446
467
<td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td>
447
 
<td>the function to compare elements in the list. It should return a
448
 
number &gt; 0 if the first parameter comes after the second parameter in
449
 
the sort order.
 
468
<td> the function to compare elements in the list. 
 
469
    It should return a number &gt; 0 if the first parameter 
 
470
    comes after the second parameter in the sort order.
450
471
</td>
451
472
</tr>
452
473
<tr>
453
474
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
454
 
<td>the new start of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
455
 
 
456
 
 
 
475
<td> the new start of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
457
476
</td>
458
477
</tr>
459
478
</tbody>
461
480
</div>
462
481
<hr>
463
482
<div class="refsect2" lang="en">
464
 
<a name="id3129153"></a><h3>
 
483
<a name="id3252037"></a><h3>
465
484
<a name="g-slist-remove"></a>g_slist_remove ()</h3>
466
 
<a class="indexterm" name="id3129166"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_remove                      (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
485
<a class="indexterm" name="id3252050"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_remove                      (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
467
486
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data);</pre>
468
487
<p>
469
488
Removes an element from a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
470
489
If two elements contain the same data, only the first is removed.
471
 
If none of the elements contain the data, the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> is unchanged.
 
490
If none of the elements contain the data, the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> is unchanged.</p>
 
491
<p>
 
492
 
472
493
</p>
473
494
<div class="variablelist"><table border="0">
474
495
<col align="left" valign="top">
475
496
<tbody>
476
497
<tr>
477
498
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
478
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
499
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
479
500
</td>
480
501
</tr>
481
502
<tr>
482
503
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
483
 
<td>the data of the element to remove.
 
504
<td> the data of the element to remove
484
505
</td>
485
506
</tr>
486
507
<tr>
487
508
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
488
 
<td>the new start of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
489
 
 
490
 
 
 
509
<td> the new start of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
491
510
</td>
492
511
</tr>
493
512
</tbody>
495
514
</div>
496
515
<hr>
497
516
<div class="refsect2" lang="en">
498
 
<a name="id3129279"></a><h3>
 
517
<a name="id3252166"></a><h3>
499
518
<a name="g-slist-remove-link"></a>g_slist_remove_link ()</h3>
500
 
<a class="indexterm" name="id3129292"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_remove_link                 (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
519
<a class="indexterm" name="id3252179"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_remove_link                 (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
501
520
                                                         <a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *link_);</pre>
502
521
<p>
503
 
Removes an element from a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>, without freeing the element.
504
 
The removed element's next link is set to <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, so that it becomes a
505
 
self-contained list with one element.
 
522
Removes an element from a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>, without 
 
523
freeing the element. The removed element's next 
 
524
link is set to <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, so that it becomes a
 
525
self-contained list with one element.</p>
 
526
<p>
 
527
 
506
528
</p>
507
529
<div class="variablelist"><table border="0">
508
530
<col align="left" valign="top">
509
531
<tbody>
510
532
<tr>
511
533
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
512
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
534
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
513
535
</td>
514
536
</tr>
515
537
<tr>
516
538
<td><p><span class="term"><em class="parameter"><code>link_</code></em>&#160;:</span></p></td>
517
 
<td>an element in the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
539
<td> an element in the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
518
540
</td>
519
541
</tr>
520
542
<tr>
521
543
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
522
 
<td>the new start of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>, without the element.
523
 
 
524
 
 
 
544
<td> the new start of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>, without the element
525
545
</td>
526
546
</tr>
527
547
</tbody>
529
549
</div>
530
550
<hr>
531
551
<div class="refsect2" lang="en">
532
 
<a name="id3129415"></a><h3>
 
552
<a name="id3252305"></a><h3>
533
553
<a name="g-slist-delete-link"></a>g_slist_delete_link ()</h3>
534
 
<a class="indexterm" name="id3129428"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_delete_link                 (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
554
<a class="indexterm" name="id3252319"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_delete_link                 (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
535
555
                                                         <a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *link_);</pre>
536
556
<p>
537
 
Deletes a node of <em class="parameter"><code>list</code></em>. Returns the new list head.
 
557
Removes the node link_ from the list and frees it. 
 
558
Compare this to <a class="link" href="glib-Singly-Linked-Lists.html#g-slist-remove-link"><code class="function">g_slist_remove_link()</code></a> which removes the node 
 
559
without freeing it.</p>
 
560
<p>
 
561
 
538
562
</p>
539
563
<div class="variablelist"><table border="0">
540
564
<col align="left" valign="top">
541
565
<tbody>
542
566
<tr>
543
567
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
544
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
568
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
545
569
</td>
546
570
</tr>
547
571
<tr>
548
572
<td><p><span class="term"><em class="parameter"><code>link_</code></em>&#160;:</span></p></td>
549
 
<td>node to delete.
 
573
<td> node to delete
550
574
</td>
551
575
</tr>
552
576
<tr>
553
577
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
554
 
<td>new head of <em class="parameter"><code>list</code></em>.
555
 
 
556
 
 
 
578
<td> the new head of <em class="parameter"><code>list</code></em>
557
579
</td>
558
580
</tr>
559
581
</tbody>
561
583
</div>
562
584
<hr>
563
585
<div class="refsect2" lang="en">
564
 
<a name="id3129527"></a><h3>
 
586
<a name="id3252426"></a><h3>
565
587
<a name="g-slist-remove-all"></a>g_slist_remove_all ()</h3>
566
 
<a class="indexterm" name="id3129540"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_remove_all                  (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
588
<a class="indexterm" name="id3252439"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_remove_all                  (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
567
589
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data);</pre>
568
590
<p>
569
 
Removes all list nodes with data equal to <em class="parameter"><code>data</code></em>. Returns the new
570
 
head of the list. Contrast with <a class="link" href="glib-Singly-Linked-Lists.html#g-slist-remove"><code class="function">g_slist_remove()</code></a> which removes only 
571
 
the first node matching the given data.
 
591
Removes all list nodes with data equal to <em class="parameter"><code>data</code></em>. 
 
592
Returns the new head of the list. Contrast with 
 
593
<a class="link" href="glib-Singly-Linked-Lists.html#g-slist-remove"><code class="function">g_slist_remove()</code></a> which removes only the first node 
 
594
matching the given data.</p>
 
595
<p>
 
596
 
572
597
</p>
573
598
<div class="variablelist"><table border="0">
574
599
<col align="left" valign="top">
575
600
<tbody>
576
601
<tr>
577
602
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
578
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
603
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
579
604
</td>
580
605
</tr>
581
606
<tr>
582
607
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
583
 
<td>data to remove.
 
608
<td> data to remove
584
609
</td>
585
610
</tr>
586
611
<tr>
587
612
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
588
 
<td>new head of <em class="parameter"><code>list</code></em>.
589
 
 
590
 
 
 
613
<td> new head of <em class="parameter"><code>list</code></em>
591
614
</td>
592
615
</tr>
593
616
</tbody>
595
618
</div>
596
619
<hr>
597
620
<div class="refsect2" lang="en">
598
 
<a name="id3129651"></a><h3>
 
621
<a name="id3252553"></a><h3>
599
622
<a name="g-slist-free"></a>g_slist_free ()</h3>
600
 
<a class="indexterm" name="id3129664"></a><pre class="programlisting">void                g_slist_free                        (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list);</pre>
 
623
<a class="indexterm" name="id3252566"></a><pre class="programlisting">void                g_slist_free                        (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list);</pre>
601
624
<p>
602
625
Frees all of the memory used by a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
603
 
The freed elements are returned to the slice allocator.
 
626
The freed elements are returned to the slice allocator.</p>
 
627
<p>
 
628
 
604
629
</p>
605
630
<div class="variablelist"><table border="0">
606
631
<col align="left" valign="top">
607
632
<tbody><tr>
608
633
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
609
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
610
 
 
611
 
 
 
634
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
612
635
</td>
613
636
</tr></tbody>
614
637
</table></div>
615
638
</div>
616
639
<hr>
617
640
<div class="refsect2" lang="en">
618
 
<a name="id3129727"></a><h3>
 
641
<a name="id3252632"></a><h3>
619
642
<a name="g-slist-free-1"></a>g_slist_free_1 ()</h3>
620
 
<a class="indexterm" name="id3129740"></a><pre class="programlisting">void                g_slist_free_1                      (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list);</pre>
 
643
<a class="indexterm" name="id3252645"></a><pre class="programlisting">void                g_slist_free_1                      (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list);</pre>
621
644
<p>
622
645
Frees one <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> element.
623
 
It is usually used after <a class="link" href="glib-Singly-Linked-Lists.html#g-slist-remove-link"><code class="function">g_slist_remove_link()</code></a>.
 
646
It is usually used after <a class="link" href="glib-Singly-Linked-Lists.html#g-slist-remove-link"><code class="function">g_slist_remove_link()</code></a>.</p>
 
647
<p>
 
648
 
624
649
</p>
625
650
<div class="variablelist"><table border="0">
626
651
<col align="left" valign="top">
627
652
<tbody><tr>
628
653
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
629
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> element.
630
 
 
631
 
 
 
654
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> element
632
655
</td>
633
656
</tr></tbody>
634
657
</table></div>
635
658
</div>
636
659
<hr>
637
660
<div class="refsect2" lang="en">
638
 
<a name="id3129813"></a><h3>
 
661
<a name="id3252721"></a><h3>
639
662
<a name="g-slist-free1"></a>g_slist_free1</h3>
640
 
<a class="indexterm" name="id3129828"></a><pre class="programlisting">#define             g_slist_free1</pre>
 
663
<a class="indexterm" name="id3252737"></a><pre class="programlisting">#define             g_slist_free1</pre>
641
664
<p>
642
665
A macro which does the same as <a class="link" href="glib-Singly-Linked-Lists.html#g-slist-free-1"><code class="function">g_slist_free_1()</code></a>.
643
666
</p>
648
671
</div>
649
672
<hr>
650
673
<div class="refsect2" lang="en">
651
 
<a name="id3129862"></a><h3>
 
674
<a name="id3252770"></a><h3>
652
675
<a name="g-slist-length"></a>g_slist_length ()</h3>
653
 
<a class="indexterm" name="id3129875"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint">guint</a>               g_slist_length                      (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list);</pre>
 
676
<a class="indexterm" name="id3252783"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint">guint</a>               g_slist_length                      (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list);</pre>
654
677
<p>
655
678
Gets the number of elements in a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
656
679
</p>
 
680
<p>
 
681
</p>
 
682
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
 
683
<h3 class="title">Note</h3>
 
684
<p>
 
685
This function iterates over the whole list to 
 
686
count its elements.
 
687
</p>
 
688
</div>
 
689
<p>
 
690
 
 
691
</p>
657
692
<div class="variablelist"><table border="0">
658
693
<col align="left" valign="top">
659
694
<tbody>
660
695
<tr>
661
696
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
662
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
697
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
663
698
</td>
664
699
</tr>
665
700
<tr>
666
701
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
667
 
<td>the number of elements in the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
668
 
 
669
 
 
 
702
<td> the number of elements in the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
670
703
</td>
671
704
</tr>
672
705
</tbody>
674
707
</div>
675
708
<hr>
676
709
<div class="refsect2" lang="en">
677
 
<a name="id3129956"></a><h3>
 
710
<a name="id3252875"></a><h3>
678
711
<a name="g-slist-copy"></a>g_slist_copy ()</h3>
679
 
<a class="indexterm" name="id3129968"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_copy                        (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list);</pre>
 
712
<a class="indexterm" name="id3252887"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_copy                        (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list);</pre>
680
713
<p>
681
714
Copies a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
682
715
</p>
683
716
<p>
684
 
Note that this is a "shallow" copy. If the list elements consist of pointers
685
 
to data, the pointers are copied but the actual data isn't.
 
717
</p>
 
718
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
 
719
<h3 class="title">Note</h3>
 
720
<p>
 
721
Note that this is a "shallow" copy. If the list elements 
 
722
consist of pointers to data, the pointers are copied but 
 
723
the actual data isn't.
 
724
</p>
 
725
</div>
 
726
<p>
 
727
 
686
728
</p>
687
729
<div class="variablelist"><table border="0">
688
730
<col align="left" valign="top">
689
731
<tbody>
690
732
<tr>
691
733
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
692
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
734
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
693
735
</td>
694
736
</tr>
695
737
<tr>
696
738
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
697
 
<td>a copy of <em class="parameter"><code>list</code></em>.
698
 
 
699
 
 
 
739
<td> a copy of <em class="parameter"><code>list</code></em>
700
740
</td>
701
741
</tr>
702
742
</tbody>
704
744
</div>
705
745
<hr>
706
746
<div class="refsect2" lang="en">
707
 
<a name="id3130052"></a><h3>
 
747
<a name="id3252977"></a><h3>
708
748
<a name="g-slist-reverse"></a>g_slist_reverse ()</h3>
709
 
<a class="indexterm" name="id3130065"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_reverse                     (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list);</pre>
710
 
<p>
711
 
Reverses a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
749
<a class="indexterm" name="id3252990"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_reverse                     (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list);</pre>
 
750
<p>
 
751
Reverses a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.</p>
 
752
<p>
 
753
 
712
754
</p>
713
755
<div class="variablelist"><table border="0">
714
756
<col align="left" valign="top">
715
757
<tbody>
716
758
<tr>
717
759
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
718
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
760
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
719
761
</td>
720
762
</tr>
721
763
<tr>
722
764
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
723
 
<td>the start of the reversed <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
724
 
 
725
 
 
 
765
<td> the start of the reversed <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
726
766
</td>
727
767
</tr>
728
768
</tbody>
730
770
</div>
731
771
<hr>
732
772
<div class="refsect2" lang="en">
733
 
<a name="id3130145"></a><h3>
 
773
<a name="id3253074"></a><h3>
734
774
<a name="g-slist-insert-sorted-with-data"></a>g_slist_insert_sorted_with_data ()</h3>
735
 
<a class="indexterm" name="id3130158"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_insert_sorted_with_data     (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
775
<a class="indexterm" name="id3253089"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_insert_sorted_with_data     (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
736
776
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
737
777
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> func,
738
778
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
739
779
<p>
740
 
Inserts a new element into the list, using the given comparison function
741
 
to determine its position.
 
780
Inserts a new element into the list, using the given 
 
781
comparison function to determine its position.</p>
 
782
<p>
 
783
 
742
784
</p>
743
785
<div class="variablelist"><table border="0">
744
786
<col align="left" valign="top">
745
787
<tbody>
746
788
<tr>
747
789
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
748
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
790
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
749
791
</td>
750
792
</tr>
751
793
<tr>
752
794
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
753
 
<td>the data for the new element.
 
795
<td> the data for the new element
754
796
</td>
755
797
</tr>
756
798
<tr>
757
799
<td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td>
758
 
<td>the function to compare elements in the list. It should return a
759
 
number &gt; 0 if the first parameter comes after the second parameter in
760
 
the sort order.
 
800
<td> the function to compare elements in the list. 
 
801
    It should return a number &gt; 0 if the first parameter 
 
802
    comes after the second parameter in the sort order.
761
803
</td>
762
804
</tr>
763
805
<tr>
764
806
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
765
 
<td>data to pass to comparison function.
 
807
<td> data to pass to comparison function
766
808
</td>
767
809
</tr>
768
810
<tr>
769
811
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
770
 
<td>the new start of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
771
 
<em class="parameter"><code>Since</code></em> 2.10
772
 
 
 
812
<td> the new start of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
773
813
 
774
814
</td>
775
815
</tr>
776
816
</tbody>
777
817
</table></div>
 
818
<p class="since">Since  2.10
 
819
</p>
778
820
</div>
779
821
<hr>
780
822
<div class="refsect2" lang="en">
781
 
<a name="id3130307"></a><h3>
 
823
<a name="id3253248"></a><h3>
782
824
<a name="g-slist-sort"></a>g_slist_sort ()</h3>
783
 
<a class="indexterm" name="id3130320"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_sort                        (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
825
<a class="indexterm" name="id3253261"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_sort                        (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
784
826
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareFunc">GCompareFunc</a> compare_func);</pre>
785
827
<p>
786
 
Sorts a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> using the given comparison function.
 
828
Sorts a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> using the given comparison function.</p>
 
829
<p>
 
830
 
787
831
</p>
788
832
<div class="variablelist"><table border="0">
789
833
<col align="left" valign="top">
790
834
<tbody>
791
835
<tr>
792
836
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
793
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
837
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
794
838
</td>
795
839
</tr>
796
840
<tr>
797
841
<td><p><span class="term"><em class="parameter"><code>compare_func</code></em>&#160;:</span></p></td>
798
 
<td>the comparison function used to sort the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>. 
799
 
This function is passed the data from 2 elements of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> and should 
800
 
return 0 if they are equal, a negative value if the first element 
801
 
comes before the second, or a positive value if the first element 
802
 
comes after the second.
 
842
<td> the comparison function used to sort the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
843
    This function is passed the data from 2 elements of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> 
 
844
    and should return 0 if they are equal, a negative value if the 
 
845
    first element comes before the second, or a positive value if 
 
846
    the first element comes after the second.
803
847
</td>
804
848
</tr>
805
849
<tr>
806
850
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
807
 
<td>the start of the sorted <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
808
 
 
809
 
 
 
851
<td> the start of the sorted <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
810
852
</td>
811
853
</tr>
812
854
</tbody>
814
856
</div>
815
857
<hr>
816
858
<div class="refsect2" lang="en">
817
 
<a name="id3130444"></a><h3>
 
859
<a name="id3253388"></a><h3>
818
860
<a name="g-slist-sort-with-data"></a>g_slist_sort_with_data ()</h3>
819
 
<a class="indexterm" name="id3130457"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_sort_with_data              (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
861
<a class="indexterm" name="id3253401"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_sort_with_data              (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
820
862
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> compare_func,
821
863
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
822
864
<p>
823
 
Like <a class="link" href="glib-Singly-Linked-Lists.html#g-slist-sort"><code class="function">g_slist_sort()</code></a>, but the sort function accepts a user data argument.
 
865
Like <a class="link" href="glib-Singly-Linked-Lists.html#g-slist-sort"><code class="function">g_slist_sort()</code></a>, but the sort function accepts a user data argument.</p>
 
866
<p>
 
867
 
824
868
</p>
825
869
<div class="variablelist"><table border="0">
826
870
<col align="left" valign="top">
827
871
<tbody>
828
872
<tr>
829
873
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
830
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
 
874
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
831
875
</td>
832
876
</tr>
833
877
<tr>
834
878
<td><p><span class="term"><em class="parameter"><code>compare_func</code></em>&#160;:</span></p></td>
835
 
<td>comparison function.
 
879
<td> comparison function
836
880
</td>
837
881
</tr>
838
882
<tr>
839
883
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
840
 
<td>data to pass to comparison function.
 
884
<td> data to pass to comparison function
841
885
</td>
842
886
</tr>
843
887
<tr>
844
888
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
845
 
<td>new head of the list.
846
 
 
847
 
 
 
889
<td> new head of the list
848
890
</td>
849
891
</tr>
850
892
</tbody>
852
894
</div>
853
895
<hr>
854
896
<div class="refsect2" lang="en">
855
 
<a name="id3130578"></a><h3>
 
897
<a name="id3253525"></a><h3>
856
898
<a name="g-slist-concat"></a>g_slist_concat ()</h3>
857
 
<a class="indexterm" name="id3130591"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_concat                      (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list1,
 
899
<a class="indexterm" name="id3253538"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_concat                      (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list1,
858
900
                                                         <a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list2);</pre>
859
901
<p>
860
902
Adds the second <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> onto the end of the first <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
861
903
Note that the elements of the second <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> are not copied.
862
 
They are used directly.
 
904
They are used directly.</p>
 
905
<p>
 
906
 
863
907
</p>
864
908
<div class="variablelist"><table border="0">
865
909
<col align="left" valign="top">
866
910
<tbody>
867
911
<tr>
868
912
<td><p><span class="term"><em class="parameter"><code>list1</code></em>&#160;:</span></p></td>
869
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
913
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
870
914
</td>
871
915
</tr>
872
916
<tr>
873
917
<td><p><span class="term"><em class="parameter"><code>list2</code></em>&#160;:</span></p></td>
874
 
<td>the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> to add to the end of the first <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
918
<td> the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> to add to the end of the first <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
875
919
</td>
876
920
</tr>
877
921
<tr>
878
922
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
879
 
<td>the start of the new <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
880
 
 
881
 
 
 
923
<td> the start of the new <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
882
924
</td>
883
925
</tr>
884
926
</tbody>
886
928
</div>
887
929
<hr>
888
930
<div class="refsect2" lang="en">
889
 
<a name="id3130726"></a><h3>
 
931
<a name="id3253676"></a><h3>
890
932
<a name="g-slist-foreach"></a>g_slist_foreach ()</h3>
891
 
<a class="indexterm" name="id3130739"></a><pre class="programlisting">void                g_slist_foreach                     (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
933
<a class="indexterm" name="id3253689"></a><pre class="programlisting">void                g_slist_foreach                     (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
892
934
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GFunc">GFunc</a> func,
893
935
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
894
936
<p>
895
 
Calls a function for each element of a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
937
Calls a function for each element of a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.</p>
 
938
<p>
 
939
 
896
940
</p>
897
941
<div class="variablelist"><table border="0">
898
942
<col align="left" valign="top">
899
943
<tbody>
900
944
<tr>
901
945
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
902
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
946
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
903
947
</td>
904
948
</tr>
905
949
<tr>
906
950
<td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td>
907
 
<td>the function to call with each element's data.
 
951
<td> the function to call with each element's data
908
952
</td>
909
953
</tr>
910
954
<tr>
911
955
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
912
 
<td>user data to pass to the function.
913
 
 
914
 
 
 
956
<td> user data to pass to the function
915
957
</td>
916
958
</tr>
917
959
</tbody>
919
961
</div>
920
962
<hr>
921
963
<div class="refsect2" lang="en">
922
 
<a name="id3130846"></a><h3>
 
964
<a name="id3253799"></a><h3>
923
965
<a name="g-slist-last"></a>g_slist_last ()</h3>
924
 
<a class="indexterm" name="id3130858"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_last                        (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list);</pre>
 
966
<a class="indexterm" name="id3253811"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_last                        (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list);</pre>
925
967
<p>
926
968
Gets the last element in a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
969
 
 
970
</p>
 
971
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
 
972
<h3 class="title">Note</h3>
 
973
<p>
 
974
This function iterates over the whole list.
 
975
</p>
 
976
</div>
 
977
<p>
 
978
 
927
979
</p>
928
980
<div class="variablelist"><table border="0">
929
981
<col align="left" valign="top">
930
982
<tbody>
931
983
<tr>
932
984
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
933
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
985
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> 
934
986
</td>
935
987
</tr>
936
988
<tr>
937
989
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
938
 
<td>the last element in the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> has no
939
 
elements.
940
 
 
941
 
 
 
990
<td> the last element in the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>, 
 
991
    or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> has no elements
942
992
</td>
943
993
</tr>
944
994
</tbody>
946
996
</div>
947
997
<hr>
948
998
<div class="refsect2" lang="en">
949
 
<a name="id3130958"></a><h3>
 
999
<a name="id3253918"></a><h3>
950
1000
<a name="g-slist-next"></a>g_slist_next()</h3>
951
 
<a class="indexterm" name="id3130970"></a><pre class="programlisting">#define             g_slist_next(slist)</pre>
 
1001
<a class="indexterm" name="id3253930"></a><pre class="programlisting">#define             g_slist_next(slist)</pre>
952
1002
<p>
953
1003
A convenience macro to gets the next element in a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
954
1004
</p>
972
1022
</div>
973
1023
<hr>
974
1024
<div class="refsect2" lang="en">
975
 
<a name="id3131041"></a><h3>
 
1025
<a name="id3254002"></a><h3>
976
1026
<a name="g-slist-nth"></a>g_slist_nth ()</h3>
977
 
<a class="indexterm" name="id3131054"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_nth                         (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
1027
<a class="indexterm" name="id3254014"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_nth                         (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
978
1028
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> n);</pre>
979
1029
<p>
980
 
Gets the element at the given position in a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
1030
Gets the element at the given position in a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.</p>
 
1031
<p>
 
1032
 
981
1033
</p>
982
1034
<div class="variablelist"><table border="0">
983
1035
<col align="left" valign="top">
984
1036
<tbody>
985
1037
<tr>
986
1038
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
987
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
1039
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
988
1040
</td>
989
1041
</tr>
990
1042
<tr>
991
1043
<td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td>
992
 
<td>the position of the element, counting from 0.
 
1044
<td> the position of the element, counting from 0
993
1045
</td>
994
1046
</tr>
995
1047
<tr>
996
1048
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
997
 
<td>the element, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the position is off the end of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
998
 
 
999
 
 
 
1049
<td> the element, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the position is off 
 
1050
    the end of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
1000
1051
</td>
1001
1052
</tr>
1002
1053
</tbody>
1004
1055
</div>
1005
1056
<hr>
1006
1057
<div class="refsect2" lang="en">
1007
 
<a name="id3131167"></a><h3>
 
1058
<a name="id3254131"></a><h3>
1008
1059
<a name="g-slist-nth-data"></a>g_slist_nth_data ()</h3>
1009
 
<a class="indexterm" name="id3131180"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            g_slist_nth_data                    (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
1060
<a class="indexterm" name="id3254144"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            g_slist_nth_data                    (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
1010
1061
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> n);</pre>
1011
1062
<p>
1012
 
Gets the data of the element at the given position.
 
1063
Gets the data of the element at the given position.</p>
 
1064
<p>
 
1065
 
1013
1066
</p>
1014
1067
<div class="variablelist"><table border="0">
1015
1068
<col align="left" valign="top">
1016
1069
<tbody>
1017
1070
<tr>
1018
1071
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
1019
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
1072
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
1020
1073
</td>
1021
1074
</tr>
1022
1075
<tr>
1023
1076
<td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td>
1024
 
<td>the position of the element.
 
1077
<td> the position of the element
1025
1078
</td>
1026
1079
</tr>
1027
1080
<tr>
1028
1081
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1029
 
<td>the element's data, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the position is off the end of the
1030
 
<a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
1031
 
 
1032
 
 
 
1082
<td> the element's data, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the position 
 
1083
    is off the end of the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
1033
1084
</td>
1034
1085
</tr>
1035
1086
</tbody>
1037
1088
</div>
1038
1089
<hr>
1039
1090
<div class="refsect2" lang="en">
1040
 
<a name="id3131286"></a><h3>
 
1091
<a name="id3254253"></a><h3>
1041
1092
<a name="g-slist-find"></a>g_slist_find ()</h3>
1042
 
<a class="indexterm" name="id3131299"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_find                        (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
1093
<a class="indexterm" name="id3254266"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_find                        (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
1043
1094
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data);</pre>
1044
1095
<p>
1045
 
Finds the element in a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> which contains the given data.
 
1096
Finds the element in a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> which 
 
1097
contains the given data.</p>
 
1098
<p>
 
1099
 
1046
1100
</p>
1047
1101
<div class="variablelist"><table border="0">
1048
1102
<col align="left" valign="top">
1049
1103
<tbody>
1050
1104
<tr>
1051
1105
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
1052
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
1106
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
1053
1107
</td>
1054
1108
</tr>
1055
1109
<tr>
1056
1110
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
1057
 
<td>the element data to find.
 
1111
<td> the element data to find
1058
1112
</td>
1059
1113
</tr>
1060
1114
<tr>
1061
1115
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1062
 
<td>the found <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> element, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it is not found.
1063
 
 
1064
 
 
 
1116
<td> the found <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> element, 
 
1117
    or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it is not found
1065
1118
</td>
1066
1119
</tr>
1067
1120
</tbody>
1069
1122
</div>
1070
1123
<hr>
1071
1124
<div class="refsect2" lang="en">
1072
 
<a name="id3131413"></a><h3>
 
1125
<a name="id3254383"></a><h3>
1073
1126
<a name="g-slist-find-custom"></a>g_slist_find_custom ()</h3>
1074
 
<a class="indexterm" name="id3131426"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_find_custom                 (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
1127
<a class="indexterm" name="id3254396"></a><pre class="programlisting"><a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a>*             g_slist_find_custom                 (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
1075
1128
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data,
1076
1129
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareFunc">GCompareFunc</a> func);</pre>
1077
1130
<p>
1078
 
Finds an element in a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>, using a supplied function to find the desired
1079
 
element.
1080
 
It iterates over the list, calling the given function which should return 0
1081
 
when the desired element is found.
1082
 
The function takes two <a class="link" href="glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> arguments, the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> element's data as
1083
 
the first argument and the given user data.
 
1131
Finds an element in a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>, using a supplied function to 
 
1132
find the desired element. It iterates over the list, calling 
 
1133
the given function which should return 0 when the desired 
 
1134
element is found. The function takes two <a class="link" href="glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> arguments, 
 
1135
the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> element's data as the first argument and the 
 
1136
given user data.</p>
 
1137
<p>
 
1138
 
1084
1139
</p>
1085
1140
<div class="variablelist"><table border="0">
1086
1141
<col align="left" valign="top">
1087
1142
<tbody>
1088
1143
<tr>
1089
1144
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
1090
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
1145
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
1091
1146
</td>
1092
1147
</tr>
1093
1148
<tr>
1094
1149
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
1095
 
<td>user data passed to the function.
 
1150
<td> user data passed to the function
1096
1151
</td>
1097
1152
</tr>
1098
1153
<tr>
1099
1154
<td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td>
1100
 
<td>the function to call for each element. It should return 0 when the
1101
 
desired element is found.
 
1155
<td> the function to call for each element. 
 
1156
    It should return 0 when the desired element is found
1102
1157
</td>
1103
1158
</tr>
1104
1159
<tr>
1105
1160
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1106
 
<td>the found <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> element, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it is not found.
1107
 
 
1108
 
 
 
1161
<td> the found <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> element, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it is not found
1109
1162
</td>
1110
1163
</tr>
1111
1164
</tbody>
1113
1166
</div>
1114
1167
<hr>
1115
1168
<div class="refsect2" lang="en">
1116
 
<a name="id3131584"></a><h3>
 
1169
<a name="id3254557"></a><h3>
1117
1170
<a name="g-slist-position"></a>g_slist_position ()</h3>
1118
 
<a class="indexterm" name="id3131597"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_slist_position                    (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
1171
<a class="indexterm" name="id3254570"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_slist_position                    (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
1119
1172
                                                         <a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *llink);</pre>
1120
1173
<p>
1121
 
Gets the position of the given element in the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> (starting from 0).
 
1174
Gets the position of the given element 
 
1175
in the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> (starting from 0).</p>
 
1176
<p>
 
1177
 
1122
1178
</p>
1123
1179
<div class="variablelist"><table border="0">
1124
1180
<col align="left" valign="top">
1125
1181
<tbody>
1126
1182
<tr>
1127
1183
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
1128
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
1184
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
1129
1185
</td>
1130
1186
</tr>
1131
1187
<tr>
1132
1188
<td><p><span class="term"><em class="parameter"><code>llink</code></em>&#160;:</span></p></td>
1133
 
<td>an element in the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
1189
<td> an element in the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
1134
1190
</td>
1135
1191
</tr>
1136
1192
<tr>
1137
1193
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1138
 
<td>the position of the element in the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>, or -1 if the element
1139
 
is not found.
1140
 
 
1141
 
 
 
1194
<td> the position of the element in the <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>, 
 
1195
    or -1 if the element is not found
1142
1196
</td>
1143
1197
</tr>
1144
1198
</tbody>
1146
1200
</div>
1147
1201
<hr>
1148
1202
<div class="refsect2" lang="en">
1149
 
<a name="id3131709"></a><h3>
 
1203
<a name="id3254685"></a><h3>
1150
1204
<a name="g-slist-index"></a>g_slist_index ()</h3>
1151
 
<a class="indexterm" name="id3131722"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_slist_index                       (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
 
1205
<a class="indexterm" name="id3254698"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_slist_index                       (<a class="link" href="glib-Singly-Linked-Lists.html#GSList">GSList</a> *list,
1152
1206
                                                         <a class="link" href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data);</pre>
1153
1207
<p>
1154
 
Gets the position of the element containing the given data (starting from 0).
 
1208
Gets the position of the element containing 
 
1209
the given data (starting from 0).</p>
 
1210
<p>
 
1211
 
1155
1212
</p>
1156
1213
<div class="variablelist"><table border="0">
1157
1214
<col align="left" valign="top">
1158
1215
<tbody>
1159
1216
<tr>
1160
1217
<td><p><span class="term"><em class="parameter"><code>list</code></em>&#160;:</span></p></td>
1161
 
<td>a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>.
 
1218
<td> a <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>
1162
1219
</td>
1163
1220
</tr>
1164
1221
<tr>
1165
1222
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
1166
 
<td>the data to find.
 
1223
<td> the data to find
1167
1224
</td>
1168
1225
</tr>
1169
1226
<tr>
1170
1227
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
1171
 
<td>the index of the element containing the data, or -1 if the data
1172
 
is not found.
1173
 
 
1174
 
 
 
1228
<td> the index of the element containing the data, 
 
1229
    or -1 if the data is not found
1175
1230
</td>
1176
1231
</tr>
1177
1232
</tbody>
1179
1234
</div>
1180
1235
<hr>
1181
1236
<div class="refsect2" lang="en">
1182
 
<a name="id3131811"></a><h3>
 
1237
<a name="id3254790"></a><h3>
1183
1238
<a name="g-slist-push-allocator"></a>g_slist_push_allocator ()</h3>
1184
 
<a class="indexterm" name="id3131826"></a><pre class="programlisting">void                g_slist_push_allocator              (<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> dummy);</pre>
 
1239
<a class="indexterm" name="id3254806"></a><pre class="programlisting">void                g_slist_push_allocator              (<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> dummy);</pre>
1185
1240
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1186
1241
<h3 class="title">Warning</h3>
1187
1242
<p><code class="literal">g_slist_push_allocator</code> has been deprecated since version 2.10 and should not be used in newly-written code. It does nothing, since <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> has been
1206
1261
</div>
1207
1262
<hr>
1208
1263
<div class="refsect2" lang="en">
1209
 
<a name="id3131945"></a><h3>
 
1264
<a name="id3254925"></a><h3>
1210
1265
<a name="g-slist-pop-allocator"></a>g_slist_pop_allocator ()</h3>
1211
 
<a class="indexterm" name="id3131960"></a><pre class="programlisting">void                g_slist_pop_allocator               (void);</pre>
 
1266
<a class="indexterm" name="id3254940"></a><pre class="programlisting">void                g_slist_pop_allocator               (void);</pre>
1212
1267
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1213
1268
<h3 class="title">Warning</h3>
1214
1269
<p><code class="literal">g_slist_pop_allocator</code> has been deprecated since version 2.10 and should not be used in newly-written code. It does nothing, since <a class="link" href="glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> has been
1224
1279
</div>
1225
1280
</div>
1226
1281
<div class="refsect1" lang="en">
1227
 
<a name="id3132036"></a><div class="refsect2" lang="en"><a name="id3132037"></a></div>
 
1282
<a name="id3255015"></a><div class="refsect2" lang="en"><a name="id3255016"></a></div>
1228
1283
<hr>
1229
 
<div class="refsect2" lang="en"><a name="id3132038"></a></div>
 
1284
<div class="refsect2" lang="en"><a name="id3255017"></a></div>
1230
1285
</div>
1231
1286
</div>
1232
1287
</body>