~ubuntu-branches/ubuntu/utopic/esorex/utopic

« back to all changes in this revision

Viewing changes to libltdl/slist.c

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2012-05-11 12:00:00 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120511120000-4uz6r3lrod1dkly5
Tags: 3.9.6-1
* New upstream version
* Add Multi-Arch default plugin directory
* Set DM-Upload-Allowed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* slist.c -- generalised singly linked lists
2
2
 
3
 
   Copyright (C) 2000, 2004, 2007, 2008 Free Software Foundation, Inc.
 
3
   Copyright (C) 2000, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
4
4
   Written by Gary V. Vaughan, 2000
5
5
 
6
6
   NOTE: The canonical source of this file is maintained with the
32
32
 
33
33
#include "slist.h"
34
34
#include <stddef.h>
 
35
#include <stdlib.h>
35
36
 
36
37
static SList *  slist_sort_merge    (SList *left, SList *right,
37
38
                                     SListCompare *compare, void *userdata);
73
74
           the stale item, you should probably return that from FIND if
74
75
           it makes a successful match.  Don't forget to slist_unbox()
75
76
           every item in a boxed list before operating on its contents.   */
76
 
void *
 
77
SList *
77
78
slist_remove (SList **phead, SListCallback *find, void *matchdata)
78
79
{
79
80
  SList *stale = 0;
107
108
        }
108
109
    }
109
110
 
110
 
  return result;
 
111
  return (SList *) result;
111
112
}
112
113
 
113
114
/* Call FIND repeatedly with each element of SLIST and MATCHDATA, until
314
315
  left = slist;
315
316
  right = slist->next;
316
317
 
 
318
  if (!right)
 
319
    return left;
 
320
 
317
321
  /* Skip two items with RIGHT and one with SLIST, until RIGHT falls off
318
322
     the end.  SLIST must be about half way along.  */
319
323
  while (right && (right = right->next))