aboutsummaryrefslogtreecommitdiff
path: root/pd/src/d_misc.c
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2007-12-28 03:43:06 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2007-12-28 03:43:06 +0000
commit019c0e56579fe7f94982434d8efcd7b00d8df0aa (patch)
treeb221f8e00973d9a501ed7085e9f2b95fabb0009a /pd/src/d_misc.c
parent44e68e4348f7ca86f4209f3f86ac7b6cb49acd52 (diff)
... and again trying to check in 0.41-0 test 10
svn path=/trunk/; revision=9108
Diffstat (limited to 'pd/src/d_misc.c')
-rw-r--r--pd/src/d_misc.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/pd/src/d_misc.c b/pd/src/d_misc.c
index 3a327dc5..444986ea 100644
--- a/pd/src/d_misc.c
+++ b/pd/src/d_misc.c
@@ -15,7 +15,7 @@ static t_class *print_class;
typedef struct _print
{
t_object x_obj;
- float x_f;
+ t_float x_f;
t_symbol *x_sym;
int x_count;
} t_print;
@@ -23,22 +23,17 @@ typedef struct _print
static t_int *print_perform(t_int *w)
{
t_print *x = (t_print *)(w[1]);
- t_float *in = (t_float *)(w[2]);
+ t_sample *in = (t_sample *)(w[2]);
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;
+ int i=0;
+ startpost("%s:", x->x_sym->s_name);
+ for(i=0; i<n; i++) {
+ if(i%8==0)endpost();
+ startpost("%-8.5g", in[i]);
}
+ endpost();
x->x_count--;
}
return (w+4);