dis_sql/src/sql_iff.cxx
//
// iff_reference_count - Recursively walk syntax tree and count
// symbol references and flag defined symbols.
//
// This is used later to output symbols that are not defined
// but referenced (in iff_declarations).
//
Recursively walk syntax tree and count
symbol references and flag defined symbols.

This is used later to output symbols that are not defined
but referenced (in iff_declarations).
Recursively walk syntax tree and count symbol references and flag defined symbols . This is used later to output symbols that are not defined but referenced ( in iff_declarations ) .
static void iff_reference_count (ast_tree * at)
{
   ast_treelist * atl;
   SQL_SYM * sym;
   if ( ! at ) {
      return;
   }
   if (at->sym) {
      if (at->sym->full_sym) {
	 sym = at->sym->full_sym;
      } else {
	 sym = at->sym;
      }
      sym->ref_count++;
      if (at->info.defined) {
	 sym->sym_defined = 1;
      }    
   }
   for (atl = at->head; atl; atl = atl->next) {
      iff_reference_count (atl->ast);
   }
}
static void iff_reference_count ( ast_tree * at ) { ast_treelist * atl ; SQL_SYM * sym ; if ( ! at ) { return ; } if ( at -> sym ) { if ( at -> sym -> full_sym ) { sym = at -> sym -> full_sym ; } else { sym = at -> sym ; } sym -> ref_count ++ ; if ( at -> info . defined ) { sym -> sym_defined = 1 ; } } for ( atl = at -> head ; atl ; atl = atl -> next ) { iff_reference_count ( atl -> ast ) ; } }
iff_reference_count - Recursively walk syntax tree and count
symbol references and flag defined symbols.
iff_reference_count - Recursively walk syntax tree and count symbol references and flag defined symbols .
// increment reference count for this symbol // set defined flag // now recursively walk child trees and update ref_count