if_diff/src/idfReport.cxx
//============================================================================
// Returns true if loc and other_loc match on the basis that the
// length in loc is implicitly equal to the length of name.
//============================================================================
Returns true if loc and other_loc match on the basis that the
length in loc is implicitly equal to the length of name.
Returns true if loc and other_loc match on the basis that the length in loc is implicitly equal to the length of name .
static boolean keyword_loc_match(const char *name, locationList *loc, locationList *other_loc)
{
  if (   name == 0 || loc == 0 || other_loc == 0
      || loc->size() != 1 || other_loc->size() != 1) {
    return false;
  }
  locationStruct &ls = *((*loc)[0]);
  locationStruct &other_ls = *((*other_loc)[0]);
  boolean fudge = idf_configuration.contains("File name completeness differs.");
  if (fudge ? !idf_filename_match(ls.filename, other_ls.filename)
      	    : !idf_strmatch(ls.filename, other_ls.filename)) {
    return false;
  }
  if (   ls.start_line == other_ls.start_line
      && ls.start_column == other_ls.start_column
      && ls.end_line == 0
      && ls.end_column == 0
      && (   (   other_ls.end_line == 0
              && other_ls.end_column == strlen(name))
          || (   other_ls.end_line == other_ls.start_line
              && other_ls.end_column - other_ls.start_column + 1 == strlen(name)))) {
    return true;
  }
  return false;
}
static boolean keyword_loc_match ( const char * name , locationList * loc , locationList * other_loc ) { if ( name == 0 || loc == 0 || other_loc == 0 || loc -> size ( ) != 1 || other_loc -> size ( ) != 1 ) { return false ; } locationStruct & ls = * ( ( * loc ) [ 0 ] ) ; locationStruct & other_ls = * ( ( * other_loc ) [ 0 ] ) ; boolean fudge = idf_configuration . contains ( " " ) ; if ( fudge ? ! idf_filename_match ( ls . filename , other_ls . filename ) : ! idf_strmatch ( ls . filename , other_ls . filename ) ) { return false ; } if ( ls . start_line == other_ls . start_line && ls . start_column == other_ls . start_column && ls . end_line == 0 && ls . end_column == 0 && ( ( other_ls . end_line == 0 && other_ls . end_column == strlen ( name ) ) || ( other_ls . end_line == other_ls . start_line && other_ls . end_column - other_ls . start_column + 1 == strlen ( name ) ) ) ) { return true ; } return false ; }
Returns true if loc and other_loc match on the basis that the
length in loc is implicitly equal to the length of name.
Returns true if loc and other_loc match on the basis that the length in loc is implicitly equal to the length of name .