Update of /cvsroot/pure-data/externals/zexy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25180
Modified Files: blockmirror_tilde.c blockswap_tilde.c dfreq_tilde.c index.c lister.c pdf_tilde.c sfplay.c sfrecord.c swap_tilde.c Log Message: code cleanup
Index: dfreq_tilde.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/dfreq_tilde.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dfreq_tilde.c 22 Mar 2005 20:58:22 -0000 1.1 --- dfreq_tilde.c 12 Apr 2005 13:27:06 -0000 1.2 *************** *** 82,86 ****
! static void *dfreq_new() { t_dfreq *x = (t_dfreq *)pd_new(dfreq_class); --- 82,86 ----
! static void *dfreq_new(void) { t_dfreq *x = (t_dfreq *)pd_new(dfreq_class); *************** *** 103,107 **** { dfreq_class = class_new(gensym("dfreq~"), (t_newmethod)dfreq_new, 0, ! sizeof(t_dfreq), 0, A_DEFFLOAT, 0); class_addmethod(dfreq_class, nullfn, gensym("signal"), 0); class_addmethod(dfreq_class, (t_method)dfreq_dsp, gensym("dsp"), 0); --- 103,107 ---- { dfreq_class = class_new(gensym("dfreq~"), (t_newmethod)dfreq_new, 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);
Index: index.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/index.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.c 22 Mar 2005 20:58:22 -0000 1.1 --- index.c 12 Apr 2005 13:27:07 -0000 1.2 *************** *** 74,84 **** static void index_float(t_index *x, t_float findex) { ! int index = (int)findex; ! if ((index > 0) && (index <= x->maxentries) && (x->names[index-1])) { /* TB: output symbol to outlet */ ! t_symbol * s = gensym (x->names[index-1]); outlet_symbol (x->x_obj.ob_outlet,s); ! post("index[%d] = %s", index, x->names[index-1]); } } --- 74,84 ---- static void index_float(t_index *x, t_float findex) { ! 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[iindex-1]); outlet_symbol (x->x_obj.ob_outlet,s); ! // post("iindex[%d] = %s", iindex, x->names[iindex-1]); } }
Index: sfplay.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/sfplay.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sfplay.c 22 Mar 2005 20:58:22 -0000 1.1 --- sfplay.c 12 Apr 2005 13:27:07 -0000 1.2 *************** *** 135,139 ****
/* like the one from garray */ ! static int sfplay_am_i_big_endian() { unsigned short s = 1; --- 135,139 ----
/* like the one from garray */ ! static int sfplay_am_i_big_endian(void) { unsigned short s = 1; *************** *** 459,463 ****
/* first read soundfile 16 bit*/ ! if((j=fread(buf,sizeof(short),c*n,x->fp)) < (unsigned int) n) {
--- 459,463 ----
/* first read soundfile 16 bit*/ ! if((j=fread(buf,sizeof(short),c*n,x->fp)) < n) {
Index: blockswap_tilde.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/blockswap_tilde.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** blockswap_tilde.c 22 Mar 2005 20:58:20 -0000 1.1 --- blockswap_tilde.c 12 Apr 2005 13:27:06 -0000 1.2 *************** *** 76,80 **** }
! static void *blockswap_new() { t_blockswap *x = (t_blockswap *)pd_new(blockswap_class); --- 76,80 ---- }
! static void *blockswap_new(void) { t_blockswap *x = (t_blockswap *)pd_new(blockswap_class); *************** *** 88,92 **** { blockswap_class = class_new(gensym("blockswap~"), (t_newmethod)blockswap_new, 0, ! sizeof(t_blockswap), 0, A_DEFFLOAT, 0); class_addmethod(blockswap_class, nullfn, gensym("signal"), 0); class_addmethod(blockswap_class, (t_method)blockswap_dsp, gensym("dsp"), 0); --- 88,92 ---- { blockswap_class = class_new(gensym("blockswap~"), (t_newmethod)blockswap_new, 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);
Index: sfrecord.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/sfrecord.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sfrecord.c 22 Mar 2005 20:58:23 -0000 1.1 --- sfrecord.c 12 Apr 2005 13:27:07 -0000 1.2 *************** *** 104,108 ****
/* like the one from garray */ ! static int sfrecord_am_i_big_endian() { unsigned short s = 1; --- 104,108 ----
/* like the one from garray */ ! static int sfrecord_am_i_big_endian(void) { unsigned short s = 1;
Index: lister.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/lister.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** lister.c 22 Mar 2005 20:58:22 -0000 1.1 --- lister.c 12 Apr 2005 13:27:07 -0000 1.2 *************** *** 19,22 **** --- 19,23 ----
#include "zexy.h" + #include <string.h>
/* ------------------------- list ------------------------------- */
Index: blockmirror_tilde.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/blockmirror_tilde.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** blockmirror_tilde.c 22 Mar 2005 20:58:20 -0000 1.1 --- blockmirror_tilde.c 12 Apr 2005 13:27:06 -0000 1.2 *************** *** 81,85 **** }
! static void *blockmirror_new() { t_blockmirror *x = (t_blockmirror *)pd_new(blockmirror_class); --- 81,85 ---- }
! static void *blockmirror_new(void) { t_blockmirror *x = (t_blockmirror *)pd_new(blockmirror_class); *************** *** 93,97 **** { blockmirror_class = class_new(gensym("blockmirror~"), (t_newmethod)blockmirror_new, 0, ! sizeof(t_blockmirror), 0, A_DEFFLOAT, 0); class_addmethod(blockmirror_class, nullfn, gensym("signal"), 0); class_addmethod(blockmirror_class, (t_method)blockmirror_dsp, gensym("dsp"), 0); --- 93,97 ---- { blockmirror_class = class_new(gensym("blockmirror~"), (t_newmethod)blockmirror_new, 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);
Index: swap_tilde.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/swap_tilde.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** swap_tilde.c 22 Mar 2005 20:58:23 -0000 1.1 --- swap_tilde.c 12 Apr 2005 13:27:07 -0000 1.2 *************** *** 78,82 **** }
! static void *swap_new() { t_swap *x = (t_swap *)pd_new(swap_class); --- 78,82 ---- }
! static void *swap_new(void) { t_swap *x = (t_swap *)pd_new(swap_class); *************** *** 89,93 **** { swap_class = class_new(gensym("swap~"), (t_newmethod)swap_new, 0, ! sizeof(t_swap), 0, A_DEFFLOAT, 0); class_addmethod(swap_class, nullfn, gensym("signal"), 0); class_addmethod(swap_class, (t_method)swap_dsp, gensym("dsp"), 0); --- 89,93 ---- { swap_class = class_new(gensym("swap~"), (t_newmethod)swap_new, 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);
Index: pdf_tilde.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/pdf_tilde.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pdf_tilde.c 22 Mar 2005 20:58:22 -0000 1.1 --- pdf_tilde.c 12 Apr 2005 13:27:07 -0000 1.2 *************** *** 79,84 **** { t_float f = *in++; ! int index = ((f + 1.0) * halfsize)+0.5; ! buf[(index<0)?0:((index>=x->size)?x->size-1:index)]+=1.; } return (w+4); --- 79,84 ---- { t_float f = *in++; ! int iindex = ((f + 1.0) * halfsize)+0.5; ! buf[(iindex<0)?0:((iindex>=x->size)?x->size-1:iindex)]+=1.; } return (w+4);