On Aug 9, 2:31 pm,
xavier.la...@gmail.com wrote:
> I need to apply a custom filter function when pasting text. So in winclip.c
> I am trying to do the following:
>
> 1. intercept the paste buffer
> 2. read it in chunk of 40bytes
> 3. apply my filter function which produces other 40bytes
> 4. child_send those 40 bytes
Hacking mintty for this doesn't sound like a terribly good approach.
I'd paste the text into a file using a Windows editor, and then try to
use standard tools to do the filtering or write a simple filter if
that doesn't work.
> Everything seems working fine but if I paste anything larger than 64k bytes
> the program freezes.
>
> Any hint?
I'm not aware of such a limit in mintty itself. It could be a limit in
the Cygwin pseudo terminal implementation, which normally doesn't have
to deal with writes of such a size. It could also be a deadlock with
the mintty process and the application waiting for each other's output
to be read, due to limited buffering. In 'ps' that would show with
both processes marked with an 'O' in the first column.
Andy