Y
Hacker News
new
|
ask
|
show
|
jobs
by
froh
1930 days ago
fmemopen takes the buffer length, and there is no need to have the buffer \0 terminated, so instead of strlen you can also just give the buffer size.
The number of bytes parsed can be fetched with the scanf %n format specifier.