aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-10-16 19:06:34 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-10-16 19:06:34 +0000
commit8d9fa4a965068cee0b67f05d4462fce0b544cc23 (patch)
tree8453b11c5eaab36bd66c72919ea9ddb0ce7154a6
parentf82a2e687cc49d89a93c007ee66e682a3da4bc20 (diff)
removed bizarre re-implementation of strlen()
svn path=/branches/pd-extended/0.43/externals/oscx/; revision=16403
-rw-r--r--OSC-client.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/OSC-client.c b/OSC-client.c
index 99645fa..73bc1a1 100644
--- a/OSC-client.c
+++ b/OSC-client.c
@@ -52,32 +52,26 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#define DONE 4 /* All open bundles have been closed, so can't write
anything else */
+#include <sys/types.h>
+#include <stdio.h>
+#include <string.h>
+
#ifdef _WIN32
#include <winsock2.h>
#include <io.h>
- #include <stdio.h>
#include <errno.h>
#include <fcntl.h>
- #include <sys/types.h>
#include <sys/stat.h>
#endif
-#ifdef __APPLE__
- #include <sys/types.h>
-#endif
-
#ifdef unix
#include <netinet/in.h>
- #include <stdio.h>
#endif
#include "OSC-client.h"
char *OSC_errorMessage;
-#ifndef _WIN32
- static int strlen(char *s);
-#endif
static int OSC_padString(char *dest, char *str);
static int OSC_padStringWithAnExtraStupidComma(char *dest, char *str);
static int OSC_WritePadding(char *dest, int i);
@@ -427,14 +421,6 @@ int OSC_writeStringArg(OSCbuf *buf, char *arg) {
/* String utilities */
-#ifndef _WIN32
-static int strlen(char *s) {
- int i;
- for (i=0; s[i] != '\0'; i++) /* Do nothing */ ;
- return i;
-}
-#endif
-
#define STRING_ALIGN_PAD 4
int OSC_effectiveStringLength(char *string) {
int len = strlen(string) + 1; /* We need space for the null char. */