Re: [PATCH 1/2] Cygwin: pty: Revise convert_mb_str() function.

2020-09-09 Thread Takashi Yano via Cygwin-patches
On Wed, 9 Sep 2020 17:07:20 +0900 Takashi Yano wrote: > + /* Max bytes in multibyte char is 6. */ > + for (mblen = 1; mblen <= 6; mblen ++) Sorry, I misunderstood that the max utf-8 char length is 6. Actually, it is 4, therefore mbstate_t can be used. I will submit v2 patch. --

[PATCH 1/2] Cygwin: pty: Revise convert_mb_str() function.

2020-09-09 Thread Takashi Yano via Cygwin-patches
- Use tmp_pathbuf instead of HeapAlloc()/HeapFree(). - Remove mb_str_free() function. - Consider the case where the multibyte string stops in the middle of a multibyte char. --- winsup/cygwin/fhandler_tty.cc | 123 ++ 1 file changed, 82 insertions(+), 41 deletions