Commit Graph

91 Commits (ea0c6b8168c86114c7d91b6dd853e505739285d2)

Author SHA1 Message Date
leitner 885ffac7d8 remove unused label
leitner e0ebf1e57e forgot to add man page
leitner 276cd8ef9e what if the left-over from writev does not fit into the buffer?
leitner c9e9ecfb6a add bytestream man page
leitner e2673d3782 add buffer_init_allocbuf, buffer_init_read, buffer_init_write, buffer_init_read_allocbuf, buffer_init_write_allocbuf
leitner ebb3086b5c buffer_seek did not work at all m(
leitner 91c02ad365 undo fatfinger
leitner 6ca4390c8e also advance cur if upstream is a bytestream or an iobuf
leitner 93a13274e0 also increment cur in bs_skip if upstream is not a memory buffer
leitner b67a1af443 only use writev for larger chunks in buffer_putflush
only use lseek if it saves a read in buffer_seek
leitner 45f7a362e0 abort loop if EOF
leitner ddfdd4d077 add compiler.h to abstract gcc attributes
leitner 51869a80f8 also set upstream to error state
leitner 235dfb18cd add bs_seterrorstate
leitner 302026f1b2 add functions for capacity checking and to skip bytes
leitner 03feeb7ef2 make check can now run in parallel
leitner f63eb1d9c5 move bs_err into own C file
leitner acee16d884 add unit tests for bs_capacitycheck (same as for bs_capacityassert
basically)
leitner 4f66a05d0b remove some warnings in unit tests
catch impossible buffer in bs_init_membuf
leitner 3128a340ac make unit tests self contained
leitner 4df5ee1bf3 add prs_readblob (no unit tests yet)
leitner 3fff3ae6db add and use bs_capacityassert
leitner 9ddab2153f add asciiz parsing
leitner 50ceb217ab add buffer_peekc
leitner 32cafc2b80 add a few helpers for parsing binary data
leitner 2389a150ac add errmsg documentation
leitner 94feba3667 use write in buffer_put for a slight perf improvement
leitner 760598ec2f #include <foo.h> -> #include <libowfat/foo.h>
leitner 6cd198cb98 remove unnecessary x86intrin.h include
leitner a1f1986247 include <foo> -> include "foo"
leitner 9cfa19396e special case buffer_get_token with token length 1 through memccpy
leitner 774a4b6714 add unistd.h
leitner 685ebdfb80 oops, did not actually flush the buffer
leitner a0cde0fee9 slight optimization for buffer_flush
leitner 695843c79e small buffer optimization
fix botched noipv6 case in buffer_tcp6
leitner 214ad3a92e use gcc magic and a #define to convert buffer_puts to buffer_put if the
string argument length is known at compile time (same for
buffer_putsflush)
leitner ed93e203a1 more constness for stralloc and buffer
leitner 7c5d119f9a fix buffer_get
leitner 8b3eb0be7c documented wrong return type
leitner a544abc39c switch io_fds from array to newly implemented (hopefully thread-safe) iarray
switch epoll from level triggering to edge triggering
leitner cf3dc34288 actually increase stralloc.len
leitner 53e2af7389 never close fd 0, 1 or 2 in buffer_close
leitner 4a04c40595 get rid of more -Wconversion warnings
leitner ee4a2c0cdb add man pages for buffer_from*
leitner 24d8e81116 add buffer_fromarray, buffer_frombuf
leitner bb1bebe517 stralloc* not const char*
leitner 1e549e9ee2 add man page
leitner 02818883df add buffer_tosa (buffer writing to auto-growing stralloc)
leitner 3004b518ef switch to size_t and ssize_t
leitner 83bf636b86 add RETURN VALUE section