summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox/PDa/src/x_connective.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pdbox/PDa/src/x_connective.c')
-rw-r--r--apps/plugins/pdbox/PDa/src/x_connective.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/apps/plugins/pdbox/PDa/src/x_connective.c b/apps/plugins/pdbox/PDa/src/x_connective.c
index 52bc0920a1..8ad2f605cf 100644
--- a/apps/plugins/pdbox/PDa/src/x_connective.c
+++ b/apps/plugins/pdbox/PDa/src/x_connective.c
@@ -4,10 +4,18 @@
4 4
5/* connective objects */ 5/* connective objects */
6 6
7#ifdef ROCKBOX
8#include "plugin.h"
9#include "pdbox.h"
10#endif
11
7#include "m_pd.h" 12#include "m_pd.h"
8 13
14#ifndef ROCKBOX
9#include <string.h> 15#include <string.h>
10#include <stdio.h> 16#include <stdio.h>
17#endif
18
11extern t_pd *newest; 19extern t_pd *newest;
12 20
13/* -------------------------- int ------------------------------ */ 21/* -------------------------- int ------------------------------ */
@@ -62,6 +70,9 @@ typedef struct _pdfloat
62 70
63static void *pdfloat_new(t_pd *dummy, t_float f) 71static void *pdfloat_new(t_pd *dummy, t_float f)
64{ 72{
73#ifdef ROCKBOX
74 (void) dummy;
75#endif
65 t_pdfloat *x = (t_pdfloat *)pd_new(pdfloat_class); 76 t_pdfloat *x = (t_pdfloat *)pd_new(pdfloat_class);
66 x->x_f = f; 77 x->x_f = f;
67 outlet_new(&x->x_obj, &s_float); 78 outlet_new(&x->x_obj, &s_float);
@@ -105,6 +116,9 @@ typedef struct _pdsymbol
105 116
106static void *pdsymbol_new(t_pd *dummy, t_symbol *s) 117static void *pdsymbol_new(t_pd *dummy, t_symbol *s)
107{ 118{
119#ifdef ROCKBOX
120 (void) dummy;
121#endif
108 t_pdsymbol *x = (t_pdsymbol *)pd_new(pdsymbol_class); 122 t_pdsymbol *x = (t_pdsymbol *)pd_new(pdsymbol_class);
109 x->x_s = s; 123 x->x_s = s;
110 outlet_new(&x->x_obj, &s_symbol); 124 outlet_new(&x->x_obj, &s_symbol);
@@ -125,6 +139,10 @@ static void pdsymbol_symbol(t_pdsymbol *x, t_symbol *s)
125 139
126static void pdsymbol_anything(t_pdsymbol *x, t_symbol *s, int ac, t_atom *av) 140static void pdsymbol_anything(t_pdsymbol *x, t_symbol *s, int ac, t_atom *av)
127{ 141{
142#ifdef ROCKBOX
143 (void) ac;
144 (void) av;
145#endif
128 outlet_symbol(x->x_obj.ob_outlet, x->x_s = s); 146 outlet_symbol(x->x_obj.ob_outlet, x->x_s = s);
129} 147}
130 148
@@ -147,6 +165,9 @@ typedef struct _bang
147 165
148static void *bang_new(t_pd *dummy) 166static void *bang_new(t_pd *dummy)
149{ 167{
168#ifdef ROCKBOX
169 (void) dummy;
170#endif
150 t_bang *x = (t_bang *)pd_new(bang_class); 171 t_bang *x = (t_bang *)pd_new(bang_class);
151 outlet_new(&x->x_obj, &s_bang); 172 outlet_new(&x->x_obj, &s_bang);
152 newest = &x->x_obj.ob_pd; 173 newest = &x->x_obj.ob_pd;
@@ -155,6 +176,9 @@ static void *bang_new(t_pd *dummy)
155 176
156static void *bang_new2(t_bang f) 177static void *bang_new2(t_bang f)
157{ 178{
179#ifdef ROCKBOX
180 (void) f;
181#endif
158 return (bang_new(0)); 182 return (bang_new(0));
159} 183}
160 184
@@ -383,6 +407,9 @@ static void sel2_free(t_sel2 *x)
383 407
384static void *select_new(t_symbol *s, int argc, t_atom *argv) 408static void *select_new(t_symbol *s, int argc, t_atom *argv)
385{ 409{
410#ifdef ROCKBOX
411 (void) s;
412#endif
386 t_atom a; 413 t_atom a;
387 if (argc == 0) 414 if (argc == 0)
388 { 415 {
@@ -484,6 +511,9 @@ static void route_anything(t_route *x, t_symbol *sel, int argc, t_atom *argv)
484 511
485static void route_list(t_route *x, t_symbol *sel, int argc, t_atom *argv) 512static void route_list(t_route *x, t_symbol *sel, int argc, t_atom *argv)
486{ 513{
514#ifdef ROCKBOX
515 (void) sel;
516#endif
487 t_routeelement *e; 517 t_routeelement *e;
488 int nelement; 518 int nelement;
489 if (x->x_type == A_FLOAT) 519 if (x->x_type == A_FLOAT)
@@ -562,6 +592,9 @@ static void route_free(t_route *x)
562 592
563static void *route_new(t_symbol *s, int argc, t_atom *argv) 593static void *route_new(t_symbol *s, int argc, t_atom *argv)
564{ 594{
595#ifdef ROCKBOX
596 (void) s;
597#endif
565 int n; 598 int n;
566 t_routeelement *e; 599 t_routeelement *e;
567 t_route *x = (t_route *)pd_new(route_class); 600 t_route *x = (t_route *)pd_new(route_class);
@@ -610,6 +643,9 @@ typedef struct _pack
610 643
611static void *pack_new(t_symbol *s, int argc, t_atom *argv) 644static void *pack_new(t_symbol *s, int argc, t_atom *argv)
612{ 645{
646#ifdef ROCKBOX
647 (void) s;
648#endif
613 t_pack *x = (t_pack *)pd_new(pack_class); 649 t_pack *x = (t_pack *)pd_new(pack_class);
614 t_atom defarg[2], *ap, *vec, *vp; 650 t_atom defarg[2], *ap, *vec, *vp;
615 t_gpointer *gp; 651 t_gpointer *gp;
@@ -737,6 +773,9 @@ static void pack_symbol(t_pack *x, t_symbol *s)
737 773
738static void pack_list(t_pack *x, t_symbol *s, int ac, t_atom *av) 774static void pack_list(t_pack *x, t_symbol *s, int ac, t_atom *av)
739{ 775{
776#ifdef ROCKBOX
777 (void) s;
778#endif
740 obj_list(&x->x_obj, 0, ac, av); 779 obj_list(&x->x_obj, 0, ac, av);
741} 780}
742 781
@@ -793,6 +832,9 @@ typedef struct _unpack
793 832
794static void *unpack_new(t_symbol *s, int argc, t_atom *argv) 833static void *unpack_new(t_symbol *s, int argc, t_atom *argv)
795{ 834{
835#ifdef ROCKBOX
836 (void) s;
837#endif
796 t_unpack *x = (t_unpack *)pd_new(unpack_class); 838 t_unpack *x = (t_unpack *)pd_new(unpack_class);
797 t_atom defarg[2], *ap; 839 t_atom defarg[2], *ap;
798 t_unpackout *u; 840 t_unpackout *u;
@@ -841,6 +883,9 @@ static void *unpack_new(t_symbol *s, int argc, t_atom *argv)
841 883
842static void unpack_list(t_unpack *x, t_symbol *s, int argc, t_atom *argv) 884static void unpack_list(t_unpack *x, t_symbol *s, int argc, t_atom *argv)
843{ 885{
886#ifdef ROCKBOX
887 (void) s;
888#endif
844 t_atom *ap; 889 t_atom *ap;
845 t_unpackout *u; 890 t_unpackout *u;
846 int i; 891 int i;
@@ -907,6 +952,9 @@ typedef struct _trigger
907 952
908static void *trigger_new(t_symbol *s, int argc, t_atom *argv) 953static void *trigger_new(t_symbol *s, int argc, t_atom *argv)
909{ 954{
955#ifdef ROCKBOX
956 (void) s;
957#endif
910 t_trigger *x = (t_trigger *)pd_new(trigger_class); 958 t_trigger *x = (t_trigger *)pd_new(trigger_class);
911 t_atom defarg[2], *ap; 959 t_atom defarg[2], *ap;
912 t_triggerout *u; 960 t_triggerout *u;
@@ -953,6 +1001,9 @@ static void *trigger_new(t_symbol *s, int argc, t_atom *argv)
953 1001
954static void trigger_list(t_trigger *x, t_symbol *s, int argc, t_atom *argv) 1002static void trigger_list(t_trigger *x, t_symbol *s, int argc, t_atom *argv)
955{ 1003{
1004#ifdef ROCKBOX
1005 (void) s;
1006#endif
956 t_triggerout *u; 1007 t_triggerout *u;
957 int i; 1008 int i;
958 t_atom at; 1009 t_atom at;
@@ -1204,14 +1255,22 @@ static void *makefilename_new(t_symbol *s)
1204static void makefilename_float(t_makefilename *x, t_floatarg f) 1255static void makefilename_float(t_makefilename *x, t_floatarg f)
1205{ 1256{
1206 char buf[MAXPDSTRING]; 1257 char buf[MAXPDSTRING];
1258#ifdef ROCKBOX
1259 snprintf(buf, sizeof(buf), x->x_format->s_name, (int)f);
1260#else
1207 sprintf(buf, x->x_format->s_name, (int)f); 1261 sprintf(buf, x->x_format->s_name, (int)f);
1262#endif
1208 outlet_symbol(x->x_obj.ob_outlet, gensym(buf)); 1263 outlet_symbol(x->x_obj.ob_outlet, gensym(buf));
1209} 1264}
1210 1265
1211static void makefilename_symbol(t_makefilename *x, t_symbol *s) 1266static void makefilename_symbol(t_makefilename *x, t_symbol *s)
1212{ 1267{
1213 char buf[MAXPDSTRING]; 1268 char buf[MAXPDSTRING];
1269#ifdef ROCKBOX
1270 snprintf(buf, sizeof(buf), x->x_format->s_name, s->s_name);
1271#else
1214 sprintf(buf, x->x_format->s_name, s->s_name); 1272 sprintf(buf, x->x_format->s_name, s->s_name);
1273#endif
1215 outlet_symbol(x->x_obj.ob_outlet, gensym(buf)); 1274 outlet_symbol(x->x_obj.ob_outlet, gensym(buf));
1216} 1275}
1217 1276