summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox/PDa/src
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pdbox/PDa/src')
-rw-r--r--apps/plugins/pdbox/PDa/src/d_ugen.c6
-rw-r--r--apps/plugins/pdbox/PDa/src/g_array.c15
-rw-r--r--apps/plugins/pdbox/PDa/src/g_canvas.c2
-rw-r--r--apps/plugins/pdbox/PDa/src/g_graph.c2
-rw-r--r--apps/plugins/pdbox/PDa/src/g_template.c9
-rw-r--r--apps/plugins/pdbox/PDa/src/g_text.c24
-rw-r--r--apps/plugins/pdbox/PDa/src/m_binbuf.c4
-rw-r--r--apps/plugins/pdbox/PDa/src/m_obj.c4
-rw-r--r--apps/plugins/pdbox/PDa/src/x_connective.c4
9 files changed, 41 insertions, 29 deletions
diff --git a/apps/plugins/pdbox/PDa/src/d_ugen.c b/apps/plugins/pdbox/PDa/src/d_ugen.c
index 189ecb8edc..642ed580bd 100644
--- a/apps/plugins/pdbox/PDa/src/d_ugen.c
+++ b/apps/plugins/pdbox/PDa/src/d_ugen.c
@@ -866,7 +866,7 @@ void ugen_done_graph(t_dspcontext *dc)
866 t_dspcontext *parent_context = dc->dc_parentcontext; 866 t_dspcontext *parent_context = dc->dc_parentcontext;
867 float parent_srate; 867 float parent_srate;
868 int parent_vecsize; 868 int parent_vecsize;
869 int period, frequency, phase, vecsize; 869 int period, frequency, /* phase, */ vecsize;
870 float srate; 870 float srate;
871 int chainblockbegin; /* DSP chain onset before block prolog code */ 871 int chainblockbegin; /* DSP chain onset before block prolog code */
872 int chainblockend; /* and after block epilog code */ 872 int chainblockend; /* and after block epilog code */
@@ -931,7 +931,7 @@ void ugen_done_graph(t_dspcontext *dc)
931 frequency = (parent_vecsize * realoverlap * upsample)/ 931 frequency = (parent_vecsize * realoverlap * upsample)/
932 (vecsize * downsample); 932 (vecsize * downsample);
933 /* } IOhannes*/ 933 /* } IOhannes*/
934 phase = blk->x_phase; 934 /* phase = blk->x_phase; */
935 srate = parent_srate * realoverlap * upsample / downsample; 935 srate = parent_srate * realoverlap * upsample / downsample;
936 /* IOhannes */ 936 /* IOhannes */
937 if (period < 1) period = 1; 937 if (period < 1) period = 1;
@@ -951,7 +951,7 @@ void ugen_done_graph(t_dspcontext *dc)
951 vecsize = parent_vecsize; 951 vecsize = parent_vecsize;
952 downsample = upsample = 1;/* IOhannes */ 952 downsample = upsample = 1;/* IOhannes */
953 period = frequency = 1; 953 period = frequency = 1;
954 phase = 0; 954 /* phase = 0; */
955 if (!parent_context) reblock = 1; 955 if (!parent_context) reblock = 1;
956 switched = 0; 956 switched = 0;
957 } 957 }
diff --git a/apps/plugins/pdbox/PDa/src/g_array.c b/apps/plugins/pdbox/PDa/src/g_array.c
index 484e6fa33d..529feef0e2 100644
--- a/apps/plugins/pdbox/PDa/src/g_array.c
+++ b/apps/plugins/pdbox/PDa/src/g_array.c
@@ -245,13 +245,13 @@ void glist_arraydialog(t_glist *parent, t_symbol *name, t_floatarg size,
245 t_floatarg saveit, t_floatarg otherflag) 245 t_floatarg saveit, t_floatarg otherflag)
246{ 246{
247 t_glist *gl; 247 t_glist *gl;
248 t_garray *a; 248 /* t_garray *a; unused */
249 if (size < 1) 249 if (size < 1)
250 size = 1; 250 size = 1;
251 if (otherflag == 0 || (!(gl = glist_findgraph(parent)))) 251 if (otherflag == 0 || (!(gl = glist_findgraph(parent))))
252 gl = glist_addglist(parent, &s_, 0, 1, 252 gl = glist_addglist(parent, &s_, 0, 1,
253 (size > 1 ? size-1 : size), -1, 0, 0, 0, 0); 253 (size > 1 ? size-1 : size), -1, 0, 0, 0, 0);
254 a = graph_array(gl, sharptodollar(name), &s_float, size, saveit); 254 /* a = */ graph_array(gl, sharptodollar(name), &s_float, size, saveit);
255} 255}
256 256
257 /* this is called from the properties dialog window for an existing array */ 257 /* this is called from the properties dialog window for an existing array */
@@ -706,17 +706,22 @@ static void garray_vis(t_gobj *z, t_glist *glist, int vis)
706 else if (!template_find_field(template, gensym("x"), &xonset, &type, 706 else if (!template_find_field(template, gensym("x"), &xonset, &type,
707 &arraytype) || type != DT_FLOAT) 707 &arraytype) || type != DT_FLOAT)
708 { 708 {
709 float firsty, xcum = x->x_firstx; 709 float xcum = x->x_firstx;
710 int lastpixel = -1, ndrawn = 0; 710 int lastpixel = -1, ndrawn = 0;
711 float yval = 0, xpix; 711 float xpix;
712#ifndef ROCKBOX
713 float firsty, yval = 0;
714#endif
712 int ixpix = 0; 715 int ixpix = 0;
713#ifndef ROCKBOX 716#ifndef ROCKBOX
714 sys_vgui(".x%x.c create line \\\n", glist_getcanvas(glist)); 717 sys_vgui(".x%x.c create line \\\n", glist_getcanvas(glist));
715#endif 718#endif
716 for (i = 0; i < x->x_n; i++) 719 for (i = 0; i < x->x_n; i++)
717 { 720 {
721#ifndef ROCKBOX
718 yval = fixtof(*(t_sample *)(x->x_vec + 722 yval = fixtof(*(t_sample *)(x->x_vec +
719 template->t_n * i * sizeof (t_word) + yonset)); 723 template->t_n * i * sizeof (t_word) + yonset));
724#endif
720 xpix = glist_xtopixels(glist, xcum); 725 xpix = glist_xtopixels(glist, xcum);
721 ixpix = xpix + 0.5; 726 ixpix = xpix + 0.5;
722 if (ixpix != lastpixel) 727 if (ixpix != lastpixel)
@@ -737,9 +742,7 @@ static void garray_vis(t_gobj *z, t_glist *glist, int vis)
737 else if (ndrawn == 1) sys_vgui("%d %f \\\n", ixpix, 742 else if (ndrawn == 1) sys_vgui("%d %f \\\n", ixpix,
738 glist_ytopixels(glist, yval)); 743 glist_ytopixels(glist, yval));
739 sys_vgui("-tags .x%x.a%x\n", glist_getcanvas(glist), x); 744 sys_vgui("-tags .x%x.a%x\n", glist_getcanvas(glist), x);
740#endif
741 firsty = fixtof(*(t_sample *)(x->x_vec + yonset)); 745 firsty = fixtof(*(t_sample *)(x->x_vec + yonset));
742#ifndef ROCKBOX
743 sys_vgui(".x%x.c create text %f %f -text {%s} -anchor e\ 746 sys_vgui(".x%x.c create text %f %f -text {%s} -anchor e\
744 -font -*-courier-bold--normal--%d-* -tags .x%x.a%x\n", 747 -font -*-courier-bold--normal--%d-* -tags .x%x.a%x\n",
745 glist_getcanvas(glist), 748 glist_getcanvas(glist),
diff --git a/apps/plugins/pdbox/PDa/src/g_canvas.c b/apps/plugins/pdbox/PDa/src/g_canvas.c
index a48a28e164..e3774dfd05 100644
--- a/apps/plugins/pdbox/PDa/src/g_canvas.c
+++ b/apps/plugins/pdbox/PDa/src/g_canvas.c
@@ -381,7 +381,7 @@ t_canvas *canvas_new(void *dummy, t_symbol *sel, int argc, t_atom *argv)
381#ifdef ROCKBOX 381#ifdef ROCKBOX
382 (void) dummy; 382 (void) dummy;
383 (void) sel; 383 (void) sel;
384 int font = 10; 384 int font __attribute__((unused)) = 10;
385#else /* ROCKBOX */ 385#else /* ROCKBOX */
386 int font = (owner ? owner->gl_font : sys_defaultfont); 386 int font = (owner ? owner->gl_font : sys_defaultfont);
387#endif /* ROCKBOX */ 387#endif /* ROCKBOX */
diff --git a/apps/plugins/pdbox/PDa/src/g_graph.c b/apps/plugins/pdbox/PDa/src/g_graph.c
index 39a2993264..eba2f4f3ba 100644
--- a/apps/plugins/pdbox/PDa/src/g_graph.c
+++ b/apps/plugins/pdbox/PDa/src/g_graph.c
@@ -736,10 +736,12 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis)
736 zero, this is disabled. */ 736 zero, this is disabled. */
737 if (x->gl_xtick.k_lperb) 737 if (x->gl_xtick.k_lperb)
738 { 738 {
739#ifndef ROCKBOX
739 float upix, lpix; 740 float upix, lpix;
740 if (y2 < y1) 741 if (y2 < y1)
741 upix = y1, lpix = y2; 742 upix = y1, lpix = y2;
742 else upix = y2, lpix = y1; 743 else upix = y2, lpix = y1;
744#endif
743 for (i = 0, f = x->gl_xtick.k_point; 745 for (i = 0, f = x->gl_xtick.k_point;
744 f < 0.99 * x->gl_x2 + 0.01*x->gl_x1; i++, 746 f < 0.99 * x->gl_x2 + 0.01*x->gl_x1; i++,
745 f += x->gl_xtick.k_inc) 747 f += x->gl_xtick.k_inc)
diff --git a/apps/plugins/pdbox/PDa/src/g_template.c b/apps/plugins/pdbox/PDa/src/g_template.c
index e73ca3ef5a..0245158fce 100644
--- a/apps/plugins/pdbox/PDa/src/g_template.c
+++ b/apps/plugins/pdbox/PDa/src/g_template.c
@@ -1398,7 +1398,10 @@ static void plot_vis(t_gobj *z, t_glist *glist,
1398 { 1398 {
1399 char outline[20]; 1399 char outline[20];
1400 int lastpixel = -1, ndrawn = 0; 1400 int lastpixel = -1, ndrawn = 0;
1401 float xsum, yval = 0, wval = 0, xpix; 1401 float xsum, yval = 0, xpix;
1402#ifndef ROCKBOX
1403 float wval = 0;
1404#endif
1402 int ixpix = 0, i; 1405 int ixpix = 0, i;
1403 1406
1404 /* draw the trace */ 1407 /* draw the trace */
@@ -1422,7 +1425,9 @@ static void plot_vis(t_gobj *z, t_glist *glist,
1422 if (yonset >= 0) 1425 if (yonset >= 0)
1423 yval = *(float *)((elem + elemsize * i) + yonset); 1426 yval = *(float *)((elem + elemsize * i) + yonset);
1424 else yval = 0; 1427 else yval = 0;
1428#ifndef ROCKBOX
1425 wval = *(float *)((elem + elemsize * i) + wonset); 1429 wval = *(float *)((elem + elemsize * i) + wonset);
1430#endif
1426 xpix = glist_xtopixels(glist, basex + usexloc); 1431 xpix = glist_xtopixels(glist, basex + usexloc);
1427 ixpix = xpix + 0.5; 1432 ixpix = xpix + 0.5;
1428 if (xonset >= 0 || ixpix != lastpixel) 1433 if (xonset >= 0 || ixpix != lastpixel)
@@ -1447,7 +1452,9 @@ static void plot_vis(t_gobj *z, t_glist *glist,
1447 if (yonset >= 0) 1452 if (yonset >= 0)
1448 yval = *(float *)((elem + elemsize * i) + yonset); 1453 yval = *(float *)((elem + elemsize * i) + yonset);
1449 else yval = 0; 1454 else yval = 0;
1455#ifndef ROCKBOX
1450 wval = *(float *)((elem + elemsize * i) + wonset); 1456 wval = *(float *)((elem + elemsize * i) + wonset);
1457#endif
1451 xpix = glist_xtopixels(glist, basex + usexloc); 1458 xpix = glist_xtopixels(glist, basex + usexloc);
1452 ixpix = xpix + 0.5; 1459 ixpix = xpix + 0.5;
1453 if (xonset >= 0 || ixpix != lastpixel) 1460 if (xonset >= 0 || ixpix != lastpixel)
diff --git a/apps/plugins/pdbox/PDa/src/g_text.c b/apps/plugins/pdbox/PDa/src/g_text.c
index ece0f58763..63105c0aa9 100644
--- a/apps/plugins/pdbox/PDa/src/g_text.c
+++ b/apps/plugins/pdbox/PDa/src/g_text.c
@@ -814,10 +814,10 @@ static void gatom_param(t_gatom *x, t_symbol *sel, int argc, t_atom *argv)
814 /* ---------------- gatom-specific widget functions --------------- */ 814 /* ---------------- gatom-specific widget functions --------------- */
815static void gatom_getwherelabel(t_gatom *x, t_glist *glist, int *xp, int *yp) 815static void gatom_getwherelabel(t_gatom *x, t_glist *glist, int *xp, int *yp)
816{ 816{
817 int x1, y1, x2, y2, width, height; 817 int x1, y1, x2, y2 /*, width, height */;
818 text_getrect(&x->a_text.te_g, glist, &x1, &y1, &x2, &y2); 818 text_getrect(&x->a_text.te_g, glist, &x1, &y1, &x2, &y2);
819 width = x2 - x1; 819 /* width = x2 - x1; */
820 height = y2 - y1; 820 /* height = y2 - y1; */
821 if (x->a_wherelabel == ATOM_LABELLEFT) 821 if (x->a_wherelabel == ATOM_LABELLEFT)
822 { 822 {
823 *xp = x1 - 3 - 823 *xp = x1 - 3 -
@@ -1265,9 +1265,9 @@ static t_widgetbehavior gatom_widgetbehavior =
1265void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime, 1265void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
1266 char *tag, int x1, int y1, int x2, int y2) 1266 char *tag, int x1, int y1, int x2, int y2)
1267{ 1267{
1268 int n = obj_noutlets(ob), nplus = (n == 1 ? 1 : n-1), i;
1269#ifdef ROCKBOX 1268#ifdef ROCKBOX
1270 (void) glist; 1269 (void) glist;
1270 (void) ob;
1271 (void) firsttime; 1271 (void) firsttime;
1272 (void) tag; 1272 (void) tag;
1273 (void) x1; 1273 (void) x1;
@@ -1275,11 +1275,12 @@ void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
1275 (void) x2; 1275 (void) x2;
1276 (void) y2; 1276 (void) y2;
1277#else /* ROCKBOX */ 1277#else /* ROCKBOX */
1278 int n = obj_noutlets(ob), i;
1278 int width = x2 - x1; 1279 int width = x2 - x1;
1279#endif /* ROCKBOX */ 1280 int nplus = (n == 1 ? 1 : n-1);
1281
1280 for (i = 0; i < n; i++) 1282 for (i = 0; i < n; i++)
1281 { 1283 {
1282#ifndef ROCKBOX
1283 int onset = x1 + (width - IOWIDTH) * i / nplus; 1284 int onset = x1 + (width - IOWIDTH) * i / nplus;
1284 if (firsttime) 1285 if (firsttime)
1285 sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %so%d\n", 1286 sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %so%d\n",
@@ -1292,13 +1293,12 @@ void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
1292 glist_getcanvas(glist), tag, i, 1293 glist_getcanvas(glist), tag, i,
1293 onset, y2 - 1, 1294 onset, y2 - 1,
1294 onset + IOWIDTH, y2); 1295 onset + IOWIDTH, y2);
1295#endif /* ROCKBOX */
1296 } 1296 }
1297
1297 n = obj_ninlets(ob); 1298 n = obj_ninlets(ob);
1298 nplus = (n == 1 ? 1 : n-1); 1299 nplus = (n == 1 ? 1 : n-1);
1299 for (i = 0; i < n; i++) 1300 for (i = 0; i < n; i++)
1300 { 1301 {
1301#ifndef ROCKBOX
1302 int onset = x1 + (width - IOWIDTH) * i / nplus; 1302 int onset = x1 + (width - IOWIDTH) * i / nplus;
1303 if (firsttime) 1303 if (firsttime)
1304 sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %si%d\n", 1304 sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %si%d\n",
@@ -1311,15 +1311,15 @@ void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
1311 glist_getcanvas(glist), tag, i, 1311 glist_getcanvas(glist), tag, i,
1312 onset, y1, 1312 onset, y1,
1313 onset + IOWIDTH, y1 + EXTRAPIX); 1313 onset + IOWIDTH, y1 + EXTRAPIX);
1314#endif /* ROCKBOX */
1315 } 1314 }
1315#endif /* ROCKBOX */
1316} 1316}
1317 1317
1318void text_drawborder(t_text *x, t_glist *glist, 1318void text_drawborder(t_text *x, t_glist *glist,
1319 char *tag, int width2, int height2, int firsttime) 1319 char *tag, int width2, int height2, int firsttime)
1320{ 1320{
1321 t_object *ob; 1321 t_object *ob;
1322 int x1, y1, x2, y2, width, height; 1322 int x1, y1, x2, y2 /* , width, height */;
1323 1323
1324#ifdef ROCKBOX 1324#ifdef ROCKBOX
1325 (void) width2; 1325 (void) width2;
@@ -1327,8 +1327,8 @@ void text_drawborder(t_text *x, t_glist *glist,
1327#endif 1327#endif
1328 1328
1329 text_getrect(&x->te_g, glist, &x1, &y1, &x2, &y2); 1329 text_getrect(&x->te_g, glist, &x1, &y1, &x2, &y2);
1330 width = x2 - x1; 1330 /* width = x2 - x1; */
1331 height = y2 - y1; 1331 /* height = y2 - y1; */
1332 if (x->te_type == T_OBJECT) 1332 if (x->te_type == T_OBJECT)
1333 { 1333 {
1334#ifndef ROCKBOX 1334#ifndef ROCKBOX
diff --git a/apps/plugins/pdbox/PDa/src/m_binbuf.c b/apps/plugins/pdbox/PDa/src/m_binbuf.c
index b7c9a925d4..1665e213b9 100644
--- a/apps/plugins/pdbox/PDa/src/m_binbuf.c
+++ b/apps/plugins/pdbox/PDa/src/m_binbuf.c
@@ -96,13 +96,13 @@ void binbuf_text(t_binbuf *x, char *text, size_t size)
96 { 96 {
97 /* it's an atom other than a comma or semi */ 97 /* it's an atom other than a comma or semi */
98 char c; 98 char c;
99 int floatstate = 0, slash = 0, lastslash = 0, 99 int floatstate = 0, slash = 0, /* lastslash = 0, */
100 firstslash = (*textp == '\\'); 100 firstslash = (*textp == '\\');
101 bufp = buf; 101 bufp = buf;
102 do 102 do
103 { 103 {
104 c = *bufp = *textp++; 104 c = *bufp = *textp++;
105 lastslash = slash; 105 /* lastslash = slash; */
106 slash = (c == '\\'); 106 slash = (c == '\\');
107 107
108 if (floatstate >= 0) 108 if (floatstate >= 0)
diff --git a/apps/plugins/pdbox/PDa/src/m_obj.c b/apps/plugins/pdbox/PDa/src/m_obj.c
index fa17a9052b..994b0bffed 100644
--- a/apps/plugins/pdbox/PDa/src/m_obj.c
+++ b/apps/plugins/pdbox/PDa/src/m_obj.c
@@ -655,9 +655,9 @@ int obj_sigoutletindex(t_object *x, int m)
655 655
656int obj_issignaloutlet(t_object *x, int m) 656int obj_issignaloutlet(t_object *x, int m)
657{ 657{
658 int n; 658 /* int n; */
659 t_outlet *o2; 659 t_outlet *o2;
660 for (o2 = x->ob_outlet, n = 0; o2 && m--; o2 = o2->o_next); 660 for (o2 = x->ob_outlet /* , n = 0 */; o2 && m--; o2 = o2->o_next);
661 return (o2 && (o2->o_sym == &s_signal)); 661 return (o2 && (o2->o_sym == &s_signal));
662} 662}
663 663
diff --git a/apps/plugins/pdbox/PDa/src/x_connective.c b/apps/plugins/pdbox/PDa/src/x_connective.c
index bd504b54a4..f5462db26b 100644
--- a/apps/plugins/pdbox/PDa/src/x_connective.c
+++ b/apps/plugins/pdbox/PDa/src/x_connective.c
@@ -647,7 +647,7 @@ static void *pack_new(t_symbol *s, int argc, t_atom *argv)
647 (void) s; 647 (void) s;
648#endif 648#endif
649 t_pack *x = (t_pack *)pd_new(pack_class); 649 t_pack *x = (t_pack *)pd_new(pack_class);
650 t_atom defarg[2], *ap, *vec, *vp; 650 t_atom defarg[2], *ap, /* *vec, */ *vp;
651 t_gpointer *gp; 651 t_gpointer *gp;
652 int nptr = 0; 652 int nptr = 0;
653 int i; 653 int i;
@@ -660,7 +660,7 @@ static void *pack_new(t_symbol *s, int argc, t_atom *argv)
660 } 660 }
661 661
662 x->x_n = argc; 662 x->x_n = argc;
663 vec = x->x_vec = (t_atom *)getbytes(argc * sizeof(*x->x_vec)); 663 /* vec = */ x->x_vec = (t_atom *)getbytes(argc * sizeof(*x->x_vec));
664 x->x_outvec = (t_atom *)getbytes(argc * sizeof(*x->x_outvec)); 664 x->x_outvec = (t_atom *)getbytes(argc * sizeof(*x->x_outvec));
665 665
666 for (i = argc, ap = argv; i--; ap++) 666 for (i = argc, ap = argv; i--; ap++)