summaryrefslogtreecommitdiff
path: root/src/multibyte/wcsrtombs.c
AgeCommit message (Collapse)AuthorFilesLines
2014-06-02fix incorrect end pointer in some cases when wcsrtombs stops earlyRich Felker1-7/+15
when wcsrtombs stopped due to hitting zero remaining space in the output buffer, it was wrongly clearing the position pointer as if it had completed the conversion successfully. this commit rearranges the code somewhat to make a clear separation between the cases of ending due to running out of output buffer space, and ending due to reaching the end of input or an illegal sequence in the input. the new branches have been arranged with the hope of optimizing more common cases, too.
2013-12-12include cleanups: remove unused headers and add feature test macrosSzabolcs Nagy1-5/+0
2013-04-04fix incorrect range checks in wcsrtombsRich Felker1-3/+3
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.
2012-09-06use restrict everywhere it's required by c99 and/or posix 2008Rich Felker1-1/+1
to deal with the fact that the public headers may be used with pre-c99 compilers, __restrict is used in place of restrict, and defined appropriately for any supported compiler. we also avoid the form [restrict] since older versions of gcc rejected it due to a bug in the original c99 standard, and instead use the form *restrict.
2011-02-12initial check-in, version 0.5.0v0.5.0Rich Felker1-0/+58