96689e7ed9
- I have added a call to memset() to clear the mbibuff on each loop. Since we're dealing with possibly broken multibyte sequences, clearing it will avoid problems with a new input sequence possibly being confused by extra bytes still there from the last iteration. wctomb(), which is used to fill that buffer, does not append a NUL. - I have added a (char) cast when copying single bytes into the input buffer after a multibyte conversion error. - In the call to strvisx() the count must be 1, not mbilen which can be 2 or 3 etc for a multibyte character. This value is a count of characters - not bytes - to process. It even says characters in the man page. In vis(3) I am interpreting this value to mean multibyte characters. |
||
---|---|---|
.. | ||
extern.h | ||
foldit.c | ||
Makefile | ||
vis.1 | ||
vis.c |