Changed container_generate to collection_generate macro
This commit is contained in:
1 parent
c2103b1397
commit
8e3f2c45fa
7 files changed
+27
-28
No files matched your search
+4
-4
@@ -4,10 +4,10 @@
|
||||
#include "../src/macro_collections.h"
|
||||
|
||||
// Create containers to use only in this file
|
||||
CONTAINER_GENERATE(LIST, PUBLIC, l, list, static, , int)
|
||||
CONTAINER_GENERATE(STACK, PUBLIC, s, stack, static, , int)
|
||||
CONTAINER_GENERATE(QUEUE, PUBLIC, q, queue, static, , int)
|
||||
CONTAINER_GENERATE(DEQUE, PUBLIC, d, deque, static, , int)
|
||||
COLLECTION_GENERATE(LIST, PUBLIC, l, list, static, , int)
|
||||
COLLECTION_GENERATE(STACK, PUBLIC, s, stack, static, , int)
|
||||
COLLECTION_GENERATE(QUEUE, PUBLIC, q, queue, static, , int)
|
||||
COLLECTION_GENERATE(DEQUE, PUBLIC, d, deque, static, , int)
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
#include <stdbool.h>
|
||||
#include "../src/macro_collections.h"
|
||||
|
||||
CONTAINER_GENERATE(LINKEDLIST, PUBLIC, ll, linked, static, , int)
|
||||
COLLECTION_GENERATE(LINKEDLIST, PUBLIC, ll, linked, static, , int)
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "containers.h"
|
||||
|
||||
CONTAINER_GENERATE_SOURCE(LIST, PUBLIC, il, int_list, , , int)
|
||||
CONTAINER_GENERATE_SOURCE(STACK, PRIVATE, cs, char_stack, , , char)
|
||||
CONTAINER_GENERATE_SOURCE(QUEUE, PUBLIC, queue, index_queue, , , size_t)
|
||||
CONTAINER_GENERATE_SOURCE(DEQUE, PUBLIC, dq, deque, , , int)
|
||||
COLLECTION_GENERATE_SOURCE(LIST, PUBLIC, il, int_list, , , int)
|
||||
COLLECTION_GENERATE_SOURCE(STACK, PRIVATE, cs, char_stack, , , char)
|
||||
COLLECTION_GENERATE_SOURCE(QUEUE, PUBLIC, queue, index_queue, , , size_t)
|
||||
COLLECTION_GENERATE_SOURCE(DEQUE, PUBLIC, dq, deque, , , int)
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <stdbool.h>
|
||||
#include "macro_collections.h"
|
||||
|
||||
CONTAINER_GENERATE_HEADER(LIST, PUBLIC, il, int_list, , , int)
|
||||
CONTAINER_GENERATE_HEADER(STACK, PRIVATE, cs, char_stack, , , char)
|
||||
CONTAINER_GENERATE_HEADER(QUEUE, PUBLIC, queue, index_queue, , , size_t)
|
||||
CONTAINER_GENERATE_HEADER(DEQUE, PUBLIC, dq, deque, , , int)
|
||||
COLLECTION_GENERATE_HEADER(LIST, PUBLIC, il, int_list, , , int)
|
||||
COLLECTION_GENERATE_HEADER(STACK, PRIVATE, cs, char_stack, , , char)
|
||||
COLLECTION_GENERATE_HEADER(QUEUE, PUBLIC, queue, index_queue, , , size_t)
|
||||
COLLECTION_GENERATE_HEADER(DEQUE, PUBLIC, dq, deque, , , int)
|
||||
@@ -27,7 +27,6 @@ int intcmp(int a, int b)
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
srand((unsigned)time(NULL));
|
||||
set *set1 = set_new(intcmp);
|
||||
|
||||
for (int i = 0; i < 31; i++)
|
||||
|
||||
Reference in new issue
Block a user