mirror of
https://github.com/sist2app/sist2.git
synced 2025-05-11 12:25:54 +02:00
Fix #492
This commit is contained in:
parent
5a82581992
commit
4dd5e70406
1 changed files with 14 additions and 0 deletions
14
third-party/libscan/libscan/ebook/ebook.c
vendored
14
third-party/libscan/libscan/ebook/ebook.c
vendored
|
@ -175,9 +175,19 @@ int render_cover(scan_ebook_ctx_t *ctx, fz_context *fzctx, document_t *doc, fz_d
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define IS_IGNORED_MESSAGE(message) \
|
||||||
|
( \
|
||||||
|
strstr(message, "invalid glyph index") \
|
||||||
|
|| strstr(message, "... repeated") \
|
||||||
|
) \
|
||||||
|
|
||||||
void fz_err_callback(void *user, const char *message) {
|
void fz_err_callback(void *user, const char *message) {
|
||||||
document_t *doc = (document_t *) user;
|
document_t *doc = (document_t *) user;
|
||||||
|
|
||||||
|
if (IS_IGNORED_MESSAGE(message)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const scan_ebook_ctx_t *ctx = &thread_ctx;
|
const scan_ebook_ctx_t *ctx = &thread_ctx;
|
||||||
CTX_LOG_WARNINGF(doc->filepath, "FZ: %s", message);
|
CTX_LOG_WARNINGF(doc->filepath, "FZ: %s", message);
|
||||||
}
|
}
|
||||||
|
@ -185,6 +195,10 @@ void fz_err_callback(void *user, const char *message) {
|
||||||
void fz_warn_callback(void *user, const char *message) {
|
void fz_warn_callback(void *user, const char *message) {
|
||||||
document_t *doc = (document_t *) user;
|
document_t *doc = (document_t *) user;
|
||||||
|
|
||||||
|
if (IS_IGNORED_MESSAGE(message)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const scan_ebook_ctx_t *ctx = &thread_ctx;
|
const scan_ebook_ctx_t *ctx = &thread_ctx;
|
||||||
CTX_LOG_DEBUGF(doc->filepath, "FZ: %s", message);
|
CTX_LOG_DEBUGF(doc->filepath, "FZ: %s", message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue