From ee48d2771f45a210a25cc354d0dbff5f69821f8b Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sun, 3 May 2020 20:34:50 -0700 Subject: removed the day's confusion. added debug and release mode to makefile --- sys/libn/test.c | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) (limited to 'sys/libn/test.c') diff --git a/sys/libn/test.c b/sys/libn/test.c index 973245f..b52207d 100644 --- a/sys/libn/test.c +++ b/sys/libn/test.c @@ -155,56 +155,6 @@ testĀ·sort() return 0; } -#define HASH(str) hash_string(str) -#define EQUAL(str, str2) (str == str2) - -typedef struct Map -{ - MAP_STRUCT_BODY(byte*, float) -} Map; - -Map* -makemap(memĀ·Allocator heap, void* h) -{ - MAP_MAKE(Map); -} - -void -mapfree(Map *map) -{ - MAP_FREE(map); -} - -void -mapreset(Map *map) -{ - MAP_RESET(map); -} - -double -mapget(Map *map, byte *key) -{ - MAP_GET(map, key, HASH, EQUAL); -} - -static -error -mapresize(Map *map, int n) -{ - MAP_GROW(map, byte*, float, n, HASH); -} - -static -int -mapput(Map *map, byte *key, float val, error *err) -{ - MAP_PUT(map, key, val, HASH, EQUAL, mapresize, err); -} - - -#undef HASH -#undef EQUAL - error main() { -- cgit v1.2.1