Permalink
Please sign in to comment.
Browse files
Add kgetline() to kstring.c/.h
Similar to BSD's getline() but omits the \n terminator and manages the memory as a kstring. Call with "(kgets_func *) fgets" to read from stdio, or implement an fgets()-style function to read from other streams, e.g., a wrapper around gzgets() that reorders its parameters as per fgets().
- Loading branch information...
Showing
with
84 additions
and 1 deletion.
- +20 −0 kstring.c
- +7 −0 kstring.h
- +57 −1 test/kstring_test.c
0 comments on commit
cbcfcab