From e1f0d7064d41ad7e1ee41375253f93c43db4dc32 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 17 Nov 2011 19:58:31 +0000 Subject: replaced type-punning with int/float union svn path=/trunk/externals/OSCx/; revision=15789 --- src/dumpOSC.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/dumpOSC.c') diff --git a/src/dumpOSC.c b/src/dumpOSC.c index cf74299..28405c3 100644 --- a/src/dumpOSC.c +++ b/src/dumpOSC.c @@ -538,7 +538,7 @@ void PrintClientAddr(ClientAddr CA) { printf(" clilen %d, sockfd %d\n", CA->clilen, CA->sockfd); printf(" sin_family %d, sin_port %d\n", CA->cl_addr.sin_family, CA->cl_addr.sin_port); - printf(" address: (%x) %s\n", addr, inet_ntoa(CA->cl_addr.sin_addr)); + printf(" address: (%lx) %s\n", addr, inet_ntoa(CA->cl_addr.sin_addr)); printf(" sin_zero = \"%c%c%c%c%c%c%c%c\"\n", CA->cl_addr.sin_zero[0], @@ -902,6 +902,11 @@ static void dumpOSC_PrintHeuristicallyTypeGuessedArgs(t_dumpOSC *x, void *v, int t_atom* mya = x->x_outat; //int myi; + union + { + float f; + int32_t i; + }u; /* Go through the arguments 32 bits at a time */ ints = v; @@ -909,9 +914,9 @@ static void dumpOSC_PrintHeuristicallyTypeGuessedArgs(t_dumpOSC *x, void *v, int for (i = 0; i= -1000 && thisi <= 1000000) { #ifdef DEBUG -- cgit v1.2.1