if_diff/src/idfLocation.cxx
//============================================================================
// copy_filename(const char *)
//----------------------------------------------------------------------------
// Avoid having the filename stored a zillion times in memory, by
// reusing the same storage, if the filename occurs successively.
//============================================================================
copy_filename(const char *)
Avoid having the filename stored a zillion times in memory, by
reusing the same storage, if the filename occurs successively.
copy_filename ( const char * ) Avoid having the filename stored a zillion times in memory by reusing the same storage if the filename occurs successively .
static const char *copy_filename(const char *fn1)
{
  const char *fn2 = NULL;
  if (fn1 != NULL) {
    if (last_filename != NULL && strcmp(fn1, last_filename) == 0) {
      return last_filename;
    }
    last_filename = fn2 = idf_copy_string(fn1);
  }
  return fn2;
}
static const char * copy_filename ( const char * fn1 ) { const char * fn2 = NULL ; if ( fn1 != NULL ) { if ( last_filename != NULL && strcmp ( fn1 , last_filename ) == 0 ) { return last_filename ; } last_filename = fn2 = idf_copy_string ( fn1 ) ; } return fn2 ; }
copy_filename(const char *)
Avoid having the filename stored a zillion times in memory, by
reusing the same storage, if the filename occurs successively.
copy_filename ( const char * ) Avoid having the filename stored a zillion times in memory by reusing the same storage if the filename occurs successively .