Commit b1bf43a3 authored by Jonathan Wilkes's avatar Jonathan Wilkes

use static functions to protect from namespace pollution

parent 52319ac3
...@@ -17,13 +17,13 @@ typedef struct _counter ...@@ -17,13 +17,13 @@ typedef struct _counter
short direction; short direction;
} t_counter; } t_counter;
void *counter_new(t_symbol *s, int argc, t_atom *argv); static void *counter_new(t_symbol *s, int argc, t_atom *argv);
t_int *counter_perform(t_int *w); t_int *counter_perform(t_int *w);
void counter_dsp(t_counter *x, t_signal **sp); static void counter_dsp(t_counter *x, t_signal **sp);
void counter_setnext(t_counter *x, t_floatarg val); static void counter_setnext(t_counter *x, t_floatarg val);
void counter_direction(t_counter *x, t_floatarg d); static void counter_direction(t_counter *x, t_floatarg d);
void counter_minmax(t_counter *x, t_floatarg min, t_floatarg max); static void counter_minmax(t_counter *x, t_floatarg min, t_floatarg max);
void counter_version(t_counter *x); static void counter_version(t_counter *x);
void counter_tilde_setup(void) void counter_tilde_setup(void)
{ {
...@@ -38,21 +38,21 @@ void counter_tilde_setup(void) ...@@ -38,21 +38,21 @@ void counter_tilde_setup(void)
potpourri_announce(OBJECT_NAME); potpourri_announce(OBJECT_NAME);
} }
void counter_setnext(t_counter *x, t_floatarg val) static void counter_setnext(t_counter *x, t_floatarg val)
{ {
if( val < x->min || val > x->max) if( val < x->min || val > x->max)
return; return;
x->current = (long) val; x->current = (long) val;
} }
void counter_direction(t_counter *x, t_floatarg d) static void counter_direction(t_counter *x, t_floatarg d)
{ {
if( (d != COUNTER_UP) && (d != COUNTER_DOWN) ) if( (d != COUNTER_UP) && (d != COUNTER_DOWN) )
return; return;
x->direction = (short) d; x->direction = (short) d;
} }
void counter_minmax(t_counter *x, t_floatarg min, t_floatarg max) static void counter_minmax(t_counter *x, t_floatarg min, t_floatarg max)
{ {
if(min < 1){ if(min < 1){
return; return;
...@@ -64,7 +64,7 @@ void counter_minmax(t_counter *x, t_floatarg min, t_floatarg max) ...@@ -64,7 +64,7 @@ void counter_minmax(t_counter *x, t_floatarg min, t_floatarg max)
x->max = max; x->max = max;
} }
void *counter_new(t_symbol *s, int argc, t_atom *argv) static void *counter_new(t_symbol *s, int argc, t_atom *argv)
{ {
float farg; float farg;
t_symbol *fraud; t_symbol *fraud;
...@@ -86,7 +86,7 @@ void *counter_new(t_symbol *s, int argc, t_atom *argv) ...@@ -86,7 +86,7 @@ void *counter_new(t_symbol *s, int argc, t_atom *argv)
return x; return x;
} }
t_int *counter_perform(t_int *w) static t_int *counter_perform(t_int *w)
{ {
t_counter *x = (t_counter *) (w[1]); t_counter *x = (t_counter *) (w[1]);
t_float *in_vec = (t_float *)(w[2]); t_float *in_vec = (t_float *)(w[2]);
...@@ -121,7 +121,7 @@ t_int *counter_perform(t_int *w) ...@@ -121,7 +121,7 @@ t_int *counter_perform(t_int *w)
return w + 5; return w + 5;
} }
void counter_dsp(t_counter *x, t_signal **sp) static void counter_dsp(t_counter *x, t_signal **sp)
{ {
dsp_add(counter_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); dsp_add(counter_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment