46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
.TL
|
|
single_linked_list.h
|
|
|
|
.AU
|
|
Wael Karram
|
|
|
|
.AB no
|
|
Documentation for single_linked_list.h
|
|
.AE
|
|
|
|
.DA
|
|
|
|
.LP
|
|
This header defines a linked list, with one link per node. Using the prepoccessor variable SINGLE_LINKED_LIST_H used as an include guard.
|
|
.br
|
|
Relies on single_node.h to implement the nodes.
|
|
|
|
.LP
|
|
These are the compile-time constants declared by this header:
|
|
.br
|
|
SUCCESS_CODE_SINGLE_LINKED_LIST_C, this is the code returned by a function on succcess, evaluates to 1.
|
|
.br
|
|
FAILURE_CODE_SINGLE_LINKED_LIST_C, this is the code returned by a function on failure, evaluates to 0.
|
|
.br
|
|
INDEX_NOT_FOUND_CODE_SINGLE_LINKED_LIST_C, this is the code returned by a function when a requested index is not found, evaluates to -1.
|
|
.br
|
|
INVALID_INPUT_CODE_SINGLE_LINKED_LIST_C, this is the code returned by a function when recieving invalid input, evaluates to -2.
|
|
.br
|
|
CODE_FREE_SUCCESS_MALFORMED_SINGLE_LINKED_LIST_C, this code is returned when freeing the data is successful, but the list is maformed, evaluates to -1.
|
|
.br
|
|
INDEX_HEAD_LINKED_LIST, this is the index of the head of the linked list, evaluates to 0.
|
|
|
|
|
|
.LP
|
|
These are the function defitions and input arguments for this data structre.
|
|
.br
|
|
Defines a single struct
|
|
.UL node_t \0which
|
|
has the fields
|
|
.I "next" \0and
|
|
.I "data" ,
|
|
the former of which is another node pointer, and the latter is a void pointer.
|
|
.br
|
|
It is of note that this header type-defines the aformentioned node as
|
|
.I "node_t" .
|