summaryrefslogtreecommitdiffstats
path: root/list.h
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2023-09-10 00:35:48 +0200
committerpgen <p.gen.progs@gmail.com>2023-09-11 14:15:32 +0200
commit36881ac8835674bf5ce0112f1c5bfa7d1b1e3f27 (patch)
tree97e706c87e9189c1896b5117578f112f8ce7484d /list.h
parentb4e826f3ce669758eb2847d5d7eb65ee2c4755d0 (diff)
Reformatting source code
Diffstat (limited to 'list.h')
-rw-r--r--list.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/list.h b/list.h
index 132a8bd..ee897b7 100644
--- a/list.h
+++ b/list.h
@@ -20,25 +20,25 @@ typedef struct ll_s ll_t;
/* """""""""""""""""""""""""" */
struct ll_node_s
{
- void * data;
- struct ll_node_s * next;
- struct ll_node_s * prev;
+ void *data;
+ struct ll_node_s *next;
+ struct ll_node_s *prev;
};
/* Linked List structure */
/* """"""""""""""""""""" */
struct ll_s
{
- ll_node_t * head;
- ll_node_t * tail;
- long len;
+ ll_node_t *head;
+ ll_node_t *tail;
+ long len;
};
ll_t *
ll_new(void);
void
-ll_init(ll_t * list);
+ll_init(ll_t *list);
ll_node_t *
ll_new_node(void);
@@ -47,11 +47,12 @@ void
ll_append(ll_t * const list, void * const data);
void
-ll_sort(ll_t * list, int (*comp)(void const *, void const *),
+ll_sort(ll_t *list,
+ int (*comp)(void const *, void const *),
void (*swap)(void **, void **));
int
-ll_delete(ll_t * const list, ll_node_t * node);
+ll_delete(ll_t * const list, ll_node_t *node);
ll_node_t *
ll_find(ll_t * const, void * const, int (*)(void const *, void const *));
@@ -60,6 +61,6 @@ void
ll_free(ll_t * const list, void (*clean)(void *));
void
-ll_destroy(ll_t * list, void (*clean)(void *));
+ll_destroy(ll_t *list, void (*clean)(void *));
#endif