Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Jun 2009 23:51:54 +0200
From:      Gabor Kovesdan <gabor@FreeBSD.org>
To:        freebsd-standards@FreeBSD.org
Subject:   mbstowcs() contradiction
Message-ID:  <4A244D7A.9040508@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
Hello,

I've just found a contradiction in the mbstowcs() man page. It says:
"The mbstowcs() function returns ........  or -1 if an invalid multibyte 
character was encountered."

It is impossible, because its return value is size_t, which is a signed 
type. Looking on the online documentaton, I think it should return 
(size_t)-1 on error. I've also looked at the code and I think our 
implementation is standard-compliant, but could someone take another 
look, please? If someone can acknowledge I'm right, I'll update the man 
page.

Thanks,

-- 
Gabor Kovesdan
FreeBSD Volunteer

EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org
WEB:   http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A244D7A.9040508>