mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fixes for any2lit on windows
This commit is contained in:
commit
cf96631d4e
@ -583,7 +583,8 @@ class OEBBook(object):
|
||||
self.guide = guide = Guide(self)
|
||||
for elem in xpath(opf, '/o2:package/o2:guide/o2:reference'):
|
||||
href = elem.get('href')
|
||||
if href not in self.manifest.hrefs:
|
||||
path, frag = urldefrag(href)
|
||||
if path not in self.manifest.hrefs:
|
||||
self.logger.log_warn(u'Guide reference %r not found' % href)
|
||||
continue
|
||||
guide.add(elem.get('type'), elem.get('title'), href)
|
||||
@ -601,6 +602,9 @@ class OEBBook(object):
|
||||
def _toc_from_ncx(self, opf):
|
||||
result = xpath(opf, '/o2:package/o2:spine/@toc')
|
||||
if not result:
|
||||
expr = '/o2:package/o2:manifest/o2:item[@media-type="%s"]/@id'
|
||||
result = xpath(opf, expr % NCX_MIME)
|
||||
if len(result) != 1:
|
||||
return False
|
||||
id = result[0]
|
||||
ncx = self.manifest[id].data
|
||||
|
@ -32,9 +32,11 @@
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef BYTE_ORDER
|
||||
# if BYTE_ORDER == BIG_ENDIAN
|
||||
# define LZX_BIG_ENDIAN
|
||||
#endif
|
||||
# endif /* BYTE_ORDER == BIG_ENDIAN */
|
||||
#endif /* BYTE_ORDER */
|
||||
|
||||
#ifdef NONSLIDE
|
||||
#include "lzc.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user