More things added to EXT

This commit is contained in:
Leonardo Vencovsky committed 2020-06-07 16:30:23 -03:00
1 parent 649f02665f
commit 1987152b03
4 files changed
+327 -259

No files matched your search

+10
View File
@@ -15,6 +15,7 @@ C_MACRO_COLLECTIONS_ALL(CMC, LINKEDLIST, ( ll, linkedlist, , , int))
C_MACRO_COLLECTIONS_ALL(CMC, LIST, ( l, list, , , int))
C_MACRO_COLLECTIONS_ALL(CMC, QUEUE, ( q, queue, , , int))
C_MACRO_COLLECTIONS_ALL(CMC, SORTEDLIST, ( sl, sortedlist, , , int))
C_MACRO_COLLECTIONS_ALL(CMC, STACK, ( s, stack, , , int))
struct
{
@@ -47,6 +48,7 @@ int main(void)
struct list *l = l_new(100, (struct list_fval *)&int_ftab);
struct queue *q = q_new(100, (struct queue_fval *)&int_ftab);
struct sortedlist *sl = sl_new(100, (struct sortedlist_fval *)&int_ftab);
struct stack *s = s_new(100, (struct stack_fval *)&int_ftab);
d_to_string(d, stdout);
d_print(d, stdout, "\n[ ", ", ", " ]\n");
@@ -72,6 +74,8 @@ int main(void)
q_print(q, stdout, "\n[ ", ", ", " ]\n");
sl_to_string(sl, stdout);
sl_print(sl, stdout, "\n[ ", ", ", " ]\n");
s_to_string(s, stdout);
s_print(s, stdout, "\n[ ", ", ", " ]\n");
fprintf(stdout, "\n");
@@ -87,6 +91,7 @@ int main(void)
l_push_back(l, 0);
q_enqueue(q, 0);
sl_insert(sl, 0);
s_push(s, 0);
d_to_string(d, stdout);
d_print(d, stdout, "\n[ ", ", ", " ]\n");
@@ -112,6 +117,8 @@ int main(void)
q_print(q, stdout, "\n[ ", ", ", " ]\n");
sl_to_string(sl, stdout);
sl_print(sl, stdout, "\n[ ", ", ", " ]\n");
s_to_string(s, stdout);
s_print(s, stdout, "\n[ ", ", ", " ]\n");
for (int i = 1; i < 20; i++)
{
@@ -127,6 +134,7 @@ int main(void)
l_push_back(l, i);
q_enqueue(q, i);
sl_insert(sl, i);
s_push(s, i);
}
fprintf(stdout, "\n");
@@ -155,6 +163,8 @@ int main(void)
q_print(q, stdout, "\n[ ", ", ", " ]\n");
sl_to_string(sl, stdout);
sl_print(sl, stdout, "\n[ ", ", ", " ]\n");
s_to_string(s, stdout);
s_print(s, stdout, "\n[ ", ", ", " ]\n");
d_free(d);
hbm_free(hbm);