2 weeks ago
make cxBufferEof() return a bool
src/buffer.c | file | annotate | diff | comparison | revisions | |
src/cx/buffer.h | file | annotate | diff | comparison | revisions |
--- a/src/buffer.c Sun Dec 08 00:18:47 2024 +0100 +++ b/src/buffer.c Mon Dec 09 23:31:42 2024 +0100 @@ -143,7 +143,7 @@ buffer->pos = 0; } -int cxBufferEof(const CxBuffer *buffer) { +bool cxBufferEof(const CxBuffer *buffer) { return buffer->pos >= buffer->size; }
--- a/src/cx/buffer.h Sun Dec 08 00:18:47 2024 +0100 +++ b/src/cx/buffer.h Mon Dec 09 23:31:42 2024 +0100 @@ -344,12 +344,12 @@ * Tests, if the buffer position has exceeded the buffer size. * * @param buffer the buffer to test - * @return non-zero, if the current buffer position has exceeded the last + * @return true, if the current buffer position has exceeded the last * byte of the buffer's contents. */ cx_attr_nonnull cx_attr_nodiscard -int cxBufferEof(const CxBuffer *buffer); +bool cxBufferEof(const CxBuffer *buffer); /**