On 3. 3. 2016 4:41, Daniel Goldman wrote:
> On 2/20/2016 11:21 AM, David Macek wrote:
> 
>  >> I am a curses and C win32 api programmer, for many years, so I
>  >> know a bit about these technologies. I don't see the overlap.
>  >> Please provide me with specifics (not vague statements) of how
>  >> "curses programs use the Win32 API under the hood". I'm willing
>  >> to be educated, but my guess is you simply don't know what you
>  >> are talking about.
> 
>  > Already answered by someone else in the other thread.
> 
> Right, they agreed with me.

They provided an example of how `wcon_setcolor` is implemented using Win32 API 
calls, including `SetConsoleTextAttribute`. Whether that's agreeing with you or 
not, I'd rather not guess.

>> Anyway, try this. Run mintty and inside run `/usr/bin/mc | tee ~/foo`.
>  > In mc, enter a directory, open a dialog or whatever. Kill the mc
>> process (for example using the Task manager). Close mintty and
>  > open a new one. Run `cat ~/foo`. The last state of mc's TUI should
>  > appear in the new mintty window.
> 
> What did you expect? I think that makes my point perfectly. In the real 
> world, we don't direct mc output through a pipe! I'm sure you know the 
> difference, it's very basic. TUI Programs like mc are fundamentally 
> different from command line programs like grep, both in how they are 
> programmed and how they are used. Even given that you do not know how to 
> program in curses, where the difference is obvious at the source code 
> level, from a user point of view the difference is obvious.

I'm not disputing that TUI and non-TUI programs are different. I was trying to 
provide evidence in reply to """I stand by my statement that "curses programs 
do not normally use stdin, stdout, or stderr", but am ready to be corrected and 
learn.""".

I thought this exercise would convince you that the program (the curses part of 
it, to be precise) is not communicating with the terminal window via any other 
channels than std{in,out}. I was hoping to demonstrate that by showing that 
`cat`, not a curses program, can create the same terminal output as a curses 
program.

Which part of the argument do you disagree with, if any?

-- 
David Macek

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to