On 06/07/2011 01:34 PM, Jim Meyering wrote:
> It's slightly tighter and more readable to make this temporary "const".
> Only down-side is that inserting "const " pushes line-length to 80;-)
>
> ACK either way.
Since the const would disappear on the next patch, I pushed it without.
On the other hand, before pushing I changed the else branch from this:
+ addtok (CSET + work_mbc->cset);
to this:
+ {
+ /* The single-byte character set must be non-empty, or due to the
+ test above the entire MBCSET would be empty (which is invalid).
*/
+ assert (using_utf8() && work_mbc->cset != -1);
+ addtok (CSET + work_mbc->cset);
+ }
It all goes away in the next patch too, but the way that patch changes the
code is clearer with the assertion in place.
Paolo