summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-01-14 15:33:12 +0100
committerTyge Løvset <[email protected]>2022-01-14 15:33:12 +0100
commit349ba35358f10923a62947aaee8056d14f1be74a (patch)
tree22efc73801246d9bcb233d807485d189593dd331 /include
parent64c15e66853f766102aac2642a45d4940d0bb42c (diff)
downloadSTC-modified-349ba35358f10923a62947aaee8056d14f1be74a.tar.gz
STC-modified-349ba35358f10923a62947aaee8056d14f1be74a.zip
Fixed function linkage spec in cstr. Moved typedefs of cstr and csview to forward.h-
Diffstat (limited to 'include')
-rw-r--r--include/stc/cstr.h4
-rw-r--r--include/stc/csview.h5
-rw-r--r--include/stc/forward.h7
3 files changed, 9 insertions, 7 deletions
diff --git a/include/stc/cstr.h b/include/stc/cstr.h
index 04592b69..91bcc7ff 100644
--- a/include/stc/cstr.h
+++ b/include/stc/cstr.h
@@ -24,14 +24,13 @@
#define CSTR_H_INCLUDED
#include "ccommon.h"
+#include "forward.h"
#include <stdlib.h> /* malloc */
#include <string.h>
#include <stdarg.h>
#include <stdio.h> /* vsnprintf */
#include <ctype.h>
-typedef struct cstr { char* str; } cstr;
-typedef char cstr_value;
#define cstr_npos (SIZE_MAX >> 1)
typedef struct { size_t size, cap; char str[]; } _cstr_rep_t;
@@ -62,7 +61,6 @@ STC_API size_t cstr_find_n(cstr s, const char* needle, size_t pos, size
STC_API bool cstr_getdelim(cstr *self, int delim, FILE *stream);
STC_API char* c_strnstrn(const char* s, const char* needle, size_t slen, size_t nlen);
-STC_API int c_strncasecmp(const char* s1, const char* s2, size_t nmax);
STC_INLINE cstr cstr_init() { return cstr_null; }
#define cstr_str(self) (self)->str
diff --git a/include/stc/csview.h b/include/stc/csview.h
index f3a0ae11..7370336a 100644
--- a/include/stc/csview.h
+++ b/include/stc/csview.h
@@ -24,12 +24,9 @@
#define CSVIEW_H_INCLUDED
#include "ccommon.h"
+#include "forward.h"
#include "utf8.h"
-typedef struct csview { const char* str; size_t size; } csview;
-typedef union csview_iter { const char *ref; csview cp; } csview_iter;
-typedef char csview_value;
-
#define csview_null c_make(csview){"", 0}
#define csview_npos (SIZE_MAX >> 1)
#define c_PRIsv "%.*s"
diff --git a/include/stc/forward.h b/include/stc/forward.h
index ec30b922..0a14ad93 100644
--- a/include/stc/forward.h
+++ b/include/stc/forward.h
@@ -40,6 +40,13 @@
#define forward_cqueue(CX, VAL) _c_cdeq_types(CX, VAL)
#define forward_cvec(CX, VAL) _c_cvec_types(CX, VAL)
+typedef struct cstr { char* str; } cstr;
+typedef char cstr_value;
+
+typedef struct csview { const char* str; size_t size; } csview;
+typedef union csview_iter { const char *ref; csview cp; } csview_iter;
+typedef char csview_value;
+
#ifndef MAP_SIZE_T
#define MAP_SIZE_T uint32_t
#endif