mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-03 00:23:08 +02:00
...
This commit is contained in:
parent
e5300248e1
commit
3635ee19e2
1 changed files with 3 additions and 1 deletions
|
|
@ -509,7 +509,7 @@ def u(w):
|
|||
a('Control byte count: %d'%self.tagx_control_byte_count)
|
||||
for i in self.tagx_entries:
|
||||
a('\t' + repr(i))
|
||||
a('Text of last entry in NCX: %s'% self.last_entry)
|
||||
a('Index of last IndexEntry in secondary index record: %s'% self.last_entry)
|
||||
a('Number of entries in the NCX: %d'% self.ncx_count)
|
||||
|
||||
return '\n'.join(ans)
|
||||
|
|
@ -570,6 +570,7 @@ def __init__(self, record):
|
|||
last_num, consumed = decode_hex_number(raw[idxt0_pos:])
|
||||
count_pos = idxt0_pos + consumed
|
||||
self.ncx_count, = struct.unpack(b'>H', raw[count_pos:count_pos+2])
|
||||
self.last_entry = last_num
|
||||
|
||||
if last_num != self.ncx_count - 1:
|
||||
raise ValueError('Last id number in the NCX != NCX count - 1')
|
||||
|
|
@ -615,6 +616,7 @@ def u(w):
|
|||
a('Control byte count: %d'%self.tagx_control_byte_count)
|
||||
for i in self.tagx_entries:
|
||||
a('\t' + repr(i))
|
||||
a('Index of last IndexEntry in primary index record: %s'% self.last_entry)
|
||||
a('Number of entries in the NCX: %d'% self.ncx_count)
|
||||
|
||||
return '\n'.join(ans)
|
||||
|
|
|
|||
Loading…
Reference in a new issue