From ea157b99c1427b12a6673d2124a4b55849fc30b6 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Sun, 4 Sep 2022 14:01:33 +0200 Subject: force .pd_linux as binary file extension Gbp-Pq: Name force-pd_linux-as-extension --- Makefile | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/Makefile b/Makefile index 7f8a16e..63dc863 100644 --- a/Makefile +++ b/Makefile @@ -160,29 +160,6 @@ endif ifeq ($(UNAME),Linux) CPU := $(shell uname -m) EXTENSION = pd_linux - ifeq ($(findstring arm,$(CPU)),arm) - EXTENSION = l_arm - endif - ifeq ($(CPU),i386) - EXTENSION = l_i386 - endif - ifeq ($(CPU),i486) - EXTENSION = l_i386 - endif - ifeq ($(CPU),i586) - EXTENSION = l_i386 - endif - ifeq ($(CPU),i686) - EXTENSION = l_i386 - endif - ifeq ($(CPU),amd64) - # amd64 and ia64 aren't the same thing, but that's how its done in pd... - EXTENSION = l_ia64 - endif - ifeq ($(CPU),x86_64) - # x86_64 and ia64 aren't the same thing, but that's how its done in pd... - EXTENSION = l_ia64 - endif SOURCES += $(SOURCES_linux) SHARED_EXTENSION = so OS = linux -- cgit v1.2.3 From 5d9e62bb9660701e9ae8461e40f275193345948a Mon Sep 17 00:00:00 2001 From: Debian Multimedia Maintainers Date: Sun, 4 Sep 2022 14:01:33 +0200 Subject: fixed format-security errors Forwarded: no Last-Update: 2018-01-30 Last-Update: 2018-01-30 Gbp-Pq: Name fix-format.patch --- allow.c | 2 +- arbran.c | 2 +- arraycopy.c | 2 +- average.c | 2 +- beat.c | 2 +- beta.c | 2 +- bilex.c | 2 +- borax.c | 2 +- cauchy.c | 2 +- chord.c | 2 +- delta.c | 2 +- deny.c | 2 +- dist.c | 2 +- divide.c | 2 +- divmod.c | 2 +- edge.c | 2 +- expo.c | 2 +- fifo.c | 2 +- gauss.c | 2 +- gestalt.c | 2 +- history.c | 2 +- ignore.c | 2 +- iso.c | 2 +- lifo.c | 2 +- limit.c | 2 +- linear.c | 2 +- listfifo.c | 2 +- listfunnel.c | 2 +- minus.c | 2 +- mlife.c | 2 +- multi.c | 2 +- nchange.c | 2 +- netclient.c | 2 +- netdist.c | 2 +- netrec.c | 2 +- netserver.c | 2 +- nroute.c | 2 +- pitch.c | 2 +- plus.c | 2 +- poisson.c | 2 +- pong.c | 2 +- pulse.c | 2 +- remote.c | 2 +- rewrap.c | 2 +- rhythm.c | 2 +- scale.c | 2 +- score.c | 2 +- split.c | 2 +- step.c | 2 +- subst.c | 2 +- sync.c | 2 +- temperature.c | 2 +- tilt.c | 2 +- timebang.c | 2 +- triang.c | 2 +- unroute.c | 2 +- urn.c | 2 +- velocity.c | 2 +- weibull.c | 2 +- wrap.c | 2 +- 60 files changed, 60 insertions(+), 60 deletions(-) diff --git a/allow.c b/allow.c index 15b3803..cac27e2 100644 --- a/allow.c +++ b/allow.c @@ -105,7 +105,7 @@ void maxlib_allow_setup(void) class_addfloat(allow_class, allow_float); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(allow_class, gensym("maxlib/allow-help.pd")); #endif diff --git a/arbran.c b/arbran.c index 7dc68ac..06c232a 100644 --- a/arbran.c +++ b/arbran.c @@ -181,7 +181,7 @@ void maxlib_arbran_setup(void) class_addmethod(rand_arbran_class, (t_method)rand_arbran_setarrays, gensym("set"), A_SYMBOL, A_SYMBOL, 0); #ifndef MAXLIB class_sethelpsymbol(rand_arbran_class, gensym("arbran-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)rand_arbran_new, gensym("arbran"), A_SYMBOL, A_SYMBOL, 0); class_sethelpsymbol(rand_arbran_class, gensym("maxlib/arbran-help.pd")); diff --git a/arraycopy.c b/arraycopy.c index c5e2eb0..f57097e 100644 --- a/arraycopy.c +++ b/arraycopy.c @@ -306,7 +306,7 @@ void maxlib_arraycopy_setup(void) // class_addlist(arraycopy_class, arraycopy_list); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(arraycopy_class, gensym("maxlib/arraycopy-help.pd")); #endif diff --git a/average.c b/average.c index 4e0f2d0..2509858 100644 --- a/average.c +++ b/average.c @@ -192,7 +192,7 @@ void maxlib_average_setup(void) class_addfloat(average_class, average_float); class_addmethod(average_class, (t_method)average_index, gensym("index"), A_FLOAT, 0); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)average_new, gensym("average"), A_DEFFLOAT, 0); diff --git a/beat.c b/beat.c index 1bf5a76..ba514a1 100644 --- a/beat.c +++ b/beat.c @@ -394,7 +394,7 @@ void maxlib_beat_setup(void) class_addmethod(beat_class, (t_method)beat_print, gensym("print"), 0); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)beat_new, gensym("beat"), A_DEFFLOAT, 0); class_sethelpsymbol(beat_class, gensym("maxlib/beat-help.pd")); diff --git a/beta.c b/beta.c index 2d7f3b3..39d3724 100644 --- a/beta.c +++ b/beta.c @@ -93,7 +93,7 @@ void beta_setup(void) sizeof(t_rand_beta), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addbang(rand_beta_class, rand_beta_bang); class_sethelpsymbol(rand_beta_class, gensym("beta-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_beta_setup(void) diff --git a/bilex.c b/bilex.c index 6bd432e..949de88 100644 --- a/bilex.c +++ b/bilex.c @@ -77,7 +77,7 @@ void bilex_setup(void) sizeof(t_rand_bilex), 0, A_DEFFLOAT, 0); class_addbang(rand_bilex_class, rand_bilex_bang); class_sethelpsymbol(rand_bilex_class, gensym("bilex-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_bilex_setup(void) diff --git a/borax.c b/borax.c index fc271bf..f376df3 100644 --- a/borax.c +++ b/borax.c @@ -229,7 +229,7 @@ void maxlib_borax_setup(void) class_addfloat(borax_class, borax_float); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)borax_new, gensym("borax"), 0); class_sethelpsymbol(borax_class, gensym("maxlib/borax-help.pd")); diff --git a/cauchy.c b/cauchy.c index 73fcfef..13f8110 100644 --- a/cauchy.c +++ b/cauchy.c @@ -76,7 +76,7 @@ void cauchy_setup(void) sizeof(t_rand_cauchy), 0, A_DEFFLOAT, 0); class_addbang(rand_cauchy_class, rand_cauchy_bang); class_sethelpsymbol(rand_cauchy_class, gensym("cauchy-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else void maxlib_cauchy_setup(void) { diff --git a/chord.c b/chord.c index ad3f6eb..84563b6 100644 --- a/chord.c +++ b/chord.c @@ -1813,7 +1813,7 @@ void maxlib_chord_setup(void) class_addmethod(chord_class, (t_method)chord_ft1, gensym("ft1"), A_FLOAT, 0); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)chord_new, gensym("chord"), A_DEFFLOAT, 0); class_sethelpsymbol(chord_class, gensym("maxlib/chord-help.pd")); diff --git a/delta.c b/delta.c index f47e6a9..6784041 100644 --- a/delta.c +++ b/delta.c @@ -130,7 +130,7 @@ void maxlib_delta_setup(void) class_sethelpsymbol(delta_class, gensym("maxlib/delta-help.pd")); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)delta_new, gensym("delta"), A_DEFFLOAT, 0); class_sethelpsymbol(delta_class, gensym("maxlib/delta-help.pd")); diff --git a/deny.c b/deny.c index 5525cc2..28821df 100644 --- a/deny.c +++ b/deny.c @@ -107,7 +107,7 @@ void maxlib_deny_setup(void) class_addfloat(deny_class, deny_float); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(deny_class, gensym("maxlib/deny-help.pd")); #endif diff --git a/dist.c b/dist.c index e98eebb..555de5d 100644 --- a/dist.c +++ b/dist.c @@ -271,7 +271,7 @@ void maxlib_dist_setup(void) class_addanything(dist_class, dist_anything); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)dist_new, gensym("dist"), A_GIMME, 0); class_sethelpsymbol(dist_class, gensym("maxlib/dist-help.pd")); diff --git a/divide.c b/divide.c index be825e8..bc9bccb 100644 --- a/divide.c +++ b/divide.c @@ -101,7 +101,7 @@ void maxlib_divide_setup(void) class_addbang(divide_class, (t_method)divide_bang); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)divide_new, gensym("divide"), A_GIMME, 0); class_sethelpsymbol(divide_class, gensym("maxlib/divide-help.pd")); diff --git a/divmod.c b/divmod.c index 7151baf..354b61d 100644 --- a/divmod.c +++ b/divmod.c @@ -91,7 +91,7 @@ void maxlib_divmod_setup(void) class_addbang(divmod_class, (t_method)divmod_bang); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)divmod_new, gensym("divmod"), A_DEFFLOAT, A_DEFFLOAT, 0); class_sethelpsymbol(divmod_class, gensym("maxlib/divmod-help.pd")); diff --git a/edge.c b/edge.c index 8d94c71..059151a 100644 --- a/edge.c +++ b/edge.c @@ -67,7 +67,7 @@ void edge_setup(void) 0, sizeof(t_edge), 0, A_DEFFLOAT, 0); class_addfloat(edge_class, edge_float); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_edge_setup(void) diff --git a/expo.c b/expo.c index 4b65731..fb48992 100644 --- a/expo.c +++ b/expo.c @@ -72,7 +72,7 @@ void expo_setup(void) sizeof(t_rand_expo), 0, A_DEFFLOAT, 0); class_addbang(rand_expo_class, rand_expo_bang); class_sethelpsymbol(rand_expo_class, gensym("expo-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_expo_setup(void) diff --git a/fifo.c b/fifo.c index b747b70..92fe7c9 100644 --- a/fifo.c +++ b/fifo.c @@ -81,7 +81,7 @@ void fifo_setup(void) class_addfloat(fifo_class, fifo_int); class_addbang(fifo_class, fifo_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_fifo_setup(void) diff --git a/gauss.c b/gauss.c index 3f2270c..e4ce2ed 100644 --- a/gauss.c +++ b/gauss.c @@ -73,7 +73,7 @@ void gauss_setup(void) sizeof(t_rand_gauss), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addbang(rand_gauss_class, rand_gauss_bang); class_sethelpsymbol(rand_gauss_class, gensym("gauss-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_gauss_setup(void) diff --git a/gestalt.c b/gestalt.c index a929e0d..0c3bdb8 100644 --- a/gestalt.c +++ b/gestalt.c @@ -106,7 +106,7 @@ void gestalt_setup(void) class_addmethod(gestalt_class, (t_method)gestalt_ft1, gensym("ft1"), A_FLOAT, 0); class_addmethod(gestalt_class, (t_method)gestalt_ft2, gensym("ft2"), A_FLOAT, 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_gestalt_setup(void) diff --git a/history.c b/history.c index 4c94927..752e191 100644 --- a/history.c +++ b/history.c @@ -252,7 +252,7 @@ void history_setup(void) class_addfloat(history_class, history_float); class_addmethod(history_class, (t_method)history_time, gensym("time"), A_FLOAT, 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_history_setup(void) diff --git a/ignore.c b/ignore.c index 098751d..c7d8cf1 100644 --- a/ignore.c +++ b/ignore.c @@ -102,7 +102,7 @@ void ignore_setup(void) class_addmethod(ignore_class, (t_method)ignore_time, gensym("time"), A_FLOAT, 0); class_addfloat(ignore_class, ignore_float); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_ignore_setup(void) diff --git a/iso.c b/iso.c index 69a13ec..f505626 100644 --- a/iso.c +++ b/iso.c @@ -195,7 +195,7 @@ void iso_setup(void) { class_addbang(iso_class, iso_bang); class_addlist(iso_class, iso_pitch); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_iso_setup(void) { diff --git a/lifo.c b/lifo.c index 3f062ae..e7d0925 100644 --- a/lifo.c +++ b/lifo.c @@ -93,7 +93,7 @@ void lifo_setup(void) class_addbang(lifo_class, lifo_bang); class_addmethod(lifo_class, (t_method)lifo_clear, gensym("clear"), 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_lifo_setup(void) diff --git a/limit.c b/limit.c index cfd79ea..c4b32a1 100644 --- a/limit.c +++ b/limit.c @@ -117,7 +117,7 @@ void maxlib_limit_setup(void) class_addbang(limit_class, limit_bang); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(limit_class, gensym("maxlib/limit-help.pd")); #endif diff --git a/linear.c b/linear.c index a12881d..405578a 100644 --- a/linear.c +++ b/linear.c @@ -67,7 +67,7 @@ void linear_setup(void) sizeof(t_rand_linear), 0, A_DEFFLOAT, 0); class_addbang(rand_linear_class, rand_linear_bang); class_sethelpsymbol(rand_linear_class, gensym("linear-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_linear_setup(void) diff --git a/listfifo.c b/listfifo.c index 9433a79..cce774b 100644 --- a/listfifo.c +++ b/listfifo.c @@ -94,7 +94,7 @@ void listfifo_setup(void) class_addbang(listfifo_class, listfifo_bang); class_addlist(listfifo_class, listfifo_list); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_listfifo_setup(void) diff --git a/listfunnel.c b/listfunnel.c index 83f3927..70d77ff 100644 --- a/listfunnel.c +++ b/listfunnel.c @@ -76,7 +76,7 @@ void listfunnel_setup(void) class_addfloat(listfunnel_class, listfunnel_float); class_addlist(listfunnel_class, listfunnel_list); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_listfunnel_setup(void) diff --git a/minus.c b/minus.c index 6c88583..cd0c392 100644 --- a/minus.c +++ b/minus.c @@ -95,7 +95,7 @@ void minus_setup(void) class_addmethod(minus_class, (t_method)minus_ft1, gensym("ft1"), A_FLOAT, 0); class_addbang(minus_class, (t_method)minus_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_minus_setup(void) diff --git a/mlife.c b/mlife.c index 0768f16..4e69d8f 100644 --- a/mlife.c +++ b/mlife.c @@ -492,7 +492,7 @@ void mlife_setup(void) class_addfloat(mlife_class, ml_int); class_addbang(mlife_class, ml_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_mlife_setup(void) diff --git a/multi.c b/multi.c index 6cfbadf..8402065 100644 --- a/multi.c +++ b/multi.c @@ -94,7 +94,7 @@ void multi_setup(void) class_addmethod(multi_class, (t_method)multi_ft1, gensym("ft1"), A_FLOAT, 0); class_addbang(multi_class, (t_method)multi_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_multi_setup(void) diff --git a/nchange.c b/nchange.c index 5ede0c0..ff2c198 100644 --- a/nchange.c +++ b/nchange.c @@ -186,7 +186,7 @@ void nchange_setup(void) class_addanything(nchange_class, nchange_list); class_addmethod(nchange_class, (t_method)nchange_set, gensym("set"), A_GIMME, 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_nchange_setup(void) diff --git a/netclient.c b/netclient.c index 7436aed..8d7208e 100644 --- a/netclient.c +++ b/netclient.c @@ -377,7 +377,7 @@ void netclient_setup(void) class_addmethod(netclient_class, (t_method)netclient_rcv, gensym("receive"), 0); class_addmethod(netclient_class, (t_method)netclient_rcv, gensym("rcv"), 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_netclient_setup(void) diff --git a/netdist.c b/netdist.c index 2f2bf50..a2966b6 100644 --- a/netdist.c +++ b/netdist.c @@ -295,7 +295,7 @@ void netdist_setup(void) class_addmethod(netdist_class, (t_method)netdist_clear, gensym("clear"), 0); class_addmethod(netdist_class, (t_method)netdist_print, gensym("print"), 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_netdist_setup(void) diff --git a/netrec.c b/netrec.c index 91f8dd7..a20e695 100644 --- a/netrec.c +++ b/netrec.c @@ -433,7 +433,7 @@ void netrec_setup(void) sizeof(t_netrec), 0, A_DEFFLOAT, A_DEFFLOAT, A_DEFSYM, 0); class_addmethod(netrec_class, (t_method)netrec_print, gensym("print"), 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_netrec_setup(void) diff --git a/netserver.c b/netserver.c index 4fca399..563a52e 100644 --- a/netserver.c +++ b/netserver.c @@ -653,7 +653,7 @@ void netserver_setup(void) class_addmethod(netserver_class, (t_method)netserver_debug, gensym("debug"), 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_netserver_setup(void) diff --git a/nroute.c b/nroute.c index 60bcea8..022e389 100644 --- a/nroute.c +++ b/nroute.c @@ -172,7 +172,7 @@ void maxlib_nroute_setup(void) class_addanything(proxy_class, nroute_setmatch); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(nroute_class, gensym("maxlib/nroute-help.pd")); #endif diff --git a/pitch.c b/pitch.c index 2eed248..bd6c9a3 100644 --- a/pitch.c +++ b/pitch.c @@ -100,7 +100,7 @@ void pitch_setup(void) 0, sizeof(t_pitch), 0, A_DEFFLOAT, 0); class_addfloat(pitch_class, pitch_float); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_pitch_setup(void) diff --git a/plus.c b/plus.c index 5095d89..8396578 100644 --- a/plus.c +++ b/plus.c @@ -94,7 +94,7 @@ void plus_setup(void) class_addmethod(plus_class, (t_method)plus_ft1, gensym("ft1"), A_FLOAT, 0); class_addbang(plus_class, (t_method)plus_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_plus_setup(void) diff --git a/poisson.c b/poisson.c index 499886c..a046c0e 100644 --- a/poisson.c +++ b/poisson.c @@ -77,7 +77,7 @@ void poisson_setup(void) sizeof(t_rand_poisson), 0, A_DEFFLOAT, 0); class_addbang(rand_poisson_class, rand_poisson_bang); class_sethelpsymbol(rand_poisson_class, gensym("poisson-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_poisson_setup(void) diff --git a/pong.c b/pong.c index 6ee6a24..99c20c0 100644 --- a/pong.c +++ b/pong.c @@ -325,7 +325,7 @@ void maxlib_pong_setup(void) class_addbang(pong_class, pong_bang); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(pong_class, gensym("maxlib/pong-help.pd")); #endif diff --git a/pulse.c b/pulse.c index 6b7ca62..b7964cd 100644 --- a/pulse.c +++ b/pulse.c @@ -282,7 +282,7 @@ void pulse_setup(void) class_addfloat(pulse_class, pulse_onoff); class_addbang(pulse_class, pulse_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_pulse_setup(void) diff --git a/remote.c b/remote.c index a407d9c..93974d9 100644 --- a/remote.c +++ b/remote.c @@ -94,7 +94,7 @@ void remote_setup(void) sizeof(t_remote), 0, A_DEFSYM, 0); class_addanything(remote_class, remote_anything); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_remote_setup(void) diff --git a/rewrap.c b/rewrap.c index 40b7df5..f566dfe 100644 --- a/rewrap.c +++ b/rewrap.c @@ -139,7 +139,7 @@ void rewrap_setup(void) class_addmethod(rewrap_class, (t_method)rewrap_a, gensym("a"), A_FLOAT, 0); class_addmethod(rewrap_class, (t_method)rewrap_b, gensym("b"), A_FLOAT, 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_rewrap_setup(void) diff --git a/rhythm.c b/rhythm.c index 774f07d..f2b7508 100644 --- a/rhythm.c +++ b/rhythm.c @@ -325,7 +325,7 @@ void rhythm_setup(void) class_addmethod(rhythm_class, (t_method)rhythm_reset, gensym("reset"), 0); class_addmethod(rhythm_class, (t_method)rhythm_print, gensym("print"), 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_rhythm_setup(void) diff --git a/scale.c b/scale.c index 3654249..c63a603 100644 --- a/scale.c +++ b/scale.c @@ -123,7 +123,7 @@ void scale_setup(void) class_addfloat(scale_class, scale_float); class_addbang(scale_class, scale_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else void maxlib_scale_setup(void) { diff --git a/score.c b/score.c index 04ef1ff..1502ba7 100644 --- a/score.c +++ b/score.c @@ -288,7 +288,7 @@ void score_setup(void) class_addmethod(score_class, (t_method)score_set, gensym("set"), A_SYMBOL, 0); class_addfloat(score_class, score_float); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_score_setup(void) diff --git a/split.c b/split.c index de3f662..522cf78 100644 --- a/split.c +++ b/split.c @@ -81,7 +81,7 @@ void split_setup(void) 0, sizeof(t_split), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addfloat(split_class, split_float); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_split_setup(void) diff --git a/step.c b/step.c index cc44f7b..1939bd5 100644 --- a/step.c +++ b/step.c @@ -162,7 +162,7 @@ void step_setup(void) class_addmethod(step_class, (t_method)step_stop, gensym("stop"), 0); class_addfloat(step_class, (t_method)step_float); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_step_setup(void) diff --git a/subst.c b/subst.c index 1bb4d45..f9d6b4c 100644 --- a/subst.c +++ b/subst.c @@ -404,7 +404,7 @@ void subst_setup(void) class_addlist(subst_class, subst_list); class_addbang(subst_class, subst_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_subst_setup(void) diff --git a/sync.c b/sync.c index 7024a95..4501e5c 100644 --- a/sync.c +++ b/sync.c @@ -285,7 +285,7 @@ void maxlib_sync_setup(void) class_addmethod(sync_class, (t_method)sync_set_mode, gensym("mode"), A_SYMBOL, 0); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)sync_new, gensym("sync"), A_GIMME, 0); class_sethelpsymbol(sync_class, gensym("maxlib/sync-help.pd")); diff --git a/temperature.c b/temperature.c index ac9287e..8a6b780 100644 --- a/temperature.c +++ b/temperature.c @@ -103,7 +103,7 @@ void temperature_setup(void) class_addmethod(temperature_class, (t_method)temperature_time, gensym("time"), A_FLOAT, 0); class_addanything(temperature_class, temperature_anything); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_temperature_setup(void) diff --git a/tilt.c b/tilt.c index a3a3ef5..38e4657 100644 --- a/tilt.c +++ b/tilt.c @@ -170,7 +170,7 @@ void tilt_setup(void) class_addmethod(tilt_class, (t_method)tilt_low_limit, gensym("low"), A_FLOAT, 0); class_addmethod(tilt_class, (t_method)tilt_trip_point, gensym("trip"), A_FLOAT, 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_tilt_setup(void) diff --git a/timebang.c b/timebang.c index 2960ce9..31051c9 100644 --- a/timebang.c +++ b/timebang.c @@ -166,7 +166,7 @@ void maxlib_timebang_setup(void) class_addbang(timebang_class, (t_method)timebang_bang); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(timebang_class, gensym("maxlib/timebang-help.pd")); #endif diff --git a/triang.c b/triang.c index 77ec5e9..3d9fc16 100644 --- a/triang.c +++ b/triang.c @@ -73,7 +73,7 @@ void maxlib_triang_setup(void) class_addbang(rand_triang_class, rand_triang_bang); #ifndef MAXLIB class_sethelpsymbol(rand_triang_class, gensym("triang-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(rand_triang_class, gensym("maxlib/triang-help.pd")); #endif diff --git a/unroute.c b/unroute.c index bc31c39..a211a43 100644 --- a/unroute.c +++ b/unroute.c @@ -167,7 +167,7 @@ void maxlib_unroute_setup(void) class_addanything(unroute_class, unroute_any); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)unroute_new, gensym("unroute"), A_GIMME, 0); class_sethelpsymbol(unroute_class, gensym("maxlib/unroute-help.pd")); diff --git a/urn.c b/urn.c index 10a7651..c631101 100644 --- a/urn.c +++ b/urn.c @@ -145,7 +145,7 @@ void maxlib_urn_setup(void) class_addmethod(urn_class, (t_method)urn_seed, gensym("seed"), A_FLOAT, 0); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(urn_class, gensym("maxlib/urn-help.pd")); #endif diff --git a/velocity.c b/velocity.c index 50163fa..1071a94 100644 --- a/velocity.c +++ b/velocity.c @@ -104,7 +104,7 @@ void maxlib_velocity_setup(void) class_addbang(velocity_class, velocity_bang); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(velocity_class, gensym("maxlib/velocity-help.pd")); #endif diff --git a/weibull.c b/weibull.c index b3ff821..c4c4a80 100644 --- a/weibull.c +++ b/weibull.c @@ -88,7 +88,7 @@ void maxlib_weibull_setup(void) class_addbang(rand_weibull_class, rand_weibull_bang); #ifndef MAXLIB class_sethelpsymbol(rand_weibull_class, gensym("weibull-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(rand_weibull_class, gensym("maxlib/weibull-help.pd")); #endif diff --git a/wrap.c b/wrap.c index b7a63c4..4c8c185 100644 --- a/wrap.c +++ b/wrap.c @@ -134,7 +134,7 @@ void maxlib_wrap_setup(void) class_addmethod(wrap_class, (t_method)wrap_b, gensym("b"), A_FLOAT, 0); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(wrap_class, gensym("maxlib/wrap-help.pd")); #endif -- cgit v1.2.3 From b1c0fb52c38c5bf41d673dc48be06ecd46e1bb6c Mon Sep 17 00:00:00 2001 From: Debian Multimedia Maintainers Date: Sun, 4 Sep 2022 14:01:33 +0200 Subject: 64bit safe array-access Forwarded: no Last-Update: 2018-09-30 Last-Update: 2018-09-30 Gbp-Pq: Name array64.patch --- arbran.c | 26 +++++++++++++------------- score.c | 8 ++++---- subst.c | 16 ++++++++-------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/arbran.c b/arbran.c index 06c232a..90cf16b 100644 --- a/arbran.c +++ b/arbran.c @@ -56,14 +56,14 @@ static void rand_arbran_pdfscale(t_rand_arbran *x) t_garray *bx = x->x_bufx, *bp = x->x_bufp; t_float a = 0; t_int k = 0; - t_float *tx, *tp; + t_word *tx, *tp; int ix, ip; - if (!garray_getfloatarray(bx, &ix, &tx)) + if (!garray_getfloatwords(bx, &ix, &tx)) { post("arbran: couldn't read from array!"); return; } - if (!garray_getfloatarray(bp, &ip, &tp)) + if (!garray_getfloatwords(bp, &ip, &tp)) { post("arbran: couldn't read from array!"); return; @@ -71,11 +71,11 @@ static void rand_arbran_pdfscale(t_rand_arbran *x) for(k = 1; k < ix; k++) { - a += (tx[k]-tx[k-1])*(tp[k]+tp[k-1])/2.0; + a += (tx[k].w_float-tx[k-1].w_float)*(tp[k].w_float+tp[k-1].w_float)/2.0; } for(k = 0; k < ix; k++) { - tp[k] = tp[k]/a; + tp[k].w_float = tp[k].w_float/a; } garray_redraw(x->x_bufp); } @@ -85,14 +85,14 @@ static void rand_arbran_bang(t_rand_arbran *x) t_garray *bx = x->x_bufx, *bp = x->x_bufp; t_float a, u, a0, slope, b, d, r; t_int k = 0; - t_float *tx, *tp; + t_word *tx, *tp; int ix, ip; - if (!garray_getfloatarray(bx, &ix, &tx)) + if (!garray_getfloatwords(bx, &ix, &tx)) { post("arbran: couldn't read from array!"); return; } - if (!garray_getfloatarray(bp, &ip, &tp)) + if (!garray_getfloatwords(bp, &ip, &tp)) { post("arbran: couldn't read from array!"); return; @@ -103,20 +103,20 @@ static void rand_arbran_bang(t_rand_arbran *x) u = fran(); while(u > a) { - a0 = (tx[k+1]-tx[k])*(tp[k+1]+tp[k])/2.0; + a0 = (tx[k+1].w_float-tx[k].w_float)*(tp[k+1].w_float+tp[k].w_float)/2.0; a += a0; k++; } k--; - slope = (tp[k+1]-tp[k])/(tx[k+1]-tx[k]); + slope = (tp[k+1].w_float-tp[k].w_float)/(tx[k+1].w_float-tx[k].w_float); if(slope == 0) { - r = (u-a+a0)/tp[k]+tx[k]; + r = (u-a+a0)/tp[k].w_float+tx[k].w_float; } else { - b=tp[k]/slope-tx[k]; - d=b*b+tx[k]*tx[k]+2*b*tx[k]+2*(u-a+a0)/slope; + b=tp[k].w_float/slope-tx[k].w_float; + d=b*b+tx[k].w_float*tx[k].w_float+2*b*tx[k].w_float+2*(u-a+a0)/slope; if(slope > 0) r=-b+sqrt(d); else diff --git a/score.c b/score.c index 1502ba7..6e0aaf8 100644 --- a/score.c +++ b/score.c @@ -72,7 +72,7 @@ static void score_float(t_score *x, t_floatarg f) t_int velo = x->x_velo; /* get the velocity */ t_garray *b = x->x_buf; /* make local copy of array */ - float *tab; /* we'll store notes in here */ + t_word *tab; /* we'll store notes in here */ int items; int i, j, n, check; @@ -86,7 +86,7 @@ static void score_float(t_score *x, t_floatarg f) x->x_error = 1; goto output; } - if (!garray_getfloatarray(b, &items, &tab)) + if (!garray_getfloatwords(b, &items, &tab)) { post("score: couldn't read from array!"); x->x_error = 1; @@ -111,7 +111,7 @@ static void score_float(t_score *x, t_floatarg f) for (i = x->x_index + 1; i < (x->x_index + x->x_skipindex + 1); i++) { // post("%d: %d -> %d", i, x->x_alloctable[n], (t_int)tab[i]); - if(x->x_alloctable[n] == (t_int)tab[i]) + if(x->x_alloctable[n] == (int)tab[i].w_float) { if(i - x->x_index != 1) post("score: skipped %d notes!", i - x->x_index - 1); x->x_alloctable[n] = -1; /* delete note, we've matched it! */ @@ -127,7 +127,7 @@ static void score_float(t_score *x, t_floatarg f) for (j = 0; j < MAX_NOTES; j++) /* check with every note from our alloctable */ { - if (x->x_alloctable[check] == (t_int)tab[i]) /* this one would fit */ + if (x->x_alloctable[check] == (int)tab[i].w_float) /* this one would fit */ { /* check the time restrictions */ if (clock_gettimesince(x->x_starttime[check]) < x->x_skiptime) diff --git a/subst.c b/subst.c index f9d6b4c..914f48f 100644 --- a/subst.c +++ b/subst.c @@ -148,7 +148,7 @@ static int subst_calc(t_subst *x, int n) t_atom newrow[MAXSIZE]; t_garray *A = x->x_buf; int npoints; - t_float *vec; + t_word *vec; if(x->x_length <= 1) { @@ -224,7 +224,7 @@ static int subst_calc(t_subst *x, int n) // write to array if(x->x_array)if (!(A = (t_garray *)pd_findbyclass(x->x_array, garray_class))) error("subst: %s: no such array", x->x_array->s_name); - else if (!garray_getfloatarray(A, &npoints, &vec)) + else if (!garray_getfloatwords(A, &npoints, &vec)) error("subst: %s: bad template ", x->x_array->s_name); else { @@ -234,7 +234,7 @@ static int subst_calc(t_subst *x, int n) { while(npoints--) { - *vec++ = atom_getfloat(x->x_row + i); + vec[i].w_float = atom_getfloat(x->x_row + i); i++; } } @@ -243,10 +243,10 @@ static int subst_calc(t_subst *x, int n) npoints -= l; while (l--) { - *vec++ = atom_getfloat(x->x_row + i); + vec[i].w_float = atom_getfloat(x->x_row + i); i++; } - while (npoints--) *vec++ = 0; + while (npoints--) { vec[i].w_float = 0; i++; } } garray_redraw(A); } @@ -298,7 +298,7 @@ void subst_set(t_subst *x, t_symbol *s) static void subst_load(t_subst *x, t_symbol *s) { t_garray *b; /* make local copy of array */ - t_float *tab; /* the content itselfe */ + t_word *tab; /* the content itselfe */ int items, i; if ((b = (t_garray *)pd_findbyclass(s, garray_class))) @@ -310,14 +310,14 @@ static void subst_load(t_subst *x, t_symbol *s) } // read from our array - if (!garray_getfloatarray(b, &items, &tab)) + if (!garray_getfloatwords(b, &items, &tab)) { post("subst: couldn't read from array!"); return; } for(i = 0; i < items; i++) { - SETFLOAT(x->x_row + i, tab[i]); // copy array into x->x_row + SETFLOAT(x->x_row + i, tab[i].w_float); // copy array into x->x_row } x->x_length = items; post("subst: loaded %d values from array \"%s\"", items, s->s_name); -- cgit v1.2.3 From 6237382ddeaa0b49e62d9f20e832fec87954d4c9 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 5 Dec 2022 10:53:09 +0100 Subject: force .pd_linux as binary file extension Gbp-Pq: Name force-pd_linux-as-extension --- Makefile | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/Makefile b/Makefile index 7f8a16e..63dc863 100644 --- a/Makefile +++ b/Makefile @@ -160,29 +160,6 @@ endif ifeq ($(UNAME),Linux) CPU := $(shell uname -m) EXTENSION = pd_linux - ifeq ($(findstring arm,$(CPU)),arm) - EXTENSION = l_arm - endif - ifeq ($(CPU),i386) - EXTENSION = l_i386 - endif - ifeq ($(CPU),i486) - EXTENSION = l_i386 - endif - ifeq ($(CPU),i586) - EXTENSION = l_i386 - endif - ifeq ($(CPU),i686) - EXTENSION = l_i386 - endif - ifeq ($(CPU),amd64) - # amd64 and ia64 aren't the same thing, but that's how its done in pd... - EXTENSION = l_ia64 - endif - ifeq ($(CPU),x86_64) - # x86_64 and ia64 aren't the same thing, but that's how its done in pd... - EXTENSION = l_ia64 - endif SOURCES += $(SOURCES_linux) SHARED_EXTENSION = so OS = linux -- cgit v1.2.3 From e45159d291116fb3e4704384a5683382595fea92 Mon Sep 17 00:00:00 2001 From: Debian Multimedia Maintainers Date: Mon, 5 Dec 2022 10:53:09 +0100 Subject: fixed format-security errors Forwarded: no Last-Update: 2018-01-30 Last-Update: 2018-01-30 Gbp-Pq: Name fix-format.patch --- allow.c | 2 +- arbran.c | 2 +- arraycopy.c | 2 +- average.c | 2 +- beat.c | 2 +- beta.c | 2 +- bilex.c | 2 +- borax.c | 2 +- cauchy.c | 2 +- chord.c | 2 +- delta.c | 2 +- deny.c | 2 +- dist.c | 2 +- divide.c | 2 +- divmod.c | 2 +- edge.c | 2 +- expo.c | 2 +- fifo.c | 2 +- gauss.c | 2 +- gestalt.c | 2 +- history.c | 2 +- ignore.c | 2 +- iso.c | 2 +- lifo.c | 2 +- limit.c | 2 +- linear.c | 2 +- listfifo.c | 2 +- listfunnel.c | 2 +- minus.c | 2 +- mlife.c | 2 +- multi.c | 2 +- nchange.c | 2 +- netclient.c | 2 +- netdist.c | 2 +- netrec.c | 2 +- netserver.c | 2 +- nroute.c | 2 +- pitch.c | 2 +- plus.c | 2 +- poisson.c | 2 +- pong.c | 2 +- pulse.c | 2 +- remote.c | 2 +- rewrap.c | 2 +- rhythm.c | 2 +- scale.c | 2 +- score.c | 2 +- split.c | 2 +- step.c | 2 +- subst.c | 2 +- sync.c | 2 +- temperature.c | 2 +- tilt.c | 2 +- timebang.c | 2 +- triang.c | 2 +- unroute.c | 2 +- urn.c | 2 +- velocity.c | 2 +- weibull.c | 2 +- wrap.c | 2 +- 60 files changed, 60 insertions(+), 60 deletions(-) diff --git a/allow.c b/allow.c index 15b3803..cac27e2 100644 --- a/allow.c +++ b/allow.c @@ -105,7 +105,7 @@ void maxlib_allow_setup(void) class_addfloat(allow_class, allow_float); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(allow_class, gensym("maxlib/allow-help.pd")); #endif diff --git a/arbran.c b/arbran.c index 7dc68ac..06c232a 100644 --- a/arbran.c +++ b/arbran.c @@ -181,7 +181,7 @@ void maxlib_arbran_setup(void) class_addmethod(rand_arbran_class, (t_method)rand_arbran_setarrays, gensym("set"), A_SYMBOL, A_SYMBOL, 0); #ifndef MAXLIB class_sethelpsymbol(rand_arbran_class, gensym("arbran-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)rand_arbran_new, gensym("arbran"), A_SYMBOL, A_SYMBOL, 0); class_sethelpsymbol(rand_arbran_class, gensym("maxlib/arbran-help.pd")); diff --git a/arraycopy.c b/arraycopy.c index c5e2eb0..f57097e 100644 --- a/arraycopy.c +++ b/arraycopy.c @@ -306,7 +306,7 @@ void maxlib_arraycopy_setup(void) // class_addlist(arraycopy_class, arraycopy_list); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(arraycopy_class, gensym("maxlib/arraycopy-help.pd")); #endif diff --git a/average.c b/average.c index 4e0f2d0..2509858 100644 --- a/average.c +++ b/average.c @@ -192,7 +192,7 @@ void maxlib_average_setup(void) class_addfloat(average_class, average_float); class_addmethod(average_class, (t_method)average_index, gensym("index"), A_FLOAT, 0); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)average_new, gensym("average"), A_DEFFLOAT, 0); diff --git a/beat.c b/beat.c index 1bf5a76..ba514a1 100644 --- a/beat.c +++ b/beat.c @@ -394,7 +394,7 @@ void maxlib_beat_setup(void) class_addmethod(beat_class, (t_method)beat_print, gensym("print"), 0); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)beat_new, gensym("beat"), A_DEFFLOAT, 0); class_sethelpsymbol(beat_class, gensym("maxlib/beat-help.pd")); diff --git a/beta.c b/beta.c index 2d7f3b3..39d3724 100644 --- a/beta.c +++ b/beta.c @@ -93,7 +93,7 @@ void beta_setup(void) sizeof(t_rand_beta), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addbang(rand_beta_class, rand_beta_bang); class_sethelpsymbol(rand_beta_class, gensym("beta-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_beta_setup(void) diff --git a/bilex.c b/bilex.c index 6bd432e..949de88 100644 --- a/bilex.c +++ b/bilex.c @@ -77,7 +77,7 @@ void bilex_setup(void) sizeof(t_rand_bilex), 0, A_DEFFLOAT, 0); class_addbang(rand_bilex_class, rand_bilex_bang); class_sethelpsymbol(rand_bilex_class, gensym("bilex-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_bilex_setup(void) diff --git a/borax.c b/borax.c index fc271bf..f376df3 100644 --- a/borax.c +++ b/borax.c @@ -229,7 +229,7 @@ void maxlib_borax_setup(void) class_addfloat(borax_class, borax_float); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)borax_new, gensym("borax"), 0); class_sethelpsymbol(borax_class, gensym("maxlib/borax-help.pd")); diff --git a/cauchy.c b/cauchy.c index 73fcfef..13f8110 100644 --- a/cauchy.c +++ b/cauchy.c @@ -76,7 +76,7 @@ void cauchy_setup(void) sizeof(t_rand_cauchy), 0, A_DEFFLOAT, 0); class_addbang(rand_cauchy_class, rand_cauchy_bang); class_sethelpsymbol(rand_cauchy_class, gensym("cauchy-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else void maxlib_cauchy_setup(void) { diff --git a/chord.c b/chord.c index ad3f6eb..84563b6 100644 --- a/chord.c +++ b/chord.c @@ -1813,7 +1813,7 @@ void maxlib_chord_setup(void) class_addmethod(chord_class, (t_method)chord_ft1, gensym("ft1"), A_FLOAT, 0); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)chord_new, gensym("chord"), A_DEFFLOAT, 0); class_sethelpsymbol(chord_class, gensym("maxlib/chord-help.pd")); diff --git a/delta.c b/delta.c index f47e6a9..6784041 100644 --- a/delta.c +++ b/delta.c @@ -130,7 +130,7 @@ void maxlib_delta_setup(void) class_sethelpsymbol(delta_class, gensym("maxlib/delta-help.pd")); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)delta_new, gensym("delta"), A_DEFFLOAT, 0); class_sethelpsymbol(delta_class, gensym("maxlib/delta-help.pd")); diff --git a/deny.c b/deny.c index 5525cc2..28821df 100644 --- a/deny.c +++ b/deny.c @@ -107,7 +107,7 @@ void maxlib_deny_setup(void) class_addfloat(deny_class, deny_float); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(deny_class, gensym("maxlib/deny-help.pd")); #endif diff --git a/dist.c b/dist.c index e98eebb..555de5d 100644 --- a/dist.c +++ b/dist.c @@ -271,7 +271,7 @@ void maxlib_dist_setup(void) class_addanything(dist_class, dist_anything); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)dist_new, gensym("dist"), A_GIMME, 0); class_sethelpsymbol(dist_class, gensym("maxlib/dist-help.pd")); diff --git a/divide.c b/divide.c index be825e8..bc9bccb 100644 --- a/divide.c +++ b/divide.c @@ -101,7 +101,7 @@ void maxlib_divide_setup(void) class_addbang(divide_class, (t_method)divide_bang); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)divide_new, gensym("divide"), A_GIMME, 0); class_sethelpsymbol(divide_class, gensym("maxlib/divide-help.pd")); diff --git a/divmod.c b/divmod.c index 7151baf..354b61d 100644 --- a/divmod.c +++ b/divmod.c @@ -91,7 +91,7 @@ void maxlib_divmod_setup(void) class_addbang(divmod_class, (t_method)divmod_bang); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)divmod_new, gensym("divmod"), A_DEFFLOAT, A_DEFFLOAT, 0); class_sethelpsymbol(divmod_class, gensym("maxlib/divmod-help.pd")); diff --git a/edge.c b/edge.c index 8d94c71..059151a 100644 --- a/edge.c +++ b/edge.c @@ -67,7 +67,7 @@ void edge_setup(void) 0, sizeof(t_edge), 0, A_DEFFLOAT, 0); class_addfloat(edge_class, edge_float); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_edge_setup(void) diff --git a/expo.c b/expo.c index 4b65731..fb48992 100644 --- a/expo.c +++ b/expo.c @@ -72,7 +72,7 @@ void expo_setup(void) sizeof(t_rand_expo), 0, A_DEFFLOAT, 0); class_addbang(rand_expo_class, rand_expo_bang); class_sethelpsymbol(rand_expo_class, gensym("expo-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_expo_setup(void) diff --git a/fifo.c b/fifo.c index b747b70..92fe7c9 100644 --- a/fifo.c +++ b/fifo.c @@ -81,7 +81,7 @@ void fifo_setup(void) class_addfloat(fifo_class, fifo_int); class_addbang(fifo_class, fifo_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_fifo_setup(void) diff --git a/gauss.c b/gauss.c index 3f2270c..e4ce2ed 100644 --- a/gauss.c +++ b/gauss.c @@ -73,7 +73,7 @@ void gauss_setup(void) sizeof(t_rand_gauss), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addbang(rand_gauss_class, rand_gauss_bang); class_sethelpsymbol(rand_gauss_class, gensym("gauss-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_gauss_setup(void) diff --git a/gestalt.c b/gestalt.c index a929e0d..0c3bdb8 100644 --- a/gestalt.c +++ b/gestalt.c @@ -106,7 +106,7 @@ void gestalt_setup(void) class_addmethod(gestalt_class, (t_method)gestalt_ft1, gensym("ft1"), A_FLOAT, 0); class_addmethod(gestalt_class, (t_method)gestalt_ft2, gensym("ft2"), A_FLOAT, 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_gestalt_setup(void) diff --git a/history.c b/history.c index 4c94927..752e191 100644 --- a/history.c +++ b/history.c @@ -252,7 +252,7 @@ void history_setup(void) class_addfloat(history_class, history_float); class_addmethod(history_class, (t_method)history_time, gensym("time"), A_FLOAT, 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_history_setup(void) diff --git a/ignore.c b/ignore.c index 098751d..c7d8cf1 100644 --- a/ignore.c +++ b/ignore.c @@ -102,7 +102,7 @@ void ignore_setup(void) class_addmethod(ignore_class, (t_method)ignore_time, gensym("time"), A_FLOAT, 0); class_addfloat(ignore_class, ignore_float); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_ignore_setup(void) diff --git a/iso.c b/iso.c index 69a13ec..f505626 100644 --- a/iso.c +++ b/iso.c @@ -195,7 +195,7 @@ void iso_setup(void) { class_addbang(iso_class, iso_bang); class_addlist(iso_class, iso_pitch); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_iso_setup(void) { diff --git a/lifo.c b/lifo.c index 3f062ae..e7d0925 100644 --- a/lifo.c +++ b/lifo.c @@ -93,7 +93,7 @@ void lifo_setup(void) class_addbang(lifo_class, lifo_bang); class_addmethod(lifo_class, (t_method)lifo_clear, gensym("clear"), 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_lifo_setup(void) diff --git a/limit.c b/limit.c index cfd79ea..c4b32a1 100644 --- a/limit.c +++ b/limit.c @@ -117,7 +117,7 @@ void maxlib_limit_setup(void) class_addbang(limit_class, limit_bang); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(limit_class, gensym("maxlib/limit-help.pd")); #endif diff --git a/linear.c b/linear.c index a12881d..405578a 100644 --- a/linear.c +++ b/linear.c @@ -67,7 +67,7 @@ void linear_setup(void) sizeof(t_rand_linear), 0, A_DEFFLOAT, 0); class_addbang(rand_linear_class, rand_linear_bang); class_sethelpsymbol(rand_linear_class, gensym("linear-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_linear_setup(void) diff --git a/listfifo.c b/listfifo.c index 9433a79..cce774b 100644 --- a/listfifo.c +++ b/listfifo.c @@ -94,7 +94,7 @@ void listfifo_setup(void) class_addbang(listfifo_class, listfifo_bang); class_addlist(listfifo_class, listfifo_list); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_listfifo_setup(void) diff --git a/listfunnel.c b/listfunnel.c index 83f3927..70d77ff 100644 --- a/listfunnel.c +++ b/listfunnel.c @@ -76,7 +76,7 @@ void listfunnel_setup(void) class_addfloat(listfunnel_class, listfunnel_float); class_addlist(listfunnel_class, listfunnel_list); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_listfunnel_setup(void) diff --git a/minus.c b/minus.c index 6c88583..cd0c392 100644 --- a/minus.c +++ b/minus.c @@ -95,7 +95,7 @@ void minus_setup(void) class_addmethod(minus_class, (t_method)minus_ft1, gensym("ft1"), A_FLOAT, 0); class_addbang(minus_class, (t_method)minus_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_minus_setup(void) diff --git a/mlife.c b/mlife.c index 0768f16..4e69d8f 100644 --- a/mlife.c +++ b/mlife.c @@ -492,7 +492,7 @@ void mlife_setup(void) class_addfloat(mlife_class, ml_int); class_addbang(mlife_class, ml_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_mlife_setup(void) diff --git a/multi.c b/multi.c index 6cfbadf..8402065 100644 --- a/multi.c +++ b/multi.c @@ -94,7 +94,7 @@ void multi_setup(void) class_addmethod(multi_class, (t_method)multi_ft1, gensym("ft1"), A_FLOAT, 0); class_addbang(multi_class, (t_method)multi_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_multi_setup(void) diff --git a/nchange.c b/nchange.c index 5ede0c0..ff2c198 100644 --- a/nchange.c +++ b/nchange.c @@ -186,7 +186,7 @@ void nchange_setup(void) class_addanything(nchange_class, nchange_list); class_addmethod(nchange_class, (t_method)nchange_set, gensym("set"), A_GIMME, 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_nchange_setup(void) diff --git a/netclient.c b/netclient.c index 7436aed..8d7208e 100644 --- a/netclient.c +++ b/netclient.c @@ -377,7 +377,7 @@ void netclient_setup(void) class_addmethod(netclient_class, (t_method)netclient_rcv, gensym("receive"), 0); class_addmethod(netclient_class, (t_method)netclient_rcv, gensym("rcv"), 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_netclient_setup(void) diff --git a/netdist.c b/netdist.c index 2f2bf50..a2966b6 100644 --- a/netdist.c +++ b/netdist.c @@ -295,7 +295,7 @@ void netdist_setup(void) class_addmethod(netdist_class, (t_method)netdist_clear, gensym("clear"), 0); class_addmethod(netdist_class, (t_method)netdist_print, gensym("print"), 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_netdist_setup(void) diff --git a/netrec.c b/netrec.c index 91f8dd7..a20e695 100644 --- a/netrec.c +++ b/netrec.c @@ -433,7 +433,7 @@ void netrec_setup(void) sizeof(t_netrec), 0, A_DEFFLOAT, A_DEFFLOAT, A_DEFSYM, 0); class_addmethod(netrec_class, (t_method)netrec_print, gensym("print"), 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_netrec_setup(void) diff --git a/netserver.c b/netserver.c index 4fca399..563a52e 100644 --- a/netserver.c +++ b/netserver.c @@ -653,7 +653,7 @@ void netserver_setup(void) class_addmethod(netserver_class, (t_method)netserver_debug, gensym("debug"), 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_netserver_setup(void) diff --git a/nroute.c b/nroute.c index 60bcea8..022e389 100644 --- a/nroute.c +++ b/nroute.c @@ -172,7 +172,7 @@ void maxlib_nroute_setup(void) class_addanything(proxy_class, nroute_setmatch); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(nroute_class, gensym("maxlib/nroute-help.pd")); #endif diff --git a/pitch.c b/pitch.c index 2eed248..bd6c9a3 100644 --- a/pitch.c +++ b/pitch.c @@ -100,7 +100,7 @@ void pitch_setup(void) 0, sizeof(t_pitch), 0, A_DEFFLOAT, 0); class_addfloat(pitch_class, pitch_float); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_pitch_setup(void) diff --git a/plus.c b/plus.c index 5095d89..8396578 100644 --- a/plus.c +++ b/plus.c @@ -94,7 +94,7 @@ void plus_setup(void) class_addmethod(plus_class, (t_method)plus_ft1, gensym("ft1"), A_FLOAT, 0); class_addbang(plus_class, (t_method)plus_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_plus_setup(void) diff --git a/poisson.c b/poisson.c index 499886c..a046c0e 100644 --- a/poisson.c +++ b/poisson.c @@ -77,7 +77,7 @@ void poisson_setup(void) sizeof(t_rand_poisson), 0, A_DEFFLOAT, 0); class_addbang(rand_poisson_class, rand_poisson_bang); class_sethelpsymbol(rand_poisson_class, gensym("poisson-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_poisson_setup(void) diff --git a/pong.c b/pong.c index 6ee6a24..99c20c0 100644 --- a/pong.c +++ b/pong.c @@ -325,7 +325,7 @@ void maxlib_pong_setup(void) class_addbang(pong_class, pong_bang); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(pong_class, gensym("maxlib/pong-help.pd")); #endif diff --git a/pulse.c b/pulse.c index 6b7ca62..b7964cd 100644 --- a/pulse.c +++ b/pulse.c @@ -282,7 +282,7 @@ void pulse_setup(void) class_addfloat(pulse_class, pulse_onoff); class_addbang(pulse_class, pulse_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_pulse_setup(void) diff --git a/remote.c b/remote.c index a407d9c..93974d9 100644 --- a/remote.c +++ b/remote.c @@ -94,7 +94,7 @@ void remote_setup(void) sizeof(t_remote), 0, A_DEFSYM, 0); class_addanything(remote_class, remote_anything); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_remote_setup(void) diff --git a/rewrap.c b/rewrap.c index 40b7df5..f566dfe 100644 --- a/rewrap.c +++ b/rewrap.c @@ -139,7 +139,7 @@ void rewrap_setup(void) class_addmethod(rewrap_class, (t_method)rewrap_a, gensym("a"), A_FLOAT, 0); class_addmethod(rewrap_class, (t_method)rewrap_b, gensym("b"), A_FLOAT, 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_rewrap_setup(void) diff --git a/rhythm.c b/rhythm.c index 774f07d..f2b7508 100644 --- a/rhythm.c +++ b/rhythm.c @@ -325,7 +325,7 @@ void rhythm_setup(void) class_addmethod(rhythm_class, (t_method)rhythm_reset, gensym("reset"), 0); class_addmethod(rhythm_class, (t_method)rhythm_print, gensym("print"), 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_rhythm_setup(void) diff --git a/scale.c b/scale.c index 3654249..c63a603 100644 --- a/scale.c +++ b/scale.c @@ -123,7 +123,7 @@ void scale_setup(void) class_addfloat(scale_class, scale_float); class_addbang(scale_class, scale_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else void maxlib_scale_setup(void) { diff --git a/score.c b/score.c index 04ef1ff..1502ba7 100644 --- a/score.c +++ b/score.c @@ -288,7 +288,7 @@ void score_setup(void) class_addmethod(score_class, (t_method)score_set, gensym("set"), A_SYMBOL, 0); class_addfloat(score_class, score_float); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_score_setup(void) diff --git a/split.c b/split.c index de3f662..522cf78 100644 --- a/split.c +++ b/split.c @@ -81,7 +81,7 @@ void split_setup(void) 0, sizeof(t_split), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addfloat(split_class, split_float); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_split_setup(void) diff --git a/step.c b/step.c index cc44f7b..1939bd5 100644 --- a/step.c +++ b/step.c @@ -162,7 +162,7 @@ void step_setup(void) class_addmethod(step_class, (t_method)step_stop, gensym("stop"), 0); class_addfloat(step_class, (t_method)step_float); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_step_setup(void) diff --git a/subst.c b/subst.c index 1bb4d45..f9d6b4c 100644 --- a/subst.c +++ b/subst.c @@ -404,7 +404,7 @@ void subst_setup(void) class_addlist(subst_class, subst_list); class_addbang(subst_class, subst_bang); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_subst_setup(void) diff --git a/sync.c b/sync.c index 7024a95..4501e5c 100644 --- a/sync.c +++ b/sync.c @@ -285,7 +285,7 @@ void maxlib_sync_setup(void) class_addmethod(sync_class, (t_method)sync_set_mode, gensym("mode"), A_SYMBOL, 0); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)sync_new, gensym("sync"), A_GIMME, 0); class_sethelpsymbol(sync_class, gensym("maxlib/sync-help.pd")); diff --git a/temperature.c b/temperature.c index ac9287e..8a6b780 100644 --- a/temperature.c +++ b/temperature.c @@ -103,7 +103,7 @@ void temperature_setup(void) class_addmethod(temperature_class, (t_method)temperature_time, gensym("time"), A_FLOAT, 0); class_addanything(temperature_class, temperature_anything); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_temperature_setup(void) diff --git a/tilt.c b/tilt.c index a3a3ef5..38e4657 100644 --- a/tilt.c +++ b/tilt.c @@ -170,7 +170,7 @@ void tilt_setup(void) class_addmethod(tilt_class, (t_method)tilt_low_limit, gensym("low"), A_FLOAT, 0); class_addmethod(tilt_class, (t_method)tilt_trip_point, gensym("trip"), A_FLOAT, 0); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); } #else void maxlib_tilt_setup(void) diff --git a/timebang.c b/timebang.c index 2960ce9..31051c9 100644 --- a/timebang.c +++ b/timebang.c @@ -166,7 +166,7 @@ void maxlib_timebang_setup(void) class_addbang(timebang_class, (t_method)timebang_bang); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(timebang_class, gensym("maxlib/timebang-help.pd")); #endif diff --git a/triang.c b/triang.c index 77ec5e9..3d9fc16 100644 --- a/triang.c +++ b/triang.c @@ -73,7 +73,7 @@ void maxlib_triang_setup(void) class_addbang(rand_triang_class, rand_triang_bang); #ifndef MAXLIB class_sethelpsymbol(rand_triang_class, gensym("triang-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(rand_triang_class, gensym("maxlib/triang-help.pd")); #endif diff --git a/unroute.c b/unroute.c index bc31c39..a211a43 100644 --- a/unroute.c +++ b/unroute.c @@ -167,7 +167,7 @@ void maxlib_unroute_setup(void) class_addanything(unroute_class, unroute_any); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_addcreator((t_newmethod)unroute_new, gensym("unroute"), A_GIMME, 0); class_sethelpsymbol(unroute_class, gensym("maxlib/unroute-help.pd")); diff --git a/urn.c b/urn.c index 10a7651..c631101 100644 --- a/urn.c +++ b/urn.c @@ -145,7 +145,7 @@ void maxlib_urn_setup(void) class_addmethod(urn_class, (t_method)urn_seed, gensym("seed"), A_FLOAT, 0); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(urn_class, gensym("maxlib/urn-help.pd")); #endif diff --git a/velocity.c b/velocity.c index 50163fa..1071a94 100644 --- a/velocity.c +++ b/velocity.c @@ -104,7 +104,7 @@ void maxlib_velocity_setup(void) class_addbang(velocity_class, velocity_bang); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(velocity_class, gensym("maxlib/velocity-help.pd")); #endif diff --git a/weibull.c b/weibull.c index b3ff821..c4c4a80 100644 --- a/weibull.c +++ b/weibull.c @@ -88,7 +88,7 @@ void maxlib_weibull_setup(void) class_addbang(rand_weibull_class, rand_weibull_bang); #ifndef MAXLIB class_sethelpsymbol(rand_weibull_class, gensym("weibull-help.pd")); - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(rand_weibull_class, gensym("maxlib/weibull-help.pd")); #endif diff --git a/wrap.c b/wrap.c index b7a63c4..4c8c185 100644 --- a/wrap.c +++ b/wrap.c @@ -134,7 +134,7 @@ void maxlib_wrap_setup(void) class_addmethod(wrap_class, (t_method)wrap_b, gensym("b"), A_FLOAT, 0); #ifndef MAXLIB - logpost(NULL, 4, version); + logpost(NULL, 4, "%s", version); #else class_sethelpsymbol(wrap_class, gensym("maxlib/wrap-help.pd")); #endif -- cgit v1.2.3 From 1fef16cab50909a3b8b266f13842733fd5287956 Mon Sep 17 00:00:00 2001 From: Debian Multimedia Maintainers Date: Mon, 5 Dec 2022 10:53:09 +0100 Subject: 64bit safe array-access Forwarded: no Last-Update: 2018-09-30 Last-Update: 2018-09-30 Gbp-Pq: Name array64.patch --- arbran.c | 26 +++++++++++++------------- score.c | 8 ++++---- subst.c | 16 ++++++++-------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/arbran.c b/arbran.c index 06c232a..90cf16b 100644 --- a/arbran.c +++ b/arbran.c @@ -56,14 +56,14 @@ static void rand_arbran_pdfscale(t_rand_arbran *x) t_garray *bx = x->x_bufx, *bp = x->x_bufp; t_float a = 0; t_int k = 0; - t_float *tx, *tp; + t_word *tx, *tp; int ix, ip; - if (!garray_getfloatarray(bx, &ix, &tx)) + if (!garray_getfloatwords(bx, &ix, &tx)) { post("arbran: couldn't read from array!"); return; } - if (!garray_getfloatarray(bp, &ip, &tp)) + if (!garray_getfloatwords(bp, &ip, &tp)) { post("arbran: couldn't read from array!"); return; @@ -71,11 +71,11 @@ static void rand_arbran_pdfscale(t_rand_arbran *x) for(k = 1; k < ix; k++) { - a += (tx[k]-tx[k-1])*(tp[k]+tp[k-1])/2.0; + a += (tx[k].w_float-tx[k-1].w_float)*(tp[k].w_float+tp[k-1].w_float)/2.0; } for(k = 0; k < ix; k++) { - tp[k] = tp[k]/a; + tp[k].w_float = tp[k].w_float/a; } garray_redraw(x->x_bufp); } @@ -85,14 +85,14 @@ static void rand_arbran_bang(t_rand_arbran *x) t_garray *bx = x->x_bufx, *bp = x->x_bufp; t_float a, u, a0, slope, b, d, r; t_int k = 0; - t_float *tx, *tp; + t_word *tx, *tp; int ix, ip; - if (!garray_getfloatarray(bx, &ix, &tx)) + if (!garray_getfloatwords(bx, &ix, &tx)) { post("arbran: couldn't read from array!"); return; } - if (!garray_getfloatarray(bp, &ip, &tp)) + if (!garray_getfloatwords(bp, &ip, &tp)) { post("arbran: couldn't read from array!"); return; @@ -103,20 +103,20 @@ static void rand_arbran_bang(t_rand_arbran *x) u = fran(); while(u > a) { - a0 = (tx[k+1]-tx[k])*(tp[k+1]+tp[k])/2.0; + a0 = (tx[k+1].w_float-tx[k].w_float)*(tp[k+1].w_float+tp[k].w_float)/2.0; a += a0; k++; } k--; - slope = (tp[k+1]-tp[k])/(tx[k+1]-tx[k]); + slope = (tp[k+1].w_float-tp[k].w_float)/(tx[k+1].w_float-tx[k].w_float); if(slope == 0) { - r = (u-a+a0)/tp[k]+tx[k]; + r = (u-a+a0)/tp[k].w_float+tx[k].w_float; } else { - b=tp[k]/slope-tx[k]; - d=b*b+tx[k]*tx[k]+2*b*tx[k]+2*(u-a+a0)/slope; + b=tp[k].w_float/slope-tx[k].w_float; + d=b*b+tx[k].w_float*tx[k].w_float+2*b*tx[k].w_float+2*(u-a+a0)/slope; if(slope > 0) r=-b+sqrt(d); else diff --git a/score.c b/score.c index 1502ba7..6e0aaf8 100644 --- a/score.c +++ b/score.c @@ -72,7 +72,7 @@ static void score_float(t_score *x, t_floatarg f) t_int velo = x->x_velo; /* get the velocity */ t_garray *b = x->x_buf; /* make local copy of array */ - float *tab; /* we'll store notes in here */ + t_word *tab; /* we'll store notes in here */ int items; int i, j, n, check; @@ -86,7 +86,7 @@ static void score_float(t_score *x, t_floatarg f) x->x_error = 1; goto output; } - if (!garray_getfloatarray(b, &items, &tab)) + if (!garray_getfloatwords(b, &items, &tab)) { post("score: couldn't read from array!"); x->x_error = 1; @@ -111,7 +111,7 @@ static void score_float(t_score *x, t_floatarg f) for (i = x->x_index + 1; i < (x->x_index + x->x_skipindex + 1); i++) { // post("%d: %d -> %d", i, x->x_alloctable[n], (t_int)tab[i]); - if(x->x_alloctable[n] == (t_int)tab[i]) + if(x->x_alloctable[n] == (int)tab[i].w_float) { if(i - x->x_index != 1) post("score: skipped %d notes!", i - x->x_index - 1); x->x_alloctable[n] = -1; /* delete note, we've matched it! */ @@ -127,7 +127,7 @@ static void score_float(t_score *x, t_floatarg f) for (j = 0; j < MAX_NOTES; j++) /* check with every note from our alloctable */ { - if (x->x_alloctable[check] == (t_int)tab[i]) /* this one would fit */ + if (x->x_alloctable[check] == (int)tab[i].w_float) /* this one would fit */ { /* check the time restrictions */ if (clock_gettimesince(x->x_starttime[check]) < x->x_skiptime) diff --git a/subst.c b/subst.c index f9d6b4c..914f48f 100644 --- a/subst.c +++ b/subst.c @@ -148,7 +148,7 @@ static int subst_calc(t_subst *x, int n) t_atom newrow[MAXSIZE]; t_garray *A = x->x_buf; int npoints; - t_float *vec; + t_word *vec; if(x->x_length <= 1) { @@ -224,7 +224,7 @@ static int subst_calc(t_subst *x, int n) // write to array if(x->x_array)if (!(A = (t_garray *)pd_findbyclass(x->x_array, garray_class))) error("subst: %s: no such array", x->x_array->s_name); - else if (!garray_getfloatarray(A, &npoints, &vec)) + else if (!garray_getfloatwords(A, &npoints, &vec)) error("subst: %s: bad template ", x->x_array->s_name); else { @@ -234,7 +234,7 @@ static int subst_calc(t_subst *x, int n) { while(npoints--) { - *vec++ = atom_getfloat(x->x_row + i); + vec[i].w_float = atom_getfloat(x->x_row + i); i++; } } @@ -243,10 +243,10 @@ static int subst_calc(t_subst *x, int n) npoints -= l; while (l--) { - *vec++ = atom_getfloat(x->x_row + i); + vec[i].w_float = atom_getfloat(x->x_row + i); i++; } - while (npoints--) *vec++ = 0; + while (npoints--) { vec[i].w_float = 0; i++; } } garray_redraw(A); } @@ -298,7 +298,7 @@ void subst_set(t_subst *x, t_symbol *s) static void subst_load(t_subst *x, t_symbol *s) { t_garray *b; /* make local copy of array */ - t_float *tab; /* the content itselfe */ + t_word *tab; /* the content itselfe */ int items, i; if ((b = (t_garray *)pd_findbyclass(s, garray_class))) @@ -310,14 +310,14 @@ static void subst_load(t_subst *x, t_symbol *s) } // read from our array - if (!garray_getfloatarray(b, &items, &tab)) + if (!garray_getfloatwords(b, &items, &tab)) { post("subst: couldn't read from array!"); return; } for(i = 0; i < items; i++) { - SETFLOAT(x->x_row + i, tab[i]); // copy array into x->x_row + SETFLOAT(x->x_row + i, tab[i].w_float); // copy array into x->x_row } x->x_length = items; post("subst: loaded %d values from array \"%s\"", items, s->s_name); -- cgit v1.2.3