Commit Graph

21 Commits

Author SHA1 Message Date
4026937f08
Don't return pointer to freed memory address. 2021-06-04 23:14:36 +02:00
40e39dc0e7
Umm… nothing to see here… 😄
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-01 16:47:47 +02:00
07915bdf87
Add lots of debug output. 2021-06-01 15:32:10 +02:00
c35434e745
Simplify LOG macro.
All checks were successful
continuous-integration/drone/push Build is passing
We only have one logger, no need to specify it every time.
2021-05-31 22:43:30 +02:00
11572d5b29
Use logger for warnings end errors. 2021-05-31 19:12:07 +02:00
7ddfe32e30
Move is_whitespace() and urldecode() to helpers. 2021-05-30 21:52:52 +02:00
2d65961688
Output XML errors. 2021-05-29 18:42:29 +02:00
ba5716c585
Skip in-epub file if it is not found, except it's the container.
We skipped the whole EPUB before.
2021-05-29 18:20:23 +02:00
5bd1030ad8
Try opf: variants of XML tags if normal variants are not found. 2021-05-29 18:09:44 +02:00
00e3edb9f2
Only search files in spine, in the right order.
The spine lists all content documents in their linear reading order. So we're
finally getting our results in the right order! 🎉

Since we skip the images and fonts, which usually make up the most bytes in an
EPUB file, the performance increase is immense. I measured 60-70% in a very
short test.

Closes: #1
2021-05-29 17:34:43 +02:00
c94d9de0db
Reformat error messages.
One line per error message.
2021-05-29 12:53:14 +02:00
308e2d271f
Skip rest of file if encoding of files in EPUB is broken.
Standard says UTF-8. I don't want to deal with weird Windows-encodings or
whatever this is.

Closes: #7
2021-05-28 13:57:51 +02:00
84f600196c
Add error code to zip::exception. 2021-05-27 21:39:01 +02:00
38bf9be948
Fix some more memory leaks. 2021-05-27 20:11:59 +02:00
b24ea9b71e
Fix memory leak. 🤦
All checks were successful
continuous-integration/drone/push Build is passing
That's why I don't write C. 😄

This seems to fix issue #6 in single-threaded mode but sometimes throws “double
free or corruption (out)” in multi-threaded mode.

Bug: #6
2021-05-27 20:05:02 +02:00
e773d4b78a
Implement zip::read_file() – Read file in archive; add test.
Also added zip::open_file() and zip::close_file() to deduplicate code.
2021-05-23 08:56:58 +02:00
28c6c80def
Set C locale, treat EPUB file names as UTF-8.
EPUB file names MUST be UTF-8. ASCII is a subset of UTF-8.
2021-05-23 06:32:56 +02:00
a941bcced3
Initialize the variables where they're needed. 2021-05-21 07:05:44 +02:00
1a80f770ff
Fix error messages. 2021-05-21 04:04:17 +02:00
4e8c6e7489
Add exception for zip processing.
Some checks failed
continuous-integration/drone/push Build is failing
- New dependency: libfmt.
- Translate error messages.
2021-05-21 03:25:42 +02:00
222f802015
Basic zip file support.
All checks were successful
continuous-integration/drone/push Build is passing
Dumping the TOC works.
2021-05-21 01:56:37 +02:00