removed linkedqueue and now _free and _clear have a deallocator parameter

This commit is contained in:
Leonardo committed 2019-08-27 01:33:58 -03:00
1 parent 613392ae76
commit 8ec768d30e
20 files changed
+1891 -2054

No files matched your search

+16 -10
View File
@@ -3,15 +3,21 @@ CFLAGS = -std=c11 -Wall -Wextra
CFLAGS += -Wno-unused-function -Wno-unused-paramter -Wno-unused-variable -Wno-unused-label
main:
$(CC) foreach.c -o foreach $(CFLAGS)
./foreach
$(CC) iterators.c -o iterators $(CFLAGS)
./iterators
$(CC) contains.c -o contains $(CFLAGS)
./contains
$(CC) types.c -o types $(CFLAGS)
./types
$(CC) foreach.c -o foreach.exe $(CFLAGS)
./foreach.exe
$(CC) iterators.c -o iterators.exe $(CFLAGS)
./iterators.exe
$(CC) contains.c -o contains.exe $(CFLAGS)
./contains.exe
$(CC) types.c -o types.exe $(CFLAGS)
./types.exe
$(CC) -c ./sep/sep.c -o ./sep/sep.o $(CFLAGS)
$(CC) -c ./sep/main.c -o ./sep/main.o $(CFLAGS)
$(CC) ./sep/sep.o ./sep/main.o -o ./sep/sep
./sep/sep
$(CC) ./sep/sep.o ./sep/main.o -o ./sep/sep.exe
./sep/sep.exe
dev: main
rm *.exe ./sep/*.o ./sep/*.exe
windev: main
del *.exe .\\sep\\*.o .\\sep\\*.exe
+20 -20
View File
@@ -125,16 +125,16 @@ int main(void)
a[9] = a[9] || ts_contains(ts, i);
}
d_clear(d);
hm_clear(hm);
hs_clear(hs);
h_clear(h);
ll_clear(ll);
l_clear(l);
q_clear(q);
s_clear(s);
tm_clear(tm);
ts_clear(ts);
d_clear(d, NULL);
hm_clear(hm, NULL);
hs_clear(hs, NULL);
h_clear(h, NULL);
ll_clear(ll, NULL);
l_clear(l, NULL);
q_clear(q, NULL);
s_clear(s, NULL);
tm_clear(tm, NULL);
ts_clear(ts, NULL);
b[0] = b[0] || d_contains(d, 1, intcmp);
b[1] = b[1] || hm_contains(hm, 1);
@@ -189,16 +189,16 @@ int main(void)
else
printf("%10s FAILED\n", "TREESET");
l_free(l);
ll_free(ll);
s_free(s);
q_free(q);
d_free(d);
h_free(h);
ts_free(ts);
tm_free(tm);
hs_free(hs);
hm_free(hm);
l_free(l, NULL);
ll_free(ll, NULL);
s_free(s, NULL);
q_free(q, NULL);
d_free(d, NULL);
h_free(h, NULL);
ts_free(ts, NULL);
tm_free(tm, NULL);
hs_free(hs, NULL);
hm_free(hm, NULL);
return 0;
}
+10 -10
View File
@@ -243,16 +243,16 @@ int main(void)
else
printf("%10s FAILED\n", "TREESET");
l_free(l);
ll_free(ll);
s_free(s);
q_free(q);
d_free(d);
h_free(h);
ts_free(ts);
tm_free(tm);
hs_free(hs);
hm_free(hm);
l_free(l, NULL);
ll_free(ll, NULL);
s_free(s, NULL);
q_free(q, NULL);
d_free(d, NULL);
h_free(h, NULL);
ts_free(ts, NULL);
tm_free(tm, NULL);
hs_free(hs, NULL);
hm_free(hm, NULL);
return 0;
}
+1 -1
View File
@@ -69,7 +69,7 @@ COLLECTION_GENERATE(HASHMAP, hm, hmap, /* FMOD */, int, double)
sumbody; \
} \
\
PFX##_free(coll); \
PFX##_free(coll, NULL); \
\
if (validation1 && validation2) \
printf("%10s PASSED\n", #NAME); \
+11 -11
View File
@@ -35,16 +35,16 @@ int main(void)
printf("| Separate Header and Source is Working |\n");
printf("+--------------------------------------------------+\n");
l_free(l);
ll_free(ll);
s_free(s);
q_free(q);
d_free(d);
h_free(h);
ts_free(ts);
tm_free(tm);
hs_free(hs);
hm_free(hm);
l_free(l, NULL);
ll_free(ll, NULL);
s_free(s, NULL);
q_free(q, NULL);
d_free(d, NULL);
h_free(h, NULL);
ts_free(ts, NULL);
tm_free(tm, NULL);
hs_free(hs, NULL);
hm_free(hm, NULL);
return 0;
}
}