aboutsummaryrefslogtreecommitdiff
path: root/include/stdio.h (unfollow)
Commit message (Expand)AuthorFilesLines
2013-04-04minor optimization to mbstowcs•••there is no need to zero-fill an mbstate_t object in the caller; mbsrtowcs will automatically treat a null pointer as the initial state. Rich Felker1-2/+1
2013-04-04fix incorrect range checks in wcsrtombs•••negative values of wchar_t need to be treated in the non-ASCII case so that they can properly generate EILSEQ rather than getting truncated to 8bit values and stored in the output. Rich Felker1-3/+3
2013-04-04overhaul mbsrtowcs•••these changes fix at least two bugs: - misaligned access to the input as uint32_t for vectorized ASCII test - incorrect src pointer after stopping on EILSEQ in addition, the text of the standard makes it unclear whether the mbstate_t object is to be modified when the destination pointer is null; previously it was cleared either way; now, it's only cleared when the destination is non-null. this change may need revisiting, but it should not affect most applications, since calling mbsrtowcs with non-zero state can only happen when the head of the string was already processed with mbrtowc. finally, these changes shave about 20% size off the function and seem to improve performance by 1-5%. Rich Felker1-69/+64
2013-04-02re-add useconds_t•••this type was removed back in 5243e5f1606a9c6fcf01414e , because it was removed from the XSI specs. however some apps use it. since it's in the POSIX reserved namespace, we can expose it unconditionally. rofl0r8-0/+8