~ubuntu-branches/debian/sid/calibre/sid

« back to all changes in this revision

Viewing changes to src/calibre/ebooks/mobi/reader/index.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2014-05-14 18:17:50 UTC
  • mto: This revision was merged to the branch mainline in revision 75.
  • Revision ID: package-import@ubuntu.com-20140514181750-efj1wymey2vb4cao
Tags: upstream-1.36.0+dfsg
ImportĀ upstreamĀ versionĀ 1.36.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
    return ans
78
78
 
79
79
 
80
 
class CNCX(object): # {{{
 
80
class CNCX(object):  # {{{
81
81
 
82
82
    '''
83
83
    Parses the records that contain the compiled NCX (all strings from the
174
174
                byts, consumed = decint(data)
175
175
                data = data[consumed:]
176
176
                values.append(byts)
177
 
        else: # value_bytes is not None
 
177
        else:  # value_bytes is not None
178
178
            # Convert value_bytes to variable width values.
179
179
            total_consumed = 0
180
180
            while total_consumed < x.value_bytes:
239
239
        rec = rec[consumed:]
240
240
        tag_map = get_tag_map(control_byte_count, tags, rec, strict=strict)
241
241
        table[ident] = tag_map
 
242
    return header
242
243
 
243
244
def read_index(sections, idx, codec):
244
245
    table, cncx = OrderedDict(), CNCX([], codec)