 
 JTC1/SC22/WG14 
N900
JTC1/SC22/WG14 
N900
WG14/N900       DR213
C99 Defect Report
Author: Clive Feather <clive@demon.net>
Date: 1999-10-20
Subject: lacuna in mbrtowc
Problem
-------
The description of the result of mbrtowc uses the term "positive" to
distinguish one case from others. Unfortunately some of the other
cases are also positive, because they are negative numbers cast to the
(unsigned) type size_t.
The actual return value in this case is always between 1 and the value
of the parameter n (inclusive):
    positive        if  the  next  n  or  fewer bytes complete a
                    valid  multibyte  character  (which  is  the
                    value  stored);  the  value  returned is the
                    number of bytes that complete the  multibyte
                    character.
Suggested Technical Corrigendum
-------------------------------
In 7.24.6.3.2 paragraph 4, change the label of the case "positive" to
"between 1 and n inclusive".