91 gn->data.i = (long)val;
103 gn->data.ui = (
unsigned long)val;
115 gn->data.fl = (double)val;
127 gn->data.fl = (double)val;
150 for (gn = g, n = 0; gn; gn = gn->
next, n++);
163 for (gn = g; gn->
next; gn = gn->
next);
175 for (gn = g; gn; gn = nextgn) {
192 newgn->data.ptr = ptr;
220 newgn->data.ui = val;
235 newgn->data.fl = (double)val;
249 newgn->data.fl = (double)val;
263 assert(pred->
next == gn);
SPHINXBASE_EXPORT glist_t glist_add_float32(glist_t g, float32 val)
Create and prepend a new list node containing a single-precision float.
#define ckd_calloc(n, sz)
Macros to simplify the use of above functions.
SPHINXBASE_EXPORT glist_t glist_add_int32(glist_t g, int32 val)
Create and prepend a new list node containing an integer.
SPHINXBASE_EXPORT gnode_t * glist_insert_uint32(gnode_t *gn, uint32 val)
Create and insert a new list node containing an unsigned integer.
Sphinx's memory allocation/deallocation routines.
SPHINXBASE_EXPORT gnode_t * glist_insert_int32(gnode_t *gn, int32 val)
Create and insert a new list node containing an integer.
A node in a generic list.
SPHINXBASE_EXPORT void ckd_free(void *ptr)
Test and free a 1-D array.
SPHINXBASE_EXPORT glist_t glist_add_ptr(glist_t g, void *ptr)
Create and prepend a new list node, with the given user-defined data, at the HEAD of the given generi...
SPHINXBASE_EXPORT gnode_t * glist_insert_float64(gnode_t *gn, float64 val)
Create and insert a new list node containing a double-precision float.
SPHINXBASE_EXPORT glist_t glist_reverse(glist_t g)
Reverse the order of the given glist.
SPHINXBASE_EXPORT void glist_free(glist_t g)
Free the given generic list; user-defined data contained within is not automatically freed...
SPHINXBASE_EXPORT gnode_t * gnode_free(gnode_t *gn, gnode_t *pred)
Free the given node, gn, of a glist, pred being its predecessor in the list.
Generic linked-lists maintenance.
SPHINXBASE_EXPORT gnode_t * glist_tail(glist_t g)
Return the last node in the given list.
SPHINXBASE_EXPORT gnode_t * glist_insert_float32(gnode_t *gn, float32 val)
Create and insert a new list node containing a single-precision float.
struct gnode_s * next
See prim_type.h.
SPHINXBASE_EXPORT glist_t glist_add_float64(glist_t g, float64 val)
Create and prepend a new list node containing a double-precision float.
SPHINXBASE_EXPORT glist_t glist_add_uint32(glist_t g, uint32 val)
Create and prepend a new list node containing an unsigned integer.
SPHINXBASE_EXPORT int32 glist_count(glist_t g)
Count the number of element in a given link list.
SPHINXBASE_EXPORT gnode_t * glist_insert_ptr(gnode_t *gn, void *ptr)
Create and insert a new list node, with the given user-defined data, after the given generic node gn...