r6.0.1:lfds601_stack_new

From liblfds.org
Revision as of 14:07, 4 January 2015 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source Files

/liblfds601/src/lfds601_stack/lfds601_stack_new.c
/liblfds601/inc/liblfds601.h

Prototype

int lfds601_stack_new( struct lfds601_stack_state **ss, lfds601_atom_t number_elements );

Parameters

struct lfds601_stack_state **ss

A pointer to a pointer onto which is allocated the state which represents this stack. Set to NULL if stack creation fails.

lfds601_atom_t number_elements

The maximum number of elements which can be present in the stack. These elements will be allocated when the stack is created. If not all elements could be allocated (malloc() fails), stack creation fails.

Return Value

Returns 1 on success and 0 on failure, with *ss being set to NULL on failure.

Notes

This function instantiates a stack.

See Also