aboutsummaryrefslogtreecommitdiff
path: root/src/str.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/str.c')
-rw-r--r--src/str.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/str.c b/src/str.c
index a5d42a6..45b32df 100644
--- a/src/str.c
+++ b/src/str.c
@@ -2,7 +2,18 @@
* @file strings.c
*/
#include <unistd.h>
-#include "str.h"
+#include "omc.h"
+
+#if defined(OMC_OS_WINDOWS)
+char *strsep(char **str, const char *delim) {
+ static char *last;
+ return strtok_r(*str, delim, &last);
+}
+
+char *strndup(const char *str, size_t nelem) {
+ return calloc(nelem, sizeof(*str));
+}
+#endif
int num_chars(const char *sptr, int ch) {
int result = 0;