Exemplo n.º 1
0
static int
is_var(Symbol *symp)
{
     if (include_symbol(symp)) {
	  if (symp->type == SymIdentifier) 
	       return symp->storage == ExternStorage ||
	 	      symp->storage == StaticStorage;
	  else
	       return 1;
     }
     return 0;
}
Exemplo n.º 2
0
/* Produce reverse call tree output
 */
static void
inverted_tree(int lev, int last, Symbol *sym)
{
     struct linked_list_entry *p;
     int rc;
     
     if (sym->type == SymUndefined
	 || (max_depth && lev >= max_depth)
	 || !include_symbol(sym))
	  return;
     rc = print_symbol(0, lev, last, sym);
     newline();
     if (rc || sym->active)
	  return;
     set_active(sym);
     for (p = linked_list_head(sym->caller); p; p = p->next) {
	  set_level_mark(lev+1, !is_last(p));
	  inverted_tree(lev+1, is_last(p), (Symbol*)p->data);
     }
     clear_active(sym);
}
Exemplo n.º 3
0
/* Produce reverse call tree output
 */
static void
inverted_tree(int lev, int last, Symbol *sym)
{
     Consptr cons;
     int rc;
     
     if (sym->type == SymUndefined
	 || (max_depth && lev >= max_depth)
	 || !include_symbol(sym))
	  return;
     rc = print_symbol(0, lev, last, sym);
     newline();
     if (rc || sym->active)
	  return;
     set_active(sym);
     for (cons = sym->caller; cons; cons = CDR(cons)) {
	  set_level_mark(lev+1, is_printable(CDR(cons)));
	  inverted_tree(lev+1, is_last(cons), (Symbol*)CAR(cons));
     }
     clear_active(sym);
}
Exemplo n.º 4
0
static int
is_printable(struct linked_list_entry *p)
{
     return p != NULL && include_symbol((Symbol*)p->data);
}
Exemplo n.º 5
0
static int
is_printable(Consptr cons)
{
     return cons != NULL && include_symbol((Symbol*)CAR(cons));
}