2 * Neotonic ClearSilver Templating System
4 * This code is made available under the terms of the
5 * Neotonic ClearSilver License.
6 * http://www.neotonic.com/clearsilver/license.hdf
8 * Copyright (C) 2001 by Brandon Long
11 #ifndef incl_HPHP_ULIST_H_
12 #define incl_HPHP_ULIST_H_ 1
14 #include "hphp/neo/neo_err.h"
24 #define ULIST_INTEGER (1<<0)
25 #define ULIST_FREE (1<<1)
26 #define ULIST_COPY (1<<2)
28 NEOERR
* uListInit(ULIST
**ul
, int size
, int flags
);
29 NEOERR
* uListvInit(ULIST
**ul
, ...);
30 int uListLength (ULIST
*ul
);
31 NEOERR
* uListAppend (ULIST
*ul
, void *data
);
32 NEOERR
* uListPop (ULIST
*ul
, void **data
);
33 NEOERR
* uListInsert (ULIST
*ul
, int x
, void *data
);
34 NEOERR
* uListDelete (ULIST
*ul
, int x
, void **data
);
35 NEOERR
* uListGet (ULIST
*ul
, int x
, void **data
);
36 NEOERR
* uListSet (ULIST
*ul
, int x
, void *data
);
37 NEOERR
* uListReverse (ULIST
*ul
);
38 NEOERR
* uListSort (ULIST
*ul
, int (*compareFunc
)(const void*, const void*));
39 void *uListSearch (ULIST
*ul
, const void *key
, int (*compareFunc
)(const void *, const void*));
40 void *uListIn (ULIST
*ul
, const void *key
, int (*compareFunc
)(const void *, const void*));
41 int uListIndex (ULIST
*ul
, const void *key
, int (*compareFunc
)(const void *, const void*));
42 NEOERR
* uListDestroy (ULIST
**ul
, int flags
);
43 NEOERR
* uListDestroyFunc (ULIST
**ul
, void (*destroyFunc
)(void *));
45 #endif /* incl_HPHP_ULIST_H_ */