From 9905bcc6c923ac896f6bddf80eaded250870b726 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Mon, 18 Nov 2013 16:02:59 +0100 Subject: Changed a few files so that it will compile. --- .gitignore | 2 ++ Makefile | 8 ++++---- main.c | 5 +++++ set_bitset.c | 5 ----- set_bitsets.c | 5 +++++ set_linked_list.c | 4 ---- set_linked_lists.c | 3 +++ set_treaps.c | 3 +++ sets.h | 6 ++---- 9 files changed, 24 insertions(+), 17 deletions(-) create mode 100644 main.c delete mode 100644 set_bitset.c create mode 100644 set_bitsets.c delete mode 100644 set_linked_list.c create mode 100644 set_linked_lists.c create mode 100644 set_treaps.c diff --git a/.gitignore b/.gitignore index b25c15b..dadcc46 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ *~ +*.swp +exe_* diff --git a/Makefile b/Makefile index ce298f8..2714366 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,15 @@ +all : exe_ll exe_bs exe_tr -exe_ll : mainc.c sets.h set_linked_lists.c +exe_ll : main.c sets.h set_linked_lists.c gcc -o exe_ll main.c set_linked_lists.c -DLINKEDLISTS -exe_bs : mainc.c sets.h set_bitsets.c +exe_bs : main.c sets.h set_bitsets.c gcc -o exe_bs main.c set_bitsets.c -DBITSETS -exe_tr : mainc.c sets.h set_treaps.c +exe_tr : main.c sets.h set_treaps.c gcc -o exe_tr main.c set_treaps.c -DTREAPS -all : exe_ll exe_bs exe_tr clean : rm exe_ll exe_tr exe_bs diff --git a/main.c b/main.c new file mode 100644 index 0000000..bfa27a1 --- /dev/null +++ b/main.c @@ -0,0 +1,5 @@ +#include "sets.h" + +int main() { + return 0; +} diff --git a/set_bitset.c b/set_bitset.c deleted file mode 100644 index 4be3b4b..0000000 --- a/set_bitset.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "sets.h" - -struct _set { - - }; diff --git a/set_bitsets.c b/set_bitsets.c new file mode 100644 index 0000000..4be3b4b --- /dev/null +++ b/set_bitsets.c @@ -0,0 +1,5 @@ +#include "sets.h" + +struct _set { + + }; diff --git a/set_linked_list.c b/set_linked_list.c deleted file mode 100644 index 0121589..0000000 --- a/set_linked_list.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "sets.h" - -struct _set { - diff --git a/set_linked_lists.c b/set_linked_lists.c new file mode 100644 index 0000000..f37773f --- /dev/null +++ b/set_linked_lists.c @@ -0,0 +1,3 @@ +#include "sets.h" + + diff --git a/set_treaps.c b/set_treaps.c new file mode 100644 index 0000000..f37773f --- /dev/null +++ b/set_treaps.c @@ -0,0 +1,3 @@ +#include "sets.h" + + diff --git a/sets.h b/sets.h index 937f867..59768f0 100644 --- a/sets.h +++ b/sets.h @@ -26,7 +26,7 @@ struct set_elt { struct set_elt *next; }; struct set { - set_elt *first, *last; + struct set_elt *first, *last; }; typedef struct set *set; @@ -34,9 +34,7 @@ typedef struct set *set; #ifdef TREAPS // TODO -#define main 0 -struct set; -typedef struct set set; +typedef void* set; #endif -- cgit v1.2.3