dis_sql/src/sql_iff.cxx
//
// iff_symbol_relation - Output a symbol relation entry.
//
// A relation is always between two symbols and may also
// include attributes.
//
Output a symbol relation entry.
A relation is always between two symbols and may also
include attributes.
Output a symbol relation entry . A relation is always between two symbols and may also include attributes .
static int iff_symbol_relation (const SQL_SYM * sym_source,
   const SQL_SYM * sym_target,
   const char* relation_name,
   const char* attributes)
{
   if (sym_source && sym_target) {
      if (fprintf (iff_fp, "%s", IFFSTR_REL) < 0) {
	 return (iff_io_error ());
      }
      if (iff_symbol_id (sym_source) < 0) {
	 return (-1);
      }
      if (fprintf (iff_fp, " \"%s\"", relation_name) < 0) {
	 return (iff_io_error ());
      }
      if (iff_symbol_id (sym_target) < 0) {
	 return (-1);
      }
      if (attributes) {
	 if (fprintf (iff_fp, " %s", attributes) < 0) {
	    return (iff_io_error ());
	 }
      }
      if (fprintf (iff_fp, "\n") < 0) {
	 return (iff_io_error ());
      }
   }
   return (0);
}
static int iff_symbol_relation ( const SQL_SYM * sym_source , const SQL_SYM * sym_target , const char * relation_name , const char * attributes ) { if ( sym_source && sym_target ) { if ( fprintf ( iff_fp , " " , IFFSTR_REL ) < 0 ) { return ( iff_io_error ( ) ) ; } if ( iff_symbol_id ( sym_source ) < 0 ) { return ( -1 ) ; } if ( fprintf ( iff_fp , " \" \" " , relation_name ) < 0 ) { return ( iff_io_error ( ) ) ; } if ( iff_symbol_id ( sym_target ) < 0 ) { return ( -1 ) ; } if ( attributes ) { if ( fprintf ( iff_fp , " " , attributes ) < 0 ) { return ( iff_io_error ( ) ) ; } } if ( fprintf ( iff_fp , " \n " ) < 0 ) { return ( iff_io_error ( ) ) ; } } return ( 0 ) ; }
iff_symbol_relation - Output a symbol relation entry.
iff_symbol_relation - Output a symbol relation entry .