Description: fix crashes due to mis-allocation of memory
 (t_int) is incompatible with (int)
 ...and should *never* be used as an integer numeric type!
Author: IOhannes m zmölnig
Forwarded: yes
Last-Update: 2015-10-27
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- pd-creb.orig/modules/permut~.c
+++ pd-creb/modules/permut~.c
@@ -24,7 +24,7 @@
 #include <stdlib.h>
 //#include "m_pd.h"
 #include "extlib_util.h"
-                               
+
 typedef union
 {
     float f;
@@ -35,7 +35,7 @@
 typedef struct permutctl
 {
   char c_type;
-  t_int *c_permutationtable;
+  int *c_permutationtable;
   int c_blocksize;
 } t_permutctl;
 
@@ -48,9 +48,9 @@
 } t_permut;
 
 
-static inline void permut_perform_permutation(t_float *S, int n, t_int *f)
+static inline void permut_perform_permutation(t_float *S, int n, int *f)
 {
-  t_int k,l;
+  int k,l;
   t_float swap;
   for(k=0; k<n; k++)
     {
@@ -68,7 +68,7 @@
   int i,j;
   int N = x->x_ctl.c_blocksize;
   int mask = N-1;
-  t_int *p = x->x_ctl.c_permutationtable;
+  int *p = x->x_ctl.c_permutationtable;
   int r, last = 0;
   t_permutflint flintseed;
   
@@ -111,7 +111,7 @@
     {
       if (x->x_ctl.c_permutationtable)
 	free(x->x_ctl.c_permutationtable);
-      x->x_ctl.c_permutationtable = (t_int *)malloc(sizeof(int)*size);
+      x->x_ctl.c_permutationtable = (int *)malloc(sizeof(int)*size);
       x->x_ctl.c_blocksize = size;
 
       /* make sure it's initialized */
@@ -131,10 +131,10 @@
   t_float *in    = (t_float *)(w[3]);
   t_float *out    = (t_float *)(w[4]);
   t_permutctl *ctl  = (t_permutctl *)(w[1]);
-  t_int i;
-  t_int n = (t_int)(w[2]);
+  int i;
+  int n = (int)(w[2]);
   t_float x,y;
-  t_int *p =  ctl->c_permutationtable;
+  int *p =  ctl->c_permutationtable;
 
 
   if (in != out)
--- pd-creb.orig/modules++/biquadseries~.cc
+++ pd-creb/modules++/biquadseries~.cc
@@ -57,8 +57,8 @@
   t_float *in    = (t_float *)(w[3]);
   t_float *out    = (t_float *)(w[4]);
   DSPIfilterSeries* biquadseries  = (DSPIfilterSeries *)(w[1]);
-  t_int n = (t_int)(w[2]);
-  t_int i;
+  int n = (int)(w[2]);
+  int i;
   t_float x;
 
   // dit kan beter 
--- pd-creb.orig/modules++/blosc~.cc
+++ pd-creb/modules++/blosc~.cc
@@ -56,10 +56,10 @@
 
 typedef struct bloscctl
 {
-    t_int c_index[VOICES];      // array of indices in sample table
+    int c_index[VOICES];      // array of indices in sample table
     t_float c_frac[VOICES];     // array of fractional indices
     t_float c_vscale[VOICES];   // array of scale factors
-    t_int c_next_voice;         // next voice to steal (round robin)
+    int c_next_voice;         // next voice to steal (round robin)
     u32 c_phase;                // phase of main oscillator
     u32 c_phase2;               // phase of secondairy oscillator
     t_float c_state;            // state of the square wave
@@ -86,7 +86,7 @@
 
 
 /* flat table: better for linear interpolation */
-static inline t_float _play_voice_lint(t_float *table, t_int *index, t_float frac, t_float scale)
+static inline t_float _play_voice_lint(t_float *table, int *index, t_float frac, t_float scale)
 {
     int i = *index;
 
@@ -316,12 +316,12 @@
 
 static t_int *blosc_perform_hardsync_saw(t_int *w)
 {
-    t_float *freq     = (t_float *)(w[3]);
-    t_float *freq2     = (t_float *)(w[4]);
-    t_float *out      = (t_float *)(w[5]);
-    t_bloscctl *ctl  = (t_bloscctl *)(w[1]);
-    t_int n           = (t_int)(w[2]);
-    t_int i;
+    t_float *freq   = (t_float *)(w[3]);
+    t_float *freq2  = (t_float *)(w[4]);
+    t_float *out    = (t_float *)(w[5]);
+    t_bloscctl *ctl = (t_bloscctl *)(w[1]);
+    int n           = (int)(w[2]);
+    int i;
 
     /* set postfilter cutoff */
     ctl->c_butter->setButterHP(0.85 * (*freq / sys_getsr()));
@@ -354,9 +354,9 @@
 {
     t_float *freq     = (t_float *)(w[3]);
     t_float *out      = (t_float *)(w[4]);
-    t_bloscctl *ctl  = (t_bloscctl *)(w[1]);
-    t_int n           = (t_int)(w[2]);
-    t_int i;
+    t_bloscctl *ctl   = (t_bloscctl *)(w[1]);
+    int n             = (int)(w[2]);
+    int i;
     
     while (n--) {
 	t_float frequency = *freq++;
@@ -384,9 +384,9 @@
 {
     t_float *freq     = (t_float *)(w[3]);
     t_float *out      = (t_float *)(w[4]);
-    t_bloscctl *ctl  = (t_bloscctl *)(w[1]);
-    t_int n           = (t_int)(w[2]);
-    t_int i;
+    t_bloscctl *ctl   = (t_bloscctl *)(w[1]);
+    int n             = (int)(w[2]);
+    int i;
 
 
     /* set postfilter cutoff */
@@ -416,9 +416,9 @@
 {
     t_float *amp      = (t_float *)(w[3]);
     t_float *out      = (t_float *)(w[4]);
-    t_bloscctl *ctl  = (t_bloscctl *)(w[1]);
-    t_int n           = (t_int)(w[2]);
-    t_int i;
+    t_bloscctl *ctl   = (t_bloscctl *)(w[1]);
+    int n             = (int)(w[2]);
+    int i;
     t_float prev_amp = ctl->c_prev_amp;
     
     while (n--) {
--- pd-creb.orig/modules++/filterortho~.cc
+++ pd-creb/modules++/filterortho~.cc
@@ -46,8 +46,8 @@
   t_float *in    = (t_float *)(w[3]);
   t_float *out    = (t_float *)(w[4]);
   DSPIfilterOrtho* filterortho  = (DSPIfilterOrtho *)(w[1]);
-  t_int n = (t_int)(w[2]);
-  t_int i;
+  int n = (int)(w[2]);
+  int i;
   t_float x;
 
 
--- pd-creb.orig/modules/bdiag~.c
+++ pd-creb/modules/bdiag~.c
@@ -32,7 +32,7 @@
 {
   t_float *c_state;
   t_float *c_eigen;
-  t_int c_order;
+  int c_order;
 } t_bdiagctl;
 
 typedef struct bdiag
@@ -151,7 +151,7 @@
 
   t_float *eigen = ctl->c_eigen;
   t_float *state = ctl->c_state;
-  t_int n = (t_int)(w[2]);
+  int n = (int)(w[2]);
 
   t_float u1,u2,a,b,s1,s2,s1new,s2new;
 
--- pd-creb.orig/modules/bfft~.c
+++ pd-creb/modules/bfft~.c
@@ -33,12 +33,12 @@
 
 typedef struct bfftctl
 {
-    t_int c_levels;
+    int c_levels;
     char c_name[16];
-    t_int *c_clutter;
-    t_int *c_unclutter;
-    t_int c_kill_DC;
-    t_int c_kill_NY;
+    int *c_clutter;
+    int *c_unclutter;
+    int c_kill_DC;
+    int c_kill_NY;
 } t_bfftctl;
 
 typedef struct bfft
@@ -51,9 +51,9 @@
 t_class *bfft_class, *ibfft_class, *fht_class;
 
 
-static inline void bfft_perform_permutation(t_float *S, int n, t_int *f)
+static inline void bfft_perform_permutation(t_float *S, int n, int *f)
 {
-  t_int k,l;
+  int k,l;
   t_float swap;
   for(k=0; k<n; k++)
     {
@@ -65,7 +65,7 @@
     }
 }
 
-static void bfft_permutation(t_bfft *x, t_int n){
+static void bfft_permutation(t_bfft *x, int n){
 
   t_bfftctl *ctl = &x->x_ctl;
   int i;
@@ -73,8 +73,8 @@
   if (ctl->c_clutter)   free(ctl->c_clutter);
   if (ctl->c_unclutter) free(ctl->c_unclutter);
   
-  ctl->c_clutter = (t_int *)malloc(n*sizeof(t_int));
-  ctl->c_unclutter = (t_int *)malloc(n*sizeof(t_int));
+  ctl->c_clutter = (int *)malloc(n*sizeof(int));
+  ctl->c_unclutter = (int *)malloc(n*sizeof(int));
 
 
   ctl->c_unclutter[0] = 0;
@@ -104,7 +104,7 @@
 //  t_float *in    = (t_float *)(w[3]);
   t_float *out   = (t_float *)(w[4]);
   t_bfftctl *ctl = (t_bfftctl *)(w[1]);
-  t_int n        = (t_int)(w[2]);
+  int n        = (int)(w[2]);
   t_float scale = sqrt(1.0f / (t_float)(n));
 
   mayer_fht(out, n);
--- pd-creb.orig/modules/bitsplit~.c
+++ pd-creb/modules/bitsplit~.c
@@ -27,7 +27,7 @@
 
 typedef struct bitsplitctl
 {
-    t_int c_outputs;
+    int c_outputs;
     t_float *c_input;
     t_float **c_output;
 } t_bitsplitctl;
@@ -44,11 +44,11 @@
 {
 
     t_bitsplitctl *ctl  = (t_bitsplitctl *)(word[1]);
-    t_int n             = (t_int)(word[2]);
+    int n               = (int)(word[2]);
     t_float *in         = ctl->c_input;
-    t_int outputs       = ctl->c_outputs;
+    int outputs         = ctl->c_outputs;
     t_float **out       = ctl->c_output;
-    t_int i,j;
+    int i,j;
 
     for (i=0;i<n;i++){
 	long word = (in[i] * (t_float)(0x7fffffff));
--- pd-creb.orig/modules/blocknorm~.c
+++ pd-creb/modules/blocknorm~.c
@@ -29,7 +29,7 @@
 
 typedef struct blocknormctl
 {
-    t_int c_channels;
+    int c_channels;
     t_float **c_input;
     t_float **c_output;
 } t_blocknormctl;
@@ -45,12 +45,12 @@
 static t_int *blocknorm_perform(t_int *word)
 {
 
-    t_blocknormctl *ctl  = (t_blocknormctl *)(word[1]);
-    t_int n             = (t_int)(word[2]);
+    t_blocknormctl *ctl = (t_blocknormctl *)(word[1]);
+    int n               = (int)(word[2]);
     t_float **in        = ctl->c_input;
     t_float **out       = ctl->c_output;
-    t_int c             = ctl->c_channels;
-    t_int i,j;
+    int c               = ctl->c_channels;
+    int i,j;
 
     t_float p = 0.0f;
     t_float x, s;
--- pd-creb.orig/modules/bwin~.c
+++ pd-creb/modules/bwin~.c
@@ -29,7 +29,7 @@
     t_object x_obj;
     t_float x_f;
     t_float *x_window;
-    t_int x_size;
+    int x_size;
     t_symbol *x_type;
     t_float x_typearg;
     
@@ -49,7 +49,7 @@
     return (w+5);
 }
 
-static void window_size(t_window *x, t_int n)
+static void window_size(t_window *x, int n)
 {
     if (x->x_size != n){
 	if (x->x_window) free(x->x_window);
--- pd-creb.orig/modules/cheby~.c
+++ pd-creb/modules/cheby~.c
@@ -27,7 +27,7 @@
 typedef struct chebyctl
 {
   t_float c_gain[MAX_ORDER];
-  t_int c_order;
+  int c_order;
 } t_chebyctl;
 
 typedef struct cheby
@@ -60,8 +60,8 @@
   t_float *out    = (t_float *)(w[4]);
   t_chebyctl *ctl  = (t_chebyctl *)(w[1]);
   t_float *gain  = ctl->c_gain;
-  t_int i;
-  t_int n = (t_int)(w[2]), k;
+  int i;
+  int n = (int)(w[2]), k;
   t_float x,y,t1,t2,t,acc;
 
     
--- pd-creb.orig/modules/diag~.c
+++ pd-creb/modules/diag~.c
@@ -32,7 +32,7 @@
 {
   t_float *c_state;
   t_float *c_eigen;
-  t_int c_order;
+  int c_order;
 } t_diagctl;
 
 typedef struct diag
@@ -111,7 +111,7 @@
 
   t_float *eigen = ctl->c_eigen;
   t_float *state = ctl->c_state;
-  t_int n = (t_int)(w[2]);
+  int n = (int)(w[2]);
   t_float newstate;
 
   int i;
--- pd-creb.orig/modules/dist~.c
+++ pd-creb/modules/dist~.c
@@ -69,8 +69,8 @@
   t_float *out    = (t_float *)(w[4]);
   t_distctl *ctl  = (t_distctl *)(w[1]);
   t_float gain  = ctl->c_gain;
-  t_int i;
-  t_int n = (t_int)(w[2]);
+  int i;
+  int n = (int)(w[2]);
   t_float x,y,v;
   t_float z = ctl->c_delay;
 
--- pd-creb.orig/modules/dynwav~.c
+++ pd-creb/modules/dynwav~.c
@@ -31,7 +31,7 @@
 {
   t_float *c_buf1; /* current */
   t_float *c_buf2; /* old */
-  t_int c_order;
+  int c_order;
 
 } t_dynwavctl;
 
@@ -52,7 +52,7 @@
   t_float *freq     = (t_float *)(w[4]);
   t_float *out      = (t_float *)(w[5]);
   t_dynwavctl *ctl  = (t_dynwavctl *)(w[1]);
-  t_int n           = (t_int)(w[2]);
+  int n             = (int)(w[2]);
 
   t_float *buf, *dbuf, *swap;
 
@@ -119,7 +119,7 @@
   t_float *freq     = (t_float *)(w[4]);
   t_float *out      = (t_float *)(w[5]);
   t_dynwavctl *ctl  = (t_dynwavctl *)(w[1]);
-  t_int n           = (t_int)(w[2]);
+  int n             = (int)(w[2]);
 
   t_float *buf, *dbuf, *swap;
 
--- pd-creb.orig/modules/eadsr~.c
+++ pd-creb/modules/eadsr~.c
@@ -89,9 +89,9 @@
     t_float release = ctl->c_release;
     t_float state   = ctl->c_state;
     t_float target  = ctl->c_target;
-    t_int n = (t_int)(w[2]);
+    int n = (int)(w[2]);
 
-    t_int i;
+    int i;
 
 
     for (i = 0; i < n; i++){
--- pd-creb.orig/modules/ead~.c
+++ pd-creb/modules/ead~.c
@@ -29,7 +29,7 @@
   t_float c_attack;
   t_float c_decay;
   t_float c_state;
-  t_int c_target;
+  int c_target;
 } t_eadctl;
 
 
@@ -74,9 +74,9 @@
     t_float attack  = ctl->c_attack;
     t_float decay   = ctl->c_decay;
     t_float state   = ctl->c_state;
-    t_int n = (t_int)(w[2]);
+    int n = (int)(w[2]);
 
-    t_int i;
+    int i;
 
 
     /* A/D code */
--- pd-creb.orig/modules/ear~.c
+++ pd-creb/modules/ear~.c
@@ -71,9 +71,9 @@
     t_float release  = ctl->c_release;
     t_float state  = ctl->c_state;
     t_float target = ctl->c_target;
-    t_int n = (t_int)(w[2]);
+    int n = (int)(w[2]);
 
-    t_int i;
+    int i;
 
     if (target) /* attack phase */
       for (i = 0; i < n; i++)
--- pd-creb.orig/modules/eblosc~.c
+++ pd-creb/modules/eblosc~.c
@@ -340,11 +340,11 @@
 static t_int *eblosc_perform_hardsync_saw(t_int *w)
 {
     t_float *freq     = (t_float *)(w[3]);
-    t_float *freq2     = (t_float *)(w[4]);
+    t_float *freq2    = (t_float *)(w[4]);
     t_float *out      = (t_float *)(w[5]);
     t_ebloscctl *ctl  = (t_ebloscctl *)(w[1]);
-    t_int n           = (t_int)(w[2]);
-    t_int i;
+    int n             = (int)(w[2]);
+    int i;
 
     /* set postfilter cutoff */
     ctl->c_butter->setButterHP(0.85f * (*freq / sys_getsr()));
@@ -379,8 +379,8 @@
     t_float *freq     = (t_float *)(w[3]);
     t_float *out      = (t_float *)(w[4]);
     t_ebloscctl *ctl  = (t_ebloscctl *)(w[1]);
-    t_int n           = (t_int)(w[2]);
-    t_int i;
+    int n             = (int)(w[2]);
+    int i;
     
     while (n--) {
 	float frequency = *freq++;
@@ -409,8 +409,8 @@
     t_float *freq     = (t_float *)(w[3]);
     t_float *out      = (t_float *)(w[4]);
     t_ebloscctl *ctl  = (t_ebloscctl *)(w[1]);
-    t_int n           = (t_int)(w[2]);
-    t_int i;
+    int n             = (int)(w[2]);
+    int i;
 
 
     /* set postfilter cutoff */
@@ -442,8 +442,8 @@
     t_float *amp      = (t_float *)(w[3]);
     t_float *out      = (t_float *)(w[4]);
     t_ebloscctl *ctl  = (t_ebloscctl *)(w[1]);
-    t_int n           = (t_int)(w[2]);
-    t_int i;
+    int n             = (int)(w[2]);
+    int i;
     t_float prev_amp = ctl->c_prev_amp;
     
     while (n--) {
--- pd-creb.orig/modules/fdn~.c
+++ pd-creb/modules/fdn~.c
@@ -75,8 +75,8 @@
 
 typedef struct fdnctl
 {
-  t_int c_order;      /* veelvoud van 4 */
-  t_int c_maxorder;
+  int c_order;      /* veelvoud van 4 */
+  int c_maxorder;
   t_float c_leak;
   t_float c_input;
   t_float c_output;
@@ -85,13 +85,13 @@
   t_float *c_gain_state;
   t_float c_timehigh;
   t_float c_timelow;
-  t_int *c_tap;       /* cirular feed: N+1 pointers: 1 read, (N-1)r/w, 1 write */ 
+  int *c_tap;       /* cirular feed: N+1 pointers: 1 read, (N-1)r/w, 1 write */ 
   t_float *c_length;  /* delay lengths in ms */
-  t_int c_bufsize;
+  int c_bufsize;
   t_float c_fsample;
   t_float *c_vector[2];
   t_float *c_vectorbuffer;
-  t_int c_curvector;
+  int c_curvector;
 } t_fdnctl;
 
 typedef struct fdn
@@ -102,7 +102,7 @@
 } t_fdn;
 
 
-static void fdn_order(t_fdn *x, t_int order){
+static void fdn_order(t_fdn *x, int order){
   if (order > x->x_ctl.c_maxorder) {
     post("fdn: this should not happen (panic!) order %d "
 	 "is larger than maxorder %d:", 
@@ -149,17 +149,17 @@
   t_float *outr    = (t_float *)(w[4]);
   t_float *outl    = (t_float *)(w[5]);
   t_fdnctl *ctl    = (t_fdnctl *)(w[1]);
-  t_int n          = (t_int)(w[2]);
+  int n            = (int)(w[2]);
   t_float input    = ctl->c_input;
   t_float output   = ctl->c_output;
-  t_float *gain_in    = ctl->c_gain_in;
+  t_float *gain_in = ctl->c_gain_in;
   t_float *gain_state = ctl->c_gain_state;
-  t_int order      = ctl->c_order;
-  t_int *tap       = ctl->c_tap;
+  int order        = ctl->c_order;
+  int *tap         = ctl->c_tap;
   t_float *buf     = ctl->c_buf;
-  t_int mask       = ctl->c_bufsize - 1;
+  int mask         = ctl->c_bufsize - 1;
 
-  t_int i,j;
+  int i,j;
   t_float x,y,v,left,right,z;
   t_float filt_in, filt_last;
 
@@ -289,7 +289,7 @@
 
 static void fdn_time(t_fdn *x, t_float timelow, t_float timehigh){
   t_float elow, ehigh;
-  t_int i;
+  int i;
   t_float gainlow, gainhigh, gainscale;
 
   if (timelow < FDN_MIN_DECAY_TIME) timelow = FDN_MIN_DECAY_TIME;
@@ -329,7 +329,7 @@
   int sum, t, n;
   int mask = x->x_ctl.c_bufsize - 1;
   int start =  x->x_ctl.c_tap[0];
-  t_int *tap = x->x_ctl.c_tap;
+  int *tap = x->x_ctl.c_tap;
   t_float *length = x->x_ctl.c_length;
   t_float scale = sys_getsr() * .001f;
 
@@ -369,9 +369,9 @@
 
 static void fdn_linear(t_fdn *x, t_float forder, t_float min, t_float max)
 {
-    t_int order = ((int)forder) & 0xfffffffc;
+    int order = ((int)forder) & 0xfffffffc;
     t_float length, inc;
-    t_int i;
+    int i;
 
     if (order < 4) return;
     if (order > x->x_ctl.c_maxorder) return;
@@ -395,9 +395,9 @@
 
 static void fdn_exponential(t_fdn *x, t_float forder, t_float min, t_float max)
 {
-    t_int order = ((int)forder) & 0xfffffffc;
+    int order = ((int)forder) & 0xfffffffc;
     t_float length, inc;
-    t_int i;
+    int i;
 
     if (order < 4) return;
     if (order > x->x_ctl.c_maxorder) return;
@@ -425,11 +425,11 @@
 
 static void *fdn_new(t_floatarg maxiorder, t_floatarg maxibufsize)
 {
-  t_int order = maxiorder;
-  t_int bufround;
+  int order = maxiorder;
+  int bufround;
   t_fdn *x = (t_fdn *)pd_new(fdn_class);
   t_float scale = sys_getsr() * .001f;
-  t_int bufsize = (t_int)(scale * maxibufsize);
+  int bufsize = (int)(scale * maxibufsize);
 
 
   inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("timelow"));  
@@ -455,8 +455,8 @@
   x->x_ctl.c_buf = (t_float *)malloc(sizeof(t_float) * bufsize);
   x->x_ctl.c_bufsize = bufsize;
   x->x_ctl.c_fsample = sys_getsr();
-  x->x_ctl.c_tap = (t_int *)malloc((order + 1) * sizeof(t_int)); 
-  x->x_ctl.c_length = (t_float *)malloc(order * sizeof(t_int)); 
+  x->x_ctl.c_tap = (int *)malloc((order + 1) * sizeof(int)); 
+  x->x_ctl.c_length = (t_float *)malloc(order * sizeof(t_float)); 
   x->x_ctl.c_gain_in = (t_float *)malloc(order * sizeof(t_float));
   x->x_ctl.c_gain_state = (t_float *)malloc(order * sizeof(t_float));
   x->x_ctl.c_vectorbuffer = (t_float *)malloc(order * 2 * sizeof(t_float));
--- pd-creb.orig/modules/ffpoly.c
+++ pd-creb/modules/ffpoly.c
@@ -31,11 +31,11 @@
     t_float x_f;
 
     t_outlet *x_outlet;
-    t_int *x_coef;
-    t_int x_poly_order;
-    t_int x_field_order;
+    int *x_coef;
+    int x_poly_order;
+    int x_field_order;
 
-    t_int x_lastpackedcoef;
+    int x_lastpackedcoef;
 
 
 
@@ -49,7 +49,7 @@
     int in = (int)fcoef;
     int fo = x->x_field_order;
     int po = x->x_poly_order;
-    t_int* c = x->x_coef;
+    int* c = x->x_coef;
     int i, out;
 
     in %= fo;
@@ -124,8 +124,8 @@
 
 static void *ffpoly_new(t_floatarg fpolyorder, t_floatarg ffieldorder)
 {
-    t_int polyorder = (int)fpolyorder;
-    t_int fieldorder = (int)ffieldorder;
+    int polyorder = (int)fpolyorder;
+    int fieldorder = (int)ffieldorder;
 
     t_ffpoly *x = (t_ffpoly *)pd_new(ffpoly_class);
 
@@ -135,7 +135,7 @@
     x->x_poly_order = polyorder;
     x->x_field_order = fieldorder;
 
-    x->x_coef = (t_int *)malloc((x->x_poly_order  + 1) * sizeof(int));
+    x->x_coef = (int *)malloc((x->x_poly_order  + 1) * sizeof(int));
 
     /* set poly to f(x) = x */
     ffpoly_coefficients(x, x->x_field_order);
--- pd-creb.orig/modules/junction~.c
+++ pd-creb/modules/junction~.c
@@ -26,7 +26,7 @@
 
 typedef struct junctionctl
 {
-  t_int c_channels;
+  int c_channels;
   t_float **c_in;
   t_float **c_out;
   t_float *c_buffer;
@@ -75,11 +75,11 @@
 
 
   t_junctionctl *ctl  = (t_junctionctl *)(w[1]);
-  t_int n             = (t_int)(w[2]);
-  t_int i,j;
+  int n               = (int)(w[2]);
+  int i,j;
   t_float x,y;
 
-  t_int c             = ctl->c_channels;
+  int c               = ctl->c_channels;
   t_float **in        = ctl->c_in;
   t_float **out       = ctl->c_out;
   t_float *buf        = ctl->c_buffer;
--- pd-creb.orig/modules/lattice~.c
+++ pd-creb/modules/lattice~.c
@@ -34,7 +34,7 @@
 typedef struct latticectl
 {
     t_latticesegment c_segment[MAXORDER]; // array of lattice segment data
-    t_int c_segments;
+    int c_segments;
 } t_latticectl;
 
 typedef struct lattice
@@ -53,12 +53,12 @@
   t_float *in    = (t_float *)(w[3]);
   t_float *out    = (t_float *)(w[4]);
   t_latticectl *ctl  = (t_latticectl *)(w[1]);
-  t_int i,j;
-  t_int n = (t_int)(w[2]);
+  int i,j;
+  int n = (int)(w[2]);
   t_float x,rc,d;
 
   t_latticesegment* seg = ctl->c_segment;
-  t_int segments = ctl->c_segments;
+  int segments = ctl->c_segments;
   for (i=0; i<n; i++)
   {
       x = *in++;
@@ -98,7 +98,7 @@
 
 static void lattice_rc(t_lattice *x, t_float segment, t_float refco)
 {
-    t_int seg = (t_float)segment;
+    int seg = (t_float)segment;
     if ((seg >= 0) && (seg < x->x_ctl.c_segments)){
 	if (refco >= MAXREFCO) refco = MAXREFCO;
 	if (refco <= -MAXREFCO) refco = -MAXREFCO;
@@ -109,15 +109,15 @@
 static void lattice_reset(t_lattice *x)
 {
     t_float* buf = (t_float *)x->x_ctl.c_segment;
-    t_int n = x->x_ctl.c_segments;
-    t_int i;
+    int n = x->x_ctl.c_segments;
+    int i;
     for (i=0; i<n; i++) buf[i]=0;
 }
 
 static void *lattice_new(t_floatarg segments)
 {
     t_lattice *x = (t_lattice *)pd_new(lattice_class);
-    t_int seg = (t_int)segments;
+    int seg = (int)segments;
 
     outlet_new(&x->x_obj, gensym("signal")); 
 
--- pd-creb.orig/modules/qmult~.c
+++ pd-creb/modules/qmult~.c
@@ -45,8 +45,8 @@
 
 
   t_qmultctl *ctl     = (t_qmultctl *)(word[1]);
-  t_int n             = (t_int)(word[2]);
-  t_int i;
+  int n               = (int)(word[2]);
+  int i;
 
   t_float *in0l        = ctl->c_inputleft[0];
   t_float *in1l        = ctl->c_inputleft[1];
--- pd-creb.orig/modules/qnorm~.c
+++ pd-creb/modules/qnorm~.c
@@ -44,8 +44,8 @@
 
 
   t_qnormctl *ctl     = (t_qnormctl *)(word[1]);
-  t_int n             = (t_int)(word[2]);
-  t_int i;
+  int n               = (int)(word[2]);
+  int i;
 
   t_float *in0        = ctl->c_input[0];
   t_float *in1        = ctl->c_input[1];
--- pd-creb.orig/modules/resofilt~.c
+++ pd-creb/modules/resofilt~.c
@@ -68,7 +68,7 @@
 {
 
   t_resofiltctl *ctl = (t_resofiltctl *)(w[1]);
-  t_int n            = (t_int)(w[2]);
+  int n              = (int)(w[2]);
   t_float *in        = (t_float *)(w[3]);
   t_float *freq      = (t_float *)(w[4]);
   t_float *reso      = (t_float *)(w[5]);
@@ -211,7 +211,7 @@
 {
 
   t_resofiltctl *ctl = (t_resofiltctl *)(w[1]);
-  t_int n            = (t_int)(w[2]);
+  int n              = (int)(w[2]);
   t_float *in        = (t_float *)(w[3]);
   t_float *freq      = (t_float *)(w[4]);
   t_float *reso      = (t_float *)(w[5]);
--- pd-creb.orig/modules/scrollgrid1D~.c
+++ pd-creb/modules/scrollgrid1D~.c
@@ -83,14 +83,14 @@
   t_float *outy    = (t_float *)(w[8]);
   t_float *outz    = (t_float *)(w[9]);
   t_scrollgrid1Dctl *ctl    = (t_scrollgrid1Dctl *)(w[1]);
-  t_int n          = (t_int)(w[2]);
+  int n            = (int)(w[2]);
   
-  t_int i;
+  int i;
   t_float inv_sr = 1.0 /sys_getsr();
   t_float state[3] = {ctl->c_x, ctl->c_y, ctl->c_z};
   t_float c,f;
   t_float pole[2], r1, r2;
-  t_int o;
+  int o;
   t_float x,y,z;
 
 
--- pd-creb.orig/modules/xfm~.c
+++ pd-creb/modules/xfm~.c
@@ -65,7 +65,7 @@
     //t_float c_sintab[SINSAMPLES + 1];
     t_float c_x1, c_y1; /* state osc 1 */
     t_float c_x2, c_y2; /* state osc 2 */
-    t_int c_type; /* type of algo */
+    int c_type; /* type of algo */
 
 } t_xfmctl;
 
@@ -108,7 +108,7 @@
   t_float *outA    = (t_float *)(w[7]);
   t_float *outB    = (t_float *)(w[8]);
   t_xfmctl *ctl    = (t_xfmctl *)(w[1]);
-  t_int n          = (t_int)(w[2]);
+  int n            = (int)(w[2]);
   //t_float *tab     = ctl->c_sintab;
 
   t_float x1 = ctl->c_x1, y1 = ctl->c_y1,   z1, dx1, dy1, inv_norm1;
@@ -116,7 +116,7 @@
 
   t_float scale = 2 * M_PI / sys_getsr();
 
-  t_int i;
+  int i;
 
   switch(ctl->c_type){
   default:
