Index: apps/plugins/pdbox/PDa/src/m_class.c =================================================================== --- apps/plugins/pdbox/PDa/src/m_class.c (revision 21272) +++ apps/plugins/pdbox/PDa/src/m_class.c (working copy) @@ -6,6 +6,13 @@ #include "m_pd.h" #include "m_imp.h" #include "s_stuff.h" + +#ifdef ROCKBOX + +#include "plugin.h" +#define close rb->close + +#else /* ROCKBOX */ #include #ifdef UNIX #include @@ -16,6 +23,7 @@ #include #include +#endif /* ROCKBOX */ static t_symbol *class_loadsym; /* name under which an extern is invoked */ static void pd_defaultfloat(t_pd *x, t_float f); @@ -27,6 +35,10 @@ static void pd_defaultanything(t_pd *x, t_symbol *s, int argc, t_atom *argv) { +#ifdef ROCKBOX + (void) argc; + (void) argv; +#endif pd_error(x, "%s: no method for '%s'", (*x)->c_name->s_name, s->s_name); } @@ -422,6 +434,10 @@ static void class_nosavefn(t_gobj *z, t_binbuf *b) { +#ifdef ROCKBOX + (void) z; + (void) b; +#endif bug("save function called but not defined"); } @@ -465,7 +481,7 @@ s2++; } sym1 = symhash + (hash2 & (HASHSIZE-1)); - while (sym2 = *sym1) + while ((sym2 = *sym1)) { if (!strcmp(sym2->s_name, s)) return(sym2); sym1 = &sym2->s_next; @@ -488,7 +504,10 @@ return(dogensym(s, 0)); } -static t_symbol *addfileextent(t_symbol *s) +#ifndef ROCKBOX +static +#endif +t_symbol *addfileextent(t_symbol *s) { char namebuf[MAXPDSTRING], *str = s->s_name; int ln = strlen(str); @@ -617,6 +636,10 @@ t_floatarg ad[MAXPDARG+1], *dp = ad; int narg = 0; t_pd *bonzo; + +#ifdef ROCKBOX + (void) f; +#endif /* check for messages that are handled by fixed slots in the class structure. We don't catch "pointer" though so that sending "pointer" @@ -660,7 +683,7 @@ } if (argc > MAXPDARG) argc = MAXPDARG; if (x != &pd_objectmaker) *(ap++) = (t_int)x, narg++; - while (wanttype = *wp++) + while((wanttype = *wp++)) { switch (wanttype) { @@ -712,6 +735,11 @@ } narg++; ap++; +#ifdef ROCKBOX + break; + default: + break; +#endif } } switch (narg)