dis_sql/src/sql_iff.cxx
// iff_mapping_record ---
// Outout all map records in the passed map list
//
iff_mapping_record
Outout all map records in the passed map list
iff_mapping_record Outout all map records in the passed map list
static int iff_mapping_record (const char * filename, 
			       const char * label,
			       iffmap *mp)
{
   int first;
   int retval = 0;
   for (first = 1; mp && (retval >= 0); mp = mp->next) {
      if (first) {
	 first = 0;
	 retval = fprintf (iff_fp, "%s \"%s\" \"%s\" {\n",
			   label, filename, hostfilename);
      }
      if (retval >= 0) {
	 retval = fprintf (iff_fp, " %d/%d %d/%d, %d/%d %d/%d\n",
			   mp->src_lineno_start,
			   mp->src_column_start,
			   mp->src_lineno_end,
			   mp->src_column_end,
			   mp->dest_lineno_start,
			   mp->dest_column_start,
			   mp->dest_lineno_end,
			   mp->dest_column_end);
      }
   }
   if (!first) {
      retval = fprintf (iff_fp, "}\n");
   }
   if (retval < 0) {
      retval = iff_io_error ();
   }
   return (retval);
}
static int iff_mapping_record ( const char * filename , const char * label , iffmap * mp ) { int first ; int retval = 0 ; for ( first = 1 ; mp && ( retval >= 0 ) ; mp = mp -> next ) { if ( first ) { first = 0 ; retval = fprintf ( iff_fp , " \" \" \" \" \n " , label , filename , hostfilename ) ; } if ( retval >= 0 ) { retval = fprintf ( iff_fp , " \n " , mp -> src_lineno_start , mp -> src_column_start , mp -> src_lineno_end , mp -> src_column_end , mp -> dest_lineno_start , mp -> dest_column_start , mp -> dest_lineno_end , mp -> dest_column_end ) ; } } if ( ! first ) { retval = fprintf ( iff_fp , " \n " ) ; } if ( retval < 0 ) { retval = iff_io_error ( ) ; } return ( retval ) ; }
iff_mapping_record
Outout all map records in the passed map list
iff_mapping_record Outout all map records in the passed map list
// map header // one entry per line // at least one was output so do close brace // only file i/o errors