diff options
author | N.N. <matju@users.sourceforge.net> | 2009-06-03 00:58:42 +0000 |
---|---|---|
committer | N.N. <matju@users.sourceforge.net> | 2009-06-03 00:58:42 +0000 |
commit | 727cbee4fb6826d514b039ebd2c0f3d26ccbf18e (patch) | |
tree | ea3c7419d141c051b977718a7e603725ac6b04fe /desiredata/src | |
parent | a8ddce3a4948d1ba4c6a3b3b20bc3d46fd2b809d (diff) |
better display of the symbol table
svn path=/trunk/; revision=11637
Diffstat (limited to 'desiredata/src')
-rw-r--r-- | desiredata/src/kernel.c | 9 |
1 files changed, 6 insertions, 3 deletions
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<t_symbol *> all; for (size_t i=0; i<int(sizeof(symhash)/sizeof(*symhash)); i++) for (t_symbol *s=symhash[i]; s; s=s->next) all.push_back(s); sort(all.begin(),all.end(),symbol_lt); for (size_t i=0; i<all.size(); i++) { int j=0; - if (all[i]->thing) 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; |