e0b123f6d0
Final word is Bruce's quote: C9x specifies the BSD4.4-Lite behaviour: [#3] ... Thus, the null-terminated output has been completely written if and only if the returned value is less than n. It means that if we not have any null-terminated output as for n == 0 we can't return value less than n, so we forced to return value equal to n i.e. 0 The next good thing is glibc compatibility, of course. 2) Do check for too big n in machine-independent way. 3) Minor optimization assuming EOF is < 0 |
||
---|---|---|
.. | ||
compat | ||
csu/i386 | ||
libalias | ||
libc | ||
libc_r | ||
libcalendar | ||
libcom_err | ||
libcompat | ||
libcrypt | ||
libcurses | ||
libdisk | ||
libedit | ||
libf2c | ||
libF77 | ||
libftpio | ||
libgnumalloc | ||
libI77 | ||
libipx | ||
libkse | ||
libkvm | ||
libm | ||
libmd | ||
libmytinfo | ||
libncurses | ||
libopie | ||
libpam/modules | ||
libpcap | ||
libpthread | ||
libresolv | ||
librpcsvc | ||
libscsi | ||
libskey | ||
libss | ||
libtcl | ||
libtelnet | ||
libtermcap | ||
libutil | ||
libvgl | ||
libxpg4 | ||
liby | ||
libz | ||
msun | ||
ncurses/ncurses | ||
Makefile | ||
Makefile.inc |