aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-05-03 20:34:50 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-05-03 20:34:50 -0700
commitee48d2771f45a210a25cc354d0dbff5f69821f8b (patch)
tree988f1d388352c76b9afb48502d87e6bfaa8f82bb /include
parent9d9681d6a8b7d022bde993e0e51aed13174ad0c8 (diff)
removed the day's confusion. added debug and release mode to makefile
Diffstat (limited to 'include')
-rw-r--r--include/libn/macro/map.h12
-rw-r--r--include/libn/macro/qsort.h3
2 files changed, 3 insertions, 12 deletions
diff --git a/include/libn/macro/map.h b/include/libn/macro/map.h
index 2e65570..37b7dfd 100644
--- a/include/libn/macro/map.h
+++ b/include/libn/macro/map.h
@@ -223,15 +223,3 @@ static const double __ac_HASH_UPPER = 0.77;
--map->size; \
} \
}
-
-static int32 hash_string(byte *s) {
- int32 h;
- byte *it;
-
- h = (int32)(*s);
- if (h != 0) {
- for (it = s; *it; ++it)
- h = (h << 5) - h + (int32)*it;
- }
- return h;
-}
diff --git a/include/libn/macro/qsort.h b/include/libn/macro/qsort.h
index cc38bca..2ff964a 100644
--- a/include/libn/macro/qsort.h
+++ b/include/libn/macro/qsort.h
@@ -1,12 +1,15 @@
#pragma once
/*
+ * Nicholas Noll (2020)
* Straight implementation of Sedgewick's median qsort
+ * #ref: "Implementing Quicksort Programs" (1978)
*
* @LEN: name of parameter length
* @QLESS: name of function that computes array[i] < array[j]
* should return a boolean
* @QSWAP: name of function that swaps array[i] <-> array[j]
+ * this could swap multiple arrays
*
* NOTE: This can perform on strided arrays.
* Make sure to use parens liberally to ensure hygeine!