dis_sql/src/sql_iff.cxx
//
// iff_declarations
//
// Output symbol declarations for all symbols used but not defined.
// Also output each symbol's attributes.
//
// Goes through symbol table searching for any symbol used
// (symbol number not zero and referenced somewhere) but not flaged as
// defined in the program.
//
// Note that the "defined" flag in the symbol table means: "this symbol
// is defined somewhere".  Whereas the "defined" flag in a syntax tree
// node means "this symbol is defined right HERE".
//
// Note also that the attributes here are symbol attributes (e.g.
// x is host variable - "x" is a symbol with a symbol attribute "host").
// Not to be confused with relation attributes (e.g. x is argument
// 4 of y - "argument" is a relation (between x and y) with a 
// relation attribute of 4).
//
iff_declarations
Output symbol declarations for all symbols used but not defined.
Also output each symbol's attributes.

Goes through symbol table searching for any symbol used
(symbol number not zero and referenced somewhere) but not flaged as
defined in the program.

Note that the "defined" flag in the symbol table means: "this symbol
is defined somewhere".  Whereas the "defined" flag in a syntax tree
node means "this symbol is defined right HERE".

Note also that the attributes here are symbol attributes .
Not to be confused with relation attributes  with a
relation attribute of 4).
iff_declarations Output symbol declarations for all symbols used but not defined . Also output each symbol ' s attributes . Goes through symbol table searching for any symbol used ( symbol number not zero and referenced somewhere ) but not flaged as defined in the program . Note that the " defined " flag in the symbol table means : " this symbol is defined somewhere " . Whereas the " defined " flag in a syntax tree node means " this symbol is defined right HERE " . Note also that the attributes here are symbol attributes . Not to be confused with relation attributes with a relation attribute of 4 ) .
static int iff_declarations (void)
{
   SQL_SYM * sym;
   sql_symbol_init_list ();
   while (sym = sql_symbol_next ()) {
      if (sym->sym_number && sym->ref_count && ( ! sym->sym_defined)) {
	 if ( ! sym->full_sym ) {
	    if (iff_symbol_decl (sym) < 0) {
	       return (-1);
	    }
	 }
	 if (iff_symbol_attribute (sym) < 0) {
	    return (-1);
	 }
      }
   }
   return (0);
}
static int iff_declarations ( void ) { SQL_SYM * sym ; sql_symbol_init_list ( ) ; while ( sym = sql_symbol_next ( ) ) { if ( sym -> sym_number && sym -> ref_count && ( ! sym -> sym_defined ) ) { if ( ! sym -> full_sym ) { if ( iff_symbol_decl ( sym ) < 0 ) { return ( -1 ) ; } } if ( iff_symbol_attribute ( sym ) < 0 ) { return ( -1 ) ; } } } return ( 0 ) ; }
iff_declarations
Output symbol declarations for all symbols used but not defined.
iff_declarations Output symbol declarations for all symbols used but not defined .
// Initalize symbol table "next symbol" to start of table // go through whole symbol table // Only output once (with full entry) // Output symbol declaration // Output any symbol attributes