diff options
| author | Tyge Løvset <[email protected]> | 2022-06-01 15:39:26 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-06-01 15:42:01 +0200 |
| commit | 7fb43a24a17da787dd809114ca26c1231b058493 (patch) | |
| tree | 25b5ae8442d336a42559b449a6af2c99a977d0db | |
| parent | 444088e81d590946c80909386dfcd6b926362949 (diff) | |
| download | STC-modified-7fb43a24a17da787dd809114ca26c1231b058493.tar.gz STC-modified-7fb43a24a17da787dd809114ca26c1231b058493.zip | |
Forgot files from previous commit. NOTE: there may/will be some changes to names introduced, e.g. i_extern/STC_EXTERN may change.
Also, I recently changed non-templated types to default external linking, *may* revert to default static again.
| -rw-r--r-- | examples/convert.c | 1 | ||||
| -rw-r--r-- | examples/demos.c | 1 | ||||
| -rw-r--r-- | examples/gauss1.c | 4 | ||||
| -rw-r--r-- | examples/gauss2.c | 4 | ||||
| -rw-r--r-- | examples/inits.c | 1 | ||||
| -rw-r--r-- | examples/list_splice.c | 1 | ||||
| -rw-r--r-- | examples/mmap.c | 1 | ||||
| -rw-r--r-- | examples/multimap.c | 1 | ||||
| -rw-r--r-- | examples/new_list.c | 1 | ||||
| -rw-r--r-- | examples/sso_substr.c | 3 | ||||
| -rw-r--r-- | examples/sview_split.c | 3 |
11 files changed, 13 insertions, 8 deletions
diff --git a/examples/convert.c b/examples/convert.c index 48ba2ecf..75299309 100644 --- a/examples/convert.c +++ b/examples/convert.c @@ -9,6 +9,7 @@ #include <stc/cvec.h> #define i_val_str +#define i_extern // define _clist_mergesort() once #include <stc/clist.h> int main() diff --git a/examples/demos.c b/examples/demos.c index 29bfba66..62df82a4 100644 --- a/examples/demos.c +++ b/examples/demos.c @@ -75,6 +75,7 @@ void vectordemo2() #define i_val int
#define i_tag ix
+#define i_extern // define _clist_mergesort() once
#include <stc/clist.h>
void listdemo1()
diff --git a/examples/gauss1.c b/examples/gauss1.c index c3ff5a4d..cca38953 100644 --- a/examples/gauss1.c +++ b/examples/gauss1.c @@ -1,8 +1,8 @@ #include <time.h>
#include <math.h>
-#define i_implement
+
+#define STC_IMPLEMENT
#include <stc/crandom.h>
-#define i_implement
#include <stc/cstr.h>
// Declare int -> int hashmap. Uses typetag 'ii' for ints.
diff --git a/examples/gauss2.c b/examples/gauss2.c index 496c43e1..297b8616 100644 --- a/examples/gauss2.c +++ b/examples/gauss2.c @@ -1,8 +1,8 @@ #include <stdio.h>
#include <time.h>
-#define i_implement
+
+#define STC_IMPLEMENT
#include <stc/crandom.h>
-#define i_implement
#include <stc/cstr.h>
// Declare int -> int sorted map.
diff --git a/examples/inits.c b/examples/inits.c index 1c904dda..26f4b286 100644 --- a/examples/inits.c +++ b/examples/inits.c @@ -26,6 +26,7 @@ inline static int ipair_cmp(const ipair_t* a, const ipair_t* b) { #define i_val ipair_t
#define i_cmp ipair_cmp
#define i_tag ip
+#define i_extern // define _clist_mergesort() once
#include <stc/clist.h>
#define i_val float
diff --git a/examples/list_splice.c b/examples/list_splice.c index aaec506a..cc041a73 100644 --- a/examples/list_splice.c +++ b/examples/list_splice.c @@ -2,6 +2,7 @@ #define i_val int #define i_tag i +#define i_extern // define _clist_mergesort() once #include <stc/clist.h> void print_ilist(const char* s, clist_i list) diff --git a/examples/mmap.c b/examples/mmap.c index 4754656f..cfb7470e 100644 --- a/examples/mmap.c +++ b/examples/mmap.c @@ -5,6 +5,7 @@ #define i_implement
#include <stc/cstr.h>
#define i_val_str
+#define i_extern // define _clist_mergesort() once
#include <stc/clist.h>
// Map of int => clist_str.
diff --git a/examples/multimap.c b/examples/multimap.c index ee118dde..c2920ef4 100644 --- a/examples/multimap.c +++ b/examples/multimap.c @@ -42,6 +42,7 @@ void OlympicLocation_drop(OlympicLocation* self); // Create a clist<OlympicLocation>, can be sorted by year.
#define i_val_bind OlympicLocation // binds _cmp, _clone and _drop.
#define i_tag OL
+#define i_extern // define _clist_mergesort()
#include <stc/clist.h>
// Create a csmap<cstr, clist_OL> where key is country name
diff --git a/examples/new_list.c b/examples/new_list.c index 43556aca..f45a7f30 100644 --- a/examples/new_list.c +++ b/examples/new_list.c @@ -12,6 +12,7 @@ struct MyStruct { #define i_val int #define i_opt c_is_fwd #define i_tag i32 +#define i_extern // define _clist_mergesort() #include <stc/clist.h> struct Point { int x, y; } typedef Point; diff --git a/examples/sso_substr.c b/examples/sso_substr.c index 288d0b85..4c49a942 100644 --- a/examples/sso_substr.c +++ b/examples/sso_substr.c @@ -1,6 +1,5 @@ -#define i_implement +#define STC_IMPLEMENT #include <stc/cstr.h> -#define i_implement #include <stc/csview.h> int main () diff --git a/examples/sview_split.c b/examples/sview_split.c index ec664ba0..8c3d7120 100644 --- a/examples/sview_split.c +++ b/examples/sview_split.c @@ -1,6 +1,5 @@ -#define i_implement
+#define STC_IMPLEMENT
#include <stc/cstr.h>
-#define i_implement
#include <stc/csview.h>
int main()
|
