diff options
-rw-r--r-- | src/cnki_pdf.c | 8 | ||||
-rw-r--r-- | src/jbig.c | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/cnki_pdf.c b/src/cnki_pdf.c index f8a5d44..6a7a317 100644 --- a/src/cnki_pdf.c +++ b/src/cnki_pdf.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, yzrh <yzrh@noema.org> + * Copyright (c) 2020-2022, yzrh <yzrh@noema.org> * * SPDX-License-Identifier: Apache-2.0 */ @@ -600,10 +600,16 @@ cnki_pdf_hn(cnki_t **param) free(dictionary); free(stream); } else if (ret == 1) { + if ((*param)->stat > 2) + printf("Failed\n"); + free(dictionary); pdf_obj_append(&pdf, ids[i], NULL, NULL, NULL, 0); } else { + if ((*param)->stat > 2) + printf("Unsupported format\n"); + free(dictionary); } } @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, yzrh <yzrh@noema.org> + * Copyright (c) 2020-2022, yzrh <yzrh@noema.org> * * SPDX-License-Identifier: Apache-2.0 */ @@ -24,7 +24,7 @@ strdec_jbig(char **bitmap, int *bitmap_size, int ret; if ((ret = jbg_dec_in(&sd, (unsigned char *) data_ptr, data_size, NULL)) != JBG_EOK) { - printf("%s\n", jbg_strerror(ret)); + printf("[%s] ", jbg_strerror(ret)); jbg_dec_free(&sd); return 1; } |