aboutsummaryrefslogtreecommitdiff
path: root/pd/src/d_misc.c
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2004-09-06 20:20:36 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2004-09-06 20:20:36 +0000
commited932acb5860bf8b9296169676499562a55d139e (patch)
treedc6a40dba908deb07c175cd40ee19c197318f72d /pd/src/d_misc.c
parentdad636821f6e7d3ead02c157f308c0ceeba9af3d (diff)
checking in version 0.38test5.
Oops, I realize I forgot some more nice files, will add them and re-commit. svn path=/trunk/; revision=2010
Diffstat (limited to 'pd/src/d_misc.c')
-rw-r--r--pd/src/d_misc.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/pd/src/d_misc.c b/pd/src/d_misc.c
index 35f4af0b..c67f4ba6 100644
--- a/pd/src/d_misc.c
+++ b/pd/src/d_misc.c
@@ -27,19 +27,19 @@ static t_int *print_perform(t_int *w)
int n = (int)(w[3]);
if (x->x_count)
{
- post("%s:", x->x_sym->s_name);
- if (n == 1) post("%8g", in[0]);
- else if (n == 2) post("%8g %8g", in[0], in[1]);
- else if (n == 4) post("%8g %8g %8g %8g",
- in[0], in[1], in[2], in[3]);
- else while (n > 0)
- {
- post("%-8.5g %-8.5g %-8.5g %-8.5g %-8.5g %-8.5g %-8.5g %-8.5g",
- in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7]);
- n -= 8;
- in += 8;
- }
- x->x_count--;
+ post("%s:", x->x_sym->s_name);
+ if (n == 1) post("%8g", in[0]);
+ else if (n == 2) post("%8g %8g", in[0], in[1]);
+ else if (n == 4) post("%8g %8g %8g %8g",
+ in[0], in[1], in[2], in[3]);
+ else while (n > 0)
+ {
+ post("%-8.5g %-8.5g %-8.5g %-8.5g %-8.5g %-8.5g %-8.5g %-8.5g",
+ in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7]);
+ n -= 8;
+ in += 8;
+ }
+ x->x_count--;
}
return (w+4);
}
@@ -72,7 +72,7 @@ static void *print_new(t_symbol *s)
static void print_setup(void)
{
print_class = class_new(gensym("print~"), (t_newmethod)print_new, 0,
- sizeof(t_print), 0, A_DEFSYM, 0);
+ sizeof(t_print), 0, A_DEFSYM, 0);
CLASS_MAINSIGNALIN(print_class, t_print, x_f);
class_addmethod(print_class, (t_method)print_dsp, gensym("dsp"), 0);
class_addbang(print_class, print_bang);
@@ -104,8 +104,8 @@ static t_int *scope_perform(t_int *w)
int n = (int)(w[3]), phase = x->x_phase;
while (n--)
{
- x->x_samps[phase] = *in++;
- phase = (phase + 1) & (SCOPESIZE-1);
+ x->x_samps[phase] = *in++;
+ phase = (phase + 1) & (SCOPESIZE-1);
}
x->x_phase = phase;
return (w+4);
@@ -118,7 +118,7 @@ static void scope_dsp(t_scope *x, t_signal **sp)
static void scope_erase(t_scope *x)
{
- if (x->x_drawn) sys_vgui(".x%x.c delete gumbo\n", x->x_canvas);
+ if (x->x_drawn) sys_vgui(".x%lx.c delete gumbo\n", x->x_canvas);
}
#define X1 10.
@@ -129,16 +129,16 @@ static void scope_bang(t_scope *x)
int n, phase;
char hugebuf[10000], *s = hugebuf;
scope_erase(x);
- sys_vgui(".x%x.c create line 10c 5c 20c 5c -tags gumbo\n", x->x_canvas);
- sprintf(s, ".x%x.c create line ", (t_int)x->x_canvas);
+ sys_vgui(".x%lx.c create line 10c 5c 20c 5c -tags gumbo\n", x->x_canvas);
+ sprintf(s, ".x%lx.c create line ", (t_int)x->x_canvas);
s += strlen(s);
for (n = 0, phase = x->x_phase;
- n < SCOPESIZE; phase = ((phase+1) & (SCOPESIZE-1)), n++)
+ n < SCOPESIZE; phase = ((phase+1) & (SCOPESIZE-1)), n++)
{
- sprintf(s, "%fc %fc ", X1 + (X2 - X1) * (float)n * (1./SCOPESIZE),
- YC - 5 * x->x_samps[phase]);
- s += strlen(s);
- /* post("phase %d", phase); */
+ sprintf(s, "%fc %fc ", X1 + (X2 - X1) * (float)n * (1./SCOPESIZE),
+ YC - 5 * x->x_samps[phase]);
+ s += strlen(s);
+ /* post("phase %d", phase); */
}
sprintf(s, "-tags gumbo\n");
sys_gui(hugebuf);
@@ -163,7 +163,7 @@ static void *scope_new(t_symbol *s)
static void scope_setup(void)
{
scope_class = class_new(gensym("scope~"), (t_newmethod)scope_new,
- (t_method)scope_free, sizeof(t_scope), 0, A_DEFSYM, 0);
+ (t_method)scope_free, sizeof(t_scope), 0, A_DEFSYM, 0);
class_addmethod(scope_class, nullfn, gensym("signal"), 0);
class_addmethod(scope_class, (t_method)scope_dsp, gensym("dsp"), 0);
class_addbang(scope_class, scope_bang);
@@ -212,9 +212,9 @@ static void *bang_tilde_new(t_symbol *s)
static void bang_tilde_setup(void)
{
bang_tilde_class = class_new(gensym("bang~"), (t_newmethod)bang_tilde_new,
- (t_method)bang_tilde_free, sizeof(t_bang), 0, 0);
+ (t_method)bang_tilde_free, sizeof(t_bang), 0, 0);
class_addmethod(bang_tilde_class, (t_method)bang_tilde_dsp,
- gensym("dsp"), 0);
+ gensym("dsp"), 0);
}
/* ------------------------ samplerate~~ -------------------------- */
@@ -241,7 +241,7 @@ static void *samplerate_tilde_new(t_symbol *s)
static void samplerate_tilde_setup(void)
{
samplerate_tilde_class = class_new(gensym("samplerate~"),
- (t_newmethod)samplerate_tilde_new, 0, sizeof(t_samplerate), 0, 0);
+ (t_newmethod)samplerate_tilde_new, 0, sizeof(t_samplerate), 0, 0);
class_addbang(samplerate_tilde_class, samplerate_tilde_bang);
}