Actually, the primitive needs to be an enumerated value indicating one of:

- no console (windows only)
- console / terminal
- pipe
- file

Cheers,
Alistair
(on phone)

On Tue., 1 May 2018, 07:56 Alistair Grant, <akgrant0710@gmail.com> wrote:
Hi Eliot & Vincent,

On 27 April 2018 at 09:16, akgrant43 <notifications@github.com> wrote:
>
>
>
> > But I don't get it. IIRC, it used to be the case that ReadConsole/WriteConsole worked in both.
>
> I'd still like to be proved wrong...


This thread has been quiet for a few days, so I guess my wishes aren't
met and there isn't a way to have a program work in both Windows
Consoles and cygwin terminals.

One of the articles forwarded by Ben suggested the workaround is to have
a .com version of the program, which does all the work if the command
line arguments only require console i/o.  If a gui is required, it
relaunches the .exe version which then opens the windows.  We could
extend that to also check for cygwin and relaunch a cygwin exe.
However I think that is effectively adding another platform to support,
which is more effort than I want to put in.

Assuming all of the above, I think we might as well (reluctantly) rip
out the code that tests for cygwin terminals and just leave Vincent's
primitives in.  This will at least allow the image to properly determine
whether it can write to the console or if it should create files
instead.

What do you think?

Thanks,
Alistair