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)
|
self.guide = guide = Guide(self)
|
||||||
for elem in xpath(opf, '/o2:package/o2:guide/o2:reference'):
|
for elem in xpath(opf, '/o2:package/o2:guide/o2:reference'):
|
||||||
href = elem.get('href')
|
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)
|
self.logger.log_warn(u'Guide reference %r not found' % href)
|
||||||
continue
|
continue
|
||||||
guide.add(elem.get('type'), elem.get('title'), href)
|
guide.add(elem.get('type'), elem.get('title'), href)
|
||||||
@ -601,7 +602,10 @@ class OEBBook(object):
|
|||||||
def _toc_from_ncx(self, opf):
|
def _toc_from_ncx(self, opf):
|
||||||
result = xpath(opf, '/o2:package/o2:spine/@toc')
|
result = xpath(opf, '/o2:package/o2:spine/@toc')
|
||||||
if not result:
|
if not result:
|
||||||
return False
|
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]
|
id = result[0]
|
||||||
ncx = self.manifest[id].data
|
ncx = self.manifest[id].data
|
||||||
self.manifest.remove(id)
|
self.manifest.remove(id)
|
||||||
|
@ -32,9 +32,11 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#if BYTE_ORDER == BIG_ENDIAN
|
#ifdef BYTE_ORDER
|
||||||
#define LZX_BIG_ENDIAN
|
# if BYTE_ORDER == BIG_ENDIAN
|
||||||
#endif
|
# define LZX_BIG_ENDIAN
|
||||||
|
# endif /* BYTE_ORDER == BIG_ENDIAN */
|
||||||
|
#endif /* BYTE_ORDER */
|
||||||
|
|
||||||
#ifdef NONSLIDE
|
#ifdef NONSLIDE
|
||||||
#include "lzc.h"
|
#include "lzc.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user