summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox/PDa/extra/OSCroute.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pdbox/PDa/extra/OSCroute.c')
-rw-r--r--apps/plugins/pdbox/PDa/extra/OSCroute.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/apps/plugins/pdbox/PDa/extra/OSCroute.c b/apps/plugins/pdbox/PDa/extra/OSCroute.c
index 24860d0b79..34af5aab4b 100644
--- a/apps/plugins/pdbox/PDa/extra/OSCroute.c
+++ b/apps/plugins/pdbox/PDa/extra/OSCroute.c
@@ -42,6 +42,10 @@ The OSC webpage is http://cnmat.cnmat.berkeley.edu/OpenSoundControl
42 42
43 */ 43 */
44 44
45#ifdef ROCKBOX
46#include "plugin.h"
47#include "pdbox.h"
48#else /* ROCKBOX */
45#ifdef WIN32 49#ifdef WIN32
46 #include <stdlib.h> 50 #include <stdlib.h>
47 #include <string.h> 51 #include <string.h>
@@ -52,6 +56,7 @@ The OSC webpage is http://cnmat.cnmat.berkeley.edu/OpenSoundControl
52#ifdef UNIX 56#ifdef UNIX
53 #include <stdio.h> 57 #include <stdio.h>
54#endif 58#endif
59#endif /* ROCKBOX */
55 60
56/* structure definition of your object */ 61/* structure definition of your object */
57 62
@@ -114,6 +119,9 @@ static void StrCopyUntilSlash(char *target, const char *source);
114// free 119// free
115static void OSCroute_free(t_OSCroute *x) 120static void OSCroute_free(t_OSCroute *x)
116{ 121{
122#ifdef ROCKBOX
123 (void) x;
124#endif
117 // freebytes(x->x_vec, x->x_nelement * sizeof(*x->x_vec)); 125 // freebytes(x->x_vec, x->x_nelement * sizeof(*x->x_vec));
118} 126}
119 127
@@ -154,7 +162,9 @@ void OSCroute_setup(void) {
154 162
155void *OSCroute_new(t_symbol *s, int argc, t_atom *argv) 163void *OSCroute_new(t_symbol *s, int argc, t_atom *argv)
156{ 164{
157 165#ifdef ROCKBOX
166 (void) s;
167#endif
158 t_OSCroute *x = (t_OSCroute *)pd_new(OSCroute_class); // get memory for a new object & initialize 168 t_OSCroute *x = (t_OSCroute *)pd_new(OSCroute_class); // get memory for a new object & initialize
159 169
160 int i; //{{raf}} n not used 170 int i; //{{raf}} n not used
@@ -236,6 +246,9 @@ void *OSCroute_new(t_symbol *s, int argc, t_atom *argv)
236 246
237 247
238void OSCroute_version (t_OSCroute *x) { 248void OSCroute_version (t_OSCroute *x) {
249#ifdef ROCKBOX
250 (void) x;
251#endif
239 // EnterCallback(); 252 // EnterCallback();
240 post("OSCroute Version " OSC_ROUTE_VERSION 253 post("OSCroute Version " OSC_ROUTE_VERSION
241 ", by Matt Wright. pd jdl, win32: raf.\nOSCroute Compiled " __TIME__ " " __DATE__); 254 ", by Matt Wright. pd jdl, win32: raf.\nOSCroute Compiled " __TIME__ " " __DATE__);
@@ -248,15 +261,27 @@ void OSCroute_version (t_OSCroute *x) {
248 261
249void OSCroute_assist (t_OSCroute *x, void *box, long msg, long arg, 262void OSCroute_assist (t_OSCroute *x, void *box, long msg, long arg,
250 char *dstString) { 263 char *dstString) {
264#ifdef ROCKBOX
265 (void) box;
266#endif
251 // EnterCallback(); 267 // EnterCallback();
252 268
253 if (msg==ASSIST_INLET) { 269 if (msg==ASSIST_INLET) {
270#ifdef ROCKBOX
271 strcpy(dstString, "Incoming OSC messages");
272#else
254 sprintf(dstString, "Incoming OSC messages"); 273 sprintf(dstString, "Incoming OSC messages");
274#endif
255 } else if (msg==ASSIST_OUTLET) { 275 } else if (msg==ASSIST_OUTLET) {
256 if (arg < 0 || arg >= x->x_num) { 276 if (arg < 0 || arg >= x->x_num) {
257 post("* OSCroute_assist: No outlet corresponds to arg %ld!", arg); 277 post("* OSCroute_assist: No outlet corresponds to arg %ld!", arg);
258 } else { 278 } else {
279#ifdef ROCKBOX
280 strcpy(dstString, "subaddress + args for prefix ");
281 strcat(dstString, x->x_prefixes[arg]);
282#else
259 sprintf(dstString, "subaddress + args for prefix %s", x->x_prefixes[arg]); 283 sprintf(dstString, "subaddress + args for prefix %s", x->x_prefixes[arg]);
284#endif
260 } 285 }
261 } else { 286 } else {
262 post("* OSCroute_assist: unrecognized message %ld", msg); 287 post("* OSCroute_assist: unrecognized message %ld", msg);
@@ -266,6 +291,9 @@ void OSCroute_assist (t_OSCroute *x, void *box, long msg, long arg,
266} 291}
267 292
268void OSCroute_list(t_OSCroute *x, t_symbol *s, int argc, t_atom *argv) { 293void OSCroute_list(t_OSCroute *x, t_symbol *s, int argc, t_atom *argv) {
294#ifdef ROCKBOX
295 (void) s;
296#endif
269 // EnterCallback(); 297 // EnterCallback();
270 if (argc > 0 && argv[0].a_type == A_SYMBOL) { 298 if (argc > 0 && argv[0].a_type == A_SYMBOL) {
271 /* Ignore the fact that this is a "list" */ 299 /* Ignore the fact that this is a "list" */