summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/lower_bound.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-07-18 02:36:04 +0200
committerGitHub <[email protected]>2023-07-18 02:36:04 +0200
commitda70303c149b37dbf442e41038a00836132562ee (patch)
tree06d795c66d6759e06de5f2d166215b461ac40d1d /misc/examples/lower_bound.c
parent071b41c0fe95cb3f9a72bbe0417d856e7989ca08 (diff)
parent23eeedb3fc298602732f394adba6a43c876ca7d8 (diff)
downloadSTC-modified-da70303c149b37dbf442e41038a00836132562ee.tar.gz
STC-modified-da70303c149b37dbf442e41038a00836132562ee.zip
Merge branch 'dev43' into master
Diffstat (limited to 'misc/examples/lower_bound.c')
-rw-r--r--misc/examples/lower_bound.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/misc/examples/lower_bound.c b/misc/examples/lower_bound.c
index 6ec7544c..e5d816e9 100644
--- a/misc/examples/lower_bound.c
+++ b/misc/examples/lower_bound.c
@@ -1,17 +1,18 @@
#include <stdio.h>
-#define i_val int
+#define i_key int
+#define i_native_cmp
#include <stc/cvec.h>
-#define i_val int
+#define i_key int
#include <stc/csset.h>
-int main()
+int main(void)
{
// TEST SORTED VECTOR
{
int key, *res;
- cvec_int vec = c_make(cvec_int, {40, 600, 1, 7000, 2, 500, 30});
+ cvec_int vec = c_init(cvec_int, {40, 600, 1, 7000, 2, 500, 30});
cvec_int_sort(&vec);
@@ -40,7 +41,7 @@ int main()
// TEST SORTED SET
{
int key, *res;
- csset_int set = c_make(csset_int, {40, 600, 1, 7000, 2, 500, 30});
+ csset_int set = c_init(csset_int, {40, 600, 1, 7000, 2, 500, 30});
key = 100;
res = csset_int_lower_bound(&set, key).ref;