if_diff/src/idfSymbol.cxx
//============================================================================
// A symbol should only have its identifying characteristics set once,
// so this returns false if they have already been set.
//============================================================================
A symbol should only have its identifying characteristics set once,
so this returns false if they have already been set.
A symbol should only have its identifying characteristics set once so this returns false if they have already been set .
boolean idfSymbol::set(const char *nm, const char *knd,
                       const struct location *loc, boolean gen,
      	      	       boolean map)
{
  generated = gen;
  if (name != NULL || kind != NULL || location != NULL) {
    return false;
  }
  if (nm != NULL) {
    name = new char[strlen(nm) + 1];
    strcpy(((char *)name), nm);
    setLocalName();
  }
  if (knd != NULL) {
    kind = new char[strlen(knd) + 1];
    strcpy(((char *)kind), knd);
  }
  if (loc != NULL) {
    location = idf_copy_location_struct(loc, map);
  }
  return true;
}
boolean idfSymbol :: set ( const char * nm , const char * knd , const struct location * loc , boolean gen , boolean map ) { generated = gen ; if ( name != NULL || kind != NULL || location != NULL ) { return false ; } if ( nm != NULL ) { name = new char [ strlen ( nm ) + 1 ] ; strcpy ( ( ( char * ) name ) , nm ) ; setLocalName ( ) ; } if ( knd != NULL ) { kind = new char [ strlen ( knd ) + 1 ] ; strcpy ( ( ( char * ) kind ) , knd ) ; } if ( loc != NULL ) { location = idf_copy_location_struct ( loc , map ) ; } return true ; }
A symbol should only have its identifying characteristics set once,
so this returns false if they have already been set.
A symbol should only have its identifying characteristics set once so this returns false if they have already been set .