summaryrefslogtreecommitdiffhomepage
path: root/src/libstc.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-06-01 15:22:24 +0200
committerTyge Løvset <[email protected]>2022-06-01 15:22:24 +0200
commit444088e81d590946c80909386dfcd6b926362949 (patch)
tree1c374787856234e400a86ed3ba00422554f08841 /src/libstc.c
parent5e4d94a2dda15733c89e7b3f52aa480cb2a341bd (diff)
downloadSTC-modified-444088e81d590946c80909386dfcd6b926362949.tar.gz
STC-modified-444088e81d590946c80909386dfcd6b926362949.zip
Added src/libstc.c which implements all non-templated functions (e.g. from cstr, csview, cbits, crandom), but also clist.h mergesort.
- Linking with this object file eliminates the need to define i_implement in one file for these types (or i_extern for non-templated functions in templated container, currently only clist.h)
Diffstat (limited to 'src/libstc.c')
-rw-r--r--src/libstc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstc.c b/src/libstc.c
new file mode 100644
index 00000000..0c78272d
--- /dev/null
+++ b/src/libstc.c
@@ -0,0 +1,12 @@
+#define STC_EXTERN // implement common extern, non-templated functions, e.g. _clist_mergesort().
+#define STC_HEADER // don't implement clist_int itself, just dummy declare it.
+
+#define i_val int
+#include "../include/stc/clist.h"
+
+#define STC_IMPLEMENT // implement the following.
+
+#include "../include/stc/cstr.h"
+#include "../include/stc/csview.h"
+#include "../include/stc/cbits.h"
+#include "../include/stc/crandom.h"