Commotion double linked-list implementation. More...
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
#include "debug.h"
#include "extern/halloc.h"
Go to the source code of this file.
Macros | |
#define | _DECLARE_LIST(L) |
Typedefs | |
typedef struct _listnode_t | _listnode_t |
Functions | |
_DECLARE_LIST (16) | |
_DECLARE_LIST (32) | |
size_t | co_list_length (co_obj_t *list) |
return length (number of objects) of given list More... | |
co_obj_t * | co_list_get_first (const co_obj_t *list) |
return first element of given list More... | |
co_obj_t * | co_list_get_last (const co_obj_t *list) |
return last element of given list More... | |
co_obj_t * | co_list_parse (co_obj_t *list, co_iter_t iter, void *context) |
process list with given iterator function More... | |
int | co_list_contains (co_obj_t *list, co_obj_t *item) |
determine if list contains specified item More... | |
int | co_list_insert_before (co_obj_t *list, co_obj_t *new_obj, co_obj_t *this_obj) |
insert new item in list before specified item More... | |
int | co_list_insert_before_unsafe (co_obj_t *list, co_obj_t *new_obj, co_obj_t *this_obj) |
insert new item in list before specified item without the list managing the item's memory More... | |
int | co_list_insert_after (co_obj_t *list, co_obj_t *new_obj, co_obj_t *this_obj) |
insert new item in list after specified item More... | |
int | co_list_insert_after_unsafe (co_obj_t *list, co_obj_t *new_obj, co_obj_t *this_obj) |
insert new item in list after specified item without the list managing the item's memory More... | |
int | co_list_prepend (co_obj_t *list, co_obj_t *new_obj) |
insert new item at beginning of list More... | |
int | co_list_prepend_unsafe (co_obj_t *list, co_obj_t *new_obj) |
insert new item at beginning of list without the list managing the item's memory More... | |
int | co_list_append (co_obj_t *list, co_obj_t *new_obj) |
insert new item at end of list More... | |
int | co_list_append_unsafe (co_obj_t *list, co_obj_t *new_obj) |
insert new item at end of list without the list managing the item's memory More... | |
co_obj_t * | co_list_delete (co_obj_t *list, co_obj_t *item) |
delete specified item from list More... | |
co_obj_t * | co_list_element (co_obj_t *list, const unsigned int index) |
return item at specified position in list More... | |
size_t | co_list_raw (char *output, const size_t olen, const co_obj_t *list) |
dump raw representation of list More... | |
size_t | co_list_import (co_obj_t **list, const char *input, const size_t ilen) |
import list from raw representation More... | |
void | co_list_print_indent (co_obj_t *list, int indent) |
print list with indent More... | |
int | co_list_print (co_obj_t *list) |
print list More... | |
Detailed Description
Commotion double linked-list implementation.
Macro Definition Documentation
#define _DECLARE_LIST | ( | L | ) |
Function Documentation
insert new item at end of list
- Parameters
-
list list object to process new_obj item to insert
References co_list_insert_after(), and co_list_length().
Referenced by _schedule(), _watch(), co_cmd_hook(), co_cmd_hook_str(), co_connect(), co_iface_add(), co_list_import(), co_loop_add_process(), co_loop_add_socket(), co_loop_add_timer(), co_profile_add(), co_request_append(), co_request_append_bin(), co_request_append_int(), co_request_append_str(), co_request_append_uint(), co_schema_register(), co_schema_register_global(), and co_socket_receive().
insert new item at end of list without the list managing the item's memory
- Parameters
-
list list object to process new_obj item to insert
References co_list_insert_after(), and co_list_length().
determine if list contains specified item
- Parameters
-
list list object to process item item to search for
Referenced by co_list_insert_after(), co_list_insert_after_unsafe(), co_list_insert_before(), co_list_insert_before_unsafe(), co_loop_add_socket(), and co_socket_hangup().
delete specified item from list
- Parameters
-
list list object to process item item to delete
Referenced by _unschedule(), co_disconnect(), co_iface_remove(), co_loop_remove_process(), co_loop_remove_socket(), co_loop_remove_timer(), co_profile_remove(), and co_socket_hangup().
return item at specified position in list
- Parameters
-
list list object to process index number of item to return
Referenced by co_call(), dispatcher_cb(), and olsrd_mdp_sign().
size_t co_list_import | ( | co_obj_t ** | list, |
const char * | input, | ||
const size_t | ilen | ||
) |
import list from raw representation
- Parameters
-
list target pointer to new list object input input buffer ilen length of input buffer
References co_list_append(), co_list_import(), and co_tree_import().
Referenced by co_call(), co_list_import(), co_tree_import(), and dispatcher_cb().
insert new item in list after specified item
- Parameters
-
list list object to process new_obj item to insert this_obj item to insert after
References co_list_contains().
Referenced by co_list_append(), and co_list_append_unsafe().
insert new item in list after specified item without the list managing the item's memory
- Parameters
-
list list object to process new_obj item to insert this_obj item to insert after
References co_list_contains().
insert new item in list before specified item
- Parameters
-
list list object to process new_obj item to insert this_obj item to insert before
References co_list_contains().
Referenced by co_list_prepend(), co_list_prepend_unsafe(), and co_loop_add_timer().
insert new item in list before specified item without the list managing the item's memory
- Parameters
-
list list object to process new_obj item to insert this_obj item to insert before
References co_list_contains().
size_t co_list_length | ( | co_obj_t * | list | ) |
return length (number of objects) of given list
- Parameters
-
list list object
Referenced by co_list_append(), co_list_append_unsafe(), co_list_prepend(), co_list_prepend_unsafe(), and co_plugins_shutdown().
process list with given iterator function
- Parameters
-
list list object to process iter iterator function context additional arguments to iterator
Referenced by _schedule(), _unschedule(), _watch(), co_iface_get(), co_iface_profile(), co_iface_remove(), co_list_print_indent(), co_loop_add_socket(), co_loop_add_timer(), co_loop_destroy(), co_loop_get_socket(), co_loop_get_timer(), co_loop_remove_process(), co_loop_remove_socket(), co_loop_remove_timer(), co_plugins_shutdown(), co_plugins_start(), co_profile_find(), co_profiles_process(), co_shutdown(), co_socket_destroy(), and serval_socket_cb().
insert new item at beginning of list
- Parameters
-
list list object to process new_obj item to insert
References co_list_insert_before(), and co_list_length().
insert new item at beginning of list without the list managing the item's memory
- Parameters
-
list list object to process new_obj item to insert
References co_list_insert_before(), and co_list_length().
int co_list_print | ( | co_obj_t * | list | ) |
print list
- Parameters
-
list list object to print
References co_list_print_indent().
void co_list_print_indent | ( | co_obj_t * | list, |
int | indent | ||
) |
print list with indent
- Parameters
-
list list object to print indent level of indent
References co_list_parse().
Referenced by co_list_print().
size_t co_list_raw | ( | char * | output, |
const size_t | olen, | ||
const co_obj_t * | list | ||
) |
dump raw representation of list
- Parameters
-
output output buffer olen length of output buffer list list object to process
References co_list_raw(), and co_tree_raw().
Referenced by co_list_raw(), co_request_alloc(), and co_response_alloc().
Generated on Fri Jun 6 2014 13:22:05 for commotiond by 1.8.7