Too bad I'm a little late to the party.
No, this is not for you. This must be done manually. Fortunately, it is not difficult. I like to use fread () return to set NUL as follows:
char buffer[16+1]; x = fread(buffer, sizeof(char), 16, stream); buffer[x]='\0';
and now you have a line with a completed \ 0, and as a bonus we have a great variable x, which actually saves us from the trouble of running strlen () if we ever need it later. orderly!
deadPix3l
source share