diff options
-rw-r--r-- | src/dfreq~.c | 4 | ||||
-rw-r--r-- | src/index.c | 6 | ||||
-rw-r--r-- | src/limiter~.c | 27 | ||||
-rw-r--r-- | src/lpt.c | 4 | ||||
-rw-r--r-- | src/makesymbol.c | 4 | ||||
-rw-r--r-- | src/pdf~.c | 4 | ||||
-rw-r--r-- | src/prime.c | 6 | ||||
-rw-r--r-- | src/quantize~.c | 4 | ||||
-rw-r--r-- | src/sfplay.c | 8 | ||||
-rw-r--r-- | src/sfrecord.c | 8 | ||||
-rw-r--r-- | src/sigzero~.c | 4 | ||||
-rw-r--r-- | src/wrap.c | 8 | ||||
-rw-r--r-- | src/zexy.c | 2 |
13 files changed, 36 insertions, 53 deletions
diff --git a/src/dfreq~.c b/src/dfreq~.c index 70b1ce5..09ebfa6 100644 --- a/src/dfreq~.c +++ b/src/dfreq~.c @@ -91,7 +91,7 @@ static void *dfreq_new(void) return (x); } -static void helper(void) +static void dfreq_tilde_helper(void) { post("\n%c dfreq~\t :: pitch-detector that counts zero-crossings", HEARTSYMBOL); post("\noutputs a frequency estimate as a stream~ that will be updated every zero-X"); @@ -106,7 +106,7 @@ void dfreq_tilde_setup(void) class_addmethod(dfreq_class, nullfn, gensym("signal"), 0); class_addmethod(dfreq_class, (t_method)dfreq_dsp, gensym("dsp"), 0); - class_addmethod(dfreq_class, (t_method)helper, gensym("help"), 0); + class_addmethod(dfreq_class, (t_method)dfreq_tilde_helper, gensym("help"), 0); class_sethelpsymbol(dfreq_class, gensym("zexy/dfreq~")); zexy_register("dfreq~"); } diff --git a/src/index.c b/src/index.c index 15d3a2b..53980d0 100644 --- a/src/index.c +++ b/src/index.c @@ -52,7 +52,7 @@ typedef struct _index } t_index; /************************************ - * helpers + * index_helpers */ @@ -320,7 +320,7 @@ static void index_free(t_index *x) } -static void helper(t_index *x) +static void index_helper(t_index *x) { post("\n%c index :: index symbols to indices", HEARTSYMBOL); post("<symbol> : look up the <symbol> in the index and return it's index\n" @@ -364,7 +364,7 @@ void index_setup(void) class_addmethod(index_class, (t_method)index_compact, gensym("compact"), 0); class_addmethod(index_class, (t_method)index_dump, gensym("dump"), 0); - class_addmethod(index_class, (t_method)helper, gensym("help"), 0); + class_addmethod(index_class, (t_method)index_helper, gensym("help"), 0); class_sethelpsymbol(index_class, gensym("zexy/index")); zexy_register("index"); } diff --git a/src/limiter~.c b/src/limiter~.c index ea610c9..58fa15d 100644 --- a/src/limiter~.c +++ b/src/limiter~.c @@ -315,7 +315,7 @@ static void status(t_limiter *x) } } -static void helper(t_limiter *x) +static void limiter_tilde_helper(t_limiter *x) { post("\n\n%c %d-channel limiter-object: mode %d", HEARTSYMBOL, x->number_of_inlets, x->mode); poststring("\n'mode <mode>'\t\t\t: (0_limiter, 1_crack-limiter, 2_compressor)"); @@ -569,24 +569,7 @@ static t_int *limiter_perform(t_int *w) } -#if 0 -static t_int *route_through(t_int *w) -{ - t_float *in = (t_float *)w[1]; - t_float *out = (t_float *)w[2]; - int n = (int)w[3]; - - while(n--) - { - *out++ = *in; - *in++ = 0; - } - - return (w+4); -} -#endif - -void limiter_dsp(t_limiter *x, t_signal **sp) +static void limiter_dsp(t_limiter *x, t_signal **sp) { int i = 0; t_float* sig_buf = (t_float *)getbytes(sizeof(t_float) * sp[0]->s_n); @@ -611,7 +594,7 @@ void limiter_dsp(t_limiter *x, t_signal **sp) /* ------------------------------------------------------------------------------------ */ // finally do the creation - things -void *limiter_new(t_symbol *s, int argc, t_atom *argv) +static void *limiter_new(t_symbol *s, int argc, t_atom *argv) { t_limiter *x = (t_limiter *)pd_new(limiter_class); @@ -663,7 +646,7 @@ void *limiter_new(t_symbol *s, int argc, t_atom *argv) return (x); } -void limiter_free(t_limiter *x) +static void limiter_free(t_limiter *x) { int i=0; @@ -691,7 +674,7 @@ void limiter_tilde_setup(void) class_addmethod(limiter_class, nullfn, gensym("signal"), 0); class_addmethod(limiter_class, (t_method)limiter_dsp, gensym("dsp"), 0); - class_addmethod(limiter_class, (t_method)helper, gensym("help"), 0); + class_addmethod(limiter_class, (t_method)limiter_tilde_helper, gensym("help"), 0); class_addmethod(limiter_class, (t_method)status, gensym("print"), 0); class_sethelpsymbol(limiter_class, gensym("zexy/limiter~")); @@ -280,7 +280,7 @@ static void lpt_free(t_lpt *x) } -static void helper(t_lpt *x) +static void lpt_helper(t_lpt *x) { post("\n%c lpt :: direct access to the parallel port", HEARTSYMBOL); post("<byte>\t: write byte to the parallel-port"); @@ -299,7 +299,7 @@ void lpt_setup(void) class_addmethod(lpt_class, (t_method)lpt_control, gensym("control"), A_FLOAT, 0); class_addbang(lpt_class, (t_method)lpt_bang); - class_addmethod(lpt_class, (t_method)helper, gensym("help"), 0); + class_addmethod(lpt_class, (t_method)lpt_helper, gensym("help"), 0); class_sethelpsymbol(lpt_class, gensym("zexy/lpt")); zexy_register("lpt"); } diff --git a/src/makesymbol.c b/src/makesymbol.c index e361c80..3557b57 100644 --- a/src/makesymbol.c +++ b/src/makesymbol.c @@ -118,7 +118,7 @@ static void makesymbol_free(t_makesymbol *x) } -static void helper(t_makesymbol *x) +static void makesymbol_helper(t_makesymbol *x) { post("\n%c makesymbol :: create a formatted symbol", HEARTSYMBOL); post("<list of anything>\t: glue up to 10 list-elements to 1 formatted symbol\n" @@ -140,7 +140,7 @@ void makesymbol_setup(void) class_addmethod(makesymbol_class, (t_method)reset_mask, gensym("sym1"), A_SYMBOL, 0); - class_addmethod(makesymbol_class, (t_method)helper, gensym("help"), 0); + class_addmethod(makesymbol_class, (t_method)makesymbol_helper, gensym("help"), 0); class_sethelpsymbol(makesymbol_class, gensym("zexy/makesymbol")); zexy_register("makesymbol"); } @@ -112,7 +112,7 @@ static void pdf_free(t_pdf *x) freebytes(x->buf, x->size*sizeof(t_float)); } -static void helper(void) +static void pdf_tilde_helper(void) { post("\n%c pdf~\t:: get the probability density function of a signal (-1.0 to +1.0)", HEARTSYMBOL); post("'bang'\t : output a list of the probabilities of 'n' function values" @@ -134,7 +134,7 @@ void pdf_tilde_setup(void) class_addmethod(pdf_class, (t_method)clear_pdfbuf, gensym("clear"), 0); class_addfloat(pdf_class, pdf_float); - class_addmethod(pdf_class, (t_method)helper, gensym("help"), 0); + class_addmethod(pdf_class, (t_method)pdf_tilde_helper, gensym("help"), 0); class_sethelpsymbol(pdf_class, gensym("zexy/pdf~")); zexy_register("pdf~"); } diff --git a/src/prime.c b/src/prime.c index 339582b..73ba899 100644 --- a/src/prime.c +++ b/src/prime.c @@ -26,7 +26,7 @@ typedef struct _prime { } t_prime; -void prime_float(t_prime *x, t_float f) +static void prime_float(t_prime *x, t_float f) { unsigned int i=f; @@ -54,13 +54,13 @@ void prime_float(t_prime *x, t_float f) outlet_float(x->x_obj.ob_outlet, 1.0); } -void *prime_new(void) +static void *prime_new(void) { t_prime *x = (t_prime *)pd_new(prime_class); outlet_new(&x->x_obj, &s_float); - return (void *)x; + return (x); } void prime_setup(void) { diff --git a/src/quantize~.c b/src/quantize~.c index 076b853..253df30 100644 --- a/src/quantize~.c +++ b/src/quantize~.c @@ -73,7 +73,7 @@ static void quantize_dsp(t_quantize *x, t_signal **sp) dsp_add(quantize_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } -static void helper(t_quantize *x) +static void quantize_tilde_helper(t_quantize *x) { post("%c quantize~-object\t:: used for quantizing signals by various degrees", HEARTSYMBOL); post("<quants> : quantize a signal into <quants> steps ('0' turns quantizing off)\n" @@ -107,7 +107,7 @@ void quantize_tilde_setup(void) class_addmethod(quantize_class, (t_method)quantize_8bit, gensym("8bit"), 0); class_addmethod(quantize_class, (t_method)quantize_16bit, gensym("16bit"), 0); - class_addmethod(quantize_class, (t_method)helper, gensym("help"), 0); + class_addmethod(quantize_class, (t_method)quantize_tilde_helper, gensym("help"), 0); class_sethelpsymbol(quantize_class, gensym("zexy/quantize~")); zexy_register("quantize~"); } diff --git a/src/sfplay.c b/src/sfplay.c index ff8848d..560976f 100644 --- a/src/sfplay.c +++ b/src/sfplay.c @@ -135,7 +135,7 @@ static int sfplay_am_i_big_endian(void) } -void helper(t_sfplay *x) +static void sfplay_helper(t_sfplay *x) { post("\nsfplay :: a soundfile-player (c) winfried ritsch 1999"); post("\ncreation :: sfplay <channels> <bytes> : channels set the number of channels, bytes skip fileheader"); @@ -157,7 +157,7 @@ void helper(t_sfplay *x) Use of the buffered functions fopen, fseek fread fclose instead the non buffered ones open read close */ -void sfplay_open(t_sfplay *x,t_symbol *filename,t_symbol *endian) +static void sfplay_open(t_sfplay *x,t_symbol *filename,t_symbol *endian) { if(x->state != SFPLAY_WAIT) @@ -302,7 +302,7 @@ static void sfplay_rewind(t_sfplay *x) /* restart with bang */ -void sfplay_bang(t_sfplay* x) +static void sfplay_bang(t_sfplay* x) { x->skip = 1; sfplay_start(x); @@ -648,7 +648,7 @@ void sfplay_setup(void) class_addmethod(sfplay_class, nullfn, gensym("signal"), 0); class_addmethod(sfplay_class, (t_method)sfplay_dsp, gensym("dsp"), 0); - class_addmethod(sfplay_class, (t_method)helper, gensym("help"), A_NULL); + class_addmethod(sfplay_class, (t_method)sfplay_helper, gensym("help"), A_NULL); class_sethelpsymbol(sfplay_class, gensym("zexy/sf-play_record")); /* method open with filename */ diff --git a/src/sfrecord.c b/src/sfrecord.c index 2420f4b..16c3c31 100644 --- a/src/sfrecord.c +++ b/src/sfrecord.c @@ -119,7 +119,7 @@ static void state_out(t_sfrecord *x, int state) Use of the buffered functions fopen, fseek fread fclose instead the non buffered ones open read close */ -void sfrecord_open(t_sfrecord *x,t_symbol *filename,t_symbol *endian) +static void sfrecord_open(t_sfrecord *x,t_symbol *filename,t_symbol *endian) { if(x->state != SFRECORD_WAIT) @@ -219,7 +219,7 @@ static void sfrecord_float(t_sfrecord *x, t_floatarg f) } /* say what state we´re in */ -void sfrecord_bang(t_sfrecord* x) +static void sfrecord_bang(t_sfrecord* x) { if (x->state == SFRECORD_WRITE) state_out(x, 1); else state_out(x, 0); } @@ -557,7 +557,7 @@ static void *sfrecord_new(t_floatarg chan) } -static void helper(void) +static void sfrecord_helper(void) { post("\nsfplay :: a raw-data soundfile-recorder"); post("\ncreation :: sfrecord <channels>\t: channels set the number of channels"); @@ -597,7 +597,7 @@ void sfrecord_setup(void) class_addbang(sfrecord_class,sfrecord_bang); /* some help */ - class_addmethod(sfrecord_class, (t_method)helper, gensym("help"), A_NULL); + class_addmethod(sfrecord_class, (t_method)sfrecord_helper, gensym("help"), A_NULL); class_sethelpsymbol(sfrecord_class, gensym("zexy/sf-play_record")); zexy_register("sfrecord"); } diff --git a/src/sigzero~.c b/src/sigzero~.c index c0d0b40..abc8fc0 100644 --- a/src/sigzero~.c +++ b/src/sigzero~.c @@ -76,7 +76,7 @@ static void sigzero_dsp(t_sigzero *x, t_signal **sp) dsp_add(sigzero_perform, 3, sp[0]->s_vec, x, sp[0]->s_n); } -static void helper(void) +static void sigzero_tilde_helper(void) { post("\n%c sigzero~-object :: for detecting whether a signal is currently zero or not", HEARTSYMBOL); post("'bang'\t: turn the detector on\n" @@ -105,7 +105,7 @@ void sigzero_tilde_setup(void) class_addmethod(sigzero_class, nullfn, gensym("signal"), 0); class_addmethod(sigzero_class, (t_method)sigzero_dsp, gensym("dsp"), 0); - class_addmethod(sigzero_class, (t_method)helper, gensym("help"), 0); + class_addmethod(sigzero_class, (t_method)sigzero_tilde_helper, gensym("help"), 0); class_sethelpsymbol(sigzero_class, gensym("zexy/sigzero~")); zexy_register("sigzero~"); } @@ -26,7 +26,7 @@ typedef struct _wrap { } t_wrap; -void wrap_float(t_wrap *x, t_float f) +static void wrap_float(t_wrap *x, t_float f) { if (x->f_lower==x->f_upper) outlet_float(x->x_obj.ob_outlet, x->f_lower); @@ -37,7 +37,7 @@ void wrap_float(t_wrap *x, t_float f) outlet_float(x->x_obj.ob_outlet, x->f_lower+modulo); } } -void wrap_set(t_wrap *x, t_symbol *s, int argc, t_atom *argv){ +static void wrap_set(t_wrap *x, t_symbol *s, int argc, t_atom *argv){ t_float f1, f2; switch (argc){ case 0: @@ -56,7 +56,7 @@ void wrap_set(t_wrap *x, t_symbol *s, int argc, t_atom *argv){ x->f_upper=(f1>f2)?f1:f2; } -void *wrap_new(t_symbol *s, int argc, t_atom*argv) +static void *wrap_new(t_symbol *s, int argc, t_atom*argv) { t_wrap *x = (t_wrap *)pd_new(wrap_class); wrap_set(x, s, argc, argv); @@ -64,7 +64,7 @@ void *wrap_new(t_symbol *s, int argc, t_atom*argv) outlet_new(&x->x_obj, &s_float); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("set")); - return (void *)x; + return (x); } void wrap_setup(void) { @@ -118,7 +118,7 @@ static void zexy_help(void) static void *zexy_new(void) { t_zexy *x = (t_zexy *)pd_new(zexy_class); - return (void *)x; + return (x); } void z_zexy_setup(void); /* defined in z_zexy.c */ |