Changeset 3550

Show
Ignore:
Timestamp:
04/25/08 06:51:35 (4 months ago)
Author:
cboos
Message:

DoxygenPlugin: applied r3375 to the 0.11 branch (should fix #798)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doxygenplugin/0.11/doxygentrac/doxygentrac.py

    r3132 r3550  
    202202            # Search in documentation directories 
    203203            path = os.path.join(self.base_path, doc) 
     204            path = os.path.join(path, self.html_output) 
    204205            if os.path.isdir(path): 
    205206                index = os.path.join(path, 'search.idx') 
     
    213214 
    214215            # Search in common documentation directory 
    215             index = os.path.join(self.base_path, 'search.idx') 
     216            index = os.path.join(self.base_path, self.html_output) 
     217            index = os.path.join(index, 'search.idx') 
    216218            if os.path.exists(index): 
    217219                creation = os.path.getctime(index) 
     
    347349    def _search_in_documentation(self, doc, keywords): 
    348350        # Open index file for documentation 
    349         index = os.path.join(self.base_path, doc, 'search.idx') 
     351        index = os.path.join(self.base_path, doc, self.html_output, 'search.idx') 
    350352        if os.path.exists(index): 
    351353            fd = open(index) 
     
    393395                    for i in range(numDocs): 
    394396                        idx = self._readInt(fd) 
    395                         freq = self._readInt(fd) 
     397                        if idx == -1: 
     398                            freq = 0 
     399                        else: 
     400                            freq = self._readInt(fd) 
    396401                        results.append({'idx': idx, 'freq': freq >> 1, 
    397402                          'hi': freq & 1, 'multi': multiplier}) 
     
    403408 
    404409                    for i in range(numDocs): 
     410                        if results[count]['idx'] == -1: 
     411                            results[count]['name'] = '' 
     412                            results[count]['url'] = '' 
     413                            count += 1 
     414                            continue 
    405415                        fd.seek(results[count]['idx']) 
    406416                        name = self._readString(fd) 
    407417                        url = self._readString(fd) 
    408418                        results[count]['name'] = name 
    409                         results[count]['url'] = url 
     419                        results[count]['url'] = self.html_output + '/' + url 
    410420                        count += 1 
    411421 
     
    441451        b3 = fd.read(1) 
    442452        b4 = fd.read(1) 
     453         
     454        if not b1 or not b2 or not b3 or not b4: 
     455            return -1; 
    443456 
    444457        return (ord(b1) << 24) | (ord(b2) << 16) | (ord(b3) << 8) | ord(b4)