diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-04-12 13:27:42 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-04-12 13:27:42 +0000 |
commit | 1f74b681cb08f01e1f645b3182167908f18e3808 (patch) | |
tree | c8b817845abfbf53dffb19c395dd358f289c486e | |
parent | 9ede211655cfec7fc3a7245b8e93409634580787 (diff) |
code cleanup
svn path=/trunk/externals/zexy/; revision=2737
-rw-r--r-- | src/blockmirror_tilde.c | 4 | ||||
-rw-r--r-- | src/blockswap_tilde.c | 4 | ||||
-rw-r--r-- | src/dfreq_tilde.c | 4 | ||||
-rw-r--r-- | src/index.c | 8 | ||||
-rw-r--r-- | src/lister.c | 1 | ||||
-rw-r--r-- | src/pdf_tilde.c | 4 | ||||
-rw-r--r-- | src/sfplay.c | 4 | ||||
-rw-r--r-- | src/sfrecord.c | 2 | ||||
-rw-r--r-- | src/swap_tilde.c | 4 |
9 files changed, 18 insertions, 17 deletions
diff --git a/src/blockmirror_tilde.c b/src/blockmirror_tilde.c index 5c0efcc..1dd3659 100644 --- a/src/blockmirror_tilde.c +++ b/src/blockmirror_tilde.c @@ -80,7 +80,7 @@ static void blockmirror_helper(void) post("outlet : signal~"); } -static void *blockmirror_new() +static void *blockmirror_new(void) { t_blockmirror *x = (t_blockmirror *)pd_new(blockmirror_class); outlet_new(&x->x_obj, gensym("signal")); @@ -92,7 +92,7 @@ static void *blockmirror_new() void blockmirror_tilde_setup(void) { blockmirror_class = class_new(gensym("blockmirror~"), (t_newmethod)blockmirror_new, 0, - sizeof(t_blockmirror), 0, A_DEFFLOAT, 0); + sizeof(t_blockmirror), 0, A_NULL); class_addmethod(blockmirror_class, nullfn, gensym("signal"), 0); class_addmethod(blockmirror_class, (t_method)blockmirror_dsp, gensym("dsp"), 0); diff --git a/src/blockswap_tilde.c b/src/blockswap_tilde.c index 8c323fb..7dbe99d 100644 --- a/src/blockswap_tilde.c +++ b/src/blockswap_tilde.c @@ -75,7 +75,7 @@ static void blockswap_helper(void) post("outlet : signal~"); } -static void *blockswap_new() +static void *blockswap_new(void) { t_blockswap *x = (t_blockswap *)pd_new(blockswap_class); outlet_new(&x->x_obj, gensym("signal")); @@ -87,7 +87,7 @@ static void *blockswap_new() void blockswap_tilde_setup(void) { blockswap_class = class_new(gensym("blockswap~"), (t_newmethod)blockswap_new, 0, - sizeof(t_blockswap), 0, A_DEFFLOAT, 0); + sizeof(t_blockswap), 0, A_NULL); class_addmethod(blockswap_class, nullfn, gensym("signal"), 0); class_addmethod(blockswap_class, (t_method)blockswap_dsp, gensym("dsp"), 0); diff --git a/src/dfreq_tilde.c b/src/dfreq_tilde.c index 7be3d01..7016784 100644 --- a/src/dfreq_tilde.c +++ b/src/dfreq_tilde.c @@ -81,7 +81,7 @@ static void dfreq_dsp(t_dfreq *x, t_signal **sp) -static void *dfreq_new() +static void *dfreq_new(void) { t_dfreq *x = (t_dfreq *)pd_new(dfreq_class); outlet_new(&x->x_obj, gensym("signal")); @@ -102,7 +102,7 @@ static void helper(void) void dfreq_tilde_setup(void) { dfreq_class = class_new(gensym("dfreq~"), (t_newmethod)dfreq_new, 0, - sizeof(t_dfreq), 0, A_DEFFLOAT, 0); + sizeof(t_dfreq), 0, A_NULL); class_addmethod(dfreq_class, nullfn, gensym("signal"), 0); class_addmethod(dfreq_class, (t_method)dfreq_dsp, gensym("dsp"), 0); diff --git a/src/index.c b/src/index.c index 2f59f8e..9872076 100644 --- a/src/index.c +++ b/src/index.c @@ -73,13 +73,13 @@ static int find_free(char **names, int maxentries) static void index_float(t_index *x, t_float findex) { - int index = (int)findex; - if ((index > 0) && (index <= x->maxentries) && (x->names[index-1])) + int iindex = (int)findex; + if ((iindex > 0) && (iindex <= x->maxentries) && (x->names[iindex-1])) { /* TB: output symbol to outlet */ - t_symbol * s = gensym (x->names[index-1]); + t_symbol * s = gensym (x->names[iindex-1]); outlet_symbol (x->x_obj.ob_outlet,s); - post("index[%d] = %s", index, x->names[index-1]); + // post("iindex[%d] = %s", iindex, x->names[iindex-1]); } } diff --git a/src/lister.c b/src/lister.c index 6e732ad..29e59fd 100644 --- a/src/lister.c +++ b/src/lister.c @@ -18,6 +18,7 @@ #include "zexy.h" +#include <string.h> /* ------------------------- list ------------------------------- */ diff --git a/src/pdf_tilde.c b/src/pdf_tilde.c index e55bcf0..ef06a59 100644 --- a/src/pdf_tilde.c +++ b/src/pdf_tilde.c @@ -78,8 +78,8 @@ static t_int *pdf_perform(t_int *w) while (n--) { t_float f = *in++; - int index = ((f + 1.0) * halfsize)+0.5; - buf[(index<0)?0:((index>=x->size)?x->size-1:index)]+=1.; + int iindex = ((f + 1.0) * halfsize)+0.5; + buf[(iindex<0)?0:((iindex>=x->size)?x->size-1:iindex)]+=1.; } return (w+4); } diff --git a/src/sfplay.c b/src/sfplay.c index fd3a884..58f76f9 100644 --- a/src/sfplay.c +++ b/src/sfplay.c @@ -134,7 +134,7 @@ to split them on different ticks in steps of SFPLAY_WAITTICKS to avoid peak performance */ /* like the one from garray */ -static int sfplay_am_i_big_endian() +static int sfplay_am_i_big_endian(void) { unsigned short s = 1; unsigned char c = *(char *) (&s); @@ -458,7 +458,7 @@ static t_int *sfplay_perform(t_int *w) } /* first read soundfile 16 bit*/ - if((j=fread(buf,sizeof(short),c*n,x->fp)) < (unsigned int) n) + if((j=fread(buf,sizeof(short),c*n,x->fp)) < n) { outlet_bang(x->bangout); diff --git a/src/sfrecord.c b/src/sfrecord.c index 2aa9515..35535bc 100644 --- a/src/sfrecord.c +++ b/src/sfrecord.c @@ -103,7 +103,7 @@ to split them on different ticks in steps of SFRECORD_WAITTICKS to avoid peak performance */ /* like the one from garray */ -static int sfrecord_am_i_big_endian() +static int sfrecord_am_i_big_endian(void) { unsigned short s = 1; unsigned char c = *(char *) (&s); diff --git a/src/swap_tilde.c b/src/swap_tilde.c index 668d8c2..9f14310 100644 --- a/src/swap_tilde.c +++ b/src/swap_tilde.c @@ -77,7 +77,7 @@ static void swap_helper(void) post("outlet : signal~"); } -static void *swap_new() +static void *swap_new(void) { t_swap *x = (t_swap *)pd_new(swap_class); outlet_new(&x->x_obj, gensym("signal")); @@ -88,7 +88,7 @@ static void *swap_new() void swap_tilde_setup(void) { swap_class = class_new(gensym("swap~"), (t_newmethod)swap_new, 0, - sizeof(t_swap), 0, A_DEFFLOAT, 0); + sizeof(t_swap), 0, A_NULL); class_addmethod(swap_class, nullfn, gensym("signal"), 0); class_addmethod(swap_class, (t_method)swap_dsp, gensym("dsp"), 0); |