Index: conn.c =================================================================== --- conn.c (revision 2926) +++ conn.c (working copy) @@ -877,7 +877,7 @@ enp evn; int glen; /* got */ int alen; /* area */ - enp *namelist; + char **namelist; enp vp; enp vn; enp vv; @@ -912,8 +912,8 @@ } alen = 128; - namelist = (enp*)malloc(sizeof(char*)*(alen+1)); - glen = scan_exported_syms(alen, namelist, 0); + namelist = (char**)malloc(sizeof(char*)*(alen+1)); + glen = scan_exported_syms(alen, (enp*)namelist, 0); if(glen>0) { if(conn_trace) { Trace("glen/alen %d/%d\n", glen, alen); @@ -931,24 +931,21 @@ */ for(u=0;utype==T_SYM) { - fprintf(stderr, " %3d: %s\n", u, namelist[u]->cname); + if(namelist[u]) { + fprintf(stderr, " %3d: %s\n", u, namelist[u]); } else { fprintf(stderr, " %3d: *not-symbol*\n", u); } } - if(namelist[u]->type!=T_SYM) { - continue; + if(namelist[u]) { + sp = symtbl_THfindusersym(gth, namelist[u]); + if(!sp) { + continue; + } } - sp = symtbl_THfindusersym(gth, namelist[u]->cname); - if(!sp) { - continue; - } -#if 0 + vn = en_newsym(namelist[u]); -#endif - vn = en_newsym(namelist[u]->cname); vv = sp->vslot[0]; vp = en_cons(sym_setq, en_cons(vn, en_cons(vv, NULL))); if(exportvars==NULL) { @@ -961,6 +958,18 @@ #endif #if 1 + if(conn_trace) { + if(exportvars) { + fprintf(stderr, " *exportvars: "); + en_fpprprint(stderr, exportvars); + } + else { + fprintf(stderr, " no exportvars\n"); + } + } +#endif + +#if 1 magents=monagent_gen_agentlist(); #endif Index: symtbl.c =================================================================== --- symtbl.c (revision 2926) +++ symtbl.c (working copy) @@ -3406,6 +3406,7 @@ c, symtbl[i].name, symtbl[i].exported, symtbl[i].num, symtbl[i].max); #endif + c++; if(symtbl[i].exported==0) { Trace(" not exported\n"); continue; @@ -3423,67 +3424,9 @@ Trace(" no space for followings\n"); break; } - -#if 0 - - for(j=0;jtype!=T_NODE) { - continue; - } - - Trace( - " %3d %-16s %-3d : %#010x %c\n", - c, symtbl[i].name, j, np, np->isclass ? 'C' : 'I'); -#if 0 - node_enfpprint(stderr, np); -#endif - pass = 0; - if(np->isclass) { - nc++; - if(fclass&MARK_CLASS) { - pass = 1; - } - } - else { - if(fclass&MARK_PNODES && np->cnode->vntype[0]=='\0') { - ni++; - pass = 1; - } - if(fclass&MARK_VNODES && np->cnode->vntype[0]!='\0') { - ni++; - pass = 1; - } - } - c++; - - if(ncnode; - nlist[n].nnic = np->cnode->n_netif; - /* - * make signature to avoid complex comparison - */ - nlist[n].nsig = 0; - nlist[n].nsig += np->cnode->n_netif*53; - for(k=0;kcnode->n_netif;k++) { - nlist[n].nsig += - (k+1)*xhash(np->cnode->netif[k].media); - } - n++; - } - } - } - -#endif - } - Trace("store %d nodes in %d nodes (class %d instance %d)\n", - n, c, nc, ni); + Trace("store %d vars in %d vars\n", n, c); ret = n; #if 0 Index: rbh.c =================================================================== --- rbh.c (revision 2926) +++ rbh.c (working copy) @@ -354,6 +354,8 @@ rbh_rec_t *ne; rbh_rec_t *op; + Trace("%s: evp %p xt %d xn %s xrn %s\n", __func__, evp, xt, xn, xrn); + #if 1 if(!evp) { Error("%s: null envelop", __func__); Index: nsetup.c =================================================================== --- nsetup.c (revision 2926) +++ nsetup.c (working copy) @@ -243,7 +243,7 @@ int save_rbhfile_ncdb(char *fn) { - rbh_env_t here; + rbh_env_t here = {"save-temp", NULL}; rbh_env_t *cevp = &here; if(!fn || *fn==NULL) {