aboutsummaryrefslogtreecommitdiff
path: root/osc
diff options
context:
space:
mode:
authorMartin Peach <mrpeach@users.sourceforge.net>2010-01-02 20:11:09 +0000
committerMartin Peach <mrpeach@users.sourceforge.net>2010-01-02 20:11:09 +0000
commitd7adaacdffe10246efbeb41ad4ec666d59a77009 (patch)
treebff89c389b419743fc6baadaf4e75dc4a5b3dc52 /osc
parentc734d64ad3ffe1fa5f3fa52a87a6722a2fe0cd43 (diff)
Changed MSW to _WIN32
svn path=/trunk/externals/mrpeach/; revision=12870
Diffstat (limited to 'osc')
-rw-r--r--osc/packOSC.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/osc/packOSC.c b/osc/packOSC.c
index 3da1950..b2d1086 100644
--- a/osc/packOSC.c
+++ b/osc/packOSC.c
@@ -38,7 +38,7 @@ The OSC webpage is http://cnmat.cnmat.berkeley.edu/OpenSoundControl
#include <string.h>
#include <stdlib.h>
-#ifdef MSW
+#ifdef _WIN32
#include <winsock2.h>
#include <sys/timeb.h>
#else
@@ -1232,7 +1232,7 @@ static int OSC_writeFloatArg(OSCbuf *buf, float arg)
static int OSC_writeIntArg(OSCbuf *buf, int4byte arg)
{
if(OSC_CheckOverflow(buf, 4))return 1;
- if (CheckTypeTag(buf, 'i')) return 9;
+ if (CheckTypeTag(buf, 'i')) return 9;
*((int4byte *) buf->bufptr) = htonl(arg);
buf->bufptr += 4;
@@ -1243,35 +1243,35 @@ static int OSC_writeIntArg(OSCbuf *buf, int4byte arg)
static int OSC_writeBlobArg(OSCbuf *buf, typedArg *arg, size_t nArgs)
{
- size_t i;
- unsigned char b;
+ size_t i;
+ unsigned char b;
/* pack all the args as single bytes following a 4-byte length */
- if(OSC_CheckOverflow(buf, nArgs+4))return 1;
- if (CheckTypeTag(buf, 'b')) return 9;
+ if(OSC_CheckOverflow(buf, nArgs+4))return 1;
+ if (CheckTypeTag(buf, 'b')) return 9;
*((int4byte *) buf->bufptr) = htonl(nArgs);
#ifdef DEBUG
- post ("OSC_writeBlobArg length : %lu", nArgs);
+ post ("OSC_writeBlobArg length : %lu", nArgs);
#endif
- buf->bufptr += 4;
+ buf->bufptr += 4;
- for (i = 0; i < nArgs; i++)
- {
- if (arg[i].type != BLOB_osc)
- {
- error("packOSC: blob element %i not blob type", i);
- return 9;
- }
- b = (unsigned char)((arg[i].datum.i)&0x0FF);/* force int to 8-bit byte */
+ for (i = 0; i < nArgs; i++)
+ {
+ if (arg[i].type != BLOB_osc)
+ {
+ error("packOSC: blob element %i not blob type", i);
+ return 9;
+ }
+ b = (unsigned char)((arg[i].datum.i)&0x0FF);/* force int to 8-bit byte */
#ifdef DEBUG
- post ("OSC_writeBlobArg : %d, %d", arg[i].datum.i, b);
+ post ("OSC_writeBlobArg : %d, %d", arg[i].datum.i, b);
#endif
- buf->bufptr[i] = b;
- }
- i = OSC_WriteBlobPadding(buf->bufptr, i);
- buf->bufptr += i;
- buf->gettingFirstUntypedArg = 0;
+ buf->bufptr[i] = b;
+ }
+ i = OSC_WriteBlobPadding(buf->bufptr, i);
+ buf->bufptr += i;
+ buf->gettingFirstUntypedArg = 0;
return 0;
}
@@ -1407,7 +1407,7 @@ static OSCTimeTag OSCTT_CurrentTimePlusOffset(uint4 offset)
OSCTimeTag tt;
static unsigned int onemillion = 1000000;
static unsigned int onethousand = 1000;
-#ifdef MSW
+#ifdef _WIN32
struct _timeb tb;
_ftime(&tb);