From c50f442f1930fe5f11fdb450627d1e61f90c4481 Mon Sep 17 00:00:00 2001 From: Ivica Ico Bukvic <ico@vt.edu> Date: Wed, 8 Aug 2012 17:26:09 -0400 Subject: [PATCH] binbuf_print now hides all arguments following the %hidden% atom when reporting errors on the console --- src/m_binbuf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/m_binbuf.c b/src/m_binbuf.c index b0692e76e..e1926b67e 100644 --- a/src/m_binbuf.c +++ b/src/m_binbuf.c @@ -448,6 +448,9 @@ void binbuf_restore(t_binbuf *x, int argc, t_atom *argv) x->b_n = newsize; } +#define ISSYMBOL(a, b) ((a)->a_type == A_SYMBOL && \ + !strcmp((a)->a_w.w_symbol->s_name, (b))) + void binbuf_print(t_binbuf *x) { int i, startedpost = 0, newline = 1; @@ -459,6 +462,8 @@ void binbuf_print(t_binbuf *x) startpost(""); startedpost = 1; } + if (ISSYMBOL(x->b_vec + i, "%hidden%")) + i = x->b_n - 1; postatom(1, x->b_vec + i); if (x->b_vec[i].a_type == A_SEMI) newline = 1; @@ -1035,9 +1040,6 @@ from Pd to Max hasn't been tested for patches with subpatches yet! */ #define MAXSTACK 1000 -#define ISSYMBOL(a, b) ((a)->a_type == A_SYMBOL && \ - !strcmp((a)->a_w.w_symbol->s_name, (b))) - static t_binbuf *binbuf_convert(t_binbuf *oldb, int maxtopd) { t_binbuf *newb = binbuf_new(); -- GitLab