summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/new_queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/examples/new_queue.c')
-rw-r--r--misc/examples/new_queue.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/examples/new_queue.c b/misc/examples/new_queue.c
index 916f4dbc..f3592df6 100644
--- a/misc/examples/new_queue.c
+++ b/misc/examples/new_queue.c
@@ -5,22 +5,22 @@
forward_cqueue(cqueue_pnt, struct Point);
-struct Point { int x, y; } typedef Point;
+typedef struct Point { int x, y; } Point;
int point_cmp(const Point* a, const Point* b) {
int c = c_default_cmp(&a->x, &b->x);
return c ? c : c_default_cmp(&a->y, &b->y);
}
-#define i_val Point
+#define i_key Point
#define i_cmp point_cmp
#define i_is_forward
#define i_tag pnt
#include <stc/cqueue.h>
#define i_type IQ
-#define i_val int
+#define i_key int
#include <stc/cqueue.h>
-int main() {
+int main(void) {
int n = 50000000;
crand_t rng = crand_init((uint64_t)time(NULL));
crand_unif_t dist = crand_unif_init(0, n);