Changeset 10335


Ignore:
Timestamp:
2005-07-28T10:19:14+12:00 (19 years ago)
Author:
kjdon
Message:

++*pa is not the same as *pa++ - reversed these erroneous changes

Location:
trunk/gsdl/src/phind/generate
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/phind/generate/phrase.cpp

    r9614 r10335  
    230230      return -1;
    231231    } else {
    232       ++*p;
    233       ++*words;
     232      *p++;
     233      *words++;
    234234    }
    235235  }
     
    250250      return 1;
    251251    } else {
    252       --*p;
    253       --*words;
     252      *p--;
     253      *words--;
    254254    }
    255255  }
  • trunk/gsdl/src/phind/generate/suffix.cpp

    r9632 r10335  
    187187  // If the two elements are the same, examine the next one
    188188  while (*pa == *pb) {
    189     ++*pa;
    190     ++*pb;
     189    *pa++;
     190    *pb++;
    191191  }
    192192
     
    217217  // If the two elements are the same, examine the next one
    218218  while (*pa == *pb) {
    219     --*pa;
    220     --*pb;
     219    *pa--;
     220    *pb--;
    221221  }
    222222
     
    756756  // Read the statistics file
    757757  readStatistics();
    758 
    759758  // Read the numbers file
    760759  readNumbers();
    761 
     760 
    762761  if (numberOfDocuments == 0) {
    763762    cerr << "There are no documents in this collection!" << endl;
     
    777776    cerr << "Suffix: not enough memory to hold " << inputLength << " symbols." << endl;
    778777    exit(2);
    779   } 
     778  }
    780779  allocateSuffixCheck(contentLength);
    781 
    782780  // Initialise prefix and suffix arrays, only use the needed suffixes
    783781  for (cellcount j = 0, here = 0; j < inputLength; ++j) {
     
    790788  qsort(suffixArray, contentLength, sizeof(symbol *), suffixCompare);
    791789  qsort(prefixArray, contentLength, sizeof(symbol *), prefixCompare);
    792 
    793790  // Create the document arrays
    794791  if (verbosity > 1) {
Note: See TracChangeset for help on using the changeset viewer.