aboutsummaryrefslogtreecommitdiffstats
path: root/src/byte_source.c
AgeCommit message (Collapse)AuthorFilesLines
2023-12-02[WIP] Tighten up reader node managementDavid Robillard1-46/+43
[WIP] Broken on 32-bit This makes the reader stack manipulations stricter, to make the code more regular and avoid redundant work and bad cache activity. Now, functions that push node headers and their bodies are responsible for (more or less) immediately pushing any trailing null bytes required for termination and alignment. This makes the writes to the node in the stack more local, ensures nodes are terminated as early as possible (to reduce the risk of using non-terminated strings), and avoids the need to calculate aligned stack allocations.
2023-12-02Factor out serd_byte_source_skip_bom()David Robillard1-0/+16
2023-12-02Use ZixAllocator directlyDavid Robillard1-9/+9
2023-12-02[WIP] Generalize node construction APIDavid Robillard1-2/+1
2023-12-02Add support for custom allocatorsDavid Robillard1-15/+36
This makes it explicit in the API where memory is allocated, and allows the user to provide a custom allocator to avoid the use of the default system allocator for whatever reason.
2023-12-02Simplify input stream APIDavid Robillard1-70/+45
2023-12-02Add assertions for all non-null pointers in the public APIDavid Robillard1-0/+4
2023-12-02Simplify ByteSource implementationDavid Robillard1-10/+15
2023-12-02Add SerdCaretDavid Robillard1-17/+28
2023-12-02Simplify reader interfaceDavid Robillard1-4/+11
2023-12-02Bring read/write interface closer to the C standardDavid Robillard1-1/+1
2023-12-02Use more human-readable status codesDavid Robillard1-1/+1
2023-12-02Split up public API headerDavid Robillard1-2/+0
2023-12-02Use char* for strings in public APIDavid Robillard1-4/+4
The constant casting just makes user code a mess, for no benefit.
2022-10-23Fix crash when trying to read chunks without startingDavid Robillard1-2/+7
2022-08-31Adopt REUSE machine-readable licensing standardDavid Robillard1-15/+2
2021-05-31Make most function parameters constDavid Robillard1-10/+11
More const never hurts in general, but in particular this allows the compiler to make better nullability deductions, which reduces the amount of manual nullability casting required.
2021-01-02Use email address instead of website for attributionDavid Robillard1-1/+1
2020-12-31Format all code with clang-formatDavid Robillard1-53/+54
2020-12-31Avoid "else" after "break" and "return"David Robillard1-6/+9
2020-11-13Use aligned allocation via C11 or Windows API where possibleDavid Robillard1-3/+2
2020-08-14Clean up and separate internal headersDavid Robillard1-1/+3
2020-06-21Clean up includesDavid Robillard1-1/+8
2019-10-27Fix EOF handling while reading in bulk or from stringsDavid Robillard1-0/+2
2018-07-22Inline serd_byte_source_advanceDavid Robillard1-34/+1
2018-06-10Fix byte source to never read past end of stringsDavid Robillard1-10/+17
2017-11-05Move cursor from reader to byte sourceDavid Robillard1-0/+14
2017-11-05Move EOF flag from reader to byte sourceDavid Robillard1-0/+2
2017-06-30Fix spurious error message when parsing empty filesDavid Robillard1-1/+1
2017-04-24Fix reading with non-standard page sizesDavid Robillard1-2/+2
2017-04-24Allow arbitrary page size to be passed for custom sourcesDavid Robillard1-10/+11
2017-04-14Factor out file reading from readerDavid Robillard1-0/+107