From 46537caa6783fcf286c9292aca028400aba1c2cb Mon Sep 17 00:00:00 2001 From: neon Date: Tue, 3 Jan 2017 17:06:14 +0100 Subject: [PATCH 1/2] Printing intX_t and uintX_t using macros PRId32 and PRIu32 from inttypes.h --- tinyosc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tinyosc.c b/tinyosc.c index 13fa09ee69..a50e40c84e 100644 --- a/tinyosc.c +++ b/tinyosc.c @@ -18,6 +18,7 @@ #include #include #include +#include #if _WIN32 #include #define tosc_strncpy(_dst, _src, _len) strncpy_s(_dst, _len, _src, _TRUNCATE) @@ -301,8 +302,8 @@ void tosc_printMessage(tosc_message *osc) { case 'f': printf(" %g", tosc_getNextFloat(osc)); break; case 'd': printf(" %g", tosc_getNextDouble(osc)); break; case 'i': printf(" %d", tosc_getNextInt32(osc)); break; - case 'h': printf(" %lld", tosc_getNextInt64(osc)); break; - case 't': printf(" %lld", tosc_getNextTimetag(osc)); break; + case 'h': printf(" %" PRId64, tosc_getNextInt64(osc)); break; // PRId64 chooses corrent format (ld,lld,..) + case 't': printf(" %" PRIu64, tosc_getNextTimetag(osc)); break; // PRIu64 chooses corrent format (lu,llu,..) case 's': printf(" %s", tosc_getNextString(osc)); break; case 'F': printf(" false"); break; case 'I': printf(" inf"); break; From 533ce13b586b5775f896c993e2b469d11fd93d6e Mon Sep 17 00:00:00 2001 From: neon Date: Tue, 3 Jan 2017 17:09:13 +0100 Subject: [PATCH 2/2] Added .travis.yml for Travis CI build job on GCC and CLANG --- .travis.yml | 6 ++++++ README.md | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..6262a7fb21 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: c +compiler: + - clang + - gcc +script: + - . build.sh diff --git a/README.md b/README.md index 534912c992..f0435f9b5d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/neonsoftware/tinyosc.svg?branch=ci)](https://travis-ci.org/neonsoftware/tinyosc) + # TinyOSC TinyOSC is a minimal [Open Sound Control](http://opensoundcontrol.org/) (OSC) library written in C. The typical use case is to parse a raw buffer received directly from a socket. Given the limited nature of the library it also tends to be quite fast. It doesn't hold on to much state and it doesn't do much error checking. If you have a good idea of what OSC packets you will receive and need to process them quickly, this library might be for you.