|
gwenhywfar 5.10.1
|
#include "list1_p.h"#include <gwenhywfar/misc.h>#include <gwenhywfar/debug.h>
Go to the source code of this file.
|
static |
Definition at line 351 of file list1.c.
Referenced by GWEN_List1_Sort().

|
static |
Definition at line 35 of file list1.c.
Referenced by GWEN_List1_new().

| int GWEN_List1_Add | ( | GWEN_LIST1 * | l, |
| GWEN_LIST1_ELEMENT * | el | ||
| ) |
Adds (appends) a list element at the end of the list. (This operation is also called "append" or "push_back" elsewhere.)
Definition at line 70 of file list1.c.
References DBG_ERROR, and GWEN_LOGDOMAIN.
Referenced by GWEN_List1_AddList(), and GWEN_List1_Sort().

| int GWEN_List1_AddList | ( | GWEN_LIST1 * | dest, |
| GWEN_LIST1 * | l | ||
| ) |
Adds (appends) the second list to the end of the first list. (This operation is also called "append" or "concatenate" elsewhere.)
Definition at line 97 of file list1.c.
References GWEN_List1_Add(), and GWEN_List1_Del().

| int GWEN_List1_Del | ( | GWEN_LIST1_ELEMENT * | el | ) |
Deletes (removes) a list element from the list it used to belong to. The list element is not free'd or anything, it is only removed from the list it used to belong to. (This operation is also called "remove" or "unlink" elsewhere.)
Definition at line 141 of file list1.c.
References DBG_ERROR, and GWEN_LOGDOMAIN.
Referenced by GWEN_List1_AddList(), and GWEN_List1Element_free().

| void GWEN_List1_free | ( | GWEN_LIST1 * | l | ) |
Free (delete) an existing list. The list elements are untouched by this function; they need to be freed beforehand.
Definition at line 53 of file list1.c.
References GWEN_FREE_OBJECT.
| int GWEN_List1_GetCount | ( | const GWEN_LIST1 * | l | ) |
| void * GWEN_List1_GetFirst | ( | const GWEN_LIST1 * | l | ) |
| void * GWEN_List1_GetLast | ( | const GWEN_LIST1 * | l | ) |
| int GWEN_List1_Insert | ( | GWEN_LIST1 * | l, |
| GWEN_LIST1_ELEMENT * | el | ||
| ) |
Inserts (prepends) a list element at the beginning of the list. (This operation is also called "prepend" or "push_front" elsewhere.)
Definition at line 114 of file list1.c.
References DBG_ERROR, and GWEN_LOGDOMAIN.
| GWEN_LIST1 * GWEN_List1_new | ( | void | ) |
Allocate (create) a new empty list.
Definition at line 43 of file list1.c.
References GWEN_List1__defaultSortFn(), and GWEN_NEW_OBJECT.

| GWEN_LIST1_SORT_FN GWEN_List1_SetSortFn | ( | GWEN_LIST1 * | l, |
| GWEN_LIST1_SORT_FN | fn | ||
| ) |
| void GWEN_List1_Sort | ( | GWEN_LIST1 * | l, |
| int | ascending | ||
| ) |
Definition at line 428 of file list1.c.
References GWEN_List1__compar(), GWEN_List1_Add(), GWEN_List1_SortCtx_free(), GWEN_List1_SortCtx_new(), GWEN_List1_SortElem_free(), GWEN_List1_SortElem_new(), and NULL.

| void GWEN_List1_SortCtx_free | ( | GWEN_LIST1_SORT_CTX * | ctx | ) |
Definition at line 398 of file list1.c.
References GWEN_FREE_OBJECT.
Referenced by GWEN_List1_Sort().

| GWEN_LIST1_SORT_CTX * GWEN_List1_SortCtx_new | ( | GWEN_LIST1 * | list, |
| int | param | ||
| ) |
Definition at line 386 of file list1.c.
References GWEN_NEW_OBJECT.
Referenced by GWEN_List1_Sort().

| void GWEN_List1_SortElem_free | ( | GWEN_LIST1_SORT_ELEM * | e | ) |
Definition at line 419 of file list1.c.
References GWEN_FREE_OBJECT.
Referenced by GWEN_List1_Sort().

| GWEN_LIST1_SORT_ELEM * GWEN_List1_SortElem_new | ( | GWEN_LIST1_SORT_CTX * | ctx, |
| GWEN_LIST1_ELEMENT * | elem | ||
| ) |
Definition at line 407 of file list1.c.
References GWEN_NEW_OBJECT.
Referenced by GWEN_List1_Sort().

| void GWEN_List1Element_free | ( | GWEN_LIST1_ELEMENT * | el | ) |
Free (delete) a list element structure.
Definition at line 211 of file list1.c.
References GWEN_FREE_OBJECT, and GWEN_List1_Del().

| void * GWEN_List1Element_GetData | ( | const GWEN_LIST1_ELEMENT * | el | ) |
| void * GWEN_List1Element_GetNext | ( | const GWEN_LIST1_ELEMENT * | el | ) |
| void * GWEN_List1Element_GetPrevious | ( | const GWEN_LIST1_ELEMENT * | el | ) |
| GWEN_LIST1_ELEMENT * GWEN_List1Element_new | ( | void * | d | ) |
Allocate (create) a new list element structure.
Definition at line 199 of file list1.c.
References GWEN_NEW_OBJECT.