Make sgetbs() return the number of characters read on success

This commit is contained in:
Andrea Mazzoleni 2026-10-03 16:50:31 +02:00
parent 97419fb67f
commit 969cb5ca31
5 changed files with 35 additions and 5 deletions

View file

@ -329,7 +329,7 @@ int sgetble32(STREAM* f, uint32_t* value);
* Read a binary string.
* Return -1 on error or if the buffer is too small, or the number of chars read.
*/
int sgetbs(STREAM* f, char* str, size_t size);
ssize_t sgetbs(STREAM* f, char* str, size_t size);
/****************************************************************************/
/* put */