dis_sql/src/sql_iff.cxx
//
// iff_symbol_attribute - Output symbol attributes for one symbol.
//
Output symbol attributes for one symbol.
Output symbol attributes for one symbol .
static int iff_symbol_attribute (const SQL_SYM * sym)
{
   if (sym && sym->attr_mask && ( ! sym->sym_replace )) {
      int first = 1;
      if (fprintf (iff_fp, "%s", IFFSTR_ATR) < 0) {
	 return (iff_io_error ());
      }
      if (iff_symbol_id (sym) < 0) {
	 return (-1);
      }
      if (sym->attr_mask & ATTRMASK_HOST) {
	 if (iff_one_attribute (&first, IFFSTR_ATTR_HOST) < 0) {
	    return (-1);
	 }
      }
      if (sym->attr_mask & ATTRMASK_HOSTIND) {
	 if (iff_one_attribute (&first, IFFSTR_ATTR_HOSTIND) < 0) {
	    return (-1);
	 }
      }
      if (sym->attr_mask & ATTRMASK_CURSOR) {
	 if (iff_one_attribute (&first, IFFSTR_ATTR_CURSOR) < 0) {
	    return (-1);
	 }
      }
      if (sym->attr_mask & ATTRMASK_LOOPIDX) {
	 if (iff_one_attribute (&first, IFFSTR_ATTR_LOOPIDX) < 0) {
	    return (-1);
	 }
      }
      if (fputc ('\n', iff_fp) == EOF) {
	 return (iff_io_error ());
      }
   }
   return (0);
}
static int iff_symbol_attribute ( const SQL_SYM * sym ) { if ( sym && sym -> attr_mask && ( ! sym -> sym_replace ) ) { int first = 1 ; if ( fprintf ( iff_fp , " " , IFFSTR_ATR ) < 0 ) { return ( iff_io_error ( ) ) ; } if ( iff_symbol_id ( sym ) < 0 ) { return ( -1 ) ; } if ( sym -> attr_mask & ATTRMASK_HOST ) { if ( iff_one_attribute ( & first , IFFSTR_ATTR_HOST ) < 0 ) { return ( -1 ) ; } } if ( sym -> attr_mask & ATTRMASK_HOSTIND ) { if ( iff_one_attribute ( & first , IFFSTR_ATTR_HOSTIND ) < 0 ) { return ( -1 ) ; } } if ( sym -> attr_mask & ATTRMASK_CURSOR ) { if ( iff_one_attribute ( & first , IFFSTR_ATTR_CURSOR ) < 0 ) { return ( -1 ) ; } } if ( sym -> attr_mask & ATTRMASK_LOOPIDX ) { if ( iff_one_attribute ( & first , IFFSTR_ATTR_LOOPIDX ) < 0 ) { return ( -1 ) ; } } if ( fputc ( ' \n ' , iff_fp ) == EOF ) { return ( iff_io_error ( ) ) ; } } return ( 0 ) ; }
iff_symbol_attribute - Output symbol attributes for one symbol.
iff_symbol_attribute - Output symbol attributes for one symbol .
// check bit mask for any attributes and if found output // an attribute entry. // "first" is used to flag that the comma separator is // not needed for the first attribute // Start entry. // terminate entry.