aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/iemlib2/add2_comma.c7
-rw-r--r--src/iemlib2/bpe.c9
-rw-r--r--src/iemlib2/dollarg.c5
-rw-r--r--src/iemlib2/exp_inc.c27
-rw-r--r--src/iemlib2/float24.c2
-rw-r--r--src/iemlib2/iem_anything.c8
-rw-r--r--src/iemlib2/iem_append.c8
-rw-r--r--src/iemlib2/iem_i_route.c9
-rw-r--r--src/iemlib2/iem_pbank_csv.c10
-rw-r--r--src/iemlib2/iem_prepend.c12
-rw-r--r--src/iemlib2/iem_receive.c6
-rw-r--r--src/iemlib2/iem_route.c11
-rw-r--r--src/iemlib2/iem_sel_any.c8
-rw-r--r--src/iemlib2/iem_send.c6
-rw-r--r--src/iemlib2/iemlib2.c54
-rw-r--r--src/iemlib2/init.c12
-rw-r--r--src/iemlib2/list2send.c7
-rw-r--r--src/iemlib2/makefile_linux82
-rw-r--r--src/iemlib2/makefile_win80
-rw-r--r--src/iemlib2/mergefilename.c6
-rw-r--r--src/iemlib2/modulo_counter.c13
-rw-r--r--src/iemlib2/parentdollarzero.c9
-rw-r--r--src/iemlib2/post_netreceive.c13
-rw-r--r--src/iemlib2/pre_inlet.c12
-rw-r--r--src/iemlib2/prepend_ascii.c10
-rw-r--r--src/iemlib2/protect_against_open.c4
-rw-r--r--src/iemlib2/receive2list.c9
-rw-r--r--src/iemlib2/round_zero.c8
-rw-r--r--src/iemlib2/sigLFO_noise.c28
-rw-r--r--src/iemlib2/sigfade.c50
-rw-r--r--src/iemlib2/sigiem_blocksize.c5
-rw-r--r--src/iemlib2/sigiem_samplerate.c5
-rw-r--r--src/iemlib2/sigm2f.c17
-rw-r--r--src/iemlib2/speedlim.c17
-rw-r--r--src/iemlib2/splitfilename.c8
-rw-r--r--src/iemlib2/stripfilename.c7
-rw-r--r--src/iemlib2/toggle_mess.c11
-rw-r--r--src/iemlib2/transf_fader.c37
-rw-r--r--src/iemlib2/unsymbol.c8
-rw-r--r--src/iemlib2/wrap.c12
40 files changed, 246 insertions, 406 deletions
diff --git a/src/iemlib2/add2_comma.c b/src/iemlib2/add2_comma.c
index 2952a53..c5b6322 100644
--- a/src/iemlib2/add2_comma.c
+++ b/src/iemlib2/add2_comma.c
@@ -5,10 +5,7 @@ iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
+
/* --------------------------------- add2_comma ----------------------------------- */
/* -- a special add2-message for messageboxes, which append a comma to a message -- */
@@ -30,7 +27,7 @@ static void add2_comma_bang(t_add2_comma *x)
outlet_anything(x->x_obj.ob_outlet, x->x_sym, 1, x->x_at);
}
-static void add2_comma_float(t_add2_comma *x, t_float f)
+static void add2_comma_float(t_add2_comma *x, t_floatarg f)
{
SETCOMMA(x->x_at);
SETFLOAT(x->x_at+1, f);
diff --git a/src/iemlib2/bpe.c b/src/iemlib2/bpe.c
index bc31ef8..56f1af0 100644
--- a/src/iemlib2/bpe.c
+++ b/src/iemlib2/bpe.c
@@ -5,10 +5,7 @@ iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
+
/* --------------------------- bpe -------------------------------- */
/* -- break-point-envelope, convert a list of value-time-doubles -- */
@@ -37,7 +34,7 @@ static void bpe_stop(t_bpe *x)
static void bpe_tick(t_bpe *x)
{
t_atom *vec = x->x_beg;
- float val, time;
+ t_float val, time;
if(x->x_curindex >= x->x_curnum)
{
@@ -59,7 +56,7 @@ static void bpe_tick(t_bpe *x)
static void bpe_bang(t_bpe *x)
{
t_atom *vec = x->x_beg;
- float val, time;
+ t_float val, time;
if(x->x_curnum)
{
diff --git a/src/iemlib2/dollarg.c b/src/iemlib2/dollarg.c
index c21d29e..9d66f8f 100644
--- a/src/iemlib2/dollarg.c
+++ b/src/iemlib2/dollarg.c
@@ -6,12 +6,7 @@ iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005
#include "m_pd.h"
#include "g_canvas.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
-EXTERN void canvas_getargs(int *argcp, t_atom **argvp);
/* ------------------------- dollarg ---------------------------- */
/* --- dollar-arguments, output the initial-arguments and the --- */
diff --git a/src/iemlib2/exp_inc.c b/src/iemlib2/exp_inc.c
index 9f3a935..3879200 100644
--- a/src/iemlib2/exp_inc.c
+++ b/src/iemlib2/exp_inc.c
@@ -5,10 +5,7 @@ iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
+
/* ------------------------ exp_inc ---------------------------- */
/* ------- exponetial/linear-incremental-bang-counter ---------- */
@@ -19,12 +16,12 @@ static t_class *exp_inc_class;
typedef struct _exp_inc
{
t_object x_obj;
- float x_initialval;
- float x_currentval;
- float x_mulfactor;
- float x_addincrement;
- float x_min;
- float x_max;
+ t_float x_initialval;
+ t_float x_currentval;
+ t_float x_mulfactor;
+ t_float x_addincrement;
+ t_float x_min;
+ t_float x_max;
} t_exp_inc;
static void exp_inc_bang(t_exp_inc *x)
@@ -48,7 +45,7 @@ static void exp_inc_reset(t_exp_inc *x)
static void exp_inc_float(t_exp_inc *x, t_floatarg f)
{
- x->x_initialval = (float)f;
+ x->x_initialval = (t_float)f;
x->x_currentval = x->x_initialval;
if(x->x_currentval < x->x_min)
x->x_currentval = x->x_min;
@@ -58,24 +55,24 @@ static void exp_inc_float(t_exp_inc *x, t_floatarg f)
static void exp_inc_ft1(t_exp_inc *x, t_floatarg f)
{
- x->x_mulfactor = 1.0 + 0.01*(float)f;
+ x->x_mulfactor = 1.0 + 0.01*(t_float)f;
}
static void exp_inc_ft2(t_exp_inc *x, t_floatarg f)
{
- x->x_addincrement = (float)f;
+ x->x_addincrement = (t_float)f;
}
static void exp_inc_ft3(t_exp_inc *x, t_floatarg f)
{
- x->x_min = (float)f;
+ x->x_min = (t_float)f;
if(x->x_currentval < x->x_min)
x->x_currentval = x->x_min;
}
static void exp_inc_ft4(t_exp_inc *x, t_floatarg f)
{
- x->x_max = (float)f;
+ x->x_max = (t_float)f;
if(x->x_currentval > x->x_max)
x->x_currentval = x->x_max;
}
diff --git a/src/iemlib2/float24.c b/src/iemlib2/float24.c
index 7c313fe..4f6d11a 100644
--- a/src/iemlib2/float24.c
+++ b/src/iemlib2/float24.c
@@ -18,7 +18,7 @@ iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005
typedef struct _float24
{
t_object x_obj;
- float x_arg;
+ t_float x_arg;
} t_float24;
static t_class *float24_class;
diff --git a/src/iemlib2/iem_anything.c b/src/iemlib2/iem_anything.c
index 158760c..bda7030 100644
--- a/src/iemlib2/iem_anything.c
+++ b/src/iemlib2/iem_anything.c
@@ -3,16 +3,8 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
/* ------------------------------- iem_anything ---------------------------------- */
/* -- storage object for any message (bang, float, symbol, list, selector-list) -- */
diff --git a/src/iemlib2/iem_append.c b/src/iemlib2/iem_append.c
index 9ccff3b..f7f817c 100644
--- a/src/iemlib2/iem_append.c
+++ b/src/iemlib2/iem_append.c
@@ -3,16 +3,8 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
/* ----------------------- iem_append -------------------------- */
diff --git a/src/iemlib2/iem_i_route.c b/src/iemlib2/iem_i_route.c
index 1538b51..f1c38a9 100644
--- a/src/iemlib2/iem_i_route.c
+++ b/src/iemlib2/iem_i_route.c
@@ -3,17 +3,10 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
+
/* -------------------------- iem_i_route ------------------------------ */
/* ---- routes a list beginning with a float to an outlet, which is ---- */
diff --git a/src/iemlib2/iem_pbank_csv.c b/src/iemlib2/iem_pbank_csv.c
index 5e413c3..d8a8821 100644
--- a/src/iemlib2/iem_pbank_csv.c
+++ b/src/iemlib2/iem_pbank_csv.c
@@ -3,10 +3,6 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
@@ -198,7 +194,7 @@ int iem_pbank_csv_text2atom(char *text, int text_size, t_atom **at_beg,
const char *textp = text, *etext = text + text_size;
int natom = 0;
t_atom *ap = *at_beg;
- float f;
+ t_float f;
while(1)
{
@@ -654,7 +650,7 @@ static void iem_pbank_csv_recall(t_iem_pbank_csv *x, t_symbol *s, int ac, t_atom
nrp = x->x_nr_para - beg;
atmem += x->x_nr_para * x->x_line + beg;
atbuf += beg;
- SETFLOAT(atout, (float)beg);
+ SETFLOAT(atout, (t_float)beg);
atout++;
for(i=0; i<nrp; i++)
{
@@ -725,7 +721,7 @@ static void iem_pbank_csv_list(t_iem_pbank_csv *x, t_symbol *s, int ac, t_atom *
}
}
-static void iem_pbank_csv_ft1(t_iem_pbank_csv *x, t_float fline_nr)
+static void iem_pbank_csv_ft1(t_iem_pbank_csv *x, t_floatarg fline_nr)
{
int line = (int)fline_nr;
diff --git a/src/iemlib2/iem_prepend.c b/src/iemlib2/iem_prepend.c
index f2810a2..ebea499 100644
--- a/src/iemlib2/iem_prepend.c
+++ b/src/iemlib2/iem_prepend.c
@@ -3,16 +3,10 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
+
/* ----------------------- iem_prepend --------------------------- */
/* -- concatenates message from cold (right) inlet with message -- */
@@ -51,7 +45,7 @@ static void iem_prepend_bang(t_iem_prepend *x)
outlet_anything(x->x_obj.ob_outlet, x->x_selector_sym, x->x_ac, x->x_at);
}
-static void iem_prepend_float(t_iem_prepend *x, t_float f)
+static void iem_prepend_float(t_iem_prepend *x, t_floatarg f)
{
if(x->x_selector_sym == &s_bang)
outlet_float(x->x_obj.ob_outlet, f);
@@ -127,7 +121,7 @@ static void iem_prepend_proxy_bang(t_iem_prepend_proxy *p)
x->x_selector_sym = &s_bang;
}
-static void iem_prepend_proxy_float(t_iem_prepend_proxy *p, t_float f)
+static void iem_prepend_proxy_float(t_iem_prepend_proxy *p, t_floatarg f)
{
t_iem_prepend *x = p->p_owner;
diff --git a/src/iemlib2/iem_receive.c b/src/iemlib2/iem_receive.c
index 309512b..4f8660c 100644
--- a/src/iemlib2/iem_receive.c
+++ b/src/iemlib2/iem_receive.c
@@ -3,10 +3,6 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
@@ -79,7 +75,7 @@ static void iem_receive_proxy_bang(t_iem_receive_proxy *p)
outlet_bang(x->x_obj.ob_outlet);
}
-static void iem_receive_proxy_float(t_iem_receive_proxy *p, t_float f)
+static void iem_receive_proxy_float(t_iem_receive_proxy *p, t_floatarg f)
{
t_iem_receive *x = p->p_owner;
diff --git a/src/iemlib2/iem_route.c b/src/iemlib2/iem_route.c
index ee4e261..5dd0f79 100644
--- a/src/iemlib2/iem_route.c
+++ b/src/iemlib2/iem_route.c
@@ -3,17 +3,10 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
+
/* -------------------------- iem_route ------------------------------ */
/* -------- like millers route, but can output bangs ----------------- */
@@ -79,7 +72,7 @@ static void iem_route_list(t_iem_route *x, t_symbol *sel, int argc, t_atom *argv
if (x->x_type == A_FLOAT)
{
- float f;
+ t_float f;
if(!argc)
return;
diff --git a/src/iemlib2/iem_sel_any.c b/src/iemlib2/iem_sel_any.c
index 930b33d..a75a086 100644
--- a/src/iemlib2/iem_sel_any.c
+++ b/src/iemlib2/iem_sel_any.c
@@ -3,10 +3,6 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
@@ -32,7 +28,7 @@ typedef struct _iem_sel_any
} t_iem_sel_any;
-static void iem_sel_any_float(t_iem_sel_any *x, t_float f)
+static void iem_sel_any_float(t_iem_sel_any *x, t_floatarg f)
{
int i = (int)f;
t_atom at;
@@ -82,7 +78,7 @@ static void iem_sel_any_free(t_iem_sel_any *x)
freebytes(x->x_any, x->x_max_ac * sizeof(t_symbol *));
}
-static void *iem_sel_any_new(t_float fmax)
+static void *iem_sel_any_new(t_floatarg fmax)
{
t_iem_sel_any *x = (t_iem_sel_any *)pd_new(iem_sel_any_class);
int i;
diff --git a/src/iemlib2/iem_send.c b/src/iemlib2/iem_send.c
index 16587b4..86087e1 100644
--- a/src/iemlib2/iem_send.c
+++ b/src/iemlib2/iem_send.c
@@ -3,10 +3,6 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
@@ -42,7 +38,7 @@ static void iem_send_bang(t_iem_send *x)
pd_bang(x->x_send_label_sym->s_thing);
}
-static void iem_send_float(t_iem_send *x, t_float f)
+static void iem_send_float(t_iem_send *x, t_floatarg f)
{
if(x->x_send_label_sym)
if(x->x_send_label_sym->s_thing)
diff --git a/src/iemlib2/iemlib2.c b/src/iemlib2/iemlib2.c
index bd5e758..3b31b4a 100644
--- a/src/iemlib2/iemlib2.c
+++ b/src/iemlib2/iemlib2.c
@@ -3,33 +3,9 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
-/*
-#include <ctype.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#ifndef _MSC_VER
-#include <sys/signal.h>
-#include <unistd.h>
-#endif
-#ifdef _MSC_VER
-#include <io.h>
-#endif
-*/
static t_class *iemlib2_class;
@@ -45,29 +21,24 @@ void bpe_setup(void);
void dollarg_setup(void);
void exp_inc_setup(void);
void float24_setup(void);
-void iem_anything_kernel_setup(void);
void iem_anything_setup(void);
-void iem_append_kernel_setup(void);
void iem_append_setup(void);
void iem_i_route_setup(void);
-void iem_prepend_kernel_setup(void);
-void iem_prepend_setup(void);
void iem_pbank_csv_setup(void);
-void iem_receive_kernel_setup(void);
+void iem_prepend_setup(void);
void iem_receive_setup(void);
-void iem_send_kernel_setup(void);
-void iem_send_setup(void);
void iem_route_setup(void);
void iem_sel_any_setup(void);
+void iem_send_setup(void);
void init_setup(void);
void list2send_setup(void);
void mergefilename_setup(void);
void modulo_counter_setup(void);
void parentdollarzero_setup(void);
+void post_netreceive_setup(void);
void pre_inlet_setup(void);
void prepend_ascii_setup(void);
void protect_against_open_setup(void);
-void post_netreceive_setup(void);
void receive2list_setup(void);
void round_zero_setup(void);
void sigfade_setup(void);
@@ -94,30 +65,25 @@ void iemlib2_setup(void)
dollarg_setup();
exp_inc_setup();
float24_setup();
- iem_anything_kernel_setup();
- iem_anything_setup();
- iem_append_kernel_setup();
- iem_append_setup();
+ iem_anything_setup();
+ iem_append_setup();
iem_i_route_setup();
iem_pbank_csv_setup();
- iem_prepend_kernel_setup();
- iem_prepend_setup();
- iem_receive_kernel_setup();
- iem_receive_setup();
- iem_send_kernel_setup();
- iem_send_setup();
+ iem_prepend_setup();
+ iem_receive_setup();
iem_route_setup();
iem_sel_any_setup();
+ iem_send_setup();
init_setup();
list2send_setup();
mergefilename_setup();
modulo_counter_setup();
parentdollarzero_setup();
+ post_netreceive_setup();
pre_inlet_setup();
prepend_ascii_setup();
protect_against_open_setup();
- post_netreceive_setup();
- receive2list_setup();
+ receive2list_setup();
round_zero_setup();
sigfade_setup();
sigiem_blocksize_setup();
diff --git a/src/iemlib2/init.c b/src/iemlib2/init.c
index 4fade88..8e0164d 100644
--- a/src/iemlib2/init.c
+++ b/src/iemlib2/init.c
@@ -3,17 +3,9 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
+
/* ------------------------ init ---------------------------- */
/* -------- a combination of loadbang and any --------------- */
@@ -52,7 +44,7 @@ static void init_loadbang(t_init *x)
init_bang(x);
}
-static void init_float(t_init *x, t_float f)
+static void init_float(t_init *x, t_floatarg f)
{
x->x_ac = 1;
SETFLOAT(x->x_at, f);
diff --git a/src/iemlib2/list2send.c b/src/iemlib2/list2send.c
index 6539e36..e6d3a21 100644
--- a/src/iemlib2/list2send.c
+++ b/src/iemlib2/list2send.c
@@ -3,17 +3,12 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
-#include <math.h>
/* ------------------------- list2send ----------------------------- */
/* -- via an array of send labels, an incomming list with leading -- */
@@ -217,7 +212,7 @@ static void list2send_free(t_list2send *x)
freebytes(x->x_send_entries, x->x_max * sizeof(t_symbol *));
}
-static void *list2send_new(t_float fmax)
+static void *list2send_new(t_floatarg fmax)
{
t_list2send *x = (t_list2send *)pd_new(list2send_class);
int i, max = (int)fmax;
diff --git a/src/iemlib2/makefile_linux b/src/iemlib2/makefile_linux
new file mode 100644
index 0000000..57bfe48
--- /dev/null
+++ b/src/iemlib2/makefile_linux
@@ -0,0 +1,82 @@
+current: all
+
+.SUFFIXES: .pd_linux
+
+INCLUDE = -I. -I/usr/local/src/pd/src
+
+LDFLAGS = -export-dynamic -shared
+LIB = -ldl -lm -lpthread
+
+#select either the DBG and OPT compiler flags below:
+
+CFLAGS = -DPD -DUNIX -W -Werror -Wno-unused \
+ -Wno-parentheses -Wno-switch -O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing \
+ -DDL_OPEN
+
+SYSTEM = $(shell uname -m)
+
+# the sources
+
+SRC = add2_comma.c \
+ bpe.c \
+ dollarg.c \
+ exp_inc.c \
+ float24.c \
+ iem_anything.c \
+ iem_append.c \
+ iem_i_route.c \
+ iem_pbank_csv.c \
+ iem_prepend.c \
+ iem_receive.c \
+ iem_route.c \
+ iem_sel_any.c \
+ iem_send.c \
+ init.c \
+ list2send.c \
+ mergefilename.c \
+ modulo_counter.c \
+ parentdollarzero.c \
+ post_netreceive.c \
+ pre_inlet.c \
+ prepend_ascii.c \
+ protect_against_open.c \
+ receive2list.c \
+ round_zero.c \
+ sigfade.c \
+ sigiem_blocksize.c \
+ sigiem_samplerate.c \
+ sigLFO_noise.c \
+ sigm2f.c \
+ speedlim.c \
+ splitfilename.c \
+ stripfilename.c \
+ toggle_mess.c \
+ transf_fader.c \
+ unsymbol.c \
+ wrap.c \
+ iemlib2.c
+
+TARGET = iemlib2.pd_linux
+
+
+OBJ = $(SRC:.c=.o)
+
+#
+# ------------------ targets ------------------------------------
+#
+
+clean:
+ rm $(TARGET)
+ rm *.o
+
+all: $(OBJ)
+ @echo :: $(OBJ)
+ $(LD) $(LDFLAGS) -o $(TARGET) *.o $(LIB)
+ strip --strip-unneeded $(TARGET)
+
+$(OBJ) : %.o : %.c
+ $(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $*.c
+
+
+
+
diff --git a/src/iemlib2/makefile_win b/src/iemlib2/makefile_win
index d98c04f..80822d2 100644
--- a/src/iemlib2/makefile_win
+++ b/src/iemlib2/makefile_win
@@ -17,48 +17,44 @@ PD_WIN_LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel /NOD
$(PD_INST_PATH)\bin\pd.lib
SRC = add2_comma.c \
- bpe.c \
- dollarg.c \
- exp_inc.c \
- float24.c \
- iem_anything_kernel.c \
- iem_anything.c \
- iem_append_kernel.c \
- iem_append.c \
- iem_i_route.c \
- iem_pbank_csv.c \
- iem_prepend_kernel.c \
- iem_prepend.c \
- iem_receive_kernel.c \
- iem_receive.c \
- iem_route.c \
- iem_sel_any.c \
- iem_send_kernel.c \
- iem_send.c \
- init.c \
- list2send.c \
- mergefilename.c \
- modulo_counter.c \
- parentdollarzero.c \
- post_netreceive.c \
- pre_inlet.c \
- prepend_ascii.c \
- protect_against_open.c \
- receive2list.c \
- round_zero.c \
- sigfade.c \
- sigiem_blocksize.c \
- sigiem_samplerate.c \
- sigLFO_noise.c \
- sigm2f.c \
- speedlim.c \
- splitfilename.c \
- stripfilename.c \
- toggle_mess.c \
- transf_fader.c \
- unsymbol.c \
- wrap.c \
- iemlib2.c
+ bpe.c \
+ dollarg.c \
+ exp_inc.c \
+ float24.c \
+ iem_anything.c \
+ iem_append.c \
+ iem_i_route.c \
+ iem_pbank_csv.c \
+ iem_prepend_kernel.c \
+ iem_prepend.c \
+ iem_receive.c \
+ iem_route.c \
+ iem_sel_any.c \
+ iem_send.c \
+ init.c \
+ list2send.c \
+ mergefilename.c \
+ modulo_counter.c \
+ parentdollarzero.c \
+ post_netreceive.c \
+ pre_inlet.c \
+ prepend_ascii.c \
+ protect_against_open.c \
+ receive2list.c \
+ round_zero.c \
+ sigfade.c \
+ sigiem_blocksize.c \
+ sigiem_samplerate.c \
+ sigLFO_noise.c \
+ sigm2f.c \
+ speedlim.c \
+ splitfilename.c \
+ stripfilename.c \
+ toggle_mess.c \
+ transf_fader.c \
+ unsymbol.c \
+ wrap.c \
+ iemlib2.c
OBJ = $(SRC:.c=.obj)
diff --git a/src/iemlib2/mergefilename.c b/src/iemlib2/mergefilename.c
index 509b8e0..08071ec 100644
--- a/src/iemlib2/mergefilename.c
+++ b/src/iemlib2/mergefilename.c
@@ -3,17 +3,13 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
-#include <math.h>
+
/* -------------------------- mergefilename ------------------------------ */
/* ------------ concatenates a list of symbols to one symbol ------------- */
diff --git a/src/iemlib2/modulo_counter.c b/src/iemlib2/modulo_counter.c
index 65bfb17..d009293 100644
--- a/src/iemlib2/modulo_counter.c
+++ b/src/iemlib2/modulo_counter.c
@@ -3,17 +3,8 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
/* ---------------- modulo-counter. ----------------- */
/* -------- counter increments if input a bang ------ */
@@ -34,7 +25,7 @@ static void modulo_counter_bang(t_modulo_counter *x)
x->x_cur = x->x_cur % x->x_max;
}
-static void modulo_counter_float(t_modulo_counter *x, t_float max)
+static void modulo_counter_float(t_modulo_counter *x, t_floatarg max)
{
int i = (int)max;
@@ -45,7 +36,7 @@ static void modulo_counter_float(t_modulo_counter *x, t_float max)
x->x_max = i;
}
-static void modulo_counter_ft1(t_modulo_counter *x, t_float set_init)
+static void modulo_counter_ft1(t_modulo_counter *x, t_floatarg set_init)
{
int i = (int)set_init;
diff --git a/src/iemlib2/parentdollarzero.c b/src/iemlib2/parentdollarzero.c
index 7a70a88..a486ca3 100644
--- a/src/iemlib2/parentdollarzero.c
+++ b/src/iemlib2/parentdollarzero.c
@@ -3,18 +3,11 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "g_canvas.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
+
/* -------------- parentdollarzero --------------- */
/* -- receives the $0 value of the parent canvas --*/
diff --git a/src/iemlib2/post_netreceive.c b/src/iemlib2/post_netreceive.c
index 14b4bde..f96355e 100644
--- a/src/iemlib2/post_netreceive.c
+++ b/src/iemlib2/post_netreceive.c
@@ -3,17 +3,10 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2004 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
+
/* ------------------------ post_netreceive ---------------------------- */
static t_class *post_netreceive_class;
@@ -171,7 +164,7 @@ static void post_netreceive_clear(t_post_netreceive *x)
}
}
-static void post_netreceive_fetch_all_parameters(t_post_netreceive *x, t_float nr_sended_para)
+static void post_netreceive_fetch_all_parameters(t_post_netreceive *x, t_floatarg nr_sended_para)
{
int nrsp=(int)nr_sended_para;
t_atom *ap=x->x_atbuf+x->x_min_send_entries;
@@ -191,7 +184,7 @@ static void post_netreceive_free(t_post_netreceive *x)
freebytes(x->x_plus_entries, x->x_max_send_entries * sizeof(t_symbol *));
}
-static void *post_netreceive_new(t_float fmin, t_float fmax)
+static void *post_netreceive_new(t_floatarg fmin, t_floatarg fmax)
{
t_post_netreceive *x = (t_post_netreceive *)pd_new(post_netreceive_class);
int i, min = (int)fmin, max = (int)fmax;
diff --git a/src/iemlib2/pre_inlet.c b/src/iemlib2/pre_inlet.c
index a6269d3..13427fa 100644
--- a/src/iemlib2/pre_inlet.c
+++ b/src/iemlib2/pre_inlet.c
@@ -3,17 +3,9 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
+
/* ------------------------ pre_inlet ---------------------------- */
/* --------- any incoming message produce additionally a --------- */
@@ -38,7 +30,7 @@ static void pre_inlet_bang(t_pre_inlet *x)
outlet_bang(x->x_obj.ob_outlet);
}
-static void pre_inlet_float(t_pre_inlet *x, t_float f)
+static void pre_inlet_float(t_pre_inlet *x, t_floatarg f)
{
outlet_anything(x->x_obj.ob_outlet, x->x_sym, 1, &x->x_at);
outlet_float(x->x_obj.ob_outlet, f);
diff --git a/src/iemlib2/prepend_ascii.c b/src/iemlib2/prepend_ascii.c
index 773adc0..8ea47b0 100644
--- a/src/iemlib2/prepend_ascii.c
+++ b/src/iemlib2/prepend_ascii.c
@@ -3,17 +3,9 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
/* ------------------------- prepend_ascii ---------------------------- */
/* -- this object prepends to any incoming message a selector symbol -- */
@@ -42,7 +34,7 @@ static void prepend_ascii_bang(t_prepend_ascii *x)
outlet_anything(x->x_obj.ob_outlet, x->x_sym, x->x_ac, x->x_at);
}
-static void prepend_ascii_float(t_prepend_ascii *x, t_float f)
+static void prepend_ascii_float(t_prepend_ascii *x, t_floatarg f)
{
SETFLOAT(x->x_at+x->x_ac, f);
outlet_anything(x->x_obj.ob_outlet, x->x_sym, x->x_ac+1, x->x_at);
diff --git a/src/iemlib2/protect_against_open.c b/src/iemlib2/protect_against_open.c
index dc78878..358d444 100644
--- a/src/iemlib2/protect_against_open.c
+++ b/src/iemlib2/protect_against_open.c
@@ -3,10 +3,6 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
diff --git a/src/iemlib2/receive2list.c b/src/iemlib2/receive2list.c
index 1849bdd..0be6645 100644
--- a/src/iemlib2/receive2list.c
+++ b/src/iemlib2/receive2list.c
@@ -3,11 +3,6 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
#include "m_pd.h"
#include "iemlib.h"
#include <stdlib.h>
@@ -101,7 +96,7 @@ static void receive2list_proxy_bang(t_receive2list_proxy *p)
outlet_list(x->x_obj.ob_outlet, &s_list, 1, x->x_at);
}
-static void receive2list_proxy_float(t_receive2list_proxy *p, t_float f)
+static void receive2list_proxy_float(t_receive2list_proxy *p, t_floatarg f)
{
t_receive2list *x = p->p_owner;
@@ -178,7 +173,7 @@ static void receive2list_free(t_receive2list *x)
freebytes(x->x_at, x->x_size * sizeof(t_atom));
}
-static void *receive2list_new(t_float fmax)
+static void *receive2list_new(t_floatarg fmax)
{
t_receive2list *x = (t_receive2list *)pd_new(receive2list_class);
t_receive2list_proxy *p;
diff --git a/src/iemlib2/round_zero.c b/src/iemlib2/round_zero.c
index 8dee50d..a802dda 100644
--- a/src/iemlib2/round_zero.c
+++ b/src/iemlib2/round_zero.c
@@ -3,16 +3,8 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
-
#include "m_pd.h"
#include "iemlib.h"
-#include <stdio.h>
-#include <string.h>
/* ------------------------ round_zero ---------------------------- */
diff --git a/src/iemlib2/sigLFO_noise.c b/src/iemlib2/sigLFO_noise.c
index daf035c..0547dfe 100644
--- a/src/iemlib2/sigLFO_noise.c
+++ b/src/iemlib2/sigLFO_noise.c
@@ -3,16 +3,10 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
+
/* -------------------- LFO_noise~ --------------------- */
/* ---- outputs a 2 point interpolated white noise ----- */
@@ -26,11 +20,11 @@ typedef struct _sigLFO_noise
double x_range;
double x_rcp_range;
unsigned int x_state;
- float x_fact;
- float x_incr;
- float x_y1;
- float x_y2;
- float x_phase;
+ t_float x_fact;
+ t_float x_incr;
+ t_float x_y1;
+ t_float x_y2;
+ t_float x_phase;
} t_sigLFO_noise;
static int sigLFO_noise_makeseed(void)
@@ -79,10 +73,10 @@ static t_int *sigLFO_noise_perform(t_int *w)
t_float *out = (t_float *)(w[1]);
t_sigLFO_noise *x = (t_sigLFO_noise *)(w[2]);
int n = (int)(w[3]);
- float phase = x->x_phase;
- float x_y1 = x->x_y1;
- float x_y2 = x->x_y2;
- float incr = x->x_incr;
+ t_float phase = x->x_phase;
+ t_float x_y1 = x->x_y1;
+ t_float x_y2 = x->x_y2;
+ t_float incr = x->x_incr;
while(n--)
{
@@ -101,7 +95,7 @@ static t_int *sigLFO_noise_perform(t_int *w)
return (w+4);
}
-static void sigLFO_noise_float(t_sigLFO_noise *x, t_float freq)
+static void sigLFO_noise_float(t_sigLFO_noise *x, t_floatarg freq)
{
x->x_incr = freq * x->x_fact;
if(x->x_incr < 0.0)
diff --git a/src/iemlib2/sigfade.c b/src/iemlib2/sigfade.c
index bb0e4b5..a73a3a7 100644
--- a/src/iemlib2/sigfade.c
+++ b/src/iemlib2/sigfade.c
@@ -3,16 +3,8 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
#include <math.h>
/* ------------------------- fade~ ----------------------------- */
@@ -32,13 +24,13 @@ static t_class *sigfade_class;
typedef struct _sigfade
{
t_object x_obj;
- float *x_table;
- float x_f;
+ t_float *x_table;
+ t_float x_f;
} t_sigfade;
static void sigfade_set(t_sigfade *x, t_symbol *s)
{
- if(!strcmp(s->s_name, "_lin"))
+ /*if(!strcmp(s->s_name, "_lin"))
x->x_table = iem_fade_table_lin;
else if(!strcmp(s->s_name, "_linsqrt"))
x->x_table = iem_fade_table_linsqrt;
@@ -49,6 +41,18 @@ static void sigfade_set(t_sigfade *x, t_symbol *s)
else if(!strcmp(s->s_name, "_sinhann"))
x->x_table = iem_fade_table_sinhann;
else if(!strcmp(s->s_name, "_hann"))
+ x->x_table = iem_fade_table_hann;*/
+ if(s == gensym("_lin"))
+ x->x_table = iem_fade_table_lin;
+ else if(s == gensym("_linsqrt"))
+ x->x_table = iem_fade_table_linsqrt;
+ else if(s == gensym("_sqrt"))
+ x->x_table = iem_fade_table_sqrt;
+ else if(s == gensym("_sin"))
+ x->x_table = iem_fade_table_sin;
+ else if(s == gensym("_sinhann"))
+ x->x_table = iem_fade_table_sinhann;
+ else if(s == gensym("_hann"))
x->x_table = iem_fade_table_hann;
}
@@ -68,7 +72,7 @@ static t_int *sigfade_perform(t_int *w)
t_float *out = (t_float *)(w[2]);
t_sigfade *x = (t_sigfade *)(w[3]);
int n = (int)(w[4]);
- float *tab = x->x_table, *addr, f1, f2, frac;
+ t_float *tab = x->x_table, *addr, f1, f2, frac;
double dphase;
int normhipart;
union tabfudge tf;
@@ -79,7 +83,7 @@ static t_int *sigfade_perform(t_int *w)
#if 0 /* this is the readable version of the code. */
while (n--)
{
- dphase = (double)(*in++ * (float)(COSTABSIZE) * 0.99999) + UNITBIT32;
+ dphase = (double)(*in++ * (t_float)(COSTABSIZE) * 0.99999) + UNITBIT32;
tf.tf_d = dphase;
addr = tab + (tf.tf_i[HIOFFSET] & (COSTABSIZE-1));
tf.tf_i[HIOFFSET] = normhipart;
@@ -90,13 +94,13 @@ static t_int *sigfade_perform(t_int *w)
}
#endif
#if 1 /* this is the same, unwrapped by hand. */
- dphase = (double)(*in++ * (float)(COSTABSIZE) * 0.99999) + UNITBIT32;
+ dphase = (double)(*in++ * (t_float)(COSTABSIZE) * 0.99999) + UNITBIT32;
tf.tf_d = dphase;
addr = tab + (tf.tf_i[HIOFFSET] & (COSTABSIZE-1));
tf.tf_i[HIOFFSET] = normhipart;
while (--n)
{
- dphase = (double)(*in++ * (float)(COSTABSIZE) * 0.99999) + UNITBIT32;
+ dphase = (double)(*in++ * (t_float)(COSTABSIZE) * 0.99999) + UNITBIT32;
frac = tf.tf_d - UNITBIT32;
tf.tf_d = dphase;
f1 = addr[0];
@@ -121,18 +125,18 @@ static void sigfade_dsp(t_sigfade *x, t_signal **sp)
static void sigfade_maketable(void)
{
int i;
- float *fp, phase, fff,phsinc = 0.5*3.141592653 / ((float)COSTABSIZE*0.99999);
+ t_float *fp, phase, fff,phsinc = 0.5*3.141592653 / ((t_float)COSTABSIZE*0.99999);
union tabfudge tf;
if(!iem_fade_table_sin)
{
- iem_fade_table_sin = (float *)getbytes(sizeof(float) * (COSTABSIZE+1));
+ iem_fade_table_sin = (t_float *)getbytes(sizeof(t_float) * (COSTABSIZE+1));
for(i=COSTABSIZE+1, fp=iem_fade_table_sin, phase=0; i--; fp++, phase+=phsinc)
*fp = sin(phase);
}
if(!iem_fade_table_sinhann)
{
- iem_fade_table_sinhann = (float *)getbytes(sizeof(float) * (COSTABSIZE+1));
+ iem_fade_table_sinhann = (t_float *)getbytes(sizeof(t_float) * (COSTABSIZE+1));
for(i=COSTABSIZE+1, fp=iem_fade_table_sinhann, phase=0; i--; fp++, phase+=phsinc)
{
fff = sin(phase);
@@ -141,29 +145,29 @@ static void sigfade_maketable(void)
}
if(!iem_fade_table_hann)
{
- iem_fade_table_hann = (float *)getbytes(sizeof(float) * (COSTABSIZE+1));
+ iem_fade_table_hann = (t_float *)getbytes(sizeof(t_float) * (COSTABSIZE+1));
for(i=COSTABSIZE+1, fp=iem_fade_table_hann, phase=0; i--; fp++, phase+=phsinc)
{
fff = sin(phase);
*fp = fff*fff;
}
}
- phsinc = 1.0 / ((float)COSTABSIZE*0.99999);
+ phsinc = 1.0 / ((t_float)COSTABSIZE*0.99999);
if(!iem_fade_table_lin)
{
- iem_fade_table_lin = (float *)getbytes(sizeof(float) * (COSTABSIZE+1));
+ iem_fade_table_lin = (t_float *)getbytes(sizeof(t_float) * (COSTABSIZE+1));
for(i=COSTABSIZE+1, fp=iem_fade_table_lin, phase=0; i--; fp++, phase+=phsinc)
*fp = phase;
}
if(!iem_fade_table_linsqrt)
{
- iem_fade_table_linsqrt = (float *)getbytes(sizeof(float) * (COSTABSIZE+1));
+ iem_fade_table_linsqrt = (t_float *)getbytes(sizeof(t_float) * (COSTABSIZE+1));
for(i=COSTABSIZE+1, fp=iem_fade_table_linsqrt, phase=0; i--; fp++, phase+=phsinc)
*fp = pow(phase, 0.75);
}
if(!iem_fade_table_sqrt)
{
- iem_fade_table_sqrt = (float *)getbytes(sizeof(float) * (COSTABSIZE+1));
+ iem_fade_table_sqrt = (t_float *)getbytes(sizeof(t_float) * (COSTABSIZE+1));
for(i=COSTABSIZE+1, fp=iem_fade_table_sqrt, phase=0; i--; fp++, phase+=phsinc)
*fp = sqrt(phase);
}
diff --git a/src/iemlib2/sigiem_blocksize.c b/src/iemlib2/sigiem_blocksize.c
index eae00ed..46ba275 100644
--- a/src/iemlib2/sigiem_blocksize.c
+++ b/src/iemlib2/sigiem_blocksize.c
@@ -3,14 +3,9 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
/* ------------------- iem_blocksize~ -------------------- */
/* -- outputs the current signal-blocksize of a window --- */
diff --git a/src/iemlib2/sigiem_samplerate.c b/src/iemlib2/sigiem_samplerate.c
index 1fe9e10..7f9e86b 100644
--- a/src/iemlib2/sigiem_samplerate.c
+++ b/src/iemlib2/sigiem_samplerate.c
@@ -3,14 +3,9 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
/* --------------- iem_samplerate~ ----------------- */
/* -- outputs the current samplerate of a window --- */
diff --git a/src/iemlib2/sigm2f.c b/src/iemlib2/sigm2f.c
index f4a158c..e6d3c26 100644
--- a/src/iemlib2/sigm2f.c
+++ b/src/iemlib2/sigm2f.c
@@ -3,16 +3,9 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
#include <math.h>
/* ----------- m2f~ ----------- */
@@ -20,14 +13,14 @@ iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005
#define M2FTABSIZE 2048
-float *iem_m2f_table=(float *)0L;
+t_float *iem_m2f_table=(t_float *)0L;
static t_class *sigm2f_class;
typedef struct _sigm2f
{
t_object x_obj;
- float x_msi;
+ t_float x_msi;
} t_sigm2f;
static void *sigm2f_new(void)
@@ -44,7 +37,7 @@ static t_int *sigm2f_perform(t_int *w)
t_float *out = (t_float *)(w[2]);
t_sigm2f *x = (t_sigm2f *)(w[3]);
int n = (int)(w[4]);
- float *tab = iem_m2f_table, *addr, f1, f2, frac, iinn;
+ t_float *tab = iem_m2f_table, *addr, f1, f2, frac, iinn;
double dphase;
int normhipart;
union tabfudge tf;
@@ -104,9 +97,9 @@ static void sigm2f_maketable(void)
if(!iem_m2f_table)
{
int i;
- float *fp, midi, refexp=440.0*exp(-5.75*log(2.0));
+ t_float *fp, midi, refexp=440.0*exp(-5.75*log(2.0));
- iem_m2f_table = (float *)getbytes(sizeof(float) * (M2FTABSIZE+1));
+ iem_m2f_table = (t_float *)getbytes(sizeof(t_float) * (M2FTABSIZE+1));
for(i=0, fp=iem_m2f_table, midi=-67.0; i<=M2FTABSIZE; i++, fp++, midi+=0.1)
*fp = refexp * exp(0.057762265047 * midi);
}
diff --git a/src/iemlib2/speedlim.c b/src/iemlib2/speedlim.c
index 9e29e0a..d0224fc 100644
--- a/src/iemlib2/speedlim.c
+++ b/src/iemlib2/speedlim.c
@@ -3,16 +3,9 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
/* ----------------------- speedlim -------------------------- */
/* -- reduces the flow of float-messages to one message per -- */
@@ -27,8 +20,8 @@ typedef struct _speedlim
float x_delay;
int x_output_is_locked;
int x_there_was_n_event;
- float x_curval;
- float x_lastout;
+ t_float x_curval;
+ t_float x_lastout;
} t_speedlim;
static void speedlim_stop(t_speedlim *x)
@@ -54,7 +47,7 @@ static void speedlim_tick(t_speedlim *x)
}
}
-static void speedlim_float(t_speedlim *x, t_float val)
+static void speedlim_float(t_speedlim *x, t_floatarg val)
{
x->x_curval = val;
if(!x->x_output_is_locked)
@@ -68,7 +61,7 @@ static void speedlim_float(t_speedlim *x, t_float val)
x->x_there_was_n_event = 1;
}
-static void speedlim_ft1(t_speedlim *x, t_float delay)
+static void speedlim_ft1(t_speedlim *x, t_floatarg delay)
{
if(delay < 0.0)
delay = 0.0;
@@ -80,7 +73,7 @@ static void speedlim_free(t_speedlim *x)
clock_free(x->x_clock);
}
-static void *speedlim_new(t_float delay)
+static void *speedlim_new(t_floatarg delay)
{
t_speedlim *x = (t_speedlim *)pd_new(speedlim_class);
diff --git a/src/iemlib2/splitfilename.c b/src/iemlib2/splitfilename.c
index 7de68f4..5646178 100644
--- a/src/iemlib2/splitfilename.c
+++ b/src/iemlib2/splitfilename.c
@@ -3,17 +3,11 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
#include <string.h>
-#include <stdio.h>
-#include <math.h>
+
/* ----------------------- splitfilename -------------------------- */
/* -- splits a symbol into 2 parts (path + file) at the position -- */
diff --git a/src/iemlib2/stripfilename.c b/src/iemlib2/stripfilename.c
index d6a138f..82dc70b 100644
--- a/src/iemlib2/stripfilename.c
+++ b/src/iemlib2/stripfilename.c
@@ -3,16 +3,9 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
#include <string.h>
-#include <stdio.h>
/* -------------------------- stripfilename ----------------------- */
/* -- strips the first n or last n characters, depending on sign -- */
diff --git a/src/iemlib2/toggle_mess.c b/src/iemlib2/toggle_mess.c
index ac35100..c884064 100644
--- a/src/iemlib2/toggle_mess.c
+++ b/src/iemlib2/toggle_mess.c
@@ -3,16 +3,9 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
/* ------------------------ toggle_mess ---------------------------- */
/* -- inital arguments building a set of messages, any incomming --- */
@@ -36,7 +29,7 @@ static void toggle_mess_bang(t_toggle_mess *x)
{
int i = x->x_index;
- outlet_float(x->x_out_rght_flt, (float)i);
+ outlet_float(x->x_out_rght_flt, (t_float)i);
if(IS_A_FLOAT(x->x_at, i))
outlet_float(x->x_out_mid_sym, atom_getfloat(&x->x_at[i]));
else
@@ -44,7 +37,7 @@ static void toggle_mess_bang(t_toggle_mess *x)
outlet_anything(x->x_obj.ob_outlet, x->x_set, 1, &x->x_at[i]);
}
-static void toggle_mess_float(t_toggle_mess *x, t_float f)
+static void toggle_mess_float(t_toggle_mess *x, t_floatarg f)
{
x->x_index++;
if(x->x_index >= x->x_ac)
diff --git a/src/iemlib2/transf_fader.c b/src/iemlib2/transf_fader.c
index b545f62..1243a1c 100644
--- a/src/iemlib2/transf_fader.c
+++ b/src/iemlib2/transf_fader.c
@@ -3,16 +3,9 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
#include "m_pd.h"
#include "iemlib.h"
-#include <stdio.h>
-#include <string.h>
/* ------------------------ transf_fader ----------------------- */
@@ -24,7 +17,7 @@ typedef struct _transf_fader
t_object x_obj;
int x_size;
int x_message;
- float *x_array;
+ t_float *x_array;
} t_transf_fader;
static t_class *transf_fader_class;
@@ -38,12 +31,12 @@ static void transf_fader_pairs(t_transf_fader *x, t_symbol *s, int argc, t_atom
int i_prev=0;
int first=1;
int i_delta;
- float val_delta;
- float delta;
- float val_prev=0.0f;
- float val=0.0f;
- float *vec=x->x_array;
- float fad_in, fad_out;
+ t_float val_delta;
+ t_float delta;
+ t_float val_prev=0.0f;
+ t_float val=0.0f;
+ t_float *vec=x->x_array;
+ t_float fad_in, fad_out;
for(j=0; j<n; j++)
{
@@ -84,10 +77,10 @@ static void transf_fader_pairs(t_transf_fader *x, t_symbol *s, int argc, t_atom
val_delta = val - val_prev;
if(i_delta > 1)
{
- delta = val_delta / (float)i_delta;
+ delta = val_delta / (t_float)i_delta;
for(k=i_prev+1; k<i; k++)
{
- vec[k] = val_prev + delta*(float)(k - i_prev);
+ vec[k] = val_prev + delta*(t_float)(k - i_prev);
}
}
i_prev = i;
@@ -105,9 +98,9 @@ static void transf_fader_pairs(t_transf_fader *x, t_symbol *s, int argc, t_atom
static void transf_fader_float(t_transf_fader *x, t_floatarg fad_in)
{
- float fad_out;
- float *vec=x->x_array;
- float fract;
+ t_float fad_out;
+ t_float *vec=x->x_array;
+ t_float fract;
int i;
while(fad_in < 0.0f)
@@ -116,7 +109,7 @@ static void transf_fader_float(t_transf_fader *x, t_floatarg fad_in)
fad_in = 999.0f;
i = (int)fad_in;
- fract = fad_in - (float)i;
+ fract = fad_in - (t_float)i;
fad_out = vec[i] + fract*(vec[i+1] - vec[i]);
if(fad_out > -123455.0f)
outlet_float(x->x_obj.ob_outlet, fad_out);
@@ -124,7 +117,7 @@ static void transf_fader_float(t_transf_fader *x, t_floatarg fad_in)
static void transf_fader_free(t_transf_fader *x)
{
- freebytes(x->x_array, x->x_size * sizeof(float));
+ freebytes(x->x_array, x->x_size * sizeof(t_float));
}
static void *transf_fader_new(t_symbol *s, int argc, t_atom *argv)
@@ -134,7 +127,7 @@ static void *transf_fader_new(t_symbol *s, int argc, t_atom *argv)
x->x_size = 1001;
x->x_message = 0;
- x->x_array = (float *)getbytes(x->x_size * sizeof(float));
+ x->x_array = (t_float *)getbytes(x->x_size * sizeof(t_float));
n = x->x_size;
for(i=0; i<n; i++)
x->x_array[i] = -123456.0f;
diff --git a/src/iemlib2/unsymbol.c b/src/iemlib2/unsymbol.c
index ee5fd80..93fffeb 100644
--- a/src/iemlib2/unsymbol.c
+++ b/src/iemlib2/unsymbol.c
@@ -3,16 +3,8 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
#include "m_pd.h"
#include "iemlib.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
/* ----------- unsymbol ------------------------- */
/* -- converts a symbol to an anything message -- */
diff --git a/src/iemlib2/wrap.c b/src/iemlib2/wrap.c
index 6862639..7e701b8 100644
--- a/src/iemlib2/wrap.c
+++ b/src/iemlib2/wrap.c
@@ -3,10 +3,6 @@
iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
-#ifdef _MSC_VER
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
#include "m_pd.h"
#include "iemlib.h"
@@ -20,7 +16,7 @@ iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005
typedef struct _wrap
{
t_object x_obj;
- float x_f;
+ t_float x_f;
} t_wrap;
static t_class *wrap_class;
@@ -30,14 +26,14 @@ static void wrap_bang(t_wrap *x)
outlet_float(x->x_obj.ob_outlet, x->x_f);
}
-static void wrap_float(t_wrap *x, t_float f)
+static void wrap_float(t_wrap *x, t_floatarg f)
{
int i=(int)f;
if(f > 0.0)
- x->x_f = f - (float)i;
+ x->x_f = f - (t_float)i;
else
- x->x_f = f - (float)(i - 1);
+ x->x_f = f - (t_float)(i - 1);
wrap_bang(x);
}