Re: mbstowcs(3) may not return -1

看板FB_current作者時間13年前 (2012/06/21 21:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/6 (看更多)
On 21 June 2012 16:38, David Demelier <demelier.david@gmail.com> wrote: > Hello, > > While reading the manpage of mbstowcs I noticed an error in the RETURN > VALUES : > > =A0 =A0 The mbstowcs() function returns the number of wide characters con= verted, > =A0 =A0 not counting any terminating null wide character, or -1 if an inv= alid > =A0 =A0 multibyte character was encountered. > > Since size_t is unsigned, it can't returns -1. It returns (size_t)(-1). I don't know how is it correct, but this conforms to C spec. --=20 wbr, pluknet _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1FuniEM0 (FB_current)
文章代碼(AID): #1FuniEM0 (FB_current)