summaryrefslogtreecommitdiffstats
path: root/list.c
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2018-10-10 23:47:29 +0200
committerpgen <p.gen.progs@gmail.com>2018-10-11 01:02:41 +0200
commit2aeefb23a183f4de00bc389c21c6c5669d4b9a69 (patch)
tree263154318e7bbfe82d06c574cabd83be1888d763 /list.c
parentfdc9bbedae48ef73e040b2ad0bd4d637261346f9 (diff)
Various small changes
Diffstat (limited to 'list.c')
-rw-r--r--list.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/list.c b/list.c
index 6f0996f..1daefc0 100644
--- a/list.c
+++ b/list.c
@@ -1,13 +1,3 @@
-#include "config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <string.h>
-#include <errno.h>
-
-#include "xmalloc.h"
-#include "list.h"
-
/* ********************************************************************* */
/* Tiny list immplementation. */
/* */
@@ -18,6 +8,16 @@
/* the structure members (head, tail, len, data, prev, next) */
/* ********************************************************************* */
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <string.h>
+#include <errno.h>
+
+#include "xmalloc.h"
+#include "list.h"
+
/* ======================== */
/* Create a new linked list */
/* ======================== */
@@ -186,7 +186,7 @@ ll_insert_after(ll_t * const list, ll_node_t * node, void * const data)
/* Based on code found here: */
/* http://www.geeksforgeeks.org/quicksort-for-linked-list */
/* ====================================================== */
-ll_node_t *
+static ll_node_t *
ll_partition(ll_node_t * l, ll_node_t * h, int (*comp)(void *, void *),
void (*swap)(void *, void *))
{
@@ -221,7 +221,7 @@ ll_partition(ll_node_t * l, ll_node_t * h, int (*comp)(void *, void *),
/* ======================================================= */
/* A recursive implementation of quicksort for linked list */
/* ======================================================= */
-void
+static void
ll_quicksort(ll_node_t * l, ll_node_t * h, int (*comp)(void *, void *),
void (*swap)(void * a, void *))
{