From 727cbee4fb6826d514b039ebd2c0f3d26ccbf18e Mon Sep 17 00:00:00 2001 From: "N.N." Date: Wed, 3 Jun 2009 00:58:42 +0000 Subject: better display of the symbol table svn path=/trunk/; revision=11637 --- desiredata/src/kernel.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'desiredata/src') diff --git a/desiredata/src/kernel.c b/desiredata/src/kernel.c index 5e349de9..cb2efc5b 100644 --- a/desiredata/src/kernel.c +++ b/desiredata/src/kernel.c @@ -1150,15 +1150,18 @@ extern "C" t_symbol *symprintf(const char *s, ...) { bool symbol_lt (t_symbol *a, t_symbol *b) {return strcmp(a->name,b->name)<0;} void glob_symbol_table (t_pd *, float onlybound) { + post("symbol_table = {"); std::vector all; for (size_t i=0; inext) all.push_back(s); sort(all.begin(),all.end(),symbol_lt); for (size_t i=0; ithing) j++; - //if (all[i]->thing->_class==bindlist_class) j++; - if (j>0 || !onlybound) printf(" %0*lx: %s (%d)\n",2*sizeof(void*),long(all[i]),all[i]->name,j); + if (all[i]->thing) { + if (all[i]->thing->_class==bindlist_class) j=2; else j=1; + } + if (j>0 || !onlybound) post(" %0*lx: %s (%d)",2*sizeof(void*),long(all[i]),all[i]->name,j); } + post("}"); } static int tryingalready; -- cgit v1.2.1