dis_sql/src/sql_iff.cxx
// same but without newline
// called by iff_symbol_decl above and iff_ast_definition
//
same but without newline
called by iff_symbol_decl above and iff_ast_definition
same but without newline called by iff_symbol_decl above and iff_ast_definition
static int iff_symbol_entry (const SQL_SYM * sym, int rep_flag)
{
   const SQL_SYM * full_sym;
   const char * s;
   if (sym) {
      if (fprintf (iff_fp, "%s", IFFSTR_SYM) < 0) {
	 return (iff_io_error ());
      }
      if (iff_symbol_id (sym) < 0) {
	 return (-1);
      }
      if (fprintf (iff_fp, " %s ",
	    sym_kind_lookup (sym->sym_token_type)) < 0) {
	 return (iff_io_error ());
      }
      if (rep_flag) {
	 if (fprintf (iff_fp, ": %s ", IFFSTR_REP) < 0) {
	    return (iff_io_error ());
	 }
      }
      if (fputc ('"', iff_fp) == EOF) {
	 return (iff_io_error ());
      }
      if (sym->full_sym) {
	 full_sym = sym->full_sym;
      } else {
	 full_sym = sym;
      }
      s = full_sym->sym_key;
      if (esql_mode && (*s == ':')) {
	 ++s;
      }
      if (iff_literal_text (s) < 0) {
	 return (-1);
      }
      if (full_sym->proc_sym) {
	 if (fprintf (iff_fp, " @ ") < 0) {
	    return (iff_io_error ());
	 }
	 if (full_sym->proc_sym->full_sym) {
	    s = full_sym->proc_sym->full_sym->sym_key;
	 } else {
	    s = full_sym->proc_sym->sym_key;
	 }
	 if (iff_literal_text (s) < 0) {
	    return (-1);
	 }
	 if (full_sym->proc_block > 0) {
	    if (fprintf (iff_fp, " { %d }", full_sym->proc_block) < 0) {
	       return (iff_io_error ());
	    }
	 }
      }
      if (fputc ('"', iff_fp) == EOF) {
	 return (iff_io_error ());
      }
   }
   return (0);
}
static int iff_symbol_entry ( const SQL_SYM * sym , int rep_flag ) { const SQL_SYM * full_sym ; const char * s ; if ( sym ) { if ( fprintf ( iff_fp , " " , IFFSTR_SYM ) < 0 ) { return ( iff_io_error ( ) ) ; } if ( iff_symbol_id ( sym ) < 0 ) { return ( -1 ) ; } if ( fprintf ( iff_fp , " " , sym_kind_lookup ( sym -> sym_token_type ) ) < 0 ) { return ( iff_io_error ( ) ) ; } if ( rep_flag ) { if ( fprintf ( iff_fp , " " , IFFSTR_REP ) < 0 ) { return ( iff_io_error ( ) ) ; } } if ( fputc ( ' ' , iff_fp ) == EOF ) { return ( iff_io_error ( ) ) ; } if ( sym -> full_sym ) { full_sym = sym -> full_sym ; } else { full_sym = sym ; } s = full_sym -> sym_key ; if ( esql_mode && ( * s == ' ' ) ) { ++ s ; } if ( iff_literal_text ( s ) < 0 ) { return ( -1 ) ; } if ( full_sym -> proc_sym ) { if ( fprintf ( iff_fp , " " ) < 0 ) { return ( iff_io_error ( ) ) ; } if ( full_sym -> proc_sym -> full_sym ) { s = full_sym -> proc_sym -> full_sym -> sym_key ; } else { s = full_sym -> proc_sym -> sym_key ; } if ( iff_literal_text ( s ) < 0 ) { return ( -1 ) ; } if ( full_sym -> proc_block > 0 ) { if ( fprintf ( iff_fp , " " , full_sym -> proc_block ) < 0 ) { return ( iff_io_error ( ) ) ; } } } if ( fputc ( ' ' , iff_fp ) == EOF ) { return ( iff_io_error ( ) ) ; } } return ( 0 ) ; }
same but without newline
called by iff_symbol_decl above and iff_ast_definition
same but without newline called by iff_symbol_decl above and iff_ast_definition
// use full name // Don't print colon of host variables in esql // output function name and block for local variables